From 77a232b53527e4bda05f82ac42a260e8dc5aef5a Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Tue, 4 Mar 2025 03:35:18 +0300 Subject: [PATCH 01/40] feat: new sdk core initial commit --- .gitignore | 45 + build.gradle.kts | 21 + code/LICENSE-HEADER.txt | 13 - code/README.md | 14 - code/pom.xml | 874 -- .../sdk/core/client/BaseRapidClient.kt | 73 - .../sdk/core/client/BaseXapClient.kt | 73 - .../expediagroup/sdk/core/client/Client.kt | 337 - .../sdk/core/client/ClientHelpers.kt | 21 - .../sdk/core/client/Environment.kt | 45 - .../sdk/core/client/ExpediaGroupClient.kt | 70 - .../sdk/core/client/HttpHandler.kt | 43 - .../sdk/core/client/OkHttpEventListener.kt | 202 - .../core/configuration/ClientConfiguration.kt | 45 - .../sdk/core/configuration/Credentials.kt | 45 - .../ExpediaGroupClientConfiguration.kt | 50 - .../configuration/RapidClientConfiguration.kt | 43 - .../configuration/XapClientConfiguration.kt | 43 - .../collector/ConfigurationCollector.kt | 75 - .../collector/ConfigurationProviderQueue.kt | 47 - .../provider/ConfigurationProvider.kt | 63 - .../ExpediaGroupConfigurationProvider.kt | 43 - .../provider/RapidConfigurationProvider.kt | 40 - .../provider/RuntimeConfigurationProvider.kt | 47 - .../provider/XapConfigurationProvider.kt | 40 - .../sdk/core/constant/Authentication.kt | 29 - .../sdk/core/constant/ConfigurationName.kt | 42 - .../sdk/core/constant/Constant.kt | 29 - .../sdk/core/constant/ExceptionMessage.kt | 24 - .../sdk/core/constant/HeaderKey.kt | 26 - .../sdk/core/constant/HeaderValue.kt | 20 - .../com/expediagroup/sdk/core/constant/Key.kt | 26 - .../sdk/core/constant/LogMaskingFields.kt | 36 - .../sdk/core/constant/LogMaskingRegex.kt | 22 - .../sdk/core/constant/LoggerName.kt | 21 - .../sdk/core/constant/LoggingMessage.kt | 32 - .../sdk/core/constant/SignatureValues.kt | 30 - .../provider/ExceptionMessageProvider.kt | 29 - .../provider/LogMaskingRegexProvider.kt | 20 - .../provider/LoggingMessageProvider.kt | 49 - .../sdk/core/contract/Contract.kt | 35 - .../expediagroup/sdk/core/model/Headers.kt | 26 - .../expediagroup/sdk/core/model/Nothing.kt | 21 - .../expediagroup/sdk/core/model/Operation.kt | 27 - .../sdk/core/model/OperationParams.kt | 27 - .../expediagroup/sdk/core/model/Properties.kt | 36 - .../expediagroup/sdk/core/model/Response.kt | 62 - .../sdk/core/model/TransactionId.kt | 26 - .../core/model/exception/ExceptionUtils.kt | 40 - .../model/exception/ExpediaGroupException.kt | 27 - .../client/ExpediaGroupClientException.kt | 29 - .../ExpediaGroupConfigurationException.kt | 27 - .../ExpediaGroupInvalidFieldNameException.kt | 24 - .../PropertyConstraintViolationException.kt | 27 - .../service/ExpediaGroupApiException.kt | 23 - .../service/ExpediaGroupAuthException.kt | 43 - ...xpediaGroupServiceDefaultErrorException.kt | 18 - .../service/ExpediaGroupServiceException.kt | 30 - .../sdk/core/model/paging/Paginator.kt | 89 - .../sdk/core/model/paging/ResponseState.kt | 94 - .../com/expediagroup/sdk/core/plugin/Hook.kt | 75 - .../expediagroup/sdk/core/plugin/Plugin.kt | 43 - .../sdk/core/plugin/PluginConfiguration.kt | 23 - .../AuthenticationConfiguration.kt | 38 - .../AuthenticationHookFactory.kt | 65 - .../authentication/AuthenticationPlugin.kt | 42 - .../strategy/AuthenticationStrategy.kt | 54 - .../strategy/BasicAuthenticationStrategy.kt | 43 - .../ExpediaGroupAuthenticationStrategy.kt | 138 - .../strategy/RapidAuthenticationStrategy.kt | 61 - .../plugin/encoding/EncodingConfiguration.kt | 28 - .../core/plugin/encoding/EncodingPlugin.kt | 31 - .../ExceptionHandlingConfiguration.kt | 28 - .../exception/ExceptionHandlingPlugin.kt | 37 - .../httptimeout/HttpTimeoutConfiguration.kt | 36 - .../plugin/httptimeout/HttpTimeoutPlugin.kt | 33 - .../logging/ExpediaGroupJsonFieldFilter.kt | 23 - .../ExpediaGroupJsonFieldPatternBuilder.kt | 26 - .../core/plugin/logging/ExpediaGroupLogger.kt | 52 - .../logging/ExpediaGroupLoggerFactory.kt | 28 - .../sdk/core/plugin/logging/LogMasker.kt | 32 - .../plugin/logging/LoggableContentTypes.kt | 32 - .../plugin/logging/LoggingConfiguration.kt | 48 - .../logging/LoggingMaskedFieldsProvider.kt | 45 - .../sdk/core/plugin/logging/LoggingPlugin.kt | 50 - .../core/plugin/logging/RequestBodyLogger.kt | 70 - .../core/plugin/logging/ResponseBodyLogger.kt | 77 - .../request/DefaultRequestConfiguration.kt | 32 - .../plugin/request/DefaultRequestPlugin.kt | 31 - .../serialization/ContentNegotiation.kt | 246 - .../SerializationConfiguration.kt | 30 - .../serialization/SerializationPlugin.kt | 40 - .../expediagroup/sdk/xap/client/XapClient.kt | 367 - .../sdk/xap/infrastructure/ApiAbstractions.kt | 45 - ...HotelDetailsResponseOccupantsInnerAllOf.kt | 103 - .../HotelDetailsResponseStayDatesAllOf.kt | 103 - .../HotelDetailsResponseWarningsInnerAllOf.kt | 123 - .../models/HotelHotelAmenitiesInnerAllOf.kt | 103 - .../models/HotelRoomAmenitiesInnerAllOf.kt | 103 - .../xap/models/LocationGeoLocationAllOf.kt | 113 - .../sdk/xap/models/LodgingRoomTypePrice.kt | 163 - .../LodgingRoomTypePriceAvgNightlyRate.kt | 103 - ...gingRoomTypePriceAvgNightlyRateWithFees.kt | 103 - .../models/LodgingRoomTypePriceBaseRate.kt | 103 - ...dgingRoomTypePricePropertyMandatoryFees.kt | 103 - ...ingRoomTypePriceRefundableDamageDeposit.kt | 103 - .../LodgingRoomTypePriceTaxesAndFees.kt | 103 - .../models/LodgingRoomTypePriceTotalPrice.kt | 103 - ...RoomTypePriceTotalPriceWithPropertyFees.kt | 103 - .../sdk/xap/models/RateCalendarPriceAllOf.kt | 103 - .../xap/models/RatePlanAmenitiesInnerAllOf.kt | 103 - .../xap/models/RatePlanPriceAvgNightlyRate.kt | 113 - .../RatePlanPriceAvgNightlyStrikeOutRate.kt | 113 - .../sdk/xap/models/RatePlanPriceBaseRate.kt | 113 - .../models/RatePlanPriceHotelMandatoryFees.kt | 113 - .../RatePlanPriceNightlyRatesInnerAllOf.kt | 103 - .../RatePlanPriceRefundableDamageDeposit.kt | 113 - .../xap/models/RatePlanPriceRoomRatesInner.kt | 165 - .../xap/models/RatePlanPriceTaxesAndFees.kt | 113 - ...ePlanPriceTaxesAndFeesDetailsInnerAllOf.kt | 103 - .../sdk/xap/models/RatePlanPriceTotalPrice.kt | 113 - .../RatePlanPriceTotalStrikeOutPrice.kt | 113 - .../sdk/xap/models/RatePlanStandalonePrice.kt | 187 - .../RatePlanStandalonePriceAvgNightlyRate.kt | 113 - ...nStandalonePriceAvgNightlyStrikeOutRate.kt | 113 - .../models/RatePlanStandalonePriceBaseRate.kt | 113 - ...tePlanStandalonePriceHotelMandatoryFees.kt | 113 - ...atePlanStandalonePriceStrikeOutBaseRate.kt | 113 - ...ndalonePriceStrikeOutHotelMandatoryFees.kt | 113 - ...lanStandalonePriceStrikeOutTaxesAndFees.kt | 113 - .../RatePlanStandalonePriceTaxesAndFees.kt | 113 - .../RatePlanStandalonePriceTotalPrice.kt | 113 - ...ePlanStandalonePriceTotalStrikeOutPrice.kt | 113 - .../models/RoomRatesNightlyRatesInnerAllOf.kt | 103 - .../RoomRatesTaxesAndFeesDetailsInnerAllOf.kt | 103 - .../xap/models/RoomTypeAmenitiesInnerAllOf.kt | 103 - .../sdk/xap/models/RoomTypePrice.kt | 197 - .../xap/models/RoomTypePriceAvgNightlyRate.kt | 113 - .../RoomTypePriceAvgNightlyRateWithFees.kt | 113 - .../RoomTypePriceAvgNightlyStrikeOutRate.kt | 113 - ...ypePriceAvgNightlyStrikeoutRateWithFees.kt | 113 - .../RoomTypePriceRefundableDamageDeposit.kt | 113 - .../sdk/xap/models/RoomTypePriceTotalPrice.kt | 113 - .../RoomTypePriceTotalPriceWithHotelFees.kt | 113 - .../RoomTypePriceTotalStrikeOutPrice.kt | 113 - .../sdk/xap/models/RoomTypeStandalonePrice.kt | 187 - .../sdk/xap/models/exception/ApiException.kt | 293 - .../operations/GetActivityDetailsOperation.kt | 44 - .../GetActivityListingsOperation.kt | 35 - .../xap/operations/GetCarDetailsOperation.kt | 44 - .../operations/GetCarsListingsOperation.kt | 35 - .../operations/GetFeedDownloadUrlOperation.kt | 35 - ...etLodgingAvailabilityCalendarsOperation.kt | 35 - .../operations/GetLodgingDetailsOperation.kt | 44 - .../operations/GetLodgingListingsOperation.kt | 35 - .../operations/GetLodgingQuotesOperation.kt | 35 - .../GetLodgingRateCalendarOperation.kt | 35 - code/transformedSpecs.yaml | 8438 ----------------- .../sdk/core/constant/HeaderKey.kt | 26 - .../serialization/ContentNegotiation.kt | 246 - .../serialization/SerializationPlugin.kt | 40 - .../generators/openapi/OpenApiSdkGenerator.kt | 172 - .../change-builder-method-param-type.yaml | 8 - .../change-class-param-type.yaml | 11 - .../change-builder-method-param-type.yaml | 8 - .../change-class-param-type.yaml | 11 - .../change-builder-method-param-type.yaml | 8 - .../change-class-param-type.yaml | 11 - .../change-builder-method-params-type.yaml | 11 - .../change-class-params-type.yaml | 16 - .../import-chrono-unit.yaml | 4 - .../truncate-pickup-dropoff-times.yaml | 16 - .../add-rooms-builder-method.yaml | 8 - .../import-room.yaml | 4 - .../remove-room-builder-methods.yaml | 14 - .../add-rooms-builder-method.yaml | 8 - .../import-room.yaml | 4 - .../remove-room-builder-methods.yaml | 14 - .../change-builder-method-params-type.yaml | 11 - .../change-class-params-type.yaml | 16 - .../change-builder-method-params-type.yaml | 11 - .../change-class-params-type.yaml | 16 - .../change-builder-method-param-type.yaml | 8 - .../change-class-param-type.yaml | 11 - .../rooms.kt | 48 - .../rooms.kt | 48 - .../resources/post-processor/src/index.ts | 45 - ...ctivities-cancellation-policy-processor.ts | 32 - .../available-time-slot-processor.ts | 32 - .../cars-cancellation-policy-processor.ts | 32 - ...ars-listings-operation-params-processor.ts | 54 - ...ing-listings-operation-params-processor.ts | 51 - ...dging-quotes-operation-params-processor.ts | 51 - ...n-cancellable-date-time-range-processor.ts | 32 - .../src/processors/penalty-rule-processor.ts | 32 - .../vendor-location-details-processor.ts | 32 - .../expediagroup-sdk/client.mustache | 161 - .../expediagroup-sdk/imports/core.mustache | 16 - .../operation_params.mustache | 165 - examples/README.md | 106 - examples/pom.xml | 97 - .../sdk/xap/examples/XapSdkDemoTestRun.java | 75 - .../xap/examples/scenarios/XapScenario.java | 44 - .../car/CarDetailsQuickStartScenario.java | 248 - .../car/CarListingsQuickStartScenario.java | 156 - ...ailabilityCalendarsQuickStartScenario.java | 109 - .../HotelIdsSearchEndToEndScenario.java | 352 - .../lodging/ListingsQuickStartScenario.java | 209 - .../lodging/QuotesQuickStartScenario.java | 161 - .../VrboPropertySearchEndToEndScenario.java | 491 - .../scenarios/lodging/VrboScenario.java | 28 - examples/src/main/resources/log4j2.xml | 29 - generator/build.gradle.kts | 76 + generator/gradle.properties | 1 + .../src/main/resources/generator-config.yaml | 8 + .../operations/params/get_headers.mustache | 16 + .../operations/params/imports.mustache | 5 + .../main/resources/templates}/room.mustache | 2 +- gradle.properties | 7 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 60756 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 234 + gradlew.bat | 89 + settings.gradle.kts | 13 + specs/openapi-merge.json | 32 - specs/xap-activity.specs.yaml | 1335 --- specs/xap-car.specs.yaml | 1633 ---- specs/xap-hotel.specs.yaml | 3394 ------- specs/xap-lodging.specs.yaml | 998 -- specs/xap-sdp-v1.specs.yaml | 392 - tests/integration/README.md | 87 - tests/integration/pom.xml | 123 - .../sdk/xap/integrations/common/Constant.java | 17 - .../common/XapIntegrationTests.java | 45 - ...AvailabilityCalendarsIntegrationTests.java | 132 - .../lodging/ListingsIntegrationTests.java | 501 - .../lodging/QuotesIntegrationTests.java | 205 - ...tLodgingAvailabilityCalendarsResponse.json | 1 - .../resources/GetLodgingListingsResponse.json | 1 - .../resources/GetLodgingQuotesResponse.json | 1 - xap-sdk/build.gradle.kts | 76 + .../src/main/kotlin/.openapi-generator/FILES | 210 + .../main/kotlin/.openapi-generator/VERSION | 1 + .../expediagroup/sdk/xap/AsyncXapClient.kt | 40 + .../com/expediagroup/sdk/xap/XapClient.kt | 49 + .../sdk/xap/configuration/ApiEndpoint.kt | 5 + .../xap/configuration/ClientEnvironment.kt | 5 + .../sdk/xap/configuration/EndpointProvider.kt | 22 + .../sdk/xap/configuration/XapApiEndpoint.kt | 7 + .../configuration/XapClientConfiguration.kt | 88 + .../configuration/XapJacksonObjectMapper.kt | 8 + .../sdk/xap/core/ApiKeyHeaderStep.kt | 13 + .../sdk/xap/core/AsyncRequestExecutor.kt | 40 + .../sdk/xap/core/RequestExecutor.kt | 41 + .../sdk/xap/models/APIGatewayError.kt | 21 +- .../expediagroup/sdk/xap/models/APIMError.kt | 21 +- .../sdk/xap/models/ActivitiesAddress.kt | 21 +- .../models/ActivitiesCancellationPolicy.kt | 21 +- .../sdk/xap/models/ActivitiesCountry.kt | 21 +- .../sdk/xap/models/ActivitiesError.kt | 21 +- .../sdk/xap/models/ActivitiesErrors.kt | 21 +- .../sdk/xap/models/ActivitiesGeoLocation.kt | 21 +- .../sdk/xap/models/ActivitiesLink.kt | 21 +- .../sdk/xap/models/ActivitiesLocation.kt | 21 +- .../xap/models/ActivitiesLocationOption.kt | 21 +- .../sdk/xap/models/ActivitiesMedia.kt | 21 +- .../sdk/xap/models/ActivitiesMoney.kt | 21 +- .../sdk/xap/models/ActivitiesNeighborhood.kt | 21 +- .../sdk/xap/models/ActivitiesPhone.kt | 21 +- .../sdk/xap/models/ActivitiesPrice.kt | 21 +- .../sdk/xap/models/ActivitiesSupplier.kt | 21 +- .../sdk/xap/models/ActivitiesWarning.kt | 21 +- .../expediagroup/sdk/xap/models/Activity.kt | 21 +- .../sdk/xap/models/ActivityDetailsResponse.kt | 21 +- .../xap/models/ActivityListingsResponse.kt | 21 +- .../sdk/xap/models/AdditionalFee.kt | 21 +- .../expediagroup/sdk/xap/models/Address.kt | 21 +- .../sdk/xap/models/AgeClassRestriction.kt | 21 +- .../sdk/xap/models/AvailabilityCalendar.kt | 21 +- .../models/AvailabilityCalendarResponse.kt | 21 +- .../sdk/xap/models/AvailableTimeSlot.kt | 21 +- .../expediagroup/sdk/xap/models/BedType.kt | 21 +- .../sdk/xap/models/CancellationPenaltyRule.kt | 21 +- .../CancellationPenaltyRulePenaltyPrice.kt | 21 +- .../sdk/xap/models/CancellationPolicy.kt | 21 +- .../expediagroup/sdk/xap/models/Capacity.kt | 21 +- .../com/expediagroup/sdk/xap/models/Car.kt | 21 +- .../sdk/xap/models/CarCategory.kt | 21 +- .../expediagroup/sdk/xap/models/CarDetails.kt | 21 +- .../sdk/xap/models/CarDetailsResponse.kt | 21 +- .../sdk/xap/models/CarListingsResponse.kt | 21 +- .../expediagroup/sdk/xap/models/CarPolicy.kt | 21 +- .../expediagroup/sdk/xap/models/CarType.kt | 21 +- .../sdk/xap/models/CarsAddress.kt | 21 +- .../sdk/xap/models/CarsCancellationPolicy.kt | 21 +- .../sdk/xap/models/CarsCountry.kt | 21 +- .../sdk/xap/models/CarsDateRange.kt | 21 +- .../sdk/xap/models/CarsDistance.kt | 21 +- .../expediagroup/sdk/xap/models/CarsError.kt | 21 +- .../expediagroup/sdk/xap/models/CarsErrors.kt | 21 +- .../sdk/xap/models/CarsGeoLocation.kt | 21 +- .../expediagroup/sdk/xap/models/CarsLink.kt | 21 +- .../sdk/xap/models/CarsLocation.kt | 21 +- .../sdk/xap/models/CarsLocationOption.kt | 21 +- .../expediagroup/sdk/xap/models/CarsMoney.kt | 21 +- .../sdk/xap/models/CarsNeighborhood.kt | 21 +- .../sdk/xap/models/CarsValidFormsOfPayment.kt | 21 +- .../sdk/xap/models/CarsWarning.kt | 21 +- .../sdk/xap/models/CategoryGroup.kt | 21 +- .../sdk/xap/models/ChainAndBrandInfo.kt | 21 +- .../expediagroup/sdk/xap/models/Country.kt | 21 +- .../expediagroup/sdk/xap/models/DateRange.kt | 21 +- .../sdk/xap/models/DateTimePeriod.kt | 21 +- .../expediagroup/sdk/xap/models/Deductible.kt | 21 +- .../sdk/xap/models/DepositDetail.kt | 21 +- .../sdk/xap/models/DepositPolicy.kt | 21 +- .../sdk/xap/models/Description.kt | 21 +- .../sdk/xap/models/DisambiguationResponse.kt | 21 +- .../expediagroup/sdk/xap/models/Discount.kt | 21 +- .../expediagroup/sdk/xap/models/Distance.kt | 21 +- .../expediagroup/sdk/xap/models/Duration.kt | 21 +- .../expediagroup/sdk/xap/models/Equipment.kt | 21 +- .../com/expediagroup/sdk/xap/models/Error.kt | 21 +- .../com/expediagroup/sdk/xap/models/Errors.kt | 21 +- .../sdk/xap/models/ExtraCostPerDistance.kt | 21 +- .../expediagroup/sdk/xap/models/ExtraFees.kt | 21 +- .../com/expediagroup/sdk/xap/models/Fault.kt | 21 +- .../expediagroup/sdk/xap/models/FileInfo.kt | 21 +- .../expediagroup/sdk/xap/models/FileSize.kt | 21 +- .../sdk/xap/models/FilterConditions.kt | 21 +- .../com/expediagroup/sdk/xap/models/FuelAC.kt | 21 +- .../sdk/xap/models/GeoLocation.kt | 21 +- .../com/expediagroup/sdk/xap/models/Hotel.kt | 21 +- .../sdk/xap/models/HotelDetailsResponse.kt | 21 +- .../HotelDetailsResponseOccupantsInner.kt | 21 +- .../models/HotelDetailsResponseStayDates.kt | 21 +- .../HotelDetailsResponseWarningsInner.kt | 21 +- .../xap/models/HotelHotelAmenitiesInner.kt | 21 +- .../expediagroup/sdk/xap/models/HotelLinks.kt | 21 +- .../xap/models/HotelLinksApiRateCalendar.kt | 21 +- .../xap/models/HotelLinksWebSearchResult.kt | 21 +- .../sdk/xap/models/HotelListingsResponse.kt | 21 +- .../models/HotelListingsResponseStayDates.kt | 21 +- .../sdk/xap/models/HotelLocation.kt | 21 +- .../sdk/xap/models/HotelPolicies.kt | 21 +- .../sdk/xap/models/HotelPropertyType.kt | 21 +- .../sdk/xap/models/HotelRateCalendar.kt | 21 +- .../sdk/xap/models/HotelRoomAmenitiesInner.kt | 21 +- .../com/expediagroup/sdk/xap/models/Image.kt | 21 +- .../com/expediagroup/sdk/xap/models/Link.kt | 21 +- .../expediagroup/sdk/xap/models/Location.kt | 21 +- .../sdk/xap/models/LocationGeoLocation.kt | 21 +- .../sdk/xap/models/LocationOption.kt | 21 +- .../sdk/xap/models/LodgingAmenity.kt | 21 +- .../models/LodgingCancellationPenaltyRule.kt | 21 +- .../xap/models/LodgingCancellationPolicy.kt | 21 +- .../sdk/xap/models/LodgingError.kt | 21 +- .../sdk/xap/models/LodgingErrors.kt | 21 +- .../sdk/xap/models/LodgingLink.kt | 21 +- .../sdk/xap/models/LodgingMoney.kt | 21 +- .../sdk/xap/models/LodgingOccupant.kt | 21 +- .../sdk/xap/models/LodgingPromotion.kt | 21 +- .../sdk/xap/models/LodgingQuotesResponse.kt | 21 +- .../sdk/xap/models/LodgingRatePlan.kt | 21 +- .../sdk/xap/models/LodgingRoomType.kt | 21 +- .../sdk/xap/models/LodgingRoomTypeLinks.kt | 21 +- .../models/LodgingRoomTypeLinksWebDetails.kt | 21 +- .../LodgingRoomTypeLinksWebSearchResult.kt | 21 +- .../sdk/xap/models/LodgingRoomTypePrice.kt | 149 + .../sdk/xap/models/LodgingStayDates.kt | 21 +- .../sdk/xap/models/LodgingWarning.kt | 21 +- .../sdk/xap/models/MandatoryFeesDetail.kt | 21 +- .../xap/models/MandatoryFeesDetailAmount.kt | 21 +- .../com/expediagroup/sdk/xap/models/Media.kt | 21 +- .../expediagroup/sdk/xap/models/Mileage.kt | 21 +- .../com/expediagroup/sdk/xap/models/Money.kt | 21 +- .../sdk/xap/models/Neighborhood.kt | 21 +- .../sdk/xap/models/NightlyRates.kt | 21 +- .../xap/models/NonCancellableDateTimeRange.kt | 21 +- .../sdk/xap/models/NonRefundableDateRange.kt | 21 +- .../expediagroup/sdk/xap/models/Occupant.kt | 21 +- .../com/expediagroup/sdk/xap/models/Offer.kt | 21 +- .../sdk/xap/models/PaymentSchedule.kt | 21 +- .../sdk/xap/models/PaymentSchedulePrice.kt | 21 +- .../sdk/xap/models/PenaltyRule.kt | 21 +- .../sdk/xap/models/PenaltyType.kt | 21 +- .../com/expediagroup/sdk/xap/models/Phone.kt | 21 +- .../sdk/xap/models/PresignedUrlResponse.kt | 21 +- .../com/expediagroup/sdk/xap/models/Price.kt | 21 +- .../expediagroup/sdk/xap/models/Promotion.kt | 21 +- .../sdk/xap/models/PromotionAmount.kt | 21 +- .../expediagroup/sdk/xap/models/Property.kt | 21 +- .../sdk/xap/models/PropertyDetails.kt | 21 +- .../sdk/xap/models/PropertyManager.kt | 21 +- .../sdk/xap/models/RateCalendar.kt | 21 +- .../sdk/xap/models/RateCalendarPrice.kt | 21 +- .../sdk/xap/models/RateCalendarResponse.kt | 21 +- .../sdk/xap/models/RateDetails.kt | 21 +- .../expediagroup/sdk/xap/models/RatePlan.kt | 21 +- .../sdk/xap/models/RatePlanAmenitiesInner.kt | 21 +- .../sdk/xap/models/RatePlanPrice.kt | 110 +- .../models/RatePlanPriceNightlyRatesInner.kt | 21 +- .../RatePlanPriceTaxesAndFeesDetailsInner.kt | 21 +- .../sdk/xap/models/RatePlanStandalonePrice.kt | 169 + .../com/expediagroup/sdk/xap/models/Rating.kt | 21 +- .../sdk/xap/models/RatingDetails.kt | 21 +- .../sdk/xap/models/RatingWithoutDetails.kt | 21 +- .../expediagroup/sdk/xap/models/Redemption.kt | 21 +- .../sdk/xap/models/ReferencePrice.kt | 21 +- .../sdk/xap/models/RentalLimits.kt | 21 +- .../sdk/xap/models/Restrictions.kt | 21 +- .../com/expediagroup/sdk/xap/models/Room.kt | 15 - .../sdk/xap/models/RoomOccupancyPolicy.kt | 21 +- .../sdk/xap/models/RoomPreference.kt | 21 +- .../expediagroup/sdk/xap/models/RoomRates.kt | 21 +- .../sdk/xap/models/RoomRatesBaseRate.kt | 21 +- .../xap/models/RoomRatesNightlyRatesInner.kt | 21 +- .../sdk/xap/models/RoomRatesTaxesAndFees.kt | 21 +- .../RoomRatesTaxesAndFeesDetailsInner.kt | 21 +- .../sdk/xap/models/RoomRatesTotalPrice.kt | 21 +- .../models/RoomRatesTotalStrikeOutPrice.kt | 21 +- .../expediagroup/sdk/xap/models/RoomType.kt | 21 +- .../sdk/xap/models/RoomTypeAmenitiesInner.kt | 21 +- .../sdk/xap/models/RoomTypeLinks.kt | 21 +- .../sdk/xap/models/RoomTypeLinksApiDetails.kt | 21 +- .../sdk/xap/models/RoomTypeLinksWebDetails.kt | 21 +- .../sdk/xap/models/RoomTypeMediaInner.kt | 21 +- .../sdk/xap/models/RoomTypePrice.kt | 179 + .../sdk/xap/models/RoomTypeStandalonePrice.kt | 169 + .../expediagroup/sdk/xap/models/Savings.kt | 21 +- .../sdk/xap/models/SdpAPIMError.kt | 21 +- .../expediagroup/sdk/xap/models/SdpLink.kt | 21 +- .../expediagroup/sdk/xap/models/StayDates.kt | 21 +- .../expediagroup/sdk/xap/models/Supplier.kt | 21 +- .../sdk/xap/models/TaxesAndFees.kt | 21 +- .../sdk/xap/models/TaxesAndFeesDetail.kt | 21 +- .../com/expediagroup/sdk/xap/models/Ticket.kt | 21 +- .../expediagroup/sdk/xap/models/TimeRange.kt | 21 +- .../sdk/xap/models/TransmissionDrive.kt | 21 +- .../sdk/xap/models/ValidFormsOfPayment.kt | 21 +- .../sdk/xap/models/VehicleDetails.kt | 21 +- .../sdk/xap/models/VendorLocationDetails.kt | 21 +- .../sdk/xap/models/WaiverPolicy.kt | 21 +- .../expediagroup/sdk/xap/models/Warning.kt | 21 +- .../com/expediagroup/sdk/xap/models/When.kt | 21 +- .../operations/GetActivityDetailsOperation.kt | 46 + .../GetActivityDetailsOperationParams.kt | 57 +- .../GetActivityListingsOperation.kt | 39 + .../GetActivityListingsOperationParams.kt | 129 +- .../xap/operations/GetCarDetailsOperation.kt | 46 + .../GetCarDetailsOperationParams.kt | 85 +- .../operations/GetCarsListingsOperation.kt | 39 + .../GetCarsListingsOperationParams.kt | 424 +- .../operations/GetFeedDownloadUrlOperation.kt | 34 + .../GetFeedDownloadUrlOperationParams.kt | 109 +- ...etLodgingAvailabilityCalendarsOperation.kt | 39 + ...ingAvailabilityCalendarsOperationParams.kt | 59 +- .../operations/GetLodgingDetailsOperation.kt | 46 + .../GetLodgingDetailsOperationParams.kt | 113 +- .../operations/GetLodgingListingsOperation.kt | 39 + .../GetLodgingListingsOperationParams.kt | 745 +- .../operations/GetLodgingQuotesOperation.kt | 39 + .../GetLodgingQuotesOperationParams.kt | 353 +- .../GetLodgingRateCalendarOperation.kt | 39 + .../GetLodgingRateCalendarOperationParams.kt | 129 +- 465 files changed, 4567 insertions(+), 37091 deletions(-) create mode 100644 .gitignore create mode 100644 build.gradle.kts delete mode 100644 code/LICENSE-HEADER.txt delete mode 100644 code/README.md delete mode 100644 code/pom.xml delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/client/Client.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/client/ClientHelpers.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/client/Environment.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/client/ExpediaGroupClient.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/client/HttpHandler.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/client/OkHttpEventListener.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/ClientConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/Credentials.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/ExpediaGroupClientConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/RapidClientConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/XapClientConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/collector/ConfigurationCollector.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/collector/ConfigurationProviderQueue.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/ConfigurationProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/ExpediaGroupConfigurationProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/RapidConfigurationProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/RuntimeConfigurationProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/XapConfigurationProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/Authentication.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/ConfigurationName.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/Constant.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/ExceptionMessage.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderKey.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderValue.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/Key.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/LogMaskingFields.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/LogMaskingRegex.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/LoggerName.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/LoggingMessage.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/SignatureValues.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/ExceptionMessageProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LogMaskingRegexProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LoggingMessageProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/contract/Contract.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/Headers.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/Nothing.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/Operation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/OperationParams.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/Properties.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/Response.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/TransactionId.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/ExceptionUtils.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/ExpediaGroupException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupClientException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupConfigurationException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupInvalidFieldNameException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/PropertyConstraintViolationException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupApiException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupAuthException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupServiceDefaultErrorException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupServiceException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/paging/Paginator.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/model/paging/ResponseState.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/Hook.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/Plugin.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/PluginConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationHookFactory.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationPlugin.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/AuthenticationStrategy.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/BasicAuthenticationStrategy.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/ExpediaGroupAuthenticationStrategy.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/RapidAuthenticationStrategy.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/encoding/EncodingConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/encoding/EncodingPlugin.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/exception/ExceptionHandlingConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/exception/ExceptionHandlingPlugin.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/httptimeout/HttpTimeoutConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/httptimeout/HttpTimeoutPlugin.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupJsonFieldFilter.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupJsonFieldPatternBuilder.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLogger.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLoggerFactory.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LogMasker.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggableContentTypes.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingMaskedFieldsProvider.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingPlugin.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/RequestBodyLogger.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ResponseBodyLogger.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/request/DefaultRequestConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/request/DefaultRequestPlugin.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/ContentNegotiation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationConfiguration.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationPlugin.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/infrastructure/ApiAbstractions.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDatesAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocationAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceAvgNightlyRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceAvgNightlyRateWithFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceBaseRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePricePropertyMandatoryFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceRefundableDamageDeposit.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTaxesAndFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTotalPrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTotalPriceWithPropertyFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPriceAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceAvgNightlyRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceAvgNightlyStrikeOutRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceBaseRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceHotelMandatoryFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceRefundableDamageDeposit.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceRoomRatesInner.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTotalPrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTotalStrikeOutPrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceAvgNightlyRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceAvgNightlyStrikeOutRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceBaseRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceHotelMandatoryFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutBaseRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutHotelMandatoryFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutTaxesAndFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTaxesAndFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTotalPrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTotalStrikeOutPrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInnerAllOf.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyRateWithFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyStrikeOutRate.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyStrikeoutRateWithFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceRefundableDamageDeposit.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalPrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalPriceWithHotelFees.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalStrikeOutPrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/models/exception/ApiException.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt delete mode 100644 code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt delete mode 100644 code/transformedSpecs.yaml delete mode 100644 customizations/core/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderKey.kt delete mode 100644 customizations/core/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/ContentNegotiation.kt delete mode 100644 customizations/core/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationPlugin.kt delete mode 100644 customizations/generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/OpenApiSdkGenerator.kt delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-builder-method-param-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-class-param-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/available-time-slot/change-builder-method-param-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/available-time-slot/change-class-param-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-builder-method-param-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-class-param-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-builder-method-params-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-class-params-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/import-chrono-unit.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/truncate-pickup-dropoff-times.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/add-rooms-builder-method.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/import-room.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/remove-room-builder-methods.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/add-rooms-builder-method.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/import-room.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/remove-room-builder-methods.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-builder-method-params-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-class-params-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/penalty-rule/change-builder-method-params-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/penalty-rule/change-class-params-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/vendor-location-details/change-builder-method-param-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/rules/vendor-location-details/change-class-param-type.yaml delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/index.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/activities-cancellation-policy-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/available-time-slot-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/cars-cancellation-policy-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-cars-listings-operation-params-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-lodging-listings-operation-params-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-lodging-quotes-operation-params-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/non-cancellable-date-time-range-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/penalty-rule-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/post-processor/src/processors/vendor-location-details-processor.ts delete mode 100644 customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/client.mustache delete mode 100644 customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/imports/core.mustache delete mode 100644 customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/operation_params.mustache delete mode 100644 examples/README.md delete mode 100644 examples/pom.xml delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/XapSdkDemoTestRun.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/HotelIdsSearchEndToEndScenario.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java delete mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java delete mode 100644 examples/src/main/resources/log4j2.xml create mode 100644 generator/build.gradle.kts create mode 100644 generator/gradle.properties create mode 100644 generator/src/main/resources/generator-config.yaml create mode 100644 generator/src/main/resources/templates/operations/params/get_headers.mustache create mode 100644 generator/src/main/resources/templates/operations/params/imports.mustache rename {customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/xap => generator/src/main/resources/templates}/room.mustache (99%) create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100755 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle.kts delete mode 100644 specs/openapi-merge.json delete mode 100644 specs/xap-activity.specs.yaml delete mode 100644 specs/xap-car.specs.yaml delete mode 100644 specs/xap-hotel.specs.yaml delete mode 100644 specs/xap-lodging.specs.yaml delete mode 100644 specs/xap-sdp-v1.specs.yaml delete mode 100644 tests/integration/README.md delete mode 100644 tests/integration/pom.xml delete mode 100644 tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/Constant.java delete mode 100644 tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/XapIntegrationTests.java delete mode 100644 tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/AvailabilityCalendarsIntegrationTests.java delete mode 100644 tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/ListingsIntegrationTests.java delete mode 100644 tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/QuotesIntegrationTests.java delete mode 100644 tests/integration/src/test/resources/GetLodgingAvailabilityCalendarsResponse.json delete mode 100644 tests/integration/src/test/resources/GetLodgingListingsResponse.json delete mode 100644 tests/integration/src/test/resources/GetLodgingQuotesResponse.json create mode 100644 xap-sdk/build.gradle.kts create mode 100644 xap-sdk/src/main/kotlin/.openapi-generator/FILES create mode 100644 xap-sdk/src/main/kotlin/.openapi-generator/VERSION create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/AsyncXapClient.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/XapClient.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt (85%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt (85%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt (93%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt (81%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt (97%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt (94%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt (95%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt (77%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt (93%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt (94%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt (96%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt (83%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt (96%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt (83%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt (81%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt (84%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt (95%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt (85%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt (82%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt (98%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt (94%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt (93%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt (79%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt (94%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt (93%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt (80%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt (94%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt (80%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt (89%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt (93%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt (80%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt (92%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt (98%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt (54%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt (88%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt (50%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt (94%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt (97%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt (81%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt (91%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt (84%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt (84%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt (88%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt (86%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt (83%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt (90%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt (93%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt (91%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt (87%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt (89%) rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt (90%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt (75%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt (70%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt (68%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt (70%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt (73%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt (74%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt (77%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt (74%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt (64%) create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt rename {code => xap-sdk}/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt (69%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..b1dff0dd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Kotlin ### +.kotlin + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 000000000..91264bb31 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,21 @@ +plugins { + kotlin("jvm") version "2.1.10" +} + +group = "com.expediagroup.sdk" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +dependencies { + testImplementation(kotlin("test")) +} + +tasks.test { + useJUnitPlatform() +} +kotlin { + jvmToolchain(21) +} diff --git a/code/LICENSE-HEADER.txt b/code/LICENSE-HEADER.txt deleted file mode 100644 index 732a2da66..000000000 --- a/code/LICENSE-HEADER.txt +++ /dev/null @@ -1,13 +0,0 @@ -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. \ No newline at end of file diff --git a/code/README.md b/code/README.md deleted file mode 100644 index 8666c82ff..000000000 --- a/code/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Welcome to the xap-sdk SDK! - -## Usage -```xml - - com.expediagroup - xap-sdk - 1.1.0 - -``` - -## License - -This project is licensed under the Apache License v2.0 - see the [LICENSE](LICENSE) for details. diff --git a/code/pom.xml b/code/pom.xml deleted file mode 100644 index 208d3d4c4..000000000 --- a/code/pom.xml +++ /dev/null @@ -1,874 +0,0 @@ - - - 4.0.0 - com.expediagroup - xap-sdk - 1.1.0 - EG xap-sdk for Java - EG xap-sdk v1.1.0 - https://github.com/ExpediaGroup/test-sdk - 2022 - jar - - - - Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - Expedia Group Committers - Expedia Group - https://expediagroup.com - - - - - scm:git:git@github.com:ExpediaGroup/test-sdk.git - scm:git:git@github.com:ExpediaGroup/test-sdk.git - https://github.com/ExpediaGroup/test-sdk/ - - - - - oss-sonatype - Sonatype Nexus Release Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - oss-sonatype - Sonatype Nexus Snapshots Repository - https://oss.sonatype.org/content/repositories/snapshots - - - - - 1.8 - 8 - - UTF-8 - UTF-8 - - 3.8.0 - 1.8.0 - - 0.90 - com.expediagroup.sdk - - ${project.version} - ${project.artifactId} - - - 3.13.0 - 3.8.1 - 3.5.0 - 3.4.2 - 3.3.1 - 3.6.0 - 3.3.1 - 3.5.2 - 3.6.0 - 3.4.0 - 0.8.12 - 1.9.20 - - 1.2.1 - 4.6 - 1.6.0 - 2.0.21 - 1.9.0 - 2.3.13 - 0.26.1 - 2.0.16 - 1.7.0 - 3.2.7 - - - - - - - org.jetbrains.kotlin - kotlin-bom - ${kotlin.version} - pom - import - - - org.jetbrains.kotlinx - kotlinx-coroutines-bom - ${kotlinx.coroutines.version} - pom - import - - - io.ktor - ktor-bom - ${ktor.version} - pom - import - - - org.jetbrains.kotlinx - atomicfu-jvm - ${kotlin-atomic.version} - - - - - org.slf4j - slf4j-api - ${slf4j.version} - - - - - - com.fasterxml.jackson - jackson-bom - 2.18.2 - pom - import - - - com.squareup.okio - okio-jvm - 3.9.1 - - - org.jetbrains - annotations - 26.0.1 - - - org.hibernate.validator - hibernate-validator - 6.2.5.Final - - - com.fasterxml.jackson.core - jackson-annotations - 2.18.2 - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - ${maven-resources-plugin.version} - - false - - @@ - - - - - include-domain-helpers - generate-sources - - copy-resources - - - ${basedir}/src/main/kotlin/com/expediagroup/sdk/domain/xap - - - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - ${maven-dependency-plugin.version} - - - analyze - - analyze - - - true - true - - - - - - org.codehaus.mojo - flatten-maven-plugin - - all - true - true - bom - true - - - - - - - - ${flatten.maven.plugin.version} - - - flatten - process-resources - - flatten - - - - - - org.apache.maven.plugins - maven-jar-plugin - ${maven-jar-plugin.version} - - - attach-test-jar - - test-jar - - - - - true - - - true - true - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - - -parameters - -XDcompilePolicy=simple - - - - - - default-compile - none - - - - default-testCompile - none - - - kotlin-java-compile - compile - - compile - - - - kotlin-java-test-compile - test-compile - - testCompile - - - - - - org.codehaus.mojo - properties-maven-plugin - ${properties.maven.plugin.version} - - - generate-resources - - write-project-properties - - - ${project.build.outputDirectory}/sdk.properties - - - - - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - compile-kotlin - - compile - - - - ${project.basedir}/src/main/kotlin - - ${java.release} - - - - test-compile-kotlin - - test-compile - - - - ${project.basedir}/src/test/kotlin - - ${java.release} - - - - - - kotlinx-serialization - - - - - org.jetbrains.kotlin - kotlin-maven-serialization - ${kotlin.version} - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper-maven-plugin.version} - - - add-kotlin-sources - generate-sources - - add-source - - - - - ${project.basedir}/src/main/kotlin - - - - - - add-kotlin-test-sources - generate-sources - - add-test-source - - - - - ${project.basedir}/src/test/kotlin - - - - - - get-the-year - - timestamp-property - - - current.year - yyyy - - - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - attach-sources - - jar-no-fork - - - - - - - org.apache.maven.plugins - maven-shade-plugin - ${maven-shade-plugin.version} - - - - shade - - - true - true - true - - - - - - org.hibernate - ${shadePrefix}.dependencies.org.hibernate - - - - - org.jetbrains.kotlin:* - org.jetbrains.kotlinx:* - org.slf4j:slf4j-api - - - - - - - - - org.jetbrains.dokka - dokka-maven-plugin - - - ${project.basedir}/src/main/kotlin/com/expediagroup/sdk/xap - ${project.basedir}/src/main/kotlin/com/expediagroup/sdk/domain/xap - - - - org.jetbrains.dokka - kotlin-as-java-plugin - ${dokka-plugin.version} - - - org.jetbrains.dokka - versioning-plugin - ${dokka-plugin.version} - - - - - ${project.version} - ${dokka-old-versions.location} - - - true - - - - prepare-package - - dokka - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - ${maven-enforcer-plugin.version} - - - enforce-pom-standards - validate - - enforce - - - - - - - - - ${minimum.jdk.version} - - - ${minimum.maven.version} - - - true - Snapshot dependencies must be resolved before releasing - - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco-plugin.version} - - ${project.build.directory}/jacoco.exec - ${project.build.directory}/jacoco - - - - instrument-coverage - initialize - - prepare-agent - - - - coverage-report - prepare-package - - report - - - - coverage-check - verify - - check - - - - - CLASS - - *Test - - - - INSTRUCTION - COVEREDRATIO - ${minimum.code.coverage} - - - BRANCH - COVEREDRATIO - ${minimum.code.coverage} - - - - - - - - - - - exec-maven-plugin - org.codehaus.mojo - - - delete-empty-files - process-sources - - exec - - - find - - src - -type - f - -empty - -print - -delete - - - - - - - - com.github.gantsign.maven - ktlint-maven-plugin - ${ktlint-plugin.version} - - - format - - format - - - - - - - - com.mycila - license-maven-plugin - ${maven.licence.plugin.version} - - - ${current.year} - Expedia, Inc. - - - -
./LICENSE-HEADER.txt
- - **/*.kt - -
-
-
- - - add-license-header - process-sources - - format - - - -
-
-
- - - - org.hibernate.validator - hibernate-validator - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - runtime - - - org.jetbrains - annotations - - - org.jetbrains.kotlin - kotlin-stdlib - - - io.ktor - ktor-serialization-jackson-jvm - - - com.fasterxml.jackson.core - jackson-databind - - - io.ktor - ktor-client-core-jvm - - - io.ktor - ktor-client-okhttp-jvm - - - io.ktor - ktor-client-auth-jvm - - - io.ktor - ktor-client-content-negotiation-jvm - - - io.ktor - ktor-http-jvm - - - io.ktor - ktor-utils-jvm - - - io.ktor - ktor-client-logging-jvm - - - org.jetbrains.kotlinx - kotlinx-coroutines-core-jvm - - - io.ktor - ktor-serialization-jvm - - - io.ktor - ktor-client-encoding-jvm - - - - org.slf4j - slf4j-api - - - - org.jetbrains.kotlinx - atomicfu-jvm - - - - org.apache.commons - commons-lang3 - 3.14.0 - - - - org.apache.commons - commons-text - 1.12.0 - - - - com.ebay.ejmask - ejmask-api - 1.3.0 - - - - com.ebay.ejmask - ejmask-extensions - 1.3.0 - - - - - - release - - true - false - true - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven.gpg.plugin.version} - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - ${maven.nexus-staging.plugin.version} - true - - oss-sonatype - https://oss.sonatype.org/ - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - **/jacoco.exec - - - **/PerformanceTest.java - @{argLine} - - - - - - maven-jar-plugin - ${maven-jar-plugin.version} - - - - javadoc - ${project.basedir}/target/site/apidocs - **/* - ${project.build.finalName} - - pack-javadoc - package - - jar - - - - - - - org.jetbrains.dokka - dokka-maven-plugin - - - ${project.basedir}/src/main/kotlin/com/expediagroup/sdk/xap - - - - org.jetbrains.dokka - kotlin-as-java-plugin - ${dokka-plugin.version} - - - org.jetbrains.dokka - versioning-plugin - ${dokka-plugin.version} - - - - - ${project.version} - ${dokka-old-versions.location} - - - - - - prepare-package - - javadocJar - - - - - - - - -
diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt deleted file mode 100644 index d11f25e9f..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.client - -import com.expediagroup.sdk.core.configuration.RapidClientConfiguration -import com.expediagroup.sdk.core.configuration.collector.ConfigurationCollector -import com.expediagroup.sdk.core.configuration.provider.ConfigurationProvider -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy -import io.ktor.client.HttpClient -import io.ktor.client.engine.HttpClientEngine -import io.ktor.client.engine.okhttp.OkHttp - -/** - * The integration point between the SDK Core and the product SDKs. - * - * @param httpClientEngine The HTTP client engine to use. - * @param clientConfiguration The configuration for the client. - */ -abstract class BaseRapidClient( - namespace: String, - clientConfiguration: RapidClientConfiguration, - httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE -) : Client(namespace) { - private val _configurationProvider: ConfigurationProvider = - ConfigurationCollector.create( - clientConfiguration.toProvider(), - RapidConfigurationProvider - ) - - private val engine: HttpClientEngine = - _configurationProvider.okHttpClient?.let { - OkHttp.create { - config { - preconfigured = it - dispatcher(it.dispatcher) - } - } - } ?: httpClientEngine - - private val _httpClient: HttpClient = buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.SIGNATURE, engine) - - init { - finalize() - } - - override val configurationProvider: ConfigurationProvider - get() = _configurationProvider - - override val httpClient: HttpClient - get() = _httpClient - - /** A [BaseRapidClient] builder. */ - @Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients. - abstract class Builder> : HttpConfigurableBuilder() - - /** A [BaseRapidClient] builder with ability to pass a custom okhttp client. */ - @Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients. - abstract class BuilderWithHttpClient> : Client.BuilderWithHttpClient() -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt deleted file mode 100644 index 2f440dc33..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.client - -import com.expediagroup.sdk.core.configuration.XapClientConfiguration -import com.expediagroup.sdk.core.configuration.collector.ConfigurationCollector -import com.expediagroup.sdk.core.configuration.provider.ConfigurationProvider -import com.expediagroup.sdk.core.configuration.provider.XapConfigurationProvider -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy -import io.ktor.client.HttpClient -import io.ktor.client.engine.HttpClientEngine -import io.ktor.client.engine.okhttp.OkHttp - -/** - * The integration point between the SDK Core and the product SDKs. - * - * @param httpClientEngine The HTTP client engine to use. - * @param clientConfiguration The configuration for the client. - */ -abstract class BaseXapClient( - namespace: String, - clientConfiguration: XapClientConfiguration, - httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE -) : Client(namespace) { - private val _configurationProvider: ConfigurationProvider = - ConfigurationCollector.create( - clientConfiguration.toProvider(), - XapConfigurationProvider - ) - - private val engine: HttpClientEngine = - _configurationProvider.okHttpClient?.let { - OkHttp.create { - config { - preconfigured = it - dispatcher(it.dispatcher) - } - } - } ?: httpClientEngine - - private val _httpClient: HttpClient = buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.BASIC, engine) - - init { - finalize() - } - - override val configurationProvider: ConfigurationProvider - get() = _configurationProvider - - override val httpClient: HttpClient - get() = _httpClient - - /** A [BaseXapClient] builder. */ - @Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients. - abstract class Builder> : HttpConfigurableBuilder() - - /** A [BaseXapClient] builder with ability to pass a custom okhttp client. */ - @Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients. - abstract class BuilderWithHttpClient> : Client.BuilderWithHttpClient() -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/client/Client.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/client/Client.kt deleted file mode 100644 index de2847b94..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/client/Client.kt +++ /dev/null @@ -1,337 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.client - -import com.expediagroup.sdk.core.configuration.Credentials -import com.expediagroup.sdk.core.configuration.provider.ConfigurationProvider -import com.expediagroup.sdk.core.constant.ConfigurationName -import com.expediagroup.sdk.core.constant.Constant -import com.expediagroup.sdk.core.constant.provider.ExceptionMessageProvider.getMissingRequiredConfigurationMessage -import com.expediagroup.sdk.core.constant.provider.LoggingMessageProvider -import com.expediagroup.sdk.core.contract.Contract -import com.expediagroup.sdk.core.contract.adhereTo -import com.expediagroup.sdk.core.model.exception.client.ExpediaGroupConfigurationException -import com.expediagroup.sdk.core.model.getTransactionId -import com.expediagroup.sdk.core.plugin.Hooks -import com.expediagroup.sdk.core.plugin.authentication.AuthenticationConfiguration -import com.expediagroup.sdk.core.plugin.authentication.AuthenticationHookFactory -import com.expediagroup.sdk.core.plugin.authentication.AuthenticationPlugin -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy -import com.expediagroup.sdk.core.plugin.encoding.EncodingConfiguration -import com.expediagroup.sdk.core.plugin.encoding.EncodingPlugin -import com.expediagroup.sdk.core.plugin.exception.ExceptionHandlingConfiguration -import com.expediagroup.sdk.core.plugin.exception.ExceptionHandlingPlugin -import com.expediagroup.sdk.core.plugin.hooks -import com.expediagroup.sdk.core.plugin.httptimeout.HttpTimeoutConfiguration -import com.expediagroup.sdk.core.plugin.httptimeout.HttpTimeoutPlugin -import com.expediagroup.sdk.core.plugin.logging.ExpediaGroupLoggerFactory -import com.expediagroup.sdk.core.plugin.logging.LoggingConfiguration -import com.expediagroup.sdk.core.plugin.logging.LoggingPlugin -import com.expediagroup.sdk.core.plugin.plugins -import com.expediagroup.sdk.core.plugin.request.DefaultRequestConfiguration -import com.expediagroup.sdk.core.plugin.request.DefaultRequestPlugin -import com.expediagroup.sdk.core.plugin.serialization.SerializationConfiguration -import com.expediagroup.sdk.core.plugin.serialization.SerializationPlugin -import io.ktor.client.HttpClient -import io.ktor.client.engine.HttpClientEngine -import io.ktor.client.engine.okhttp.OkHttp -import io.ktor.client.statement.HttpResponse -import io.ktor.client.statement.request -import okhttp3.Dispatcher -import okhttp3.OkHttpClient - -// Create a Dispatcher with limits -val dispatcher = - Dispatcher().apply { - maxRequests = 10000 // Maximum number of concurrent requests - maxRequestsPerHost = 1000 - } - -val DEFAULT_HTTP_CLIENT_ENGINE: HttpClientEngine = - OkHttp.create { - config { - eventListenerFactory(OkHttpEventListener.FACTORY) - dispatcher(dispatcher) - } - } - -/** - * The base integration point between the SDK Core and the product SDKs. - */ -abstract class Client( - namespace: String, - environmentProvider: EnvironmentProvider = DefaultEnvironmentProvider(namespace) -) : EnvironmentProvider by environmentProvider { - private val httpHandler = DefaultHttpHandler(environmentProvider) - - companion object { - private val log = ExpediaGroupLoggerFactory.getLogger(this::class.java) - } - - /** The configuration provider to use. */ - abstract val configurationProvider: ConfigurationProvider - - /** The HTTP client to perform requests with. */ - abstract val httpClient: HttpClient - - internal fun buildHttpClient( - configurationProvider: ConfigurationProvider, - authenticationType: AuthenticationStrategy.AuthenticationType, - httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE - ): HttpClient = - HttpClient(httpClientEngine) { - val httpClientConfig = this - - val key: String = configurationProvider.key ?: fireMissingConfigurationIssue(ConfigurationName.KEY) - val secret: String = configurationProvider.secret ?: fireMissingConfigurationIssue(ConfigurationName.SECRET) - val endpoint: String = configurationProvider.endpoint ?: fireMissingConfigurationIssue(ConfigurationName.ENDPOINT) - val authEndpoint: String = configurationProvider.authEndpoint ?: fireMissingConfigurationIssue(ConfigurationName.AUTH_ENDPOINT) - val requestTimeout: Long = configurationProvider.requestTimeout ?: fireMissingConfigurationIssue(ConfigurationName.REQUEST_TIMEOUT_MILLIS) - val connectionTimeout: Long = configurationProvider.connectionTimeout ?: fireMissingConfigurationIssue(ConfigurationName.CONNECTION_TIMEOUT_MILLIS) - val socketTimeout: Long = configurationProvider.socketTimeout ?: fireMissingConfigurationIssue(ConfigurationName.SOCKET_TIMEOUT_MILLIS) - val maskedLoggingHeaders: Set = configurationProvider.maskedLoggingHeaders ?: setOf() - val maskedLoggingBodyFields: Set = configurationProvider.maskedLoggingBodyFields ?: setOf() - - val authenticationConfiguration = - AuthenticationConfiguration.from( - httpClientConfig, - Credentials.from(key, secret), - authEndpoint, - authenticationType - ) - - plugins { - use(LoggingPlugin).with(LoggingConfiguration.from(httpClientConfig, maskedLoggingHeaders, maskedLoggingBodyFields)) - use(SerializationPlugin).with(SerializationConfiguration.from(httpClientConfig)) - use(AuthenticationPlugin).with(authenticationConfiguration) - use(DefaultRequestPlugin).with(DefaultRequestConfiguration.from(httpClientConfig, endpoint)) - use(EncodingPlugin).with(EncodingConfiguration.from(httpClientConfig)) - use(HttpTimeoutPlugin).with(HttpTimeoutConfiguration.from(httpClientConfig, requestTimeout, connectionTimeout, socketTimeout)) - use(ExceptionHandlingPlugin).with(ExceptionHandlingConfiguration.from(httpClientConfig)) - } - - hooks { - use(AuthenticationHookFactory).with(authenticationConfiguration) - } - } - - /** Throw an exception if the configuration is missing. */ - private fun fireMissingConfigurationIssue(configurationKey: String): Nothing = throw ExpediaGroupConfigurationException(getMissingRequiredConfigurationMessage(configurationKey)) - - private fun isNotSuccessfulResponse(response: HttpResponse) = response.status.value !in Constant.SUCCESSFUL_STATUS_CODES_RANGE - - @Suppress("unused") // This is used by the product SDKs. - suspend fun throwIfError(response: HttpResponse, operationId: String) { - if (isNotSuccessfulResponse(response)) { - log.info(LoggingMessageProvider.getResponseUnsuccessfulMessage(response.status, response.request.headers.getTransactionId())) - throwServiceException(response, operationId) - } - } - - abstract suspend fun throwServiceException( - response: HttpResponse, - operationId: String - ) - - suspend fun performGet(url: String): HttpResponse = httpHandler.performGet(httpClient, url) - - /** - * A [Client] base builder. - */ - abstract class Builder> { - /** Sets the API key to use for authentication. */ - protected var key: String? = null - - /** Sets the API secret to use for authentication. */ - protected var secret: String? = null - - /** Sets the API endpoint to use for requests. */ - protected var endpoint: String? = null - - /** Sets tne body fields to be masked in logging. */ - protected var maskedLoggingHeaders: Set? = null - - /** Sets tne body fields to be masked in logging. */ - protected var maskedLoggingBodyFields: Set? = null - - /** Sets the API key to use for authentication. - * - * @param key The API key to use for authentication. - * @return The [Builder] instance. - */ - fun key(key: String): SELF { - this.key = key - return self() - } - - /** Sets the API secret to use for authentication. - * - * @param secret The API secret to use for authentication. - * @return The [Builder] instance. - */ - fun secret(secret: String): SELF { - this.secret = secret - return self() - } - - /** Sets the API endpoint to use for requests. - * - * @param endpoint The API endpoint to use for requests. - * @return The [Builder] instance. - */ - fun endpoint(endpoint: String): SELF { - this.endpoint = endpoint.adhereTo(Contract.TRAILING_SLASH) - log.info(LoggingMessageProvider.getRuntimeConfigurationProviderMessage(ConfigurationName.ENDPOINT, endpoint)) - return self() - } - - /** - * Sets tne headers to be masked in logging. - * - * @param headers the headers to be masked in logging. - * @return The [Builder] instance. - */ - fun maskedLoggingHeaders(vararg headers: String): SELF { - this.maskedLoggingHeaders = headers.toSet() - log.info(LoggingMessageProvider.getRuntimeConfigurationProviderMessage(ConfigurationName.MASKED_LOGGING_HEADERS, headers.joinToString())) - return self() - } - - /** - * Sets tne body fields to be masked in logging. - * - * @param fields the body fields to be masked in logging. - * @return The [Builder] instance. - */ - fun maskedLoggingBodyFields(vararg fields: String): SELF { - this.maskedLoggingBodyFields = fields.toSet() - log.info(LoggingMessageProvider.getRuntimeConfigurationProviderMessage(ConfigurationName.MASKED_LOGGING_BODY_FIELDS, fields.joinToString())) - return self() - } - - /** Create a [Client] object. */ - abstract fun build(): Client - - @Suppress("UNCHECKED_CAST") // This is safe because of the type parameter - protected open fun self(): SELF = this as SELF - } - - /** - * A builder class for configuring HTTP-related settings for a [Client]. - * - * This builder class extends the base [Client.Builder] class and provides additional methods - * for configuring HTTP-specific settings such as request timeout, connection timeout, and socket timeout. - * - * @param The type of the builder itself, used for method chaining. - */ - abstract class HttpConfigurableBuilder> : Builder() { - /** - * Sets the request timeout in milliseconds. - * - * Request timeout is the time period from the start of the request to the completion of the response. - * - * Default is infinite - no timeout. - */ - protected var requestTimeout: Long? = null - - /** - * Sets the connection timeout in milliseconds. - * - * Connection timeout is the time period from the start of the request to the establishment of the connection with the server. - * - * Default is 10 seconds (10000 milliseconds). - */ - protected var connectionTimeout: Long? = null - - /** - * Sets the socket timeout in milliseconds. - * - * Socket timeout is the maximum period of inactivity between two consecutive data packets. - * - * Default is 15 seconds (15000 milliseconds). - */ - protected var socketTimeout: Long? = null - - /** - * Sets the request timeout in milliseconds. - * Request timeout is the time period from the start of the request to the completion of the response. - * Default is infinite - no timeout. - * - * @param milliseconds The request timeout to be used. - * @return The [Builder] instance. - */ - fun requestTimeout(milliseconds: Long): SELF { - this.requestTimeout = milliseconds - log.info(LoggingMessageProvider.getRuntimeConfigurationProviderMessage(ConfigurationName.REQUEST_TIMEOUT_MILLIS, milliseconds.toString())) - return self() - } - - /** - * Sets the connection timeout in milliseconds. - * Connection timeout is the time period from the start of the request to the establishment of the connection with the server. - * Default is 10 seconds (10000 milliseconds). - * - * @param milliseconds The connection timeout to be used. - * @return The [Builder] instance. - */ - fun connectionTimeout(milliseconds: Long): SELF { - this.connectionTimeout = milliseconds - log.info(LoggingMessageProvider.getRuntimeConfigurationProviderMessage(ConfigurationName.CONNECTION_TIMEOUT_MILLIS, milliseconds.toString())) - return self() - } - - /** - * Sets the socket timeout in milliseconds. - * Socket timeout is the maximum period of inactivity between two consecutive data packets. - * Default is 15 seconds (15000 milliseconds). - * - * @param milliseconds The socket timeout to be used. - * @return The [Builder] instance. - */ - fun socketTimeout(milliseconds: Long): SELF { - this.socketTimeout = milliseconds - log.info(LoggingMessageProvider.getRuntimeConfigurationProviderMessage(ConfigurationName.SOCKET_TIMEOUT_MILLIS, milliseconds.toString())) - return self() - } - - /** Create a [Client] object. */ - abstract override fun build(): Client - } - - /** - * A builder class for configuring HTTP-related settings for a [Client] with the ability to pass a custom [OkHttpClient]. - * - * This builder class extends the base [Client.Builder] class and provides additional methods - * for setting a configured okhttp client. - * - * @param The type of the builder itself, used for method chaining. - */ - abstract class BuilderWithHttpClient> : Builder() { - protected var okHttpClient: OkHttpClient? = null - - @Suppress("UNCHECKED_CAST") - override fun self(): SELF = this as SELF - - /** Sets the [OkHttpClient] to use for the [Client]. */ - fun okHttpClient(okHttpClient: OkHttpClient): SELF { - this.okHttpClient = okHttpClient - return self() - } - } -} - -/** Executes the hooks for the client. */ -fun T.finalize() = Hooks.execute(this) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/client/ClientHelpers.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/client/ClientHelpers.kt deleted file mode 100644 index b2ed3e342..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/client/ClientHelpers.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.client - -/** Handy utils and helpers for a client. */ -abstract class ClientHelpers( - val client: Client -) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/client/Environment.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/client/Environment.kt deleted file mode 100644 index a0a76bcaf..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/client/Environment.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.client - -import com.expediagroup.sdk.core.constant.HeaderKey -import com.expediagroup.sdk.core.model.Properties -import com.expediagroup.sdk.core.model.TransactionId -import io.ktor.client.request.HttpRequestBuilder -import io.ktor.http.HttpHeaders - -interface EnvironmentProvider { - fun HttpRequestBuilder.appendHeaders(extraHeaders: Map = mapOf(HeaderKey.TRANSACTION_ID to TransactionId().dequeue().toString())) -} - -class DefaultEnvironmentProvider( - namespace: String -) : EnvironmentProvider { - private val properties = Properties.from(javaClass.classLoader.getResource("sdk.properties")!!) - private val javaVersion = System.getProperty("java.version") - private val operatingSystemName = System.getProperty("os.name") - private val operatingSystemVersion = System.getProperty("os.version") - private val userAgent = "expediagroup-sdk-java-$namespace/${properties["sdk-version"]!!} (Java $javaVersion; $operatingSystemName $operatingSystemVersion)" - - @Suppress("MemberVisibilityCanBePrivate") - override fun HttpRequestBuilder.appendHeaders(extraHeaders: Map) { - with(headers) { - append(HttpHeaders.UserAgent, userAgent) - append(HeaderKey.X_SDK_TITLE, properties["sdk-title"]!!) - extraHeaders.forEach { (key, value) -> append(key, value) } - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/client/ExpediaGroupClient.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/client/ExpediaGroupClient.kt deleted file mode 100644 index b47306deb..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/client/ExpediaGroupClient.kt +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.client - -import com.expediagroup.sdk.core.configuration.ExpediaGroupClientConfiguration -import com.expediagroup.sdk.core.configuration.collector.ConfigurationCollector -import com.expediagroup.sdk.core.configuration.provider.ConfigurationProvider -import com.expediagroup.sdk.core.configuration.provider.ExpediaGroupConfigurationProvider -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy -import io.ktor.client.HttpClient -import io.ktor.client.engine.HttpClientEngine - -/** - * The integration point between the SDK Core and the product SDKs. - * - * @param httpClientEngine The HTTP client engine to use. - * @param clientConfiguration The configuration for the client. - */ -abstract class ExpediaGroupClient( - namespace: String, - clientConfiguration: ExpediaGroupClientConfiguration, - httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE -) : Client(namespace) { - private val _configurationProvider: ConfigurationProvider = - ConfigurationCollector.create( - clientConfiguration.toProvider(), - ExpediaGroupConfigurationProvider - ) - private val _httpClient: HttpClient = buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.BEARER, httpClientEngine) - - init { - finalize() - } - - override val configurationProvider: ConfigurationProvider - get() = _configurationProvider - - override val httpClient: HttpClient - get() = _httpClient - - /** An [ExpediaGroupClient] builder. */ - @Suppress("unused") // This is used by the generated SDK clients. - abstract class Builder> : HttpConfigurableBuilder() { - /** Sets the API auth endpoint to use for requests. */ - protected var authEndpoint: String? = null - - /** Sets the API auth endpoint to use for requests. - * - * @param authEndpoint The API auth endpoint to use for requests. - * @return The [Builder] instance. - */ - fun authEndpoint(authEndpoint: String): SELF { - this.authEndpoint = authEndpoint - return self() - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/client/HttpHandler.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/client/HttpHandler.kt deleted file mode 100644 index 28101ef39..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/client/HttpHandler.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.client - -import io.ktor.client.HttpClient -import io.ktor.client.request.request -import io.ktor.client.request.url -import io.ktor.client.statement.HttpResponse -import io.ktor.http.HttpMethod - -internal interface HttpHandler { - suspend fun performGet( - httpClient: HttpClient, - link: String - ): HttpResponse -} - -internal class DefaultHttpHandler( - private val environmentProvider: EnvironmentProvider -) : HttpHandler, EnvironmentProvider by environmentProvider { - override suspend fun performGet( - httpClient: HttpClient, - link: String - ): HttpResponse = - httpClient.request { - method = HttpMethod.Get - url(link) - appendHeaders() - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/client/OkHttpEventListener.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/client/OkHttpEventListener.kt deleted file mode 100644 index 7986d9520..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/client/OkHttpEventListener.kt +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.client - -import com.expediagroup.sdk.core.constant.HeaderKey -import com.expediagroup.sdk.core.plugin.logging.ExpediaGroupLoggerFactory -import okhttp3.Call -import okhttp3.Connection -import okhttp3.EventListener -import okhttp3.Handshake -import okhttp3.Protocol -import okhttp3.Request -import okhttp3.Response -import java.io.IOException -import java.net.InetSocketAddress -import java.net.Proxy -import java.util.concurrent.atomic.AtomicReference - -/** - * An `EventListener` implementation for OkHttp that logs various events during the lifecycle of an HTTP call. - * - * This listener logs events such as call start, call end, connection start, connection end, request headers start, - * request headers end, request body start, request body end, response headers start, response headers end, - * response body start, response body end, and failures. - * - * @property transactionId A reference to the unique transaction ID associated with the HTTP call. - */ -class OkHttpEventListener private constructor(private val transactionId: AtomicReference) : EventListener() { - private val log = ExpediaGroupLoggerFactory.getLogger(this::class.java) - - companion object { - val FACTORY: Factory = - Factory { call -> - val transactionIdHeader = call.request().header(HeaderKey.TRANSACTION_ID) - val transactionId = AtomicReference(transactionIdHeader.toString()) - OkHttpEventListener(transactionId) - } - } - - override fun callStart(call: Call) { - super.callStart(call) - log.debug("Call start for transaction-id: [{}]", transactionId.get()) - } - - override fun callEnd(call: Call) { - super.callEnd(call) - log.debug("Call end for transaction-id: [{}]", transactionId.get()) - } - - override fun callFailed( - call: Call, - ioe: IOException - ) { - super.callFailed(call, ioe) - log.debug("Call failed for transaction-id: [{}] with exception message: {}", transactionId.get(), ioe.message) - } - - override fun canceled(call: Call) { - super.canceled(call) - log.debug("Call canceled for transaction-id: [{}]", transactionId.get()) - } - - override fun connectStart( - call: Call, - inetSocketAddress: InetSocketAddress, - proxy: Proxy - ) { - super.connectStart(call, inetSocketAddress, proxy) - log.debug("Connect start for transaction-id: [{}]", transactionId.get()) - } - - override fun connectEnd( - call: Call, - inetSocketAddress: InetSocketAddress, - proxy: Proxy, - protocol: Protocol? - ) { - super.connectEnd(call, inetSocketAddress, proxy, protocol) - log.debug("Connect end for transaction-id: [{}]", transactionId.get()) - } - - override fun connectFailed( - call: Call, - inetSocketAddress: InetSocketAddress, - proxy: Proxy, - protocol: Protocol?, - ioe: IOException - ) { - super.connectFailed(call, inetSocketAddress, proxy, protocol, ioe) - log.debug("Connect failed for transaction-id: [{}] with exception message: {}", transactionId.get(), ioe.message) - } - - override fun connectionAcquired( - call: Call, - connection: Connection - ) { - super.connectionAcquired(call, connection) - log.debug("Connection acquired for transaction-id: [{}]", transactionId.get()) - } - - override fun connectionReleased( - call: Call, - connection: Connection - ) { - super.connectionReleased(call, connection) - log.debug("Connection released for transaction-id: [{}]", transactionId.get()) - } - - override fun secureConnectStart(call: Call) { - super.secureConnectStart(call) - log.debug("Secure connect start for transaction-id: [{}]", transactionId.get()) - } - - override fun secureConnectEnd( - call: Call, - handshake: Handshake? - ) { - super.secureConnectEnd(call, handshake) - log.debug("Secure connect end for transaction-id: [{}]", transactionId.get()) - } - - override fun requestHeadersStart(call: Call) { - super.requestHeadersStart(call) - log.debug("Sending request headers start for transaction-id: [{}]", transactionId.get()) - } - - override fun requestHeadersEnd( - call: Call, - request: Request - ) { - super.requestHeadersEnd(call, request) - log.debug("Sending request headers end for transaction-id: [{}]", transactionId.get()) - } - - override fun requestBodyStart(call: Call) { - super.requestBodyStart(call) - log.debug("Sending request body start for transaction-id: [{}]", transactionId.get()) - } - - override fun requestBodyEnd( - call: Call, - byteCount: Long - ) { - super.requestBodyEnd(call, byteCount) - log.debug("Sending request body end for transaction-id: [{}] with byte count: {}", transactionId.get(), byteCount) - } - - override fun requestFailed( - call: Call, - ioe: IOException - ) { - super.requestFailed(call, ioe) - log.debug("Request failed for transaction-id: [{}] with exception message: {}", transactionId.get(), ioe.message) - } - - override fun responseHeadersStart(call: Call) { - super.responseHeadersStart(call) - log.debug("Receiving response headers start for transaction-id: [{}]", transactionId.get()) - } - - override fun responseHeadersEnd( - call: Call, - response: Response - ) { - super.responseHeadersEnd(call, response) - log.debug("Receiving response headers end for transaction-id: [{}]", transactionId.get()) - } - - override fun responseBodyStart(call: Call) { - super.responseBodyStart(call) - log.debug("Receiving response body start for transaction-id: [{}]", transactionId.get()) - } - - override fun responseBodyEnd( - call: Call, - byteCount: Long - ) { - super.responseBodyEnd(call, byteCount) - log.debug("Receiving response body end for transaction-id: [{}] with byte count: {}", transactionId.get(), byteCount) - } - - override fun responseFailed( - call: Call, - ioe: IOException - ) { - super.responseFailed(call, ioe) - log.debug("Receiving response failed for transaction-id: [{}] with exception message: {}", transactionId.get(), ioe.message) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/ClientConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/ClientConfiguration.kt deleted file mode 100644 index 557db5ed6..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/ClientConfiguration.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration - -import com.expediagroup.sdk.core.configuration.provider.RuntimeConfigurationProvider -import okhttp3.OkHttpClient - -interface ClientConfiguration { - val key: String? - val secret: String? - val endpoint: String? - val requestTimeout: Long? - val connectionTimeout: Long? - val socketTimeout: Long? - val maskedLoggingHeaders: Set? - val maskedLoggingBodyFields: Set? - val okHttpClient: OkHttpClient? - - /** Build a [RuntimeConfigurationProvider] from a [ClientConfiguration]. */ - fun toProvider(): RuntimeConfigurationProvider = - RuntimeConfigurationProvider( - key = key, - secret = secret, - endpoint = endpoint, - requestTimeout = requestTimeout, - connectionTimeout = connectionTimeout, - socketTimeout = socketTimeout, - maskedLoggingHeaders = maskedLoggingHeaders, - maskedLoggingBodyFields = maskedLoggingBodyFields, - okHttpClient = okHttpClient - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/Credentials.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/Credentials.kt deleted file mode 100644 index 1e249b810..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/Credentials.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration - -/** - * A pair of key-secret. - * - * @property key the client key - * @property secret the client secret - */ -internal data class Credentials( - val key: String, - val secret: String -) { - /** - * A factory of [Credentials]. - */ - companion object Factory { - /** - * Create a [Credentials] object. - * - * @param key Client key. - * @param secret Client secret. - * @return ClientCredentials object. - */ - @JvmStatic - fun from( - key: String, - secret: String - ): Credentials = Credentials(key, secret) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/ExpediaGroupClientConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/ExpediaGroupClientConfiguration.kt deleted file mode 100644 index 917604d76..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/ExpediaGroupClientConfiguration.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration - -import com.expediagroup.sdk.core.client.ExpediaGroupClient -import com.expediagroup.sdk.core.configuration.provider.RuntimeConfigurationProvider -import okhttp3.OkHttpClient - -/** - * Configuration for the [ExpediaGroupClient]. - * - * @property key The API key to use for authentication. - * @property secret The API secret to use for authentication. - * @property endpoint The API endpoint to use for requests. - * @property requestTimeout The request timeout to be used in milliseconds. - * @property connectionTimeout The connection timeout to be used in milliseconds. - * @property socketTimeout The socket timeout to be used in milliseconds. - * @property maskedLoggingHeaders The headers to be masked in logging. - * @property maskedLoggingBodyFields The body fields to be masked in logging. - * @property authEndpoint The API endpoint to use for authentication. - * @property okHttpClient The okhttp client to be used by the sdk. - */ -data class ExpediaGroupClientConfiguration( - override val key: String? = null, - override val secret: String? = null, - override val endpoint: String? = null, - override val requestTimeout: Long? = null, - override val connectionTimeout: Long? = null, - override val socketTimeout: Long? = null, - override val maskedLoggingHeaders: Set? = null, - override val maskedLoggingBodyFields: Set? = null, - override val okHttpClient: OkHttpClient? = null, - val authEndpoint: String? = null -) : ClientConfiguration { - /** Build a [RuntimeConfigurationProvider] from an [ExpediaGroupClientConfiguration]. */ - override fun toProvider(): RuntimeConfigurationProvider = super.toProvider().copy(authEndpoint = authEndpoint) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/RapidClientConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/RapidClientConfiguration.kt deleted file mode 100644 index 48a1cef94..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/RapidClientConfiguration.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration - -import com.expediagroup.sdk.core.client.BaseRapidClient -import okhttp3.OkHttpClient - -/** - * Configuration for the [BaseRapidClient]. - * - * @property key The API key to use for authentication. - * @property secret The API secret to use for authentication. - * @property endpoint The API endpoint to use for requests. - * @property requestTimeout The request timeout to be used in milliseconds. - * @property connectionTimeout The connection timeout to be used in milliseconds. - * @property socketTimeout The socket timeout to be used in milliseconds. - * @property maskedLoggingHeaders The headers to be masked in logging. - * @property maskedLoggingBodyFields The body fields to be masked in logging. - */ -data class RapidClientConfiguration( - override val key: String? = null, - override val secret: String? = null, - override val endpoint: String? = null, - override val requestTimeout: Long? = null, - override val connectionTimeout: Long? = null, - override val socketTimeout: Long? = null, - override val maskedLoggingHeaders: Set? = null, - override val maskedLoggingBodyFields: Set? = null, - override val okHttpClient: OkHttpClient? = null -) : ClientConfiguration diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/XapClientConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/XapClientConfiguration.kt deleted file mode 100644 index ec72f80d7..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/XapClientConfiguration.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration - -import com.expediagroup.sdk.core.client.BaseXapClient -import okhttp3.OkHttpClient - -/** - * Configuration for the [BaseXapClient]. - * - * @property key The API key to use for authentication. - * @property secret The API secret to use for authentication. - * @property endpoint The API endpoint to use for requests. - * @property requestTimeout The request timeout to be used in milliseconds. - * @property connectionTimeout The connection timeout to be used in milliseconds. - * @property socketTimeout The socket timeout to be used in milliseconds. - * @property maskedLoggingHeaders The headers to be masked in logging. - * @property maskedLoggingBodyFields The body fields to be masked in logging. - */ -data class XapClientConfiguration( - override val key: String? = null, - override val secret: String? = null, - override val endpoint: String? = null, - override val requestTimeout: Long? = null, - override val connectionTimeout: Long? = null, - override val socketTimeout: Long? = null, - override val maskedLoggingHeaders: Set? = null, - override val maskedLoggingBodyFields: Set? = null, - override val okHttpClient: OkHttpClient? = null -) : ClientConfiguration diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/collector/ConfigurationCollector.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/collector/ConfigurationCollector.kt deleted file mode 100644 index 49b674182..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/collector/ConfigurationCollector.kt +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration.collector - -import com.expediagroup.sdk.core.configuration.provider.ConfigurationProvider -import com.expediagroup.sdk.core.constant.ConfigurationName.AUTH_ENDPOINT -import com.expediagroup.sdk.core.constant.ConfigurationName.CONFIGURATION_COLLECTOR -import com.expediagroup.sdk.core.constant.ConfigurationName.CONNECTION_TIMEOUT_MILLIS -import com.expediagroup.sdk.core.constant.ConfigurationName.ENDPOINT -import com.expediagroup.sdk.core.constant.ConfigurationName.KEY -import com.expediagroup.sdk.core.constant.ConfigurationName.MASKED_LOGGING_BODY_FIELDS -import com.expediagroup.sdk.core.constant.ConfigurationName.MASKED_LOGGING_HEADERS -import com.expediagroup.sdk.core.constant.ConfigurationName.REQUEST_TIMEOUT_MILLIS -import com.expediagroup.sdk.core.constant.ConfigurationName.SECRET -import com.expediagroup.sdk.core.constant.ConfigurationName.SOCKET_TIMEOUT_MILLIS -import com.expediagroup.sdk.core.constant.provider.LoggingMessageProvider -import com.expediagroup.sdk.core.plugin.logging.ExpediaGroupLoggerFactory -import okhttp3.OkHttpClient - -/** - * Configuration collector that collects configuration from all available providers. - * - * @param providers A configuration providers queue. - */ -internal class ConfigurationCollector private constructor(providers: ConfigurationProviderQueue) : ConfigurationProvider { - override val name: String = CONFIGURATION_COLLECTOR - - companion object Factory { - private val log = ExpediaGroupLoggerFactory.getLogger(ConfigurationCollector::class.java) - - /** - * Creates a new [ConfigurationCollector] with the given [providerQueue]. - * - * @param providerQueue the [ConfigurationProviderQueue] to use. - * @return a new [ConfigurationCollector] with the given [providerQueue]. - */ - fun create(providerQueue: ConfigurationProviderQueue): ConfigurationCollector = ConfigurationCollector(providerQueue) - - /** - * Creates a new [ConfigurationCollector] with the given [providers]. - * - * @param providers the [ConfigurationProvider]s to use. - * @return a new [ConfigurationCollector] with the given [providers]. - */ - fun create(vararg providers: ConfigurationProvider): ConfigurationCollector = create(ConfigurationProviderQueue.from(providers.asList())) - } - - override val key: String? = providers.firstWith { it.key }.also { it?.log(KEY) }?.retrieve() - override val secret: String? = providers.firstWith { it.secret }.also { it?.log(SECRET) }?.retrieve() - override val endpoint: String? = providers.firstWith { it.endpoint }.also { it?.log(ENDPOINT) }?.retrieve() - override val authEndpoint: String? = providers.firstWith { it.authEndpoint }.also { it?.log(AUTH_ENDPOINT) }?.retrieve() - override val requestTimeout: Long? = providers.firstWith { it.requestTimeout }.also { it?.log(REQUEST_TIMEOUT_MILLIS) }?.retrieve() - override val connectionTimeout: Long? = providers.firstWith { it.connectionTimeout }.also { it?.log(CONNECTION_TIMEOUT_MILLIS) }?.retrieve() - override val socketTimeout: Long? = providers.firstWith { it.socketTimeout }.also { it?.log(SOCKET_TIMEOUT_MILLIS) }?.retrieve() - override val maskedLoggingHeaders: Set? = providers.firstWith { it.maskedLoggingHeaders }.also { it?.log(MASKED_LOGGING_HEADERS) }?.retrieve() - override val maskedLoggingBodyFields: Set? = providers.firstWith { it.maskedLoggingBodyFields }.also { it?.log(MASKED_LOGGING_BODY_FIELDS) }?.retrieve() - override val okHttpClient: OkHttpClient? = providers.firstWith { it.okHttpClient }?.retrieve() - - private fun ProvidedConfiguration.log(configurationName: String) { - log.info(LoggingMessageProvider.getChosenProviderMessage(configurationName, providerName)) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/collector/ConfigurationProviderQueue.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/collector/ConfigurationProviderQueue.kt deleted file mode 100644 index 3a964739c..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/collector/ConfigurationProviderQueue.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration.collector - -import com.expediagroup.sdk.core.configuration.provider.ConfigurationProvider - -/** - * A queue of all configuration providers. - * - * @property providers List of configuration providers - */ -internal class ConfigurationProviderQueue private constructor(private val providers: List) { - /** Returns the first provider in the queue. */ - fun first(): ConfigurationProvider? = providers.firstOrNull() - - /** Returns the first provider in the queue that matches the given [predicate]. */ - fun first(predicate: (ConfigurationProvider) -> Boolean): ConfigurationProvider? = providers.firstOrNull(predicate) - - /** Returns the first provider in the queue that matches the given [predicate] if found, null otherwise.*/ - fun firstWith(predicate: (provider: ConfigurationProvider) -> T?): ProvidedConfiguration? = first { predicate(it) != null }?.let { ProvidedConfiguration(predicate(it)!!, it.name) } - - companion object { - /** Builds a [ConfigurationProviderQueue] from the given [providers]. - * - * @param providers the providers to build the queue from. - * @return a [ConfigurationProviderQueue] instance. - */ - fun from(providers: List) = ConfigurationProviderQueue(providers.toList()) - } -} - -internal data class ProvidedConfiguration(private val configuration: T, val providerName: String) { - fun retrieve(): T = configuration -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/ConfigurationProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/ConfigurationProvider.kt deleted file mode 100644 index 0a14edd19..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/ConfigurationProvider.kt +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration.provider - -import com.expediagroup.sdk.core.constant.Constant -import okhttp3.OkHttpClient - -/** - * A configuration provider that can be used to provide configuration values. - */ -interface ConfigurationProvider { - /** The name of the provider. */ - val name: String - - /** The API key to use for authentication. */ - val key: String? - get() = Constant.EMPTY_STRING - - /** The API secret to use for authentication. */ - val secret: String? - get() = Constant.EMPTY_STRING - - /** The API endpoint to use for requests. */ - val endpoint: String? - - /** The API endpoint to use for authentication. */ - val authEndpoint: String? - get() = Constant.EMPTY_STRING - - /** The time period from the start of the request to the completion of the response. */ - val requestTimeout: Long? - - /** The time period from the start of the request to the establishment of the connection with the server. */ - val connectionTimeout: Long? - - /** The maximum period of inactivity between two consecutive data packets. */ - val socketTimeout: Long? - - /** The headers to be masked in logging. */ - val maskedLoggingHeaders: Set? - get() = setOf() - - /** The body fields to be masked in logging.*/ - val maskedLoggingBodyFields: Set? - get() = setOf() - - /** The okhttp client to be used by the sdk.*/ - val okHttpClient: OkHttpClient? - get() = null -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/ExpediaGroupConfigurationProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/ExpediaGroupConfigurationProvider.kt deleted file mode 100644 index 75295aeb2..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/ExpediaGroupConfigurationProvider.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration.provider - -import com.expediagroup.sdk.core.configuration.provider.ExpediaGroupConfigurationProvider.authEndpoint -import com.expediagroup.sdk.core.configuration.provider.ExpediaGroupConfigurationProvider.connectionTimeout -import com.expediagroup.sdk.core.configuration.provider.ExpediaGroupConfigurationProvider.endpoint -import com.expediagroup.sdk.core.configuration.provider.ExpediaGroupConfigurationProvider.name -import com.expediagroup.sdk.core.configuration.provider.ExpediaGroupConfigurationProvider.requestTimeout -import com.expediagroup.sdk.core.configuration.provider.ExpediaGroupConfigurationProvider.socketTimeout -import com.expediagroup.sdk.core.constant.Constant - -/** - * Default configuration provider for ExpediaGroup. - * - * @property name The name of the provider. - * @property endpoint The API endpoint to use for requests. - * @property authEndpoint The API endpoint to use for authentication. - * @property requestTimeout The API response timeout to use for requests. - * @property connectionTimeout The connection timeout to be used in milliseconds. - * @property socketTimeout The socket timeout to be used in milliseconds. - */ -internal object ExpediaGroupConfigurationProvider : ConfigurationProvider { - override val name: String = "ExpediaGroup Configuration Provider" - override val endpoint: String = "https://api.expediagroup.com/" - override val authEndpoint: String = "${endpoint}identity/oauth2/v3/token/" - override val requestTimeout: Long = Constant.INFINITE_TIMEOUT - override val connectionTimeout: Long = Constant.TEN_SECONDS_IN_MILLIS - override val socketTimeout: Long = Constant.FIFTEEN_SECONDS_IN_MILLIS -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/RapidConfigurationProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/RapidConfigurationProvider.kt deleted file mode 100644 index bc8e06c60..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/RapidConfigurationProvider.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration.provider - -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.connectionTimeout -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.endpoint -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.name -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.requestTimeout -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.socketTimeout -import com.expediagroup.sdk.core.constant.Constant - -/** - * Default configuration provider for Rapid. - * - * @property name The name of the provider. - * @property endpoint The API endpoint to use for requests. - * @property requestTimeout The API response timeout to use for requests. - * @property connectionTimeout The connection timeout to use for requests. - * @property socketTimeout The socket timeout to use for requests. - */ -internal object RapidConfigurationProvider : ConfigurationProvider { - override val name: String = "Rapid Configuration Provider" - override val endpoint: String = "https://api.ean.com/v3" - override val requestTimeout: Long = Constant.INFINITE_TIMEOUT - override val connectionTimeout: Long = Constant.TEN_SECONDS_IN_MILLIS - override val socketTimeout: Long = Constant.FIFTEEN_SECONDS_IN_MILLIS -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/RuntimeConfigurationProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/RuntimeConfigurationProvider.kt deleted file mode 100644 index d6e607e09..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/RuntimeConfigurationProvider.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration.provider - -import com.expediagroup.sdk.core.constant.ConfigurationName.RUNTIME_CONFIGURATION_PROVIDER -import okhttp3.OkHttpClient - -/** - * A runtime-built configuration provider. - * - * @property name The name of the provider. - * @property key The API key to use for authentication. - * @property secret The API secret to use for authentication. - * @property endpoint The API endpoint to use for requests. - * @property authEndpoint The API endpoint to use for authentication. - * @property requestTimeout The request timeout to be used in milliseconds. - * @property connectionTimeout The connection timeout to be used in milliseconds. - * @property socketTimeout The socket timeout to be used in milliseconds. - * @property maskedLoggingHeaders The headers to be masked in logging. - * @property maskedLoggingBodyFields The body fields to be masked in logging. - */ -data class RuntimeConfigurationProvider( - override val name: String = RUNTIME_CONFIGURATION_PROVIDER, - override val key: String? = null, - override val secret: String? = null, - override val endpoint: String? = null, - override val authEndpoint: String? = null, - override val requestTimeout: Long? = null, - override val connectionTimeout: Long? = null, - override val socketTimeout: Long? = null, - override val maskedLoggingHeaders: Set? = null, - override val maskedLoggingBodyFields: Set? = null, - override val okHttpClient: OkHttpClient? = null -) : ConfigurationProvider diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/XapConfigurationProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/XapConfigurationProvider.kt deleted file mode 100644 index 20857cce7..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/configuration/provider/XapConfigurationProvider.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.configuration.provider - -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.connectionTimeout -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.endpoint -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.name -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.requestTimeout -import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider.socketTimeout -import com.expediagroup.sdk.core.constant.Constant - -/** - * Default configuration provider for Rapid. - * - * @property name The name of the provider. - * @property endpoint The API endpoint to use for requests. - * @property requestTimeout The API response timeout to use for requests. - * @property connectionTimeout The connection timeout to use for requests. - * @property socketTimeout The socket timeout to use for requests. - */ -internal object XapConfigurationProvider : ConfigurationProvider { - override val name: String = "XAP Configuration Provider" - override val endpoint: String = "https://apim.expedia.com" - override val requestTimeout: Long = Constant.INFINITE_TIMEOUT - override val connectionTimeout: Long = Constant.TEN_SECONDS_IN_MILLIS - override val socketTimeout: Long = Constant.FIFTEEN_SECONDS_IN_MILLIS -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Authentication.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Authentication.kt deleted file mode 100644 index 2b22a50e1..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Authentication.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object Authentication { - const val AUTHORIZATION_REQUEST_LOCK_DELAY = 20L - const val BEARER_EXPIRY_DATE_MARGIN: Long = 10 // In seconds - - const val EAN = "EAN" - - const val BEARER = "Bearer" - - const val GRANT_TYPE = "grant_type" - - const val CLIENT_CREDENTIALS = "client_credentials" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/ConfigurationName.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/ConfigurationName.kt deleted file mode 100644 index 0d9b9a955..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/ConfigurationName.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object ConfigurationName { - const val KEY = "key" - - const val SECRET = "secret" - - const val ENDPOINT = "endpoint" - - const val AUTH_ENDPOINT = "auth endpoint" - - const val REQUEST_TIMEOUT_MILLIS = "request timeout in milliseconds" - - const val CONNECTION_TIMEOUT_MILLIS = "connection timeout in milliseconds" - - const val SOCKET_TIMEOUT_MILLIS = "socket timeout in milliseconds" - - const val MASKED_LOGGING_HEADERS = "masked logging headers" - - const val MASKED_LOGGING_BODY_FIELDS = "masked logging body fields" - - const val RUNTIME_CONFIGURATION_PROVIDER = "runtime configuration" - - const val CONFIGURATION_COLLECTOR = "configuration collector" - - const val OKHTTP_CLIENT = "okhttp client" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Constant.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Constant.kt deleted file mode 100644 index 5f7a9d8c1..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Constant.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -import io.ktor.client.plugins.HttpTimeout - -internal object Constant { - const val EMPTY_STRING = "" - const val TEN_SECONDS_IN_MILLIS = 10_000L - const val FIFTEEN_SECONDS_IN_MILLIS = 15_000L - const val INFINITE_TIMEOUT = HttpTimeout.INFINITE_TIMEOUT_MS - - private const val SUCCESSFUL_STATUS_CODES_RANGE_START = 200 - private const val SUCCESSFUL_STATUS_CODES_RANGE_END = 299 - val SUCCESSFUL_STATUS_CODES_RANGE: IntRange = SUCCESSFUL_STATUS_CODES_RANGE_START..SUCCESSFUL_STATUS_CODES_RANGE_END -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/ExceptionMessage.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/ExceptionMessage.kt deleted file mode 100644 index 332204407..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/ExceptionMessage.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object ExceptionMessage { - const val AUTHENTICATION_FAILURE = "Unable to authenticate" - - const val AUTHENTICATION_NOT_CONFIGURED_FOR_CLIENT = "Authentication is not configured" - - const val LOGGING_MASKED_FIELDS_NOT_CONFIGURED_FOR_CLIENT = "Logging masked fields is not configured" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderKey.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderKey.kt deleted file mode 100644 index 425d0f5fc..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderKey.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object HeaderKey { - const val PAGINATION_TOTAL_RESULTS = "pagination-total-results" - - const val LINK = "link" - - const val TRANSACTION_ID = "Partner-Transaction-Id" - - const val X_SDK_TITLE = "x-sdk-title" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderValue.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderValue.kt deleted file mode 100644 index 3c418bc74..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderValue.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object HeaderValue { - const val GZIP = "gzip" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Key.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Key.kt deleted file mode 100644 index a7a71ca1c..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/Key.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object Key { - const val CLIENT_KEY = "client_key" - - const val CLIENT_SECRET = "client_secret" - - const val ENDPOINT = "endpoint" - - const val AUTH_ENDPOINT = "auth_endpoint" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LogMaskingFields.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LogMaskingFields.kt deleted file mode 100644 index f66681346..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LogMaskingFields.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -import io.ktor.http.HttpHeaders - -internal data object LogMaskingFields { - val DEFAULT_MASKED_HEADER_FIELDS: Set = setOf(HttpHeaders.Authorization) - val DEFAULT_MASKED_BODY_FIELDS: Set = - setOf( - "cvv", - "pin", - "card_cvv", - "card_cvv2", - "card_number", - "access_token", - "security_code", - "account_number", - "card_avs_response", - "card_cvv_response", - "card_cvv2_response" - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LogMaskingRegex.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LogMaskingRegex.kt deleted file mode 100644 index 63d51c0be..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LogMaskingRegex.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object LogMaskingRegex { - val FIELD_REGEX = "^[a-zA-Z0-9-_]+$".toRegex() - - val NUMBER_FIELD_REGEX = "(?<=[\"']?number[\"']?:\\s?[\"'])(\\s*\\d{15,16}\\s*)(?=[\"'])".toRegex() -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LoggerName.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LoggerName.kt deleted file mode 100644 index 749fcd3fe..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LoggerName.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object LoggerName { - const val REQUEST_BODY_LOGGER: String = "RequestBodyLogger" - const val RESPONSE_BODY_LOGGER: String = "ResponseBodyLogger" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LoggingMessage.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LoggingMessage.kt deleted file mode 100644 index 50d9b3bce..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/LoggingMessage.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object LoggingMessage { - const val LOGGING_PREFIX = "ExpediaSDK:" - - const val TOKEN_RENEWAL_IN_PROGRESS = "Renewing token" - - const val TOKEN_RENEWAL_SUCCESSFUL = "Token renewal successful" - - const val TOKEN_CLEARING_IN_PROGRESS = "Clearing tokens" - - const val TOKEN_CLEARING_SUCCESSFUL = "Tokens successfully cleared" - - const val TOKEN_EXPIRED = "Token expired or is about to expire. Request will wait until token is renewed" - - const val OMITTED = "<-- omitted -->" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/SignatureValues.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/SignatureValues.kt deleted file mode 100644 index cdf04e37d..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/SignatureValues.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object SignatureValues { - const val ONE_BYTE_MASK = 0xFF - - const val INCREMENT = 0x100 - - const val RADIX = 16 - - const val API_KEY = "apikey" - - const val SIGNATURE = "signature" - - const val TIMESTAMP = "timestamp" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/ExceptionMessageProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/ExceptionMessageProvider.kt deleted file mode 100644 index 316ef3906..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/ExceptionMessageProvider.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant.provider - -import com.expediagroup.sdk.core.constant.provider.LoggingMessageProvider.getTransactionIdMessage - -internal object ExceptionMessageProvider { - fun getMissingRequiredConfigurationMessage(name: String): String = "Missing required configuration: $name" - - fun getExceptionOccurredWithTransactionIdMessage( - transactionId: String?, - message: String? - ): String = "Exception occurred" + getTransactionIdMessage(transactionId) + getConcatenatedMessage(message) - - private fun getConcatenatedMessage(message: String?) = if (message != null) ": $message" else "" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LogMaskingRegexProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LogMaskingRegexProvider.kt deleted file mode 100644 index 475e6f4c2..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LogMaskingRegexProvider.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant.provider - -internal object LogMaskingRegexProvider { - fun getMaskedFieldsRegex(maskedBodyFields: Set) = "(?<=[\"']?(${maskedBodyFields.joinToString("|")})[\"']?:\\s?[\"'])(\\s*[^\"']+\\s*)(?=[\"'])".toRegex() -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LoggingMessageProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LoggingMessageProvider.kt deleted file mode 100644 index f9d358ad3..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LoggingMessageProvider.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant.provider - -import io.ktor.http.HttpStatusCode - -internal object LoggingMessageProvider { - fun getTokenExpiresInMessage(expiresIn: Int) = "New token expires in $expiresIn seconds" - - fun getResponseUnsuccessfulMessage( - httpStatusCode: HttpStatusCode, - transactionId: String? - ) = "Unsuccessful response [$httpStatusCode]${getTransactionIdMessage(transactionId)}" - - fun getChosenProviderMessage( - property: String, - providerName: String - ) = "Successfully loaded [$property] from [$providerName]" - - fun getRuntimeConfigurationProviderMessage( - property: String, - value: T - ) = "Setting [$property] to [$value] from runtime configuration provider" - - fun getResponseBodyMessage( - body: String, - transactionId: String? - ) = "Response Body${getTransactionIdMessage(transactionId)}: $body" - - fun getRequestBodyMessage( - body: String, - transactionId: String? - ) = "Request Body${getTransactionIdMessage(transactionId)}: $body" - - fun getTransactionIdMessage(transactionId: String?) = if (transactionId != null) " for transaction-id [$transactionId]" else "" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/contract/Contract.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/contract/Contract.kt deleted file mode 100644 index 6527759ca..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/contract/Contract.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.contract - -internal typealias Operation = (String) -> String - -/** - * A contract for a specific [operation]. - * - * @property operation The operation to perform on a string. - */ -internal enum class Contract(val operation: Operation) { - TRAILING_SLASH({ if (it.endsWith("/")) it else "$it/" }) -} - -/** - * Adheres to the given [contract] on a [String]. - * - * @param contract the [Contract] to adhere to. - * @return the [String] adhering to the given [contract]. - */ -internal fun String.adhereTo(contract: Contract): String = contract.operation(this) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Headers.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/Headers.kt deleted file mode 100644 index 93bc60783..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Headers.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model - -import com.expediagroup.sdk.core.constant.HeaderKey -import io.ktor.http.Headers -import io.ktor.http.HeadersBuilder - -/** Get transaction id from headers. */ -fun Headers.getTransactionId(): String? = get(HeaderKey.TRANSACTION_ID) - -/** Get transaction id from headers builder. */ -fun HeadersBuilder.getTransactionId(): String? = get(HeaderKey.TRANSACTION_ID) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Nothing.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/Nothing.kt deleted file mode 100644 index bd6863c42..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Nothing.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model - -/** - * A representation of nothingness. Philosophers have debated the existence of nothing for centuries, but we have finally found it. - */ -data object Nothing diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Operation.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/Operation.kt deleted file mode 100644 index baf620810..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Operation.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model - -abstract class Operation( - val url: String, - val method: String, - val operationId: String, - val requestBody: T?, - val params: OperationParams? -) { - var transactionId: TransactionId = TransactionId() - private set -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/OperationParams.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/OperationParams.kt deleted file mode 100644 index c78314c41..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/OperationParams.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model - -import io.ktor.http.Headers -import io.ktor.http.Parameters - -interface OperationParams { - fun getHeaders(): Headers - - fun getQueryParams(): Parameters - - fun getPathParams(): Map -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Properties.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/Properties.kt deleted file mode 100644 index 5c93b9990..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Properties.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model - -import java.io.BufferedReader -import java.io.InputStreamReader -import java.net.URL - -/** A model of "*.properties" file with some handy methods. */ -class Properties(private val data: Map) { - companion object { - /** Creates a new SdkProperties with the given data. */ - fun from(path: URL) = - Properties( - java.util.Properties().apply { - load(BufferedReader(InputStreamReader(path.openStream()))) - }.map { it.key.toString() to it.value.toString() }.toMap() - ) - } - - /** Returns the data for a given [key]. */ - operator fun get(key: String): String? = data[key] -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Response.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/Response.kt deleted file mode 100644 index d5bd9747e..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/Response.kt +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ -@file:Suppress("unused") - -package com.expediagroup.sdk.core.model - -import java.util.stream.Collectors -import kotlin.collections.Map.Entry - -/** - * A Generic Response to represent the response from a service call. - * - * @property statusCode The HTTP status code of the response - * @property data The body of the response - * @property headers The headers of the response - */ -@Suppress("MemberVisibilityCanBePrivate") -open class Response( - val statusCode: Int, - val data: T, - val headers: Map> -) { - constructor(statusCode: Int, data: T, headers: Set>>) : this(statusCode, data, toHeadersMap(headers)) - - companion object { - @JvmStatic - fun toHeadersMap(headers: Set>>): Map> = - headers.stream().collect( - Collectors.toMap( - Entry>::key, - Entry>::value - ) - ) - } - - override fun toString() = "Response(statusCode=$statusCode, data=$data, headers=$headers)" - - @Deprecated("Use getData() instead", replaceWith = ReplaceWith("getData()")) - fun getBody() = data -} - -class EmptyResponse( - statusCode: Int, - headers: Map> -) : Response(statusCode, Nothing, headers) { - constructor(statusCode: Int, headers: Set>>) : this(statusCode, toHeadersMap(headers)) - - override fun toString(): String = "EmptyResponse(statusCode=$statusCode, headers=$headers)" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/TransactionId.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/TransactionId.kt deleted file mode 100644 index 07333147e..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/TransactionId.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model - -import java.util.UUID - -class TransactionId { - private var transactionId: UUID = UUID.randomUUID() - - fun peek(): UUID = transactionId - - fun dequeue(): UUID = transactionId.also { transactionId = UUID.randomUUID() } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/ExceptionUtils.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/ExceptionUtils.kt deleted file mode 100644 index 02fcaabd8..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/ExceptionUtils.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception - -import com.expediagroup.sdk.core.constant.provider.ExceptionMessageProvider -import com.expediagroup.sdk.core.model.exception.service.ExpediaGroupServiceException - -/** Handles exceptions by ensuring that only instances of [ExpediaGroupException] are thrown. */ -fun Throwable.handle(): Nothing = handleWith(null) - -/** - * Handles exceptions by ensuring that only instances of [ExpediaGroupException] are thrown. - * - * @param transactionId the transaction ID to be included in the exception message, can be null. - */ -fun Throwable.handleWith(transactionId: String?): Nothing { - if (this is ExpediaGroupException) throw this - - when (val cause = this.cause) { - is ExpediaGroupException -> throw cause - else -> throw ExpediaGroupServiceException( - ExceptionMessageProvider.getExceptionOccurredWithTransactionIdMessage(transactionId, message), - this, - transactionId - ) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/ExpediaGroupException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/ExpediaGroupException.kt deleted file mode 100644 index cf3d8b72c..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/ExpediaGroupException.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception - -/** - * A base exception for all ExpediaGroup exceptions. - * - * @param message An optional error message. - * @param cause An optional cause of the error. - */ -open class ExpediaGroupException( - message: String? = null, - cause: Throwable? = null -) : RuntimeException(message, cause) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupClientException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupClientException.kt deleted file mode 100644 index 4ea0b2ed2..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupClientException.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception.client - -import com.expediagroup.sdk.core.model.exception.ExpediaGroupException - -/** - * An exception that is thrown when a client error occurs. - * - * @param message An optional message. - * @param cause An optional cause. - */ -open class ExpediaGroupClientException( - message: String? = null, - cause: Throwable? = null -) : ExpediaGroupException(message, cause) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupConfigurationException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupConfigurationException.kt deleted file mode 100644 index 63fd9ca96..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupConfigurationException.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception.client - -/** - * An exception that is thrown when a configuration error occurs. - * - * @param message An optional error message. - * @param cause An optional cause of the error. - */ -class ExpediaGroupConfigurationException( - message: String? = null, - cause: Throwable? = null -) : ExpediaGroupClientException(message, cause) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupInvalidFieldNameException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupInvalidFieldNameException.kt deleted file mode 100644 index 6d06ffc87..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/ExpediaGroupInvalidFieldNameException.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception.client - -/** - * Thrown to indicate that one or more passed field names are invalid. - * - * @param invalidFields the names of the invalid fields. - */ -class ExpediaGroupInvalidFieldNameException(invalidFields: Collection) : - ExpediaGroupClientException("All fields names must contain only alphanumeric characters in addition to - and _ but found [${invalidFields.joinToString(",")}]") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/PropertyConstraintViolationException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/PropertyConstraintViolationException.kt deleted file mode 100644 index 8f05fec81..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/client/PropertyConstraintViolationException.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception.client - -/** - * An exception to be thrown when a constraint on some property has been violated. - * - * @property message The detail message. - * @property constraintViolations A list of the constraint violations that occurred - */ -class PropertyConstraintViolationException( - message: String = "Some field constraints have been violated", - constraintViolations: List -) : ExpediaGroupClientException("$message ${constraintViolations.joinToString(separator = ",\n\t- ", prefix = "[\n\t- ", postfix = "\n]")}") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupApiException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupApiException.kt deleted file mode 100644 index 64e901c52..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupApiException.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception.service - -import com.expediagroup.sdk.core.constant.provider.LoggingMessageProvider.getTransactionIdMessage - -abstract class ExpediaGroupApiException(val statusCode: Int, open val errorObject: Any, transactionId: String?) : - ExpediaGroupServiceException("Unsuccessful response code [$statusCode]${getTransactionIdMessage(transactionId)}${stringifyErrorObject(errorObject.toString())}", transactionId = transactionId) - -private fun stringifyErrorObject(stringValue: String): String = if (stringValue.isBlank()) " with an empty response body" else ": $stringValue" diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupAuthException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupAuthException.kt deleted file mode 100644 index d3d6ac149..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupAuthException.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception.service - -import io.ktor.http.HttpStatusCode - -/** - * An exception that is thrown when an authentication error occurs. - * - * @param message The error message. - * @param cause The cause of the error. - * @param transactionId The transaction-id of the auth request. - */ -class ExpediaGroupAuthException( - message: String? = null, - cause: Throwable? = null, - transactionId: String? = null -) : ExpediaGroupServiceException(message, cause, transactionId) { - /** - * An exception that is thrown when an authentication error occurs. - * - * @param errorCode The HTTP status code of the error. - * @param message The error message. - */ - constructor( - errorCode: HttpStatusCode, - message: String, - transactionId: String? - ) : this(message = "[${errorCode.value}] $message", transactionId = transactionId) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupServiceDefaultErrorException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupServiceDefaultErrorException.kt deleted file mode 100644 index e25db920b..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupServiceDefaultErrorException.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception.service - -class ExpediaGroupServiceDefaultErrorException(code: Int, override val errorObject: String, transactionId: String?) : ExpediaGroupApiException(code, errorObject, transactionId) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupServiceException.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupServiceException.kt deleted file mode 100644 index 130c1c19f..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/exception/service/ExpediaGroupServiceException.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.exception.service - -import com.expediagroup.sdk.core.model.exception.ExpediaGroupException - -/** - * An exception that is thrown when a service error occurs. - * - * @param message An optional error message. - * @param cause An optional cause of the error. - */ -open class ExpediaGroupServiceException( - message: String? = null, - cause: Throwable? = null, - val transactionId: String? = null -) : ExpediaGroupException(message, cause) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/paging/Paginator.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/paging/Paginator.kt deleted file mode 100644 index 7fbaa064b..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/paging/Paginator.kt +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.paging - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.constant.HeaderKey.LINK -import com.expediagroup.sdk.core.constant.HeaderKey.PAGINATION_TOTAL_RESULTS -import com.expediagroup.sdk.core.model.Response -import io.ktor.client.statement.HttpResponse - -sealed class BasePaginator( - private val client: Client, - firstResponse: Response, - private val fallbackBody: T, - private val getBody: suspend (HttpResponse) -> T -) : Iterator { - private var state: ResponseState = DefaultResponseState(firstResponse) - val paginationTotalResults: Long = firstResponse.headers[PAGINATION_TOTAL_RESULTS]?.getOrNull(0)?.toLongOrNull() ?: 0 - - override fun hasNext(): Boolean = state.hasNext() - - private fun extractLink(headers: Map>): String? = - headers[LINK]?.getOrNull(0)?.split(";")?.let { - if (it.isNotEmpty()) it[0] else null - }?.let { - it.substring(it.indexOf("<") + 1, it.indexOf(">")) - } - - protected fun nextResponse(): Response { - val response = state.getNextResponse() - state = ResponseStateFactory.getState(extractLink(response.headers), client, fallbackBody, getBody) - return response - } -} - -/** - * Paginator that returns the body of the response. - * - * @param client The client to use to fetch the next response - * @param firstResponse The first response to start the paginator with - * @param getBody A function to extract the body from the response - */ -class Paginator( - client: Client, - firstResponse: Response, - fallbackBody: T, - getBody: suspend (HttpResponse) -> T -) : BasePaginator(client, firstResponse, fallbackBody, getBody) { - /** - * Returns the body of the next response. - * - * @throws NoSuchElementException if the iteration has no next element. - */ - override fun next(): T = nextResponse().data -} - -/** - * Paginator that returns the full response. - * - * @param client The client to use to fetch the next response - * @param firstResponse The first response to start the paginator with - * @param getBody A function to extract the body from the response - */ -class ResponsePaginator( - client: Client, - firstResponse: Response, - fallbackBody: T, - getBody: suspend (HttpResponse) -> T -) : BasePaginator, T>(client, firstResponse, fallbackBody, getBody) { - /** - * Returns the next response. - * - * @throws NoSuchElementException if the iteration has no next element. - */ - override fun next(): Response = nextResponse() -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/model/paging/ResponseState.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/model/paging/ResponseState.kt deleted file mode 100644 index 19897831d..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/model/paging/ResponseState.kt +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.model.paging - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.constant.HeaderValue -import com.expediagroup.sdk.core.model.Response -import com.expediagroup.sdk.core.plugin.logging.GZipEncoder.decode -import com.expediagroup.sdk.core.plugin.logging.contentEncoding -import io.ktor.client.statement.HttpResponse -import io.ktor.util.InternalAPI -import io.ktor.util.moveToByteArray -import io.ktor.utils.io.ByteReadChannel -import io.ktor.utils.io.bits.Memory -import kotlinx.coroutines.runBlocking -import java.nio.ByteBuffer - -internal interface ResponseState { - fun getNextResponse(): Response - - fun hasNext(): Boolean -} - -internal class DefaultResponseState( - private val response: Response -) : ResponseState { - override fun getNextResponse(): Response = response - - override fun hasNext(): Boolean = true -} - -internal class LastResponseState : ResponseState { - override fun getNextResponse(): Response = throw NoSuchElementException() - - override fun hasNext(): Boolean = false -} - -internal class FetchLinkState( - private val link: String, - private val client: Client, - private val fallbackBody: T, - private val getBody: suspend (HttpResponse) -> T -) : ResponseState { - override fun getNextResponse(): Response = - runBlocking { - val response = client.performGet(link) - val body = parseBody(response) - Response(response.status.value, body, response.headers.entries()) - } - - override fun hasNext(): Boolean = true - - private suspend fun parseBody(response: HttpResponse): T = if (decodeBody(response).isEmpty()) fallbackBody else getBody(response) - - private suspend fun decodeBody(response: HttpResponse): String { - val byteReadChannel = prepareByteReadChannel(response) - val decodedByteReadChannel = if (response.contentEncoding().equals(HeaderValue.GZIP)) client.httpClient.decode(byteReadChannel) else byteReadChannel - val bodyString: String = decodedByteReadChannel.readRemaining().readText() - return bodyString - } - - @OptIn(InternalAPI::class) - private suspend fun prepareByteReadChannel(response: HttpResponse): ByteReadChannel { - val bufferSize = response.content.availableForRead - val buffer = ByteBuffer.allocate(bufferSize) - val numberOfBytesRead = response.content.peekTo(Memory(buffer), 0, 0, 0, bufferSize.toLong()).toInt() - val byteReadChannel = ByteReadChannel(buffer.moveToByteArray(), 0, numberOfBytesRead) - return byteReadChannel - } -} - -internal class ResponseStateFactory { - companion object { - fun getState( - link: String?, - client: Client, - fallbackBody: T, - getBody: suspend (HttpResponse) -> T - ): ResponseState = link?.let { FetchLinkState(it, client, fallbackBody, getBody) } ?: LastResponseState() - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/Hook.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/Hook.kt deleted file mode 100644 index 9a688c6b2..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/Hook.kt +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin - -import com.expediagroup.sdk.core.client.Client - -/** - * A helper to build a hook. - */ -internal interface HookBuilder { - fun build(configs: C) -} - -/** - * A hook is a post action we need to apply after creating a [Client]. - */ -internal open class Hook( - private val configuration: C, - private val builder: HookBuilder -) { - fun execute() = builder.build(configuration) -} - -/** A singleton repository of all [Hook]s we need to apply on the [Client]. */ -internal object Hooks { - private val clientsHooks: MutableMap>> = mutableMapOf() - - fun add( - client: Client, - hook: Hook - ) { - clientsHooks.getOrPut(client) { mutableListOf() } += hook - } - - fun execute(client: Client) { - clientsHooks[client]?.forEach { it.execute() } - } -} - -/** - * Provide an idiomatic scope to define hooks. - */ -internal fun Client.hooks(block: HookContext.() -> Unit) = block(HookContext(this)) - -internal class HookContext(private val client: Client) { - /** - * Provides an idiomatic way of defining a hook. - */ - fun use(hookFactory: HookFactory) = hookFactory - - /** - * Provides an idiomatic way of configuring a hook. - */ - fun HookFactory.with(config: C) = Hooks.add(client, create(client, config)) -} - -internal interface HookFactory { - fun create( - client: Client, - configuration: C - ): Hook -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/Plugin.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/Plugin.kt deleted file mode 100644 index 6a81db9d9..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/Plugin.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin - -import com.expediagroup.sdk.core.client.Client - -internal interface Plugin { - /** Install a plugin. */ - fun install( - client: Client, - configurations: C - ) -} - -/** - * Provide an idiomatic scope to define plugins. - */ -internal fun Client.plugins(block: PluginContext.() -> Unit) = block(PluginContext(this)) - -internal class PluginContext(private val client: Client) { - /** - * Provides an idiomatic way of starting a plugin. - */ - fun > use(plugin: P): P = plugin - - /** - * Provides an idiomatic way of configuring a plugin. - */ - fun Plugin.with(configs: C) = install(client, configs) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/PluginConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/PluginConfiguration.kt deleted file mode 100644 index 8eafdd383..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/PluginConfiguration.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin - -import io.ktor.client.HttpClientConfig -import io.ktor.client.engine.HttpClientEngineConfig - -internal interface PluginConfiguration - -internal abstract class KtorPluginConfiguration(open val httpClientConfiguration: HttpClientConfig) : PluginConfiguration diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationConfiguration.kt deleted file mode 100644 index 4e0a69c26..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationConfiguration.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.authentication - -import com.expediagroup.sdk.core.configuration.Credentials -import com.expediagroup.sdk.core.plugin.KtorPluginConfiguration -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy.AuthenticationType -import io.ktor.client.HttpClientConfig -import io.ktor.client.engine.HttpClientEngineConfig - -internal data class AuthenticationConfiguration( - override val httpClientConfiguration: HttpClientConfig, - val credentials: Credentials, - val authUrl: String, - val authType: AuthenticationType -) : KtorPluginConfiguration(httpClientConfiguration) { - companion object { - fun from( - httpClientConfig: HttpClientConfig, - credentials: Credentials, - authUrl: String, - authType: AuthenticationType = AuthenticationType.BEARER - ) = AuthenticationConfiguration(httpClientConfig, credentials, authUrl, authType) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationHookFactory.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationHookFactory.kt deleted file mode 100644 index ca6d13a76..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationHookFactory.kt +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.authentication - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.constant.Authentication.AUTHORIZATION_REQUEST_LOCK_DELAY -import com.expediagroup.sdk.core.plugin.Hook -import com.expediagroup.sdk.core.plugin.HookBuilder -import com.expediagroup.sdk.core.plugin.HookFactory -import io.ktor.client.plugins.HttpSend -import io.ktor.client.plugins.plugin -import io.ktor.client.request.HttpRequestBuilder -import io.ktor.http.HttpHeaders -import kotlinx.atomicfu.atomic -import kotlinx.coroutines.delay - -internal object AuthenticationHookFactory : HookFactory { - override fun create( - client: Client, - configuration: AuthenticationConfiguration - ): Hook = Hook(configuration, AuthenticationHookBuilder(client)) -} - -private class AuthenticationHookBuilder(private val client: Client) : HookBuilder { - private val lock = atomic(false) - private val authenticationStrategy = client.getAuthenticationStrategy() - - override fun build(configs: AuthenticationConfiguration) { - val httpClient = client.httpClient - - httpClient.plugin(HttpSend).intercept { request -> - if (!authenticationStrategy.isIdentityRequest(request)) { - if (authenticationStrategy.isTokenAboutToExpire()) { - if (!lock.getAndSet(true)) { - try { - authenticationStrategy.renewToken() - } finally { - lock.compareAndSet(expect = true, update = false) - } - } - } - while (lock.value) delay(AUTHORIZATION_REQUEST_LOCK_DELAY) - assignLatestToken(request) - } - execute(request) - } - } - - private fun assignLatestToken(request: HttpRequestBuilder) { - request.headers[HttpHeaders.Authorization] = authenticationStrategy.getAuthorizationHeader() - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationPlugin.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationPlugin.kt deleted file mode 100644 index 174f9feea..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/AuthenticationPlugin.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.authentication - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.constant.ExceptionMessage.AUTHENTICATION_NOT_CONFIGURED_FOR_CLIENT -import com.expediagroup.sdk.core.model.exception.client.ExpediaGroupClientException -import com.expediagroup.sdk.core.plugin.Plugin -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy -import io.ktor.client.plugins.auth.Auth -import kotlin.collections.set - -internal object AuthenticationPlugin : Plugin { - val clientAuthenticationStrategies = mutableMapOf() - - override fun install( - client: Client, - configurations: AuthenticationConfiguration - ) { - val strategy = AuthenticationStrategy.from(configurations, client) - clientAuthenticationStrategies[client] = strategy - configurations.httpClientConfiguration.install(Auth) { - strategy.loadAuth(this) - } - } -} - -internal fun Client.getAuthenticationStrategy(): AuthenticationStrategy = - AuthenticationPlugin.clientAuthenticationStrategies[this] ?: throw ExpediaGroupClientException(AUTHENTICATION_NOT_CONFIGURED_FOR_CLIENT) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/AuthenticationStrategy.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/AuthenticationStrategy.kt deleted file mode 100644 index 6a44a53d4..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/AuthenticationStrategy.kt +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.authentication.strategy - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.plugin.authentication.AuthenticationConfiguration -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy.AuthenticationType.BASIC -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy.AuthenticationType.BEARER -import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy.AuthenticationType.SIGNATURE -import io.ktor.client.plugins.auth.Auth -import io.ktor.client.request.HttpRequestBuilder - -internal interface AuthenticationStrategy { - fun loadAuth(auth: Auth) {} - - fun isTokenAboutToExpire(): Boolean - - fun renewToken() - - fun isIdentityRequest(request: HttpRequestBuilder): Boolean - - fun getAuthorizationHeader(): String - - companion object { - fun from( - configs: AuthenticationConfiguration, - client: Client - ): AuthenticationStrategy = - when (configs.authType) { - BASIC -> BasicAuthenticationStrategy(configs) - BEARER -> ExpediaGroupAuthenticationStrategy(client, configs) - SIGNATURE -> RapidAuthenticationStrategy(configs) - } - } - - enum class AuthenticationType { - BASIC, - BEARER, - SIGNATURE - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/BasicAuthenticationStrategy.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/BasicAuthenticationStrategy.kt deleted file mode 100644 index 2d87d76df..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/BasicAuthenticationStrategy.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.authentication.strategy - -import com.expediagroup.sdk.core.plugin.authentication.AuthenticationConfiguration -import io.ktor.client.plugins.auth.Auth -import io.ktor.client.plugins.auth.providers.BasicAuthCredentials -import io.ktor.client.plugins.auth.providers.basic -import io.ktor.client.request.HttpRequestBuilder - -internal class BasicAuthenticationStrategy( - private val configs: AuthenticationConfiguration -) : AuthenticationStrategy { - override fun loadAuth(auth: Auth) { - auth.basic { - sendWithoutRequest { true } - credentials { - BasicAuthCredentials(username = configs.credentials.key, password = configs.credentials.secret) - } - } - } - - override fun isTokenAboutToExpire(): Boolean = false - - override fun renewToken() = Unit - - override fun isIdentityRequest(request: HttpRequestBuilder) = true - - override fun getAuthorizationHeader() = String() -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/ExpediaGroupAuthenticationStrategy.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/ExpediaGroupAuthenticationStrategy.kt deleted file mode 100644 index 1404a27bc..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/ExpediaGroupAuthenticationStrategy.kt +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.authentication.strategy - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.configuration.Credentials -import com.expediagroup.sdk.core.constant.Authentication -import com.expediagroup.sdk.core.constant.Constant -import com.expediagroup.sdk.core.constant.ExceptionMessage -import com.expediagroup.sdk.core.constant.LoggingMessage -import com.expediagroup.sdk.core.constant.provider.LoggingMessageProvider -import com.expediagroup.sdk.core.model.exception.service.ExpediaGroupAuthException -import com.expediagroup.sdk.core.model.getTransactionId -import com.expediagroup.sdk.core.plugin.authentication.AuthenticationConfiguration -import com.expediagroup.sdk.core.plugin.logging.ExpediaGroupLoggerFactory -import io.ktor.client.HttpClient -import io.ktor.client.call.body -import io.ktor.client.plugins.auth.Auth -import io.ktor.client.plugins.auth.providers.BearerAuthProvider -import io.ktor.client.plugins.auth.providers.BearerTokens -import io.ktor.client.plugins.auth.providers.bearer -import io.ktor.client.plugins.plugin -import io.ktor.client.request.HttpRequestBuilder -import io.ktor.client.request.basicAuth -import io.ktor.client.request.parameter -import io.ktor.client.request.request -import io.ktor.client.request.url -import io.ktor.http.ContentType -import io.ktor.http.HttpMethod -import io.ktor.http.ParametersBuilder -import io.ktor.http.clone -import io.ktor.http.contentType -import kotlinx.coroutines.runBlocking -import java.time.LocalDateTime - -internal class ExpediaGroupAuthenticationStrategy( - private val client: Client, - private val configs: AuthenticationConfiguration -) : AuthenticationStrategy { - private val log = ExpediaGroupLoggerFactory.getLogger(javaClass) - private var bearerTokenStorage = BearerTokensInfo.emptyBearerTokenInfo - - override fun loadAuth(auth: Auth) { - auth.bearer { - sendWithoutRequest { request -> - isIdentityRequest(request) - } - } - } - - override fun isTokenAboutToExpire(): Boolean = bearerTokenStorage.isAboutToExpire().also { if (it) log.info(LoggingMessage.TOKEN_EXPIRED) } - - override fun renewToken() { - val httpClient = client.httpClient - log.info(LoggingMessage.TOKEN_RENEWAL_IN_PROGRESS) - clearTokens(httpClient) - val renewTokenResponse = - runBlocking { - httpClient.request { - method = HttpMethod.Post - parameter(Authentication.GRANT_TYPE, Authentication.CLIENT_CREDENTIALS) - contentType(ContentType.Application.FormUrlEncoded) - url(configs.authUrl) - basicAuth(configs.credentials) - with(client) { appendHeaders() } - } - } - if (renewTokenResponse.status.value !in Constant.SUCCESSFUL_STATUS_CODES_RANGE) { - throw ExpediaGroupAuthException(renewTokenResponse.status, ExceptionMessage.AUTHENTICATION_FAILURE, renewTokenResponse.headers.getTransactionId()) - } - val renewedTokenInfo: TokenResponse = runBlocking { renewTokenResponse.body() } - log.info(LoggingMessage.TOKEN_RENEWAL_SUCCESSFUL) - log.info(LoggingMessageProvider.getTokenExpiresInMessage(renewedTokenInfo.expiresIn)) - bearerTokenStorage = - BearerTokensInfo( - BearerTokens(renewedTokenInfo.accessToken, renewedTokenInfo.accessToken), - renewedTokenInfo.expiresIn - ) - bearerTokenStorage - } - - private fun clearTokens(client: HttpClient) { - log.info(LoggingMessage.TOKEN_CLEARING_IN_PROGRESS) - client.plugin(Auth).providers.filterIsInstance().first().clearToken() - bearerTokenStorage = BearerTokensInfo.emptyBearerTokenInfo - log.info(LoggingMessage.TOKEN_CLEARING_SUCCESSFUL) - } - - private fun getTokens(): BearerTokens = bearerTokenStorage.bearerTokens - - private fun HttpRequestBuilder.basicAuth(credentials: Credentials) { - basicAuth( - credentials.key, - credentials.secret - ) - } - - override fun isIdentityRequest(request: HttpRequestBuilder): Boolean = request.url.clone().apply { encodedParameters = ParametersBuilder() }.buildString() == configs.authUrl - - override fun getAuthorizationHeader() = "${Authentication.BEARER} ${getTokens().accessToken}" - - internal open class BearerTokensInfo(val bearerTokens: BearerTokens, expiresIn: Int) { - private val expiryDate: LocalDateTime - - init { - this.expiryDate = calculateExpiryDate(expiresIn) - } - - private fun calculateExpiryDate(expiresIn: Int): LocalDateTime = LocalDateTime.now().plusSeconds(expiresIn.toLong()) - - open fun isAboutToExpire(): Boolean = LocalDateTime.now().isAfter(expiryDate.minusSeconds(Authentication.BEARER_EXPIRY_DATE_MARGIN)) - - companion object { - internal val emptyBearerTokenInfo = - object : BearerTokensInfo(BearerTokens(Constant.EMPTY_STRING, Constant.EMPTY_STRING), -1) { - override fun isAboutToExpire() = true - } - } - } - - internal data class TokenResponse( - val accessToken: String, - val expiresIn: Int - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/RapidAuthenticationStrategy.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/RapidAuthenticationStrategy.kt deleted file mode 100644 index 0927b7566..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/authentication/strategy/RapidAuthenticationStrategy.kt +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.authentication.strategy - -import com.expediagroup.sdk.core.constant.Authentication -import com.expediagroup.sdk.core.constant.Constant -import com.expediagroup.sdk.core.constant.SignatureValues -import com.expediagroup.sdk.core.plugin.authentication.AuthenticationConfiguration -import io.ktor.client.request.HttpRequestBuilder -import java.math.BigInteger -import java.nio.charset.StandardCharsets -import java.security.MessageDigest -import java.security.spec.MGF1ParameterSpec -import java.time.Instant - -internal class RapidAuthenticationStrategy(private val configs: AuthenticationConfiguration) : AuthenticationStrategy { - private var signature: String = Constant.EMPTY_STRING - - override fun isTokenAboutToExpire(): Boolean = true - - override fun renewToken() { - val credentials = configs.credentials - signature = calculateSignature(credentials.key, credentials.secret, Instant.now().epochSecond) - } - - override fun isIdentityRequest(request: HttpRequestBuilder) = false - - override fun getAuthorizationHeader() = createAuthorizationHeader(signature) - - private fun createAuthorizationHeader(signature: String?): String = "${Authentication.EAN} $signature" - - private fun calculateSignature( - apiKey: String, - secret: String, - timestamp: Long - ): String { - val toBeHashed = apiKey + secret + timestamp - val messageDigest = MessageDigest.getInstance(MGF1ParameterSpec.SHA512.digestAlgorithm) - val bytes = messageDigest.digest(toBeHashed.toByteArray(StandardCharsets.UTF_8)) - val signature = - buildString { - bytes.forEach { - append(((it.toInt() and SignatureValues.ONE_BYTE_MASK) + SignatureValues.INCREMENT).toString(SignatureValues.RADIX).substring(BigInteger.ONE.toInt())) - } - } - return "${SignatureValues.API_KEY}=$apiKey,${SignatureValues.SIGNATURE}=$signature,${SignatureValues.TIMESTAMP}=$timestamp" - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/encoding/EncodingConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/encoding/EncodingConfiguration.kt deleted file mode 100644 index c789bc69f..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/encoding/EncodingConfiguration.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.encoding - -import com.expediagroup.sdk.core.plugin.KtorPluginConfiguration -import io.ktor.client.HttpClientConfig -import io.ktor.client.engine.HttpClientEngineConfig - -internal data class EncodingConfiguration( - override val httpClientConfiguration: HttpClientConfig -) : KtorPluginConfiguration(httpClientConfiguration) { - companion object { - fun from(httpClientConfig: HttpClientConfig) = EncodingConfiguration(httpClientConfig) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/encoding/EncodingPlugin.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/encoding/EncodingPlugin.kt deleted file mode 100644 index 658dd6362..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/encoding/EncodingPlugin.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.encoding - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.plugin.Plugin -import io.ktor.client.plugins.compression.ContentEncoding - -internal object EncodingPlugin : Plugin { - override fun install( - client: Client, - configurations: EncodingConfiguration - ) { - configurations.httpClientConfiguration.install(ContentEncoding) { - gzip() - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/exception/ExceptionHandlingConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/exception/ExceptionHandlingConfiguration.kt deleted file mode 100644 index 89cdd14c4..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/exception/ExceptionHandlingConfiguration.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.exception - -import com.expediagroup.sdk.core.plugin.KtorPluginConfiguration -import io.ktor.client.HttpClientConfig -import io.ktor.client.engine.HttpClientEngineConfig - -internal data class ExceptionHandlingConfiguration( - override val httpClientConfiguration: HttpClientConfig -) : KtorPluginConfiguration(httpClientConfiguration) { - companion object { - fun from(httpClientConfig: HttpClientConfig) = ExceptionHandlingConfiguration(httpClientConfig) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/exception/ExceptionHandlingPlugin.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/exception/ExceptionHandlingPlugin.kt deleted file mode 100644 index 15d58a136..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/exception/ExceptionHandlingPlugin.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.exception - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.model.exception.handleWith -import com.expediagroup.sdk.core.model.getTransactionId -import com.expediagroup.sdk.core.plugin.Plugin -import io.ktor.client.plugins.HttpResponseValidator - -internal object ExceptionHandlingPlugin : Plugin { - override fun install( - client: Client, - configurations: ExceptionHandlingConfiguration - ) { - with(configurations.httpClientConfiguration) { - HttpResponseValidator { - handleResponseExceptionWithRequest { exception, request -> - exception.handleWith(request.headers.getTransactionId()) - } - } - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/httptimeout/HttpTimeoutConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/httptimeout/HttpTimeoutConfiguration.kt deleted file mode 100644 index a0d28f3cb..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/httptimeout/HttpTimeoutConfiguration.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.httptimeout - -import com.expediagroup.sdk.core.plugin.KtorPluginConfiguration -import io.ktor.client.HttpClientConfig -import io.ktor.client.engine.HttpClientEngineConfig - -internal data class HttpTimeoutConfiguration( - override val httpClientConfiguration: HttpClientConfig, - val requestTimeout: Long, - val connectionTimeout: Long, - val socketTimeout: Long -) : KtorPluginConfiguration(httpClientConfiguration) { - companion object { - fun from( - httpClientConfig: HttpClientConfig, - requestTimeout: Long, - connectionTimeout: Long, - socketTimeout: Long - ) = HttpTimeoutConfiguration(httpClientConfig, requestTimeout, connectionTimeout, socketTimeout) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/httptimeout/HttpTimeoutPlugin.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/httptimeout/HttpTimeoutPlugin.kt deleted file mode 100644 index 0590d8847..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/httptimeout/HttpTimeoutPlugin.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.httptimeout - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.plugin.Plugin -import io.ktor.client.plugins.HttpTimeout - -internal object HttpTimeoutPlugin : Plugin { - override fun install( - client: Client, - configurations: HttpTimeoutConfiguration - ) { - configurations.httpClientConfiguration.install(HttpTimeout) { - requestTimeoutMillis = configurations.requestTimeout - connectTimeoutMillis = configurations.connectionTimeout - socketTimeoutMillis = configurations.socketTimeout - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupJsonFieldFilter.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupJsonFieldFilter.kt deleted file mode 100644 index 9a60c277d..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupJsonFieldFilter.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.ebay.ejmask.core.BaseFilter - -internal class ExpediaGroupJsonFieldFilter(maskedFields: Array) : BaseFilter( - ExpediaGroupJsonFieldPatternBuilder::class.java, - *maskedFields -) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupJsonFieldPatternBuilder.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupJsonFieldPatternBuilder.kt deleted file mode 100644 index 63ca9cfdb..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupJsonFieldPatternBuilder.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.ebay.ejmask.extenstion.builder.json.JsonFieldPatternBuilder -import com.expediagroup.sdk.core.constant.LoggingMessage.OMITTED - -internal class ExpediaGroupJsonFieldPatternBuilder : JsonFieldPatternBuilder() { - override fun buildReplacement( - visibleCharacters: Int, - vararg fieldNames: String? - ): String = "\"$1$2$OMITTED\"" -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLogger.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLogger.kt deleted file mode 100644 index 6390f5c7a..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLogger.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.constant.LogMaskingFields -import com.expediagroup.sdk.core.constant.LoggingMessage.LOGGING_PREFIX -import org.slf4j.Logger - -internal class ExpediaGroupLogger(private val logger: Logger, private val client: Client? = null) : Logger by logger { - private val mask = LogMasker(getMaskedBodyFieldFilters()) - - override fun info(msg: String) { - if (logger.isInfoEnabled) { - logger.info(decorate(msg)) - } - } - - override fun warn(msg: String) { - if (logger.isWarnEnabled) { - logger.warn(decorate(msg)) - } - } - - override fun debug(msg: String) { - if (logger.isDebugEnabled) { - logger.debug(decorate(msg)) - } - } - - private fun decorate(msg: String): String = "$LOGGING_PREFIX ${mask(msg)}" - - private fun getMaskedBodyFields(): Set = client?.getLoggingMaskedFieldsProvider()?.getMaskedBodyFields() ?: LogMaskingFields.DEFAULT_MASKED_BODY_FIELDS - - private fun getMaskedBodyFieldFilters(): Iterable = - listOf( - ExpediaGroupJsonFieldFilter(getMaskedBodyFields().toTypedArray()) - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLoggerFactory.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLoggerFactory.kt deleted file mode 100644 index e2d2326eb..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLoggerFactory.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.expediagroup.sdk.core.client.Client -import org.slf4j.LoggerFactory - -internal object ExpediaGroupLoggerFactory { - fun getLogger(clazz: Class<*>) = ExpediaGroupLogger(LoggerFactory.getLogger(clazz)) - - fun getLogger( - clazz: Class<*>, - client: Client - ) = ExpediaGroupLogger(LoggerFactory.getLogger(clazz), client) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LogMasker.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LogMasker.kt deleted file mode 100644 index 36628610f..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LogMasker.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.ebay.ejmask.core.BaseFilter -import com.ebay.ejmask.core.EJMask -import com.ebay.ejmask.core.EJMaskInitializer -import com.ebay.ejmask.core.util.LoggerUtil - -internal class LogMasker( - filters: Iterable -) : (String) -> String { - init { - LoggerUtil.register { _, _, _ -> /* disable logging */ } - filters.forEach { EJMaskInitializer.addFilter(it) } - } - - override fun invoke(message: String): String = EJMask.mask(message) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggableContentTypes.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggableContentTypes.kt deleted file mode 100644 index 9031d78b3..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggableContentTypes.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import io.ktor.http.ContentType - -val LoggableContentTypes: List = - buildList { - add(ContentType.Application.Json) - add(ContentType.Application.Xml) - add(ContentType.Application.Xml_Dtd) - add(ContentType.Application.ProblemXml) - add(ContentType.Application.Json) - add(ContentType.Application.HalJson) - add(ContentType.Application.FormUrlEncoded) - add(ContentType.Application.ProblemJson) - add(ContentType.Text.Xml) - add(ContentType.Text.Plain) - } diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingConfiguration.kt deleted file mode 100644 index cd34324a9..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingConfiguration.kt +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.plugin.KtorPluginConfiguration -import io.ktor.client.HttpClientConfig -import io.ktor.client.engine.HttpClientEngineConfig -import io.ktor.client.plugins.logging.LogLevel -import io.ktor.client.plugins.logging.Logger - -internal data class LoggingConfiguration( - override val httpClientConfiguration: HttpClientConfig, - val maskedLoggingHeaders: Set, - val maskedLoggingBodyFields: Set, - val level: LogLevel = LogLevel.HEADERS, - val getLogger: (client: Client) -> Logger = createCustomLogger -) : KtorPluginConfiguration(httpClientConfiguration) { - companion object { - fun from( - httpClientConfig: HttpClientConfig, - maskedLoggingHeaders: Set, - maskedLoggingBodyFields: Set - ) = LoggingConfiguration(httpClientConfig, maskedLoggingHeaders, maskedLoggingBodyFields) - } -} - -private val createCustomLogger: (client: Client) -> Logger - get() = { - object : Logger { - val delegate = ExpediaGroupLoggerFactory.getLogger(Client::class.java, it) - - override fun log(message: String) = delegate.info(message) - } - } diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingMaskedFieldsProvider.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingMaskedFieldsProvider.kt deleted file mode 100644 index 033ff1f6f..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingMaskedFieldsProvider.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.expediagroup.sdk.core.constant.LogMaskingFields.DEFAULT_MASKED_BODY_FIELDS -import com.expediagroup.sdk.core.constant.LogMaskingFields.DEFAULT_MASKED_HEADER_FIELDS -import com.expediagroup.sdk.core.constant.LogMaskingRegex.FIELD_REGEX -import com.expediagroup.sdk.core.model.exception.client.ExpediaGroupInvalidFieldNameException - -class LoggingMaskedFieldsProvider(maskedLoggingHeaders: Set, maskedLoggingBodyFields: Set) { - private val maskedHeaderFields: Set - private val maskedBodyFields: Set - - init { - maskedLoggingHeaders.filter(::isInvalid).takeIf { it.isNotEmpty() }?.let { throw ExpediaGroupInvalidFieldNameException(it) } - maskedLoggingBodyFields.filter(::isInvalid).takeIf { it.isNotEmpty() }?.let { throw ExpediaGroupInvalidFieldNameException(it) } - maskedHeaderFields = DEFAULT_MASKED_HEADER_FIELDS.union(maskedLoggingHeaders) - maskedBodyFields = DEFAULT_MASKED_BODY_FIELDS.union(maskedLoggingBodyFields) - } - - /** - * @return a copy of the list of headers to be masked - */ - fun getMaskedHeaderFields(): Set = maskedHeaderFields.toSet() - - /** - * @return a copy of the list of body fields to be masked - */ - fun getMaskedBodyFields(): Set = maskedBodyFields.toSet() - - private fun isInvalid(fieldName: String): Boolean = !fieldName.matches(FIELD_REGEX) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingPlugin.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingPlugin.kt deleted file mode 100644 index 758a5df72..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingPlugin.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.constant.ExceptionMessage -import com.expediagroup.sdk.core.constant.LoggingMessage -import com.expediagroup.sdk.core.model.exception.client.ExpediaGroupClientException -import com.expediagroup.sdk.core.plugin.Plugin -import io.ktor.client.plugins.logging.Logging - -internal object LoggingPlugin : Plugin { - val clientLoggingMaskedFieldsProviders = mutableMapOf() - - override fun install( - client: Client, - configurations: LoggingConfiguration - ) { - clientLoggingMaskedFieldsProviders[client] = - LoggingMaskedFieldsProvider( - configurations.maskedLoggingHeaders, - configurations.maskedLoggingBodyFields - ) - configurations.httpClientConfiguration.install(Logging) { - logger = configurations.getLogger(client) - level = configurations.level - sanitizeHeader(LoggingMessage.OMITTED) { header -> - client.getLoggingMaskedFieldsProvider().getMaskedHeaderFields().contains(header) - } - } - configurations.httpClientConfiguration.install(RequestBodyLogger) - configurations.httpClientConfiguration.install(ResponseBodyLogger) - } -} - -internal fun Client.getLoggingMaskedFieldsProvider(): LoggingMaskedFieldsProvider = - LoggingPlugin.clientLoggingMaskedFieldsProviders[this] ?: throw ExpediaGroupClientException(ExceptionMessage.LOGGING_MASKED_FIELDS_NOT_CONFIGURED_FOR_CLIENT) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/RequestBodyLogger.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/RequestBodyLogger.kt deleted file mode 100644 index 5a077a148..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/RequestBodyLogger.kt +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.expediagroup.sdk.core.constant.LoggerName -import com.expediagroup.sdk.core.constant.provider.LoggingMessageProvider -import com.expediagroup.sdk.core.model.getTransactionId -import io.ktor.client.HttpClient -import io.ktor.client.plugins.HttpClientPlugin -import io.ktor.client.request.HttpRequestBuilder -import io.ktor.client.request.HttpSendPipeline -import io.ktor.http.content.OutputStreamContent -import io.ktor.http.contentType -import io.ktor.util.AttributeKey -import io.ktor.util.pipeline.PipelineContext -import io.ktor.utils.io.writer -import kotlinx.coroutines.coroutineScope - -internal class RequestBodyLogger { - private val log = ExpediaGroupLoggerFactory.getLogger(javaClass) - - companion object Plugin : HttpClientPlugin { - override val key: AttributeKey = AttributeKey(LoggerName.REQUEST_BODY_LOGGER) - - override fun install( - plugin: RequestBodyLogger, - scope: HttpClient - ) { - scope.sendPipeline.intercept(HttpSendPipeline.Monitoring) { - val body: String = getBody() - plugin.log.debug(LoggingMessageProvider.getRequestBodyMessage(body, context.headers.getTransactionId())) - proceed() - } - } - - private suspend fun PipelineContext.getBody(): String { - val body = - when { - context.contentType() in LoggableContentTypes -> context.body - else -> return "Body of type ${context.contentType()?.contentType} cannot be logged!" - } - - if (body is OutputStreamContent) { - return coroutineScope { - writer { - body.writeTo(channel) - }.channel.readRemaining().readText() - } - } - return body.toString() - } - - override fun prepare(block: RequestBodyLoggerConfig.() -> Unit): RequestBodyLogger = RequestBodyLogger() - } -} - -internal class RequestBodyLoggerConfig diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ResponseBodyLogger.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ResponseBodyLogger.kt deleted file mode 100644 index c06f8fdc7..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ResponseBodyLogger.kt +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.logging - -import com.expediagroup.sdk.core.constant.HeaderValue -import com.expediagroup.sdk.core.constant.LoggerName -import com.expediagroup.sdk.core.constant.provider.LoggingMessageProvider -import com.expediagroup.sdk.core.model.getTransactionId -import com.expediagroup.sdk.core.plugin.logging.GZipEncoder.decode -import io.ktor.client.HttpClient -import io.ktor.client.plugins.HttpClientPlugin -import io.ktor.client.plugins.compression.ContentEncoder -import io.ktor.client.statement.HttpResponse -import io.ktor.client.statement.HttpResponsePipeline -import io.ktor.client.statement.request -import io.ktor.http.HttpHeaders -import io.ktor.http.contentType -import io.ktor.util.AttributeKey -import io.ktor.util.Encoder -import io.ktor.util.GZip -import io.ktor.util.InternalAPI -import io.ktor.utils.io.ByteReadChannel - -class ResponseBodyLogger { - private val log = ExpediaGroupLoggerFactory.getLogger(javaClass) - - companion object Plugin : HttpClientPlugin { - override val key: AttributeKey = AttributeKey(LoggerName.RESPONSE_BODY_LOGGER) - - @OptIn(InternalAPI::class) - override fun install( - plugin: ResponseBodyLogger, - scope: HttpClient - ) { - scope.responsePipeline.intercept(HttpResponsePipeline.Receive) { - val response: HttpResponse = context.response - val byteReadChannel: ByteReadChannel = if (response.contentEncoding().equals(HeaderValue.GZIP)) scope.decode(response.content) else response.content - - when { - response.contentType() in LoggableContentTypes -> - LoggingMessageProvider.getResponseBodyMessage( - byteReadChannel.readRemaining().readText(), - response.request.headers.getTransactionId() - ) - else -> LoggingMessageProvider.getResponseBodyMessage("Body of type ${response.contentType()?.contentType} cannot be logged!", response.request.headers.getTransactionId()) - }.let { - plugin.log.debug(it) - } - - proceed() - } - } - - override fun prepare(block: ResponseBodyLoggerConfig.() -> Unit): ResponseBodyLogger = ResponseBodyLogger() - } -} - -fun HttpResponse.contentEncoding(): String? = headers[HttpHeaders.ContentEncoding] - -internal object GZipEncoder : ContentEncoder, Encoder by GZip { - override val name: String = HeaderValue.GZIP -} - -class ResponseBodyLoggerConfig diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/request/DefaultRequestConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/request/DefaultRequestConfiguration.kt deleted file mode 100644 index c1114a221..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/request/DefaultRequestConfiguration.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.request - -import com.expediagroup.sdk.core.plugin.KtorPluginConfiguration -import io.ktor.client.HttpClientConfig -import io.ktor.client.engine.HttpClientEngineConfig - -internal data class DefaultRequestConfiguration( - override val httpClientConfiguration: HttpClientConfig, - val endpoint: String -) : KtorPluginConfiguration(httpClientConfiguration) { - companion object { - fun from( - httpClientConfig: HttpClientConfig, - endpoint: String - ) = DefaultRequestConfiguration(httpClientConfig, endpoint) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/request/DefaultRequestPlugin.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/request/DefaultRequestPlugin.kt deleted file mode 100644 index 745c67718..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/request/DefaultRequestPlugin.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.request - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.plugin.Plugin -import io.ktor.client.plugins.DefaultRequest - -internal object DefaultRequestPlugin : Plugin { - override fun install( - client: Client, - configurations: DefaultRequestConfiguration - ) { - configurations.httpClientConfiguration.install(DefaultRequest) { - url(configurations.endpoint) - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/ContentNegotiation.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/ContentNegotiation.kt deleted file mode 100644 index 00d4e672a..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/ContentNegotiation.kt +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.serialization - -import com.expediagroup.sdk.core.plugin.logging.ExpediaGroupLoggerFactory -import io.ktor.client.HttpClient -import io.ktor.client.plugins.HttpClientPlugin -import io.ktor.client.plugins.contentnegotiation.ContentConverterException -import io.ktor.client.plugins.contentnegotiation.JsonContentTypeMatcher -import io.ktor.client.request.HttpRequestBuilder -import io.ktor.client.request.HttpRequestPipeline -import io.ktor.client.statement.HttpResponseContainer -import io.ktor.client.statement.HttpResponsePipeline -import io.ktor.client.utils.EmptyContent -import io.ktor.http.ContentType -import io.ktor.http.ContentTypeMatcher -import io.ktor.http.HttpHeaders -import io.ktor.http.HttpStatusCode -import io.ktor.http.Url -import io.ktor.http.charset -import io.ktor.http.content.NullBody -import io.ktor.http.content.OutgoingContent -import io.ktor.http.contentType -import io.ktor.serialization.Configuration -import io.ktor.serialization.ContentConverter -import io.ktor.serialization.deserialize -import io.ktor.serialization.suitableCharset -import io.ktor.util.AttributeKey -import io.ktor.util.InternalAPI -import io.ktor.util.reflect.TypeInfo -import io.ktor.utils.io.ByteReadChannel -import io.ktor.utils.io.charsets.Charset -import java.io.InputStream -import kotlin.reflect.KClass - -internal val DefaultCommonIgnoredTypes: Set> = - setOf( - ByteArray::class, - String::class, - HttpStatusCode::class, - ByteReadChannel::class, - OutgoingContent::class - ) - -internal val DefaultIgnoredTypes: Set> = mutableSetOf(InputStream::class) - -internal class ContentNegotiation( - private val registrations: List, - private val ignoredTypes: Set> -) { - internal class Config : Configuration { - internal class ConverterRegistration( - val converter: ContentConverter, - val contentTypeToSend: ContentType, - val contentTypeMatcher: ContentTypeMatcher - ) - - val registrations = mutableListOf() - val ignoredTypes: MutableSet> = - (DefaultIgnoredTypes + DefaultCommonIgnoredTypes).toMutableSet() - - override fun register( - contentType: ContentType, - converter: T, - configuration: T.() -> Unit - ) { - val matcher = - when (contentType) { - ContentType.Application.Json -> JsonContentTypeMatcher - else -> defaultMatcher(contentType) - } - register(contentType, converter, matcher, configuration) - } - - private fun register( - contentTypeToSend: ContentType, - converter: T, - contentTypeMatcher: ContentTypeMatcher, - configuration: T.() -> Unit - ) { - val registration = - ConverterRegistration( - converter.apply(configuration), - contentTypeToSend, - contentTypeMatcher - ) - registrations.add(registration) - } - - private fun defaultMatcher(pattern: ContentType): ContentTypeMatcher = - object : ContentTypeMatcher { - override fun contains(contentType: ContentType): Boolean = contentType.match(pattern) - } - } - - private val log = ExpediaGroupLoggerFactory.getLogger(this::class.java) - - internal suspend fun convertRequest( - request: HttpRequestBuilder, - body: Any - ): Any? { - if (body is OutgoingContent || ignoredTypes.any { it.isInstance(body) }) { - log.trace( - "Body type ${body::class} is in ignored types. " + - "Skipping ContentNegotiation for ${request.url}." - ) - return null - } - val contentType = - request.contentType() ?: run { - log.trace("Request doesn't have Content-Type header. Skipping ContentNegotiation for ${request.url}.") - return null - } - - if (body is Unit) { - log.trace("Sending empty body for ${request.url}") - request.headers.remove(HttpHeaders.ContentType) - return EmptyContent - } - - val matchingRegistrations = - registrations.filter { it.contentTypeMatcher.contains(contentType) } - .takeIf { it.isNotEmpty() } ?: run { - log.trace( - "None of the registered converters match request Content-Type=$contentType. " + - "Skipping ContentNegotiation for ${request.url}." - ) - return null - } - if (request.bodyType == null) { - log.trace("Request has unknown body type. Skipping ContentNegotiation for ${request.url}.") - return null - } - request.headers.remove(HttpHeaders.ContentType) - - // Pick the first one that can convert the subject successfully - val serializedContent = - matchingRegistrations.firstNotNullOfOrNull { registration -> - val result = - registration.converter.serializeNullable( - contentType, - contentType.charset() ?: Charsets.UTF_8, - request.bodyType!!, - body.takeIf { it != NullBody } - ) - if (result != null) { - log.trace("Converted request body using ${registration.converter} for ${request.url}") - } - result - } ?: throw ContentConverterException( - "Can't convert $body with contentType $contentType using converters " + - matchingRegistrations.joinToString { it.converter.toString() } - ) - - return serializedContent - } - - @OptIn(InternalAPI::class) - internal suspend fun convertResponse( - requestUrl: Url, - info: TypeInfo, - body: Any, - responseContentType: ContentType, - charset: Charset = Charsets.UTF_8 - ): Any? { - if (body !is ByteReadChannel) { - log.trace("Response body is already transformed. Skipping ContentNegotiation for $requestUrl.") - return null - } - if (info.type in ignoredTypes) { - log.trace( - "Response body type ${info.type} is in ignored types. " + - "Skipping ContentNegotiation for $requestUrl." - ) - return null - } - - log.debug("Test: ${registrations.size}") - val suitableConverters = - registrations - .filter { it.contentTypeMatcher.contains(responseContentType) } - .map { it.converter } - .takeIf { it.isNotEmpty() } - ?: run { - log.trace( - "None of the registered converters match response with Content-Type=$responseContentType. " + - "Skipping ContentNegotiation for $requestUrl." - ) - return null - } - - val result = suitableConverters.deserialize(body, info, charset) - if (result !is ByteReadChannel) { - log.trace("Response body was converted to ${result::class} for $requestUrl.") - } - return result - } - - companion object Plugin : HttpClientPlugin { - override val key: AttributeKey = AttributeKey("ContentNegotiation") - private val log = ExpediaGroupLoggerFactory.getLogger(this::class.java) - - override fun install( - plugin: ContentNegotiation, - scope: HttpClient - ) { - scope.requestPipeline.intercept(HttpRequestPipeline.Transform) { - val result = plugin.convertRequest(context, subject) ?: return@intercept - proceedWith(result) - } - - scope.responsePipeline.intercept(HttpResponsePipeline.Transform) { (info, body) -> - val contentType = - context.response.contentType() ?: run { - log.trace("Response doesn't have \"Content-Type\" header, skipping ContentNegotiation plugin") - return@intercept - } - val charset = context.request.headers.suitableCharset() - - val deserializedBody = - plugin.convertResponse(context.request.url, info, body, contentType, charset) - ?: return@intercept - val result = HttpResponseContainer(info, deserializedBody) - proceedWith(result) - } - } - - override fun prepare(block: Config.() -> Unit): ContentNegotiation { - val config = Config().apply(block) - return ContentNegotiation(config.registrations, config.ignoredTypes) - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationConfiguration.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationConfiguration.kt deleted file mode 100644 index dc1546df3..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationConfiguration.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.serialization - -import com.expediagroup.sdk.core.plugin.KtorPluginConfiguration -import io.ktor.client.HttpClientConfig -import io.ktor.client.engine.HttpClientEngineConfig -import io.ktor.http.ContentType - -internal data class SerializationConfiguration( - override val httpClientConfiguration: HttpClientConfig, - val contentType: ContentType = ContentType.Application.Json -) : KtorPluginConfiguration(httpClientConfiguration) { - companion object { - fun from(httpClientConfig: HttpClientConfig) = SerializationConfiguration(httpClientConfig) - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationPlugin.kt b/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationPlugin.kt deleted file mode 100644 index eda9abc14..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationPlugin.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.serialization - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.plugin.Plugin -import com.fasterxml.jackson.databind.DeserializationFeature -import com.fasterxml.jackson.databind.PropertyNamingStrategies -import io.ktor.serialization.jackson.jackson -import java.text.SimpleDateFormat - -internal object SerializationPlugin : Plugin { - override fun install( - client: Client, - configurations: SerializationConfiguration - ) { - configurations.httpClientConfiguration.install(ContentNegotiation) { - jackson { - enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS) - disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE) - setDateFormat(SimpleDateFormat()) - findAndRegisterModules() - } - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt deleted file mode 100644 index 0be57e544..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt +++ /dev/null @@ -1,367 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.client - -import com.expediagroup.sdk.core.client.BaseXapClient -import com.expediagroup.sdk.core.configuration.XapClientConfiguration -import com.expediagroup.sdk.core.constant.ConfigurationName -import com.expediagroup.sdk.core.constant.provider.ExceptionMessageProvider.getMissingRequiredConfigurationMessage -import com.expediagroup.sdk.core.model.EmptyResponse -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation -import com.expediagroup.sdk.core.model.Response -import com.expediagroup.sdk.core.model.exception.client.ExpediaGroupConfigurationException -import com.expediagroup.sdk.core.model.exception.handle -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 -import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperation -import com.expediagroup.sdk.xap.operations.GetLodgingDetailsOperation -import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperation -import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperation -import com.expediagroup.sdk.xap.operations.GetLodgingRateCalendarOperation -import io.ktor.client.call.body -import io.ktor.client.request.request -import io.ktor.client.request.setBody -import io.ktor.client.request.url -import io.ktor.client.statement.HttpResponse -import io.ktor.http.ContentType -import io.ktor.http.HttpMethod -import io.ktor.http.contentType -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.future.future -import java.util.concurrent.CompletableFuture - -/** -* The XAP Lodging Search APIs can be used by partners both booking via an Expedia website, or by partners that -will be booking via the XAP APIs. Each API also provides pre-configured links to the Expedia website, -the XAP Booking API, or both. - -*/ - -class XapClient private constructor(clientConfiguration: XapClientConfiguration) : BaseXapClient("xap", clientConfiguration) { - class Builder : BaseXapClient.Builder() { - override fun build() = - XapClient( - XapClientConfiguration(key, secret, endpoint, requestTimeout, connectionTimeout, socketTimeout, maskedLoggingHeaders, maskedLoggingBodyFields) - ) - } - - class BuilderWithHttpClient() : BaseXapClient.BuilderWithHttpClient() { - override fun build(): XapClient { - if (okHttpClient == null) { - throw ExpediaGroupConfigurationException(getMissingRequiredConfigurationMessage(ConfigurationName.OKHTTP_CLIENT)) - } - - return XapClient( - XapClientConfiguration(key, secret, endpoint, null, null, null, maskedLoggingHeaders, maskedLoggingBodyFields, okHttpClient) - ) - } - } - - companion object { - @JvmStatic fun builder() = Builder() - - @JvmStatic fun builderWithHttpClient() = BuilderWithHttpClient() - } - - override suspend fun throwServiceException( - response: HttpResponse, - operationId: String - ): Unit = throw ErrorObjectMapper.process(response, operationId) - - private suspend inline fun executeHttpRequest(operation: Operation): HttpResponse = - httpClient.request { - method = HttpMethod.parse(operation.method) - url(operation.url) - - operation.params?.getHeaders()?.let { - headers.appendAll(it) - } - - operation.params?.getQueryParams()?.let { - url.parameters.appendAll(it) - } - - val extraHeaders = - buildMap { - put("key", configurationProvider.key ?: "") - } - - appendHeaders(extraHeaders) - contentType(ContentType.Application.Json) - setBody(operation.requestBody) - } - - private inline fun executeWithEmptyResponse(operation: Operation): EmptyResponse { - try { - return executeAsyncWithEmptyResponse(operation).get() - } catch (exception: Exception) { - exception.handle() - } - } - - private inline fun executeAsyncWithEmptyResponse(operation: Operation): CompletableFuture = - GlobalScope.future(Dispatchers.IO) { - try { - val response = executeHttpRequest(operation) - throwIfError(response, operation.operationId) - EmptyResponse(response.status.value, response.headers.entries()) - } catch (exception: Exception) { - exception.handle() - } - } - - private inline fun execute(operation: Operation): Response { - try { - return executeAsync(operation).get() - } catch (exception: Exception) { - exception.handle() - } - } - - private inline fun executeAsync(operation: Operation): CompletableFuture> = - GlobalScope.future(Dispatchers.IO) { - try { - val response = executeHttpRequest(operation) - throwIfError(response, operation.operationId) - Response(response.status.value, response.body(), response.headers.entries()) - } catch (exception: Exception) { - exception.handle() - } - } - - /** - * - * 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 = execute(operation) - - /** - * - * The Activity Details API provides detailed information about one selected activity. - * @param operation [GetActivityDetailsOperation] - * @throws ExpediaGroupApiActivitiesErrorsException - * @throws ExpediaGroupApiAPIMErrorException - * @throws ExpediaGroupApiException - * @return a [CompletableFuture] object with a body of type ActivityDetailsResponse - */ - fun executeAsync(operation: GetActivityDetailsOperation): CompletableFuture> = executeAsync(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 = execute(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] object with a body of type ActivityListingsResponse - */ - fun executeAsync(operation: GetActivityListingsOperation): CompletableFuture> = executeAsync(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. - * @param operation [GetCarDetailsOperation] - * @throws ExpediaGroupApiCarsErrorsException - * @throws ExpediaGroupApiAPIMErrorException - * @throws ExpediaGroupApiException - * @return a [Response] object with a body of type CarDetailsResponse - */ - fun execute(operation: GetCarDetailsOperation): Response = execute(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. - * @param operation [GetCarDetailsOperation] - * @throws ExpediaGroupApiCarsErrorsException - * @throws ExpediaGroupApiAPIMErrorException - * @throws ExpediaGroupApiException - * @return a [CompletableFuture] object with a body of type CarDetailsResponse - */ - fun executeAsync(operation: GetCarDetailsOperation): CompletableFuture> = executeAsync(operation) - - /** - * Search Expedia car inventory - * Search Expedia car inventory by date, pickup, and dropoff location to return a listing of available cars for hire. - * @param operation [GetCarsListingsOperation] - * @throws ExpediaGroupApiCarsErrorsException - * @throws ExpediaGroupApiAPIMErrorException - * @throws ExpediaGroupApiException - * @return a [Response] object with a body of type CarListingsResponse - */ - fun execute(operation: GetCarsListingsOperation): Response = execute(operation) - - /** - * Search Expedia car inventory - * Search Expedia car inventory by date, pickup, and dropoff location to return a listing of available cars for hire. - * @param operation [GetCarsListingsOperation] - * @throws ExpediaGroupApiCarsErrorsException - * @throws ExpediaGroupApiAPIMErrorException - * @throws ExpediaGroupApiException - * @return a [CompletableFuture] object with a body of type CarListingsResponse - */ - fun executeAsync(operation: GetCarsListingsOperation): CompletableFuture> = executeAsync(operation) - - /** - * - * Get the Download URL and other details of the static files. - * @param operation [GetFeedDownloadUrlOperation] - * @throws ExpediaGroupApiPresignedUrlResponseException - * @throws ExpediaGroupApiSdpAPIMErrorException - * @return a [Response] object with a body of type PresignedUrlResponse - */ - fun execute(operation: GetFeedDownloadUrlOperation): Response = execute(operation) - - /** - * - * Get the Download URL and other details of the static files. - * @param operation [GetFeedDownloadUrlOperation] - * @throws ExpediaGroupApiPresignedUrlResponseException - * @throws ExpediaGroupApiSdpAPIMErrorException - * @return a [CompletableFuture] object with a body of type PresignedUrlResponse - */ - fun executeAsync(operation: GetFeedDownloadUrlOperation): CompletableFuture> = executeAsync(operation) - - /** - * Get availability calendars of properties - * Returns the availability of each day for a range of dates for given Expedia lodging properties. - * @param operation [GetLodgingAvailabilityCalendarsOperation] - * @throws ExpediaGroupApiLodgingErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [Response] object with a body of type AvailabilityCalendarResponse - */ - fun execute(operation: GetLodgingAvailabilityCalendarsOperation): Response = execute(operation) - - /** - * Get availability calendars of properties - * Returns the availability of each day for a range of dates for given Expedia lodging properties. - * @param operation [GetLodgingAvailabilityCalendarsOperation] - * @throws ExpediaGroupApiLodgingErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [CompletableFuture] object with a body of type AvailabilityCalendarResponse - */ - fun executeAsync(operation: GetLodgingAvailabilityCalendarsOperation): CompletableFuture> = executeAsync(operation) - - /** - * Get Extended information with a single property offer - * Extended information about the rate, charges, fees, and financial terms associated with booking a single lodging rate plan offer. - * @param operation [GetLodgingDetailsOperation] - * @throws ExpediaGroupApiErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [Response] object with a body of type HotelDetailsResponse - */ - fun execute(operation: GetLodgingDetailsOperation): Response = execute(operation) - - /** - * Get Extended information with a single property offer - * Extended information about the rate, charges, fees, and financial terms associated with booking a single lodging rate plan offer. - * @param operation [GetLodgingDetailsOperation] - * @throws ExpediaGroupApiErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [CompletableFuture] object with a body of type HotelDetailsResponse - */ - fun executeAsync(operation: GetLodgingDetailsOperation): CompletableFuture> = executeAsync(operation) - - /** - * Search lodging inventory - * Search Expedia lodging inventory by Location Keyword, Region ID, Lat/Long, or Hotel ID(s) and return up to 1,000 offers in response. Provides deeplink to Expedia site to book, or rate plan info to enable API booking. - * @param operation [GetLodgingListingsOperation] - * @throws ExpediaGroupApiErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [Response] object with a body of type HotelListingsResponse - */ - fun execute(operation: GetLodgingListingsOperation): Response = execute(operation) - - /** - * Search lodging inventory - * Search Expedia lodging inventory by Location Keyword, Region ID, Lat/Long, or Hotel ID(s) and return up to 1,000 offers in response. Provides deeplink to Expedia site to book, or rate plan info to enable API booking. - * @param operation [GetLodgingListingsOperation] - * @throws ExpediaGroupApiErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [CompletableFuture] object with a body of type HotelListingsResponse - */ - fun executeAsync(operation: GetLodgingListingsOperation): CompletableFuture> = executeAsync(operation) - - /** - * Get properties price and availability information - * The Lodging Quotes API will return the price and availability information for given Expedia lodging property ID(s). - * @param operation [GetLodgingQuotesOperation] - * @throws ExpediaGroupApiLodgingErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [Response] object with a body of type LodgingQuotesResponse - */ - fun execute(operation: GetLodgingQuotesOperation): Response = execute(operation) - - /** - * Get properties price and availability information - * The Lodging Quotes API will return the price and availability information for given Expedia lodging property ID(s). - * @param operation [GetLodgingQuotesOperation] - * @throws ExpediaGroupApiLodgingErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [CompletableFuture] object with a body of type LodgingQuotesResponse - */ - fun executeAsync(operation: GetLodgingQuotesOperation): CompletableFuture> = executeAsync(operation) - - /** - * Get rate calendar of a property - * The Rate Calendar API will return the lowest rate plan for a range of days for one selected Expedia lodging property. - * @param operation [GetLodgingRateCalendarOperation] - * @throws ExpediaGroupApiErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [Response] object with a body of type RateCalendarResponse - */ - fun execute(operation: GetLodgingRateCalendarOperation): Response = execute(operation) - - /** - * Get rate calendar of a property - * The Rate Calendar API will return the lowest rate plan for a range of days for one selected Expedia lodging property. - * @param operation [GetLodgingRateCalendarOperation] - * @throws ExpediaGroupApiErrorsException - * @throws ExpediaGroupApiAPIGatewayErrorException - * @return a [CompletableFuture] object with a body of type RateCalendarResponse - */ - fun executeAsync(operation: GetLodgingRateCalendarOperation): CompletableFuture> = executeAsync(operation) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/infrastructure/ApiAbstractions.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ae25a7478..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = - when (collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" - } - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue( - items: Array, - collectionFormat: String, - map: (item: T) -> String = defaultMultiValueConverter -) = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue( - items: Iterable, - collectionFormat: String, - map: (item: T) -> String = defaultMultiValueConverter -): List = - when (collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInnerAllOf.kt deleted file mode 100644 index 693532359..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param adults Specifies the number of adults staying in each room. - * @param childAges Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. - */ -data class HotelDetailsResponseOccupantsInnerAllOf( - // Specifies the number of adults staying in each room. - @JsonProperty("Adults") - @field:Valid - val adults: kotlin.Any? = null, - // Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. - @JsonProperty("ChildAges") - @field:Valid - val childAges: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var adults: kotlin.Any? = null, - private var childAges: kotlin.Any? = null - ) { - fun adults(adults: kotlin.Any?) = apply { this.adults = adults } - - fun childAges(childAges: kotlin.Any?) = apply { this.childAges = childAges } - - fun build(): HotelDetailsResponseOccupantsInnerAllOf { - val instance = - HotelDetailsResponseOccupantsInnerAllOf( - adults = adults, - childAges = childAges - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelDetailsResponseOccupantsInnerAllOf) { - 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( - adults = adults, - childAges = childAges - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDatesAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDatesAllOf.kt deleted file mode 100644 index e259006c3..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDatesAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param checkInDate Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - * @param checkOutDate Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - */ -data class HotelDetailsResponseStayDatesAllOf( - // Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - @JsonProperty("CheckInDate") - @field:Valid - val checkInDate: kotlin.Any? = null, - // Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - @JsonProperty("CheckOutDate") - @field:Valid - val checkOutDate: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var checkInDate: kotlin.Any? = null, - private var checkOutDate: kotlin.Any? = null - ) { - fun checkInDate(checkInDate: kotlin.Any?) = apply { this.checkInDate = checkInDate } - - fun checkOutDate(checkOutDate: kotlin.Any?) = apply { this.checkOutDate = checkOutDate } - - fun build(): HotelDetailsResponseStayDatesAllOf { - val instance = - HotelDetailsResponseStayDatesAllOf( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelDetailsResponseStayDatesAllOf) { - 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( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInnerAllOf.kt deleted file mode 100644 index b26f37431..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInnerAllOf.kt +++ /dev/null @@ -1,123 +0,0 @@ -/* - * 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 - -/** - * - * @param code The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. - * @param originalPrice The original price from the Lodging Search API response. - * @param newPrice The new price. - * @param changedAmount The difference between `OriginalPrice` and `NewPrice`. - */ -data class HotelDetailsResponseWarningsInnerAllOf( - // The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. - @JsonProperty("Code") - @field:Valid - val code: kotlin.Any? = null, - // The original price from the Lodging Search API response. - @JsonProperty("OriginalPrice") - @field:Valid - val originalPrice: kotlin.Any? = null, - // The new price. - @JsonProperty("NewPrice") - @field:Valid - val newPrice: kotlin.Any? = null, - // The difference between `OriginalPrice` and `NewPrice`. - @JsonProperty("ChangedAmount") - @field:Valid - val changedAmount: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var code: kotlin.Any? = null, - private var originalPrice: kotlin.Any? = null, - private var newPrice: kotlin.Any? = null, - private var changedAmount: kotlin.Any? = null - ) { - fun code(code: kotlin.Any?) = apply { this.code = code } - - fun originalPrice(originalPrice: kotlin.Any?) = apply { this.originalPrice = originalPrice } - - fun newPrice(newPrice: kotlin.Any?) = apply { this.newPrice = newPrice } - - fun changedAmount(changedAmount: kotlin.Any?) = apply { this.changedAmount = changedAmount } - - fun build(): HotelDetailsResponseWarningsInnerAllOf { - val instance = - HotelDetailsResponseWarningsInnerAllOf( - code = code, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelDetailsResponseWarningsInnerAllOf) { - 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( - code = code, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInnerAllOf.kt deleted file mode 100644 index bccedad58..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param id The identification number for a hotel amenity. - * @param name The description of a hotel amenity. - */ -data class HotelHotelAmenitiesInnerAllOf( - // The identification number for a hotel amenity. - @JsonProperty("Id") - @field:Valid - val id: kotlin.Any? = null, - // The description of a hotel amenity. - @JsonProperty("Name") - @field:Valid - val name: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - - fun name(name: kotlin.Any?) = apply { this.name = name } - - fun build(): HotelHotelAmenitiesInnerAllOf { - val instance = - HotelHotelAmenitiesInnerAllOf( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelHotelAmenitiesInnerAllOf) { - 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( - id = id, - name = name - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInnerAllOf.kt deleted file mode 100644 index 692b6c972..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param id The identification number for a room amenity. - * @param name The description of a room amenity. - */ -data class HotelRoomAmenitiesInnerAllOf( - // The identification number for a room amenity. - @JsonProperty("Id") - @field:Valid - val id: kotlin.Any? = null, - // The description of a room amenity. - @JsonProperty("Name") - @field:Valid - val name: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - - fun name(name: kotlin.Any?) = apply { this.name = name } - - fun build(): HotelRoomAmenitiesInnerAllOf { - val instance = - HotelRoomAmenitiesInnerAllOf( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelRoomAmenitiesInnerAllOf) { - 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( - id = id, - name = name - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocationAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocationAllOf.kt deleted file mode 100644 index 08d0f20bb..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocationAllOf.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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 - -/** - * - * @param latitude The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. - * @param longitude The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. - * @param obfuscated Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. - */ -data class LocationGeoLocationAllOf( - // The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. - @JsonProperty("Latitude") - @field:Valid - val latitude: kotlin.String? = null, - // The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. - @JsonProperty("Longitude") - @field:Valid - val longitude: kotlin.String? = null, - // Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. - @JsonProperty("Obfuscated") - @field:Valid - val obfuscated: kotlin.Boolean? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } - - fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } - - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } - - fun build(): LocationGeoLocationAllOf { - val instance = - LocationGeoLocationAllOf( - latitude = latitude, - longitude = longitude, - obfuscated = obfuscated - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LocationGeoLocationAllOf) { - 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( - latitude = latitude, - longitude = longitude, - obfuscated = obfuscated - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt deleted file mode 100644 index 091372351..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt +++ /dev/null @@ -1,163 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.LodgingRoomTypePriceAvgNightlyRate -import com.expediagroup.sdk.xap.models.LodgingRoomTypePriceAvgNightlyRateWithFees -import com.expediagroup.sdk.xap.models.LodgingRoomTypePriceBaseRate -import com.expediagroup.sdk.xap.models.LodgingRoomTypePricePropertyMandatoryFees -import com.expediagroup.sdk.xap.models.LodgingRoomTypePriceRefundableDamageDeposit -import com.expediagroup.sdk.xap.models.LodgingRoomTypePriceTaxesAndFees -import com.expediagroup.sdk.xap.models.LodgingRoomTypePriceTotalPrice -import com.expediagroup.sdk.xap.models.LodgingRoomTypePriceTotalPriceWithPropertyFees -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * Container for Price information. - * @param baseRate - * @param taxesAndFees - * @param totalPrice - * @param avgNightlyRate - * @param avgNightlyRateWithFees - * @param propertyMandatoryFees - * @param totalPriceWithPropertyFees - * @param refundableDamageDeposit - */ -data class LodgingRoomTypePrice( - @JsonProperty("BaseRate") - @field:Valid - val baseRate: LodgingRoomTypePriceBaseRate? = null, - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: LodgingRoomTypePriceTaxesAndFees? = null, - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: LodgingRoomTypePriceTotalPrice? = null, - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: LodgingRoomTypePriceAvgNightlyRate? = null, - @JsonProperty("AvgNightlyRateWithFees") - @field:Valid - val avgNightlyRateWithFees: LodgingRoomTypePriceAvgNightlyRateWithFees? = null, - @JsonProperty("PropertyMandatoryFees") - @field:Valid - val propertyMandatoryFees: LodgingRoomTypePricePropertyMandatoryFees? = null, - @JsonProperty("TotalPriceWithPropertyFees") - @field:Valid - val totalPriceWithPropertyFees: LodgingRoomTypePriceTotalPriceWithPropertyFees? = null, - @JsonProperty("RefundableDamageDeposit") - @field:Valid - val refundableDamageDeposit: LodgingRoomTypePriceRefundableDamageDeposit? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var baseRate: LodgingRoomTypePriceBaseRate? = null, - private var taxesAndFees: LodgingRoomTypePriceTaxesAndFees? = null, - private var totalPrice: LodgingRoomTypePriceTotalPrice? = null, - private var avgNightlyRate: LodgingRoomTypePriceAvgNightlyRate? = null, - private var avgNightlyRateWithFees: LodgingRoomTypePriceAvgNightlyRateWithFees? = null, - private var propertyMandatoryFees: LodgingRoomTypePricePropertyMandatoryFees? = null, - private var totalPriceWithPropertyFees: LodgingRoomTypePriceTotalPriceWithPropertyFees? = null, - private var refundableDamageDeposit: LodgingRoomTypePriceRefundableDamageDeposit? = null - ) { - fun baseRate(baseRate: LodgingRoomTypePriceBaseRate?) = apply { this.baseRate = baseRate } - - fun taxesAndFees(taxesAndFees: LodgingRoomTypePriceTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } - - fun totalPrice(totalPrice: LodgingRoomTypePriceTotalPrice?) = apply { this.totalPrice = totalPrice } - - fun avgNightlyRate(avgNightlyRate: LodgingRoomTypePriceAvgNightlyRate?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyRateWithFees(avgNightlyRateWithFees: LodgingRoomTypePriceAvgNightlyRateWithFees?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } - - fun propertyMandatoryFees(propertyMandatoryFees: LodgingRoomTypePricePropertyMandatoryFees?) = apply { this.propertyMandatoryFees = propertyMandatoryFees } - - fun totalPriceWithPropertyFees(totalPriceWithPropertyFees: LodgingRoomTypePriceTotalPriceWithPropertyFees?) = apply { this.totalPriceWithPropertyFees = totalPriceWithPropertyFees } - - fun refundableDamageDeposit(refundableDamageDeposit: LodgingRoomTypePriceRefundableDamageDeposit?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - - fun build(): LodgingRoomTypePrice { - val instance = - LodgingRoomTypePrice( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyRateWithFees = avgNightlyRateWithFees, - propertyMandatoryFees = propertyMandatoryFees, - totalPriceWithPropertyFees = totalPriceWithPropertyFees, - refundableDamageDeposit = refundableDamageDeposit - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePrice) { - 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( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyRateWithFees = avgNightlyRateWithFees, - propertyMandatoryFees = propertyMandatoryFees, - totalPriceWithPropertyFees = totalPriceWithPropertyFees, - refundableDamageDeposit = refundableDamageDeposit - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceAvgNightlyRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceAvgNightlyRate.kt deleted file mode 100644 index 30334c5f6..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceAvgNightlyRate.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ -data class LodgingRoomTypePriceAvgNightlyRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingRoomTypePriceAvgNightlyRate { - val instance = - LodgingRoomTypePriceAvgNightlyRate( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePriceAvgNightlyRate) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceAvgNightlyRateWithFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceAvgNightlyRateWithFees.kt deleted file mode 100644 index 0300b78dc..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceAvgNightlyRateWithFees.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ -data class LodgingRoomTypePriceAvgNightlyRateWithFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingRoomTypePriceAvgNightlyRateWithFees { - val instance = - LodgingRoomTypePriceAvgNightlyRateWithFees( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePriceAvgNightlyRateWithFees) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceBaseRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceBaseRate.kt deleted file mode 100644 index f89218067..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceBaseRate.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * The price of the rate plan for all occupants, excluding taxes and fees. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ -data class LodgingRoomTypePriceBaseRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingRoomTypePriceBaseRate { - val instance = - LodgingRoomTypePriceBaseRate( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePriceBaseRate) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePricePropertyMandatoryFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePricePropertyMandatoryFees.kt deleted file mode 100644 index df2af69c1..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePricePropertyMandatoryFees.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * The total mandatory fees which will be charged at the property for the rate plan. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ -data class LodgingRoomTypePricePropertyMandatoryFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingRoomTypePricePropertyMandatoryFees { - val instance = - LodgingRoomTypePricePropertyMandatoryFees( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePricePropertyMandatoryFees) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceRefundableDamageDeposit.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceRefundableDamageDeposit.kt deleted file mode 100644 index 807018ac4..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceRefundableDamageDeposit.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * The refundable damage deposit. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ -data class LodgingRoomTypePriceRefundableDamageDeposit( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingRoomTypePriceRefundableDamageDeposit { - val instance = - LodgingRoomTypePriceRefundableDamageDeposit( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePriceRefundableDamageDeposit) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTaxesAndFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTaxesAndFees.kt deleted file mode 100644 index 33e0db2f6..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTaxesAndFees.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * The total amount of taxes and fees of the rate plan for all occupants. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ -data class LodgingRoomTypePriceTaxesAndFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingRoomTypePriceTaxesAndFees { - val instance = - LodgingRoomTypePriceTaxesAndFees( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePriceTaxesAndFees) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTotalPrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTotalPrice.kt deleted file mode 100644 index 63812c3e4..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTotalPrice.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ -data class LodgingRoomTypePriceTotalPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingRoomTypePriceTotalPrice { - val instance = - LodgingRoomTypePriceTotalPrice( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePriceTotalPrice) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTotalPriceWithPropertyFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTotalPriceWithPropertyFees.kt deleted file mode 100644 index 456c5aefb..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePriceTotalPriceWithPropertyFees.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ -data class LodgingRoomTypePriceTotalPriceWithPropertyFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingRoomTypePriceTotalPriceWithPropertyFees { - val instance = - LodgingRoomTypePriceTotalPriceWithPropertyFees( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePriceTotalPriceWithPropertyFees) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPriceAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPriceAllOf.kt deleted file mode 100644 index 4dbbf2fb6..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPriceAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param `value` The total price of the corresponding date. - * @param currency The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. - */ -data class RateCalendarPriceAllOf( - // The total price of the corresponding date. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.Any? = null, - // The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.Any? = null, - private var currency: kotlin.Any? = null - ) { - fun `value`(`value`: kotlin.Any?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.Any?) = apply { this.currency = currency } - - fun build(): RateCalendarPriceAllOf { - val instance = - RateCalendarPriceAllOf( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RateCalendarPriceAllOf) { - 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( - `value` = `value`, - currency = currency - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInnerAllOf.kt deleted file mode 100644 index eb8caff62..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param id Amenity ID. - * @param name Amenity Name. - */ -data class RatePlanAmenitiesInnerAllOf( - // Amenity ID. - @JsonProperty("Id") - @field:Valid - val id: kotlin.Any? = null, - // Amenity Name. - @JsonProperty("Name") - @field:Valid - val name: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - - fun name(name: kotlin.Any?) = apply { this.name = name } - - fun build(): RatePlanAmenitiesInnerAllOf { - val instance = - RatePlanAmenitiesInnerAllOf( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanAmenitiesInnerAllOf) { - 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( - id = id, - name = name - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceAvgNightlyRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceAvgNightlyRate.kt deleted file mode 100644 index 0b1c4f127..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceAvgNightlyRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanPriceAvgNightlyRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanPriceAvgNightlyRate { - val instance = - RatePlanPriceAvgNightlyRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceAvgNightlyRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceAvgNightlyStrikeOutRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceAvgNightlyStrikeOutRate.kt deleted file mode 100644 index 6b948ad35..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceAvgNightlyStrikeOutRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanPriceAvgNightlyStrikeOutRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanPriceAvgNightlyStrikeOutRate { - val instance = - RatePlanPriceAvgNightlyStrikeOutRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceAvgNightlyStrikeOutRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceBaseRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceBaseRate.kt deleted file mode 100644 index 845f676bf..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceBaseRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The price of the rate plan for all occupants, excluding taxes and fees. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanPriceBaseRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanPriceBaseRate { - val instance = - RatePlanPriceBaseRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceBaseRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceHotelMandatoryFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceHotelMandatoryFees.kt deleted file mode 100644 index be55341fb..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceHotelMandatoryFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total mandatory fees which will be charged at the hotel for the rate plan. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanPriceHotelMandatoryFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanPriceHotelMandatoryFees { - val instance = - RatePlanPriceHotelMandatoryFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceHotelMandatoryFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInnerAllOf.kt deleted file mode 100644 index a20247e9a..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param stayDate A single night during the requested stay. - * @param baseRate Container for nightly base rate. - */ -data class RatePlanPriceNightlyRatesInnerAllOf( - // A single night during the requested stay. - @JsonProperty("StayDate") - @field:Valid - val stayDate: kotlin.Any? = null, - // Container for nightly base rate. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var stayDate: kotlin.Any? = null, - private var baseRate: kotlin.Any? = null - ) { - fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } - - fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } - - fun build(): RatePlanPriceNightlyRatesInnerAllOf { - val instance = - RatePlanPriceNightlyRatesInnerAllOf( - stayDate = stayDate, - baseRate = baseRate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceNightlyRatesInnerAllOf) { - 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( - stayDate = stayDate, - baseRate = baseRate - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceRefundableDamageDeposit.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceRefundableDamageDeposit.kt deleted file mode 100644 index c64b17ba3..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceRefundableDamageDeposit.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The refundable damage deposit. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanPriceRefundableDamageDeposit( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanPriceRefundableDamageDeposit { - val instance = - RatePlanPriceRefundableDamageDeposit( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceRefundableDamageDeposit) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceRoomRatesInner.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceRoomRatesInner.kt deleted file mode 100644 index 58f63dc10..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceRoomRatesInner.kt +++ /dev/null @@ -1,165 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.MandatoryFeesDetail -import com.expediagroup.sdk.xap.models.RoomRatesBaseRate -import com.expediagroup.sdk.xap.models.RoomRatesNightlyRatesInner -import com.expediagroup.sdk.xap.models.RoomRatesTaxesAndFees -import com.expediagroup.sdk.xap.models.RoomRatesTaxesAndFeesDetailsInner -import com.expediagroup.sdk.xap.models.RoomRatesTotalPrice -import com.expediagroup.sdk.xap.models.RoomRatesTotalStrikeOutPrice -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * - * @param roomIndex Index of which of the requested rooms this entry refers to. - * @param baseRate - * @param taxesAndFees - * @param totalPrice - * @param totalStrikeOutPrice - * @param taxesAndFeesDetails The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param mandatoryFeesDetails The breakdown for the taxes and fees that must be paid at the property. - * @param nightlyRates Container for the nightly rate of current room. - */ -data class RatePlanPriceRoomRatesInner( - // Index of which of the requested rooms this entry refers to. - @JsonProperty("RoomIndex") - val roomIndex: kotlin.Int? = null, - @JsonProperty("BaseRate") - @field:Valid - val baseRate: RoomRatesBaseRate? = null, - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: RoomRatesTaxesAndFees? = null, - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: RoomRatesTotalPrice? = null, - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, - // The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - @JsonProperty("TaxesAndFeesDetails") - @field:Valid - val taxesAndFeesDetails: kotlin.collections.List? = null, - // The breakdown for the taxes and fees that must be paid at the property. - @JsonProperty("MandatoryFeesDetails") - @field:Valid - val mandatoryFeesDetails: kotlin.collections.List? = null, - // Container for the nightly rate of current room. - @JsonProperty("NightlyRates") - @field:Valid - val nightlyRates: kotlin.collections.List? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var roomIndex: kotlin.Int? = null, - private var baseRate: RoomRatesBaseRate? = null, - private var taxesAndFees: RoomRatesTaxesAndFees? = null, - private var totalPrice: RoomRatesTotalPrice? = null, - private var totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, - private var taxesAndFeesDetails: kotlin.collections.List? = null, - private var mandatoryFeesDetails: kotlin.collections.List? = null, - private var nightlyRates: kotlin.collections.List? = null - ) { - fun roomIndex(roomIndex: kotlin.Int?) = apply { this.roomIndex = roomIndex } - - fun baseRate(baseRate: RoomRatesBaseRate?) = apply { this.baseRate = baseRate } - - fun taxesAndFees(taxesAndFees: RoomRatesTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } - - fun totalPrice(totalPrice: RoomRatesTotalPrice?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - - fun mandatoryFeesDetails(mandatoryFeesDetails: kotlin.collections.List?) = apply { this.mandatoryFeesDetails = mandatoryFeesDetails } - - fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } - - fun build(): RatePlanPriceRoomRatesInner { - val instance = - RatePlanPriceRoomRatesInner( - roomIndex = roomIndex, - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - taxesAndFeesDetails = taxesAndFeesDetails, - mandatoryFeesDetails = mandatoryFeesDetails, - nightlyRates = nightlyRates - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceRoomRatesInner) { - 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( - roomIndex = roomIndex, - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - taxesAndFeesDetails = taxesAndFeesDetails, - mandatoryFeesDetails = mandatoryFeesDetails, - nightlyRates = nightlyRates - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFees.kt deleted file mode 100644 index abe8bca24..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total rate of taxes and fees of the rate plan for all occupants. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanPriceTaxesAndFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanPriceTaxesAndFees { - val instance = - RatePlanPriceTaxesAndFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceTaxesAndFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInnerAllOf.kt deleted file mode 100644 index e64d779c9..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param categoryCode Category ID of this specific tax or fee. - * @param amount The value of this specific tax or fee. - */ -data class RatePlanPriceTaxesAndFeesDetailsInnerAllOf( - // Category ID of this specific tax or fee. - @JsonProperty("CategoryCode") - @field:Valid - val categoryCode: kotlin.Any? = null, - // The value of this specific tax or fee. - @JsonProperty("Amount") - @field:Valid - val amount: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var categoryCode: kotlin.Any? = null, - private var amount: kotlin.Any? = null - ) { - fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } - - fun amount(amount: kotlin.Any?) = apply { this.amount = amount } - - fun build(): RatePlanPriceTaxesAndFeesDetailsInnerAllOf { - val instance = - RatePlanPriceTaxesAndFeesDetailsInnerAllOf( - categoryCode = categoryCode, - amount = amount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceTaxesAndFeesDetailsInnerAllOf) { - 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( - categoryCode = categoryCode, - amount = amount - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTotalPrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTotalPrice.kt deleted file mode 100644 index f9a09b8e9..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTotalPrice.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanPriceTotalPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanPriceTotalPrice { - val instance = - RatePlanPriceTotalPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceTotalPrice) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTotalStrikeOutPrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTotalStrikeOutPrice.kt deleted file mode 100644 index 6ca234123..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTotalStrikeOutPrice.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanPriceTotalStrikeOutPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanPriceTotalStrikeOutPrice { - val instance = - RatePlanPriceTotalStrikeOutPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceTotalStrikeOutPrice) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt deleted file mode 100644 index f4a1ec8d7..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.RatePlanStandalonePriceAvgNightlyRate -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceAvgNightlyStrikeOutRate -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceBaseRate -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceHotelMandatoryFees -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceStrikeOutBaseRate -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceStrikeOutHotelMandatoryFees -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceStrikeOutTaxesAndFees -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceTaxesAndFees -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceTotalPrice -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceTotalStrikeOutPrice -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when the returned `rateplan` is being used as part of a package. - * @param baseRate - * @param strikeOutBaseRate - * @param taxesAndFees - * @param strikeOutTaxesAndFees - * @param totalPrice - * @param totalStrikeOutPrice - * @param avgNightlyRate - * @param avgNightlyStrikeOutRate - * @param hotelMandatoryFees - * @param strikeOutHotelMandatoryFees - */ -data class RatePlanStandalonePrice( - @JsonProperty("BaseRate") - @field:Valid - val baseRate: RatePlanStandalonePriceBaseRate? = null, - @JsonProperty("StrikeOutBaseRate") - @field:Valid - val strikeOutBaseRate: RatePlanStandalonePriceStrikeOutBaseRate? = null, - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: RatePlanStandalonePriceTaxesAndFees? = null, - @JsonProperty("StrikeOutTaxesAndFees") - @field:Valid - val strikeOutTaxesAndFees: RatePlanStandalonePriceStrikeOutTaxesAndFees? = null, - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: RatePlanStandalonePriceTotalPrice? = null, - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: RatePlanStandalonePriceTotalStrikeOutPrice? = null, - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate? = null, - @JsonProperty("AvgNightlyStrikeOutRate") - @field:Valid - val avgNightlyStrikeOutRate: RatePlanStandalonePriceAvgNightlyStrikeOutRate? = null, - @JsonProperty("HotelMandatoryFees") - @field:Valid - val hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees? = null, - @JsonProperty("StrikeOutHotelMandatoryFees") - @field:Valid - val strikeOutHotelMandatoryFees: RatePlanStandalonePriceStrikeOutHotelMandatoryFees? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var baseRate: RatePlanStandalonePriceBaseRate? = null, - private var strikeOutBaseRate: RatePlanStandalonePriceStrikeOutBaseRate? = null, - private var taxesAndFees: RatePlanStandalonePriceTaxesAndFees? = null, - private var strikeOutTaxesAndFees: RatePlanStandalonePriceStrikeOutTaxesAndFees? = null, - private var totalPrice: RatePlanStandalonePriceTotalPrice? = null, - private var totalStrikeOutPrice: RatePlanStandalonePriceTotalStrikeOutPrice? = null, - private var avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate? = null, - private var avgNightlyStrikeOutRate: RatePlanStandalonePriceAvgNightlyStrikeOutRate? = null, - private var hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees? = null, - private var strikeOutHotelMandatoryFees: RatePlanStandalonePriceStrikeOutHotelMandatoryFees? = null - ) { - fun baseRate(baseRate: RatePlanStandalonePriceBaseRate?) = apply { this.baseRate = baseRate } - - fun strikeOutBaseRate(strikeOutBaseRate: RatePlanStandalonePriceStrikeOutBaseRate?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } - - fun taxesAndFees(taxesAndFees: RatePlanStandalonePriceTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } - - fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: RatePlanStandalonePriceStrikeOutTaxesAndFees?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } - - fun totalPrice(totalPrice: RatePlanStandalonePriceTotalPrice?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: RatePlanStandalonePriceTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun avgNightlyRate(avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: RatePlanStandalonePriceAvgNightlyStrikeOutRate?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - - fun hotelMandatoryFees(hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - - fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: RatePlanStandalonePriceStrikeOutHotelMandatoryFees?) = - apply { - this.strikeOutHotelMandatoryFees = - strikeOutHotelMandatoryFees - } - - fun build(): RatePlanStandalonePrice { - val instance = - RatePlanStandalonePrice( - baseRate = baseRate, - strikeOutBaseRate = strikeOutBaseRate, - taxesAndFees = taxesAndFees, - strikeOutTaxesAndFees = strikeOutTaxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePrice) { - 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( - baseRate = baseRate, - strikeOutBaseRate = strikeOutBaseRate, - taxesAndFees = taxesAndFees, - strikeOutTaxesAndFees = strikeOutTaxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceAvgNightlyRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceAvgNightlyRate.kt deleted file mode 100644 index f420ce0d1..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceAvgNightlyRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceAvgNightlyRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceAvgNightlyRate { - val instance = - RatePlanStandalonePriceAvgNightlyRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceAvgNightlyRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceAvgNightlyStrikeOutRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceAvgNightlyStrikeOutRate.kt deleted file mode 100644 index 61d776320..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceAvgNightlyStrikeOutRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceAvgNightlyStrikeOutRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceAvgNightlyStrikeOutRate { - val instance = - RatePlanStandalonePriceAvgNightlyStrikeOutRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceAvgNightlyStrikeOutRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceBaseRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceBaseRate.kt deleted file mode 100644 index 731322a14..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceBaseRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The standalone price of the rate plan for all occupants, excluding taxes and fees. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceBaseRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceBaseRate { - val instance = - RatePlanStandalonePriceBaseRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceBaseRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceHotelMandatoryFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceHotelMandatoryFees.kt deleted file mode 100644 index fca3776fc..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceHotelMandatoryFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total standalone mandatory fees. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceHotelMandatoryFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceHotelMandatoryFees { - val instance = - RatePlanStandalonePriceHotelMandatoryFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceHotelMandatoryFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutBaseRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutBaseRate.kt deleted file mode 100644 index 074cbd2e0..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutBaseRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The base rate strikeout in the standalone shopping path. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceStrikeOutBaseRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceStrikeOutBaseRate { - val instance = - RatePlanStandalonePriceStrikeOutBaseRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceStrikeOutBaseRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutHotelMandatoryFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutHotelMandatoryFees.kt deleted file mode 100644 index a2d729701..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutHotelMandatoryFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The strikeout of the mandatory fees in the standalone shopping path. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceStrikeOutHotelMandatoryFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceStrikeOutHotelMandatoryFees { - val instance = - RatePlanStandalonePriceStrikeOutHotelMandatoryFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceStrikeOutHotelMandatoryFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutTaxesAndFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutTaxesAndFees.kt deleted file mode 100644 index 51fee932a..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceStrikeOutTaxesAndFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The taxes and fees strikeout in the standalone shopping path. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceStrikeOutTaxesAndFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceStrikeOutTaxesAndFees { - val instance = - RatePlanStandalonePriceStrikeOutTaxesAndFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceStrikeOutTaxesAndFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTaxesAndFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTaxesAndFees.kt deleted file mode 100644 index 61764d1e2..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTaxesAndFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total standalone rate of taxes and fees of the rate plan for all occupants. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceTaxesAndFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceTaxesAndFees { - val instance = - RatePlanStandalonePriceTaxesAndFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceTaxesAndFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTotalPrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTotalPrice.kt deleted file mode 100644 index da20178e9..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTotalPrice.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceTotalPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceTotalPrice { - val instance = - RatePlanStandalonePriceTotalPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceTotalPrice) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTotalStrikeOutPrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTotalStrikeOutPrice.kt deleted file mode 100644 index 953de54d9..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePriceTotalStrikeOutPrice.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RatePlanStandalonePriceTotalStrikeOutPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RatePlanStandalonePriceTotalStrikeOutPrice { - val instance = - RatePlanStandalonePriceTotalStrikeOutPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePriceTotalStrikeOutPrice) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInnerAllOf.kt deleted file mode 100644 index 2120e407b..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param stayDate One date of the property stay - * @param baseRate Nightly Base Rate for the selected date of stay. - */ -data class RoomRatesNightlyRatesInnerAllOf( - // One date of the property stay - @JsonProperty("StayDate") - @field:Valid - val stayDate: kotlin.Any? = null, - // Nightly Base Rate for the selected date of stay. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var stayDate: kotlin.Any? = null, - private var baseRate: kotlin.Any? = null - ) { - fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } - - fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } - - fun build(): RoomRatesNightlyRatesInnerAllOf { - val instance = - RoomRatesNightlyRatesInnerAllOf( - stayDate = stayDate, - baseRate = baseRate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRatesNightlyRatesInnerAllOf) { - 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( - stayDate = stayDate, - baseRate = baseRate - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInnerAllOf.kt deleted file mode 100644 index ad1bc49e8..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param categoryCode Tax or fee category code. - * @param amount Tax or fee value. - */ -data class RoomRatesTaxesAndFeesDetailsInnerAllOf( - // Tax or fee category code. - @JsonProperty("CategoryCode") - @field:Valid - val categoryCode: kotlin.Any? = null, - // Tax or fee value. - @JsonProperty("Amount") - @field:Valid - val amount: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var categoryCode: kotlin.Any? = null, - private var amount: kotlin.Any? = null - ) { - fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } - - fun amount(amount: kotlin.Any?) = apply { this.amount = amount } - - fun build(): RoomRatesTaxesAndFeesDetailsInnerAllOf { - val instance = - RoomRatesTaxesAndFeesDetailsInnerAllOf( - categoryCode = categoryCode, - amount = amount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRatesTaxesAndFeesDetailsInnerAllOf) { - 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( - categoryCode = categoryCode, - amount = amount - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInnerAllOf.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInnerAllOf.kt deleted file mode 100644 index fefe33cec..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInnerAllOf.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 - -/** - * - * @param id Amenity id - * @param name Amenity name - */ -data class RoomTypeAmenitiesInnerAllOf( - // Amenity id - @JsonProperty("Id") - @field:Valid - val id: kotlin.Any? = null, - // Amenity name - @JsonProperty("Name") - @field:Valid - val name: kotlin.Any? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - - fun name(name: kotlin.Any?) = apply { this.name = name } - - fun build(): RoomTypeAmenitiesInnerAllOf { - val instance = - RoomTypeAmenitiesInnerAllOf( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypeAmenitiesInnerAllOf) { - 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( - id = id, - name = name - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt deleted file mode 100644 index d2fbf24c9..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.RatePlanPriceBaseRate -import com.expediagroup.sdk.xap.models.RatePlanPriceHotelMandatoryFees -import com.expediagroup.sdk.xap.models.RatePlanPriceTaxesAndFees -import com.expediagroup.sdk.xap.models.RoomTypePriceAvgNightlyRate -import com.expediagroup.sdk.xap.models.RoomTypePriceAvgNightlyRateWithFees -import com.expediagroup.sdk.xap.models.RoomTypePriceAvgNightlyStrikeOutRate -import com.expediagroup.sdk.xap.models.RoomTypePriceAvgNightlyStrikeoutRateWithFees -import com.expediagroup.sdk.xap.models.RoomTypePriceRefundableDamageDeposit -import com.expediagroup.sdk.xap.models.RoomTypePriceTotalPrice -import com.expediagroup.sdk.xap.models.RoomTypePriceTotalPriceWithHotelFees -import com.expediagroup.sdk.xap.models.RoomTypePriceTotalStrikeOutPrice -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * Container of all price components of the room. - * @param baseRate - * @param taxesAndFees - * @param totalPrice - * @param totalStrikeOutPrice - * @param avgNightlyRate - * @param avgNightlyStrikeOutRate - * @param avgNightlyRateWithFees - * @param avgNightlyStrikeoutRateWithFees - * @param hotelMandatoryFees - * @param totalPriceWithHotelFees - * @param refundableDamageDeposit - */ -data class RoomTypePrice( - @JsonProperty("BaseRate") - @field:Valid - val baseRate: RatePlanPriceBaseRate? = null, - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: RatePlanPriceTaxesAndFees? = null, - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: RoomTypePriceTotalPrice? = null, - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: RoomTypePriceTotalStrikeOutPrice? = null, - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: RoomTypePriceAvgNightlyRate? = null, - @JsonProperty("AvgNightlyStrikeOutRate") - @field:Valid - val avgNightlyStrikeOutRate: RoomTypePriceAvgNightlyStrikeOutRate? = null, - @JsonProperty("AvgNightlyRateWithFees") - @field:Valid - val avgNightlyRateWithFees: RoomTypePriceAvgNightlyRateWithFees? = null, - @JsonProperty("AvgNightlyStrikeoutRateWithFees") - @field:Valid - val avgNightlyStrikeoutRateWithFees: RoomTypePriceAvgNightlyStrikeoutRateWithFees? = null, - @JsonProperty("HotelMandatoryFees") - @field:Valid - val hotelMandatoryFees: RatePlanPriceHotelMandatoryFees? = null, - @JsonProperty("TotalPriceWithHotelFees") - @field:Valid - val totalPriceWithHotelFees: RoomTypePriceTotalPriceWithHotelFees? = null, - @JsonProperty("RefundableDamageDeposit") - @field:Valid - val refundableDamageDeposit: RoomTypePriceRefundableDamageDeposit? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var baseRate: RatePlanPriceBaseRate? = null, - private var taxesAndFees: RatePlanPriceTaxesAndFees? = null, - private var totalPrice: RoomTypePriceTotalPrice? = null, - private var totalStrikeOutPrice: RoomTypePriceTotalStrikeOutPrice? = null, - private var avgNightlyRate: RoomTypePriceAvgNightlyRate? = null, - private var avgNightlyStrikeOutRate: RoomTypePriceAvgNightlyStrikeOutRate? = null, - private var avgNightlyRateWithFees: RoomTypePriceAvgNightlyRateWithFees? = null, - private var avgNightlyStrikeoutRateWithFees: RoomTypePriceAvgNightlyStrikeoutRateWithFees? = null, - private var hotelMandatoryFees: RatePlanPriceHotelMandatoryFees? = null, - private var totalPriceWithHotelFees: RoomTypePriceTotalPriceWithHotelFees? = null, - private var refundableDamageDeposit: RoomTypePriceRefundableDamageDeposit? = null - ) { - fun baseRate(baseRate: RatePlanPriceBaseRate?) = apply { this.baseRate = baseRate } - - fun taxesAndFees(taxesAndFees: RatePlanPriceTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } - - fun totalPrice(totalPrice: RoomTypePriceTotalPrice?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: RoomTypePriceTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun avgNightlyRate(avgNightlyRate: RoomTypePriceAvgNightlyRate?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: RoomTypePriceAvgNightlyStrikeOutRate?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - - fun avgNightlyRateWithFees(avgNightlyRateWithFees: RoomTypePriceAvgNightlyRateWithFees?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } - - fun avgNightlyStrikeoutRateWithFees(avgNightlyStrikeoutRateWithFees: RoomTypePriceAvgNightlyStrikeoutRateWithFees?) = - apply { - this.avgNightlyStrikeoutRateWithFees = - avgNightlyStrikeoutRateWithFees - } - - fun hotelMandatoryFees(hotelMandatoryFees: RatePlanPriceHotelMandatoryFees?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - - fun totalPriceWithHotelFees(totalPriceWithHotelFees: RoomTypePriceTotalPriceWithHotelFees?) = apply { this.totalPriceWithHotelFees = totalPriceWithHotelFees } - - fun refundableDamageDeposit(refundableDamageDeposit: RoomTypePriceRefundableDamageDeposit?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - - fun build(): RoomTypePrice { - val instance = - RoomTypePrice( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - avgNightlyRateWithFees = avgNightlyRateWithFees, - avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, - hotelMandatoryFees = hotelMandatoryFees, - totalPriceWithHotelFees = totalPriceWithHotelFees, - refundableDamageDeposit = refundableDamageDeposit - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePrice) { - 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( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - avgNightlyRateWithFees = avgNightlyRateWithFees, - avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, - hotelMandatoryFees = hotelMandatoryFees, - totalPriceWithHotelFees = totalPriceWithHotelFees, - refundableDamageDeposit = refundableDamageDeposit - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyRate.kt deleted file mode 100644 index 88210c328..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RoomTypePriceAvgNightlyRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomTypePriceAvgNightlyRate { - val instance = - RoomTypePriceAvgNightlyRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePriceAvgNightlyRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyRateWithFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyRateWithFees.kt deleted file mode 100644 index 837173151..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyRateWithFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RoomTypePriceAvgNightlyRateWithFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomTypePriceAvgNightlyRateWithFees { - val instance = - RoomTypePriceAvgNightlyRateWithFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePriceAvgNightlyRateWithFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyStrikeOutRate.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyStrikeOutRate.kt deleted file mode 100644 index c1137a3b7..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyStrikeOutRate.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RoomTypePriceAvgNightlyStrikeOutRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomTypePriceAvgNightlyStrikeOutRate { - val instance = - RoomTypePriceAvgNightlyStrikeOutRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePriceAvgNightlyStrikeOutRate) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyStrikeoutRateWithFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyStrikeoutRateWithFees.kt deleted file mode 100644 index 05a62a690..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceAvgNightlyStrikeoutRateWithFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RoomTypePriceAvgNightlyStrikeoutRateWithFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomTypePriceAvgNightlyStrikeoutRateWithFees { - val instance = - RoomTypePriceAvgNightlyStrikeoutRateWithFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePriceAvgNightlyStrikeoutRateWithFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceRefundableDamageDeposit.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceRefundableDamageDeposit.kt deleted file mode 100644 index b579bee8b..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceRefundableDamageDeposit.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The refundable damage deposit for the rate plan. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RoomTypePriceRefundableDamageDeposit( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomTypePriceRefundableDamageDeposit { - val instance = - RoomTypePriceRefundableDamageDeposit( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePriceRefundableDamageDeposit) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalPrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalPrice.kt deleted file mode 100644 index b77edc08d..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalPrice.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RoomTypePriceTotalPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomTypePriceTotalPrice { - val instance = - RoomTypePriceTotalPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePriceTotalPrice) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalPriceWithHotelFees.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalPriceWithHotelFees.kt deleted file mode 100644 index ff1db94d0..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalPriceWithHotelFees.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RoomTypePriceTotalPriceWithHotelFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomTypePriceTotalPriceWithHotelFees { - val instance = - RoomTypePriceTotalPriceWithHotelFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePriceTotalPriceWithHotelFees) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalStrikeOutPrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalStrikeOutPrice.kt deleted file mode 100644 index 5e044604d..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePriceTotalStrikeOutPrice.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.Money -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice - */ -data class RoomTypePriceTotalStrikeOutPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomTypePriceTotalStrikeOutPrice { - val instance = - RoomTypePriceTotalStrikeOutPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePriceTotalStrikeOutPrice) { - 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( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt deleted file mode 100644 index 2d55a3109..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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.expediagroup.sdk.xap.models.RatePlanStandalonePriceAvgNightlyRate -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceAvgNightlyStrikeOutRate -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceBaseRate -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceHotelMandatoryFees -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceStrikeOutBaseRate -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceStrikeOutHotelMandatoryFees -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceStrikeOutTaxesAndFees -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceTaxesAndFees -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceTotalPrice -import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceTotalStrikeOutPrice -import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation - -/** - * The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when this is a package rate plan. - * @param baseRate - * @param strikeOutBaseRate - * @param taxesAndFees - * @param strikeOutTaxesAndFees - * @param totalPrice - * @param totalStrikeOutPrice - * @param avgNightlyRate - * @param avgNightlyStrikeOutRate - * @param hotelMandatoryFees - * @param strikeOutHotelMandatoryFees - */ -data class RoomTypeStandalonePrice( - @JsonProperty("BaseRate") - @field:Valid - val baseRate: RatePlanStandalonePriceBaseRate? = null, - @JsonProperty("StrikeOutBaseRate") - @field:Valid - val strikeOutBaseRate: RatePlanStandalonePriceStrikeOutBaseRate? = null, - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: RatePlanStandalonePriceTaxesAndFees? = null, - @JsonProperty("StrikeOutTaxesAndFees") - @field:Valid - val strikeOutTaxesAndFees: RatePlanStandalonePriceStrikeOutTaxesAndFees? = null, - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: RatePlanStandalonePriceTotalPrice? = null, - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: RatePlanStandalonePriceTotalStrikeOutPrice? = null, - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate? = null, - @JsonProperty("AvgNightlyStrikeOutRate") - @field:Valid - val avgNightlyStrikeOutRate: RatePlanStandalonePriceAvgNightlyStrikeOutRate? = null, - @JsonProperty("HotelMandatoryFees") - @field:Valid - val hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees? = null, - @JsonProperty("StrikeOutHotelMandatoryFees") - @field:Valid - val strikeOutHotelMandatoryFees: RatePlanStandalonePriceStrikeOutHotelMandatoryFees? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var baseRate: RatePlanStandalonePriceBaseRate? = null, - private var strikeOutBaseRate: RatePlanStandalonePriceStrikeOutBaseRate? = null, - private var taxesAndFees: RatePlanStandalonePriceTaxesAndFees? = null, - private var strikeOutTaxesAndFees: RatePlanStandalonePriceStrikeOutTaxesAndFees? = null, - private var totalPrice: RatePlanStandalonePriceTotalPrice? = null, - private var totalStrikeOutPrice: RatePlanStandalonePriceTotalStrikeOutPrice? = null, - private var avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate? = null, - private var avgNightlyStrikeOutRate: RatePlanStandalonePriceAvgNightlyStrikeOutRate? = null, - private var hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees? = null, - private var strikeOutHotelMandatoryFees: RatePlanStandalonePriceStrikeOutHotelMandatoryFees? = null - ) { - fun baseRate(baseRate: RatePlanStandalonePriceBaseRate?) = apply { this.baseRate = baseRate } - - fun strikeOutBaseRate(strikeOutBaseRate: RatePlanStandalonePriceStrikeOutBaseRate?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } - - fun taxesAndFees(taxesAndFees: RatePlanStandalonePriceTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } - - fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: RatePlanStandalonePriceStrikeOutTaxesAndFees?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } - - fun totalPrice(totalPrice: RatePlanStandalonePriceTotalPrice?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: RatePlanStandalonePriceTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun avgNightlyRate(avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: RatePlanStandalonePriceAvgNightlyStrikeOutRate?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - - fun hotelMandatoryFees(hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - - fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: RatePlanStandalonePriceStrikeOutHotelMandatoryFees?) = - apply { - this.strikeOutHotelMandatoryFees = - strikeOutHotelMandatoryFees - } - - fun build(): RoomTypeStandalonePrice { - val instance = - RoomTypeStandalonePrice( - baseRate = baseRate, - strikeOutBaseRate = strikeOutBaseRate, - taxesAndFees = taxesAndFees, - strikeOutTaxesAndFees = strikeOutTaxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypeStandalonePrice) { - 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( - baseRate = baseRate, - strikeOutBaseRate = strikeOutBaseRate, - taxesAndFees = taxesAndFees, - strikeOutTaxesAndFees = strikeOutTaxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/exception/ApiException.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/models/exception/ApiException.kt deleted file mode 100644 index 56dc289dc..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/exception/ApiException.kt +++ /dev/null @@ -1,293 +0,0 @@ -/* - * 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.exception - -import com.expediagroup.sdk.core.model.exception.service.ExpediaGroupApiException -import com.expediagroup.sdk.core.model.exception.service.ExpediaGroupServiceDefaultErrorException -import com.expediagroup.sdk.core.model.getTransactionId -import com.expediagroup.sdk.xap.models.* -import io.ktor.client.call.body -import io.ktor.client.statement.HttpResponse -import io.ktor.client.statement.bodyAsText -import io.ktor.client.statement.request -import kotlinx.coroutines.runBlocking - -internal open class HttpStatusCodeRange( - private val statusCode: String, - val getException: (HttpResponse) -> ExpediaGroupApiException -) : Comparable { - open fun matches(statusCode: String): Boolean = if (isRangeDefinition()) this.statusCode.first() == statusCode.first() else this.statusCode == statusCode - - open fun isRangeDefinition(): Boolean = statusCode.matches(Regex("^[1-5]XX$")) - - override fun compareTo(other: HttpStatusCodeRange): Int = (if (this.isRangeDefinition()) 1 else 0).compareTo(if (other.isRangeDefinition()) 1 else 0) -} - -internal object DefaultHttpStatusCodeRange : HttpStatusCodeRange( - "DefaultHttpStatusCodeRange", - { ExpediaGroupServiceDefaultErrorException(it.status.value, runBlocking { it.bodyAsText() }, it.request.headers.getTransactionId()) } -) { - override fun matches(statusCode: String): Boolean = true - - override fun isRangeDefinition(): Boolean = true -} - -internal object ErrorObjectMapper { - private val defaultHttpStatusCodeRanges = listOf(DefaultHttpStatusCodeRange) - private val httpStatusCodeRanges: Map> = - mapOf( - Pair( - "getActivityDetails", - listOf( - HttpStatusCodeRange("400") { - ExpediaGroupApiActivitiesErrorsException(it.status.value, fetchErrorObject(it) as ActivitiesErrors, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("401") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("403") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("404") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("429") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("500") { - ExpediaGroupApiActivitiesErrorsException(it.status.value, fetchErrorObject(it) as ActivitiesErrors, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("503") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getActivityListings", - listOf( - HttpStatusCodeRange("400") { - ExpediaGroupApiActivitiesErrorsException(it.status.value, fetchErrorObject(it) as ActivitiesErrors, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("401") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("403") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("404") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("429") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("500") { - ExpediaGroupApiActivitiesErrorsException(it.status.value, fetchErrorObject(it) as ActivitiesErrors, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("503") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getCarDetails", - listOf( - HttpStatusCodeRange("400") { ExpediaGroupApiCarsErrorsException(it.status.value, fetchErrorObject(it) as CarsErrors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("401") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("403") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("404") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("429") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("500") { ExpediaGroupApiCarsErrorsException(it.status.value, fetchErrorObject(it) as CarsErrors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("503") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getCarsListings", - listOf( - HttpStatusCodeRange("400") { ExpediaGroupApiCarsErrorsException(it.status.value, fetchErrorObject(it) as CarsErrors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("401") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("403") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("404") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("429") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("503") { ExpediaGroupApiAPIMErrorException(it.status.value, fetchErrorObject(it) as APIMError, it.headers.getTransactionId()) }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getFeedDownloadUrl", - listOf( - HttpStatusCodeRange("400") { - ExpediaGroupApiPresignedUrlResponseException(it.status.value, fetchErrorObject(it) as PresignedUrlResponse, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("401") { ExpediaGroupApiSdpAPIMErrorException(it.status.value, fetchErrorObject(it) as SdpAPIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("403") { ExpediaGroupApiSdpAPIMErrorException(it.status.value, fetchErrorObject(it) as SdpAPIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("404") { ExpediaGroupApiSdpAPIMErrorException(it.status.value, fetchErrorObject(it) as SdpAPIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("429") { ExpediaGroupApiSdpAPIMErrorException(it.status.value, fetchErrorObject(it) as SdpAPIMError, it.headers.getTransactionId()) }, - HttpStatusCodeRange("500") { - ExpediaGroupApiPresignedUrlResponseException(it.status.value, fetchErrorObject(it) as PresignedUrlResponse, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("503") { ExpediaGroupApiSdpAPIMErrorException(it.status.value, fetchErrorObject(it) as SdpAPIMError, it.headers.getTransactionId()) }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getLodgingAvailabilityCalendars", - listOf( - HttpStatusCodeRange("400") { ExpediaGroupApiLodgingErrorsException(it.status.value, fetchErrorObject(it) as LodgingErrors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("401") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("403") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("429") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("500") { ExpediaGroupApiLodgingErrorsException(it.status.value, fetchErrorObject(it) as LodgingErrors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("503") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("504") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getLodgingDetails", - listOf( - HttpStatusCodeRange("400") { ExpediaGroupApiErrorsException(it.status.value, fetchErrorObject(it) as Errors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("401") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("403") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("429") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("500") { ExpediaGroupApiErrorsException(it.status.value, fetchErrorObject(it) as Errors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("503") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("504") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getLodgingListings", - listOf( - HttpStatusCodeRange("400") { ExpediaGroupApiErrorsException(it.status.value, fetchErrorObject(it) as Errors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("401") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("403") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("429") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("500") { ExpediaGroupApiErrorsException(it.status.value, fetchErrorObject(it) as Errors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("503") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("504") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getLodgingQuotes", - listOf( - HttpStatusCodeRange("400") { ExpediaGroupApiLodgingErrorsException(it.status.value, fetchErrorObject(it) as LodgingErrors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("401") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("403") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("429") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("500") { ExpediaGroupApiLodgingErrorsException(it.status.value, fetchErrorObject(it) as LodgingErrors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("503") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("504") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - DefaultHttpStatusCodeRange - ) - ), - Pair( - "getLodgingRateCalendar", - listOf( - HttpStatusCodeRange("400") { ExpediaGroupApiErrorsException(it.status.value, fetchErrorObject(it) as Errors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("401") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("403") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("409") { ExpediaGroupApiErrorsException(it.status.value, fetchErrorObject(it) as Errors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("429") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("500") { ExpediaGroupApiErrorsException(it.status.value, fetchErrorObject(it) as Errors, it.headers.getTransactionId()) }, - HttpStatusCodeRange("503") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - HttpStatusCodeRange("504") { - ExpediaGroupApiAPIGatewayErrorException(it.status.value, fetchErrorObject(it) as APIGatewayError, it.headers.getTransactionId()) - }, - DefaultHttpStatusCodeRange - ) - ) - ) - - fun process( - httpResponse: HttpResponse, - operationId: String - ): ExpediaGroupApiException = - httpStatusCodeRanges.getOrDefault(operationId, defaultHttpStatusCodeRanges).filter { it.matches(httpResponse.status.value.toString()) }.min().getException(httpResponse) - - private inline fun fetchErrorObject(httpResponse: HttpResponse): T = - runBlocking { - runCatching { - httpResponse.body() - }.getOrElse { throw ExpediaGroupServiceDefaultErrorException(httpResponse.status.value, httpResponse.bodyAsText(), httpResponse.request.headers.getTransactionId()) } - } -} - -class ExpediaGroupApiActivitiesErrorsException(code: Int, override val errorObject: ActivitiesErrors, transactionId: String?) : ExpediaGroupApiException(code, errorObject, transactionId) - -class ExpediaGroupApiAPIMErrorException(code: Int, override val errorObject: APIMError, transactionId: String?) : ExpediaGroupApiException(code, errorObject, transactionId) - -class ExpediaGroupApiCarsErrorsException(code: Int, override val errorObject: CarsErrors, transactionId: String?) : ExpediaGroupApiException(code, errorObject, transactionId) - -class ExpediaGroupApiPresignedUrlResponseException(code: Int, override val errorObject: PresignedUrlResponse, transactionId: String?) : ExpediaGroupApiException( - code, - errorObject, - transactionId -) - -class ExpediaGroupApiSdpAPIMErrorException(code: Int, override val errorObject: SdpAPIMError, transactionId: String?) : ExpediaGroupApiException(code, errorObject, transactionId) - -class ExpediaGroupApiLodgingErrorsException(code: Int, override val errorObject: LodgingErrors, transactionId: String?) : ExpediaGroupApiException(code, errorObject, transactionId) - -class ExpediaGroupApiAPIGatewayErrorException(code: Int, override val errorObject: APIGatewayError, transactionId: String?) : ExpediaGroupApiException(code, errorObject, transactionId) - -class ExpediaGroupApiErrorsException(code: Int, override val errorObject: Errors, transactionId: String?) : ExpediaGroupApiException(code, errorObject, transactionId) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt deleted file mode 100644 index ce5455483..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation -import org.apache.commons.text.StringSubstitutor - -/** - * - * @property params [GetActivityDetailsOperationParams] - */ -class GetActivityDetailsOperation( - params: GetActivityDetailsOperationParams -) : Operation< - Nothing - >( - url(params), - "GET", - "getActivityDetails", - null, - params - ) { - companion object { - fun url(params: GetActivityDetailsOperationParams): String { - val url = "/activities/details/{offerToken}" - val substitutor = StringSubstitutor(params.getPathParams(), "{", "}") - return substitutor.replace(url) - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt deleted file mode 100644 index 795784611..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation - -/** - * - * @property params [GetActivityListingsOperationParams] - */ -class GetActivityListingsOperation( - params: GetActivityListingsOperationParams -) : Operation< - Nothing - >( - "/activities/listings", - "GET", - "getActivityListings", - null, - params - ) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt deleted file mode 100644 index 69021e83d..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation -import org.apache.commons.text.StringSubstitutor - -/** - * Get Extended information with a single car offer - * @property params [GetCarDetailsOperationParams] - */ -class GetCarDetailsOperation( - params: GetCarDetailsOperationParams -) : Operation< - Nothing - >( - url(params), - "GET", - "getCarDetails", - null, - params - ) { - companion object { - fun url(params: GetCarDetailsOperationParams): String { - val url = "/cars/details/{offerToken}" - val substitutor = StringSubstitutor(params.getPathParams(), "{", "}") - return substitutor.replace(url) - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt deleted file mode 100644 index 8e61afc6b..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation - -/** - * Search Expedia car inventory - * @property params [GetCarsListingsOperationParams] - */ -class GetCarsListingsOperation( - params: GetCarsListingsOperationParams -) : Operation< - Nothing - >( - "/cars/listings", - "GET", - "getCarsListings", - null, - params - ) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt deleted file mode 100644 index 87d5a5ab7..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation - -/** - * - * @property params [GetFeedDownloadUrlOperationParams] - */ -class GetFeedDownloadUrlOperation( - params: GetFeedDownloadUrlOperationParams -) : Operation< - Nothing - >( - "/feed/v1/download-url", - "GET", - "getFeedDownloadUrl", - null, - params - ) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt deleted file mode 100644 index 4878aee01..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation - -/** - * Get availability calendars of properties - * @property params [GetLodgingAvailabilityCalendarsOperationParams] - */ -class GetLodgingAvailabilityCalendarsOperation( - params: GetLodgingAvailabilityCalendarsOperationParams -) : Operation< - Nothing - >( - "/lodging/availabilityCalendars", - "GET", - "getLodgingAvailabilityCalendars", - null, - params - ) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt deleted file mode 100644 index 3c8b9b0a4..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation -import org.apache.commons.text.StringSubstitutor - -/** - * Get Extended information with a single property offer - * @property params [GetLodgingDetailsOperationParams] - */ -class GetLodgingDetailsOperation( - params: GetLodgingDetailsOperationParams -) : Operation< - Nothing - >( - url(params), - "GET", - "getLodgingDetails", - null, - params - ) { - companion object { - fun url(params: GetLodgingDetailsOperationParams): String { - val url = "/hotels/details/{offerToken}" - val substitutor = StringSubstitutor(params.getPathParams(), "{", "}") - return substitutor.replace(url) - } - } -} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt deleted file mode 100644 index 8c1263988..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation - -/** - * Search lodging inventory - * @property params [GetLodgingListingsOperationParams] - */ -class GetLodgingListingsOperation( - params: GetLodgingListingsOperationParams -) : Operation< - Nothing - >( - "/hotels/listings", - "GET", - "getLodgingListings", - null, - params - ) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt deleted file mode 100644 index 88996be23..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation - -/** - * Get properties price and availability information - * @property params [GetLodgingQuotesOperationParams] - */ -class GetLodgingQuotesOperation( - params: GetLodgingQuotesOperationParams -) : Operation< - Nothing - >( - "/lodging/quotes", - "GET", - "getLodgingQuotes", - null, - params - ) diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt b/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt deleted file mode 100644 index a375d6b7d..000000000 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.xap.operations - -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Operation - -/** - * Get rate calendar of a property - * @property params [GetLodgingRateCalendarOperationParams] - */ -class GetLodgingRateCalendarOperation( - params: GetLodgingRateCalendarOperationParams -) : Operation< - Nothing - >( - "/hotels/rateCalendar", - "GET", - "getLodgingRateCalendar", - null, - params - ) diff --git a/code/transformedSpecs.yaml b/code/transformedSpecs.yaml deleted file mode 100644 index 96baec46d..000000000 --- a/code/transformedSpecs.yaml +++ /dev/null @@ -1,8438 +0,0 @@ -openapi: 3.0.3 -info: - title: EWSHotel API - description: > - The XAP Lodging Search APIs can be used by partners both booking via an - Expedia website, or by partners that - - will be booking via the XAP APIs. Each API also provides pre-configured links to the Expedia website, - - the XAP Booking API, or both. - contact: - name: PartnerAPIs - url: https://confluence.expedia.biz/display/EWS/EWSHotel - email: dreamweaver@expedia.com - version: v3 - x-eg-lifecycle: LIVE - x-eg-tags: - - Partner - - EWS - - XAP - - EWSHotel - - Hotel - - Lodging - - LodgingListings - - LodgingDetails - - LodgingRateCalendar -servers: - - url: https://apim.expedia.com - description: Production Server -security: - - BasicAuth: [] -tags: - - name: Lodging Listing - - name: Lodging Details - - name: Lodging Rate Calendar - - name: Lodging Quotes - - name: Lodging Availability Calendars - - name: Cars Listings - - name: Cars Detail - - name: download-url - - name: Activities List - - name: Activities Details -paths: - "/hotels/details/{offerToken}": - get: - tags: - - get-lodging-details - summary: Get Extended information with a single property offer - description: Extended information about the rate, charges, fees, and financial - terms associated with booking a single lodging rate plan offer. - operationId: get-lodging-details - parameters: - - name: Partner-Transaction-Id - in: header - description: > - The `Partner-Transaction-ID` is a required API request header - element that is not consumed - - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - - back to the partner in the corresponding API response header. - - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: offerToken - in: path - description: > - A Hotel Natural Key from the Lodging Search API -> Hotels -> - RoomTypes -> OfferId. It is a concatenated - - string of multiple values that defines a hotel offer. - required: true - schema: - type: string - - name: price - in: query - description: > - The total price of the selected property. - - - This value will be used to determine if there is a price change between the details and booking request. - - - The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned - - along with the Lodging Details API response. - schema: - type: string - - name: currency - in: query - description: > - Value should be a standard ISO 3 letter currency code. - - - The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from - - the Lodging Listing API response. - - - The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned - - along with the Lodging Details response. - schema: - type: string - - name: locale - in: query - description: > - `locale` is composed of language identifier and region identifier, - connected by "_" that specifies the - - language in which the response will be returned. - - - The `locale` value used in the Lodging Details API query should match the `locale` value that was used in - - the Lodging Search API query. - schema: - type: string - - name: imageSizes - in: query - description: > - Indicate what size of image will be returned. - - - The available image sizes are: - - - t : Thumbnail - - - s : Small - - - b : Big - - - y : 500x500v - - - z : 1000x1000v - - - Resolution from smallest to largest is t < s < b < y < z. - - - If no `imageSizes` is specified, the t size images will be returned. - - - If an image is missing in one size, we will try to fall back to the same image with lower resolution. - - - (If image "_z" is not available, we will try to return image "_y", and if it is also unavailable, we will return image "_b", and so on.) - - - Only one image size is allowed. - schema: - type: string - enum: - - t - - s - - b - - y - - z - default: t - - name: groupedAmenities - in: query - description: > - Specifies whether to return the grouped amenities. If - `groupedAmenities` is true, `DescriptiveAmenities` - - node will be returned in response, otherwise `Amenities` node will be returned. - schema: - type: boolean - responses: - "200": - description: Normal Response - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/HotelDetailsResponse" - "400": - description: User Fault - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/Errors" - example: - Errors: - - Code: INVALID_NATURAL_KEY - Description: Invalid natural key. Malformed hotel natural key detected. - TransactionId: e883f530-9776-4011-a14d-3cc089feb6cf - "401": - description: Invalid authentication credentials. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Unauthorized - "403": - description: You cannot consume this service. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: API rate limit exceeded. - "500": - description: Service Error - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/Errors" - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: 1f497fa0-a996-4796-b97e-3ad269bf7624 - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Name resolution failed. - "504": - description: API time out. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: The upstream server is timing out - security: - - Authorization: [] - /hotels/listings: - get: - tags: - - get-lodging-listings - summary: Search lodging inventory - description: > - Search Expedia lodging inventory by Location Keyword, Region ID, - Lat/Long, or Hotel ID(s) and return - - up to 1,000 offers in response. - - - Provides deeplink to Expedia site to book, or rate plan info to enable API booking. - operationId: get-lodging-listings - parameters: - - name: Partner-Transaction-Id - in: header - description: > - The `Partner-Transaction-ID` is a required API request header - element that is not consumed - - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - - back to the partner in the corresponding API response header. - - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: ecomHotelIds - in: query - description: Comma-separated list of Expedia hotel IDs. There can be no spaces - between parameters. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - example: - - 28082 - - 11133 - - name: hcomHotelIds - in: query - description: Comma-separated list of Hotels.com hotel IDs. There can be no - spaces between parameters. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: geoLocation - in: query - description: > - The latitude and longitude values identifying the center point of a - search radius (circle). - - - North latitude will be represented by a positive value. South latitude by a negative value. - - - East longitude will be represented by a positive value. West longitude by a negative value. - - - The latitude and longitude values are joined together with a comma (,) character. - - There can be no spaces between parameters. - - - This parameter should be used in combination with the radius and unit parameters below. - schema: - type: string - - name: radius - in: query - description: > - The size of the search radius around a specified point when - searching by - - `geoLocation`, `locationKeyword`, or `regionids`. - - - `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` - - if not specified. `radius` must be less than 200 km or 124 mi. - - - This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, - - or `regionids` parameters." - schema: - type: integer - format: int64 - default: 25 - - name: unit - in: query - description: > - The unit of measure for searches performed via `geoLocation`, - `locationKeyword`, or `regionids`. - - - Valid units are `km` and `mi`. - - - This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, - - or `regionids`. - schema: - type: string - default: km - enum: - - km - - mi - - name: locationKeyword - in: query - description: > - A keyword search for a location. The keyword can be a city, address, - airport or a landmark. - - - This parameter should be used in combination with the `radius` and `unit` parameters above to define - - a circle around the landmark. - - - The default radius value is 25 if not specified. - - - Combined search is not supported, if more than one search method is included in the request, an error - - will be returned. - schema: - type: string - - name: regionIds - in: query - description: > - Comma-separated list of Expedia Region IDs. There can be no spaces - between parameters. - - Search returns set of all hotels in the combined regions. - - - You may search using a string of 1 - 10 Region ID's. - - More than 10 Region ID's are not supported and will generate and error. - - - You can get the complete list of Expedia Region IDs from - - [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). - - - This parameter could be used in combination with the `radius` and `unit` parameters above to define - - a circle around the `regionIds`. The default radius value is 0 if not specified. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: checkIn - in: query - description: > - Check-in date for hotel stay in an ISO 8601 Date format - [YYYY-MM-DD]. - - - This parameter should be used in combination with the `checkOut` parameter. - - - If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns - - a `Featured Offer` for each of the hotels found. - - - If one of `checkIn` and `checkOut` is not included, an error will be returned. - - - The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - schema: - type: string - format: date - example: 2023-09-12 - - name: checkOut - in: query - description: > - Checkout date for hotel stay in an ISO 8601 Date format - [YYYY-MM-DD]. - - - This parameter should be used in combination with the `checkIn` parameter. - - - If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns - - a `Featured Offer` for each of the hotels found. - - - If one of `checkIn` and `checkOut` is not included, an error will be returned. - - - The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - schema: - type: string - format: date - example: 2023-09-14 - - name: locale - in: query - description: > - `locale` is composed of language identifier and region identifier, - connected by "_" that specifies - - the language in which the response will be returned. - - - You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. - - - For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. - - - If not specified in the query, the native language for that POS will be returned. - - And if more than one language is supported, the response will be returned in the first language - - depending on the language setting of the POS. - schema: - type: string - example: en_US - - name: currency - in: query - description: Value should be a standard ISO 3 letter currency code. - schema: - type: string - example: USD - - name: source - in: query - description: Indicate the source where the request is coming from. - schema: - type: string - enum: - - browser - - mobileapp - default: browser - - name: travelWithPets - in: query - description: > - Indicates if the search should include pet-friendly properties. - - - If set to "True" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. - - - The parameter is only applicable to the Vrbo brand. - schema: - type: boolean - default: false - - name: contentDetails - in: query - description: > - This parameter is optional and can be specified as the following - values. - - - lowest - - - low (default) - - - medium - - - high - - - ### *lowest* - - Returns the absolute minimum response for up to 1,000 hotels: - - - Count(Count of hotels that are actually returned) - - - TotalHotelCount(Count of hotels that are requested) - - - TransactionId - - - StayDates - - - LengthOfStay - - - NumberOfRooms - - - Occupants - - - ***Hotels*** - - Id - - Status - - Links - - ***RoomTypes*** - - RoomKey [Deprecated] - - OfferId - - RatePlanType - - ***RatePlans*** - - RoomTypeId - - RatePlanId - - RateRuleId - - InventorySourceId - - RemainingCount - - Price - - MemberOnlyDeal - - Promotions - - PaymentMethod - - FullDepositUponBooking - - PaymentSchedule - - CancellationPolicy - - Price - - BaseRate - - TaxesAndFees - - TotalPrice - - TotalStrikeOutPrice - - AvgNightlyRate - - AvgNightlyStrikeOutRate - - AvgNightlyRateWithFees - - AvgNightlyStrikeOutRateWithFees - - HotelMandatoryFees - - TotalPriceWithHotelFees - - NightlyRates - - TaxesAndFeesDetails - - RefundableDamageDeposit - - This minimal response is the best for partners that store static hotel location data locally, - - and who would like to have the smallest and fastest API response. - - - ### *low* - - Returns basic hotel information in response for up to 1,000 hotels. - - - Includes all elements returned when `contentDetails=lowest` plus: - - - ***Hotels*** - - Name - - PropertyType - - PropertyDetails - - LocalCurrencyCode - - Location - - Distance - - Description(may not be localized) - - ChainAndBrandInfo - - ThumbnailUrl - - StarRating - - GuestRating - - GuestReviewCount - - PetFriendly - - LgbtqiaFriendly - - ImportantNotices - - ***RoomTypes*** - - Description - - ***RatePlans*** - - InventorySourceCode - - PaymentTime - - ReserveWithDeposit - - FreeInternet - - FreeWiFi - - FreeParking - - FreeBreakfast - - ### *medium* - - Returns more complete hotel information in response for up to 200 hotels. - - - Includes all elements returned when `contentDetails=low` plus: - - - ***Hotels*** - - HotelAmenities - - RoomAmenities - - ***RoomTypes*** - - ***RatePlans*** - - FreeInternetDetails - - FreeBreakfastDetails - - Amenities - - Amenities - - **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. - - - ### *high* - - Returns extended hotel information in response for up to 5 hotels. - - - Includes all elements returned when `contentDetails=medium` plus: - - - ***Hotels*** - - RenovationsAndClosures - - Policies - - OptionalExtras - - Media - - Accessibility - - ***RoomTypes*** - - SmokingOption - - BedTypeOptions - - RoomOccupancyPolicy - - Media - - **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. - schema: - type: string - enum: - - lowest - - low - - medium - - high - default: low - - name: allRoomTypes - in: query - description: > - Returns all available rate plans for the selected hotels. - - - This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. - - - Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. - - - Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. - schema: - type: boolean - default: false - - name: links - in: query - description: > - - Comma-separated list to specify the types of deep links. - - - WD (link to Web Details site) - - - WS (link to Web Search Result page) - - - AD (link for Details API) - - - RC (link for RateCalendar API) - - - WEB (include all website links) - - - API (links for Details and RateCalendar API) - - - There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. - - - When requesting API deeplinks you will receive both a RateCalendar API link at the property level, - - and Details API links at the room level, since the Lodging Details API only displays information - - on rate plan offers. - - - When requesting AD deeplinks, you will only receive Details API links at the room level. - - `Links` node in property-level will be omitted. - - - If you are looking for more complete details on a single property via the API, you should do another search - - in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return - - (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). - - - **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only - - return details on a specific room offer for specific dates. - explode: false - schema: - type: array - items: - type: string - enum: - - WD - - WS - - AD - - RC - - WEB - - API - - name: minStarRating - in: query - description: The minimum star rating for hotels returned in the response. - schema: - type: string - enum: - - "1.0" - - "1.5" - - "2.0" - - "2.5" - - "3.0" - - "3.5" - - "4.0" - - "4.5" - - "5.0" - - name: maxStarRating - in: query - description: The maximum star rating for hotels returned in the response. - schema: - type: string - enum: - - "1.0" - - "1.5" - - "2.0" - - "2.5" - - "3.0" - - "3.5" - - "4.0" - - "4.5" - - "5.0" - - name: limit - in: query - description: > - The maximum number of hotels returned in the response. Must be an - integer greater than 0. - - - If the value is greater than 1000, only the first 1000 hotels are returned. - - - Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden - - and a lower number of hotels to be returned. - - - The `limit` parameter is intended to be used to control the response size, but partners should be careful - - about combining it with other filter parameters, as each parameter that you add will shrink the response, - - even to the point where you may even get a "no hotel found" error if none of the hotels in the base response - - meet the combined filter requirements. - - - Filters are cumulative in effect, and results must meet all filter requirements to be displayed. - schema: - type: integer - format: int64 - - name: queryText - in: query - description: > - Query text is used for a full text search of hotel data. - - - Text search based on hotel name, description, address, promotion description, amenities description. - schema: - type: string - - name: availOnly - in: query - description: > - Specifies whether to return only available hotels in the search - results. - - - If the value of this parameter is true, the search results will only return hotels that have availability - - during the requested dates. - - - If there are no hotels with availability in your search then an empty record set will be returned. - - - This parameter is ignored for dateless searches. - schema: - type: boolean - - name: smokingPreference - in: query - description: Specifies smoking preference. - schema: - type: string - enum: - - smoking - - nonsmoking - - both - - name: rateType - in: query - description: Indicate which type of `paymentMethod` for each room will be - returned. - schema: - type: string - enum: - - payonline - - payhotel - - all - - name: imageSizes - in: query - description: > - Indicates what size images will be displayed for `hotelPhotos` and - `roomPhotos` are returned when - - `contentDetails=high`. - - - The available image sizes are: - - - t : Thumbnail - - - s : Small - - - b : Big - - - y : 500x500v - - - z : 1000x1000v - - - Resolution from smallest to largest is t < s < b < y < z. - - - If no `imageSizes` is specified, the t size images will be returned. - - - If an image is missing in one size, we will try to fall back to the same image with lower resolution. - - - (If image "_z" is not available, we will try to return image "_y", and if it is also unavailable, we will return image "_b", and so on.) - - - Only one image size is allowed. - schema: - type: string - enum: - - t - - s - - b - - y - - z - - name: thumbnailImageSize - in: query - description: > - Indicate what size of image will be used for the single `thumbnail` - image that is returned when - - `contentDetails` is set to `low`, `medium` or `high`. - - - The available thumbnail image sizes are: - - - t : Thumbnail - - - s : Small - - - b : Big - - - y : 500x500v - - - z : 1000x1000v - - - Resolution from smallest to largest is t < s < b < y < z. - - - If no `thumbnailImageSize` is specified, the t size images will be returned. - - - if no thumbnail image found, it would not return thumbnail image. - - - Only one thumbnail image size is allowed. - schema: - type: string - enum: - - t - - s - - b - - y - - z - - name: includedPropertyTypeIds - in: query - description: > - Only return hotels where the `PropertyType` ID is one of the IDs in - the `includedPropertyTypeIds` field. - - - If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not - - be returned in the response. Even in this case, the filtering is still being applied, even though there is - - no `PropertyType` parameter in the response with which to validate. - - - `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that - - each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not - - contain **both** of the parameters. - - - A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: excludedPropertyTypeIds - in: query - description: > - Return all hotels **except** those whose `PropertyType` ID is in the - `excludedPropertyTypeIds` field. - - - If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not - - be returned in the response. Even in this case, the filtering is still being applied, even though there is - - no `PropertyType` parameter in the response with which to validate. - - - `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that - - each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not - - contain **both** of the parameters. - - - A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: includedInventorySourceIds - in: query - description: > - Querying with no `includedInventorySourceIds` parameter will return - listings from all available inventory - - sources. - - - Query with the `includedInventorySourceIds` parameter included will only return listings from the requested - - inventory sources. All others will be left out. - - - `includedInventorySourceId=24` will return only Expedia lodging inventory. - - - `includedInventorySourceId=83` will return only Vrbo lodging inventory. - - - `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: freeCancellation - in: query - description: > - Specifies whether to return only free cancelable room rates in the - search results. - - - If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. - - - If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. - - - Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. - - - This parameter is ignored for dateless searches. - schema: - type: boolean - - name: groupedAmenities - in: query - description: > - Specifies whether to return the grouped amenities. If - `groupedAmenities` is true, `DescriptiveAmenities` - - node will be returned in response, otherwise `Amenities` node will be returned. - schema: - type: boolean - - name: blockFullDepositRateplan - in: query - description: > - Specifies whether to return `rateplan` with `FullDepositUponBooking` - as true. - - - If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. - - - The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. - - - This parameter is ignored for dateless search. - schema: - type: boolean - default: false - - name: ratePlanType - in: query - description: > - **Note**: This parameter is visible to partners only by - configuration. Please contact your Expedia Account - - Manager if you need this parameter. - - - To specify the desired rate plan types. The options are: - - - standalone : Ask for standalone rates - - - package : Ask for package rates, but standalone rate also may be returned if available. - - - Otherwise only standalone rate plans will be returned. - - - `WebSearchResult` and `WebDetails` links won't be returned for package rate. - schema: - type: string - enum: - - standalone - - package - - name: sortType - in: query - description: > - Specifies the field that the search results will be ordered by. - - - To be used in conjunction with sortOrder parameter below. - - - **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using - - the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. - schema: - type: string - enum: - - price - - starrating - - avgrate - - deals - - guestrating - - hotelname - - distance - - totalpricewithfees - - name: sortOrder - in: query - description: > - Specifies the sort order of search results. - - - If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. - - - To be used in conjunction with the `sortType` parameter above. - schema: - type: string - enum: - - asc - - desc - default: asc - - name: room1.adults - in: query - description: > - Specifies the number of adults staying in a specific room. - - - Default value is one room with 2 adults. - - - Example: `room1.adults` is used to specify the number of adults in the first room. - schema: - type: integer - format: int64 - example: 2 - - name: room1.childAges - in: query - description: > - Comma-separated list that specifies the age(s) for each of the - children in each of the rooms. - - - Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. - - - Children must be accompanied by an adult. - explode: false - schema: - type: array - items: - type: string - example: - - 8 - - 10 - - name: room2.adults - in: query - description: Specifies the number of adults staying in second room. - schema: - type: integer - format: int64 - - name: room2.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in second room. - explode: false - schema: - type: array - items: - type: string - - name: room3.adults - in: query - description: Specifies the number of adults staying in third room. - schema: - type: integer - format: int64 - - name: room3.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in third room. - explode: false - schema: - type: array - items: - type: string - - name: room4.adults - in: query - description: Specifies the number of adults staying in fourth room. - schema: - type: integer - format: int64 - - name: room4.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in fourth room. - explode: false - schema: - type: array - items: - type: string - - name: room5.adults - in: query - description: Specifies the number of adults staying in fifth room. - schema: - type: integer - format: int64 - - name: room5.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in fifth room. - explode: false - schema: - type: array - items: - type: string - - name: room6.adults - in: query - description: Specifies the number of adults staying in sixth room. - schema: - type: integer - format: int64 - - name: room6.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in sixth room. - explode: false - schema: - type: array - items: - type: string - - name: room7.adults - in: query - description: Specifies the number of adults staying in seventh room. - schema: - type: integer - format: int64 - - name: room7.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in seventh room. - explode: false - schema: - type: array - items: - type: string - - name: room8.adults - in: query - description: Specifies the number of adults staying in eighth room. - schema: - type: integer - format: int64 - - name: room8.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in eighth room. - explode: false - schema: - type: array - items: - type: string - responses: - "200": - description: Normal Response - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/HotelListingsResponse" - "400": - description: User Fault or DisambiguationResponse Fault - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/Errors" - examples: - DisambiguationResponse: - description: DisambiguationResponse - value: - TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Errors: - - Code: AMBIGUOUS_LOCATION - DetailCode: MULTIPLE_AMBIGUOUS_LOCATION - Description: More than one location found - LocationKeyword: dublin - LocationOptions: - - Type: MULTICITY - RegionID: 178256 - ShortName: Dublin (and vicinity) - AirportCode: DUB - Address: Dublin (and vicinity), Ireland - Country: - Name: Ireland - IsoCode2: IE - IsoCode3: IRL - GeoLocation: - Latitude: 53.34402 - Longitude: -6.26146 - - Type: POI - RegionID: 553248621563220200 - ShortName: Market On Madison - AirportCode: MCN - Address: Market On Madison, Dublin, Georgia, United States of America - Country: - Name: United States of America - IsoCode2: US - IsoCode3: USA - GeoLocation: - Latitude: 32.539313 - Longitude: -82.902537 - UserFault: - description: UserFault - value: - Errors: - - Code: COMBINED_HOTEL_SELECT_CRITERIA - Description: > - Combined hotel search is not supported. Please specify - either one of the following search - - criteria: [geoLocation, regionIds, ecomHotelIds, hcomHotelIds, locationKeyword, hnk, offerId]. - TransactionId: 242d7a77-4063-439b-a9d0-12da0ff5116e - "401": - description: Invalid authentication credentials. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Unauthorized - "403": - description: You cannot consume this service. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: API rate limit exceeded. - "500": - description: Service Error - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/Errors" - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: 1490a74b-4c90-4e78-983d-4ede360ce52a - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: name resolution failed - "504": - description: API time out. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: The upstream server is timing out - security: - - Authorization: [] - /hotels/rateCalendar: - get: - tags: - - get-lodging-rate-calendar - summary: Get rate calendar of a property - description: The Rate Calendar API will return the lowest rate plan for a range - of days for one selected Expedia lodging property. - operationId: get-lodging-rate-calendar - parameters: - - name: Partner-Transaction-Id - in: header - description: > - The `Partner-Transaction-ID` is a required API request header - element that is not consumed - - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - - back to the partner in the corresponding API response header. - - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: ecomHotelId - in: query - description: > - The Expedia hotel ID for which the calendar is being requested. - - - **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. - - You may use one or the other, but not both. - schema: - type: string - - name: hcomHotelId - in: query - description: > - The Hotel.com hotel ID for which the calendar is being requested. - - - **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. - - You may use one or the other, but not both. - schema: - type: string - - name: startDate - in: query - description: > - Start date for check-in search range in an ISO 8601 Date format - [YYYY-MM-DD]. - - - **Note**: The start date may not be in the past. - required: true - schema: - type: string - format: date - example: 2022-09-12T00:00:00.000Z - - name: endDate - in: query - description: > - End date for check-in search range in an ISO 8601 Date format - [YYYY-MM-DD]. - - - **Note**: The end date must be after the start date. The maximum supported search range is 180 days. - required: true - schema: - type: string - format: date - example: 2022-09-14T00:00:00.000Z - - name: lengthOfStay - in: query - description: The length of stay to retrieve the lowest price for. - schema: - type: integer - format: int32 - default: 1 - - name: currency - in: query - description: The requested currency expressed according to ISO 4217. - schema: - type: string - responses: - "200": - description: Normal Response - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/RateCalendarResponse" - "400": - description: User Fault - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/Errors" - example: - Errors: - - Code: INVALID_HCOMHOTELID - Description: The hcomHotelId is invalid. Please specify correct Hcom hotel id. - TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 - "401": - description: Invalid authentication credentials. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Unauthorized - "403": - description: You cannot consume this service. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: You cannot consume this service - "409": - description: NO_RESULTS_FOUND - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/Errors" - example: - Errors: - - Code: NO_RESULTS_FOUND - Description: > - Sorry, your query appears to be correctly formatted, but - the inventory for which you are seeking - - details is now unavailable. - TransactionId: 2423025a-916f-4994-972a-68ee2e6b1e92 - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: API rate limit exceeded. - "500": - description: Service Error - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: "#/components/schemas/Errors" - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Name resolution failed. - "504": - description: API time out. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: The upstream server is timing out. - security: - - Authorization: [] - /lodging/quotes: - get: - tags: - - get-lodging-quotes - summary: Get properties price and availability information - description: > - The Lodging Quotes API will return the price and availability - information for given Expedia lodging property ID(s). - operationId: get-lodging-quotes - parameters: - - name: Partner-Transaction-Id - in: header - description: > - The `Partner-Transaction-ID` is a required API request header - element that is not consumed - - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - - back to the partner in the corresponding API response header. - - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: propertyIds - in: query - description: > - Comma-separated list of Expedia Property IDs. - - - ***NOTE**: This API supports Expedia property IDs only by design – HCOM and Vrbo property IDs are - - not supported.* - - - *For optimal performance, limiting your request to a maximum of 200 properties is recommended.* - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: checkIn - in: query - description: > - Check-in date for property stay in an ISO 8601 Date format. - - - This parameter should be used in combination with the checkOut parameter. - - - The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. - schema: - type: string - format: date - example: 2023-10-12 - - name: checkOut - in: query - description: > - Check-out date for property stay in an ISO 8601 Date format - - - This parameter should be used in combination with the checkIn parameter. - - - The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. - schema: - type: string - format: date - example: 2023-10-14 - - name: currency - in: query - description: > - The requested currency expressed according to ISO 4217. - - - PoS default currency will be passed if another currency is not specified in the request. - schema: - type: string - - name: links - in: query - description: | - Comma-separated list to specify the types of deep links. - - WD (link to web infosite) - - WS (link to web search result page) - - WEB (include all website links) - explode: false - schema: - type: array - items: - type: string - enum: - - WD - - WS - - WEB - - name: travelWithPets - in: query - description: > - Indicates if the search should include pet-friendly properties. - - - If set to "True" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. - - - The parameter is only applicable to the Vrbo brand. - schema: - type: boolean - default: false - - name: room1.adults - in: query - description: > - Specifies the number of adults staying in a specific room. - - - Example: `room1.adults` is used to specify the number of adults in the first room. - - - ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo - - properties should only include one room. e.g. 3 adults in room 1 and 3 in room 2, "room1.adults" is 6. - schema: - type: integer - format: int64 - example: 2 - - name: room1.childAges - in: query - description: > - Comma-separated list that specifies the age(s) for each of the - children in each of the rooms. - - - Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. - - - Children must be accompanied by an adult. - - - Total number of children is indicated by the number of childAges included. - - - If there are no children in the party then this value should not be included. - - - ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo - - properties should include the ages of all the children in the first room. e.g. 1 child age 10 in room #1 - - and 1 child age 11 in room #2, "room1.childAges" is 10,11. - explode: false - schema: - type: array - items: - type: string - example: - - 8 - - 10 - - name: room2.adults - in: query - description: Specifies the number of adults staying in second room. - schema: - type: integer - format: int64 - - name: room2.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in second room. - explode: false - schema: - type: array - items: - type: string - - name: room3.adults - in: query - description: Specifies the number of adults staying in third room. - schema: - type: integer - format: int64 - - name: room3.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in third room. - explode: false - schema: - type: array - items: - type: string - - name: room4.adults - in: query - description: Specifies the number of adults staying in fourth room. - schema: - type: integer - format: int64 - - name: room4.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in fourth room. - explode: false - schema: - type: array - items: - type: string - - name: room5.adults - in: query - description: Specifies the number of adults staying in fifth room. - schema: - type: integer - format: int64 - - name: room5.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in fifth room. - explode: false - schema: - type: array - items: - type: string - - name: room6.adults - in: query - description: Specifies the number of adults staying in sixth room. - schema: - type: integer - format: int64 - - name: room6.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in sixth room. - explode: false - schema: - type: array - items: - type: string - - name: room7.adults - in: query - description: Specifies the number of adults staying in seventh room. - schema: - type: integer - format: int64 - - name: room7.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in seventh room. - explode: false - schema: - type: array - items: - type: string - - name: room8.adults - in: query - description: Specifies the number of adults staying in eighth room. - schema: - type: integer - format: int64 - - name: room8.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in eighth room. - explode: false - schema: - type: array - items: - type: string - responses: - "200": - description: Normal Response - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: "#/components/schemas/LodgingQuotesResponse" - examples: - Lodging Quotes Response: - value: >- - { - "Count": 1, - "TotalPropertyCount": 1, - "TransactionId": "0e1d7193-2289-481c-bdf9-b7ac0b0b3bfe", - "StayDates": { - "CheckInDate": "2024-11-29", - "CheckOutDate": "2024-12-04" - }, - "LengthOfStay": 5, - "Occupants": [ - { - "Adults": 2 - } - ], - "Properties": [ - { - "Id": "87704892", - "Status": "AVAILABLE", - "RoomTypes": [ - { - "RatePlans": [ - { - "CancellationPolicy": { - "Refundable": true, - "FreeCancellation": true, - "FreeCancellationEndDateTime": "2024-11-15T23:59:00-08:00", - "CancellationPenaltyRules": [ - { - "PenaltyPercentOfStay": "50.00", - "PenaltyStartDateTime": "2024-11-15T23:59:00-08:00", - "PenaltyEndDateTime": "2024-11-22T23:59:00-08:00" - }, - { - "PenaltyPercentOfStay": "100", - "PenaltyStartDateTime": "2024-11-22T23:59:00-08:00", - "PenaltyEndDateTime": "2024-11-29T00:00:00-08:00" - } - ] - } - } - ], - "Price": { - "BaseRate": { - "Value": "790.00", - "Currency": "USD" - }, - "TaxesAndFees": { - "Value": "348.48", - "Currency": "USD" - }, - "TotalPrice": { - "Value": "1138.48", - "Currency": "USD" - }, - "AvgNightlyRate": { - "Value": "158.00", - "Currency": "USD" - }, - "AvgNightlyRateWithFees": { - "Value": "198.80", - "Currency": "USD" - }, - "TotalPriceWithPropertyFees": { - "Value": "1138.48", - "Currency": "USD" - } - }, - "Links": { - "WebSearchResult": { - "Method": "GET", - "Href": "https://www.vrbo.com/search?selected=87704892&startDate=2024-11-29&endDate=2024-12-04&adults=2&tpid=9001&eapid=1&mpa=790.00&mpb=348.48&mpd=USD&mctc=15" - }, - "WebDetails": { - "Method": "GET", - "Href": "https://www.vrbo.com/3032772?adults=2&startDate=2024-11-29&endDate=2024-12-04&mpa=790.00&mpb=348.48&mpd=USD&mpe=1721730597" - } - } - } - ] - } - ] - } - "400": - description: User Fault - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: "#/components/schemas/LodgingErrors" - example: - Errors: - - Code: INVALID_PROPERTYID - Description: The PropertyIds is invalid. Which should be comma separated list of - property IDs. - TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 - "401": - description: Invalid authentication credentials. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Unauthorized - "403": - description: You cannot consume this service. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: API rate limit exceeded. - "500": - description: Service Error - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: "#/components/schemas/LodgingErrors" - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Name resolution failed. - "504": - description: API time out. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: The upstream server is timing out. - security: - - Authorization: [] - /lodging/availabilityCalendars: - get: - tags: - - get-lodging-availability-calendars - summary: Get availability calendars of properties - description: Returns the availability of each day for a range of dates for given - Expedia lodging properties. - operationId: get-lodging-availability-calendars - parameters: - - name: Partner-Transaction-Id - in: header - description: > - The `Partner-Transaction-ID` is a required API request header - element that is not consumed - - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - - back to the partner in the corresponding API response header. - - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: propertyIds - in: query - description: > - Comma-separated list of Expedia Property IDs. - - - The API request supports a maximum of 50 Property IDs in a single request. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - responses: - "200": - description: Normal Response - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: "#/components/schemas/AvailabilityCalendarResponse" - "400": - description: User Fault - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: "#/components/schemas/LodgingErrors" - example: - Errors: - - Code: INVALID_PROPERTYIDS - Description: The propertyIds is invalid. Which should be comma separated list of - Expedia property IDs. - TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 - "401": - description: Unauthorized or Invalid authentication credentials. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Unauthorized - "403": - description: cannot consume this service. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: API rate limit exceeded. - "500": - description: Service Error - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: "#/components/schemas/LodgingErrors" - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: Name resolution failed. - "504": - description: API time out. - content: - application/json: - schema: - $ref: "#/components/schemas/APIGatewayError" - example: - message: The upstream server is timing out. - security: - - Authorization: [] - /cars/listings: - get: - tags: - - get-cars-listings - summary: Search Expedia car inventory - description: Search Expedia car inventory by date, pickup, and dropoff location - to return a listing of available cars for hire. - operationId: get-cars-listings - parameters: - - name: Partner-Transaction-Id - in: header - description: "[Not consumed by Expedia] Partner-generated identifier." - required: true - schema: - type: string - example: BestTravel-123456-798101112 - - name: pickup.airport - in: query - description: "Three letter code for the airport at which the customer would like - to pick up the car.Supported values: standard 3 letter IATA Airport - Code.Please see a full list of Car Vendor Codes and Airport Codes in - the Related Links Section below.Cannot coexist with other pickup - parameters, only one pickup parameter is allowed per request." - schema: - type: string - example: SEA - - name: pickup.city - in: query - description: The name of the city in which the customer would like to pick up - the car.Search results will include up to 40 rental locations that - are closest to the center point of the search.Cannot coexist with - other pickup parameters, only one pickup parameter is allowed per - request. - schema: - type: string - - name: pickup.address - in: query - description: The address of a car rental location where the customer would like - to pick up the car.Cannot coexist with other pickup parameters, only - one pickup parameter is allowed per request. - schema: - type: string - example: Seattle - - name: pickup.geoLocation - in: query - description: The latitude and longitude that defines where the customer would - like to pick up the car.Latitude and longitude are separated by - comma.South latitudes and West longitudes are represented by - negative values.Cannot coexist with other pickup parameters, only - one pickup parameter is allowed per request. - schema: - type: string - example: 111.00,-22.00 - - name: pickup.radius - in: query - description: Radius used in conjunction with a point to define the search area - when searching by lat/ long, city or address.See ' unit' parameter - below to select miles or kilometers.If no value is specified a - default value of 25 will be assumed. - schema: - type: integer - example: 10 - - name: dropOff.airport - in: query - description: "Three letter code for the airport at which the customer would like - to drop off the car.Supported values: standard 3 letter IATA Airport - Code.Please see a full list of Car Vendor Codes and Airport Codes in - the Related Links Section below.Cannot coexist with other drop off - parameters, only one drop off parameter is allowed per request.If no - drop off location is specified, it is assumed that the customer will - be dropping the car off at the same location at which they picked it - up." - schema: - type: string - example: SEA - - name: dropOff.city - in: query - description: City name for the location at which the customer would like to drop - off the car.Cannot coexist with other drop off parameters, only one - drop off parameter is allowed in a request.If no drop off location - is specified, it is assumed that the customer will be dropping the - car off at the same location at which they picked it up. - schema: - type: string - - name: dropOff.address - in: query - description: Address for the location at which the customer would like to drop - off the car.Cannot coexist with other drop off parameters, only one - drop off parameter is allowed in a request.If no drop off location - is specified, it is assumed that the customer will be dropping the - car off at the same location at which they picked it up. - schema: - type: string - example: Seattle - - name: dropOff.geoLocation - in: query - description: Latitude and longitude for the location at which the customer would - like to drop off the car.Latitude and longitude are separated by - comma.South latitudes and West longitudes are represented by - negative values.Cannot coexist with other drop off parameters, only - one drop off parameter is allowed per request.If no drop off - location is specified, it is assumed that the customer will be - dropping the car off at the same location at which they picked it - up. - schema: - type: string - example: 111.00,-22.00 - - name: dropOff.radius - in: query - description: "Radius used in conjunction with a point to define the search area - when searching by lat/ long, city or address.See ' unit' parameter - below to select miles or kilometers.If no value is specified a - default value of 25 will be assumed.Note: The pickup radius value - will be used (instead of the the drop-off radius) when the requested - pickup and drop-off city/address are exactly the same." - schema: - type: integer - example: 10 - - name: pickupTime - in: query - description: Requested car pickup date and time.Date should be ISO8601 Date - format.The default TIME is 10:30:00.The supported search window is - today to 330 days in the future.(Note that each rental counter has - different hours of operation. If you select a time in the middle of - the night there may be no inventory available as all locations may - be closed.) - required: true - schema: - type: string - format: date-time - example: 2021-06-05T10:00 - - name: dropOffTime - in: query - description: "Requested car drop off date and time. Date should be ISO8601 Date - format.The supported search window is today to 330 days in the - future.Note: The dropOffTime must be at least 2 hours later than the - pickupTime for the request to be valid." - required: true - schema: - type: string - format: date-time - example: 2021-06-06T10:00 - - name: sortType - in: query - description: "Method of sorting the car search results.Supported value: Price.If - no value is present a sort by 'price' will be assumed." - schema: - type: string - enum: - - Price - - name: sortOrder - in: query - description: "Order of sorting the car search results.Supported values: ASC, - DESCIf no value is present a sort order of 'ascending' will be - assumed." - schema: - type: string - enum: - - ASC - - DESC - - name: limit - in: query - description: The maximum number of search results that will be returned by the - query. - schema: - type: integer - example: 100 - - name: suppliers - in: query - description: "A list of supplier ids or supplier names to be used to filter - search results.Multiple supplier names or ids may be separated by - comma.Please see a full list of Expedia Vendor Codes & Names in the - Related Links Section below.The max count of suppliers requested is - limited to 20.Note: while you may filter using either supplier name - or supplier ID, it is recommended that you use supplier ID, as this - value will remain consistent in the event of a merger or other name - change by the supplier." - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - example: - - 11 - - 12 - - name: carClasses - in: query - description: A list of car classes to be used to filter search results.Multiple - car classes may be separated by comma.Please see Class List in the - Related Links Section below for all options. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - example: economy - - name: discount1.supplier - in: query - description: "Name or ID of the supplier who issued a coupon or discount - code.NOTE: Only ONE discount code per transaction is currently - supported by the API. If you enter more than one discount code, only - the first one will be honored.Please see a full list of Expedia - Vendor Codes & Names in the Related Links Section below." - schema: - type: string - example: Avis - - name: discount1.type - in: query - description: "The type of discount to be applied.Supported values: CorpDiscount - | Coupon." - schema: - type: string - enum: - - CorpDiscount - - Coupon - - name: discount1.code - in: query - description: The code of the discount to be applied. - schema: - type: string - example: GB1234 - - name: transmissions - in: query - description: A list of car transmission drive codes to be used to filter search - results.Multiple car classes may be separated by a comma.Please see - a full list of Transmission Drive Codes in the Related Links Section - below. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: airConditioning - in: query - description: Specify whether to filter for cars that include or exclude air - conditioning. - schema: - type: boolean - - name: carTypes - in: query - description: A list of car types to be used to filter search results.Multiple - car types may be separated by comma.Please see a full list of Car - Type Codes in the Related Links Section below. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - example: C,E - - name: unit - in: query - description: "The distance unit for the radius of a location-based search, or - the distance between the center point of a search and the vendor - location.Supported values: KM | MI.Default value: KM." - schema: - type: string - enum: - - KM - - MI - - name: driverAge - in: query - description: The age of the driver that will be renting the car.This value is - required in the UK and optional elsewhere. - schema: - type: integer - example: 18 - - name: links - in: query - description: WS = WebSearch, AD = ApiDetails, WD = WebDetails - explode: false - schema: - type: array - items: - type: string - enum: - - WS - - AD - - WD - - name: source - in: query - description: Indicates the source where the request is coming from.The available - values for the source as below:browser - The value "browser" - represents that the client is traditional website.mobile - The value - "mobile" represents that the client is mobile.all - The value "all" - indicates that the client includes both browser and mobile.Only one - source value may be used at a time. - schema: - type: string - enum: - - browser - - mobile - - all - responses: - "200": - description: car listing response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: "#/components/schemas/CarListingsResponse" - application/vnd.exp-car.v3+xml: - schema: - $ref: "#/components/schemas/CarListingsResponse" - "400": - description: errors response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: "#/components/schemas/CarsErrors" - examples: - Errors: - description: Errors - value: - Errors: - - Code: INVALID_LINKS - Description: Invalid links. Allowed value are:[WS, AD, WD]. - TransactionId: 583b7277-772a-4802-8ac7-bcdf978abbdb - application/vnd.exp-car.v3+xml: - schema: - $ref: "#/components/schemas/DisambiguationResponse" - examples: - DisambiguationResponse: - description: DisambiguationResponse - value: - Errors: - - Code: AMBIGUOUS_LOCATION - DetailCode: MULTIPLE_AMBIGUOUS_PICKUP_LOCATION - Description: Multiple pickup locations found. - LocationKeyword: portland - LocationOptions: - - Type: MULTICITY - RequestedLocation: Portland (and vicinity) - Locations: - - Name: Portland (and vicinity) - LocationId: seat001 - RegionId: "178299" - ShortName: Portland (and vicinity) - AirportCode: PDX - Address: Portland (and vicinity), Oregon, United States Of America - Country: - Name: United States of America - IsoCode2: US - IsoCode3: USA - GeoLocation: - Latitude: "45.516740" - Longitude: "-122.680950" - - Type: CITY - RequestedLocation: Portland (and vicinity) - Locations: - - Name: Portland (and vicinity) - LocationId: seat001 - RegionId: "6174134" - ShortName: Downtown Portland - AirportCode: PWM - Address: Downtown Portland, Portland, Maine, United States of America - Country: - Name: United States of America - IsoCode2: US - IsoCode3: USA - GeoLocation: - Latitude: "43.655764" - Longitude: "-70.255458" - TransactionId: 81e0a6d6-8ca9-4adf-a1c8-08ba0d11dcef - "401": - description: Unauthorized or Invalid authentication credentials - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - unauthorized: - value: '{message":"Unauthorized"}' - Invalid authentication credentials: - value: '{"message":"Invalid authentication credentials"}' - "403": - description: cannot consume this service - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - cannot consume this service: - value: '{"message":"You cannot consume this service"}' - "404": - description: No Route matched - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - no Route matched: - value: '{"message":"no Route matched with those values"}' - "429": - description: API rate limit exceeded - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - API rate limit exceeded: - value: '{"message":"API rate limit exceeded"}' - "503": - description: service unavailable - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - name resolution failed: - value: '{"message":"name resolution failed"}' - "504": - description: upstream server is timing out - content: - text/plain: - examples: - upstream server is timing out: - value: The upstream server is timing out - security: - - basicAuth: [] - "/cars/details/{offerToken}": - get: - tags: - - get-car-details - summary: Get Extended information with a single car offer - description: Extended information about the rates, charges, fees, and other - terms associated with a single car offer. - operationId: get-car-details - parameters: - - name: Partner-Transaction-Id - in: header - description: "[Not consumed by Expedia] Partner-generated identifier." - required: true - schema: - type: string - example: BestTravel-123456-798101112 - - name: price - in: query - description: The total price for the product. - required: true - schema: - type: string - - name: currency - in: query - description: Price currency code - required: true - schema: - type: string - example: USD - - name: source - in: query - description: source mobile - The value mobile represents that the client is - mobile. - schema: - type: string - example: mobile - - name: offerToken - in: path - description: car offer token - required: true - schema: - type: string - example: OFHSDJSJDFLJSDLKFJSDLJFLSDJFLSJDFL - responses: - "200": - description: car details successful response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: "#/components/schemas/CarDetailsResponse" - application/vnd.exp-car.v3+xml: - schema: - $ref: "#/components/schemas/CarDetailsResponse" - "400": - description: car details user fault response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: "#/components/schemas/CarsErrors" - application/vnd.exp-car.v3+xml: - schema: - $ref: "#/components/schemas/CarsErrors" - "401": - description: Unauthorized or Invalid authentication credentials - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - unauthorized: - value: '{message":"Unauthorized"}' - Invalid authentication credentials: - value: '{"message":"Invalid authentication credentials"}' - "403": - description: cannot consume this service - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - cannot consume this service: - value: '{"message":"You cannot consume this service"}' - "404": - description: No Route matched - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - no Route matched: - value: '{"message":"no Route matched with those values"}' - "429": - description: API rate limit exceeded - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - API rate limit exceeded: - value: '{"message":"API rate limit exceeded"}' - "500": - description: car details application error response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: "#/components/schemas/CarsErrors" - application/vnd.exp-car.v3+xml: - schema: - $ref: "#/components/schemas/CarsErrors" - "503": - description: service unavailable - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - name resolution failed: - value: '{"message":"name resolution failed"}' - "504": - description: upstream server is timing out - content: - text/plain: - examples: - upstream server is timing out: - value: The upstream server is timing out - security: - - basicAuth: [] - /feed/v1/download-url: - get: - tags: - - get-feed-download-url - operationId: get-feed-download-url - description: Get the Download URL and other details of the static files. - parameters: - - name: type - in: query - description: The type of file, used to get files by type. - deprecated: false - required: true - schema: - type: string - enum: - - DESTINATION - - VENDORLOGO - - SUMMARY - - LISTINGS - - IMAGES - - AMENITIES - - LOCATIONS - - DESCRIPTIONS - - POLICIES - - GUEST_REVIEW - - VACATION_RENTAL - - ALL_REGIONS - - BOUNDING_POLYGON - - HOTEL_TO_REGION_HIERARCHY - - ROOM_DETAILS - example: SUMMARY - - name: locale - in: query - description: 'Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: - "{LanguageCode}-{CountryCode}".Support multiple values, for the feed - files that support localization, Use this parameter to help filter - out the localization files you want to download. If not using this - parameter, then this API will return all locales files for specified - type. If the specified type of file is not supported localization, - there is no file will be returned.' - deprecated: false - required: false - schema: - type: string - example: en-US - - name: pointOfSupply - in: query - description: The point of supply means a country generally. The downloadable - files provided after specifying will only contain properties' - information for that country. - deprecated: false - required: false - schema: - type: string - enum: - - US - - AT - - BR - - CA - - FR - - DE - - GR - - IT - - JA - - KR - - MX - - PT - - ES - - TR - - AE - - GB - example: AT - - name: lodgingType - in: query - description: The lodging type also means structure type, it only can be - `CL`(Conventional Lodging) and `VR`(Vacation Rental). The - downloadable files provided after specifying will only contain - property information for that lodging type. - deprecated: false - required: false - schema: - type: string - enum: - - CL - - VR - example: CL - - name: brand - in: query - description: The downloadable files provided after specifying will only contain - property information for that brand. - deprecated: false - required: false - schema: - type: string - enum: - - VRBO - responses: - "200": - content: - application/vnd.exp-lodging.v1+json: - schema: - $ref: "#/components/schemas/PresignedUrlResponse" - examples: - SDP-Summary: - value: - transactionId: c12dcd5d-4d05-42ed-8119-0e97e11f7deb - bestMatchedFile: - fileContentType: Summary - locale: de-DE - fileName: expedia-lodging-summary-en_us-all.jsonl.zip - fileSize: - unit: MB - value: 198.12 - fileLastUpdated: Tue Mar 28 08:38:14 UTC 2023 - downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/expedia-lodging-summary-en_us-all.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=58714cc22181faea3243d689741ba0e7f1a43ae8cab172984778ca5f8b963f1f - downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 - otherFileOptions: - - fileContentType: Summary - locale: en-US - fileName: expedia-lodging-summary_filtered_by_canada_en_us.jsonl.zip - fileSize: - unit: MB - value: 18.12 - fileLastUpdated: Tue Mar 28 06:37:36 UTC 2023 - downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/filtered/expedia-lodging-summary_filtered_by_canada_en_us.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=ac4389b81d4b9e6563fd234b16dafceaab5fcbe2931454da2fe9956b1e3f5919 - filterConditions: - pointOfSupply: CA - bestMatchedLink: - href: https://localhost:8443/feed/v1/download-url?type=SUMMARY&pointOfSupply=CA - method: GET - - fileContentType: Summary - locale: en-US - fileName: expedia-lodging-summary_filtered_by_conventional_en_us.jsonl.zip - fileSize: - unit: MB - value: 98.12 - fileLastUpdated: Tue Mar 28 06:38:11 UTC 2023 - downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/filtered/expedia-lodging-summary_filtered_by_conventional_en_us.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=9364ec533e909c2cb3331f16a449feee41a968492e61bcdd5761e56e7bbad73a - downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 - filterConditions: - structureType: CONVENTIONAL - bestMatchedLink: - href: https://localhost:8443/feed/v1/download-url?type=SUMMARY&loadgingType=CL - method: GET - VendorLogo: - value: - transactionId: c12dcd5d-4d05-42ed-8119-0e97e11f7deb - bestMatchedFile: - fileName: VendorLogos.json - fileSize: - unit: MB - value: 1.32 - fileLastUpdated: Tue Mar 28 06:38:11 UTC 2023 - downloadUrl: https://ews-generated-feeds-prod-p.s3.us-west-2.amazonaws.com/vendor-logos/VendorLogos.json?response-content-disposition=inline&X-Amz-Security-Token=XXX - downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 - description: Download URLs successfully generated for the feed files. - "400": - content: - application/vnd.exp-lodging.v1+json: - schema: - $ref: "#/components/schemas/PresignedUrlResponse" - example: - transactionId: 38dc7269-12b1-58c9-a381-4963c274cdfe - error: - code: INVALID_TYPE_ATTR - description: Invalid type provided. - description: Invalid request from the client. - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/SdpAPIMError" - examples: - unauthorized: - value: - message: Unauthorized - Invalid authentication credentials: - value: - message: Invalid authentication credentials - description: Unauthorized or Invalid authentication credentials. - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/SdpAPIMError" - examples: - cannot consume this service: - value: - message: You cannot consume this service - description: Cannot consume this service. - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/SdpAPIMError" - examples: - no Route matched: - value: - message: no Route matched with those values - description: No Route matched. - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/SdpAPIMError" - examples: - API rate limit exceeded: - value: - message: API rate limit exceeded - description: API rate limit exceeded. - "500": - content: - application/vnd.exp-lodging.v1+json: - schema: - $ref: "#/components/schemas/PresignedUrlResponse" - example: - transactionId: 38dc7269-12b1-58c9-a381-4963c274cdfe - error: - code: SERVER_ERROR - description: An error has occurred while processing the request. - description: Server side error like backend service has some issues or some - issues in EWS Feed service. The Error code is SERVER_ERROR. - "503": - content: - application/json: - schema: - $ref: "#/components/schemas/SdpAPIMError" - examples: - service unavailable: - value: - message: name resolution failed - description: Service unavailable. - /activities/listings: - get: - tags: - - get-activity-listings - description: The Activities Search API allows partners to search for Expedia - Activity inventory. - operationId: get-activity-listings - parameters: - - name: location - in: query - description: >- - Can be a city name, street address, three-letter IATA Airport Code - or a landmark name. - - (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) - schema: - type: string - example: shenzhen - - name: geoLocation - in: query - description: >- - The latitude and longitude values identifying the center point of a - search radius (circle). - - North latitude will be represented by a positive value. South latitude by a negative value. - - East longitude will be represented by a positive value. West longitude by a negative value. - - The latitude and longitude values are joined together with a comma (,) character. - schema: - type: string - example: 25.070062,-121.538306 - - name: startDate - in: query - description: |- - Start date for the activity window in YYY-MM-DD format. - If an endDate value is supplied there must also be a startDate. - default: currentDate - schema: - type: string - format: date - example: 2021-10-01T00:00:00.000Z - - name: endDate - in: query - description: |- - End date for the activity window in YYY-MM-DD format. - default: "startDate+14" - schema: - type: string - format: date - example: 2021-10-10T00:00:00.000Z - - name: locale - in: query - description: >- - locale is composed of language identifier and region identifier, - connected by "_" that specifies the language in which the response - will be returned. - - example: "fr_FR" refers to French as spoken in France, while "fr_CA" refers to French as spoken in Canada. - - For a full list of supported locales please refer to the link at the bottom of the page. - schema: - type: string - example: en_US - - name: links - in: query - description: >- - Comma-separated list to specify the types of HATEAOS links returned - in the API Response. - - WD (deep link URL to web infosite) - - AD (details API query) - explode: false - schema: - type: array - items: - type: string - enum: - - WD - - AD - example: WD - - name: Partner-Transaction-Id - in: header - description: Partner-generated identifier. - required: true - schema: - type: string - example: BestTravel-123456-798101112 - responses: - "200": - description: successful - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: "#/components/schemas/ActivityListingsResponse" - example: - TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Count: 1 - Location: shenzhen, gd - StartDate: 2021-08-01T00:00:00.000Z - EndDate: 2021-08-08T00:00:00.000Z - Categories: - - Count: 1 - CategoryName: Cruises & Water Tours - CategoryDisplayName: Cruises & Water Tours - GroupName: Tours - GroupDisplayName: Tours - Activities: - - Id: 166597 - Title: "Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. Peter's Tour" - Description: Enjoy 5 of Seattle's most popular attractions with a multi-ticket - booklet that’s valid for 9 consecutive days. This pass is - perfect if you want to explore the city on your schedule, - craft your own itinerary, and visit the city’s can’t-miss - museums and most iconi.. - Media: - - Type: "1" - Size: t - Url: http://a.travel-assets.com/ lxweb/ media-vault/ 166597_m.jpeg? v=104741 - Categories: - - Walking & Bike Tours - Duration: PT3H0M - CancellationPolicy: - FreeCancellation: true - Price: - Category: Adult - TotalRate: - Value: 100 - Currency: USD - ReferencePrice: - Category: Adult - TotalRate: - Value: 110 - Currency: USD - Savings: - percentage: 42 - amount: - Value: "9" - Currency: USD - Redemption: - Type: Voucherless - Locations: - - Address: - Address1: 99 Union St - City: Seattle - PostalCode: "431625" - Province: WA - Country: USA - GeoLocation: - Latitude: "47.60772" - Longitude: -122.33936 - Locations: - - Address: - Address1: 99 Union St - City: Seattle - PostalCode: "431625" - Province: WA - Country: USA - GeoLocation: - Latitude: "47.60772" - Longitude: -122.33936 - Supplier: - Name: City Wonders - RecommendationScore: 90 - ReviewCount: 100 - Links: - WebDetails: - Href: https://www.expedia.com/things-to-do/space-needle-observation-deck-admission.a193678.activity-details?srp=true&location=sea - ApiDetails: - Accept: application/vnd.exp-activity.v3+json - Method: GET - Href: https://apim.expedia.com/activities/details/CgUyMDIzMBIyCgkyMDEzMDQ1OTYSCTIwOTc3MjcwOBoCMjQqCjIwMTctMTEtMTkyCjIwMTctMTEtMjUqAwoBMg - "400": - description: >- - Client side error while providing the request i.e bad / invalid - input parameters. The server responds back with " - + "this Http response code and with the appropriate JSON error response. - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: "#/components/schemas/ActivitiesErrors" - example: - Errors: - - Code: AMBIGUOUS_LOCATION - Description: Multiple search locations found. - LocationKeyword: 99UnionSt - LocationOptions: - - ShortName: Union Grove, Wisconsin, United States of America - Address: Milwaukee (and vicinity), Wisconsin, United States of America - RequestedLocation: United States - Locations: - - Name: Portland (and vicinity) - LocationId: seat001 - TransactionId: cecf62c8-c103-4181-b09d-53c7190d1c48 - "401": - description: Unauthorized or Invalid authentication credentials - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - unauthorized: - value: |- - { - "message": "Unauthorized" - } - Invalid authentication credentials: - value: |- - { - "message": "Invalid authentication credentials" - } - "403": - description: cannot consume this service - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - cannot consume this service: - value: |- - { - "message": "You cannot consume this service" - } - "404": - description: No Route matched - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - no Route matched: - value: |- - { - "message": "no Route matched with those values" - } - "429": - description: API rate limit exceeded - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - API rate limit exceeded: - value: |- - { - "message": "API rate limit exceeded" - } - "500": - description: >- - Server side error i.e connection timeout while talking to downstream - services, downstream returned error. The server responds back with - this Http " - + "response code and with the appropriate JSON error response. - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: "#/components/schemas/ActivitiesErrors" - "503": - description: name resolution failed - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - name resolution failed: - value: |- - { - "message": "name resolution failed" - } - "504": - description: upstream server is timing out - content: - text/plain: - examples: - upstream server is timing out: - value: The upstream server is timing out - security: - - basicSchema: [] - "/activities/details/{offerToken}": - get: - tags: - - get-activity-details - description: The Activity Details API provides detailed information about one - selected activity. - operationId: get-activity-details - parameters: - - name: offerToken - in: path - description: the offerToken of a activity - required: true - schema: - type: string - example: CgY0NzY2NzgSCjIwMjEtMDUtMDIaCjIwMjEtMDUtMDc - - name: locale - in: query - description: >- - locale is composed of language identifier and region identifier, - connected by "_" that specifies the language - - in which the response will be returned. - - example: "fr_FR" refers to French as spoken in France, while "fr_CA" refers to French as spoken in Canada. - - For a full list of supported locales please refer to the link at the bottom of the page. - schema: - type: string - example: en_US - - name: Partner-Transaction-Id - in: header - description: Partner-generated identifier. - required: true - schema: - type: string - example: BestTravel-123456-798101112 - responses: - "200": - description: successful - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: "#/components/schemas/ActivityDetailsResponse" - example: - TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Count: 1 - Location: shenzhen, gd - StartDate: 2021-08-01T00:00:00.000Z - EndDate: 2021-08-08T00:00:00.000Z - Categories: - - Count: 1 - CategoryName: Cruises & Water Tours - CategoryDisplayName: Cruises & Water Tours - GroupName: Tours - GroupDisplayName: Tours - Activities: - - Id: 166597 - Title: "Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. Peter's Tour" - Description: Enjoy 5 of Seattle's most popular attractions with a multi-ticket - booklet that’s valid for 9 consecutive days. This pass is - perfect if you want to explore the city on your schedule, - craft your own itinerary, and visit the city’s can’t-miss - museums and most iconi.. - Media: - - Type: "1" - Size: t - Url: http://a.travel-assets.com/ lxweb/ media-vault/ 166597_m.jpeg? v=104741 - Categories: - - Walking & Bike Tours - Duration: PT3H0M - CancellationPolicy: - FreeCancellation: true - Price: - Category: Adult - TotalRate: - Value: 100 - Currency: USD - ReferencePrice: - Category: Adult - TotalRate: - Value: 110 - Currency: USD - Savings: - percentage: 42 - amount: - Value: "9" - Currency: USD - Redemption: - Type: Voucherless - Locations: - - Address: - Address1: 99 Union St - City: Seattle - PostalCode: "431625" - Province: WA - Country: USA - GeoLocation: - Latitude: "47.60772" - Longitude: -122.33936 - Locations: - - Address: - Address1: 99 Union St - City: Seattle - PostalCode: "431625" - Province: WA - Country: USA - GeoLocation: - Latitude: "47.60772" - Longitude: -122.33936 - Supplier: - Name: City Wonders - RecommendationScore: 90 - ReviewCount: 100 - Links: - WebDetails: - Href: https://www.expedia.com/things-to-do/space-needle-observation-deck-admission.a193678.activity-details?srp=true&location=sea - ApiDetails: - Accept: application/vnd.exp-activity.v3+json - Method: GET - Href: https://apim.expedia.com/activities/details/CgUyMDIzMBIyCgkyMDEzMDQ1OTYSCTIwOTc3MjcwOBoCMjQqCjIwMTctMTEtMTkyCjIwMTctMTEtMjUqAwoBMg - "400": - description: >- - Client side error while providing the request i.e bad / invalid - input parameters. The server responds back with " - + "this Http response code and with the appropriate JSON error response. - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: "#/components/schemas/ActivitiesErrors" - example: - Errors: - - Code: INVALID_LINKS - Description: Invalid links. Allowed value are:[WS, AD, WD]. - TransactionId: 583b7277-772a-4802-8ac7-bcdf978abbdb - "401": - description: Unauthorized or Invalid authentication credentials - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - unauthorized: - value: |- - { - "message": "Unauthorized" - } - Invalid authentication credentials: - value: |- - { - "message": "Invalid authentication credentials" - } - "403": - description: cannot consume this service - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - cannot consume this service: - value: |- - { - "message": "You cannot consume this service" - } - "404": - description: No Route matched - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - no Route matched: - value: |- - { - "message": "no Route matched with those values" - } - "429": - description: API rate limit exceeded - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - API rate limit exceeded: - value: |- - { - "message": "API rate limit exceeded" - } - "500": - description: >- - Server side error i.e connection timeout while talking to downstream - services, downstream returned error. The server responds back with - this Http " - + "response code and with the appropriate JSON error response. - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: "#/components/schemas/ActivitiesErrors" - "503": - description: name resolution failed - content: - application/json: - schema: - $ref: "#/components/schemas/APIMError" - examples: - name resolution failed: - value: |- - { - "message": "name resolution failed" - } - "504": - description: upstream server is timing out - content: - text/plain: - examples: - upstream server is timing out: - value: The upstream server is timing out - security: - - basicSchema: [] -components: - schemas: - Address: - type: object - properties: - Address1: - type: string - description: Street Number, Street Name, or PO Box - example: 724 Pine St - Address2: - type: string - description: Apartment, Floor, Suite, Bldg or more specific information about - Address1. - example: Second Floor - City: - type: string - description: The city - example: New York - Province: - type: string - description: The state or province - example: NY - Country: - type: string - description: 3-letter code for the country - example: USA - PostalCode: - type: string - description: Zip/postal code - example: "98004" - description: The address information of the location. - AgeClassRestriction: - type: object - properties: - AgeClass: - type: string - description: Categories for hotel guests, based on age. - example: Senior - enum: - - All Ages - - Senior - - Adult - - Child - - Infant - - Other - AgeMinimum: - type: integer - description: The minimum age defined in a particular `AgeClass`. - format: int32 - example: 2 - AgeMaximum: - type: integer - description: | - The maximum age defined in a particular `AgeClass`. - - If not specified, the `AgeClass` has no upper bound. - format: int32 - example: 17 - MaxGuestCount: - type: integer - description: The max guest count allowed in a particular `AgeClass`. - format: int32 - example: 3 - description: Container for room occupancy rules based on the age of the guests. - BedType: - type: object - properties: - Id: - type: string - description: The bed type ID - example: "40" - Description: - type: string - description: The bed type description. - example: 1 bed - description: > - Statement of bed types available for this offer. A room may have several - bed type options available. - - - **NOTE**: due to the large number of bed type options available, we no longer publish a list of available - - bed types. More information is available in - - [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - CancellationPenaltyRule: - type: object - properties: - PenaltyNightCount: - type: integer - description: > - Specifies the per-stay cancellation fee charged in terms of the cost - of the number of nights listed, in - - addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. - format: int32 - example: 1 - PenaltyPercentOfStay: - type: string - description: > - Specifies the per-stay cancellation fee charged as a percentage of - the total rate, in addition to any other - - penalties listed. - example: "100" - PenaltyPrice: - allOf: - - $ref: "#/components/schemas/Money" - - description: Specifies the cancellation fee in terms of a set fee, in addition - to any other penalties listed. - PenaltyStartDateTime: - type: string - description: > - The beginning of the window of time when the - `CancellationPenaltyRule` is in effect. - - - The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - format: date-time - example: 2022-07-23T23:00:00.000Z - PenaltyEndDateTime: - type: string - description: > - The end of the window of time when the `CancellationPenaltyRule` is - in effect. - - - The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - format: date-time - example: 2022-07-25T23:00:00.000Z - WaiverPolicy: - type: object - properties: - WaiverPolicyDescription: - type: string - description: > - The localized waiver policy description, which could be put in front - of cancellation policy description. - example: > - You can cancel for a full refund up to 24 hours after booking (not - applicable to bookings made within 72 hours of check-in time). After - 24 hours: - CancellationPolicy: - type: object - properties: - WaiverPolicy: - $ref: "#/components/schemas/WaiverPolicy" - CancellableOnline: - type: boolean - description: >- - Boolean value to identify if the reservation can be cancelled - online. - - If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. - example: true - Refundable: - type: boolean - description: Indicate whether the rate is refundable or not. - example: true - FreeCancellation: - type: boolean - description: Indicate whether the room can be cancelled free of charge. - example: true - FreeCancellationEndDateTime: - type: string - description: > - The date and time until which the room can be cancelled free of - charge. - - - This is expressed in the local time of the Hotel. - format: date-time - CancellationPenaltyRules: - type: array - description: Container for cancellation penalty details. - items: - $ref: "#/components/schemas/CancellationPenaltyRule" - CancelPolicyDescription: - type: string - description: Additional cancellation policy information available as static text. - example: Free cancellation available before 2022-07-18T16:00:00-08:00 - NonRefundableDateRanges: - type: array - description: > - A list of dates ranges that are non-refundable. - - - **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation - - penalty rule. - items: - $ref: "#/components/schemas/NonRefundableDateRange" - description: Container for room cancellation policy. - ChainAndBrandInfo: - type: object - properties: - ChainId: - type: integer - description: The chain id. - format: int32 - example: -5 - ChainName: - type: string - description: The name of the chain. - example: Hilton Worldwide - BrandId: - type: integer - description: The brand id. - format: int32 - example: 33 - BrandName: - type: string - description: The name of the brand. - example: Doubletree - description: > - The chain and brand information of hotel. - - - Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - Country: - type: object - properties: - Name: - type: string - description: country name - example: Ireland - IsoCode2: - type: string - description: 2-letter code for the country - example: IE - IsoCode3: - type: string - description: 3-letter code for the country - example: IRL - description: Container for disambiguation country information - DepositDetail: - type: object - properties: - Type: - type: string - description: >- - Should be one of the following values: - - PERCENT - - The deposit amount is calculated as a percentage of the total booking cost. - - NIGHT - - The deposit amount is calculated in terms of nights plus tax. - - AMOUNT - - The deposit amount in USD. - - REMAINDER - - The deposit amount is equal to the booking cost minus any deposits that have been made before this point. - example: NIGHT - enum: - - PERCENT - - NIGHT - - AMOUNT - - REMAINDER - Value: - type: string - description: Value to indicate how many/much of the type listed above is going - to be charged as a deposit. - example: "1" - When: - $ref: "#/components/schemas/When" - description: Container for deposit policy details - DepositPolicy: - type: object - properties: - Description: - type: array - items: - type: string - Details: - type: array - description: Container for deposit policy details - items: - $ref: "#/components/schemas/DepositDetail" - description: Container for deposit policy details - Description: - type: object - properties: - LocationTeaser: - type: string - description: A description of the property's location. - example: Built on the original site of the University of Washington - HotelTeaser: - type: string - description: A description of the features and amenities of the property itself. - example: A top-notch fitness club and spa features a pool - RoomTeaser: - type: string - description: The common description for all of the rooms in the property. - example: Renovated in May 2016, guest rooms feature upholstered chairs - description: Container for the descriptions of the property. - Distance: - type: object - properties: - Value: - type: string - description: The distance between the center of the search and the hotel. - example: "75" - Unit: - type: string - description: The unit of distance. - example: km - enum: - - km - - mi - Direction: - type: string - description: The direction to the hotel from the center point of the search. - example: N - enum: - - N - - S - - W - - E - - NW - - NE - - SW - - SE - description: > - Container for distance information. - - - Only returned for city/address search or `geoLocation` search or single `regionId` search. - GeoLocation: - type: object - properties: - Latitude: - type: string - description: Latitude of the location. - example: "38.184978" - Longitude: - type: string - description: Longitude of the location. - example: "85.7412" - Obfuscated: - type: boolean - description: Container for Geo location. - Hotel: - type: object - properties: - Id: - type: string - description: The unique, Expedia-specific hotel property identifier used to - designate a single hotel. - example: "14747" - HcomId: - type: string - description: > - The unique, Hotels.com-specific hotel property identifier used to - designate a single hotel. - - - This will only be returned if searching via hcomHotelIds in request. - example: "10532" - Name: - type: string - description: The common name of the hotel - example: Four Seasons Hotel Seattle - PropertyType: - $ref: "#/components/schemas/HotelPropertyType" - PropertyDetails: - $ref: "#/components/schemas/PropertyDetails" - LocalCurrencyCode: - type: string - description: The Local Currency Code for Hotel (which will be used for any fees - that must be paid at the hotel) - example: USD - Location: - allOf: - - $ref: "#/components/schemas/Location" - - description: Container for information about the location of the hotel. - PhoneInfos: - type: array - description: > - Container for property phone numbers. - - - Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. - items: - $ref: "#/components/schemas/Phone" - Distance: - $ref: "#/components/schemas/Distance" - Description: - $ref: "#/components/schemas/Description" - Status: - type: string - description: > - Indicates whether there are available offers at the property during - the dates requested, as well as - - information as to why. - - - Note that pricing will only be present in the API response for a status of `AVAILABLE`. - - - If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be - - returned. - - - If there are available rooms, but none that meet the specific parameters of the search request, - - then one of the other messages will be returned. - example: AVAILABLE - enum: - - AVAILABLE - - NOT_AVAILABLE - - ERROR - - NUMBER_OF_ADULTS_NOT_ACCEPTED - - NUMBER_OF_CHILDREN_NOT_ACCEPTED - - NUMBER_OF_INFANTS_NOT_ACCEPTED - - NUMBER_OF_PERSONS_NOT_ACCEPTED - - CHECK_IN_AGE_NOT_ACCEPTED - RenovationsAndClosures: - type: array - description: The information about renovations and closures - example: - - The following facilities are closed seasonally each year... - items: - type: string - description: The information about renovations and closures - example: The following facilities are closed seasonally each year... - ChainAndBrandInfo: - $ref: "#/components/schemas/ChainAndBrandInfo" - ThumbnailUrl: - type: string - description: > - URL of the thumbnail image of the hotel. - - - Note that other images sizes are available - You can find a link to the complete list of Supported - - Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - example: https://images.trvl-media.com/hotels/3000000/2170000/2163100/2163007/2163007_15_t.jpg - StarRating: - type: string - description: Star rating value of the hotel property. - example: "5.0" - enum: - - "1.0" - - "1.5" - - "2.0" - - "2.5" - - "3.0" - - "3.5" - - "4.0" - - "4.5" - - "5.0" - GuestRating: - type: string - description: | - Average overall guest rating of the hotel. - - The value is between 1.0 and 5.0 in 0.1 increments. - - Higher is better. - example: "4.5" - GuestReviewCount: - type: integer - description: The total count of guest reviews used to create the average - `GuestRating` above. - format: int32 - example: 240 - PetFriendly: - type: boolean - description: > - Indicates whether the property allows certain pets under certain - circumstances. - - - Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out - - whether a particular pet will be permitted to stay at the property. - example: true - LgbtqiaFriendly: - type: boolean - description: This value is returned if the property owner has specifically - designated this property as LGBTQIA-friendly. - example: true - Links: - type: object - properties: - WebSearchResult: - allOf: - - $ref: "#/components/schemas/Link" - - description: Link to web search result page. - ApiRateCalendar: - allOf: - - $ref: "#/components/schemas/Link" - - description: Link for Rate Calendar API. - additionalProperties: - $ref: "#/components/schemas/Link" - description: > - Container for list of **HATEOAS** links to Expedia website to - complete booking. - - - This links section will only return a deeplink to the Website Search Results page by default. - - - If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the - - response, as the Lodging Details API returns details at the room offer level, and not at the property level. - Policies: - $ref: "#/components/schemas/HotelPolicies" - CleanlinessAndSafety: - type: object - additionalProperties: - type: array - items: - type: string - description: > - Container for all cleanliness and safety measures. - - - The key is the measures category, the values are the information. The category will be: - - - CLEANLINESS - - - SOCIAL_DISTANCING - - - SAFETY - - - DISCLAIMER - example: - CLEANLINESS: - - Disinfectant is used to clean the property - - High-touch surfaces are cleaned and disinfected - - Sheets and towels are washed at 60°C/140°F or hotter - SOCIAL_DISTANCING: - - Contactless check-in and check-out - - Social distancing measures in place - OptionalExtras: - type: array - description: The optional extras info. - items: - type: string - description: The optional extras info. - ImportantNotices: - type: array - description: The important notices for hotel. - example: - - This property can only accept bookings for essential travel or - stays. You may be asked to provide evidence of this on arrival. - For more information, check local advisories before you book. - items: - type: string - description: The important notices for hotel. - example: This property can only accept bookings for essential travel or stays. - You may be asked to provide evidence of this on arrival. For more - information, check local advisories before you book. - Media: - type: array - description: Container for hotel images - items: - $ref: "#/components/schemas/Media" - HotelAmenities: - type: array - description: Container for all hotel amenities. - items: - allOf: - - $ref: "#/components/schemas/LodgingAmenity" - - description: Container for all hotel amenities. - - properties: - Id: - description: The identification number for a hotel amenity. - Name: - description: The description of a hotel amenity. - HotelDescriptiveAmenities: - type: object - additionalProperties: - type: array - items: - type: string - description: > - Container for all hotel amenities in group. - - - The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - - - PARKING - - - FOOD_AND_DRINK - - - INTERNET - - - THINGS_TO_DO - - - FAMILY_FRIENDLY - - - CONVENIENCES - - - GUEST_SERVICES - - - BUSINESS_SERVICE - - - OUTDOOR - - - ACCESSIBILITY - - - SPA - - - ACTIVITIES_NEARBY - - - LANGS_SPOKEN - - - MORE - - - The category for grouped amenities in hotel level for Vacation Rental hotel will be: - - - BEACH - - - SKI - - - POOL/SPA - - - INTERNET - - - PARKING - - - FAMILY_FRIENDLY - - - KITCHEN - - - DINING - - - BEDROOM - - - BATHROOMS - - - LIVING_SPACES - - - ENTERTAINMENT - - - OUTDOORS - - - LAUNDRY - - - WORKSPACES - - - CLIMATE_CONTROL - - - PETS - - - SUITABILITY/ACCESSIBILITY - - - SERVICES_AND_CONVENIENCES - - - LOCATION_HIGHLIGHTS - - - THINGS_TO_DO - - - GENERAL - - - SAFETY - example: - FAMILY_FRIENDLY: - - Refrigerator - GUEST_SERVICES: - - 24-hour front desk - - Housekeeping (on request) - - Luggage storage - - Multilingual staff - MORE: - - At least 80% lighting from LEDs - - Communal living room - - Comprehensive food waste policy - RoomAmenities: - type: array - description: Container for all room amenities. - items: - allOf: - - $ref: "#/components/schemas/LodgingAmenity" - - description: Container for all room amenities. - - properties: - Id: - description: The identification number for a room amenity. - Name: - description: The description of a room amenity. - RoomDescriptiveAmenities: - type: object - additionalProperties: - type: array - items: - type: string - description: > - Container for all common room amenities in group. - - - The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - - - BEDROOM - - - BATHROOM - - - FOOD_AND_DRINK - - - ENTERTAINMENT - - - OUTDOOR_SPACE - - - MORE - example: - ENTERTAINMENT: - - Flat-screen TV - - iPad - - iPod dock - - Satellite channels - FOOD_AND_DRINK: - - Free bottled water - - Refrigerator - MORE: - - Desk - - Eco-friendly cleaning products provided - - Energy-saving switches - Accessibility: - type: array - description: | - The accessibility options available for the room. - - Possible accessibility include: - - Accessible path of travel - - Accessible bathroom - - Roll-in shower - - Handicapped parking - - In-room accessibility - - Accessibility equipment for the deaf - - Braille or raised signage - example: - - Wheelchair-accessible on-site restaurant - - Wheelchair-accessible lounge - - Well-lit path to entrance - - Stair-free path to entrance - - Wheelchair accessible (may have limitations) - - Wheelchair accessible path of travel - - Accessible bathroom (in select rooms) - - Wheelchair-accessible public washroom - - In-room accessibility (in select rooms) - - Wheelchair-accessible registration desk - - Wheelchair-accessible fitness center - - Wheelchair-accessible meeting spaces/business center - items: - type: string - description: The accessibility options available for the room. - example: Wheelchair-accessible on-site restaurant - MemberOnlyDealAvailable: - type: boolean - description: Indicates whether the property has member only deal rates available. - example: true - RoomTypes: - type: array - description: Container for all of available room types. - items: - $ref: "#/components/schemas/RoomType" - description: Container for information on each offered hotel. - HotelDetailsResponse: - type: object - properties: - Warnings: - type: array - description: > - There were some errors or events during the transaction, but the API - has still returned a response. - - - Container for all warnings. - items: - allOf: - - $ref: "#/components/schemas/Warning" - - properties: - Code: - description: > - The code of the warning. - - - Available values are: - - - PRICE_DECREASED: The price decreased after shopping. - - - PRICE_INCREASED: The price increased after shopping. - - - CURRENCY_CHANGE: You will be charged in a different currency. - OriginalPrice: - description: The original price from the Lodging Search API response. - NewPrice: - description: The new price. - ChangedAmount: - description: The difference between `OriginalPrice` and `NewPrice`. - TransactionId: - type: string - description: Unique identifier for the transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - StayDates: - allOf: - - $ref: "#/components/schemas/StayDates" - - description: Dates of the requested property stay. - - properties: - CheckInDate: - description: > - Check-in date for property stay in an ISO 8601 Date format - [YYYY-MM-DD]. - - - This parameter should be used in combination with the `checkOut` parameter. - - - The maximum advanced search window is 330 days in the future. - - - The maximum length of stay is 28 days. - CheckOutDate: - description: > - Checkout date for property stay in an ISO 8601 Date format - [YYYY-MM-DD]. - - - This parameter should be used in combination with the `checkIn` parameter. - - - The maximum advanced search window is 330 days in the future. - - - The maximum length of stay is 28 days. - LengthOfStay: - type: integer - description: The number of stay nights. - format: int32 - example: 3 - NumberOfRooms: - type: integer - description: Number of rooms requested. - format: int32 - example: 3 - Occupants: - type: array - description: | - Container for the list of rooms requested by the traveler. - - Occupancy for each room is specified in this node. - items: - allOf: - - $ref: "#/components/schemas/Occupant" - - description: | - Container for the list of rooms requested by the traveler. - - Occupancy for each room is specified in this node. - - properties: - Adults: - description: Specifies the number of adults staying in each room. - ChildAges: - description: Specifies the age(s) of each of the children staying in the room, - as well as the number of children in the room. - ValidFormsOfPayment: - type: array - description: Container for payment information. - items: - $ref: "#/components/schemas/ValidFormsOfPayment" - HotelDetails: - $ref: "#/components/schemas/Hotel" - HotelPolicies: - type: object - properties: - CheckInStartTime: - type: string - description: Beginning of the standard check-in window on the check in date, and - in the local time of the hotel. - example: 3 PM - CheckInEndTime: - type: string - description: End of the standard check-in window on the check in date, and in - the local time of the hotel. - example: 5 PM - SpecialCheckInInstructions: - type: array - description: Some special instructions needed care by customer when check in. - example: - - "Special Instructions: The check-in location differs from the - property location. To check in, go to 301 N Water St." - items: - type: string - description: > - Any special instructions that the guest would need to know in - order to check in. - - - Particularly important in a vacation rental property, as many of these do not have a hosted front desk as - - a hotel would. - example: "Special Instructions: The check-in location differs from the property - location. To check in, go to 301 N Water St." - CheckOutTime: - type: string - description: Customers must check out before this time on the check out date, - expressed in the local time of the hotel. - example: noon - PetPolicies: - type: array - description: The policy of the property toward having pets stay with guests. - example: - - Pets allowed, Up to 20 lb - items: - type: string - description: The policy of the property toward having pets stay with guests. - example: Pets allowed, Up to 20 lb - ChildrenAndExtraBedsPolicies: - type: array - description: The policy of the hotel for having children stay at the hotel, as - well as for including extra beds in the room. - example: - - Children are welcome, Cribs/infant beds (surcharge) - items: - type: string - description: Container for Hotel policy information. - HotelPropertyType: - type: object - properties: - Id: - type: integer - description: The id of hotel property type. - format: int32 - example: 13 - Name: - type: string - description: The name of hotel property type. - example: Ranch - description: > - Container for information on hotel property type. - - - You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - Link: - type: object - properties: - Accept: - type: string - description: The Accept request header (for API queries only - not included for - page URLs). - Method: - type: string - description: Method of request. - Href: - type: string - description: The URL of the destination web page or API query. - Location: - type: object - properties: - Address: - $ref: "#/components/schemas/Address" - GeoLocation: - allOf: - - $ref: "#/components/schemas/GeoLocation" - - description: Container for information on the geographic location of the hotel. - - properties: - Latitude: - type: string - description: > - The geographic coordinates of the hotel property, based on a - horizontal angular measurement relative to The Equator. - - - North latitude will be represented by a positive value. - - - South latitude will be represented by a negative value. - example: "38.184978" - Longitude: - type: string - description: > - The geographic coordinates of the hotel property, based on a - vertical angular measurement relative to the universal Prime - Meridian (Royal Observatory, Greenwich). - - - East longitude will be represented by a positive value. - - - West longitude will be represented by a negative value. - example: "85.7412" - Obfuscated: - type: boolean - description: > - Indicates whether the displayed Latitude/Longitude - information is obfuscated. - - - Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search - - or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long - - value will be returned that will indicate the general area within which the property is located, - - but not the exact location of the property itself. - Neighborhood: - $ref: "#/components/schemas/Neighborhood" - description: Container for list of possible locations that could be used to - disambiguate the query. - LodgingAmenity: - type: object - properties: - Id: - type: string - example: "2065" - Name: - type: string - example: Business center - MandatoryFeesDetail: - type: object - properties: - Type: - type: string - description: Type of mandatory fee. - enum: - - City_LocalTax_Amt - - City_LocalTax_Pcnt - - CleaningFee_Amt - - CleaningFee_Pcnt - - ClubCardAdult - - ClubCardChild - - DestinationFee_Amt - - DestinationFee_Pcnt - - GalaDinnerAdult - - GalaDinnerChild - - GalaDinnerChineseNYAdult - - GalaDinnerChineseNYChild - - GalaDinnerNYDayAdult - - GalaDinnerNYDayChild - - GalaDinnerNYEveAdult - - GalaDinnerNYEveChild - - GalaDinnerValentinesDayAdult - - GalaDinnerValentinesDayChild - - GalaDinnerXMASDayAdult - - GalaDinnerXMASDayChild - - GalaDinnerXMASEveAdult - - GalaDinnerXMASEveChild - - ResortFee_Amt - - ResortFee_Pcnt - - SanitationFee - - SeasonalHeatingFee - - TourismFee_Amt - - TourismFee_Pcnt - - TowelSheetsFee_Amt - - TransferFee_Amt_Adult - - TransferFee_Amt_Child - - UtilitySurcharge - example: TransferFee_Amt_Child - Amount: - allOf: - - $ref: "#/components/schemas/Money" - - description: Value of hotel mandatory fee. - description: The breakdown for the taxes and fees that must be paid at the property. - Media: - type: object - properties: - Type: - type: string - description: | - Supported type of media. - - 1=Image. - - Only 1 is supported now. - example: "1" - enum: - - 1 - Title: - type: string - description: Image title - example: Guestroom - Size: - type: string - description: > - Image size. - - You can find a link to the complete list of Supported Images Sizes in - - [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - example: t - Url: - type: string - description: Image URL - example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg - description: Container for hotel images - Money: - type: object - properties: - Value: - type: string - description: The value of the element being defined. - example: "21.9" - Currency: - type: string - description: The ISO 4217 Currency Code that the value is expressed in. - example: USD - LocalCurrencyPrice: - $ref: "#/components/schemas/Money" - description: Pricing information of the stat date - Neighborhood: - type: object - properties: - Id: - type: string - description: Neighborhood id. - example: "6160232" - Name: - type: string - description: Neighborhood name. - example: Le Pharo - description: Geography entities which are typically contained within a city. - This includes the categories neighborhood and point of interest. Low - level regions are not a formally defined concept in the geography model. - NightlyRates: - type: object - properties: - StayDate: - type: string - format: date - example: 2022-07-19T00:00:00.000Z - BaseRate: - $ref: "#/components/schemas/Money" - NonRefundableDateRange: - type: object - properties: - StartDate: - type: string - description: Start date of a non-refundable date range. - format: date - example: 2022-07-04T00:00:00.000Z - EndDate: - type: string - description: End date of a non-refundable date range. - format: date - example: 2022-07-05T00:00:00.000Z - Occupant: - type: object - properties: - Adults: - type: integer - description: | - The number of adults in a room. - format: int32 - example: 1 - ChildAges: - type: array - description: | - The ages of children in a room. - example: - - 2 - - 3 - - 5 - items: - type: integer - description: | - The age of children in a room. - format: int32 - description: Container for the list of room occupants. - PaymentSchedule: - type: object - properties: - Due: - type: string - description: Date/Time stamp when this installment/deposit should be paid by. - format: date - example: 2022-09-03T00:00:00.000Z - Price: - allOf: - - $ref: "#/components/schemas/Money" - - description: The monetary amount of the install/deposit required to book the - hotel and product. - description: Contains information on the payment schedule. - Phone: - type: object - properties: - CountryCode: - type: string - description: The designated country calling code. - example: "1" - AreaCode: - type: string - description: The phone's area code. - example: "614" - Number: - type: string - description: The phone's local number. - example: "9288472" - ExtensionNumber: - type: string - description: Optional extension number, if required to reach the hotel. - example: "3114" - Promotion: - type: object - properties: - Description: - type: string - description: The description of the promotion. - example: 20%Off - Amount: - allOf: - - $ref: "#/components/schemas/Money" - - description: > - The value of the promotion. - - - **CMA Compliance Note (UK)**: Both standard room rates and promotional rates are set and managed by the - - hoteliers and not Expedia. - PropertyDetails: - type: object - properties: - PropertyRegistryNumber: - type: string - description: The registry number of property. - example: P-20131 - HostLanguages: - type: array - description: The languages the host of property will speak. - example: - - English - - Chinese - items: - type: string - MaxOccupancy: - type: integer - description: The maximum number of guests allowed to stay in the property. - format: int32 - example: 12 - NumberOfBedrooms: - type: integer - description: The number of bedrooms in the property. - format: int32 - example: 4 - NumberOfBathrooms: - type: integer - description: The number of bathrooms in the property. - format: int32 - example: 1 - SquareFeet: - type: string - description: Property area in square feet. - example: "123.5" - PropertyManager: - $ref: "#/components/schemas/PropertyManager" - description: > - Container for information about the hotel property detail. It will be - shown for Vacation Rental hotel only. - PropertyManager: - type: object - properties: - Name: - type: string - description: The name of the property manager. - example: Mike - CalendarLastUpdated: - type: string - description: The latest updated date. - format: date - PhotoUrl: - type: string - description: The URL for property manager's photo. - example: https://imagesus-ssl.homeaway.com/mda01/ff30bc14-157c-43fc-ad8c-d2ce36bc7e83.4.1 - description: Container for information about the property manager. It will be - shown for Vacation Rental hotel only. - RatePlan: - type: object - properties: - RoomTypeId: - type: string - description: The room type identifier. - example: "200287452" - RatePlanId: - type: string - description: The rate plan identifier. - example: "201714191" - RateRuleId: - type: string - description: The identifier of rate rule. - example: "213544817" - InventorySourceId: - type: string - description: The identification number of the source that provides the rate plan. - example: "24" - InventorySourceCode: - type: string - description: The source name that provided the rate plan. - example: JT - StayDates: - $ref: "#/components/schemas/StayDates" - RemainingCount: - type: integer - description: > - The number of rooms remaining through Expedia for this room type. - - - **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, - - only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's - - inventory. - - - When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel - - through other channels. - - - Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are - - more than 100 rooms available within bookable Expedia inventory. - - - **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to - - consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number - - remaining at the property. - format: int32 - example: 3 - Price: - type: object - description: Container for all price components of the rate plan. - properties: - BaseRate: - allOf: - - $ref: "#/components/schemas/Money" - description: The price of the rate plan for all occupants, excluding taxes and - fees. - TaxesAndFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The total rate of taxes and fees of the rate plan for all - occupants. - TotalPrice: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total price of the rate plan, which is equal to the sum of - `BaseRate` + `TaxesAndFees`. - - Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. - - Promotion amount have been deducted from the `TotalPrice` value. - TotalStrikeOutPrice: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total amount to strikeout price. This value is the sum of - the pre-discount `BaseRate` + the - - pre-discount `TaxesAndFees`. - AvgNightlyRate: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average nightly base rate per night per room of the rate - plan, which is equal to the `BaseRate` - - divided by `StayDates` and by `room number`. - AvgNightlyStrikeOutRate: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average nightly strike out price per night per room of the - rate plan, which is equal to the - - strike out of `BaseRate` divided by `StayDates` and by `room number`. - HotelMandatoryFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The total mandatory fees which will be charged at the hotel for the - rate plan. - RefundableDamageDeposit: - allOf: - - $ref: "#/components/schemas/Money" - description: The refundable damage deposit. - NightlyRates: - type: array - items: - allOf: - - $ref: "#/components/schemas/NightlyRates" - - properties: - StayDate: - description: A single night during the requested stay. - BaseRate: - description: Container for nightly base rate. - description: Nightly base rate of the rate plan. - TaxesAndFeesDetails: - type: array - items: - allOf: - - $ref: "#/components/schemas/TaxesAndFeesDetail" - - properties: - CategoryCode: - description: Category ID of this specific tax or fee. - Amount: - description: The value of this specific tax or fee. - description: > - Container for taxes and fees detail information. - - Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - RoomRates: - type: array - items: - allOf: - - $ref: "#/components/schemas/RoomRates" - description: Container for the rate information of all rooms. This is only - returned in Lodging Details API. - MemberOnlyDeal: - type: boolean - description: > - Indicates whether the rate is for member only. - - - Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - example: true - Promotions: - type: array - description: All promotion information of the `ratePlan`. - items: - $ref: "#/components/schemas/Promotion" - StandalonePrice: - type: object - description: > - The corresponded standalone price to the package rate plan (to show - the `strikethrough`). - - - Only returned when the returned `rateplan` is being used as part of a package. - properties: - BaseRate: - allOf: - - $ref: "#/components/schemas/Money" - description: The standalone price of the rate plan for all occupants, excluding - taxes and fees. - StrikeOutBaseRate: - allOf: - - $ref: "#/components/schemas/Money" - description: The base rate strikeout in the standalone shopping path. - TaxesAndFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The total standalone rate of taxes and fees of the rate plan for - all occupants. - StrikeOutTaxesAndFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The taxes and fees strikeout in the standalone shopping path. - TotalPrice: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total standalone price of the rate plan, which is equal to - the sum of `BaseRate` and `TaxesAndFees`. - - Hotel mandatory fees are not included as these are paid at the hotel at checkout. - TotalStrikeOutPrice: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total strikeout in the standalone shopping path, which is - equal to the sum of `StrikeOutBaseRate` and - `StrikeOutTaxesAndFees`. - AvgNightlyRate: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average standalone nightly base rate per night per room of - the rate plan, which is equal to the - - `BaseRate` divided by `StayDates` and by `room number`. - AvgNightlyStrikeOutRate: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average strikeout of the base rate in the standalone - shopping path, which is per night per room and is equal to - - `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - HotelMandatoryFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The total standalone mandatory fees. - StrikeOutHotelMandatoryFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The strikeout of the mandatory fees in the standalone shopping - path. - TaxesAndFeesInclusive: - type: boolean - description: Indicates whether taxes and fees are included in base rate. - example: false - GuaranteeText: - type: string - description: Text description for any deposit information provide by the - property (if applicable). - example: Price Guarantee - PaymentMethod: - type: string - description: > - Room payment information. The available options are: - - - Online: Pay at the time of booking - - - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` - example: Online - enum: - - Online - - Hotel - PaymentTime: - type: string - description: > - The time when the booking amount will be charged on the traveler’s - credit card. Valid values are as follows: - - - UponBooking - - - PayLater - - - SupplierDiscretion - example: PayLater - enum: - - UponBooking - - PayLater - - SupplierDiscretion - FullDepositUponBooking: - type: boolean - description: > - It will be true if PaymentSchedule has one installment and the value - of "Due" is booking date, otherwise, - - it will be false. - example: true - PaymentSchedule: - type: array - description: Contains information on the payment schedule. - items: - $ref: "#/components/schemas/PaymentSchedule" - ReserveWithDeposit: - type: boolean - description: Indicates whether this rate plan need deposit to reserve. - example: true - FreeInternet: - type: boolean - description: Indicates whether the price of the room includes free Internet. - (either wireless or wired) - example: true - FreeWiFi: - type: boolean - description: Indicates whether the price of the room includes free wireless - Internet access. - example: true - FreeInternetDetails: - type: array - description: > - The localized details for the free internet amenity (only shown when - FreeInternet = true). - - - You can find a link to the complete list of Free Internet Details in - - [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - example: - - Free Wireless Internet, Wired high-speed Internet-comp - items: - type: string - description: The localized details for the free internet amenity (only shown - when FreeInternet = true). - example: Free Wireless Internet, Wired high-speed Internet-comp - FreeParking: - type: boolean - description: Indicates whether the price of the room includes free parking. - example: true - FreeBreakfast: - type: boolean - description: Indicates whether the price of the room includes free breakfast. - example: true - FreeBreakfastDetails: - type: array - description: > - The localized details for the free breakfast amenity (only shown - when FreeBreakfast = true). - - - You can find a link to the complete list of Free Breakfast Details in - - [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - example: - - Full Breakfast - - Full Board - items: - type: string - description: The localized details for the free breakfast amenity (only shown - when FreeBreakfast = true). - example: Full Breakfast - HcomRewardsEarn: - type: boolean - description: Indicate whether the room qualifies for Hcom Rewards Earn. - (Hotels.com partners only) - example: true - HcomRewardsBurn: - type: boolean - description: Indicate whether the room qualifies for Hcom Rewards Burn. - (Hotels.com partners only) - example: true - CancellationPolicy: - $ref: "#/components/schemas/CancellationPolicy" - Amenities: - type: array - description: The amenities of the `rateplan`. - items: - allOf: - - $ref: "#/components/schemas/LodgingAmenity" - - description: The amenities of the `rateplan`. - - properties: - Id: - description: Amenity ID. - Name: - description: Amenity Name. - description: Container for information on each rate plan. - RoomOccupancyPolicy: - type: object - properties: - MaxGuestCount: - type: integer - description: The maximum number of guests allowed to stay in a room. - format: int32 - example: 3 - MinCheckInAge: - type: integer - description: The minimum age required for check-in. - format: int32 - example: 19 - IncludedGuestCount: - type: integer - description: The number of guests included in base rate. - format: int32 - example: 2 - MinGuestAge: - type: integer - description: The minimum age required for any guest staying in the room. - format: int32 - example: 0 - AgeClassRestrictions: - type: array - description: Container for room occupancy rules based on the age of the guests. - items: - $ref: "#/components/schemas/AgeClassRestriction" - description: Room occupancy policy. - RoomPreference: - type: object - properties: - Type: - type: string - description: |- - The type of preference. Options are: - SmokingPreference - Bed - example: SmokingPreference - enum: - - SmokingPreference - - Bed - Value: - type: string - description: >- - The value of the room preference. - - - For SmokingPreference, options are - - - SmokingOrNonSmoking - - Smoking - - NonSmoking - - For supported Bed Types, please refer to the Related Links section at the bottom of the page. - example: NonSmoking - description: Container for room preferences. - RoomRates: - type: object - properties: - RoomIndex: - type: integer - description: Index of which of the requested rooms this entry refers to. - format: int32 - example: 1 - BaseRate: - allOf: - - $ref: "#/components/schemas/Money" - - description: The price of the room, excluding taxes and fees. - TaxesAndFees: - allOf: - - $ref: "#/components/schemas/Money" - - description: The total rate of taxes and fees of the room. - TotalPrice: - allOf: - - $ref: "#/components/schemas/Money" - - description: > - The total price of the room, which is equal to the sum of the - `BaseRate` and `TaxesAndFees`. - - - Hotel mandatory fees are not included as these are paid at the property at checkout. - TotalStrikeOutPrice: - allOf: - - $ref: "#/components/schemas/Money" - - description: > - The total strike out price of the room, which is equal to the - sum of the `BaseRate`'s totalStrikeOut - - and `TaxesAndFees`'s totalStrikeOut. - TaxesAndFeesDetails: - type: array - description: > - The breakdown for taxes and fees for this room for the entire stay. - - - Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - items: - allOf: - - $ref: "#/components/schemas/TaxesAndFeesDetail" - - properties: - CategoryCode: - description: Tax or fee category code. - Amount: - description: Tax or fee value. - MandatoryFeesDetails: - type: array - description: The breakdown for the taxes and fees that must be paid at the - property. - items: - $ref: "#/components/schemas/MandatoryFeesDetail" - NightlyRates: - type: array - description: Container for the nightly rate of current room. - items: - allOf: - - $ref: "#/components/schemas/NightlyRates" - - description: Container for the nightly rate of current room. - - properties: - StayDate: - description: One date of the property stay - BaseRate: - description: Nightly Base Rate for the selected date of stay. - RoomType: - type: object - properties: - Description: - type: string - description: Text description of the room type. - example: Room, 1 King Bed, City View (Seattle V) - RoomKey: - type: string - description: > - An encrypted string which includes the information that could be - used to address the current room type. - - - `RoomKey` has been renamed as `OfferId`. - deprecated: true - OfferId: - type: string - description: An encrypted string which includes the information that could be - used to address the current room type. - example: wMRoCMjQqCDIwMTcwN - MerchantName: - type: string - description: Name of Merchant that did the initial Authentication. - example: EXPEDIA - RatePlanType: - type: string - description: | - Indicate the room type is sold as package or standalone. - example: package - enum: - - standalone - - package - - wholesale - RatePlans: - type: array - description: Container for rate plan information. - items: - $ref: "#/components/schemas/RatePlan" - Price: - type: object - description: Container of all price components of the room. - properties: - BaseRate: - allOf: - - $ref: "#/components/schemas/Money" - description: The price of the rate plan for all occupants, excluding taxes and - fees. - TaxesAndFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The total rate of taxes and fees of the rate plan for all - occupants. - TotalPrice: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total price of the rate plan, which is equal to the sum of - `BaseRate` and `TaxesAndFees`. Hotel - - mandatory fees are not included as these are paid at the hotel at checkout. - TotalStrikeOutPrice: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total strike out price of the rate plan, which is equal to - the sum of `BaseRate`'s - - `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. - AvgNightlyRate: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average nightly base rate per night per room of the room - type, which is equal to the `BaseRate` - - divided by `StayDates` and by `room number`. - AvgNightlyStrikeOutRate: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average nightly strike out rate per night per room of the - room type, which is equal to the - - strike out of `BaseRate` divided by `StayDates` and by `room number`. - AvgNightlyRateWithFees: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average nightly rate per night per room of the room type, - including all fees except those imposed by the government. - AvgNightlyStrikeoutRateWithFees: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average nightly strike out rate per night per room of the - room type, including all fees except those imposed by the - government. - HotelMandatoryFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The total mandatory fees which will be charged at the hotel for the - rate plan. - TotalPriceWithHotelFees: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total combined price that includes `TotalPrice` that will be - charged by Expedia (`BaseRate` + - - `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. - - **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the - - quoted price will only be accurate for the day of quote. This is due to the fact that - - currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to - - be collected at the hotel during the guest's stay if the cost is converted into any other currency. - - **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to - - be compliant with CMA requirements. - RefundableDamageDeposit: - allOf: - - $ref: "#/components/schemas/Money" - description: The refundable damage deposit for the rate plan. - StandalonePrice: - type: object - description: > - The corresponded standalone price to the package rate plan (to show - the `strikethrough`). - - - Only returned when this is a package rate plan. - properties: - BaseRate: - allOf: - - $ref: "#/components/schemas/Money" - description: The standalone price of the rate plan for all occupants, excluding - taxes and fees. - StrikeOutBaseRate: - allOf: - - $ref: "#/components/schemas/Money" - description: The base rate strikeout in the standalone shopping path. - TaxesAndFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The total standalone rate of taxes and fees of the rate plan for - all occupants. - StrikeOutTaxesAndFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The taxes and fees strikeout in the standalone shopping path. - TotalPrice: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total standalone price of the rate plan, which is equal to - the sum of `BaseRate` and `TaxesAndFees`. - - Hotel mandatory fees are not included as these are paid at the hotel at checkout. - TotalStrikeOutPrice: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The total strikeout in the standalone shopping path, which is - equal to the sum of `StrikeOutBaseRate` and - `StrikeOutTaxesAndFees`. - AvgNightlyRate: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average standalone nightly base rate per night per room of - the rate plan, which is equal to the - - `BaseRate` divided by `StayDates` and by `room number`. - AvgNightlyStrikeOutRate: - allOf: - - $ref: "#/components/schemas/Money" - description: > - The average strikeout of the base rate in the standalone - shopping path, which is per night per room and is equal to - - `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - HotelMandatoryFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The total standalone mandatory fees. - StrikeOutHotelMandatoryFees: - allOf: - - $ref: "#/components/schemas/Money" - description: The strikeout of the mandatory fees in the standalone shopping - path. - "Promotions [deprecated]": - type: array - description: > - All promotion information of the room. - - - **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. - deprecated: true - items: - $ref: "#/components/schemas/Promotion" - Links: - type: object - properties: - WebSearchResult: - allOf: - - $ref: "#/components/schemas/Link" - - description: Link to web search result page. - WebDetails: - allOf: - - $ref: "#/components/schemas/Link" - - description: Link to web infosite. - ApiDetails: - allOf: - - $ref: "#/components/schemas/Link" - - description: Link for details API. - additionalProperties: - $ref: "#/components/schemas/Link" - description: > - Container for list of HATEOAS links to either Expedia website or - additional Expedia APIs to complete booking - - of the selected offer. - - - Which links are returned in this section are defined by the `links` parameter in the Search API query. - - - Available links are: - - - WebSearchResult (link to web search result page) - - - WebDetails (link to web infosite) - - - ApiDetails (link for details API) - SmokingOption: - type: string - description: The smoking options available for the room type. - example: SmokingOrNonSmoking - enum: - - SmokingOrNonSmoking - - Smoking - - NonSmoking - BedTypeOptions: - type: array - description: > - Statement of bed types available for this offer. A room may have - several bed type options available. - - - **NOTE**: due to the large number of bed type options available, we no longer publish a list of available - - bed types. More information is available in - - [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - items: - $ref: "#/components/schemas/BedType" - RoomOccupancyPolicy: - $ref: "#/components/schemas/RoomOccupancyPolicy" - Amenities: - type: array - description: Container for all room amenities. - items: - allOf: - - $ref: "#/components/schemas/LodgingAmenity" - - description: The amenity of the room. - - properties: - Id: - description: Amenity id - Name: - description: Amenity name - DescriptiveAmenities: - type: object - additionalProperties: - type: array - items: - type: string - description: > - Container for all room amenities in group. - - - The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - - - ACCESSIBILITY - - - BATHROOM - - - BEDROOM - - - CLUB_EXEC - - - FAMILY_FRIENDLY - - - ENTERTAINMENT - - - FOOD_AND_DRINK - - - INTERNET - - - MORE - - - OUTDOOR_SPACE - - - SAFETY - example: - FOOD_AND_DRINK: - - 2 restaurants - - Coffee/tea in common area(s) - Media: - type: array - description: Container for Media elements. - items: - allOf: - - $ref: "#/components/schemas/Media" - - description: Media elements. - StayDates: - type: object - properties: - CheckInDate: - type: string - description: The initial day of the hotel stay in an ISO 8601 Date format - [YYYY-MM-DD]. - format: date - CheckOutDate: - type: string - description: The final day of the hotel stay in an ISO 8601 Date format - [YYYY-MM-DD]. - format: date - description: Container for information for the stay dates of the rate plan. - TaxesAndFeesDetail: - type: object - properties: - CategoryCode: - type: string - example: "401" - Amount: - $ref: "#/components/schemas/Money" - ValidFormsOfPayment: - type: object - properties: - PaymentMethod: - type: string - description: The payment method. - example: DebitCard - Name: - type: string - description: The brand name of the payment sub-method to be displayed to the - customer. - example: Visa - PaymentSubMethod: - type: string - description: The payment sub-method. - example: Visa - deprecated: true - BrandName: - type: string - description: > - The brand name of the payment sub-method to be displayed to the - customer. - - - In many cases it will be the same as the payment sub-method, but "Visa/Carte Blanche" and "Visa/Delta" are some of the exceptions. - example: Visa - deprecated: true - description: Container for hotel supported payment information. - Warning: - type: object - properties: - Code: - type: string - description: The code of a warning. - example: INVALID_CORPORATE_DISCOUNT_CODE - Description: - type: string - description: A detail information of what happened. - example: The Corporate DiscountCode '811490' is unavailable, but we found other - rates for you. - OriginalPrice: - $ref: "#/components/schemas/Money" - NewPrice: - $ref: "#/components/schemas/Money" - ChangedAmount: - $ref: "#/components/schemas/Money" - ChangedPercentage: - type: string - description: |- - The changed percentage. - In the sample 2.97 means the changed percentage is 2.97%. - example: "2.97" - description: > - There were some errors or events during the transaction, but the API has - still returned a response. - - - Container for all warnings. - When: - type: object - properties: - Type: - type: string - description: >- - Indicates the time of the deposit collection. - - Options are: - - UPON_BOOKING - - The customer must pay the deposit when booking the property. - - DAYS_PRIOR - - The customer must pay the deposit a number of days before arriving at the property. - - UPON_ARRIVAL - - The customer must pay the deposit upon arriving at the property. - example: UPON_BOOKING - enum: - - UPON_BOOKING - - DAYS_PRIOR - - UPON_ARRIVAL - Value: - type: string - description: This value will only be shown when Deposit Type is DAYS_PRIOR to - indicate the number of days prior to check in when the deposit will - be collected. - example: "1" - description: Indicate when to pay. - Error: - type: object - properties: - Code: - type: string - description: Error code describing the issue - example: AMBIGUOUS_LOCATION - DetailCode: - type: string - description: Detailed error code describing the issue. - example: MULTIPLE_AMBIGUOUS_LOCATION - Description: - type: string - description: A simple description of what the error is. - example: More than one location found - LocationKeyword: - type: string - description: The requested location that caused the error. - example: Portland - LocationOptions: - type: array - description: Container for possible matches to your ambiguous `locationKeyword` - query. - items: - $ref: "#/components/schemas/LocationOption" - description: Container for error list. - Errors: - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: "#/components/schemas/Error" - TransactionId: - type: string - description: A unique identifier for the transaction. - example: a9e371c4-89d9-4f9c-8df7-df105830e7fe - LocationOption: - type: object - properties: - Type: - type: string - description: Type of the location. - example: TRAINSTATION - RegionId: - type: string - description: RegionId the location resides in. - example: "6200275" - ShortName: - type: string - description: The name of the location which matches the location keyword. - example: Dublin Connolly Station - AirportCode: - type: string - description: Indicates the nearest major airport to the location. - example: DUB - Address: - type: string - description: The address of the location. - example: Dublin Connolly Station, Ireland - Country: - $ref: "#/components/schemas/Country" - GeoLocation: - $ref: "#/components/schemas/GeoLocation" - description: Container for possible matches to your ambiguous `locationKeyword` query. - APIGatewayError: - type: object - properties: - message: - type: string - HotelListingsResponse: - type: object - properties: - Warnings: - type: array - description: > - There were some errors or events during the transaction, but the API - has still returned a response. - - - Container for all warnings. - items: - $ref: "#/components/schemas/Warning" - Count: - type: integer - description: The number of hotels actually returned in the response. - format: int32 - example: 99 - TotalHotelCount: - type: integer - description: The number of hotels present in the location. - format: int32 - example: 230 - TransactionId: - type: string - description: Unique identifier for the transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - StayDates: - allOf: - - $ref: "#/components/schemas/StayDates" - - description: Container for requested dates of stay. - LengthOfStay: - type: integer - description: The number of stay nights. - format: int32 - example: 3 - NumberOfRooms: - type: integer - description: The number of the rooms requested on behalf of the user. - format: int32 - example: 3 - Occupants: - type: array - description: Container of occupants. It is an array including occupants of each - room. - items: - $ref: "#/components/schemas/Occupant" - Hotels: - type: array - description: Container for all hotels. - items: - $ref: "#/components/schemas/Hotel" - HotelRateCalendar: - type: object - properties: - EcomHotelId: - type: string - description: The unique, Expedia-specific hotel property identifier used to - designate a single hotel. - example: "14747" - HcomHotelId: - type: string - description: > - The unique, Hotels.com-specific hotel property identifier used to - designate a single hotel. - - - This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. - example: "10532" - RateCalendar: - type: array - description: Container for all rate calendar data. - items: - $ref: "#/components/schemas/RateCalendar" - description: Container for all hotel rate calendar data. - RateCalendar: - type: object - properties: - StayDate: - type: string - description: Stay date for which the price is returned. - format: date - example: 2022-09-02T00:00:00.000Z - Price: - allOf: - - $ref: "#/components/schemas/Money" - - description: Container for pricing information. - - properties: - Value: - description: The total price of the corresponding date. - Currency: - description: > - The ISO 4217 Currency Code that the Value is expressed in. - - - See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) - - for a full list of supported currencies. - PriceLevel: - type: string - description: > - Indicates how that day's price compares to the other lowest price - for that hotel over the searched date - - range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - - - HIGH: 65th percentile+ - - - MEDIUM: 30th Percentile+ - - - LOW: Anything lower than 30th percentile - example: MEDIUM - enum: - - HIGH - - MEDIUM - - LOW - Status: - type: string - description: Represents whether the offer is currently available. - enum: - - AVAILABLE - - NOT_AVAILABLE - example: AVAILABLE - description: The lowest rate information of requested days - RateCalendarResponse: - type: object - properties: - Warnings: - type: array - description: > - There were some errors or events during the transaction, but the API - has still returned a response. - - - Container for all warnings. - items: - $ref: "#/components/schemas/Warning" - TransactionId: - type: string - description: Unique identifier for the transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - RateCalendars: - type: array - description: Container for all hotel rate calendar data. - items: - $ref: "#/components/schemas/HotelRateCalendar" - LodgingCancellationPenaltyRule: - type: object - properties: - PenaltyPercentOfStay: - type: string - description: > - Specifies the per-stay cancellation fee charged as a percentage of - the total rate, in addition to any other - - penalties listed. - example: "100" - PenaltyStartDateTime: - type: string - description: > - The beginning of the window of time when the - `CancellationPenaltyRule` is in effect. - - - The date and time are expressed in ISO 8601 International Date format, and local to the property. - format: date-time - example: 2022-07-23T23:00:00.000Z - PenaltyEndDateTime: - type: string - description: > - The end of the window of time when the `CancellationPenaltyRule` is - in effect. - - - The date and time are expressed in ISO 8601 International Date format, and local to the property. - format: date-time - example: 2022-07-25T23:00:00.000Z - description: Container for cancellation penalty details. - LodgingCancellationPolicy: - type: object - properties: - Refundable: - type: boolean - description: Indicate whether the rate is refundable or not. - example: true - FreeCancellation: - type: boolean - description: Indicate whether the room can be cancelled free of charge. - example: true - FreeCancellationEndDateTime: - type: string - description: The date and time until which the room can be cancelled free of - charge. - format: date-time - CancellationPenaltyRules: - type: array - description: Container for Cancellation Penalty Rules information. - items: - $ref: "#/components/schemas/LodgingCancellationPenaltyRule" - description: Container for Cancellation Policy information. - Property: - type: object - properties: - Id: - type: string - description: The unique property identifier used to designate a single property. - example: "14747" - Status: - type: string - description: Represents whether the offer is currently available. - example: AVAILABLE - enum: - - AVAILABLE - - NOT_AVAILABLE - - ERROR - - NUMBER_OF_ADULTS_NOT_ACCEPTED - - NUMBER_OF_CHILDREN_NOT_ACCEPTED - - NUMBER_OF_INFANTS_NOT_ACCEPTED - - NUMBER_OF_PERSONS_NOT_ACCEPTED - - CHECK_IN_AGE_NOT_ACCEPTED - RoomTypes: - type: array - description: Container for all of available room types. - items: - $ref: "#/components/schemas/LodgingRoomType" - description: Container for information on each offered hotel. - LodgingLink: - type: object - properties: - Accept: - type: string - description: > - The Accept request header for API queries only. - - - Note: this value will only be returned if the link is an API query, as website URLs do not require an - - `Accept` header. - Method: - type: string - description: Method of request. - example: GET - Href: - type: string - description: The URL of the destination web page or API query. - LodgingMoney: - type: object - properties: - Value: - type: string - description: The value of the element being defined. - example: "21.9" - Currency: - type: string - description: The ISO 4217 Currency Code that the value is expressed in. - example: USD - description: Pricing information of the stat date - LodgingOccupant: - type: object - properties: - Adults: - type: integer - description: The number of adults in a room. - format: int32 - example: 1 - ChildAges: - type: array - description: The ages of children in a room. - example: - - 2 - - 3 - - 5 - items: - type: integer - format: int32 - LodgingPromotion: - type: object - properties: - Description: - type: string - description: The description of the promotion. - example: 20%Off - Amount: - $ref: "#/components/schemas/LodgingMoney" - LodgingRatePlan: - type: object - properties: - CancellationPolicy: - $ref: "#/components/schemas/LodgingCancellationPolicy" - Promotions: - type: array - description: All promotion information of the ratePlan. - items: - $ref: "#/components/schemas/LodgingPromotion" - description: Container for rate plan information. - LodgingRoomType: - type: object - properties: - RatePlans: - type: array - description: Container for rate plan information. - items: - $ref: "#/components/schemas/LodgingRatePlan" - Price: - type: object - properties: - BaseRate: - allOf: - - $ref: "#/components/schemas/LodgingMoney" - description: The price of the rate plan for all occupants, excluding taxes and - fees. - TaxesAndFees: - allOf: - - $ref: "#/components/schemas/LodgingMoney" - description: The total amount of taxes and fees of the rate plan for all - occupants. - TotalPrice: - allOf: - - $ref: "#/components/schemas/LodgingMoney" - description: > - The total price of the rate plan, which is equal to the sum of - `BaseRate` + `TaxesAndFees`. - - Property mandatory fees are not included in this value as these are paid at the property at - - checkout. - AvgNightlyRate: - allOf: - - $ref: "#/components/schemas/LodgingMoney" - description: > - The average nightly base rate per night per room of the rate - plan, which is equal to the `BaseRate` - - divided by `StayDates` and by `room number`. - AvgNightlyRateWithFees: - allOf: - - $ref: "#/components/schemas/LodgingMoney" - description: > - The average nightly rate per night per room of the room type, - including all fees except those imposed by the government. - PropertyMandatoryFees: - allOf: - - $ref: "#/components/schemas/LodgingMoney" - description: The total mandatory fees which will be charged at the property for - the rate plan. - TotalPriceWithPropertyFees: - allOf: - - $ref: "#/components/schemas/LodgingMoney" - description: > - The total price of the rate plan include property mandatory - fees, which is equal to the sum of - - `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. - - **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the - - quoted price will only be accurate for the day of quote. This is due to the fact that - - currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to - - be collected at the hotel during the guest's stay if the cost is converted into any other currency. - - **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to - - be compliant with CMA requirements. - RefundableDamageDeposit: - allOf: - - $ref: "#/components/schemas/LodgingMoney" - description: The refundable damage deposit. - description: Container for Price information. - Links: - type: object - properties: - WebSearchResult: - allOf: - - $ref: "#/components/schemas/LodgingLink" - - description: Link to web search result page. - WebDetails: - allOf: - - $ref: "#/components/schemas/LodgingLink" - - description: Link to web infosite. - additionalProperties: - $ref: "#/components/schemas/LodgingLink" - description: > - Container for list of HATEOAS links to either Expedia website or - additional Expedia APIs to complete booking of the selected offer. - - - Which links are returned in this section are defined by the links parameter in the Search API query. - - Available links are: - - - WebDetails (link to web infosite) - - - WebSearchResult (link to web search result page) - LodgingStayDates: - type: object - properties: - CheckInDate: - type: string - description: The initial day of the property stay in an ISO 8601 Date format - [YYYY-MM-DD]. - format: date - CheckOutDate: - type: string - description: The final day of the property stay in an ISO 8601 Date format - [YYYY-MM-DD]. - format: date - description: | - Container for requested dates of stay. - LodgingWarning: - type: object - properties: - Code: - type: string - description: The code of a warning. - example: NO_RESULTS_FOUND - Description: - type: string - description: A description of what caused the issues. - example: > - Sorry, your query completed successfully, but did not return any - inventory. Please adjust your - - search parameters and try again. - LodgingError: - type: object - properties: - Code: - type: string - description: Error code describing the issue - example: AMBIGUOUS_LOCATION - Description: - type: string - description: A simple description of what the error is. - example: "Multiple pickup locations found. " - description: Container for error list. - LodgingErrors: - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: "#/components/schemas/LodgingError" - TransactionId: - type: string - description: A unique identifier for the transaction. - example: a9e371c4-89d9-4f9c-8df7-df105830e7fe - LodgingQuotesResponse: - type: object - properties: - Warnings: - type: array - description: > - There were some errors or events during the transaction, but the API - has still returned a response. - - - Container for all warnings. - items: - $ref: "#/components/schemas/LodgingWarning" - Count: - type: integer - description: The number of properties actually returned in the response. - format: int32 - example: 99 - TotalPropertyCount: - type: integer - description: The number of properties requested. - format: int32 - example: 230 - TransactionId: - type: string - description: Unique identifier for the API transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - StayDates: - $ref: "#/components/schemas/LodgingStayDates" - LengthOfStay: - type: integer - description: The number of stay nights. - format: int32 - example: 3 - Occupants: - type: array - description: Container for the list of room occupants. - items: - $ref: "#/components/schemas/LodgingOccupant" - Properties: - type: array - description: Container for all properties. - items: - $ref: "#/components/schemas/Property" - DateRange: - type: object - description: The actual date range for the shown availability. - properties: - StartDate: - type: string - description: The initial day of the date range in an ISO 8601 Date format - [YYYY-MM-DD]. - example: 2022-07-05 - format: date - EndDate: - type: string - description: The final day of the date range in an ISO 8601 Date format - [YYYY-MM-DD]. - example: 2023-07-05 - format: date - AvailabilityCalendar: - type: object - properties: - PropertyId: - type: string - description: The unique property identifier that designates a single property. - example: "74041788" - DateRange: - $ref: "#/components/schemas/DateRange" - Availability: - type: string - description: > - A string of codes that shows property availability, one for every - day in the specified date range. - - - Valid values include Y (available) and N (unavailable). - - - ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands - - for the `EndDate`.* - example: YYYYYYNNNNNN - ChangeOver: - type: string - description: > - A string of codes that shows changeover action, one for every day in - the specified date range. - - - Valid values include - - - X (no action possible) - - - C (check-in, checkout) - - - O (checkout only) - - - I (check-in only) - - ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one - - stands for the `EndDate`. All actions are possible if not returned.* - example: XXIIICCCOOCC - MinPriorNotify: - type: string - description: > - A comma-separated list of numbers that shows how many days before a - reservation the booking must occur, one - - for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification - - required for a given day. The unit is always day. - - - ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` - - and the last one stands for the `EndDate`. No limitation if not returned.* - example: 1,1,1,1,1,1,1,1,1,1,1,1,1 - MinStay: - type: string - description: > - A comma-separated list of numbers that show the minimum number of - days a traveler can stay, one for every - - day in the specified date range. - - - Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. - - - ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last - - one stands for the `EndDate`. No limitation if not returned.* - example: 0,0,0,3,3,3,3,3,3,7,7,7,7,7,21,21,21 - MaxStay: - type: string - description: > - A comma-separated list of numbers that show the maximum number of - days a traveler can stay, one for every - - day in the specified date range. - - - Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. - - - ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the - - last one stands for the `EndDate`. No limitation if not returned. - example: 0,0,0,31,31,31,371,370 - AvailabilityCalendarResponse: - type: object - properties: - Warnings: - type: array - description: > - There were some errors or events during the transaction, but the API - has still returned a response. - - - Container for all warnings. - items: - $ref: "#/components/schemas/LodgingWarning" - TransactionId: - type: string - description: Unique identifier for the transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - AvailabilityCalendars: - type: array - description: A list of the calendar entities. - items: - $ref: "#/components/schemas/AvailabilityCalendar" - example: >- - { - "TransactionId": "f06edfa3-27f4-44e6-838c-b8dd3d0a3210", - "AvailabilityCalendars": [ - { - "PropertyId": "74041788", - "DateRange": { - "StartDate": "2022-02-25", - "EndDate": "2025-02-24" - }, - "Availability":"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", - "ChangeOver": "OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", - "MinStay": "3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3", - "MaxStay": "379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", - "MinPriorNotify": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" - }, - { - "PropertyId": "1", - "DateRange": { - "StartDate": "2022-02-27", - "EndDate": "2023-11-04" - }, - "Availability": "NNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" - }, - { - "PropertyId": "123", - "DateRange": { - "StartDate": "2022-02-27", - "EndDate": "2023-11-04" - }, - "Availability": "NNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", - "ChangeOver": "XXXXXXIIICCCCCCCCCCCCCCCCCCCCXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOXXXXXIIICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOO", - "MinStay": "0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,7,6,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,5,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,9,8,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0", - "MaxStay": "0,0,0,0,0,0,21,21,20,19,18,17,16,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,20,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,0,0,0,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,0,0,0", - "MinPriorNotify": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" - } - ] - } - AdditionalFee: - required: - - Amount - - FinanceCategory - - FinanceSubCategory - - IsRequired - type: object - properties: - IsRequired: - type: boolean - description: Indicates whether this additional fee is mandatory. - example: true - FinanceCategory: - type: string - description: Category of the fee / Coverages - example: Fee - FinanceSubCategory: - type: string - description: Sub category of the fee / Coverages . - example: Drop - Amount: - $ref: "#/components/schemas/CarsMoney" - Description: - type: string - description: Description of the fee. - example: DropOffCharge - Deductible: - $ref: "#/components/schemas/Deductible" - description: List of additional fees including both mandatory and optional - fees.such as young driver fee/drop off fee /CollisionDamageWaiver - CarsAddress: - required: - - Address1 - - City - - Country - type: object - properties: - Address1: - type: string - description: Street Number, Street Name, or PO Box - example: 724 Pine St - Address2: - type: string - description: "Apartment, Floor, Suite, Bldg # or more specific information about - Address1." - example: Second Floor - Suite: - type: string - description: Suite/apartment number - example: "123" - City: - type: string - description: The city - example: New York - Province: - type: string - description: The state or province - example: NY - Country: - type: string - description: 3-letter code for the country - example: USA - PostalCode: - type: string - description: Zip/postal code - example: "98004" - description: Address information - CarsCancellationPolicy: - type: object - properties: - Cancellable: - type: boolean - description: Indicates if this car can be cancelled (free cancel or penalty - cancel) - example: true - FreeCancellation: - type: boolean - description: Indicates if this car may be cancelled without a penalty. - example: true - FreeCancellationEndDateTime: - type: string - description: Indicates the latest time that the car can be cancelled for free. - format: date-time - PenaltyRules: - type: array - description: Container for penalty rules - items: - $ref: "#/components/schemas/PenaltyRule" - NonCancellableDateTimeRange: - $ref: "#/components/schemas/NonCancellableDateTimeRange" - description: Cancellation Policy Container. - Capacity: - required: - - AdultCount - type: object - properties: - AdultCount: - type: integer - description: The typical number of adults that can fit comfortably in the car. - format: int64 - example: 4 - ChildCount: - type: integer - description: The typical number of children that can fit comfortably in the car. - format: int64 - example: 0 - SmallLuggageCount: - type: integer - description: The typical number of small pieces of luggage that fit in the cargo - space. - format: int64 - example: 2 - LargeLuggageCount: - type: integer - description: The typical number of large pieces of luggage that fit in the cargo - space. - format: int64 - example: 2 - description: Capacity for car's properties. - Car: - required: - - CancellationPolicy - - DropOffDetails - - Id - - PickupDetails - - Price - - Supplier - - VehicleDetails - type: object - properties: - Id: - type: string - description: "Uniquely identifies a Car Offer.Note: since pay-online and - pay-at-the-counter Car Offers have the same associated Rate Code, - the Offer ID is the only unique identifier to differentiate between - the two offers when referencing or booking." - example: ECAR-39--1Trip-SEAC005-SEAC005 - DataTimeStamp: - type: string - description: DataTimeStamp - format: date-time - example: 2021-03-09T07:08:00Z - OnlineCheckIn: - type: boolean - description: Indicate whether the supplier supports online checkin - example: true - SkipTheCounter: - type: boolean - description: Indicate whether the supplier supports skip the counter - example: true - VehicleDetails: - $ref: "#/components/schemas/VehicleDetails" - Supplier: - $ref: "#/components/schemas/Supplier" - PickupDetails: - $ref: "#/components/schemas/VendorLocationDetails" - DropOffDetails: - $ref: "#/components/schemas/VendorLocationDetails" - Links: - type: object - additionalProperties: - $ref: "#/components/schemas/CarsLink" - description: A map of links to other Car APIs or Expedia websites. - xml: - wrapped: true - RateDetails: - $ref: "#/components/schemas/RateDetails" - Price: - $ref: "#/components/schemas/Price" - ReferencePrice: - $ref: "#/components/schemas/CarsMoney" - AdditionalFees: - type: array - description: List of additional fees including both mandatory and optional - fees.such as young driver fee/drop off fee /CollisionDamageWaiver - items: - $ref: "#/components/schemas/AdditionalFee" - CancellationPolicy: - $ref: "#/components/schemas/CarsCancellationPolicy" - NoShowPenalty: - $ref: "#/components/schemas/PenaltyType" - Images: - type: array - description: List of image resources of the car product. - items: - $ref: "#/components/schemas/Image" - Rating: - $ref: "#/components/schemas/RatingWithoutDetails" - description: List of cars matching the search criteria. - CarCategory: - required: - - Code - - Value - type: object - properties: - Code: - type: string - description: Car category code. - example: M - Value: - type: string - description: Car category value. - example: Mini - description: Car category. Please find list of Car Type Codes in - https://expediaintegration.zendesk.com/hc/en-us/articles/115008631767 - CarListingsResponse: - required: - - CarCount - - TransactionId - type: object - properties: - Warnings: - type: array - description: Container for warning codes - items: - $ref: "#/components/schemas/CarsWarning" - TransactionId: - type: string - description: A unique identifier for this transaction. - example: 1111111-2222-3333-4444-55555555555 - CarCount: - type: integer - description: The number of cars offers returned in the response. - format: int64 - example: 1 - Cars: - type: array - description: List of cars matching the search criteria. - items: - $ref: "#/components/schemas/Car" - xml: - name: CarListingsResponse - CarType: - required: - - Code - - Value - type: object - properties: - Code: - type: string - description: Car type code. - example: C - Value: - type: string - description: Car type value. - example: 2/4 Door - description: Car type. Please find list of Car Type Codes in - https://expediaintegration.zendesk.com/hc/en-us/articles/115002516708 - CarsCountry: - required: - - IsoCode2 - - IsoCode3 - - Name - type: object - properties: - Name: - type: string - description: country name - example: Ireland - Code: - type: string - description: 3-letter code for the country - example: IRL - IsoCode2: - type: string - description: 2-letter code for the country - example: IE - IsoCode3: - type: string - description: 3-letter code for the country - example: IRL - description: Container for disambiguation country information - CarsDateRange: - required: - - EndDate - - StartDate - type: object - properties: - StartDate: - type: string - description: Start date at pickup location of the period. - format: date - example: 2021-06-27 - EndDate: - type: string - description: End date at pickup location of the period. - format: date - example: 2021-06-28 - description: Date range of the period. - DateTimePeriod: - required: - - DateRange - type: object - properties: - DateRange: - $ref: "#/components/schemas/CarsDateRange" - TimeRanges: - type: array - description: A list of time range to indicate the operation hours of the date - range. - items: - $ref: "#/components/schemas/TimeRange" - description: A List of date time periods to indicate the vendor business hours - for the pickup time. - Deductible: - type: object - properties: - ExcessAmount: - $ref: "#/components/schemas/CarsMoney" - LiabilityAmount: - $ref: "#/components/schemas/CarsMoney" - DeductibleAmount: - $ref: "#/components/schemas/CarsMoney" - description: Indicate whether it is deductible - Discount: - required: - - Code - - Type - type: object - properties: - Type: - type: string - description: "Discount type. Supported values : CorpDiscount | Coupon." - example: CorpDiscount - Code: - type: string - description: Discount code. - example: G811490 - description: List of discount information. - CarsDistance: - required: - - Value - type: object - properties: - Value: - type: string - description: The number of miles/kilometers of the distance (specified by the - Unit). - example: "75" - Unit: - type: string - description: The unit (KM or MI) for the distance. - example: KM - Direction: - type: string - description: "The direction of the location from the search 'center'.Possible - values are: N,S,W,E,NW,NE,SW,SE" - example: N - description: The extra distance information. - ExtraCostPerDistance: - required: - - Cost - - Distance - type: object - properties: - Distance: - $ref: "#/components/schemas/CarsDistance" - Cost: - $ref: "#/components/schemas/CarsMoney" - description: Extra cost for each increment of distance used. - FuelAC: - required: - - Code - - Value - type: object - properties: - Code: - type: string - description: Car FuelAC code. - example: D - Value: - type: string - description: Car FuelAC value. - example: Diesel Air - description: Car fuel type and whether Air Conditioning is included. Please find - list of Car Fuel AC Codes in - https://expediaintegration.zendesk.com/hc/en-us/articles/115005378328 - CarsGeoLocation: - required: - - Latitude - - Longitude - type: object - properties: - Latitude: - type: string - description: Latitude of the location. - example: "38.184978" - Longitude: - type: string - description: Longitude of the location. - example: "85.7412" - Obfuscated: - type: boolean - description: Container for Geo location. - Image: - required: - - Href - - Size - - Type - type: object - properties: - Type: - type: string - description: Resource typeSupported values :Thumbnail - (70 pixels wide)Image - - (165 pixels wide) - Size: - type: string - description: Size of imageSupported values :s - (165 pixels wide)t - (70 pixels - wide) - Href: - type: string - description: URL for the image. - description: List of image resources of the car product. - CarsLink: - required: - - Href - type: object - properties: - Accept: - type: string - description: Accept header. - Method: - type: string - description: HTTP method to connect. - example: GET - Href: - type: string - description: HATEOAS URL to fetch details. - description: "A map of links to other Car APIs. possible link name: ApiBooking" - CarsLocation: - required: - - LocationId - type: object - properties: - Type: - type: string - description: The type of location code (MULTICITY | METROCODE). - example: MULTICITY - Id: - type: string - description: Expedia Region ID of the specified airport. - example: "6139103" - Name: - type: string - description: Location Name - example: Seattle-Tacoma International Airport - Code: - type: string - description: Location Code - example: SEA - LocationId: - type: string - description: Location id. - example: SEAT001 - Address: - $ref: "#/components/schemas/CarsAddress" - PointOfInterest: - type: string - GeoLocation: - $ref: "#/components/schemas/CarsGeoLocation" - Neighborhood: - $ref: "#/components/schemas/CarsNeighborhood" - RegionId: - type: integer - description: RegionId the location resides in. - format: int64 - example: 6200275 - Country: - $ref: "#/components/schemas/CarsCountry" - description: Container for list of possible locations that could be used to - disambiguate the query. - Mileage: - required: - - FreeDistance - - FreeDistanceRatePeriod - type: object - properties: - FreeDistance: - $ref: "#/components/schemas/CarsDistance" - FreeDistanceRatePeriod: - type: string - description: Rate period for free distance. - example: Daily - ExtraCostPerDistance: - $ref: "#/components/schemas/ExtraCostPerDistance" - description: A list of charges to be levied based on the mileage driven. - CarsMoney: - required: - - Currency - - Value - type: object - properties: - Value: - type: string - description: The value of the element being defined. - example: "21.9" - Currency: - type: string - description: The ISO 4217 Currency Code that the value is expressed in. - example: USD - LocalCurrencyPrice: - $ref: "#/components/schemas/CarsMoney" - description: Price of Special equipment. - CarsNeighborhood: - required: - - Id - - Name - type: object - properties: - Id: - type: string - description: Neighborhood id. - example: "6160232" - Name: - type: string - description: Neighborhood name. - example: Le Pharo - description: Geography entities which are typically contained within a city. - This includes the categories neighborhood and point of interest. Low - level regions are not a formally defined concept in the geography model. - NonCancellableDateTimeRange: - required: - - EndDateTime - - StartDateTime - type: object - properties: - StartDateTime: - type: string - description: The time of this non-cancellable window starts - format: date-time - EndDateTime: - type: string - description: The time of this non-cancellable window ends - format: date-time - description: Container for non-cancellable date and time range element - PenaltyRule: - required: - - EndDateTime - - Penalty - - StartDateTime - type: object - properties: - Penalty: - $ref: "#/components/schemas/PenaltyType" - StartDateTime: - type: string - description: The time when this penalty window starts - format: date-time - EndDateTime: - type: string - description: The time when this penalty window ends - format: date-time - description: Container for penalty rules - PenaltyType: - required: - - Currency - - Type - - Value - type: object - properties: - Type: - type: string - description: "What the penalty amount is based on. should be one of the - following values:AMOUNT : it means the user is charged a fixed - amount specified in the value node. Say 50$ for example.PERCENT : it - means the user is charged a percentage of the base rate/total - rate.PERDAY : it means the user is charged Per Day Price. For eg.., - if the value is 2, it means the penalty amount will the Per day - price of 2 days." - Value: - type: string - description: Value to indicate how many/much of the type listed above is going - to be charged as a penalty. - example: "20.0" - Currency: - type: string - description: The currency of the amount, only valid when Type=AMOUNT - example: USD - description: Container for no show penalty element - Price: - required: - - TotalPrice - type: object - properties: - RatePeriodUnitPrice: - $ref: "#/components/schemas/CarsMoney" - BasePrice: - $ref: "#/components/schemas/CarsMoney" - TaxesAndFees: - $ref: "#/components/schemas/CarsMoney" - TotalPriceDueAtBooking: - $ref: "#/components/schemas/CarsMoney" - TotalPrice: - $ref: "#/components/schemas/CarsMoney" - description: Pricing information for the rental. - RateDetails: - required: - - PrePay - - RatePeriod - type: object - properties: - RatePeriod: - type: string - description: "Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend" - example: Daily - RateCode: - type: string - description: Rate plan identifier. - example: A3D10 - PrePay: - type: boolean - description: Indicates whether this reservation should be paid at the time of - booking (true) or at time of rental return (false). - example: false - CreditCardRequired: - type: boolean - description: Indicates whether credit card is required for booking. - example: false - Discounts: - type: array - description: List of discount information. - items: - $ref: "#/components/schemas/Discount" - Mileages: - type: array - description: A list of charges to be levied based on the mileage driven. - items: - $ref: "#/components/schemas/Mileage" - MobileRate: - type: boolean - description: Indicates whether car offer is mobile rate. - example: true - description: The rate detail information for a car offer. - Rating: - required: - - RatingPercentage - - RatingCount - type: object - properties: - RatingPercentage: - type: string - description: The percentage of rating. - example: 87% - RatingCount: - type: string - description: The total count of rating. - example: "2092" - RatingDetails: - type: array - description: List of all the details of rating. - items: - $ref: "#/components/schemas/RatingDetails" - description: The rating of the car being offered. - RatingWithoutDetails: - required: - - RatingPercentage - - RatingCount - type: object - properties: - RatingPercentage: - type: string - description: The percentage of rating. - example: 87% - RatingCount: - type: string - description: The total count of rating. - example: "2092" - description: The rating of the car being offered. - RatingDetails: - required: - - Category - - Percentage - type: object - properties: - Category: - type: string - description: The category of rating detail. - example: Pick-up location - Percentage: - type: string - description: The percentage of rating detail category. - example: "98" - description: List of all the details of rating. - Supplier: - required: - - Code - - Id - - Name - type: object - properties: - Id: - type: string - description: Supplier ID. - example: "3" - Name: - type: string - description: Supplier Name. - example: Advantage Rent-A-Car - Code: - type: string - description: Supplier Code. - example: AD - LogoImageUrl: - type: string - description: Supplier Logo Image Url. - example: https://media.int.expedia.com/int/cars/logos/NU.png - description: The supplier of the car being offered. - TimeRange: - required: - - EndTime - - StartTime - type: object - properties: - StartTime: - type: string - description: Start time at pickup location of the date range. - format: time - example: 07:00:00 - EndTime: - type: string - description: End time at pickup location of the date range. - format: time - example: 17:00:00 - description: A list of time range to indicate the operation hours of the date range. - TransmissionDrive: - required: - - Code - - Value - type: object - properties: - Code: - type: string - description: Car transmission and drive code. - example: M - Value: - type: string - description: Car transmission and drive value. - example: Manual AWD - description: Car transmission and drive. Please find list of Car Transmission - Drive Codes in - https://expediaintegration.zendesk.com/hc/en-us/articles/115005380028 - VehicleDetails: - required: - - CarCategory - - CarClass - - CarType - - FuelAC - - TransmissionDrive - type: object - properties: - Make: - type: string - description: Car manufacturer and model. - example: Kia Rio - CarClass: - type: string - description: Car category and type. - example: Economy 2/4Door Car - MinDoors: - type: integer - description: Minimal car door count. - format: int32 - example: 2 - MaxDoors: - type: integer - description: Maximal car door count. - format: int32 - example: 4 - FuelLevel: - type: string - description: Car fuel information. - example: Full to Full - CarCategory: - $ref: "#/components/schemas/CarCategory" - CarType: - $ref: "#/components/schemas/CarType" - TransmissionDrive: - $ref: "#/components/schemas/TransmissionDrive" - FuelAC: - $ref: "#/components/schemas/FuelAC" - Capacity: - $ref: "#/components/schemas/Capacity" - description: Specific information for a car. - VendorLocationDetails: - required: - - DateTime - - Location - type: object - properties: - DateTime: - type: string - description: Pickup date and time. - format: date-time - ShuttleCategory: - type: string - description: The category of shuttle from the terminal to the rental car - counter. Please find list of Shuttle Categories in the Related Links - Section below. - example: AirportShuttleToCounterAndCar - Location: - $ref: "#/components/schemas/CarsLocation" - Distance: - $ref: "#/components/schemas/CarsDistance" - OpenSchedule: - type: array - description: A List of date time periods to indicate the vendor business hours - for the pickup time. - items: - $ref: "#/components/schemas/DateTimePeriod" - description: Drop off information - CarsWarning: - required: - - Code - - Description - type: object - properties: - Code: - type: string - description: Standardized warning code. - example: INVALID_CORPORATE_DISCOUNT_CODE - Description: - type: string - description: Standardized warning description message. - example: The Corporate DiscountCode '811490' is unavailable, but we found other - rates for you. - OriginalPrice: - $ref: "#/components/schemas/CarsMoney" - NewPrice: - $ref: "#/components/schemas/CarsMoney" - ChangedAmount: - $ref: "#/components/schemas/CarsMoney" - ChangedPercentage: - type: string - description: |- - The changed percentage. - In the sample 2.97 means the changed percentage is 2.97%. - example: "2.97" - Links: - type: object - additionalProperties: - $ref: "#/components/schemas/CarsLink" - xml: - wrapped: true - description: Container for warning codes - CarsError: - required: - - Code - - Description - type: object - properties: - Code: - type: string - description: Error code describing the issue - example: AMBIGUOUS_LOCATION - DetailCode: - type: string - description: Detailed error code describing the issue. - example: MULTIPLE_AMBIGUOUS_LOCATION - Description: - type: string - description: A simple description of what the error is. - example: "Multiple pickup locations found. " - LocationKeyword: - type: string - description: The requested location that caused the error. - example: "Portland. " - LocationOptions: - type: array - description: "List for possible locations from which the customer must choose - the best one to be re-submitted in the request. " - items: - $ref: "#/components/schemas/CarsLocationOption" - description: Container for error list. - CarsErrors: - required: - - Errors - - TransactionId - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: "#/components/schemas/CarsError" - TransactionId: - type: string - description: A unique identifier for the transaction. - example: a9e371c4-89d9-4f9c-8df7-df105830e7fe - xml: - name: ErrorResponse - CarsLocationOption: - required: - - Locations - - RequestedLocation - type: object - properties: - RequestedLocation: - type: string - description: Location used in partner request. - example: Paris - Locations: - type: array - description: Container for list of possible locations that could be used to - disambiguate the query. - items: - $ref: "#/components/schemas/CarsLocation" - Type: - type: string - description: Type of the location. - example: TRAINSTATION - RegionId: - type: string - description: RegionId the location resides in. - example: "6200275" - ShortName: - type: string - description: The name of the location which matches the location keyword. - example: Dublin Connolly Station - AirportCode: - type: string - description: Indicates the nearest major airport to the location. - example: DUB - Address: - type: string - description: The address of the location. - example: Dublin Connolly Station, Ireland - Country: - $ref: "#/components/schemas/CarsCountry" - GeoLocation: - $ref: "#/components/schemas/CarsGeoLocation" - description: "List for possible locations from which the customer must choose - the best one to be re-submitted in the request. " - DisambiguationResponse: - required: - - Errors - - TransactionId - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: "#/components/schemas/CarsError" - TransactionId: - type: string - description: A unique identifier for the transaction. - example: ec007d1c-8d9d-4ed5-a880-da5b477d8c6c - xml: - name: DisambiguationResponse - CarDetails: - required: - - CancellationPolicy - - DropOffDetails - - PickupDetails - - Price - - Supplier - - VehicleDetails - type: object - properties: - OnlineCheckIn: - type: boolean - description: Indicate whether the supplier supports online checkin - example: true - SkipTheCounter: - type: boolean - description: Indicate whether the supplier supports skip the counter - example: true - VehicleDetails: - $ref: "#/components/schemas/VehicleDetails" - Supplier: - $ref: "#/components/schemas/Supplier" - PickupDetails: - $ref: "#/components/schemas/VendorLocationDetails" - DropOffDetails: - $ref: "#/components/schemas/VendorLocationDetails" - RateDetails: - $ref: "#/components/schemas/RateDetails" - Price: - $ref: "#/components/schemas/Price" - ReferencePrice: - $ref: "#/components/schemas/CarsMoney" - AdditionalFees: - type: array - description: List of additional fees including both mandatory and optional - fees.such as young driver fee/drop off fee /CollisionDamageWaiver - items: - $ref: "#/components/schemas/AdditionalFee" - TaxesAndFeesDetails: - type: array - description: List of TaxesAndFees Details - items: - $ref: "#/components/schemas/TaxesAndFees" - ExtraFeesDetails: - type: array - description: List of ExtraFeesDetails - items: - $ref: "#/components/schemas/ExtraFees" - SpecialEquipments: - type: array - description: Description and costs of any optional special equipment that may be - rented with the car. - items: - $ref: "#/components/schemas/Equipment" - RentalLimits: - $ref: "#/components/schemas/RentalLimits" - CancellationPolicy: - $ref: "#/components/schemas/CarsCancellationPolicy" - NoShowPenalty: - $ref: "#/components/schemas/PenaltyType" - CarPolicies: - type: array - description: A list of policies that apply to this car rental. - items: - $ref: "#/components/schemas/CarPolicy" - Images: - type: array - description: List of image resources of the car product. - items: - $ref: "#/components/schemas/Image" - Rating: - $ref: "#/components/schemas/Rating" - description: Details of requested car. - CarDetailsResponse: - required: - - TransactionId - type: object - properties: - Warnings: - type: array - description: Container for warning codes - items: - $ref: "#/components/schemas/CarsWarning" - TransactionId: - type: string - description: A unique identifier for this transaction. - example: 1111111-2222-3333-4444-55555555555 - CarDetails: - $ref: "#/components/schemas/CarDetails" - ValidFormsOfPayment: - type: array - description: List of all the forms of payment that will be accepted for the - booking of this rental transaction. - items: - $ref: "#/components/schemas/CarsValidFormsOfPayment" - Links: - type: object - additionalProperties: - $ref: "#/components/schemas/CarsLink" - description: "A map of links to other Car APIs. possible link name: ApiBooking" - xml: - wrapped: true - xml: - name: CarDetailsResponse - CarPolicy: - required: - - CategoryCode - type: object - properties: - CategoryCode: - type: string - description: "The category that this policy applies to (e.g. cancellation, - drivers license requirements, driver age requirements) " - example: Guarantee - PolicyText: - type: string - description: The raw text of the policy.This is generally localized into the - requested language, but may be English if no other translations are - available. - example: Credit card required. - description: A list of policies that apply to this car rental. - Duration: - required: - - Count - - Unit - type: object - properties: - Unit: - type: string - description: The unit for minimum amount of time for a rental. - example: Day - Count: - type: integer - description: The minimum number of units that qualify for minimum amount of time - for a rental. - format: int64 - example: 1 - description: The maximum amount of time for a rental that still qualifies for - this rate.This may or may not be the same as the current rental - duration. - Equipment: - required: - - Code - - Name - type: object - properties: - Code: - type: string - description: Special equipment code - example: BabyChildSeat - Name: - type: string - description: Special equipment name - example: Baby Child Seat - RatePeriod: - type: string - description: Unit indicating the price of special equipment. Support - value:Trip,Daily - example: Trip - Price: - $ref: "#/components/schemas/CarsMoney" - description: Description and costs of any optional special equipment that may be - rented with the car. - ExtraFees: - required: - - Amount - - Unit - - UnitCount - type: object - properties: - Unit: - type: string - description: "Rate period beyond the base rate. Supported values: ExtraHourly, - ExtraDaily" - example: ExtraHourly - UnitCount: - type: integer - description: Numbers of period - format: int64 - example: 2 - Amount: - $ref: "#/components/schemas/CarsMoney" - description: List of ExtraFeesDetails - RentalLimits: - required: - - MaxDuration - - MinDuration - type: object - properties: - MinDuration: - $ref: "#/components/schemas/Duration" - MaxDuration: - $ref: "#/components/schemas/Duration" - description: Limitations that are part of this rental agreement. - TaxesAndFees: - required: - - Amount - - Description - type: object - properties: - Description: - type: string - description: TaxesAndFees description - example: "Rental, CONSOLIDATED FACILITY CHG 4.00/DAY\t" - Amount: - $ref: "#/components/schemas/CarsMoney" - description: List of TaxesAndFees Details - CarsValidFormsOfPayment: - required: - - BrandName - - PaymentMethod - - PaymentSubMethod - type: object - properties: - PaymentMethod: - type: string - description: Method of payment - example: CreditCard - PaymentSubMethod: - type: string - description: Sub method of payment - example: American Express - BrandName: - type: string - description: The brand name of the payment sub-method to be displayed to the - customer. In many cases it will be the same as the payment - sub-method, but "Visa/Carte Bleue" and "Visa/Delta are some of the - exceptions. - example: American Express - description: List of all the forms of payment that will be accepted for the - booking of this rental transaction. - APIMError: - title: APIMError - properties: - message: - type: string - PresignedUrlResponse: - type: object - properties: - transactionId: - type: string - description: Unique identifier for each API response. - error: - $ref: "#/components/schemas/Fault" - warning: - $ref: "#/components/schemas/Fault" - bestMatchedFile: - $ref: "#/components/schemas/FileInfo" - otherFileOptions: - type: array - items: - $ref: "#/components/schemas/FileInfo" - description: Container for file Pre-signed download URL and informations. - FileInfo: - type: object - properties: - partner: - nullable: true - type: string - description: "The partner associated with the file. List of partners: `Bing`, - `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`." - brand: - nullable: true - type: string - description: "The brand associated with the file content. List of brand: - `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, - `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`." - fileContentType: - nullable: true - type: string - description: "The type associated with the file content. List of types: - `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, - `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental`" - locale: - nullable: true - type: string - description: The locale associated with the file content. - fileName: - type: string - description: File name. - size: - $ref: "#/components/schemas/FileSize" - fileLastUpdated: - type: string - description: The time about the file last updated. The format is - uuuu-MM-dd'T'HH:mm:ss.SSSX - downloadUrl: - type: string - description: Pre-signed URL is a self signed URL generated for a resource in S3 - with a set expiration time. - downloadUrlExpires: - type: string - description: The time about the download Url expires. The format is - uuuu-MM-dd'T'HH:mm:ss.SSSX - filterConditions: - $ref: "#/components/schemas/FilterConditions" - bestMatchedLink: - $ref: "#/components/schemas/SdpLink" - Fault: - type: object - description: API returned information. - properties: - code: - type: string - description: Fault code. - description: - type: string - description: Fault description. - FileSize: - type: object - description: The information about the file size. - properties: - unit: - type: string - enum: - - KB - - MB - - GB - description: The unit about the file size. - value: - type: integer - format: int64 - description: The value about the file size. - FilterConditions: - nullable: true - type: object - description: Container filter condition for the filtered file. - [Filters](https://confluence.expedia.biz/display/EWS/Filtered+Feed+File+Generation+Schedule+and+Access#FilteredFeedFileGenerationScheduleandAccess-Filters) - properties: - pointOfSupply: - type: string - description: "List of filter condition for PointOfSupplies: `US`, - `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, - `AE`,`GB`." - brand: - type: string - description: "List of filter condition for Brands: `VRBO`." - structureType: - type: string - description: "List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`." - SdpLink: - nullable: true - type: object - description: Contains link information, including link address, request method. - Only provided if FileInfo is in OtherFileOptions. - properties: - href: - type: string - description: a link address. - method: - type: string - description: Request method, it will support `GET`, `POST`, `DELETE` and `PUT` - etc... - SdpAPIMError: - type: object - description: Error from the APIM. - properties: - message: - type: string - description: Error from the APIM. - ActivitiesMoney: - required: - - Currency - - Value - type: object - properties: - Value: - type: string - description: The value of the element being defined. - example: "21.9" - Currency: - type: string - description: The ISO 4217 Currency Code that the value is expressed in. - example: USD - LocalCurrencyPrice: - $ref: "#/components/schemas/ActivitiesMoney" - description: Container for the discount amount. - ActivitiesPrice: - required: - - TotalRate - type: object - properties: - Category: - type: string - description: |- - Type of passenger. - Values supported are: - ADULT | SENIOR | CHILD - example: ADULT - TotalRate: - $ref: "#/components/schemas/ActivitiesMoney" - TotalFees: - $ref: "#/components/schemas/ActivitiesMoney" - TotalTaxesAndFees: - $ref: "#/components/schemas/ActivitiesMoney" - ReferencePrice: - $ref: "#/components/schemas/ReferencePrice" - Savings: - $ref: "#/components/schemas/Savings" - description: The price of the offer - ReferencePrice: - required: - - TotalRate - type: object - properties: - TotalRate: - $ref: "#/components/schemas/ActivitiesMoney" - TotalFees: - $ref: "#/components/schemas/ActivitiesMoney" - TotalTaxesAndFees: - $ref: "#/components/schemas/ActivitiesMoney" - description: Container for the reference price used for strike out display. - Restrictions: - required: - - Max - - Min - - Type - type: object - properties: - Type: - type: string - description: Type of the Restriction. - example: AGE - Max: - type: string - description: Maximum value allowed for the restriction type. - example: "255" - Min: - type: string - description: Minimum value allowed for the restriction type. - example: "9" - Description: - type: string - description: The text to describe the restriction. - example: 9+ years - description: Container of the Restrictions associated to this ticket. - Savings: - required: - - Amount - - Percentage - type: object - properties: - Percentage: - type: integer - description: The percentage of the price that has been discounted off the - regular price for the current activity. - format: int32 - example: 10 - Amount: - $ref: "#/components/schemas/ActivitiesMoney" - description: Container of savings information. - Ticket: - required: - - Code - - Count - - Id - - TicketPrice - type: object - properties: - Id: - type: integer - description: The numerical identifier for the ticket. - format: int32 - example: 6429 - Code: - type: string - description: |- - The code for the ticket. - Values supported are: - Adult - Traveler - Child - Group - Senior - Infant - Student - example: Adult - Count: - type: integer - description: The number of each ticket type to be booked. - format: int32 - example: 1 - Restrictions: - $ref: "#/components/schemas/Restrictions" - TicketPrice: - $ref: "#/components/schemas/ActivitiesPrice" - description: The list of Ticket information. - ActivitiesAddress: - type: object - properties: - Address1: - type: string - description: Street Number, Street Name, or PO Box. - example: 724 Pine St - Address2: - type: string - description: Apartment, Floor, Suite, Bldg - example: Second Floor - Suite: - type: string - description: Suite/apartment number - example: "123" - City: - type: string - description: The city - example: New York - Province: - type: string - description: The state or province. - example: NY - Country: - type: string - description: 3-letter code for the country. - example: USA - PostalCode: - type: string - description: Zip/postal code. - example: "98004" - description: Address information - ActivitiesCountry: - required: - - IsoCode2 - - IsoCode3 - - Name - type: object - properties: - Name: - type: string - description: country name - example: Ireland - Code: - type: string - description: 3-letter code for the country - example: IRL - IsoCode2: - type: string - description: 2-letter code for the country - example: IE - IsoCode3: - type: string - description: 3-letter code for the country - example: IRL - description: Container for disambiguation country information - ActivitiesError: - required: - - Code - - Description - type: object - properties: - Code: - type: string - description: Error code describing the issue - example: AMBIGUOUS_LOCATION - DetailCode: - type: string - description: Detailed error code describing the issue. - example: MULTIPLE_AMBIGUOUS_LOCATION - Description: - type: string - description: A simple description of what the error is. - example: "Multiple pickup locations found. " - LocationKeyword: - type: string - description: The requested location that caused the error. - example: "Portland. " - LocationOptions: - type: array - description: "List for possible locations from which the customer must choose - the best one to be re-submitted in the request. " - items: - $ref: "#/components/schemas/ActivitiesLocationOption" - description: Container for error list. - ActivitiesErrors: - required: - - Errors - - TransactionId - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: "#/components/schemas/ActivitiesError" - TransactionId: - type: string - description: A unique identifier for the transaction. - example: a9e371c4-89d9-4f9c-8df7-df105830e7fe - xml: - name: ErrorResponse - ActivitiesGeoLocation: - required: - - Latitude - - Longitude - type: object - properties: - Latitude: - type: string - description: Latitude of the location. - example: "38.184978" - Longitude: - type: string - description: Longitude of the location. - example: "85.7412" - Obfuscated: - type: boolean - description: Geographic information - ActivitiesLocation: - type: object - properties: - Type: - type: string - description: The type of location code (MULTICITY | METROCODE). - example: MULTICITY - Id: - type: string - description: Expedia Region ID of the specified airport. - example: "6139103" - Name: - type: string - description: Location Name - example: Seattle-Tacoma International Airport - Code: - type: string - description: Location Code - example: SEA - LocationId: - type: string - description: Location id. - example: SEAT001 - Address: - $ref: "#/components/schemas/ActivitiesAddress" - PointOfInterest: - type: string - GeoLocation: - $ref: "#/components/schemas/ActivitiesGeoLocation" - Neighborhood: - $ref: "#/components/schemas/ActivitiesNeighborhood" - RegionId: - type: integer - description: RegionId the location resides in. - format: int64 - example: 6200275 - Country: - $ref: "#/components/schemas/ActivitiesCountry" - description: List of location(s) where the activity will happen. - ActivitiesLocationOption: - required: - - Locations - - RequestedLocation - type: object - properties: - RequestedLocation: - type: string - description: Location used in partner request. - example: Paris - Locations: - type: array - description: Container for list of possible locations that could be used to - disambiguate the query. - items: - $ref: "#/components/schemas/ActivitiesLocation" - Type: - type: string - description: Type of the location. - example: TRAINSTATION - RegionId: - type: string - description: RegionId the location resides in. - example: "6200275" - ShortName: - type: string - description: The name of the location which matches the location keyword. - example: Dublin Connolly Station - AirportCode: - type: string - description: Indicates the nearest major airport to the location. - example: DUB - Address: - type: string - description: The address of the location. - example: Dublin Connolly Station, Ireland - Country: - $ref: "#/components/schemas/ActivitiesCountry" - GeoLocation: - $ref: "#/components/schemas/ActivitiesGeoLocation" - description: "List for possible locations from which the customer must choose - the best one to be re-submitted in the request. " - ActivitiesNeighborhood: - required: - - Id - - Name - type: object - properties: - Id: - type: string - description: Neighborhood id. - example: "6160232" - Name: - type: string - description: Neighborhood name. - example: Le Pharo - description: Geography entities which are typically contained within a city. - This includes the categories neighborhood and point of interest. Low - level regions are not a formally defined concept in the geography model. - Activity: - required: - - Categories - - Description - - Duration - - FreeCancellation - - Id - - Media - - Price - - Supplier - - Title - type: object - properties: - Id: - type: integer - description: The numerical identifier for this particular activity - format: int32 - example: 166597 - Title: - type: string - description: The display title for this activity. - example: "Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. Peter's Tour" - Description: - type: string - description: The description of the Activity. - example: Enjoy 5 of Seattle's most popular attractions with a multi-ticket - booklet that’s valid for 9 consecutive days. This pass is perfect if - you want to explore the city on your schedule, craft your own - itinerary, and visit the city’s can’t-miss museums and most iconi... - Media: - type: array - description: List of activity Media. - items: - $ref: "#/components/schemas/ActivitiesMedia" - Categories: - type: array - description: >- - A list of the Activity categories to which this particular activity - belongs. - - Possible values are: - - Adventures - - Air, Balloon & Helicopter Tours - - Attractions - - Cruises & Water Tours - - Day Trips & Excursions - - Food & Drink - - Hop-on Hop-off - - Multi-Day & Extended Tours - - Nightlife - - Private Tours - - Private Transfers - - Shared Transfers - - Show & Sport Tickets - - Sightseeing Passes - - Theme Parks - - Tours & Sightseeing - - Walking & Bike Tours - - Water Activities - - Wedding Ceremonies - - Winter Activities - example: - - Walking & Bike Tours - items: - type: string - description: A list of the Activity categories to which this particular activity - belongs. - example: Walking & Bike Tours - xml: - name: Categories - Duration: - type: string - description: |- - The anticipated time duration for the activity. - Using java jdk Duration parsing. - example: PT1H0M - FreeCancellation: - type: boolean - description: A boolean value describing whether or not this activity reservation - can be cancelled without incurring a penalty. - example: true - Price: - $ref: "#/components/schemas/ActivitiesPrice" - Redemption: - $ref: "#/components/schemas/Redemption" - ActivityLocations: - type: array - description: Container of location information where activity happens. - items: - $ref: "#/components/schemas/ActivitiesLocation" - Supplier: - $ref: "#/components/schemas/ActivitiesSupplier" - ReviewScore: - type: integer - description: The overall Expedia score for the activity. - format: int32 - example: 72 - ReviewCount: - type: integer - description: The number of Expedia reviews that went into the calculation of the - ReviewScore. - format: int32 - example: 19 - Links: - type: object - additionalProperties: - $ref: "#/components/schemas/ActivitiesLink" - description: HATEOAS links included in this response. - xml: - wrapped: true - CancellationPolicy: - $ref: "#/components/schemas/ActivitiesCancellationPolicy" - Highlights: - type: array - description: Web formatted statement of the Highlight(s) for the activity. - items: - type: string - description: Web formatted statement of the Highlight(s) for the activity. - xml: - name: Highlights - TermsAndConditions: - type: array - description: Terms and Conditions for the Activity. - items: - type: string - description: Terms and Conditions for the Activity. - xml: - name: TermsAndConditions - Inclusions: - type: array - description: Web formatted statement of what is included in the activity - items: - type: string - description: Web formatted statement of what is included in the activity - xml: - name: Inclusions - Exclusions: - type: array - description: Web formatted statement of what is NOT included in the activity - items: - type: string - description: Web formatted statement of what is NOT included in the activity - xml: - name: Exclusions - KnowBeforeYouBook: - type: array - description: Web formatted statement of things that a purchaser should be aware - of BEFORE they book this activity. - items: - type: string - description: Web formatted statement of things that a purchaser should be aware - of BEFORE they book this activity. - xml: - name: KnowBeforeYouBook - KnowBeforeYouGo: - type: array - description: Web formatted statement of things that a purchaser should be aware - of BEFORE they go to this activity. - items: - type: string - description: Web formatted statement of things that a purchaser should be aware - of BEFORE they go to this activity. - xml: - name: KnowBeforeYouGo - Offers: - type: array - description: Offers for the activity. - items: - $ref: "#/components/schemas/Offer" - description: Detailed information on the Activity. - AvailableTimeSlot: - required: - - AllDayActivity - - CancellationPolicy - - DateTime - - Tickets - type: object - properties: - DateTime: - type: string - description: The date and time when the activity happens. - format: date-time - AllDayActivity: - type: boolean - description: Indicates whether the activity is an all-day activity. - example: true - CancellationPolicy: - $ref: "#/components/schemas/ActivitiesCancellationPolicy" - Tickets: - type: array - description: Container for ticket information. - items: - $ref: "#/components/schemas/Ticket" - description: The list of available Time Slots for the activity. - ActivitiesCancellationPolicy: - required: - - FreeCancellation - type: object - properties: - FreeCancellation: - type: boolean - description: Indicates whether the activity can be canceled free of charge - within the cancellation window or not. - example: true - CancelPolicyDescription: - type: string - description: The description of Cancellation Policy. - example: 72 hours - FreeCancellationMinHours: - type: integer - description: The minimum number of hours before activity when the activity can - still be cancelled for free. - format: int32 - example: 72 - FreeCancellationEndDateTime: - type: string - description: The date and time after which the activity will not be able to be - cancelled for free, stated in the local time to where the activity - takes place. - format: date-time - description: Container for the Cancellation Policy information. - ActivitiesLink: - required: - - Href - type: object - properties: - Accept: - type: string - description: Accept header. - Method: - type: string - description: HTTP method to connect. - example: GET - Href: - type: string - description: HATEOAS URL to fetch details. - description: Container of HATEOAS URL's - ActivitiesMedia: - required: - - Size - - Type - - Url - type: object - properties: - Type: - type: string - description: |- - type of the media. So far there is only one option: - 1: Image - example: "1" - Title: - type: string - description: Image title - example: Guestroom - Size: - type: string - description: >- - Image size - - You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. - example: t - Url: - type: string - description: Image URL - example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg - description: List of activity Media. - Offer: - required: - - AvailableTimeSlots - - Duration - - Id - - OfferPrice - - Title - type: object - properties: - Id: - type: integer - description: The numerical identifier for the offer. - format: int32 - example: 166597 - Title: - type: string - description: A descriptive title for this offer. - example: 8:30 AM, Tour in English - Description: - type: string - description: Description of this offer. - Duration: - type: string - description: The anticipated time duration for the activity, e xpressed using - Java JDK duration format. - AvailableTimeSlots: - type: array - description: The list of available Time Slots for the activity. - items: - $ref: "#/components/schemas/AvailableTimeSlot" - OfferPrice: - $ref: "#/components/schemas/ActivitiesPrice" - Links: - type: object - additionalProperties: - $ref: "#/components/schemas/ActivitiesLink" - description: Container of HATEOAS URL's - xml: - wrapped: true - description: Offers for the activity. - ActivitiesPhone: - required: - - CountryCode - - Number - type: object - properties: - CountryCode: - type: string - description: Country code of traveler's phone number; only digits allowed. - example: "1" - AreaCode: - type: string - description: Area code of traveler's phone number; only digits allowed. - example: "614" - Number: - type: string - description: Traveler's phone number; only digits allowed. - example: "9288472" - ExtensionNumber: - type: string - description: The phone of the company providing the activity. - Redemption: - type: object - properties: - Type: - type: string - description: The type of redemption process associated to the activity. - example: Voucherless - RedemptionLocations: - type: array - description: List of redemption locations where the activity will take place, - please refer to Location Section below. - items: - $ref: "#/components/schemas/ActivitiesLocation" - description: Container of redemption information. - ActivitiesSupplier: - required: - - Name - type: object - properties: - Name: - type: string - description: The name of the company providing the activity. - example: City Wonders - Phone: - $ref: "#/components/schemas/ActivitiesPhone" - description: The details information of company providing the activity. - ActivitiesWarning: - required: - - Code - - Description - type: object - properties: - Code: - type: string - description: Standardized warning code. - example: INVALID_CORPORATE_DISCOUNT_CODE - Description: - type: string - description: Standardized warning description message. - example: The Corporate DiscountCode '811490' is unavailable, but we found other - rates for you. - OriginalPrice: - $ref: "#/components/schemas/ActivitiesMoney" - NewPrice: - $ref: "#/components/schemas/ActivitiesMoney" - ChangedAmount: - $ref: "#/components/schemas/ActivitiesMoney" - ChangedPercentage: - type: string - description: |- - The changed percentage. - In the sample 2.97 means the changed percentage is 2.97%. - example: "2.97" - Links: - type: object - additionalProperties: - $ref: "#/components/schemas/ActivitiesLink" - xml: - wrapped: true - description: Container for all warnings generated during the transaction. - ActivityListingsResponse: - required: - - Count - - Location - - TransactionId - type: object - properties: - Warnings: - type: array - description: Container for all warnings generated during the transaction. - items: - $ref: "#/components/schemas/ActivitiesWarning" - TransactionId: - type: string - description: A unique identifier for this transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Count: - type: integer - description: The number of activities returned in the response. - format: int64 - example: 100 - Location: - type: string - description: The location that the user searched, expressed in the exact format - that the inventory system uses to designate the location. - example: shenzhen, dg - StartDate: - type: string - description: The startDate of the returned group of activities in YYYY-MM-DD - format. - format: date - example: 2021-08-01T00:00:00.000Z - EndDate: - type: string - description: The endDate of returned group of activities in YYYY-MM-DD format. - format: date - example: 2021-08-10T00:00:00.000Z - Activities: - type: array - description: List of activities matching the search criteria. - items: - $ref: "#/components/schemas/Activity" - Categories: - type: array - description: Container for a breakdown of how many of each type of Activity have - been returned in the API response. - items: - $ref: "#/components/schemas/CategoryGroup" - CategoryGroup: - required: - - CategoryName - - Count - - GroupDisplayName - - GroupName - type: object - properties: - Count: - type: integer - description: The count of the number of categories the returned set of - activities map to. - format: int32 - example: 10 - GroupName: - type: string - description: |- - The group which the category belongs - Possible value is: - Recommendations - Tours - Activities - Transportation - Promotions - Duration - example: Tours - GroupDisplayName: - type: string - description: The localized value for category name. - example: Wander- und Fahrradtouren - CategoryName: - type: string - description: The name of one of the categories. - example: Walking & Bike Tours - CategoryDisplayName: - type: string - description: Container for a breakdown of how many of each type of Activity have - been returned in the API response. - ActivityDetailsResponse: - required: - - Location - - TransactionId - type: object - properties: - Warnings: - type: array - description: Container for all warnings generated during the transaction. - items: - $ref: "#/components/schemas/ActivitiesWarning" - TransactionId: - type: string - description: A unique identifier for this transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Location: - type: string - description: The location user searched, translated into the full, unambiguous - format. - example: shenzhen, dg - StartDate: - type: string - description: The startDate of activities in YYY-MM-DD format. - format: date - example: 2021-08-01T00:00:00.000Z - EndDate: - type: string - description: The endDate of activities in YYY-MM-DD format. - format: date - example: 2021-08-01T00:00:00.000Z - ActivityDetails: - $ref: "#/components/schemas/Activity" - securitySchemes: - Authorization: - type: http - scheme: basic diff --git a/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderKey.kt b/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderKey.kt deleted file mode 100644 index 425d0f5fc..000000000 --- a/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/constant/HeaderKey.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.constant - -internal object HeaderKey { - const val PAGINATION_TOTAL_RESULTS = "pagination-total-results" - - const val LINK = "link" - - const val TRANSACTION_ID = "Partner-Transaction-Id" - - const val X_SDK_TITLE = "x-sdk-title" -} diff --git a/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/ContentNegotiation.kt b/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/ContentNegotiation.kt deleted file mode 100644 index 00d4e672a..000000000 --- a/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/ContentNegotiation.kt +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.serialization - -import com.expediagroup.sdk.core.plugin.logging.ExpediaGroupLoggerFactory -import io.ktor.client.HttpClient -import io.ktor.client.plugins.HttpClientPlugin -import io.ktor.client.plugins.contentnegotiation.ContentConverterException -import io.ktor.client.plugins.contentnegotiation.JsonContentTypeMatcher -import io.ktor.client.request.HttpRequestBuilder -import io.ktor.client.request.HttpRequestPipeline -import io.ktor.client.statement.HttpResponseContainer -import io.ktor.client.statement.HttpResponsePipeline -import io.ktor.client.utils.EmptyContent -import io.ktor.http.ContentType -import io.ktor.http.ContentTypeMatcher -import io.ktor.http.HttpHeaders -import io.ktor.http.HttpStatusCode -import io.ktor.http.Url -import io.ktor.http.charset -import io.ktor.http.content.NullBody -import io.ktor.http.content.OutgoingContent -import io.ktor.http.contentType -import io.ktor.serialization.Configuration -import io.ktor.serialization.ContentConverter -import io.ktor.serialization.deserialize -import io.ktor.serialization.suitableCharset -import io.ktor.util.AttributeKey -import io.ktor.util.InternalAPI -import io.ktor.util.reflect.TypeInfo -import io.ktor.utils.io.ByteReadChannel -import io.ktor.utils.io.charsets.Charset -import java.io.InputStream -import kotlin.reflect.KClass - -internal val DefaultCommonIgnoredTypes: Set> = - setOf( - ByteArray::class, - String::class, - HttpStatusCode::class, - ByteReadChannel::class, - OutgoingContent::class - ) - -internal val DefaultIgnoredTypes: Set> = mutableSetOf(InputStream::class) - -internal class ContentNegotiation( - private val registrations: List, - private val ignoredTypes: Set> -) { - internal class Config : Configuration { - internal class ConverterRegistration( - val converter: ContentConverter, - val contentTypeToSend: ContentType, - val contentTypeMatcher: ContentTypeMatcher - ) - - val registrations = mutableListOf() - val ignoredTypes: MutableSet> = - (DefaultIgnoredTypes + DefaultCommonIgnoredTypes).toMutableSet() - - override fun register( - contentType: ContentType, - converter: T, - configuration: T.() -> Unit - ) { - val matcher = - when (contentType) { - ContentType.Application.Json -> JsonContentTypeMatcher - else -> defaultMatcher(contentType) - } - register(contentType, converter, matcher, configuration) - } - - private fun register( - contentTypeToSend: ContentType, - converter: T, - contentTypeMatcher: ContentTypeMatcher, - configuration: T.() -> Unit - ) { - val registration = - ConverterRegistration( - converter.apply(configuration), - contentTypeToSend, - contentTypeMatcher - ) - registrations.add(registration) - } - - private fun defaultMatcher(pattern: ContentType): ContentTypeMatcher = - object : ContentTypeMatcher { - override fun contains(contentType: ContentType): Boolean = contentType.match(pattern) - } - } - - private val log = ExpediaGroupLoggerFactory.getLogger(this::class.java) - - internal suspend fun convertRequest( - request: HttpRequestBuilder, - body: Any - ): Any? { - if (body is OutgoingContent || ignoredTypes.any { it.isInstance(body) }) { - log.trace( - "Body type ${body::class} is in ignored types. " + - "Skipping ContentNegotiation for ${request.url}." - ) - return null - } - val contentType = - request.contentType() ?: run { - log.trace("Request doesn't have Content-Type header. Skipping ContentNegotiation for ${request.url}.") - return null - } - - if (body is Unit) { - log.trace("Sending empty body for ${request.url}") - request.headers.remove(HttpHeaders.ContentType) - return EmptyContent - } - - val matchingRegistrations = - registrations.filter { it.contentTypeMatcher.contains(contentType) } - .takeIf { it.isNotEmpty() } ?: run { - log.trace( - "None of the registered converters match request Content-Type=$contentType. " + - "Skipping ContentNegotiation for ${request.url}." - ) - return null - } - if (request.bodyType == null) { - log.trace("Request has unknown body type. Skipping ContentNegotiation for ${request.url}.") - return null - } - request.headers.remove(HttpHeaders.ContentType) - - // Pick the first one that can convert the subject successfully - val serializedContent = - matchingRegistrations.firstNotNullOfOrNull { registration -> - val result = - registration.converter.serializeNullable( - contentType, - contentType.charset() ?: Charsets.UTF_8, - request.bodyType!!, - body.takeIf { it != NullBody } - ) - if (result != null) { - log.trace("Converted request body using ${registration.converter} for ${request.url}") - } - result - } ?: throw ContentConverterException( - "Can't convert $body with contentType $contentType using converters " + - matchingRegistrations.joinToString { it.converter.toString() } - ) - - return serializedContent - } - - @OptIn(InternalAPI::class) - internal suspend fun convertResponse( - requestUrl: Url, - info: TypeInfo, - body: Any, - responseContentType: ContentType, - charset: Charset = Charsets.UTF_8 - ): Any? { - if (body !is ByteReadChannel) { - log.trace("Response body is already transformed. Skipping ContentNegotiation for $requestUrl.") - return null - } - if (info.type in ignoredTypes) { - log.trace( - "Response body type ${info.type} is in ignored types. " + - "Skipping ContentNegotiation for $requestUrl." - ) - return null - } - - log.debug("Test: ${registrations.size}") - val suitableConverters = - registrations - .filter { it.contentTypeMatcher.contains(responseContentType) } - .map { it.converter } - .takeIf { it.isNotEmpty() } - ?: run { - log.trace( - "None of the registered converters match response with Content-Type=$responseContentType. " + - "Skipping ContentNegotiation for $requestUrl." - ) - return null - } - - val result = suitableConverters.deserialize(body, info, charset) - if (result !is ByteReadChannel) { - log.trace("Response body was converted to ${result::class} for $requestUrl.") - } - return result - } - - companion object Plugin : HttpClientPlugin { - override val key: AttributeKey = AttributeKey("ContentNegotiation") - private val log = ExpediaGroupLoggerFactory.getLogger(this::class.java) - - override fun install( - plugin: ContentNegotiation, - scope: HttpClient - ) { - scope.requestPipeline.intercept(HttpRequestPipeline.Transform) { - val result = plugin.convertRequest(context, subject) ?: return@intercept - proceedWith(result) - } - - scope.responsePipeline.intercept(HttpResponsePipeline.Transform) { (info, body) -> - val contentType = - context.response.contentType() ?: run { - log.trace("Response doesn't have \"Content-Type\" header, skipping ContentNegotiation plugin") - return@intercept - } - val charset = context.request.headers.suitableCharset() - - val deserializedBody = - plugin.convertResponse(context.request.url, info, body, contentType, charset) - ?: return@intercept - val result = HttpResponseContainer(info, deserializedBody) - proceedWith(result) - } - } - - override fun prepare(block: Config.() -> Unit): ContentNegotiation { - val config = Config().apply(block) - return ContentNegotiation(config.registrations, config.ignoredTypes) - } - } -} diff --git a/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationPlugin.kt b/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationPlugin.kt deleted file mode 100644 index eda9abc14..000000000 --- a/customizations/core/src/main/kotlin/com/expediagroup/sdk/core/plugin/serialization/SerializationPlugin.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.core.plugin.serialization - -import com.expediagroup.sdk.core.client.Client -import com.expediagroup.sdk.core.plugin.Plugin -import com.fasterxml.jackson.databind.DeserializationFeature -import com.fasterxml.jackson.databind.PropertyNamingStrategies -import io.ktor.serialization.jackson.jackson -import java.text.SimpleDateFormat - -internal object SerializationPlugin : Plugin { - override fun install( - client: Client, - configurations: SerializationConfiguration - ) { - configurations.httpClientConfiguration.install(ContentNegotiation) { - jackson { - enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS) - disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE) - setDateFormat(SimpleDateFormat()) - findAndRegisterModules() - } - } - } -} diff --git a/customizations/generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/OpenApiSdkGenerator.kt b/customizations/generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/OpenApiSdkGenerator.kt deleted file mode 100644 index b930fe0d9..000000000 --- a/customizations/generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/OpenApiSdkGenerator.kt +++ /dev/null @@ -1,172 +0,0 @@ -/* - * 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. - */ -package com.expediagroup.sdk.generators.openapi - -import com.expediagroup.sdk.model.ClientGenerationException -import com.expediagroup.sdk.product.Product -import com.expediagroup.sdk.product.ProgrammingLanguage -import com.github.rvesse.airline.SingleCommand -import com.github.rvesse.airline.annotations.Command -import com.github.rvesse.airline.annotations.Option -import org.openapitools.codegen.CodegenConstants -import org.openapitools.codegen.DefaultGenerator -import org.openapitools.codegen.SupportingFile -import org.openapitools.codegen.api.TemplateDefinition -import org.openapitools.codegen.api.TemplateFileType -import org.openapitools.codegen.config.CodegenConfigurator - -/** - * Configures the OpenAPI Generator based on command line parameters to generate an EG Travel SDK project - * This will produce a maven project in the specified output directory - */ -@Command(name = "generate", description = "Let's build an EG Travel SDK!") -class OpenApiSdkGenerator { - private val supportingFiles = - mutableListOf( - "pom.xml", - "README.md", - "ApiException.kt", - "LinkableOperation.kt", - "ApiAbstractions.kt" - ) - - companion object { - /** - * Main Entry Point - * - * Parses command line arguments and then generates an EG Travel SDK - */ - @JvmStatic - fun main(args: Array) { - val generator = SingleCommand.singleCommand(OpenApiSdkGenerator::class.java).parse(*args) - generator.run() - } - } - - @Option(name = ["-i", "--input-spec"]) - lateinit var inputFile: String - - @Option(name = ["-o", "--output-directory"]) - lateinit var outputDirectory: String - - @Option(name = ["-n", "--namespace"]) - lateinit var namespace: String - - @Option(name = ["-v", "--version"]) - lateinit var version: String - - @Option(name = ["-l", "--language"]) - lateinit var programmingLanguage: String - - @Option(name = ["-t", "--templates-dir"]) - lateinit var templateDir: String - - @Option(name = ["-r", "--repo-name"]) - lateinit var repoName: String - - fun run() { - try { - val product = Product(namespace, repoName, programmingLanguage) - val config = - CodegenConfigurator().apply { - setGeneratorName("kotlin") - setTemplateDir(templateDir) - setInputSpec(inputFile) - setOutputDir(outputDirectory) - setArtifactId(product.artifactId) - setArtifactVersion(version) - setGroupId(product.groupId) - setPackageName(product.packageName) - setEnablePostProcessFile(true) - - addGlobalProperty(CodegenConstants.APIS, "") - addGlobalProperty(CodegenConstants.API_DOCS, "false") - addGlobalProperty(CodegenConstants.MODELS, "") - addGlobalProperty(CodegenConstants.MODEL_DOCS, "false") - - supportingFiles.add("${namespace.replaceFirstChar(Char::titlecase)}Client.kt") - supportingFiles.add("Room.kt") - - addGlobalProperty(CodegenConstants.SUPPORTING_FILES, supportingFiles.joinToString(",")) - // addGlobalProperty("debugSupportingFiles", "") - - addAdditionalProperty(CodegenConstants.API_SUFFIX, "Operation") - addAdditionalProperty(CodegenConstants.API_PACKAGE, product.apiPackage) - addAdditionalProperty(CodegenConstants.ENUM_PROPERTY_NAMING, "UPPERCASE") - addAdditionalProperty(CodegenConstants.LIBRARY, "jvm-ktor") - addAdditionalProperty(CodegenConstants.SERIALIZATION_LIBRARY, "jackson") - addAdditionalProperty(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, true) - - // Template specific properties - addAdditionalProperty("shadePrefix", product.shadePrefix) - addAdditionalProperty("namespace", product.namespace) - addAdditionalProperty("clientClassname", namespace.pascalCase()) - addAdditionalProperty("language", product.programmingLanguage.id) - addAdditionalProperty("repoName", product.repoName) - addAdditionalProperty("isKotlin", ProgrammingLanguage.isKotlin(product.programmingLanguage)) - - // Mustache Helpers - mustacheHelpers.forEach { (name, function) -> addAdditionalProperty(name, function()) } - } - - val generatorInput = - config.toClientOptInput().apply { - val packagePath = product.packagePath - - userDefinedTemplates( - buildList { - add( - SupportingFile( - "client.mustache", - "$packagePath/client/", - "${namespace.replaceFirstChar(Char::titlecase)}Client.kt" - ) - ) - add(SupportingFile("pom.mustache", "pom.xml")) - add(SupportingFile("README.mustache", "README.md")) - add( - SupportingFile( - "models/apiException.mustache", - "$packagePath/models/exception/", - "ApiException.kt" - ) - ) - - add( - TemplateDefinition( - "operation_params.mustache", - "Params.kt" - ).also { it.templateType = TemplateFileType.API } - ) - - add( - SupportingFile( - "xap/room.mustache", - "$packagePath/models/", - "Room.kt" - ) - ) - } - ) - } - - val generator = DefaultGenerator(false).apply { opts(generatorInput) } - generator.generate() - } catch (e: Exception) { - throw ClientGenerationException("Failed to generate SDK", e) - } - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-builder-method-param-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-builder-method-param-type.yaml deleted file mode 100644 index 9196a5d5a..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-builder-method-param-type.yaml +++ /dev/null @@ -1,8 +0,0 @@ -rule: - kind: user_type - inside: - kind: parameter - regex: freeCancellationEndDateTime - stopBy: - kind: class_declaration - regex: Builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-class-param-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-class-param-type.yaml deleted file mode 100644 index 8aa1ed890..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-class-param-type.yaml +++ /dev/null @@ -1,11 +0,0 @@ -rule: - kind: user_type - pattern: $TYPE - inside: - any: - - kind: class_parameter - regex: freeCancellationEndDateTime - - kind: nullable_type - inside: - kind: class_parameter - regex: freeCancellationEndDateTime diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/available-time-slot/change-builder-method-param-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/available-time-slot/change-builder-method-param-type.yaml deleted file mode 100644 index 508fadcdc..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/available-time-slot/change-builder-method-param-type.yaml +++ /dev/null @@ -1,8 +0,0 @@ -rule: - kind: user_type - inside: - kind: parameter - regex: dateTime - stopBy: - kind: class_declaration - regex: Builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/available-time-slot/change-class-param-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/available-time-slot/change-class-param-type.yaml deleted file mode 100644 index 63cfebce3..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/available-time-slot/change-class-param-type.yaml +++ /dev/null @@ -1,11 +0,0 @@ -rule: - kind: user_type - pattern: $TYPE - inside: - any: - - kind: class_parameter - regex: dateTime - - kind: nullable_type - inside: - kind: class_parameter - regex: dateTime diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-builder-method-param-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-builder-method-param-type.yaml deleted file mode 100644 index 9196a5d5a..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-builder-method-param-type.yaml +++ /dev/null @@ -1,8 +0,0 @@ -rule: - kind: user_type - inside: - kind: parameter - regex: freeCancellationEndDateTime - stopBy: - kind: class_declaration - regex: Builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-class-param-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-class-param-type.yaml deleted file mode 100644 index 8aa1ed890..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-class-param-type.yaml +++ /dev/null @@ -1,11 +0,0 @@ -rule: - kind: user_type - pattern: $TYPE - inside: - any: - - kind: class_parameter - regex: freeCancellationEndDateTime - - kind: nullable_type - inside: - kind: class_parameter - regex: freeCancellationEndDateTime diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-builder-method-params-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-builder-method-params-type.yaml deleted file mode 100644 index c273f8d4a..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-builder-method-params-type.yaml +++ /dev/null @@ -1,11 +0,0 @@ -rule: - kind: user_type - inside: - any: - - kind: parameter - regex: pickupTime - - kind: parameter - regex: dropOffTime - stopBy: - kind: class_declaration - regex: Builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-class-params-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-class-params-type.yaml deleted file mode 100644 index 606ec0fd5..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-class-params-type.yaml +++ /dev/null @@ -1,16 +0,0 @@ -rule: - kind: user_type - pattern: $TYPE - inside: - any: - - kind: class_parameter - regex: pickupTime - - kind: class_parameter - regex: dropOffTime - - kind: nullable_type - inside: - any: - - kind: class_parameter - regex: pickupTime - - kind: class_parameter - regex: dropOffTime diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/import-chrono-unit.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/import-chrono-unit.yaml deleted file mode 100644 index 214190f54..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/import-chrono-unit.yaml +++ /dev/null @@ -1,4 +0,0 @@ -rule: - kind: "import_header" - regex: "OperationParams" - pattern: "$HEADER" diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/truncate-pickup-dropoff-times.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/truncate-pickup-dropoff-times.yaml deleted file mode 100644 index eb09ba3b3..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/truncate-pickup-dropoff-times.yaml +++ /dev/null @@ -1,16 +0,0 @@ -rule: - kind: value_argument - nthChild: 2 - inside: - kind: call_suffix - stopBy: end - has: - any: - - kind: value_arguments - regex: pickupTime - - kind: value_arguments - regex: dropOffTime - inside: - kind: function_declaration - stopBy: end - regex: getQueryParams diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/add-rooms-builder-method.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/add-rooms-builder-method.yaml deleted file mode 100644 index 18244f782..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/add-rooms-builder-method.yaml +++ /dev/null @@ -1,8 +0,0 @@ -rule: - kind: 'function_declaration' - regex: 'fun build' - pattern: '$FUNC' - inside: - kind: 'class_body' - inside: - pattern: 'class Builder' diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/import-room.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/import-room.yaml deleted file mode 100644 index 214190f54..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/import-room.yaml +++ /dev/null @@ -1,4 +0,0 @@ -rule: - kind: "import_header" - regex: "OperationParams" - pattern: "$HEADER" diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/remove-room-builder-methods.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/remove-room-builder-methods.yaml deleted file mode 100644 index 4590c8918..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/remove-room-builder-methods.yaml +++ /dev/null @@ -1,14 +0,0 @@ -utils: - room-builder: - kind: 'function_declaration' - regex: 'fun room*' - inside: - kind: 'class_body' - inside: - pattern: 'class Builder' -rule: - any: - - matches: room-builder - - kind: 'multiline_comment' - precedes: - matches: room-builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/add-rooms-builder-method.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/add-rooms-builder-method.yaml deleted file mode 100644 index 18244f782..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/add-rooms-builder-method.yaml +++ /dev/null @@ -1,8 +0,0 @@ -rule: - kind: 'function_declaration' - regex: 'fun build' - pattern: '$FUNC' - inside: - kind: 'class_body' - inside: - pattern: 'class Builder' diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/import-room.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/import-room.yaml deleted file mode 100644 index 214190f54..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/import-room.yaml +++ /dev/null @@ -1,4 +0,0 @@ -rule: - kind: "import_header" - regex: "OperationParams" - pattern: "$HEADER" diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/remove-room-builder-methods.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/remove-room-builder-methods.yaml deleted file mode 100644 index 4590c8918..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/remove-room-builder-methods.yaml +++ /dev/null @@ -1,14 +0,0 @@ -utils: - room-builder: - kind: 'function_declaration' - regex: 'fun room*' - inside: - kind: 'class_body' - inside: - pattern: 'class Builder' -rule: - any: - - matches: room-builder - - kind: 'multiline_comment' - precedes: - matches: room-builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-builder-method-params-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-builder-method-params-type.yaml deleted file mode 100644 index d99331336..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-builder-method-params-type.yaml +++ /dev/null @@ -1,11 +0,0 @@ -rule: - kind: user_type - inside: - any: - - kind: parameter - regex: startDateTime - - kind: parameter - regex: endDateTime - stopBy: - kind: class_declaration - regex: Builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-class-params-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-class-params-type.yaml deleted file mode 100644 index a162d9560..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-class-params-type.yaml +++ /dev/null @@ -1,16 +0,0 @@ -rule: - kind: user_type - pattern: $TYPE - inside: - any: - - kind: class_parameter - regex: startDateTime - - kind: class_parameter - regex: endDateTime - - kind: nullable_type - inside: - any: - - kind: class_parameter - regex: startDateTime - - kind: class_parameter - regex: endDateTime diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/penalty-rule/change-builder-method-params-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/penalty-rule/change-builder-method-params-type.yaml deleted file mode 100644 index d99331336..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/penalty-rule/change-builder-method-params-type.yaml +++ /dev/null @@ -1,11 +0,0 @@ -rule: - kind: user_type - inside: - any: - - kind: parameter - regex: startDateTime - - kind: parameter - regex: endDateTime - stopBy: - kind: class_declaration - regex: Builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/penalty-rule/change-class-params-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/penalty-rule/change-class-params-type.yaml deleted file mode 100644 index a162d9560..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/penalty-rule/change-class-params-type.yaml +++ /dev/null @@ -1,16 +0,0 @@ -rule: - kind: user_type - pattern: $TYPE - inside: - any: - - kind: class_parameter - regex: startDateTime - - kind: class_parameter - regex: endDateTime - - kind: nullable_type - inside: - any: - - kind: class_parameter - regex: startDateTime - - kind: class_parameter - regex: endDateTime diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/vendor-location-details/change-builder-method-param-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/vendor-location-details/change-builder-method-param-type.yaml deleted file mode 100644 index 508fadcdc..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/vendor-location-details/change-builder-method-param-type.yaml +++ /dev/null @@ -1,8 +0,0 @@ -rule: - kind: user_type - inside: - kind: parameter - regex: dateTime - stopBy: - kind: class_declaration - regex: Builder diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/vendor-location-details/change-class-param-type.yaml b/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/vendor-location-details/change-class-param-type.yaml deleted file mode 100644 index 63cfebce3..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/rules/vendor-location-details/change-class-param-type.yaml +++ /dev/null @@ -1,11 +0,0 @@ -rule: - kind: user_type - pattern: $TYPE - inside: - any: - - kind: class_parameter - regex: dateTime - - kind: nullable_type - inside: - kind: class_parameter - regex: dateTime diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt b/customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt deleted file mode 100644 index 804d09cac..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt +++ /dev/null @@ -1,48 +0,0 @@ -fun rooms(rooms: List) = - apply { - if (rooms.size > 8) { - throw PropertyConstraintViolationException( - constraintViolations = listOf("rooms: size must be between 0 and 8") - ) - } - - rooms.elementAtOrNull(0)?.let { - this.room1Adults = it.adults - this.room1ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(1)?.let { - this.room2Adults = it.adults - this.room2ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(2)?.let { - this.room3Adults = it.adults - this.room3ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(3)?.let { - this.room4Adults = it.adults - this.room4ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(4)?.let { - this.room5Adults = it.adults - this.room5ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(5)?.let { - this.room6Adults = it.adults - this.room6ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(6)?.let { - this.room7Adults = it.adults - this.room7ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(7)?.let { - this.room8Adults = it.adults - this.room8ChildAges = it.childAges?.map { item -> item.toString() } - } - } diff --git a/customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt b/customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt deleted file mode 100644 index 804d09cac..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt +++ /dev/null @@ -1,48 +0,0 @@ -fun rooms(rooms: List) = - apply { - if (rooms.size > 8) { - throw PropertyConstraintViolationException( - constraintViolations = listOf("rooms: size must be between 0 and 8") - ) - } - - rooms.elementAtOrNull(0)?.let { - this.room1Adults = it.adults - this.room1ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(1)?.let { - this.room2Adults = it.adults - this.room2ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(2)?.let { - this.room3Adults = it.adults - this.room3ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(3)?.let { - this.room4Adults = it.adults - this.room4ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(4)?.let { - this.room5Adults = it.adults - this.room5ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(5)?.let { - this.room6Adults = it.adults - this.room6ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(6)?.let { - this.room7Adults = it.adults - this.room7ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(7)?.let { - this.room8Adults = it.adults - this.room8ChildAges = it.childAges?.map { item -> item.toString() } - } - } diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/index.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/index.ts deleted file mode 100644 index 78e401680..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -import {CarsCancellationPolicyProcessor} from './processors/cars-cancellation-policy-processor'; -import {GetLodgingListingsOperationParamsProcessor} from './processors/get-lodging-listings-operation-params-processor'; -import {GetLodgingQuotesOperationParamsProcessor} from './processors/get-lodging-quotes-operation-params-processor'; -import {NonCancellableDateTimeRangeProcessor} from './processors/non-cancellable-date-time-range-processor'; -import {PenaltyRuleProcessor} from './processors/penalty-rule-processor'; -import {VendorLocationDetailsProcessor} from './processors/vendor-location-details-processor'; -import {GetCarsListingsOperationParamsProcessor} from './processors/get-cars-listings-operation-params-processor'; -import {ActivitiesCancellationPolicyProcessor} from './processors/activities-cancellation-policy-processor'; -import {AvailableTimeSlotProcessor} from './processors/available-time-slot-processor'; - -import * as path from 'path'; - -const args = process.argv.slice(2); -const filePath = args[0]; -const fileName = path.parse(filePath).name; - -switch (fileName) { - case 'CarsCancellationPolicy': - new CarsCancellationPolicyProcessor().process(filePath); - break; - case 'GetLodgingListingsOperationParams': - new GetLodgingListingsOperationParamsProcessor().process(filePath); - break; - case 'GetLodgingQuotesOperationParams': - new GetLodgingQuotesOperationParamsProcessor().process(filePath); - break; - case 'NonCancellableDateTimeRange': - new NonCancellableDateTimeRangeProcessor().process(filePath); - break; - case 'PenaltyRule': - new PenaltyRuleProcessor().process(filePath); - break; - case 'VendorLocationDetails': - new VendorLocationDetailsProcessor().process(filePath); - break; - case 'GetCarsListingsOperationParams': - new GetCarsListingsOperationParamsProcessor().process(filePath); - break; - case 'ActivitiesCancellationPolicy': - new ActivitiesCancellationPolicyProcessor().process(filePath); - break; - case 'AvailableTimeSlot': - new AvailableTimeSlotProcessor().process(filePath); - break; -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/activities-cancellation-policy-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/activities-cancellation-policy-processor.ts deleted file mode 100644 index 0e0e93289..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/activities-cancellation-policy-processor.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class ActivitiesCancellationPolicyProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'activities-cancellation-policy'; - - constructor() { - super(); - this.rules = [ - this.changeClassParamType, - this.changeBuilderMethodParamType, - ].map(rule => rule.bind(this)); - } - - changeClassParamType(root: SgNode): Edit[] { - const config = this.readRule('change-class-param-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } - - changeBuilderMethodParamType(root: SgNode): Edit[] { - const config = this.readRule('change-builder-method-param-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/available-time-slot-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/available-time-slot-processor.ts deleted file mode 100644 index 8f023644d..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/available-time-slot-processor.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class AvailableTimeSlotProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'available-time-slot'; - - constructor() { - super(); - this.rules = [ - this.changeClassParamType, - this.changeBuilderMethodParamType, - ].map(rule => rule.bind(this)); - } - - changeClassParamType(root: SgNode): Edit[] { - const config = this.readRule('change-class-param-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } - - changeBuilderMethodParamType(root: SgNode): Edit[] { - const config = this.readRule('change-builder-method-param-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/cars-cancellation-policy-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/cars-cancellation-policy-processor.ts deleted file mode 100644 index 79b6277f9..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/cars-cancellation-policy-processor.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class CarsCancellationPolicyProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'car-cancellation-policy'; - - constructor() { - super(); - this.rules = [ - this.changeClassParamType, - this.changeBuilderMethodParamType, - ].map(rule => rule.bind(this)); - } - - changeClassParamType(root: SgNode): Edit[] { - const config = this.readRule('change-class-param-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } - - changeBuilderMethodParamType(root: SgNode): Edit[] { - const config = this.readRule('change-builder-method-param-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-cars-listings-operation-params-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-cars-listings-operation-params-processor.ts deleted file mode 100644 index 4b5b27e45..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-cars-listings-operation-params-processor.ts +++ /dev/null @@ -1,54 +0,0 @@ -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class GetCarsListingsOperationParamsProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'get-cars-listings-operation-params'; - - constructor() { - super(); - this.rules = [ - this.changeClassParamType, - this.changeBuilderMethodParamType, - this.importChronoUnit, - this.truncatePickupDropoffTimes, - ].map(rule => rule.bind(this)); - } - - changeClassParamType(root: SgNode): Edit[] { - const config = this.readRule('change-class-params-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } - - changeBuilderMethodParamType(root: SgNode): Edit[] { - const config = this.readRule('change-builder-method-params-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } - - importChronoUnit(root: SgNode): Edit[] { - const config = this.readRule('import-chrono-unit'); - - return root.findAll(config).map(node => { - const room = 'import java.time.temporal.ChronoUnit'; - const header = node.getMatch('HEADER')?.text(); - - return node.replace(`${room}\n${header}`); - }); - - } - - truncatePickupDropoffTimes(root: SgNode): Edit[] { - const config = this.readRule('truncate-pickup-dropoff-times'); - - return root.findAll(config).map(node => { - return node.replace('it.truncatedTo(ChronoUnit.MINUTES).toString()'); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-lodging-listings-operation-params-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-lodging-listings-operation-params-processor.ts deleted file mode 100644 index c750e84bb..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-lodging-listings-operation-params-processor.ts +++ /dev/null @@ -1,51 +0,0 @@ -import * as fs from 'node:fs'; -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class GetLodgingListingsOperationParamsProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'get-lodging-listings-operation-params'; - - constructor() { - super(); - this.rules = [ - this.removeRoomBuilderMethods, - this.importRoom, - this.addRoomsBuilderMethod, - ].map(rule => rule.bind(this)); - } - - removeRoomBuilderMethods(root: SgNode): Edit[] { - const config = this.readRule('remove-room-builder-methods'); - - return root.findAll(config).map(node => { - return node.replace(''); - }); - } - - importRoom(root: SgNode): Edit[] { - const config = this.readRule('import-room'); - - return root.findAll(config).map(node => { - const room = 'import com.expediagroup.sdk.xap.models.Room'; - const header = node.getMatch('HEADER')?.text(); - - return node.replace(`${room}\n${header}`); - }); - } - - addRoomsBuilderMethod(root: SgNode): Edit[] { - const config = this.readRule('add-rooms-builder-method'); - - const source = fs.readFileSync( - './assets/templates/get-lodging-listings-operation-params/rooms.kt', - 'utf-8' - ); - - return root.findAll(config).map(node => { - const func = node.getMatch('FUNC')?.text(); - return node.replace(`${source}\n${func}`); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-lodging-quotes-operation-params-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-lodging-quotes-operation-params-processor.ts deleted file mode 100644 index 93fbb390b..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/get-lodging-quotes-operation-params-processor.ts +++ /dev/null @@ -1,51 +0,0 @@ -import * as fs from 'node:fs'; -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class GetLodgingQuotesOperationParamsProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'get-lodging-quotes-operation-params'; - - constructor() { - super(); - this.rules = [ - this.removeRoomBuilderMethods, - this.importRoom, - this.addRoomsBuilderMethod, - ].map(rule => rule.bind(this)); - } - - removeRoomBuilderMethods(root: SgNode): Edit[] { - const config = this.readRule('remove-room-builder-methods'); - - return root.findAll(config).map(node => { - return node.replace(''); - }); - } - - importRoom(root: SgNode): Edit[] { - const config = this.readRule('import-room'); - - return root.findAll(config).map(node => { - const room = 'import com.expediagroup.sdk.xap.models.Room'; - const header = node.getMatch('HEADER')?.text(); - - return node.replace(`${room}\n${header}`); - }); - } - - addRoomsBuilderMethod(root: SgNode): Edit[] { - const config = this.readRule('add-rooms-builder-method'); - - const source = fs.readFileSync( - './assets/templates/get-lodging-quotes-operation-params/rooms.kt', - 'utf-8' - ); - - return root.findAll(config).map(node => { - const func = node.getMatch('FUNC')?.text(); - return node.replace(`${source}\n${func}`); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/non-cancellable-date-time-range-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/non-cancellable-date-time-range-processor.ts deleted file mode 100644 index 27f5b5f7a..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/non-cancellable-date-time-range-processor.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class NonCancellableDateTimeRangeProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'non-cancellable-date-time-range'; - - constructor() { - super(); - this.rules = [ - this.changeClassParamType, - this.changeBuilderMethodParamType, - ].map(rule => rule.bind(this)); - } - - changeClassParamType(root: SgNode): Edit[] { - const config = this.readRule('change-class-params-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } - - changeBuilderMethodParamType(root: SgNode): Edit[] { - const config = this.readRule('change-builder-method-params-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/penalty-rule-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/penalty-rule-processor.ts deleted file mode 100644 index b9fa1b69f..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/penalty-rule-processor.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class PenaltyRuleProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'penalty-rule'; - - constructor() { - super(); - this.rules = [ - this.changeClassParamType, - this.changeBuilderMethodParamType, - ].map(rule => rule.bind(this)); - } - - changeClassParamType(root: SgNode): Edit[] { - const config = this.readRule('change-class-params-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } - - changeBuilderMethodParamType(root: SgNode): Edit[] { - const config = this.readRule('change-builder-method-params-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/vendor-location-details-processor.ts b/customizations/generator/openapi/src/main/resources/post-processor/src/processors/vendor-location-details-processor.ts deleted file mode 100644 index a236862c1..000000000 --- a/customizations/generator/openapi/src/main/resources/post-processor/src/processors/vendor-location-details-processor.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; -import {Processor} from './processor'; -import {RuleFunction} from './shared.types'; - -export class VendorLocationDetailsProcessor extends Processor { - rules: RuleFunction[]; - id: String = 'vendor-location-details'; - - constructor() { - super(); - this.rules = [ - this.changeClassParamType, - this.changeBuilderMethodParamType, - ].map(rule => rule.bind(this)); - } - - changeClassParamType(root: SgNode): Edit[] { - const config = this.readRule('change-class-param-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } - - changeBuilderMethodParamType(root: SgNode): Edit[] { - const config = this.readRule('change-builder-method-param-type'); - - return root.findAll(config).map(node => { - return node.replace('java.time.LocalDateTime'); - }); - } -} diff --git a/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/client.mustache b/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/client.mustache deleted file mode 100644 index 45c4b3442..000000000 --- a/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/client.mustache +++ /dev/null @@ -1,161 +0,0 @@ -package com.expediagroup.sdk.{{namespace}}.client - -import java.util.concurrent.CompletableFuture -import java.util.stream.Collectors -import kotlin.collections.Map.Entry -import kotlinx.coroutines.runBlocking - -{{#imports}} - import {{import}} -{{/imports}} - -{{>imports/domain}} - -{{>imports/core}} - -{{>imports/defaults}} - -/** -* {{#openAPI}}{{#info}}{{{description}}}{{/info}}{{/openAPI}} -*/ - -class {{clientClassname}}Client private constructor(clientConfiguration: XapClientConfiguration) : BaseXapClient("{{namespace}}", clientConfiguration) { - class Builder : BaseXapClient.Builder() { - override fun build() = {{clientClassname}}Client( - XapClientConfiguration(key, secret, endpoint, requestTimeout, connectionTimeout, socketTimeout, maskedLoggingHeaders, maskedLoggingBodyFields) - ) - } - - class BuilderWithHttpClient() : BaseXapClient.BuilderWithHttpClient() { - override fun build() : {{clientClassname}}Client { - - if (okHttpClient == null) { - throw ExpediaGroupConfigurationException(getMissingRequiredConfigurationMessage(ConfigurationName.OKHTTP_CLIENT)) - } - - return {{clientClassname}}Client( - XapClientConfiguration(key, secret, endpoint, null, null, null, maskedLoggingHeaders, maskedLoggingBodyFields, okHttpClient) - ) - } - } - - companion object { - @JvmStatic fun builder() = Builder() - - @JvmStatic fun builderWithHttpClient() = BuilderWithHttpClient() - } - - override suspend fun throwServiceException(response: HttpResponse, operationId: String) { - throw ErrorObjectMapper.process(response, operationId) - } - - private suspend inline fun executeHttpRequest(operation: Operation): HttpResponse { - return httpClient.request { - method = HttpMethod.parse(operation.method) - url(operation.url) - - operation.params?.getHeaders()?.let { - headers.appendAll(it) - } - - operation.params?.getQueryParams()?.let { - url.parameters.appendAll(it) - } - - val extraHeaders = buildMap { - put("key", configurationProvider.key ?: "") - } - - appendHeaders(extraHeaders) - contentType(ContentType.Application.Json) - setBody(operation.requestBody) - } - } - - private inline fun executeWithEmptyResponse(operation: Operation) : EmptyResponse { - try { - return executeAsyncWithEmptyResponse(operation).get() - } catch (exception: Exception) { - exception.handle() - } - } - - private inline fun executeAsyncWithEmptyResponse(operation: Operation) : CompletableFuture { - return GlobalScope.future(Dispatchers.IO) { - try { - val response = executeHttpRequest(operation) - throwIfError(response, operation.operationId) - EmptyResponse(response.status.value, response.headers.entries()) - - } catch (exception: Exception) { - exception.handle() - } - } - } - - private inline fun execute(operation: Operation) : Response { - try { - return executeAsync(operation).get() - } catch (exception: Exception) { - exception.handle() - } - } - - private inline fun executeAsync(operation: Operation) : CompletableFuture> { - return GlobalScope.future(Dispatchers.IO) { - try { - val response = executeHttpRequest(operation) - throwIfError(response, operation.operationId) - Response(response.status.value, response.body(), response.headers.entries()) - } catch (exception: Exception) { - exception.handle() - } - } - } - - {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} - /** - * {{{summary}}} - * {{{notes}}} - * @param operation [{{operationIdCamelCase}}Operation] - {{#exceptionDataTypes}} - {{#dataTypes}} - * @throws ExpediaGroupApi{{.}}Exception - {{/dataTypes}} - {{/exceptionDataTypes}} - * @return a [Response] object with a body of type {{{returnType}}}{{^returnType}}Nothing{{/returnType}} - */ - fun execute(operation: {{operationIdCamelCase}}Operation) : {{#returnType}}Response<{{{returnType}}}>{{/returnType}}{{^returnType}}EmptyResponse{{/returnType}} { - {{#returnType}} - return execute<{{#bodyParam}}{{dataType}}{{/bodyParam}}{{^hasBodyParam}}Nothing{{/hasBodyParam}}, {{{returnType}}}>(operation) - {{/returnType}} - {{^returnType}} - return executeWithEmptyResponse<{{#bodyParam}}{{dataType}}{{/bodyParam}}{{^hasBodyParam}}Nothing{{/hasBodyParam}}>(operation) - {{/returnType}} - } - - /** - * {{{summary}}} - * {{{notes}}} - * @param operation [{{operationIdCamelCase}}Operation] - {{#exceptionDataTypes}} - {{#dataTypes}} - * @throws ExpediaGroupApi{{.}}Exception - {{/dataTypes}} - {{/exceptionDataTypes}} - * @return a [CompletableFuture] object with a body of type {{{returnType}}}{{^returnType}}Nothing{{/returnType}} - */ - fun executeAsync(operation: {{operationIdCamelCase}}Operation) : CompletableFuture<{{#returnType}}Response<{{{returnType}}}>{{/returnType}}{{^returnType}}EmptyResponse{{/returnType}}> { - {{#returnType}} - return executeAsync<{{#bodyParam}}{{dataType}}{{/bodyParam}}{{^hasBodyParam}}Nothing{{/hasBodyParam}}, {{{returnType}}}>(operation) - {{/returnType}} - {{^returnType}} - return executeAsyncWithEmptyResponse<{{#bodyParam}}{{dataType}}{{/bodyParam}}{{^hasBodyParam}}Nothing{{/hasBodyParam}}>(operation) - {{/returnType}} - } - - {{#isPaginatable}} - {{>client/paginatorMethods}} - {{/isPaginatable}} - {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} -} diff --git a/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/imports/core.mustache b/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/imports/core.mustache deleted file mode 100644 index 45ac72ec9..000000000 --- a/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/imports/core.mustache +++ /dev/null @@ -1,16 +0,0 @@ -import com.expediagroup.sdk.core.client.BaseXapClient -import com.expediagroup.sdk.core.configuration.XapClientConfiguration -import com.expediagroup.sdk.core.constant.ConfigurationName -import com.expediagroup.sdk.core.constant.HeaderKey -import com.expediagroup.sdk.core.constant.provider.ExceptionMessageProvider.getMissingRequiredConfigurationMessage -import com.expediagroup.sdk.core.model.exception.ExpediaGroupException -import com.expediagroup.sdk.core.model.exception.client.ExpediaGroupConfigurationException -import com.expediagroup.sdk.core.model.exception.service.ExpediaGroupServiceException -import com.expediagroup.sdk.core.model.exception.handle -import com.expediagroup.sdk.core.model.paging.Paginator -import com.expediagroup.sdk.core.model.paging.ResponsePaginator -import com.expediagroup.sdk.core.model.EmptyResponse -import com.expediagroup.sdk.core.model.Nothing -import com.expediagroup.sdk.core.model.Properties -import com.expediagroup.sdk.core.model.Response -import com.expediagroup.sdk.core.model.Operation \ No newline at end of file diff --git a/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/operation_params.mustache b/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/operation_params.mustache deleted file mode 100644 index aeaea1529..000000000 --- a/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/operation_params.mustache +++ /dev/null @@ -1,165 +0,0 @@ -{{#operations}} - {{#operation}} - {{#hasNonBodyParams}} - package com.expediagroup.sdk.{{namespace}}.operations - - import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException - import com.expediagroup.sdk.core.model.OperationParams - - import {{packageName}}.infrastructure.* - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - import io.ktor.http.Headers - import io.ktor.http.Parameters - - import javax.validation.constraints.Max - import javax.validation.constraints.Min - import javax.validation.constraints.NotNull - import javax.validation.constraints.Pattern - import javax.validation.constraints.Size - import javax.validation.Valid - import javax.validation.Validation - - import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator - - /** - {{#nonBodyParams}} - {{#params}} - * @property {{{paramName}}} {{{description}}} - {{/params}} - {{/nonBodyParams}} - */ - @JsonDeserialize(builder = {{classname}}Params.Builder::class) - data class {{classname}}Params( - {{#nonBodyParams}} - {{#params}} - {{>models/constraints}} - {{>modelMutable}} {{>client/apiParam}}{{^-last}}, {{/-last}} - {{/params}} - {{/nonBodyParams}} - ) : OperationParams { - companion object { - @JvmStatic - fun builder() = Builder() - } - - {{#nonBodyParams}} - {{#params}} - {{#isEnum}} - enum class {{enumName}}( - val value: - {{#isContainer}}{{{items.dataType}}}{{/isContainer}} - {{^isContainer}}{{dataType}}{{/isContainer}} - ) { - {{#allowableValues}} - {{#enumVars}} - {{name}}({{{value}}}) - {{^-last}},{{/-last}} - {{/enumVars}} - {{/allowableValues}} - } - {{/isEnum}} - {{/params}} - {{/nonBodyParams}} - - class Builder( - {{#nonBodyParams}} - {{#params}} - @JsonProperty("{{{baseName}}}") private var {{{paramName}}}: {{>partials/datatype}}? = null - {{^-last}},{{/-last}} - {{/params}} - {{/nonBodyParams}} - ) { - {{#nonBodyParams}} - {{#params}} - /** - * @param {{{paramName}}} {{{description}}} - */ - fun {{{paramName}}}({{{paramName}}}: {{>partials/datatype}}) = apply { this.{{{paramName}}} = {{{paramName}}} } - {{/params}} - {{/nonBodyParams}} - - fun build(): {{classname}}Params { - val params = {{classname}}Params( - {{#nonBodyParams}} - {{#params}} - {{{paramName}}} = {{{paramName}}}{{#required}}!!{{/required}}{{^-last}},{{/-last}} - {{/params}} - {{/nonBodyParams}} - ) - - validate(params) - - return params - } - - private fun validate(params: {{classname}}Params) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } - } - } - - fun toBuilder() = Builder( - {{#nonBodyParams}} - {{#params}} - {{{paramName}}} = {{{paramName}}}{{^-last}},{{/-last}} - {{/params}} - {{/nonBodyParams}} - ) - - override fun getHeaders(): Headers { - return Headers.build { - {{#headerParams}} - {{paramName}}?.let { - append("{{baseName}}", it{{#isEnum}}.value{{/isEnum}}) - } - {{/headerParams}} - {{#responses}} - {{#httpAcceptHeader}} - append("Accept", "{{mediaTypes}}") - {{/httpAcceptHeader}} - {{/responses}} - } - } - - override fun getQueryParams(): Parameters { - return Parameters.build { - {{#queryParams}} - {{paramName}}?.let { - {{#isContainer}} - appendAll("{{baseName}}", toMultiValue(it{{#isEnum}}.map { item -> item.value }{{/isEnum}}, "{{collectionFormat}}")) - {{/isContainer}} - {{^isContainer}} - append("{{baseName}}", it{{#isEnum}}.value{{/isEnum}}{{^isString}}.toString(){{/isString}}) - {{/isContainer}} - } - {{/queryParams}} - } - } - - override fun getPathParams() : Map { - return buildMap { - {{#pathParams}} - {{paramName}}?.also { - put("{{baseName}}", {{paramName}}{{#isEnum}}.value{{/isEnum}}) - } - {{/pathParams}} - } - } - } - {{/hasNonBodyParams}} - {{/operation}} -{{/operations}} diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 06edf03d1..000000000 --- a/examples/README.md +++ /dev/null @@ -1,106 +0,0 @@ -# XAP Java SDK Examples - -This repository contains examples of how to use the Expedia Group XAP Java SDK. The examples are -written in Java and use Maven for dependency management. - -## Examples - -The example implementation provided in the examples package demonstrates different scenarios -utilizing various XAP APIs through the SDK. - -Currently, the following scenarios are included: - -### Lodging - -- [`ListingsQuickStartScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java): - - This example demonstrates how to search for properties with a location keyword with filters - applied in Lodging Listings API. - -- [`HotelIdsSearchEndToEndScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsHotelIdsSearchScenario.java): - - This example demonstrates how to retrieve accessible property ids from SDP DownloadURL API and - then get the content and prices of these properties using the Lodging Listings API. - -- [`QuotesQuickStartScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java): - - This example demonstrates how to search for property quotes with property IDs in - Lodging Quotes API. - -- [`VrboPropertySearchEndToEndScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java): - - This example demonstrates how to retrieve accessible Vrbo property ids and location content from - SDP DownloadURL API and then get the prices of these properties using the Lodging Quotes API. - -- [ - `AvailabilityCalendarsQuickStartScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java): - - This example demonstrates how to use Availability Calendar api with simple search. - In terms of how to get property ids, you can refer to `QuotesQuickStartScenario.java`. - -### Car - -- [`CarDetailsQuickStartScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java): - - This example demonstrates how to search for cars using an airport keyword with filters applied in the Car Listings API. - -- [`CarDetailsQuickStartScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java): - - This example demonstrates how to search for car details using the offerToken obtained from the car listing in the Car Details API. - -We are continuously adding more scenarios to demonstrate the usage of other XAP APIs. - -## Requirements - -- Ensure you have a valid API key and secret from Expedia Group. - Check [Getting started with XAP](https://developers.expediagroup.com/xap/products/xap/set-up/getting-started) - for more info. -- Java 1.8 or higher -- Maven - -## Setup - -1. Clone the repository. -2. Navigate to the project directory `examples`. -3. Run `mvn clean install` to build the project and install the dependencies including the XAP SDK. - -## Running the Examples - -### Run with IntelliJ IDEA -1. Navigate to the example class you want to run -2. Right-click on the class name and select `More Run/Debug` -> `Modify Run Configuration` -3. Check the `Modify options` -> `Add VM options` and add the following VM options: - ``` - -Dcom.expediagroup.xapjavasdk.apikey="{API_KEY}" - -Dcom.expediagroup.xapjavasdk.apisecret="{API_SECRET}" - ``` - Replace `{API_KEY}` and `{API_SECRET}` with your actual API key and secret. - > **Note:** If you are running the examples for Vrbo, you would need the following VM options instead: - > ``` - > -Dcom.expediagroup.xapjavasdk.vrbokey="{VRBO_KEY}" - > -Dcom.expediagroup.xapjavasdk.vrbosecret="{VRBO_SECRET}" - > ``` - > The key you use must be enabled for Vrbo brand. If you are not sure, please reach out to your account manager. -4. Click `OK` and then run the `main` method of the example class. - -### Run with Command Line -Run the following command to run the example class you want to run: -``` -mvn exec:java -Dexec.mainClass="path.to.example.ExampleClassName" \ - -Dcom.expediagroup.xapjavasdk.apikey="{API_KEY}" \ - -Dcom.expediagroup.xapjavasdk.apisecret="{API_SECRET}" -``` -Replace `path.to.example.ExampleClassName` with the full path to the example class you want to run, -and `{API_KEY}` and `{API_SECRET}` with your actual API key and secret. - -> **Note:** If you are running the examples for Vrbo, you should use the following command instead: -> ``` -> mvn exec:java -Dexec.mainClass="path.to.example.ExampleClassName" \ -> -Dcom.expediagroup.xapjavasdk.vrbokey="{VRBO_KEY}" \ -> -Dcom.expediagroup.xapjavasdk.vrbosecret="{VRBO_SECRET}" -> ``` -> The key you use must be enabled for Vrbo brand. If you are not sure, please reach out to your account manager. - -## License - -This project is licensed under the Apache License v2.0 - see the [LICENSE](../LICENSE) for details. \ No newline at end of file diff --git a/examples/pom.xml b/examples/pom.xml deleted file mode 100644 index 0c8e4d50d..000000000 --- a/examples/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - 4.0.0 - - com.expediagroup - xap-java-sdk-examples - 1.0-SNAPSHOT - XAP Java SDK Examples - Expedia Group XAP Java SDK Examples - - - 1.8 - 1.8 - 1.8 - UTF-8 - 1.1.0 - - - - - oss.sonatype.org-snapshot - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - - - - - - com.expediagroup - xap-sdk - ${xap-java-sdk.sdk.version} - - - - org.apache.logging.log4j - log4j-api - 2.24.3 - - - - org.apache.logging.log4j - log4j-slf4j2-impl - 2.24.3 - - - - com.fasterxml.jackson.core - jackson-databind - 2.18.2 - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.6.0 - - google_checks.xml - true - warning - - - - - check - - - - - - - diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/XapSdkDemoTestRun.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/XapSdkDemoTestRun.java deleted file mode 100644 index f2c985fae..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/XapSdkDemoTestRun.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2024 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. - */ - -package com.expediagroup.sdk.xap.examples; - -import com.expediagroup.sdk.xap.examples.scenarios.car.CarDetailsQuickStartScenario; -import com.expediagroup.sdk.xap.examples.scenarios.car.CarListingsQuickStartScenario; -import com.expediagroup.sdk.xap.examples.scenarios.lodging.AvailabilityCalendarsQuickStartScenario; -import com.expediagroup.sdk.xap.examples.scenarios.lodging.HotelIdsSearchEndToEndScenario; -import com.expediagroup.sdk.xap.examples.scenarios.lodging.ListingsQuickStartScenario; -import com.expediagroup.sdk.xap.examples.scenarios.lodging.VrboPropertySearchEndToEndScenario; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This is an aggregation runner for all the scenarios for test purposes. - * For reference, see the individual scenarios in the scenarios package. - */ -public class XapSdkDemoTestRun { - private static final Logger logger = LoggerFactory.getLogger(XapSdkDemoTestRun.class); - - /** - * Main method. - */ - public static void main(String[] args) { - - logger.info( - "============================== Running Lodging Scenarios ============================="); - - AvailabilityCalendarsQuickStartScenario availabilityCalendarsQuickStartScenario = - new AvailabilityCalendarsQuickStartScenario(); - availabilityCalendarsQuickStartScenario.run(); - - ListingsQuickStartScenario listingsQuickStartScenario = new ListingsQuickStartScenario(); - listingsQuickStartScenario.run(); - - HotelIdsSearchEndToEndScenario hotelIdsSearchEndToEndScenario = - new HotelIdsSearchEndToEndScenario(); - hotelIdsSearchEndToEndScenario.run(); - - VrboPropertySearchEndToEndScenario vrboPropertySearchEndToEndScenario = - new VrboPropertySearchEndToEndScenario(); - vrboPropertySearchEndToEndScenario.run(); - - logger.info( - "=============================== End of Lodging Scenarios =============================="); - - logger.info( - "============================== Running Car Scenarios ============================="); - CarListingsQuickStartScenario carListingsQuickStartScenario = - new CarListingsQuickStartScenario(); - - carListingsQuickStartScenario.run(); - - CarDetailsQuickStartScenario carDetailsQuickStartScenario = new CarDetailsQuickStartScenario(); - carDetailsQuickStartScenario.run(); - logger.info( - "=============================== End of Car Scenarios =============================="); - - System.exit(0); - } -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java deleted file mode 100644 index d28fefb5e..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2024 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. - */ - -package com.expediagroup.sdk.xap.examples.scenarios; - -import com.expediagroup.sdk.xap.client.XapClient; - -/** - * Interface for scenarios. - */ -public interface XapScenario { - - String PARTNER_TRANSACTION_ID = "xap-java-sdk-examples"; - - void run(); - - /** - * Create a client. - * - * @return XapClient - */ - default XapClient createClient() { - String key = System.getProperty("com.expediagroup.xapjavasdk.apikey"); - String secret = System.getProperty("com.expediagroup.xapjavasdk.apisecret"); - return XapClient - .builder() - .key(key) - .secret(secret) - .build(); - } -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java deleted file mode 100644 index b16c0060a..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java +++ /dev/null @@ -1,248 +0,0 @@ -package com.expediagroup.sdk.xap.examples.scenarios.car; - -import com.expediagroup.sdk.core.model.Response; -import com.expediagroup.sdk.xap.client.XapClient; -import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; -import com.expediagroup.sdk.xap.models.CarDetails; -import com.expediagroup.sdk.xap.models.CarDetailsResponse; -import com.expediagroup.sdk.xap.models.CarListingsResponse; -import com.expediagroup.sdk.xap.models.VehicleDetails; -import com.expediagroup.sdk.xap.operations.GetCarDetailsOperation; -import com.expediagroup.sdk.xap.operations.GetCarDetailsOperationParams; -import com.expediagroup.sdk.xap.operations.GetCarsListingsOperation; -import com.expediagroup.sdk.xap.operations.GetCarsListingsOperationParams; -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This example demonstrates how to retrieve CarDetails information using the Car Details DeepLink - * obtained from the car listing. - */ -public class CarDetailsQuickStartScenario implements XapScenario { - - private static final Logger LOGGER = LoggerFactory.getLogger(CarDetailsQuickStartScenario.class); - - /** - * Summary: main function. - */ - public static void main(String[] args) { - new CarListingsQuickStartScenario().run(); - new CarDetailsQuickStartScenario().run(); - System.exit(0); - } - - /** - * Summary: split URL into components. - */ - public static String[] splitUrl(String url) { - String[] parts = url.split("\\?"); - String base = parts[0]; - String query = parts[1]; - - String offerToken = base.substring(base.lastIndexOf("/") + 1); - String[] queryParams = query.split("&"); - String price = queryParams[0].split("=")[1]; - String currency = queryParams[1].split("=")[1]; - - return new String[] {offerToken, price, currency}; - } - - @Override - public void run() { - LOGGER.info("========== Start QuickStartScenario =========="); - - LOGGER.info("========== Car Listing Start =========="); - - // This example demonstrates how to obtain the Car Details Deep Link from the CarListing. - // For information on using car search, refer to - // car/shopping/listings/ListingsQuickStartExample. - List linksList = new ArrayList<>(); - linksList.add(GetCarsListingsOperationParams.Links.AD); - linksList.add(GetCarsListingsOperationParams.Links.WS); - linksList.add(GetCarsListingsOperationParams.Links.WD); - GetCarsListingsOperationParams getCarsListingsOperationParams = - GetCarsListingsOperationParams.builder() - .partnerTransactionId("EWSCar_Automation") - .dropOffAirport("MCO") - .pickupAirport("MCO") - .pickupTime(LocalDateTime.now().plusDays(5)) - .dropOffTime(LocalDateTime.now().plusDays(8)) - .limit(1) - .links(linksList) - .build(); - - XapClient xapClient = createClient(); - GetCarsListingsOperation getCarsListingsOperation = - new GetCarsListingsOperation(getCarsListingsOperationParams); - Response carListingsResponse = xapClient.execute(getCarsListingsOperation); - - LOGGER.info("========== Car Listing Property End =========="); - - // Iterate through the car listings and retrieve the Car Details Deep Link. - LOGGER.info("========== Car Details Start =========="); - Objects.requireNonNull(carListingsResponse.getData().getCars()).forEach(car -> { - if (!car.getLinks().get("ApiDetails").getHref().isEmpty()) { - // Retrieve the Car Details Deep Link from the car listing. - LOGGER.info("Car Details Deep Link: " + car.getLinks().get("ApiDetails").getHref()); - String[] strings = splitUrl(car.getLinks().get("ApiDetails").getHref()); - - // Retrieve the Car Details information using the Car Details Deep Link, which - // includes (offerToken, price, currency) - GetCarDetailsOperationParams getCarDetailsOperationParams = - GetCarDetailsOperationParams.builder().partnerTransactionId("EWSCar_Automation") - .offerToken(strings[0]).price(strings[1]).currency(strings[2]).build(); - - // Execute the operation and get the CarDetailsResponse - LOGGER.info("========== Executing GetCarDetailsOperation =========="); - CarDetailsResponse carDetailsResponse = xapClient.execute( - new GetCarDetailsOperation(getCarDetailsOperationParams)).getData(); - LOGGER.info("========== GetCarDetailsOperation Executed =========="); - - if (carDetailsResponse == null || carDetailsResponse.getLinks() == null) { - throw new IllegalStateException("No car found."); - } - - LOGGER.info("========== Car Properties Start =========="); - - // The CarDetailsResponse contains a transaction ID for troubleshooting - LOGGER.info("Transaction ID: {}", carDetailsResponse.getTransactionId()); - - // List Container for warning messages - if (carDetailsResponse.getWarnings() != null) { - LOGGER.info("Warnings: {}", carDetailsResponse.getWarnings()); - } - - // Details of requested car. - // Details refer to the CarDetails Section table below. - if (carDetailsResponse.getValidFormsOfPayment() != null) { - LOGGER.info("Valid Forms Of Payment: {}", carDetailsResponse.getValidFormsOfPayment()); - } - - // A map of links to other Car APIs. - if (carDetailsResponse.getLinks() != null) { - LOGGER.info("Links: {}", carDetailsResponse.getLinks()); - } - - // Specific information for a car. - CarDetails carDetails = carDetailsResponse.getCarDetails(); - VehicleDetails vehicleDetails = carDetails.getVehicleDetails(); - if (vehicleDetails.getMake() != null) { - //Car manufacturer and model. - LOGGER.info("Make: {}", vehicleDetails.getMake()); - } - - // Car category and type. - LOGGER.info("Car Class: {}", vehicleDetails.getCarClass()); - - // Minimal car door count. - if (vehicleDetails.getMinDoors() != null) { - LOGGER.info("Min Doors: {}", vehicleDetails.getMinDoors()); - } - - // Maximum car door count. - if (vehicleDetails.getMaxDoors() != null) { - LOGGER.info("Max Doors: {}", vehicleDetails.getMaxDoors()); - } - - // Car fuel information. - if (vehicleDetails.getFuelLevel() != null) { - // Fuel level of the car. - LOGGER.info("Fuel Level: {}", vehicleDetails.getFuelLevel()); - } - - // Car category. - LOGGER.info("Car Category: {}", vehicleDetails.getCarCategory()); - - // Car type. - LOGGER.info("Car Type: {}", vehicleDetails.getCarType()); - - // Car transmission and drive. - LOGGER.info("Transmission Drive: {}", vehicleDetails.getTransmissionDrive()); - - // Car fuel type and whether Air Conditioning is included. - LOGGER.info("Fuel AC: {}", vehicleDetails.getFuelAC()); - - // Capacity for car's properties, which include AdultCount, ChildCount, SmallLuggageCount - // and LargeLuggageCount. - if (vehicleDetails.getCapacity() != null) { - LOGGER.info("Capacity: {}", vehicleDetails.getCapacity()); - } - - // Car rental supplier. - LOGGER.info(" : {}", carDetails.getSupplier()); - - // Pickup information - LOGGER.info("Pickup Details: {}", carDetails.getPickupDetails()); - - // Drop off information, include drop off date time and drop off location information. - LOGGER.info("Drop Off Details: {}", carDetails.getDropOffDetails()); - - // The rate information for a car product. - LOGGER.info("Rate Details: {}", carDetails.getRateDetails()); - - // Base price per rate period. - LOGGER.info("Price: {}", carDetails.getPrice()); - - // List of TaxesAndFees Details. - if (carDetails.getTaxesAndFeesDetails() != null) { - LOGGER.info("Taxes And Fees Details: {}", carDetails.getTaxesAndFeesDetails()); - } - - // List of ExtraFeesDetails - if (carDetails.getExtraFeesDetails() != null) { - LOGGER.info("Extra Fees Details: {}", carDetails.getExtraFeesDetails()); - } - - // ReferencePrice is the totalPrice for the comparable standalone car, when there is - // a discounted car or need to show strike through pricing. - if (carDetails.getReferencePrice() != null) { - LOGGER.info("Reference Price: {}", carDetails.getReferencePrice()); - } - - // List of additional fees including both mandatory and optional fees such as young driver - // fee/drop off fee /CollisionDamageWaiver. - if (carDetails.getAdditionalFees() != null) { - LOGGER.info("Additional Fees: {}", carDetails.getAdditionalFees()); - } - - // Description and costs of any optional special equipment that may be rented with the car. - if (carDetails.getSpecialEquipments() != null) { - LOGGER.info("Special Equipments: {}", carDetails.getSpecialEquipments()); - } - - // Limitations that are part of this rental agreement. - if (carDetails.getRentalLimits() != null) { - LOGGER.info("Rental Limits: {}", carDetails.getRentalLimits()); - } - - // Cancellation Policy Container. - LOGGER.info("Cancellation Policy: {}", carDetails.getCancellationPolicy()); - - // Container for no show penalty - if (carDetails.getNoShowPenalty() != null) { - LOGGER.info("No Show Penalty: {}", carDetails.getNoShowPenalty()); - } - - // A list of policies that apply to this car rental. - if (carDetails.getCarPolicies() != null) { - LOGGER.info("Policies: {}", carDetails.getCarPolicies()); - } - - // List of image resources of the car product. - if (carDetails.getImages() != null) { - LOGGER.info("Images: {}", carDetails.getImages()); - } - - LOGGER.info("========== Property End =========="); - } - - }); - - LOGGER.info("========== End QuickStartExample =========="); - } - -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java deleted file mode 100644 index 28532acd1..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java +++ /dev/null @@ -1,156 +0,0 @@ -package com.expediagroup.sdk.xap.examples.scenarios.car; - -import com.expediagroup.sdk.xap.client.XapClient; -import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; -import com.expediagroup.sdk.xap.models.CarListingsResponse; -import com.expediagroup.sdk.xap.operations.GetCarsListingsOperation; -import com.expediagroup.sdk.xap.operations.GetCarsListingsOperationParams; -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This example demonstrates how to search for car properties with an Airport keyword with filters - * applied. - */ -public class CarListingsQuickStartScenario implements XapScenario { - - private static final Logger LOGGER = LoggerFactory.getLogger(CarListingsQuickStartScenario.class); - - /** - * Summary: main function. - */ - public static void main(String[] args) { - new CarListingsQuickStartScenario().run(); - System.exit(0); - } - - @Override - public void run() { - LOGGER.info( - "========================= Running CarListingsQuickStartScenario ========================"); - - LOGGER.info( - "======================== Executing GetCarsListingsOperation ======================="); - // This example will search for properties based on the following criteria: - // 1. The pickup airport is MCO, and the drop-off airport is MCO; - // 2. The pickup time is "2025-01-15T11:00", and the drop-off time is "2025-01-19T11:00"; - // 3. The results should include API details, web search, and web details link; - // 4. Limit the results to 5; - - // Create a list to store the types of links to be returned. - // The added link types include(API details link, Web search link, and Web details link). - List linksList = new ArrayList<>(); - linksList.add(GetCarsListingsOperationParams.Links.AD); - linksList.add(GetCarsListingsOperationParams.Links.WS); - linksList.add(GetCarsListingsOperationParams.Links.WD); - - GetCarsListingsOperationParams getCarsListingsOperationParams = - GetCarsListingsOperationParams.builder().partnerTransactionId("EWSCar_Automation") - //Three letter code for the airport at which the customer would like to pick up the car. - //Supported values: standard 3 letter IATA Airport Code. - //Cannot coexist with other pickup parameters, only one pickup parameter is allowed per - //request. - .pickupAirport("MCO") - //Three letter code for the airport at which the customer would like to drop off the - //car. - //Supported values: standard 3 letter IATA Airport Code. - //Cannot coexist with other drop off parameters, only one drop off parameter is allowed - //per request. - //If no drop off location is specified, it is assumed that the customer will be dropping - //the car off at the same location at which they picked it up. - .dropOffAirport("MCO") - //Requested car pickup date and time. - //Date should be ISO8601 Date format.The supported search window is today to 330 days in - //the future. - //(Note that each rental counter has different hours of operation. If you select a time - //in the middle of the night there may be no inventory available as all locations may be - //closed.) - .pickupTime(LocalDateTime.now().plusDays(5)) - //Requested car drop off date and time. - //Date should be ISO8601 Date format.The supported search window is today to 330 days in - //the future. - //The drop-off datetime should occur at least 2 hours after the pickup datetime. - .dropOffTime(LocalDateTime.now().plusDays(8)) - //The maximum number of search results that will be returned by the query. - .limit(5).links(linksList).build(); - XapClient xapClient = createClient(); - - // Execute the operation and get the CarListingsResponse - CarListingsResponse carListingsResponse = - xapClient.execute(new GetCarsListingsOperation(getCarsListingsOperationParams)).getData(); - LOGGER.info( - "======================== GetCarsListingsOperation Executed ========================"); - - if (carListingsResponse == null || carListingsResponse.getCars() == null - || carListingsResponse.getCars().isEmpty()) { - throw new IllegalStateException("No cars found."); - } - - // The CarListingsResponse contains a transaction ID for troubleshooting - LOGGER.info("Transaction ID: {}", carListingsResponse.getTransactionId()); - // To get the total number of car found - LOGGER.info("Car Count: {}", carListingsResponse.getCarCount()); - - // To access the properties, iterate through the list of car properties - carListingsResponse.getCars().forEach(car -> { - LOGGER.info("======================== Car Properties Start ========================"); - - // Uniquely identifies a Car Offer. - LOGGER.info("Car Id: {}", car.getId()); - - // Specific information for a car. - LOGGER.info("Car VehicleDetails: {}", car.getVehicleDetails()); - - // The supplier of the car being offered. - LOGGER.info("Car Supplier: {}", car.getSupplier()); - - // Get Pickup information of the car. - LOGGER.info("Pick up Details: {}", car.getPickupDetails()); - - // Get Drop off information of the car. - LOGGER.info("Drop Off Details: {}", car.getDropOffDetails()); - - // Get the API details link, web search link, and web details link from the links collection. - if (!car.getLinks().isEmpty()) { - if (car.getLinks().get("ApiDetails") != null) { - LOGGER.info("ApiDetails Link: {}", car.getLinks().get("ApiDetails")); - } - if (car.getLinks().get("WebSearch") != null) { - LOGGER.info("WebSearch Link: {}", car.getLinks().get("WebSearch")); - } - if (car.getLinks().get("WebDetails") != null) { - LOGGER.info("WebDetails Link: {}", car.getLinks().get("WebDetails")); - } - } - - // The rate detail information for a car offer. - if (car.getRateDetails() != null) { - LOGGER.info("Rate Details: {}", car.getRateDetails()); - } - - // Get the detailed pricing information for the rental of the car offer, - LOGGER.info("Car Price: {}", car.getPrice()); - - - // Get a list of additional fees, including both mandatory and optional fees. - if (car.getAdditionalFees() != null) { - LOGGER.info("Additional Fees: {}", car.getAdditionalFees()); - } - - // Get the cancellation policy for the car offer, - LOGGER.info("Cancellation Policy: {}", car.getCancellationPolicy()); - - // Container for no show penalty element. - if (car.getNoShowPenalty() != null) { - LOGGER.info("No Show Penalty: {}", car.getNoShowPenalty()); - } - - LOGGER.info("======================== Property End ========================"); - }); - LOGGER.info( - "======================== End CarListingsQuickStartScenario ========================"); - } -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java deleted file mode 100644 index b439fdb36..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2024 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. - */ - -package com.expediagroup.sdk.xap.examples.scenarios.lodging; - -import com.expediagroup.sdk.xap.client.XapClient; -import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse; -import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperation; -import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperationParams; -import java.util.Arrays; -import java.util.HashSet; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This example demonstrates how to use Availability Calendar api with simple search. - * In terms of how to get property ids, you can refer to {@link VrboPropertySearchEndToEndScenario}. - * - *

Note: this is a Vrbo scenario. You need a key that is enabled for Vrbo brand to run this. - */ -public class AvailabilityCalendarsQuickStartScenario implements VrboScenario { - - private static final Logger LOGGER = - LoggerFactory.getLogger(AvailabilityCalendarsQuickStartScenario.class); - - public static void main(String[] args) { - new AvailabilityCalendarsQuickStartScenario().run(); - System.exit(0); - } - - @Override - public void run() { - // This example returns the availability of each day for a range of dates for given Expedia - // lodging properties. - - LOGGER.info( - "=================== Running AvailabilityCalendarsQuickStartScenario ==================="); - - LOGGER.info( - "================= Executing GetLodgingAvailabilityCalendars Operation ================"); - - - // Build the query parameters with GetLodgingAvailabilityCalendarsOperationParams - GetLodgingAvailabilityCalendarsOperationParams availabilityCalendarsOperationParams = - GetLodgingAvailabilityCalendarsOperationParams.builder() - .partnerTransactionId(PARTNER_TRANSACTION_ID) - // Set of Expedia Property IDs. - .propertyIds(new HashSet<>(Arrays.asList("87704892", "36960201"))) - .build(); - - XapClient xapClient = createClient(); - - // Execute the operation and get the AvailabilityCalendarsResponse - AvailabilityCalendarResponse availabilityCalendarResponse = - xapClient.execute(new GetLodgingAvailabilityCalendarsOperation( - availabilityCalendarsOperationParams)).getData(); - - // If you want to use the async method, you can use the following code: - // --------------------------------------------------------------- - // CompletableFuture> completableFuture = - // xapClient.executeAsync( - // new GetLodgingAvailabilityCalendarsOperation(availabilityCalendarsOperationParams)); - // completableFuture.thenAccept(availCalendarResponse -> { - // // Your code here - // }); - // --------------------------------------------------------------- - - LOGGER.info( - "================== GetLodgingAvailabilityCalendarsOperation Executed ================="); - - if (availabilityCalendarResponse == null - || availabilityCalendarResponse.getAvailabilityCalendars() == null - || availabilityCalendarResponse.getAvailabilityCalendars().isEmpty()) { - throw new IllegalStateException("No properties found."); - } - - // The AvailabilityCalendarsResponse contains a transaction ID for troubleshooting - LOGGER.info("Transaction ID: {}", availabilityCalendarResponse.getTransactionId()); - - // To access the properties, iterate through the list of properties - availabilityCalendarResponse.getAvailabilityCalendars().forEach(availCalendar -> { - LOGGER.info("========== Property:{} Start ==========", availCalendar.getPropertyId()); - - // Availability of property: A string of codes that shows property availability, one for every - // day in the specified date range. - // Valid values include Y (available) and N (unavailable). - LOGGER.info("Availability: {}", availCalendar.getAvailability()); - - LOGGER.info( - "==================================== Property End ==================================="); - - LOGGER.info( - "===================== End AvailabilityCalendarsQuickStartScenario ===================="); - }); - } -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/HotelIdsSearchEndToEndScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/HotelIdsSearchEndToEndScenario.java deleted file mode 100644 index 168adfb3d..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/HotelIdsSearchEndToEndScenario.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright (C) 2024 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. - */ - -package com.expediagroup.sdk.xap.examples.scenarios.lodging; - -import com.expediagroup.sdk.core.model.Response; -import com.expediagroup.sdk.xap.client.XapClient; -import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; -import com.expediagroup.sdk.xap.models.Hotel; -import com.expediagroup.sdk.xap.models.HotelListingsResponse; -import com.expediagroup.sdk.xap.models.PresignedUrlResponse; -import com.expediagroup.sdk.xap.models.RoomType; -import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperation; -import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperationParams; -import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperation; -import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperationParams; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This example demonstrates how to retrieve accessible property ids from SDP DownloadURL API and - * then get the content and prices of these properties using the Lodging Listings API. - * - *

This is a common scenario for meta site partners. In practice, you can build a cache with the - * property id list, content and prices to improve respond time of your pages. - */ -public class HotelIdsSearchEndToEndScenario implements XapScenario { - - private final XapClient client = createClient(); - - private static final Logger LOGGER = - LoggerFactory.getLogger(HotelIdsSearchEndToEndScenario.class); - - /** - * This field limits the number of line to read from the SDP DownloadURL API Listings file to - * reduce time to run the example. - * If the first 20 properties from the file are not accessible OR available when you run this - * example, it may end with "No accessible property ids found." OR NO_RESULT_FOUND. In that case, - * you can adjust the property count to get more properties. - */ - private static final int SAMPLE_ITEMS_RESTRICTION = 20; - - public static void main(String[] args) { - new HotelIdsSearchEndToEndScenario().run(); - System.exit(0); - } - - @Override - public void run() { - LOGGER.info( - "======================== Running HotelIdsSearchEndToEndScenario ======================="); - - List propertyIds = getPropertyIdsFromDownloadUrl(); - HotelListingsResponse hotelListingsResponse = getPropertiesFromLodgingListings(propertyIds); - displayResult(hotelListingsResponse); - - LOGGER.info( - "========================== End HotelIdsSearchEndToEndScenario ========================="); - } - - /** - * Retrieve accessible property ids from SDP DownloadURL API. - * - * @return property ids - */ - private List getPropertyIdsFromDownloadUrl() { - LOGGER.info( - "==================== Executing Step I: getPropertyIdsFromDownloadUrl ==================="); - - GetFeedDownloadUrlOperationParams getPropertyIdListParams = - GetFeedDownloadUrlOperationParams.builder() - // Use the type LISTINGS to get the list of accessible property ids. - .type(GetFeedDownloadUrlOperationParams.Type.LISTINGS) - // Without any filters, this operation will return the information of all lodging - // properties in en_US by default. - .build(); - - Response downloadUrlListingsResponse = - client.execute(new GetFeedDownloadUrlOperation(getPropertyIdListParams)); - - if (downloadUrlListingsResponse.getData() == null - || downloadUrlListingsResponse.getData().getBestMatchedFile() == null) { - throw new IllegalStateException("No listings file found"); - } - - // The download URL points to a zip file containing various jsonl files. - // Each line in the jsonl files contains a json object representing a property. - // For demonstration purposes, we will only read a few properties from the file without - // downloading the entire file. - String listingsDownloadUrl = downloadUrlListingsResponse.getData() - .getBestMatchedFile() - .getDownloadUrl(); - LOGGER.info("Listings Download URL: {}", listingsDownloadUrl); - - // Read property ids from the file. - List propertyIds = getPropertyIdsFromListingsFile(listingsDownloadUrl); - - if (propertyIds.isEmpty()) { - throw new IllegalStateException("No accessible property ids found."); - } - LOGGER.info("Accessible Property Ids: {}", propertyIds); - - LOGGER.info( - "==================== Step I: getPropertyIdsFromDownloadUrl Executed ===================="); - return propertyIds; - } - - /** - * Get prices of the properties using the Lodging Listings API. - * - * @param propertyIds The property ids to get the prices. - * @return The response of the Lodging Listings API. - */ - private HotelListingsResponse getPropertiesFromLodgingListings(List propertyIds) { - LOGGER.info( - "================ Step II: Executing getPropertiesFromLodgingListings ==============="); - - GetLodgingListingsOperationParams getLodgingListingsOperationParams = - GetLodgingListingsOperationParams.builder() - .partnerTransactionId(PARTNER_TRANSACTION_ID) - // Use the property ids read from the file - .ecomHotelIds(new HashSet<>(propertyIds)) - // The links to return, WEB includes WS (Web Search Result Page) - // and WD (Web Details Page) - .links(Collections.singletonList(GetLodgingListingsOperationParams.Links.WEB)) - // Check-in 5 days from now - .checkIn(LocalDate.now().plusDays(5)) - // Check-out 10 days from now - .checkOut(LocalDate.now().plusDays(10)) - // Filter the properties that are available only - .availOnly(true) - // Use the default occupancy: 2 adults in one room - .build(); - - HotelListingsResponse hotelListingsResponse = - client.execute(new GetLodgingListingsOperation(getLodgingListingsOperationParams)) - .getData(); - - LOGGER.info( - "================ Step II: getPropertiesFromLodgingListings Executed ================"); - return hotelListingsResponse; - } - - /** - * Reads given number of property ids from the file pointed by the download URL. - * - * @param downloadUrl The download URL of the zip file containing the property information. - * @return A list of property ids read from the file. - */ - private List getPropertyIdsFromListingsFile(String downloadUrl) { - List propertyIds = new ArrayList<>(); - HttpURLConnection connection = null; - try { - // Open a connection to the URL - URL url = new URL(downloadUrl); - connection = (HttpURLConnection) url.openConnection(); - connection.setRequestMethod("GET"); - connection.setDoInput(true); - - try (ZipInputStream zipStream = new ZipInputStream(connection.getInputStream())) { - ZipEntry entry; - while ((entry = zipStream.getNextEntry()) != null) { - if (entry.getName().endsWith(".jsonl")) { - LOGGER.info("Reading property ids from file: {}", entry.getName()); - try (BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream))) { - String line; - ObjectMapper objectMapper = new ObjectMapper(); - while ((line = reader.readLine()) != null - && propertyIds.size() < SAMPLE_ITEMS_RESTRICTION) { - // Parse the property id from the json object - // An example json line from the jsonl file: - /* - { - "propertyId": { - "expedia": "1234567", - "hcom": "123456789", - "vrbo": "123.1234567.7654321" - }, - "bookable": { - "expedia": true, - "hcom": true, - "vrbo": true - }, - "propertyType": { - "id": 16, - "name": "Apartment" - }, - "lastUpdated": "10-27-2024 13:41:16", - "country": "France", - "inventorySource": "vrbo", - "referencePrice": { - "value": "89.52", - "currency": "USD" - }, - "vrboPropertyType": { - "instantBook": true - } - } - */ - JsonNode jsonNode = objectMapper.readTree(line); - // Check if the property is accessible from Lodging Listings API - // (Vrbo properties that are not instantBookable are not accessible for now) - if (!jsonNode.get("propertyId").get("vrbo").asText().isEmpty() - && jsonNode.has("vrboPropertyType") - && !jsonNode.get("vrboPropertyType").get("instantBook").asBoolean() - ) { - // Skip the property if it is not an instant bookable Vrbo property - continue; - } else { - // Get the Expedia property id for the Lodging Listings API - propertyIds.add(jsonNode.get("propertyId").get("expedia").asText()); - } - } - } - } - } - } - - } catch (IOException e) { - LOGGER.error("Error reading property ids from download URL", e); - } finally { - if (connection != null) { - connection.disconnect(); - } - } - return propertyIds; - } - - /** - * Display the result of the operations. - * - * @param hotelListingsResponse The response of the Lodging Listings API. - */ - private static void displayResult(HotelListingsResponse hotelListingsResponse) { - LOGGER.info("====================== Executing Step III: DisplayResult ======================="); - if (hotelListingsResponse == null || hotelListingsResponse.getHotels() == null - || hotelListingsResponse.getHotels().isEmpty()) { - throw new IllegalStateException("No properties found."); - } - - // The HotelListingsResponse contains a transaction ID for troubleshooting - LOGGER.info("Transaction ID: {}", hotelListingsResponse.getTransactionId()); - - // To access the properties, iterate through the list of hotel properties - hotelListingsResponse.getHotels().forEach(hotel -> { - // Check if the property is available - if (Hotel.Status.AVAILABLE != hotel.getStatus()) { - LOGGER.info("Property {} is not available.", hotel.getId()); - return; - } - LOGGER.info( - "=================================== Property Start ==================================="); - // To get the property name - if (StringUtils.isNotEmpty(hotel.getName())) { - LOGGER.info("Property Name: {}", hotel.getName()); - } - // To get the property address - if (hotel.getLocation() != null) { - LOGGER.info("Property Address: {}", hotel.getLocation().getAddress()); - } - // To get the property thumbnail URL - if (StringUtils.isNotEmpty(hotel.getThumbnailUrl())) { - LOGGER.info("Thumbnail URL: {}", hotel.getThumbnailUrl()); - } - // To get the star rating of the property. The value is between 1.0 and 5.0 - // in a 0.5 increment. - if (hotel.getStarRating() != null) { - LOGGER.info("Star Rating: {}", hotel.getStarRating().getValue()); - } - // To get the guest rating of the property. The value is between 1.0 and 5.0 - // in a 0.1 increment. - if (StringUtils.isNotEmpty(hotel.getGuestRating())) { - LOGGER.info("Guest Rating: {}", hotel.getGuestRating()); - } - // To get the total number of reviews for the property - if (hotel.getGuestReviewCount() != null) { - LOGGER.info("Review Count: {}", hotel.getGuestReviewCount()); - } - if (hotel.getRoomTypes() != null && !hotel.getRoomTypes().isEmpty()) { - // To get the first room type information - RoomType roomType = hotel.getRoomTypes().get(0); - if (StringUtils.isNotEmpty(roomType.getDescription())) { - LOGGER.info("Room Type: {}", roomType.getDescription()); - } - if (roomType.getPrice() != null) { - // To get the total price of the room type - if (roomType.getPrice().getTotalPrice() != null) { - LOGGER.info("Price: {}, Currency: {}", - roomType.getPrice().getTotalPrice().getValue(), - roomType.getPrice().getTotalPrice().getCurrency()); - } - // To get the average nightly rate of the room type - if (roomType.getPrice().getAvgNightlyRate() != null) { - LOGGER.info("Average Nightly Rate: {}, Currency: {}", - roomType.getPrice().getAvgNightlyRate().getValue(), - roomType.getPrice().getAvgNightlyRate().getCurrency()); - } - } - // To get the free cancellation flag of the selected room - if (roomType.getRatePlans() != null && !roomType.getRatePlans().isEmpty() - && roomType.getRatePlans().get(0).getCancellationPolicy() != null) { - LOGGER.info("Free Cancellation: {}", - roomType.getRatePlans().get(0).getCancellationPolicy().getFreeCancellation()); - } - if (roomType.getLinks() != null) { - // To get the deeplink to the Expedia Web Search Result Page - if (roomType.getLinks().getWebSearchResult() != null) { - LOGGER.info("WebSearchResult Link: {}", - roomType.getLinks().getWebSearchResult().getHref()); - } - // To get the deeplink to the Expedia Web Details Page - if (roomType.getLinks().getWebDetails() != null) { - LOGGER.info("WebDetails Link: {}", roomType.getLinks().getWebDetails().getHref()); - } - } - } - LOGGER.info( - "==================================== Property End ===================================="); - }); - LOGGER.info("====================== Step III: DisplayResult Executed ========================"); - } -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java deleted file mode 100644 index 141eb7627..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (C) 2024 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. - */ - -package com.expediagroup.sdk.xap.examples.scenarios.lodging; - -import com.expediagroup.sdk.xap.client.XapClient; -import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; -import com.expediagroup.sdk.xap.models.Hotel; -import com.expediagroup.sdk.xap.models.HotelListingsResponse; -import com.expediagroup.sdk.xap.models.Room; -import com.expediagroup.sdk.xap.models.RoomType; -import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperation; -import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperationParams; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Collections; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This example demonstrates how to search for properties with a location keyword with filters - * applied. - */ -public class ListingsQuickStartScenario implements XapScenario { - - private static final Logger LOGGER = LoggerFactory.getLogger(ListingsQuickStartScenario.class); - - public static void main(String[] args) { - new ListingsQuickStartScenario().run(); - System.exit(0); - } - - @Override - public void run() { - // This example will search for properties with the following criteria: - // 1. Occupancy of 1 adult in the first room and 2 adults and 2 children (10 and 12 years old) - // in the second room; - // 2. Properties located within 10 km of the Space Needle in Seattle; - // 3. Check-in date 5 days from now, check-out date 10 days from now; - // 4. Return web links to Expedia website; - // 5. Limit the results to 5 properties; - // 6. Order the results by price in ascending order. - - LOGGER.info( - "========================== Running ListingsQuickStartScenario ========================="); - - LOGGER.info( - "======================== Executing GetLodgingListingsOperation ======================="); - - // Build the occupancy - ArrayList rooms = new ArrayList<>(); - // The first room, with 1 adult - rooms.add(Room.builder().adults(1L).build()); - // The second room, with 2 adults and 2 children - ArrayList childrenAges = new ArrayList<>(); - childrenAges.add(10L); - childrenAges.add(12L); - rooms.add(Room.builder().adults(2L).childAges(childrenAges).build()); - - // Build the query parameters with GetLodgingListingsOperationParams - GetLodgingListingsOperationParams getLodgingListingsOperationParams = - GetLodgingListingsOperationParams.builder() - .partnerTransactionId(PARTNER_TRANSACTION_ID) - // The location keyword can be a city, address, airport or a landmark. - .locationKeyword("Space Needle, Seattle") - // The radius specifies the size of search area around the location keyword. - // The default value is 25. - .radius(10) - // The unit specifies the unit of the radius. The default value is KM. - .unit(GetLodgingListingsOperationParams.Unit.KM) - // Check-in 5 days from now - .checkIn(LocalDate.now().plusDays(5)) - // Check-out 10 days from now - .checkOut(LocalDate.now().plusDays(10)) - // The occupancy - .rooms(rooms) - // The links to return, WEB includes WS (Web Search Result Page) - // and WD (Web Details Page) - .links(Collections.singletonList(GetLodgingListingsOperationParams.Links.WEB)) - // Limit the results to 5 properties - .limit(5) - // Order the results by price in ascending order - .sortType(GetLodgingListingsOperationParams.SortType.PRICE) - .sortOrder(GetLodgingListingsOperationParams.SortOrder.ASC) - .build(); - - XapClient xapClient = createClient(); - - // Execute the operation and get the HotelListingsResponse - HotelListingsResponse hotelListingsResponse = - xapClient.execute(new GetLodgingListingsOperation(getLodgingListingsOperationParams)) - .getData(); - - // If you want to use the async method, you can use the following code: - // --------------------------------------------------------------- - // CompletableFuture> completableFuture = - // xapClient.executeAsync( - // new GetLodgingListingsOperation(getLodgingListingsOperationParams)); - // completableFuture.thenAccept(hotelListingsResponse -> { - // // Your code here - // }); - // --------------------------------------------------------------- - - LOGGER.info( - "======================== GetLodgingListingsOperation Executed ========================"); - - if (hotelListingsResponse == null || hotelListingsResponse.getHotels() == null - || hotelListingsResponse.getHotels().isEmpty()) { - throw new IllegalStateException("No properties found."); - } - - // The HotelListingsResponse contains a transaction ID for troubleshooting - LOGGER.info("Transaction ID: {}", hotelListingsResponse.getTransactionId()); - - // To access the properties, iterate through the list of hotel properties - hotelListingsResponse.getHotels().forEach(hotel -> { - // Check if the property is available - if (Hotel.Status.AVAILABLE != hotel.getStatus()) { - LOGGER.info("Property {} is not available.", hotel.getId()); - return; - } - LOGGER.info( - "=================================== Property Start ==================================="); - // To get the property name - if (StringUtils.isNotEmpty(hotel.getName())) { - LOGGER.info("Property Name: {}", hotel.getName()); - } - // To get the property address - if (hotel.getLocation() != null) { - LOGGER.info("Property Address: {}", hotel.getLocation().getAddress()); - } - // To get the property thumbnail URL - if (StringUtils.isNotEmpty(hotel.getThumbnailUrl())) { - LOGGER.info("Thumbnail URL: {}", hotel.getThumbnailUrl()); - } - // To get the star rating of the property. The value is between 1.0 and 5.0 - // in a 0.5 increment. - if (hotel.getStarRating() != null) { - LOGGER.info("Star Rating: {}", hotel.getStarRating().getValue()); - } - // To get the guest rating of the property. The value is between 1.0 and 5.0 - // in a 0.1 increment. - if (StringUtils.isNotEmpty(hotel.getGuestRating())) { - LOGGER.info("Guest Rating: {}", hotel.getGuestRating()); - } - // To get the total number of reviews for the property - if (hotel.getGuestReviewCount() != null) { - LOGGER.info("Review Count: {}", hotel.getGuestReviewCount()); - } - if (hotel.getRoomTypes() != null && !hotel.getRoomTypes().isEmpty()) { - // To get the first room type information - RoomType roomType = hotel.getRoomTypes().get(0); - if (StringUtils.isNotEmpty(roomType.getDescription())) { - LOGGER.info("Room Type: {}", roomType.getDescription()); - } - if (roomType.getPrice() != null) { - // To get the total price of the room type - if (roomType.getPrice().getTotalPrice() != null) { - LOGGER.info("Price: {}, Currency: {}", - roomType.getPrice().getTotalPrice().getValue(), - roomType.getPrice().getTotalPrice().getCurrency()); - } - // To get the average nightly rate of the room type - if (roomType.getPrice().getAvgNightlyRate() != null) { - LOGGER.info("Average Nightly Rate: {}, Currency: {}", - roomType.getPrice().getAvgNightlyRate().getValue(), - roomType.getPrice().getAvgNightlyRate().getCurrency()); - } - } - // To get the free cancellation flag of the selected room - if (roomType.getRatePlans() != null && !roomType.getRatePlans().isEmpty() - && roomType.getRatePlans().get(0).getCancellationPolicy() != null) { - LOGGER.info("Free Cancellation: {}", - roomType.getRatePlans().get(0).getCancellationPolicy().getFreeCancellation()); - } - if (roomType.getLinks() != null) { - // To get the deeplink to the Expedia Web Search Result Page - if (roomType.getLinks().getWebSearchResult() != null) { - LOGGER.info("WebSearchResult Link: {}", - roomType.getLinks().getWebSearchResult().getHref()); - } - // To get the deeplink to the Expedia Web Details Page - if (roomType.getLinks().getWebDetails() != null) { - LOGGER.info("WebDetails Link: {}", roomType.getLinks().getWebDetails().getHref()); - } - } - } - LOGGER.info( - "==================================== Property End ===================================="); - }); - - LOGGER.info( - "============================ End ListingsQuickStartScenario ==========================="); - } -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java deleted file mode 100644 index 7e1f807e4..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2024 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. - */ - -package com.expediagroup.sdk.xap.examples.scenarios.lodging; - -import com.expediagroup.sdk.xap.client.XapClient; -import com.expediagroup.sdk.xap.models.LodgingQuotesResponse; -import com.expediagroup.sdk.xap.models.LodgingRoomType; -import com.expediagroup.sdk.xap.models.Property; -import com.expediagroup.sdk.xap.models.Room; -import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperation; -import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperationParams; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This example demonstrates how to search for property quotes with property IDs in - * Lodging Quotes API. - * Note: this is a Vrbo scenario. You need a key that is enabled for Vrbo brand to run this. - */ -public class QuotesQuickStartScenario implements VrboScenario { - - private static final Logger LOGGER = LoggerFactory.getLogger(QuotesQuickStartScenario.class); - - public static void main(String[] args) { - new QuotesQuickStartScenario().run(); - System.exit(0); - } - - @Override - public void run() { - // This example will get quotes response for mentioned Expedia properties with the following - // criteria: - // 1. Occupancy of 1 adult in the first room and 2 adults and 2 children (10 and 12 years old) - // in the second room; - // 3. Check-in date 5 days from now, check-out date 10 days from now; - // 4. Return web links to Expedia website; - - LOGGER.info( - "============================ Running QuotesQuickStartScenario =========================="); - - LOGGER.info( - "========================= Executing GetLodgingQuotesOperation ========================="); - - // Build the occupancy - ArrayList rooms = new ArrayList<>(); - // The first room, with 2 adult - rooms.add(Room.builder().adults(2L).childAges(null).build()); - - // Build the query parameters with GetLodgingQuotesOperationParams - GetLodgingQuotesOperationParams quotesOperationParams = - GetLodgingQuotesOperationParams.builder() - .partnerTransactionId(PARTNER_TRANSACTION_ID) - // Check-in 5 days from now - .checkIn(LocalDate.now().plusDays(5)) - // Check-out 10 days from now - .checkOut(LocalDate.now().plusDays(10)) - // Set of Expedia Property IDs. - .propertyIds(new HashSet<>(Arrays.asList("87704892", "36960201"))) - // The links to return, WEB includes WS (Web Search Result Page) and - // WD (Web Details Page) - .links(Collections.singletonList(GetLodgingQuotesOperationParams.Links.WEB)) - .rooms(rooms) - .build(); - - XapClient xapClient = createClient(); - - // Execute the operation and get the QuotesResponse - LodgingQuotesResponse quotesResponse = - xapClient.execute(new GetLodgingQuotesOperation(quotesOperationParams)).getData(); - - // If you want to use the async method, you can use the following code: - // --------------------------------------------------------------- - // CompletableFuture> completableFuture = - // xapClient.executeAsync( - // new GetLodgingQuotesOperation(quotesOperationParams)); - // completableFuture.thenAccept(quotesResponse -> { - // // Your code here - // }); - // --------------------------------------------------------------- - - LOGGER.info( - "========================== GetLodgingQuotesOperation Executed ========================="); - - if (quotesResponse == null || quotesResponse.getProperties() == null - || quotesResponse.getProperties().isEmpty()) { - throw new IllegalStateException("No properties found."); - } - - // The LodgingQuotesResponse contains a transaction ID for troubleshooting - LOGGER.info("Transaction ID: {}", quotesResponse.getTransactionId()); - - // To access the properties, iterate through the list of properties - quotesResponse.getProperties().forEach(quote -> { - LOGGER.info("========== Property:{} Start ==========", quote.getId()); - if (Property.Status.AVAILABLE != quote.getStatus()) { - LOGGER.info("Property is not available."); - return; - } - if (quote.getRoomTypes() != null && !quote.getRoomTypes().isEmpty()) { - // To get the first room type information - LodgingRoomType roomType = quote.getRoomTypes().get(0); - - if (roomType.getPrice() != null) { - // To get the total price of the room type - if (roomType.getPrice().getTotalPrice() != null) { - LOGGER.info("Price: {}, Currency: {}", - roomType.getPrice().getTotalPrice().getValue(), - roomType.getPrice().getTotalPrice().getCurrency()); - } - // To get the average nightly rate of the room type - if (roomType.getPrice().getAvgNightlyRate() != null) { - LOGGER.info("Average Nightly Rate: {}, Currency: {}", - roomType.getPrice().getAvgNightlyRate().getValue(), - roomType.getPrice().getAvgNightlyRate().getCurrency()); - } - } - // To get the free cancellation flag of the selected room - if (roomType.getRatePlans() != null && !roomType.getRatePlans().isEmpty() - && roomType.getRatePlans().get(0).getCancellationPolicy() != null) { - LOGGER.info("Free Cancellation: {}", - roomType.getRatePlans().get(0).getCancellationPolicy().getFreeCancellation()); - } - if (roomType.getLinks() != null) { - // To get the deeplink to the Expedia Web Search Result Page - if (roomType.getLinks().getWebSearchResult() != null) { - LOGGER.info("WebSearchResult Link: {}", - roomType.getLinks().getWebSearchResult().getHref()); - } - // To get the deeplink to the Expedia Web Details Page - if (roomType.getLinks().getWebDetails() != null) { - LOGGER.info("WebDetails Link: {}", roomType.getLinks().getWebDetails().getHref()); - } - } - } - LOGGER.info( - "=================================== Property End ==================================="); - }); - - LOGGER.info( - "============================= End QuotesQuickStartScenario ============================"); - } -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java deleted file mode 100644 index e4396c7e3..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright (C) 2024 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. - */ - -package com.expediagroup.sdk.xap.examples.scenarios.lodging; - -import com.expediagroup.sdk.core.model.Response; -import com.expediagroup.sdk.xap.client.XapClient; -import com.expediagroup.sdk.xap.models.LodgingQuotesResponse; -import com.expediagroup.sdk.xap.models.LodgingRoomType; -import com.expediagroup.sdk.xap.models.PresignedUrlResponse; -import com.expediagroup.sdk.xap.models.Property; -import com.expediagroup.sdk.xap.models.Room; -import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperation; -import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperationParams; -import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperation; -import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperationParams; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This example demonstrates how to retrieve accessible Vrbo property ids and location content from - * SDP DownloadURL API and then get the prices of these properties using the Lodging Quotes API. - * - *

This is a common scenario for Vrbo partners. In practice, you can cache the property id - * list along with content that does not change frequently (name, description, address, amenities, - * etc.) to reduce heavy API calls and get only the prices of these properties in real-time from - * the Lodging Quotes API. - * - *

Note: this is a Vrbo scenario. You need a key that is enabled for Vrbo brand to run this. - */ -public class VrboPropertySearchEndToEndScenario implements VrboScenario { - - private final XapClient client = createClient(); - - private static final Logger LOGGER = - LoggerFactory.getLogger(VrboPropertySearchEndToEndScenario.class); - - /** - * This field limits the number of line to read from the SDP DownloadURL API Listings file to - * reduce time to run the example. - * If the first 20 properties from the file are not accessible OR available when you run this - * example, it may end with "No accessible property ids found." OR NO_RESULT_FOUND. In that case, - * you can adjust the property count to get more properties. - */ - private static final int SAMPLE_ITEMS_RESTRICTION = 20; - - /** - * A property id to location map. This mocks a cache in this example to store the static content - * of the properties. - */ - private static final Map PROPERTY_ID_AND_LOCATION_CACHE = new HashMap<>(); - - public static void main(String[] args) { - new VrboPropertySearchEndToEndScenario().run(); - System.exit(0); - } - - @Override - public void run() { - LOGGER.info( - "====================== Running VrboPropertySearchEndToEndScenario ======================"); - - List propertyIds = getPropertyIdsFromDownloadUrl(); - cachePropertyLocationFromDownloadUrl(propertyIds); - LodgingQuotesResponse lodgingQuotesResponse = getPropertyPriceFromLodgingQuotes(propertyIds); - displayResult(lodgingQuotesResponse); - - LOGGER.info( - "======================= End VrboPropertySearchEndToEndScenario ========================="); - } - - private List getPropertyIdsFromDownloadUrl() { - LOGGER.info( - "==================== Executing Step I: getPropertyIdsFromDownloadUrl ==================="); - - GetFeedDownloadUrlOperationParams getPropertyIdListParams = - GetFeedDownloadUrlOperationParams.builder() - // Use the type VACATION_RENTAL to get the list of accessible Vrbo property ids. - .type(GetFeedDownloadUrlOperationParams.Type.VACATION_RENTAL) - // Without any filters, this operation will return the information of all Vrbo - // properties in en_US by default. - .build(); - - Response downloadUrlListingsResponse = - client.execute(new GetFeedDownloadUrlOperation(getPropertyIdListParams)); - - if (downloadUrlListingsResponse.getData() == null - || downloadUrlListingsResponse.getData().getBestMatchedFile() == null) { - throw new IllegalStateException("No vacation rental file found"); - } - - // The download URL points to a zip file containing various jsonl files. - // Each line in the jsonl files contains a json object representing a Vrbo property. - // For demonstration purposes, we will only read a few properties from the file without - // downloading the entire file. - String vacationRentalDownloadUrl = downloadUrlListingsResponse.getData() - .getBestMatchedFile() - .getDownloadUrl(); - LOGGER.info("Vacation Rental Download URL: {}", vacationRentalDownloadUrl); - - // Read property ids from the file. - List propertyIds = getPropertyIdsFromVacationRentalFile(vacationRentalDownloadUrl - ); - - if (propertyIds.isEmpty()) { - throw new IllegalStateException("No accessible Vrbo property ids found."); - } - LOGGER.info("Accessible Vrbo Property Ids: {}", propertyIds); - - LOGGER.info( - "==================== Step I: getPropertyIdsFromDownloadUrl Executed ===================="); - return propertyIds; - } - - /** - * Cache the location content from SDP DownloadURL API. - * - * @param propertyIds The property ids that need the location content. - */ - private void cachePropertyLocationFromDownloadUrl(List propertyIds) { - LOGGER.info( - "================ Executing Step II: CachePropertyLocationFromDownloadUrl ==============="); - GetFeedDownloadUrlOperationParams getPropertyLocationParams = - GetFeedDownloadUrlOperationParams.builder() - // Use the type LOCATIONS to get the address of accessible properties. - .type(GetFeedDownloadUrlOperationParams.Type.LOCATIONS) - // Filter the properties by brand. - .brand(GetFeedDownloadUrlOperationParams.Brand.VRBO) - .build(); - - Response downloadUrlLocationsResponse = - client.execute(new GetFeedDownloadUrlOperation(getPropertyLocationParams)); - - if (downloadUrlLocationsResponse.getData() == null - || downloadUrlLocationsResponse.getData().getBestMatchedFile() == null) { - throw new IllegalStateException("No location file found"); - } - - String locationsDownloadUrl = downloadUrlLocationsResponse.getData() - .getBestMatchedFile() - .getDownloadUrl(); - LOGGER.info("Locations Download URL: {}", locationsDownloadUrl); - - // Read and cache property locations from the file. - cachePropertyLocationFromLocationsFile(locationsDownloadUrl, propertyIds); - - LOGGER.info( - "================= Step II: CachePropertyLocationFromDownloadUrl Executed ==============="); - } - - /** - * Get prices of the properties using the Lodging Quotes API. - * - * @param propertyIds The property ids to get the prices. - * @return The response of the Lodging Quotes API. - */ - private LodgingQuotesResponse getPropertyPriceFromLodgingQuotes(List propertyIds) { - LOGGER.info( - "================= Executing Step III: GetPropertyPriceFromLodgingQuotes ================"); - - // Build the occupancy - ArrayList rooms = new ArrayList<>(); - // The first room, with 2 adult - rooms.add(Room.builder().adults(2L).childAges(null).build()); - - // Build the query parameters with GetLodgingQuotesOperationParams - GetLodgingQuotesOperationParams quotesOperationParams = - GetLodgingQuotesOperationParams.builder() - .partnerTransactionId(PARTNER_TRANSACTION_ID) - // Check-in 5 days from now - .checkIn(LocalDate.now().plusDays(5)) - // Check-out 10 days from now - .checkOut(LocalDate.now().plusDays(10)) - // Set of Expedia Property IDs. - .propertyIds(new HashSet<>(propertyIds)) - // The links to return, WEB includes WS (Web Search Result Page) and - // WD (Web Details Page) - .links(Collections.singletonList(GetLodgingQuotesOperationParams.Links.WEB)) - .rooms(rooms) - .build(); - - LodgingQuotesResponse lodgingQuotesResponse = - client.execute(new GetLodgingQuotesOperation(quotesOperationParams)) - .getData(); - - LOGGER.info( - "================= Step III: GetPropertyPriceFromLodgingQuotes Executed ================="); - return lodgingQuotesResponse; - } - - /** - * Reads given number of property ids from the file pointed by the download URL. - * - * @param downloadUrl The download URL of the zip file containing the property information. - * @return A list of property ids read from the file. - */ - private List getPropertyIdsFromVacationRentalFile(String downloadUrl) { - List propertyIds = new ArrayList<>(); - HttpURLConnection connection = null; - try { - // Open a connection to the URL - URL url = new URL(downloadUrl); - connection = (HttpURLConnection) url.openConnection(); - connection.setRequestMethod("GET"); - connection.setDoInput(true); - - try (ZipInputStream zipStream = new ZipInputStream(connection.getInputStream())) { - ZipEntry entry; - while ((entry = zipStream.getNextEntry()) != null) { - if (entry.getName().endsWith(".jsonl")) { - LOGGER.info("Reading property ids from file: {}", entry.getName()); - try (BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream))) { - String line; - ObjectMapper objectMapper = new ObjectMapper(); - while ((line = reader.readLine()) != null - && propertyIds.size() < SAMPLE_ITEMS_RESTRICTION) { - // Parse the property id from the json object - // An example json line from the jsonl file: - /* - { - "propertyId": { - "expedia": "1234567", - "hcom": "987654321", - "vrbo": "123.1234567.7654321" - }, - "country": "France", - "propertySize": { - "measurement": 441, - "units": "SQUARE_FEET" - }, - "maxOccupancy": 4, - "bathrooms": { - "numberOfBathrooms": 1 - }, - "bedrooms": { - "numberOfBedrooms": 2 - }, - "houseRules": { - "partyOrEventRules": { - "partiesOrEventsPermitted": false, - "ownerPartyFreeText": "No events allowed" - }, - "smokingRules": { - "smokingPermitted": false, - "ownerSmokingFreeText": "Smoking is not permitted" - }, - "petRules": { - "petsPermitted": true, - "ownerPetsFreeText": "Pets allowed" - }, - "childRules": { - "childrenPermitted": true, - "ownerChildrenFreeText": "Children allowed: ages 0-17 " - } - }, - "propertyManager": { - "name": "Résidences Louis", - "hostType": "Professional" - }, - "premierHost": true, - "propertyLiveDate": "2022-05-31" - } - */ - JsonNode jsonNode = objectMapper.readTree(line); - propertyIds.add(jsonNode.get("propertyId").get("expedia").asText()); - } - } - } - } - } - - } catch (IOException e) { - LOGGER.error("Error reading property ids from download URL", e); - } finally { - if (connection != null) { - connection.disconnect(); - } - } - return propertyIds; - } - - /** - * Caches the location content of the properties from the file pointed by the download URL. - * - * @param locationsDownloadUrl The download URL of the zip file containing the property locations. - * @param propertyIds The property ids to get the location content. - */ - private void cachePropertyLocationFromLocationsFile(String locationsDownloadUrl, - List propertyIds) { - HttpURLConnection connection = null; - try { - // Open a connection to the URL - URL url = new URL(locationsDownloadUrl); - connection = (HttpURLConnection) url.openConnection(); - connection.setRequestMethod("GET"); - connection.setDoInput(true); - - try (ZipInputStream zipStream = new ZipInputStream(connection.getInputStream())) { - ZipEntry entry; - while ((entry = zipStream.getNextEntry()) != null) { - if (entry.getName().endsWith(".jsonl")) { - LOGGER.info("Reading property locations from file: {}", entry.getName()); - try (BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream))) { - String line; - ObjectMapper objectMapper = new ObjectMapper(); - while ((line = reader.readLine()) != null - && PROPERTY_ID_AND_LOCATION_CACHE.size() < propertyIds.size()) { - // Parse the property location from the json object - // An example json line from the jsonl file: - /* - { - "propertyId": { - "expedia": "1234567", - "hcom": "987654321", - "vrbo": "123.1234567.1234567" - }, - "propertyType": { - "id": 16, - "name": "Apartment" - }, - "propertyName": "Vrbo Property Name", - "address1": "", - "address2": "", - "city": "Newark", - "province": "Delaware", - "country": "United States", - "postalCode": "19711", - "geoLocation": { - "latitude": "10.999999", - "longitude": "-10.999999", - "obfuscated": false - }, - "locationAttribute": { - "neighborhood": { - "id": "553248635976468695", - "name": "Westmoreland" - }, - "city": { - "id": "8946", - "name": "Newark" - }, - "region": { - "id": "6055689", - "name": "North Wilmington" - }, - "airport": { - "id": "6028579", - "code": "ILG", - "name": "Wilmington, DE (ILG-New Castle)", - "distance": "13.17", - "unit": "km" - }, - "distanceFromCityCenter": { - "distance": "1.24", - "unit": "km" - } - } - } - */ - JsonNode jsonNode = objectMapper.readTree(line); - // Check if the property id is in the list - if (propertyIds.contains(jsonNode.get("propertyId").get("expedia").asText())) { - // Get the location content of the property - String location = jsonNode.get("propertyName").asText() + ", " - + jsonNode.get("city").asText() + ", " - + jsonNode.get("province").asText() + ", " - + jsonNode.get("country").asText(); - // Store the location content in the cache - PROPERTY_ID_AND_LOCATION_CACHE.put( - jsonNode.get("propertyId") - .get("expedia") - .asText(), - location); - } - } - } - } - } - } - - } catch (IOException e) { - LOGGER.error("Error reading property locations from download URL", e); - } finally { - if (connection != null) { - connection.disconnect(); - } - } - } - - /** - * Display the result of the operations. - * - * @param lodgingQuotesResponse The response of the Lodging Quotes API. - */ - private static void displayResult(LodgingQuotesResponse lodgingQuotesResponse) { - LOGGER.info("======================= Executing Step IV: DisplayResult ======================="); - if (lodgingQuotesResponse == null || lodgingQuotesResponse.getProperties() == null - || lodgingQuotesResponse.getProperties().isEmpty()) { - throw new IllegalStateException("No properties found."); - } - - // The HotelListingsResponse contains a transaction ID for troubleshooting - LOGGER.info("Transaction ID: {}", lodgingQuotesResponse.getTransactionId()); - - // To access the properties, iterate through the list of hotel properties - lodgingQuotesResponse.getProperties().forEach(property -> { - // Check if the property is available - if (Property.Status.AVAILABLE != property.getStatus()) { - LOGGER.info("Property {} is not available.", property.getId()); - return; - } - LOGGER.info( - "=================================== Property Start ==================================="); - String propertyId = property.getId(); - - // Get the location content of the property from the cache - LOGGER.info("Property Id: {}", propertyId); - LOGGER.info("Cached Property Location: {}", PROPERTY_ID_AND_LOCATION_CACHE.get(propertyId)); - - // Get the price of the property from the room type - if (property.getRoomTypes() != null && !property.getRoomTypes().isEmpty()) { - // To get the first room type information - LodgingRoomType roomType = property.getRoomTypes().get(0); - - if (roomType.getPrice() != null) { - // To get the total price of the room type - if (roomType.getPrice().getTotalPrice() != null) { - LOGGER.info("Price: {}, Currency: {}", - roomType.getPrice().getTotalPrice().getValue(), - roomType.getPrice().getTotalPrice().getCurrency()); - } - // To get the average nightly rate of the room type - if (roomType.getPrice().getAvgNightlyRate() != null) { - LOGGER.info("Average Nightly Rate: {}, Currency: {}", - roomType.getPrice().getAvgNightlyRate().getValue(), - roomType.getPrice().getAvgNightlyRate().getCurrency()); - } - } - // To get the free cancellation flag of the selected room - if (roomType.getRatePlans() != null && !roomType.getRatePlans().isEmpty() - && roomType.getRatePlans().get(0).getCancellationPolicy() != null) { - LOGGER.info("Free Cancellation: {}", - roomType.getRatePlans().get(0).getCancellationPolicy().getFreeCancellation()); - } - if (roomType.getLinks() != null) { - // To get the deeplink to the website Search Result Page - if (roomType.getLinks().getWebSearchResult() != null) { - LOGGER.info("WebSearchResult Link: {}", - roomType.getLinks().getWebSearchResult().getHref()); - } - // To get the deeplink to the website Details Page - if (roomType.getLinks().getWebDetails() != null) { - LOGGER.info("WebDetails Link: {}", roomType.getLinks().getWebDetails().getHref()); - } - } - } - LOGGER.info( - "==================================== Property End ===================================="); - }); - LOGGER.info("======================= Step IV: DisplayResult Executed ========================"); - } -} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java deleted file mode 100644 index 97f3ba810..000000000 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.expediagroup.sdk.xap.examples.scenarios.lodging; - -import com.expediagroup.sdk.xap.client.XapClient; -import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; - -/** - * Interface for Vrbo scenarios. Scenarios that implement this interface would need a key - * that is enabled for Vrbo brand to run. - */ -public interface VrboScenario extends XapScenario { - - /** - * Create a client with Vrbo key and secret. - * - * @return XapClient - */ - @Override - default XapClient createClient() { - String key = System.getProperty("com.expediagroup.xapjavasdk.vrbokey"); - String secret = System.getProperty("com.expediagroup.xapjavasdk.vrbosecret"); - return XapClient - .builder() - .key(key) - .secret(secret) - .build(); - } - -} diff --git a/examples/src/main/resources/log4j2.xml b/examples/src/main/resources/log4j2.xml deleted file mode 100644 index 950475ab9..000000000 --- a/examples/src/main/resources/log4j2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts new file mode 100644 index 000000000..3c6764946 --- /dev/null +++ b/generator/build.gradle.kts @@ -0,0 +1,76 @@ +import com.samskivert.mustache.Mustache +import com.samskivert.mustache.Template +import java.io.Serializable +import java.io.Writer +import org.openapitools.codegen.CodegenConstants +import org.openapitools.codegen.CodegenResponse + +plugins { + kotlin("jvm") version "2.1.10" + id("com.expediagroup.sdk.openapigenerator") version "1.0.0-SNAPSHOT" + id("org.jlleitschuh.gradle.ktlint") version "12.1.2" +} + +group = "com.expediagroup.sdk" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() + mavenLocal() +} + +dependencies { + api("org.openapitools:openapi-generator:7.11.0") + testImplementation(kotlin("test")) +} + +tasks.test { + useJUnitPlatform() +} + +kotlin { + jvmToolchain(8) +} + +openApiGenerate { + inputSpec = System.getProperty("inputSpec") ?: "specs.yaml" + + invokerPackage = "com.expediagroup.sdk.xap" + apiPackage = "com.expediagroup.sdk.xap.operations" + modelPackage = "com.expediagroup.sdk.xap.models" + + dryRun = false + cleanupOutput = false + generateApiDocumentation = false + generateApiTests = false + generateModelTests = false + enablePostProcessFile = true + + templateDir = "$projectDir/src/main/resources/templates" + configFile = "$projectDir/src/main/generator-config.yaml" + outputDir = "$rootDir/xap-sdk/src/main/kotlin" + + additionalProperties.put(CodegenConstants.ENUM_PROPERTY_NAMING, "UPPERCASE") + additionalProperties.put("allowedMediaTypes", Lambdas.AllowedMediaTypesLambda()) + + configOptions.put("sourceFolder", "") + + globalProperties.put("supportingFiles", "Room.kt") + globalProperties.put("KOTLIN_POST_PROCESS_FILE", "npm run --prefix post-processor process") +} + +class Lambdas { + class AllowedMediaTypesLambda : Mustache.Lambda, Serializable { + override fun execute(fragment: Template.Fragment, writer: Writer) { + val response: CodegenResponse = fragment.context() as CodegenResponse + if (response.is2xx) { + val mediaTypes: List = response.content.keys.filter { + !it.contains("xml", ignoreCase = true) + } + + val context = mapOf("mediaTypes" to mediaTypes) + fragment.execute(context, writer) + } + } + } +} diff --git a/generator/gradle.properties b/generator/gradle.properties new file mode 100644 index 000000000..3dba81097 --- /dev/null +++ b/generator/gradle.properties @@ -0,0 +1 @@ +namespace=xap diff --git a/generator/src/main/resources/generator-config.yaml b/generator/src/main/resources/generator-config.yaml new file mode 100644 index 000000000..8ebdd1f90 --- /dev/null +++ b/generator/src/main/resources/generator-config.yaml @@ -0,0 +1,8 @@ +files: + operation_params.mustache: + templateType: API + destinationFilename: Params.kt + room.mustache: + templateType: SupportingFiles + destinationFilename: Room.kt + folder: com/expediagroup/sdk/xap/models diff --git a/generator/src/main/resources/templates/operations/params/get_headers.mustache b/generator/src/main/resources/templates/operations/params/get_headers.mustache new file mode 100644 index 000000000..255bdf06e --- /dev/null +++ b/generator/src/main/resources/templates/operations/params/get_headers.mustache @@ -0,0 +1,16 @@ +{{#hasHeaderParams}}fun getHeaders(): Headers { +return Headers.builder().apply { +{{#headerParams}} + {{paramName}}?.let { + add("{{baseName}}", it{{#isEnum}}.value{{/isEnum}}) + } +{{/headerParams}} +{{#responses}} + {{#allowedMediaTypes}} + {{#mediaTypes}} + add("Accept", "{{.}}") + {{/mediaTypes}} + {{/allowedMediaTypes}} +{{/responses}} +}.build() +}{{/hasHeaderParams}} \ No newline at end of file diff --git a/generator/src/main/resources/templates/operations/params/imports.mustache b/generator/src/main/resources/templates/operations/params/imports.mustache new file mode 100644 index 000000000..82a589439 --- /dev/null +++ b/generator/src/main/resources/templates/operations/params/imports.mustache @@ -0,0 +1,5 @@ +{{>traits/imports}} +{{#imports}} + import {{import}} +{{/imports}} +import com.expediagroup.sdk.xap.models.Room \ No newline at end of file diff --git a/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/xap/room.mustache b/generator/src/main/resources/templates/room.mustache similarity index 99% rename from customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/xap/room.mustache rename to generator/src/main/resources/templates/room.mustache index 1d955cf99..0f03543b1 100644 --- a/customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/xap/room.mustache +++ b/generator/src/main/resources/templates/room.mustache @@ -24,4 +24,4 @@ data class Room( ) } } -} \ No newline at end of file +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 000000000..3e45131bf --- /dev/null +++ b/gradle.properties @@ -0,0 +1,7 @@ +kotlin.code.style=official +groupId=com.expediagroup +version=1.0.0-SNAPSHOT +artifactName=xap-sdk + +# Needed for Dokka docs generation +org.gradle.jvmargs=-Xmx2g diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..249e5832f090a2944b7473328c07c9755baa3196 GIT binary patch literal 60756 zcmb5WV{~QRw(p$^Dz@00IL3?^hro$gg*4VI_WAaTyVM5Foj~O|-84 z$;06hMwt*rV;^8iB z1~&0XWpYJmG?Ts^K9PC62H*`G}xom%S%yq|xvG~FIfP=9*f zZoDRJBm*Y0aId=qJ?7dyb)6)JGWGwe)MHeNSzhi)Ko6J<-m@v=a%NsP537lHe0R* z`If4$aaBA#S=w!2z&m>{lpTy^Lm^mg*3?M&7HFv}7K6x*cukLIGX;bQG|QWdn{%_6 zHnwBKr84#B7Z+AnBXa16a?or^R?+>$4`}{*a_>IhbjvyTtWkHw)|ay)ahWUd-qq$~ zMbh6roVsj;_qnC-R{G+Cy6bApVOinSU-;(DxUEl!i2)1EeQ9`hrfqj(nKI7?Z>Xur zoJz-a`PxkYit1HEbv|jy%~DO^13J-ut986EEG=66S}D3!L}Efp;Bez~7tNq{QsUMm zh9~(HYg1pA*=37C0}n4g&bFbQ+?-h-W}onYeE{q;cIy%eZK9wZjSwGvT+&Cgv z?~{9p(;bY_1+k|wkt_|N!@J~aoY@|U_RGoWX<;p{Nu*D*&_phw`8jYkMNpRTWx1H* z>J-Mi_!`M468#5Aix$$u1M@rJEIOc?k^QBc?T(#=n&*5eS#u*Y)?L8Ha$9wRWdH^3D4|Ps)Y?m0q~SiKiSfEkJ!=^`lJ(%W3o|CZ zSrZL-Xxc{OrmsQD&s~zPfNJOpSZUl%V8tdG%ei}lQkM+z@-4etFPR>GOH9+Y_F<3=~SXln9Kb-o~f>2a6Xz@AS3cn^;c_>lUwlK(n>z?A>NbC z`Ud8^aQy>wy=$)w;JZzA)_*Y$Z5hU=KAG&htLw1Uh00yE!|Nu{EZkch zY9O6x7Y??>!7pUNME*d!=R#s)ghr|R#41l!c?~=3CS8&zr6*aA7n9*)*PWBV2w+&I zpW1-9fr3j{VTcls1>ua}F*bbju_Xq%^v;-W~paSqlf zolj*dt`BBjHI)H9{zrkBo=B%>8}4jeBO~kWqO!~Thi!I1H(in=n^fS%nuL=X2+s!p}HfTU#NBGiwEBF^^tKU zbhhv+0dE-sbK$>J#t-J!B$TMgN@Wh5wTtK2BG}4BGfsZOoRUS#G8Cxv|6EI*n&Xxq zt{&OxCC+BNqz$9b0WM7_PyBJEVObHFh%%`~!@MNZlo*oXDCwDcFwT~Rls!aApL<)^ zbBftGKKBRhB!{?fX@l2_y~%ygNFfF(XJzHh#?`WlSL{1lKT*gJM zs>bd^H9NCxqxn(IOky5k-wALFowQr(gw%|`0991u#9jXQh?4l|l>pd6a&rx|v=fPJ z1mutj{YzpJ_gsClbWFk(G}bSlFi-6@mwoQh-XeD*j@~huW4(8ub%^I|azA)h2t#yG z7e_V_<4jlM3D(I+qX}yEtqj)cpzN*oCdYHa!nm%0t^wHm)EmFP*|FMw!tb@&`G-u~ zK)=Sf6z+BiTAI}}i{*_Ac$ffr*Wrv$F7_0gJkjx;@)XjYSh`RjAgrCck`x!zP>Ifu z&%he4P|S)H*(9oB4uvH67^0}I-_ye_!w)u3v2+EY>eD3#8QR24<;7?*hj8k~rS)~7 zSXs5ww)T(0eHSp$hEIBnW|Iun<_i`}VE0Nc$|-R}wlSIs5pV{g_Dar(Zz<4X3`W?K z6&CAIl4U(Qk-tTcK{|zYF6QG5ArrEB!;5s?tW7 zrE3hcFY&k)+)e{+YOJ0X2uDE_hd2{|m_dC}kgEKqiE9Q^A-+>2UonB+L@v3$9?AYw zVQv?X*pK;X4Ovc6Ev5Gbg{{Eu*7{N3#0@9oMI~}KnObQE#Y{&3mM4`w%wN+xrKYgD zB-ay0Q}m{QI;iY`s1Z^NqIkjrTlf`B)B#MajZ#9u41oRBC1oM1vq0i|F59> z#StM@bHt|#`2)cpl_rWB($DNJ3Lap}QM-+A$3pe}NyP(@+i1>o^fe-oxX#Bt`mcQc zb?pD4W%#ep|3%CHAYnr*^M6Czg>~L4?l16H1OozM{P*en298b+`i4$|w$|4AHbzqB zHpYUsHZET$Z0ztC;U+0*+amF!@PI%^oUIZy{`L{%O^i{Xk}X0&nl)n~tVEpcAJSJ} zverw15zP1P-O8h9nd!&hj$zuwjg?DoxYIw{jWM zW5_pj+wFy8Tsa9g<7Qa21WaV&;ejoYflRKcz?#fSH_)@*QVlN2l4(QNk| z4aPnv&mrS&0|6NHq05XQw$J^RR9T{3SOcMKCXIR1iSf+xJ0E_Wv?jEc*I#ZPzyJN2 zUG0UOXHl+PikM*&g$U@g+KbG-RY>uaIl&DEtw_Q=FYq?etc!;hEC_}UX{eyh%dw2V zTTSlap&5>PY{6I#(6`j-9`D&I#|YPP8a;(sOzgeKDWsLa!i-$frD>zr-oid!Hf&yS z!i^cr&7tN}OOGmX2)`8k?Tn!!4=tz~3hCTq_9CdiV!NIblUDxHh(FJ$zs)B2(t5@u z-`^RA1ShrLCkg0)OhfoM;4Z{&oZmAec$qV@ zGQ(7(!CBk<5;Ar%DLJ0p0!ResC#U<+3i<|vib1?{5gCebG7$F7URKZXuX-2WgF>YJ^i zMhHDBsh9PDU8dlZ$yJKtc6JA#y!y$57%sE>4Nt+wF1lfNIWyA`=hF=9Gj%sRwi@vd z%2eVV3y&dvAgyuJ=eNJR+*080dbO_t@BFJO<@&#yqTK&+xc|FRR;p;KVk@J3$S{p` zGaMj6isho#%m)?pOG^G0mzOAw0z?!AEMsv=0T>WWcE>??WS=fII$t$(^PDPMU(P>o z_*0s^W#|x)%tx8jIgZY~A2yG;US0m2ZOQt6yJqW@XNY_>_R7(Nxb8Ged6BdYW6{prd!|zuX$@Q2o6Ona8zzYC1u!+2!Y$Jc9a;wy+pXt}o6~Bu1oF1c zp7Y|SBTNi@=I(K%A60PMjM#sfH$y*c{xUgeSpi#HB`?|`!Tb&-qJ3;vxS!TIzuTZs-&%#bAkAyw9m4PJgvey zM5?up*b}eDEY+#@tKec)-c(#QF0P?MRlD1+7%Yk*jW;)`f;0a-ZJ6CQA?E%>i2Dt7T9?s|9ZF|KP4;CNWvaVKZ+Qeut;Jith_y{v*Ny6Co6!8MZx;Wgo z=qAi%&S;8J{iyD&>3CLCQdTX*$+Rx1AwA*D_J^0>suTgBMBb=*hefV+Ars#mmr+YsI3#!F@Xc1t4F-gB@6aoyT+5O(qMz*zG<9Qq*f0w^V!03rpr*-WLH}; zfM{xSPJeu6D(%8HU%0GEa%waFHE$G?FH^kMS-&I3)ycx|iv{T6Wx}9$$D&6{%1N_8 z_CLw)_9+O4&u94##vI9b-HHm_95m)fa??q07`DniVjAy`t7;)4NpeyAY(aAk(+T_O z1om+b5K2g_B&b2DCTK<>SE$Ode1DopAi)xaJjU>**AJK3hZrnhEQ9E`2=|HHe<^tv z63e(bn#fMWuz>4erc47}!J>U58%<&N<6AOAewyzNTqi7hJc|X{782&cM zHZYclNbBwU6673=!ClmxMfkC$(CykGR@10F!zN1Se83LR&a~$Ht&>~43OX22mt7tcZUpa;9@q}KDX3O&Ugp6< zLZLfIMO5;pTee1vNyVC$FGxzK2f>0Z-6hM82zKg44nWo|n}$Zk6&;5ry3`(JFEX$q zK&KivAe${e^5ZGc3a9hOt|!UOE&OocpVryE$Y4sPcs4rJ>>Kbi2_subQ9($2VN(3o zb~tEzMsHaBmBtaHAyES+d3A(qURgiskSSwUc9CfJ@99&MKp2sooSYZu+-0t0+L*!I zYagjOlPgx|lep9tiU%ts&McF6b0VE57%E0Ho%2oi?=Ks+5%aj#au^OBwNwhec zta6QAeQI^V!dF1C)>RHAmB`HnxyqWx?td@4sd15zPd*Fc9hpDXP23kbBenBxGeD$k z;%0VBQEJ-C)&dTAw_yW@k0u?IUk*NrkJ)(XEeI z9Y>6Vel>#s_v@=@0<{4A{pl=9cQ&Iah0iD0H`q)7NeCIRz8zx;! z^OO;1+IqoQNak&pV`qKW+K0^Hqp!~gSohcyS)?^P`JNZXw@gc6{A3OLZ?@1Uc^I2v z+X!^R*HCm3{7JPq{8*Tn>5;B|X7n4QQ0Bs79uTU%nbqOJh`nX(BVj!#f;#J+WZxx4 z_yM&1Y`2XzhfqkIMO7tB3raJKQS+H5F%o83bM+hxbQ zeeJm=Dvix$2j|b4?mDacb67v-1^lTp${z=jc1=j~QD>7c*@+1?py>%Kj%Ejp7Y-!? z8iYRUlGVrQPandAaxFfks53@2EC#0)%mrnmGRn&>=$H$S8q|kE_iWko4`^vCS2aWg z#!`RHUGyOt*k?bBYu3*j3u0gB#v(3tsije zgIuNNWNtrOkx@Pzs;A9un+2LX!zw+p3_NX^Sh09HZAf>m8l@O*rXy_82aWT$Q>iyy zqO7Of)D=wcSn!0+467&!Hl))eff=$aneB?R!YykdKW@k^_uR!+Q1tR)+IJb`-6=jj zymzA>Sv4>Z&g&WWu#|~GcP7qP&m*w-S$)7Xr;(duqCTe7p8H3k5>Y-n8438+%^9~K z3r^LIT_K{i7DgEJjIocw_6d0!<;wKT`X;&vv+&msmhAAnIe!OTdybPctzcEzBy88_ zWO{6i4YT%e4^WQZB)KHCvA(0tS zHu_Bg+6Ko%a9~$EjRB90`P(2~6uI@SFibxct{H#o&y40MdiXblu@VFXbhz>Nko;7R z70Ntmm-FePqhb%9gL+7U8@(ch|JfH5Fm)5${8|`Lef>LttM_iww6LW2X61ldBmG0z zax3y)njFe>j*T{i0s8D4=L>X^j0)({R5lMGVS#7(2C9@AxL&C-lZQx~czI7Iv+{%1 z2hEG>RzX4S8x3v#9sgGAnPzptM)g&LB}@%E>fy0vGSa(&q0ch|=ncKjNrK z`jA~jObJhrJ^ri|-)J^HUyeZXz~XkBp$VhcTEcTdc#a2EUOGVX?@mYx#Vy*!qO$Jv zQ4rgOJ~M*o-_Wptam=~krnmG*p^j!JAqoQ%+YsDFW7Cc9M%YPiBOrVcD^RY>m9Pd< zu}#9M?K{+;UIO!D9qOpq9yxUquQRmQNMo0pT`@$pVt=rMvyX)ph(-CCJLvUJy71DI zBk7oc7)-%ngdj~s@76Yse3L^gV0 z2==qfp&Q~L(+%RHP0n}+xH#k(hPRx(!AdBM$JCfJ5*C=K3ts>P?@@SZ_+{U2qFZb>4kZ{Go37{# zSQc+-dq*a-Vy4?taS&{Ht|MLRiS)Sn14JOONyXqPNnpq&2y~)6wEG0oNy>qvod$FF z`9o&?&6uZjhZ4_*5qWVrEfu(>_n2Xi2{@Gz9MZ8!YmjYvIMasE9yVQL10NBrTCczq zcTY1q^PF2l!Eraguf{+PtHV3=2A?Cu&NN&a8V(y;q(^_mFc6)%Yfn&X&~Pq zU1?qCj^LF(EQB1F`8NxNjyV%fde}dEa(Hx=r7$~ts2dzDwyi6ByBAIx$NllB4%K=O z$AHz1<2bTUb>(MCVPpK(E9wlLElo(aSd(Os)^Raum`d(g9Vd_+Bf&V;l=@mM=cC>) z)9b0enb)u_7V!!E_bl>u5nf&Rl|2r=2F3rHMdb7y9E}}F82^$Rf+P8%dKnOeKh1vs zhH^P*4Ydr^$)$h@4KVzxrHyy#cKmWEa9P5DJ|- zG;!Qi35Tp7XNj60=$!S6U#!(${6hyh7d4q=pF{`0t|N^|L^d8pD{O9@tF~W;#Je*P z&ah%W!KOIN;SyAEhAeTafJ4uEL`(RtnovM+cb(O#>xQnk?dzAjG^~4$dFn^<@-Na3 z395;wBnS{t*H;Jef2eE!2}u5Ns{AHj>WYZDgQJt8v%x?9{MXqJsGP|l%OiZqQ1aB! z%E=*Ig`(!tHh>}4_z5IMpg{49UvD*Pp9!pxt_gdAW%sIf3k6CTycOT1McPl=_#0?8 zVjz8Hj*Vy9c5-krd-{BQ{6Xy|P$6LJvMuX$* zA+@I_66_ET5l2&gk9n4$1M3LN8(yEViRx&mtd#LD}AqEs?RW=xKC(OCWH;~>(X6h!uDxXIPH06xh z*`F4cVlbDP`A)-fzf>MuScYsmq&1LUMGaQ3bRm6i7OsJ|%uhTDT zlvZA1M}nz*SalJWNT|`dBm1$xlaA>CCiQ zK`xD-RuEn>-`Z?M{1%@wewf#8?F|(@1e0+T4>nmlSRrNK5f)BJ2H*$q(H>zGD0>eL zQ!tl_Wk)k*e6v^m*{~A;@6+JGeWU-q9>?+L_#UNT%G?4&BnOgvm9@o7l?ov~XL+et zbGT)|G7)KAeqb=wHSPk+J1bdg7N3$vp(ekjI1D9V$G5Cj!=R2w=3*4!z*J-r-cyeb zd(i2KmX!|Lhey!snRw z?#$Gu%S^SQEKt&kep)up#j&9}e+3=JJBS(s>MH+|=R(`8xK{mmndWo_r`-w1#SeRD&YtAJ#GiVI*TkQZ}&aq<+bU2+coU3!jCI6E+Ad_xFW*ghnZ$q zAoF*i&3n1j#?B8x;kjSJD${1jdRB;)R*)Ao!9bd|C7{;iqDo|T&>KSh6*hCD!rwv= zyK#F@2+cv3=|S1Kef(E6Niv8kyLVLX&e=U;{0x{$tDfShqkjUME>f8d(5nzSkY6@! z^-0>DM)wa&%m#UF1F?zR`8Y3X#tA!*7Q$P3lZJ%*KNlrk_uaPkxw~ zxZ1qlE;Zo;nb@!SMazSjM>;34ROOoygo%SF);LL>rRonWwR>bmSd1XD^~sGSu$Gg# zFZ`|yKU0%!v07dz^v(tY%;So(e`o{ZYTX`hm;@b0%8|H>VW`*cr8R%3n|ehw2`(9B+V72`>SY}9^8oh$En80mZK9T4abVG*to;E z1_S6bgDOW?!Oy1LwYy=w3q~KKdbNtyH#d24PFjX)KYMY93{3-mPP-H>@M-_>N~DDu zENh~reh?JBAK=TFN-SfDfT^=+{w4ea2KNWXq2Y<;?(gf(FgVp8Zp-oEjKzB%2Iqj;48GmY3h=bcdYJ}~&4tS`Q1sb=^emaW$IC$|R+r-8V- zf0$gGE(CS_n4s>oicVk)MfvVg#I>iDvf~Ov8bk}sSxluG!6#^Z_zhB&U^`eIi1@j( z^CK$z^stBHtaDDHxn+R;3u+>Lil^}fj?7eaGB z&5nl^STqcaBxI@v>%zG|j))G(rVa4aY=B@^2{TFkW~YP!8!9TG#(-nOf^^X-%m9{Z zCC?iC`G-^RcBSCuk=Z`(FaUUe?hf3{0C>>$?Vs z`2Uud9M+T&KB6o4o9kvdi^Q=Bw!asPdxbe#W-Oaa#_NP(qpyF@bVxv5D5))srkU#m zj_KA+#7sqDn*Ipf!F5Byco4HOSd!Ui$l94|IbW%Ny(s1>f4|Mv^#NfB31N~kya9!k zWCGL-$0ZQztBate^fd>R!hXY_N9ZjYp3V~4_V z#eB)Kjr8yW=+oG)BuNdZG?jaZlw+l_ma8aET(s+-x+=F-t#Qoiuu1i`^x8Sj>b^U} zs^z<()YMFP7CmjUC@M=&lA5W7t&cxTlzJAts*%PBDAPuqcV5o7HEnqjif_7xGt)F% zGx2b4w{@!tE)$p=l3&?Bf#`+!-RLOleeRk3 z7#pF|w@6_sBmn1nECqdunmG^}pr5(ZJQVvAt$6p3H(16~;vO>?sTE`Y+mq5YP&PBo zvq!7#W$Gewy`;%6o^!Dtjz~x)T}Bdk*BS#=EY=ODD&B=V6TD2z^hj1m5^d6s)D*wk zu$z~D7QuZ2b?5`p)E8e2_L38v3WE{V`bVk;6fl#o2`) z99JsWhh?$oVRn@$S#)uK&8DL8>An0&S<%V8hnGD7Z^;Y(%6;^9!7kDQ5bjR_V+~wp zfx4m3z6CWmmZ<8gDGUyg3>t8wgJ5NkkiEm^(sedCicP^&3D%}6LtIUq>mXCAt{9eF zNXL$kGcoUTf_Lhm`t;hD-SE)m=iBnxRU(NyL}f6~1uH)`K!hmYZjLI%H}AmEF5RZt z06$wn63GHnApHXZZJ}s^s)j9(BM6e*7IBK6Bq(!)d~zR#rbxK9NVIlgquoMq z=eGZ9NR!SEqP6=9UQg#@!rtbbSBUM#ynF);zKX+|!Zm}*{H z+j=d?aZ2!?@EL7C~%B?6ouCKLnO$uWn;Y6Xz zX8dSwj732u(o*U3F$F=7xwxm>E-B+SVZH;O-4XPuPkLSt_?S0)lb7EEg)Mglk0#eS z9@jl(OnH4juMxY+*r03VDfPx_IM!Lmc(5hOI;`?d37f>jPP$?9jQQIQU@i4vuG6MagEoJrQ=RD7xt@8E;c zeGV*+Pt+t$@pt!|McETOE$9k=_C!70uhwRS9X#b%ZK z%q(TIUXSS^F0`4Cx?Rk07C6wI4!UVPeI~-fxY6`YH$kABdOuiRtl73MqG|~AzZ@iL&^s?24iS;RK_pdlWkhcF z@Wv-Om(Aealfg)D^adlXh9Nvf~Uf@y;g3Y)i(YP zEXDnb1V}1pJT5ZWyw=1i+0fni9yINurD=EqH^ciOwLUGi)C%Da)tyt=zq2P7pV5-G zR7!oq28-Fgn5pW|nlu^b!S1Z#r7!Wtr{5J5PQ>pd+2P7RSD?>(U7-|Y z7ZQ5lhYIl_IF<9?T9^IPK<(Hp;l5bl5tF9>X-zG14_7PfsA>6<$~A338iYRT{a@r_ zuXBaT=`T5x3=s&3=RYx6NgG>No4?5KFBVjE(swfcivcIpPQFx5l+O;fiGsOrl5teR z_Cm+;PW}O0Dwe_(4Z@XZ)O0W-v2X><&L*<~*q3dg;bQW3g7)a#3KiQP>+qj|qo*Hk z?57>f2?f@`=Fj^nkDKeRkN2d$Z@2eNKpHo}ksj-$`QKb6n?*$^*%Fb3_Kbf1(*W9K>{L$mud2WHJ=j0^=g30Xhg8$#g^?36`p1fm;;1@0Lrx+8t`?vN0ZorM zSW?rhjCE8$C|@p^sXdx z|NOHHg+fL;HIlqyLp~SSdIF`TnSHehNCU9t89yr@)FY<~hu+X`tjg(aSVae$wDG*C zq$nY(Y494R)hD!i1|IIyP*&PD_c2FPgeY)&mX1qujB1VHPG9`yFQpLFVQ0>EKS@Bp zAfP5`C(sWGLI?AC{XEjLKR4FVNw(4+9b?kba95ukgR1H?w<8F7)G+6&(zUhIE5Ef% z=fFkL3QKA~M@h{nzjRq!Y_t!%U66#L8!(2-GgFxkD1=JRRqk=n%G(yHKn%^&$dW>; zSjAcjETMz1%205se$iH_)ZCpfg_LwvnsZQAUCS#^FExp8O4CrJb6>JquNV@qPq~3A zZ<6dOU#6|8+fcgiA#~MDmcpIEaUO02L5#T$HV0$EMD94HT_eXLZ2Zi&(! z&5E>%&|FZ`)CN10tM%tLSPD*~r#--K(H-CZqIOb99_;m|D5wdgJ<1iOJz@h2Zkq?} z%8_KXb&hf=2Wza(Wgc;3v3TN*;HTU*q2?#z&tLn_U0Nt!y>Oo>+2T)He6%XuP;fgn z-G!#h$Y2`9>Jtf}hbVrm6D70|ERzLAU>3zoWhJmjWfgM^))T+2u$~5>HF9jQDkrXR z=IzX36)V75PrFjkQ%TO+iqKGCQ-DDXbaE;C#}!-CoWQx&v*vHfyI>$HNRbpvm<`O( zlx9NBWD6_e&J%Ous4yp~s6)Ghni!I6)0W;9(9$y1wWu`$gs<$9Mcf$L*piP zPR0Av*2%ul`W;?-1_-5Zy0~}?`e@Y5A&0H!^ApyVTT}BiOm4GeFo$_oPlDEyeGBbh z1h3q&Dx~GmUS|3@4V36&$2uO8!Yp&^pD7J5&TN{?xphf*-js1fP?B|`>p_K>lh{ij zP(?H%e}AIP?_i^f&Li=FDSQ`2_NWxL+BB=nQr=$ zHojMlXNGauvvwPU>ZLq!`bX-5F4jBJ&So{kE5+ms9UEYD{66!|k~3vsP+mE}x!>%P za98bAU0!h0&ka4EoiDvBM#CP#dRNdXJcb*(%=<(g+M@<)DZ!@v1V>;54En?igcHR2 zhubQMq}VSOK)onqHfczM7YA@s=9*ow;k;8)&?J3@0JiGcP! zP#00KZ1t)GyZeRJ=f0^gc+58lc4Qh*S7RqPIC6GugG1gXe$LIQMRCo8cHf^qXgAa2 z`}t>u2Cq1CbSEpLr~E=c7~=Qkc9-vLE%(v9N*&HF`(d~(0`iukl5aQ9u4rUvc8%m) zr2GwZN4!s;{SB87lJB;veebPmqE}tSpT>+`t?<457Q9iV$th%i__Z1kOMAswFldD6 ztbOvO337S5o#ZZgN2G99_AVqPv!?Gmt3pzgD+Hp3QPQ`9qJ(g=kjvD+fUSS3upJn! zqoG7acIKEFRX~S}3|{EWT$kdz#zrDlJU(rPkxjws_iyLKU8+v|*oS_W*-guAb&Pj1 z35Z`3z<&Jb@2Mwz=KXucNYdY#SNO$tcVFr9KdKm|%^e-TXzs6M`PBper%ajkrIyUe zp$vVxVs9*>Vp4_1NC~Zg)WOCPmOxI1V34QlG4!aSFOH{QqSVq1^1)- z0P!Z?tT&E-ll(pwf0?=F=yOzik=@nh1Clxr9}Vij89z)ePDSCYAqw?lVI?v?+&*zH z)p$CScFI8rrwId~`}9YWPFu0cW1Sf@vRELs&cbntRU6QfPK-SO*mqu|u~}8AJ!Q$z znzu}50O=YbjwKCuSVBs6&CZR#0FTu)3{}qJJYX(>QPr4$RqWiwX3NT~;>cLn*_&1H zaKpIW)JVJ>b{uo2oq>oQt3y=zJjb%fU@wLqM{SyaC6x2snMx-}ivfU<1- znu1Lh;i$3Tf$Kh5Uk))G!D1UhE8pvx&nO~w^fG)BC&L!_hQk%^p`Kp@F{cz>80W&T ziOK=Sq3fdRu*V0=S53rcIfWFazI}Twj63CG(jOB;$*b`*#B9uEnBM`hDk*EwSRdwP8?5T?xGUKs=5N83XsR*)a4|ijz|c{4tIU+4j^A5C<#5 z*$c_d=5ml~%pGxw#?*q9N7aRwPux5EyqHVkdJO=5J>84!X6P>DS8PTTz>7C#FO?k#edkntG+fJk8ZMn?pmJSO@`x-QHq;7^h6GEXLXo1TCNhH z8ZDH{*NLAjo3WM`xeb=X{((uv3H(8&r8fJJg_uSs_%hOH%JDD?hu*2NvWGYD+j)&` zz#_1%O1wF^o5ryt?O0n;`lHbzp0wQ?rcbW(F1+h7_EZZ9{>rePvLAPVZ_R|n@;b$;UchU=0j<6k8G9QuQf@76oiE*4 zXOLQ&n3$NR#p4<5NJMVC*S);5x2)eRbaAM%VxWu9ohlT;pGEk7;002enCbQ>2r-us z3#bpXP9g|mE`65VrN`+3mC)M(eMj~~eOf)do<@l+fMiTR)XO}422*1SL{wyY(%oMpBgJagtiDf zz>O6(m;};>Hi=t8o{DVC@YigqS(Qh+ix3Rwa9aliH}a}IlOCW1@?%h_bRbq-W{KHF z%Vo?-j@{Xi@=~Lz5uZP27==UGE15|g^0gzD|3x)SCEXrx`*MP^FDLl%pOi~~Il;dc z^hrwp9sYeT7iZ)-ajKy@{a`kr0-5*_!XfBpXwEcFGJ;%kV$0Nx;apKrur zJN2J~CAv{Zjj%FolyurtW8RaFmpn&zKJWL>(0;;+q(%(Hx!GMW4AcfP0YJ*Vz!F4g z!ZhMyj$BdXL@MlF%KeInmPCt~9&A!;cRw)W!Hi@0DY(GD_f?jeV{=s=cJ6e}JktJw zQORnxxj3mBxfrH=x{`_^Z1ddDh}L#V7i}$njUFRVwOX?qOTKjfPMBO4y(WiU<)epb zvB9L=%jW#*SL|Nd_G?E*_h1^M-$PG6Pc_&QqF0O-FIOpa4)PAEPsyvB)GKasmBoEt z?_Q2~QCYGH+hW31x-B=@5_AN870vY#KB~3a*&{I=f);3Kv7q4Q7s)0)gVYx2#Iz9g(F2;=+Iy4 z6KI^8GJ6D@%tpS^8boU}zpi=+(5GfIR)35PzrbuXeL1Y1N%JK7PG|^2k3qIqHfX;G zQ}~JZ-UWx|60P5?d1e;AHx!_;#PG%d=^X(AR%i`l0jSpYOpXoKFW~7ip7|xvN;2^? zsYC9fanpO7rO=V7+KXqVc;Q5z%Bj})xHVrgoR04sA2 zl~DAwv=!(()DvH*=lyhIlU^hBkA0$e*7&fJpB0|oB7)rqGK#5##2T`@_I^|O2x4GO z;xh6ROcV<9>?e0)MI(y++$-ksV;G;Xe`lh76T#Htuia+(UrIXrf9?

L(tZ$0BqX1>24?V$S+&kLZ`AodQ4_)P#Q3*4xg8}lMV-FLwC*cN$< zt65Rf%7z41u^i=P*qO8>JqXPrinQFapR7qHAtp~&RZ85$>ob|Js;GS^y;S{XnGiBc zGa4IGvDl?x%gY`vNhv8wgZnP#UYI-w*^4YCZnxkF85@ldepk$&$#3EAhrJY0U)lR{F6sM3SONV^+$;Zx8BD&Eku3K zKNLZyBni3)pGzU0;n(X@1fX8wYGKYMpLmCu{N5-}epPDxClPFK#A@02WM3!myN%bkF z|GJ4GZ}3sL{3{qXemy+#Uk{4>Kf8v11;f8I&c76+B&AQ8udd<8gU7+BeWC`akUU~U zgXoxie>MS@rBoyY8O8Tc&8id!w+_ooxcr!1?#rc$-|SBBtH6S?)1e#P#S?jFZ8u-Bs&k`yLqW|{j+%c#A4AQ>+tj$Y z^CZajspu$F%73E68Lw5q7IVREED9r1Ijsg#@DzH>wKseye>hjsk^{n0g?3+gs@7`i zHx+-!sjLx^fS;fY!ERBU+Q zVJ!e0hJH%P)z!y%1^ZyG0>PN@5W~SV%f>}c?$H8r;Sy-ui>aruVTY=bHe}$e zi&Q4&XK!qT7-XjCrDaufT@>ieQ&4G(SShUob0Q>Gznep9fR783jGuUynAqc6$pYX; z7*O@@JW>O6lKIk0G00xsm|=*UVTQBB`u1f=6wGAj%nHK_;Aqmfa!eAykDmi-@u%6~ z;*c!pS1@V8r@IX9j&rW&d*}wpNs96O2Ute>%yt{yv>k!6zfT6pru{F1M3P z2WN1JDYqoTB#(`kE{H676QOoX`cnqHl1Yaru)>8Ky~VU{)r#{&s86Vz5X)v15ULHA zAZDb{99+s~qI6;-dQ5DBjHJP@GYTwn;Dv&9kE<0R!d z8tf1oq$kO`_sV(NHOSbMwr=To4r^X$`sBW4$gWUov|WY?xccQJN}1DOL|GEaD_!@& z15p?Pj+>7d`@LvNIu9*^hPN)pwcv|akvYYq)ks%`G>!+!pW{-iXPZsRp8 z35LR;DhseQKWYSD`%gO&k$Dj6_6q#vjWA}rZcWtQr=Xn*)kJ9kacA=esi*I<)1>w^ zO_+E>QvjP)qiSZg9M|GNeLtO2D7xT6vsj`88sd!94j^AqxFLi}@w9!Y*?nwWARE0P znuI_7A-saQ+%?MFA$gttMV-NAR^#tjl_e{R$N8t2NbOlX373>e7Ox=l=;y#;M7asp zRCz*CLnrm$esvSb5{T<$6CjY zmZ(i{Rs_<#pWW>(HPaaYj`%YqBra=Ey3R21O7vUbzOkJJO?V`4-D*u4$Me0Bx$K(lYo`JO}gnC zx`V}a7m-hLU9Xvb@K2ymioF)vj12<*^oAqRuG_4u%(ah?+go%$kOpfb`T96P+L$4> zQ#S+sA%VbH&mD1k5Ak7^^dZoC>`1L%i>ZXmooA!%GI)b+$D&ziKrb)a=-ds9xk#~& z7)3iem6I|r5+ZrTRe_W861x8JpD`DDIYZNm{$baw+$)X^Jtjnl0xlBgdnNY}x%5za zkQ8E6T<^$sKBPtL4(1zi_Rd(tVth*3Xs!ulflX+70?gb&jRTnI8l+*Aj9{|d%qLZ+ z>~V9Z;)`8-lds*Zgs~z1?Fg?Po7|FDl(Ce<*c^2=lFQ~ahwh6rqSjtM5+$GT>3WZW zj;u~w9xwAhOc<kF}~`CJ68 z?(S5vNJa;kriPlim33{N5`C{9?NWhzsna_~^|K2k4xz1`xcui*LXL-1#Y}Hi9`Oo!zQ>x-kgAX4LrPz63uZ+?uG*84@PKq-KgQlMNRwz=6Yes) zY}>YN+qP}nwr$(CZQFjUOI=-6J$2^XGvC~EZ+vrqWaOXB$k?%Suf5k=4>AveC1aJ! ziaW4IS%F$_Babi)kA8Y&u4F7E%99OPtm=vzw$$ zEz#9rvn`Iot_z-r3MtV>k)YvErZ<^Oa${`2>MYYODSr6?QZu+be-~MBjwPGdMvGd!b!elsdi4% z`37W*8+OGulab8YM?`KjJ8e+jM(tqLKSS@=jimq3)Ea2EB%88L8CaM+aG7;27b?5` z4zuUWBr)f)k2o&xg{iZ$IQkJ+SK>lpq4GEacu~eOW4yNFLU!Kgc{w4&D$4ecm0f}~ zTTzquRW@`f0}|IILl`!1P+;69g^upiPA6F{)U8)muWHzexRenBU$E^9X-uIY2%&1w z_=#5*(nmxJ9zF%styBwivi)?#KMG96-H@hD-H_&EZiRNsfk7mjBq{L%!E;Sqn!mVX*}kXhwH6eh;b42eD!*~upVG@ z#smUqz$ICm!Y8wY53gJeS|Iuard0=;k5i5Z_hSIs6tr)R4n*r*rE`>38Pw&lkv{_r!jNN=;#?WbMj|l>cU(9trCq; z%nN~r^y7!kH^GPOf3R}?dDhO=v^3BeP5hF|%4GNQYBSwz;x({21i4OQY->1G=KFyu z&6d`f2tT9Yl_Z8YACZaJ#v#-(gcyeqXMhYGXb=t>)M@fFa8tHp2x;ODX=Ap@a5I=U z0G80^$N0G4=U(>W%mrrThl0DjyQ-_I>+1Tdd_AuB3qpYAqY54upwa3}owa|x5iQ^1 zEf|iTZxKNGRpI>34EwkIQ2zHDEZ=(J@lRaOH>F|2Z%V_t56Km$PUYu^xA5#5Uj4I4RGqHD56xT%H{+P8Ag>e_3pN$4m8n>i%OyJFPNWaEnJ4McUZPa1QmOh?t8~n& z&RulPCors8wUaqMHECG=IhB(-tU2XvHP6#NrLVyKG%Ee*mQ5Ps%wW?mcnriTVRc4J`2YVM>$ixSF2Xi+Wn(RUZnV?mJ?GRdw%lhZ+t&3s7g!~g{%m&i<6 z5{ib-<==DYG93I(yhyv4jp*y3#*WNuDUf6`vTM%c&hiayf(%=x@4$kJ!W4MtYcE#1 zHM?3xw63;L%x3drtd?jot!8u3qeqctceX3m;tWetK+>~q7Be$h>n6riK(5@ujLgRS zvOym)k+VAtyV^mF)$29Y`nw&ijdg~jYpkx%*^ z8dz`C*g=I?;clyi5|!27e2AuSa$&%UyR(J3W!A=ZgHF9OuKA34I-1U~pyD!KuRkjA zbkN!?MfQOeN>DUPBxoy5IX}@vw`EEB->q!)8fRl_mqUVuRu|C@KD-;yl=yKc=ZT0% zB$fMwcC|HE*0f8+PVlWHi>M`zfsA(NQFET?LrM^pPcw`cK+Mo0%8*x8@65=CS_^$cG{GZQ#xv($7J z??R$P)nPLodI;P!IC3eEYEHh7TV@opr#*)6A-;EU2XuogHvC;;k1aI8asq7ovoP!* z?x%UoPrZjj<&&aWpsbr>J$Er-7!E(BmOyEv!-mbGQGeJm-U2J>74>o5x`1l;)+P&~ z>}f^=Rx(ZQ2bm+YE0u=ZYrAV@apyt=v1wb?R@`i_g64YyAwcOUl=C!i>=Lzb$`tjv zOO-P#A+)t-JbbotGMT}arNhJmmGl-lyUpMn=2UacVZxmiG!s!6H39@~&uVokS zG=5qWhfW-WOI9g4!R$n7!|ViL!|v3G?GN6HR0Pt_L5*>D#FEj5wM1DScz4Jv@Sxnl zB@MPPmdI{(2D?;*wd>3#tjAirmUnQoZrVv`xM3hARuJksF(Q)wd4P$88fGYOT1p6U z`AHSN!`St}}UMBT9o7i|G`r$ zrB=s$qV3d6$W9@?L!pl0lf%)xs%1ko^=QY$ty-57=55PvP(^6E7cc zGJ*>m2=;fOj?F~yBf@K@9qwX0hA803Xw+b0m}+#a(>RyR8}*Y<4b+kpp|OS+!whP( zH`v{%s>jsQI9rd$*vm)EkwOm#W_-rLTHcZRek)>AtF+~<(did)*oR1|&~1|e36d-d zgtm5cv1O0oqgWC%Et@P4Vhm}Ndl(Y#C^MD03g#PH-TFy+7!Osv1z^UWS9@%JhswEq~6kSr2DITo59+; ze=ZC}i2Q?CJ~Iyu?vn|=9iKV>4j8KbxhE4&!@SQ^dVa-gK@YfS9xT(0kpW*EDjYUkoj! zE49{7H&E}k%5(>sM4uGY)Q*&3>{aitqdNnRJkbOmD5Mp5rv-hxzOn80QsG=HJ_atI-EaP69cacR)Uvh{G5dTpYG7d zbtmRMq@Sexey)||UpnZ?;g_KMZq4IDCy5}@u!5&B^-=6yyY{}e4Hh3ee!ZWtL*s?G zxG(A!<9o!CL+q?u_utltPMk+hn?N2@?}xU0KlYg?Jco{Yf@|mSGC<(Zj^yHCvhmyx z?OxOYoxbptDK()tsJ42VzXdINAMWL$0Gcw?G(g8TMB)Khw_|v9`_ql#pRd2i*?CZl z7k1b!jQB=9-V@h%;Cnl7EKi;Y^&NhU0mWEcj8B|3L30Ku#-9389Q+(Yet0r$F=+3p z6AKOMAIi|OHyzlHZtOm73}|ntKtFaXF2Fy|M!gOh^L4^62kGUoWS1i{9gsds_GWBc zLw|TaLP64z3z9?=R2|T6Xh2W4_F*$cq>MtXMOy&=IPIJ`;!Tw?PqvI2b*U1)25^<2 zU_ZPoxg_V0tngA0J+mm?3;OYw{i2Zb4x}NedZug!>EoN3DC{1i)Z{Z4m*(y{ov2%- zk(w>+scOO}MN!exSc`TN)!B=NUX`zThWO~M*ohqq;J2hx9h9}|s#?@eR!=F{QTrq~ zTcY|>azkCe$|Q0XFUdpFT=lTcyW##i;-e{}ORB4D?t@SfqGo_cS z->?^rh$<&n9DL!CF+h?LMZRi)qju!meugvxX*&jfD!^1XB3?E?HnwHP8$;uX{Rvp# zh|)hM>XDv$ZGg=$1{+_bA~u-vXqlw6NH=nkpyWE0u}LQjF-3NhATL@9rRxMnpO%f7 z)EhZf{PF|mKIMFxnC?*78(}{Y)}iztV12}_OXffJ;ta!fcFIVjdchyHxH=t%ci`Xd zX2AUB?%?poD6Zv*&BA!6c5S#|xn~DK01#XvjT!w!;&`lDXSJT4_j$}!qSPrb37vc{ z9^NfC%QvPu@vlxaZ;mIbn-VHA6miwi8qJ~V;pTZkKqqOii<1Cs}0i?uUIss;hM4dKq^1O35y?Yp=l4i zf{M!@QHH~rJ&X~8uATV><23zZUbs-J^3}$IvV_ANLS08>k`Td7aU_S1sLsfi*C-m1 z-e#S%UGs4E!;CeBT@9}aaI)qR-6NU@kvS#0r`g&UWg?fC7|b^_HyCE!8}nyh^~o@< zpm7PDFs9yxp+byMS(JWm$NeL?DNrMCNE!I^ko-*csB+dsf4GAq{=6sfyf4wb>?v1v zmb`F*bN1KUx-`ra1+TJ37bXNP%`-Fd`vVQFTwWpX@;s(%nDQa#oWhgk#mYlY*!d>( zE&!|ySF!mIyfING+#%RDY3IBH_fW$}6~1%!G`suHub1kP@&DoAd5~7J55;5_noPI6eLf{t;@9Kf<{aO0`1WNKd?<)C-|?C?)3s z>wEq@8=I$Wc~Mt$o;g++5qR+(6wt9GI~pyrDJ%c?gPZe)owvy^J2S=+M^ z&WhIE`g;;J^xQLVeCtf7b%Dg#Z2gq9hp_%g)-%_`y*zb; zn9`f`mUPN-Ts&fFo(aNTsXPA|J!TJ{0hZp0^;MYHLOcD=r_~~^ymS8KLCSeU3;^QzJNqS z5{5rEAv#l(X?bvwxpU;2%pQftF`YFgrD1jt2^~Mt^~G>T*}A$yZc@(k9orlCGv&|1 zWWvVgiJsCAtamuAYT~nzs?TQFt<1LSEx!@e0~@yd6$b5!Zm(FpBl;(Cn>2vF?k zOm#TTjFwd2D-CyA!mqR^?#Uwm{NBemP>(pHmM}9;;8`c&+_o3#E5m)JzfwN?(f-a4 zyd%xZc^oQx3XT?vcCqCX&Qrk~nu;fxs@JUoyVoi5fqpi&bUhQ2y!Ok2pzsFR(M(|U zw3E+kH_zmTRQ9dUMZWRE%Zakiwc+lgv7Z%|YO9YxAy`y28`Aw;WU6HXBgU7fl@dnt z-fFBV)}H-gqP!1;V@Je$WcbYre|dRdp{xt!7sL3Eoa%IA`5CAA%;Wq8PktwPdULo! z8!sB}Qt8#jH9Sh}QiUtEPZ6H0b*7qEKGJ%ITZ|vH)5Q^2m<7o3#Z>AKc%z7_u`rXA zqrCy{-{8;9>dfllLu$^M5L z-hXs))h*qz%~ActwkIA(qOVBZl2v4lwbM>9l70Y`+T*elINFqt#>OaVWoja8RMsep z6Or3f=oBnA3vDbn*+HNZP?8LsH2MY)x%c13@(XfuGR}R?Nu<|07{$+Lc3$Uv^I!MQ z>6qWgd-=aG2Y^24g4{Bw9ueOR)(9h`scImD=86dD+MnSN4$6 z^U*o_mE-6Rk~Dp!ANp#5RE9n*LG(Vg`1)g6!(XtDzsov$Dvz|Gv1WU68J$CkshQhS zCrc|cdkW~UK}5NeaWj^F4MSgFM+@fJd{|LLM)}_O<{rj z+?*Lm?owq?IzC%U%9EBga~h-cJbIu=#C}XuWN>OLrc%M@Gu~kFEYUi4EC6l#PR2JS zQUkGKrrS#6H7}2l0F@S11DP`@pih0WRkRJl#F;u{c&ZC{^$Z+_*lB)r)-bPgRFE;* zl)@hK4`tEP=P=il02x7-C7p%l=B`vkYjw?YhdJU9!P!jcmY$OtC^12w?vy3<<=tlY zUwHJ_0lgWN9vf>1%WACBD{UT)1qHQSE2%z|JHvP{#INr13jM}oYv_5#xsnv9`)UAO zuwgyV4YZ;O)eSc3(mka6=aRohi!HH@I#xq7kng?Acdg7S4vDJb6cI5fw?2z%3yR+| zU5v@Hm}vy;${cBp&@D=HQ9j7NcFaOYL zj-wV=eYF{|XTkFNM2uz&T8uH~;)^Zo!=KP)EVyH6s9l1~4m}N%XzPpduPg|h-&lL` zAXspR0YMOKd2yO)eMFFJ4?sQ&!`dF&!|niH*!^*Ml##o0M(0*uK9&yzekFi$+mP9s z>W9d%Jb)PtVi&-Ha!o~Iyh@KRuKpQ@)I~L*d`{O8!kRObjO7=n+Gp36fe!66neh+7 zW*l^0tTKjLLzr`x4`_8&on?mjW-PzheTNox8Hg7Nt@*SbE-%kP2hWYmHu#Fn@Q^J(SsPUz*|EgOoZ6byg3ew88UGdZ>9B2Tq=jF72ZaR=4u%1A6Vm{O#?@dD!(#tmR;eP(Fu z{$0O%=Vmua7=Gjr8nY%>ul?w=FJ76O2js&17W_iq2*tb!i{pt#`qZB#im9Rl>?t?0c zicIC}et_4d+CpVPx)i4~$u6N-QX3H77ez z?ZdvXifFk|*F8~L(W$OWM~r`pSk5}#F?j_5u$Obu9lDWIknO^AGu+Blk7!9Sb;NjS zncZA?qtASdNtzQ>z7N871IsPAk^CC?iIL}+{K|F@BuG2>qQ;_RUYV#>hHO(HUPpk@ z(bn~4|F_jiZi}Sad;_7`#4}EmD<1EiIxa48QjUuR?rC}^HRocq`OQPM@aHVKP9E#q zy%6bmHygCpIddPjE}q_DPC`VH_2m;Eey&ZH)E6xGeStOK7H)#+9y!%-Hm|QF6w#A( zIC0Yw%9j$s-#odxG~C*^MZ?M<+&WJ+@?B_QPUyTg9DJGtQN#NIC&-XddRsf3n^AL6 zT@P|H;PvN;ZpL0iv$bRb7|J{0o!Hq+S>_NrH4@coZtBJu#g8#CbR7|#?6uxi8d+$g z87apN>EciJZ`%Zv2**_uiET9Vk{pny&My;+WfGDw4EVL#B!Wiw&M|A8f1A@ z(yFQS6jfbH{b8Z-S7D2?Ixl`j0{+ZnpT=;KzVMLW{B$`N?Gw^Fl0H6lT61%T2AU**!sX0u?|I(yoy&Xveg7XBL&+>n6jd1##6d>TxE*Vj=8lWiG$4=u{1UbAa5QD>5_ z;Te^42v7K6Mmu4IWT6Rnm>oxrl~b<~^e3vbj-GCdHLIB_>59}Ya+~OF68NiH=?}2o zP(X7EN=quQn&)fK>M&kqF|<_*H`}c zk=+x)GU>{Af#vx&s?`UKUsz})g^Pc&?Ka@t5$n$bqf6{r1>#mWx6Ep>9|A}VmWRnowVo`OyCr^fHsf# zQjQ3Ttp7y#iQY8l`zEUW)(@gGQdt(~rkxlkefskT(t%@i8=|p1Y9Dc5bc+z#n$s13 zGJk|V0+&Ekh(F};PJzQKKo+FG@KV8a<$gmNSD;7rd_nRdc%?9)p!|B-@P~kxQG}~B zi|{0}@}zKC(rlFUYp*dO1RuvPC^DQOkX4<+EwvBAC{IZQdYxoq1Za!MW7%p7gGr=j zzWnAq%)^O2$eItftC#TTSArUyL$U54-O7e|)4_7%Q^2tZ^0-d&3J1}qCzR4dWX!)4 zzIEKjgnYgMus^>6uw4Jm8ga6>GBtMjpNRJ6CP~W=37~||gMo_p@GA@#-3)+cVYnU> zE5=Y4kzl+EbEh%dhQokB{gqNDqx%5*qBusWV%!iprn$S!;oN_6E3?0+umADVs4ako z?P+t?m?};gev9JXQ#Q&KBpzkHPde_CGu-y z<{}RRAx=xlv#mVi+Ibrgx~ujW$h{?zPfhz)Kp7kmYS&_|97b&H&1;J-mzrBWAvY} zh8-I8hl_RK2+nnf&}!W0P+>5?#?7>npshe<1~&l_xqKd0_>dl_^RMRq@-Myz&|TKZBj1=Q()) zF{dBjv5)h=&Z)Aevx}+i|7=R9rG^Di!sa)sZCl&ctX4&LScQ-kMncgO(9o6W6)yd< z@Rk!vkja*X_N3H=BavGoR0@u0<}m-7|2v!0+2h~S2Q&a=lTH91OJsvms2MT~ zY=c@LO5i`mLpBd(vh|)I&^A3TQLtr>w=zoyzTd=^f@TPu&+*2MtqE$Avf>l>}V|3-8Fp2hzo3y<)hr_|NO(&oSD z!vEjTWBxbKTiShVl-U{n*B3#)3a8$`{~Pk}J@elZ=>Pqp|MQ}jrGv7KrNcjW%TN_< zZz8kG{#}XoeWf7qY?D)L)8?Q-b@Na&>i=)(@uNo zr;cH98T3$Iau8Hn*@vXi{A@YehxDE2zX~o+RY`)6-X{8~hMpc#C`|8y> zU8Mnv5A0dNCf{Ims*|l-^ z(MRp{qoGohB34|ggDI*p!Aw|MFyJ|v+<+E3brfrI)|+l3W~CQLPbnF@G0)P~Ly!1TJLp}xh8uW`Q+RB-v`MRYZ9Gam3cM%{ zb4Cb*f)0deR~wtNb*8w-LlIF>kc7DAv>T0D(a3@l`k4TFnrO+g9XH7;nYOHxjc4lq zMmaW6qpgAgy)MckYMhl?>sq;-1E)-1llUneeA!ya9KM$)DaNGu57Z5aE>=VST$#vb zFo=uRHr$0M{-ha>h(D_boS4zId;3B|Tpqo|?B?Z@I?G(?&Iei+-{9L_A9=h=Qfn-U z1wIUnQe9!z%_j$F_{rf&`ZFSott09gY~qrf@g3O=Y>vzAnXCyL!@(BqWa)Zqt!#_k zfZHuwS52|&&)aK;CHq9V-t9qt0au{$#6c*R#e5n3rje0hic7c7m{kW$p(_`wB=Gw7 z4k`1Hi;Mc@yA7dp@r~?@rfw)TkjAW++|pkfOG}0N|2guek}j8Zen(!+@7?qt_7ndX zB=BG6WJ31#F3#Vk3=aQr8T)3`{=p9nBHlKzE0I@v`{vJ}h8pd6vby&VgFhzH|q;=aonunAXL6G2y(X^CtAhWr*jI zGjpY@raZDQkg*aMq}Ni6cRF z{oWv}5`nhSAv>usX}m^GHt`f(t8@zHc?K|y5Zi=4G*UG1Sza{$Dpj%X8 zzEXaKT5N6F5j4J|w#qlZP!zS7BT)9b+!ZSJdToqJts1c!)fwih4d31vfb{}W)EgcA zH2pZ^8_k$9+WD2n`6q5XbOy8>3pcYH9 z07eUB+p}YD@AH!}p!iKv><2QF-Y^&xx^PAc1F13A{nUeCDg&{hnix#FiO!fe(^&%Qcux!h znu*S!s$&nnkeotYsDthh1dq(iQrE|#f_=xVgfiiL&-5eAcC-> z5L0l|DVEM$#ulf{bj+Y~7iD)j<~O8CYM8GW)dQGq)!mck)FqoL^X zwNdZb3->hFrbHFm?hLvut-*uK?zXn3q1z|UX{RZ;-WiLoOjnle!xs+W0-8D)kjU#R z+S|A^HkRg$Ij%N4v~k`jyHffKaC~=wg=9)V5h=|kLQ@;^W!o2^K+xG&2n`XCd>OY5Ydi= zgHH=lgy++erK8&+YeTl7VNyVm9-GfONlSlVb3)V9NW5tT!cJ8d7X)!b-$fb!s76{t z@d=Vg-5K_sqHA@Zx-L_}wVnc@L@GL9_K~Zl(h5@AR#FAiKad8~KeWCo@mgXIQ#~u{ zgYFwNz}2b6Vu@CP0XoqJ+dm8px(5W5-Jpis97F`+KM)TuP*X8H@zwiVKDKGVp59pI zifNHZr|B+PG|7|Y<*tqap0CvG7tbR1R>jn70t1X`XJixiMVcHf%Ez*=xm1(CrTSDt z0cle!+{8*Ja&EOZ4@$qhBuKQ$U95Q%rc7tg$VRhk?3=pE&n+T3upZg^ZJc9~c2es% zh7>+|mrmA-p&v}|OtxqmHIBgUxL~^0+cpfkSK2mhh+4b=^F1Xgd2)}U*Yp+H?ls#z zrLxWg_hm}AfK2XYWr!rzW4g;+^^&bW%LmbtRai9f3PjU${r@n`JThy-cphbcwn)rq9{A$Ht`lmYKxOacy z6v2R(?gHhD5@&kB-Eg?4!hAoD7~(h>(R!s1c1Hx#s9vGPePUR|of32bS`J5U5w{F) z>0<^ktO2UHg<0{oxkdOQ;}coZDQph8p6ruj*_?uqURCMTac;>T#v+l1Tc~%^k-Vd@ zkc5y35jVNc49vZpZx;gG$h{%yslDI%Lqga1&&;mN{Ush1c7p>7e-(zp}6E7f-XmJb4nhk zb8zS+{IVbL$QVF8pf8}~kQ|dHJAEATmmnrb_wLG}-yHe>W|A&Y|;muy-d^t^<&)g5SJfaTH@P1%euONny=mxo+C z4N&w#biWY41r8k~468tvuYVh&XN&d#%QtIf9;iVXfWY)#j=l`&B~lqDT@28+Y!0E+MkfC}}H*#(WKKdJJq=O$vNYCb(ZG@p{fJgu;h z21oHQ(14?LeT>n5)s;uD@5&ohU!@wX8w*lB6i@GEH0pM>YTG+RAIWZD;4#F1&F%Jp zXZUml2sH0!lYJT?&sA!qwez6cXzJEd(1ZC~kT5kZSp7(@=H2$Azb_*W&6aA|9iwCL zdX7Q=42;@dspHDwYE?miGX#L^3xD&%BI&fN9^;`v4OjQXPBaBmOF1;#C)8XA(WFlH zycro;DS2?(G&6wkr6rqC>rqDv3nfGw3hmN_9Al>TgvmGsL8_hXx09};l9Ow@)F5@y z#VH5WigLDwZE4nh^7&@g{1FV^UZ%_LJ-s<{HN*2R$OPg@R~Z`c-ET*2}XB@9xvAjrK&hS=f|R8Gr9 zr|0TGOsI7RD+4+2{ZiwdVD@2zmg~g@^D--YL;6UYGSM8i$NbQr4!c7T9rg!8;TM0E zT#@?&S=t>GQm)*ua|?TLT2ktj#`|R<_*FAkOu2Pz$wEc%-=Y9V*$&dg+wIei3b*O8 z2|m$!jJG!J!ZGbbIa!(Af~oSyZV+~M1qGvelMzPNE_%5?c2>;MeeG2^N?JDKjFYCy z7SbPWH-$cWF9~fX%9~v99L!G(wi!PFp>rB!9xj7=Cv|F+7CsGNwY0Q_J%FID%C^CBZQfJ9K(HK%k31j~e#&?hQ zNuD6gRkVckU)v+53-fc} z7ZCzYN-5RG4H7;>>Hg?LU9&5_aua?A0)0dpew1#MMlu)LHe(M;OHjHIUl7|%%)YPo z0cBk;AOY00%Fe6heoN*$(b<)Cd#^8Iu;-2v@>cE-OB$icUF9EEoaC&q8z9}jMTT2I z8`9;jT%z0;dy4!8U;GW{i`)3!c6&oWY`J3669C!tM<5nQFFrFRglU8f)5Op$GtR-3 zn!+SPCw|04sv?%YZ(a7#L?vsdr7ss@WKAw&A*}-1S|9~cL%uA+E~>N6QklFE>8W|% zyX-qAUGTY1hQ-+um`2|&ji0cY*(qN!zp{YpDO-r>jPk*yuVSay<)cUt`t@&FPF_&$ zcHwu1(SQ`I-l8~vYyUxm@D1UEdFJ$f5Sw^HPH7b!9 zzYT3gKMF((N(v0#4f_jPfVZ=ApN^jQJe-X$`A?X+vWjLn_%31KXE*}5_}d8 zw_B1+a#6T1?>M{ronLbHIlEsMf93muJ7AH5h%;i99<~JX^;EAgEB1uHralD*!aJ@F zV2ruuFe9i2Q1C?^^kmVy921eb=tLDD43@-AgL^rQ3IO9%+vi_&R2^dpr}x{bCVPej z7G0-0o64uyWNtr*loIvslyo0%)KSDDKjfThe0hcqs)(C-MH1>bNGBDRTW~scy_{w} zp^aq8Qb!h9Lwielq%C1b8=?Z=&U)ST&PHbS)8Xzjh2DF?d{iAv)Eh)wsUnf>UtXN( zL7=$%YrZ#|^c{MYmhn!zV#t*(jdmYdCpwqpZ{v&L8KIuKn`@IIZfp!uo}c;7J57N` zAxyZ-uA4=Gzl~Ovycz%MW9ZL7N+nRo&1cfNn9(1H5eM;V_4Z_qVann7F>5f>%{rf= zPBZFaV@_Sobl?Fy&KXyzFDV*FIdhS5`Uc~S^Gjo)aiTHgn#<0C=9o-a-}@}xDor;D zZyZ|fvf;+=3MZd>SR1F^F`RJEZo+|MdyJYQAEauKu%WDol~ayrGU3zzbHKsnHKZ*z zFiwUkL@DZ>!*x05ql&EBq@_Vqv83&?@~q5?lVmffQZ+V-=qL+!u4Xs2Z2zdCQ3U7B&QR9_Iggy} z(om{Y9eU;IPe`+p1ifLx-XWh?wI)xU9ik+m#g&pGdB5Bi<`PR*?92lE0+TkRuXI)z z5LP!N2+tTc%cB6B1F-!fj#}>S!vnpgVU~3!*U1ej^)vjUH4s-bd^%B=ItQqDCGbrEzNQi(dJ`J}-U=2{7-d zK8k^Rlq2N#0G?9&1?HSle2vlkj^KWSBYTwx`2?9TU_DX#J+f+qLiZCqY1TXHFxXZqYMuD@RU$TgcnCC{_(vwZ-*uX)~go#%PK z@}2Km_5aQ~(<3cXeJN6|F8X_1@L%@xTzs}$_*E|a^_URF_qcF;Pfhoe?FTFwvjm1o z8onf@OY@jC2tVcMaZS;|T!Ks(wOgPpRzRnFS-^RZ4E!9dsnj9sFt609a|jJbb1Dt@ z<=Gal2jDEupxUSwWu6zp<<&RnAA;d&4gKVG0iu6g(DsST(4)z6R)zDpfaQ}v{5ARt zyhwvMtF%b-YazR5XLz+oh=mn;y-Mf2a8>7?2v8qX;19y?b>Z5laGHvzH;Nu9S`B8} zI)qN$GbXIQ1VL3lnof^6TS~rvPVg4V?Dl2Bb*K2z4E{5vy<(@@K_cN@U>R!>aUIRnb zL*)=787*cs#zb31zBC49x$`=fkQbMAef)L2$dR{)6BAz!t5U_B#1zZG`^neKSS22oJ#5B=gl%U=WeqL9REF2g zZnfCb0?quf?Ztj$VXvDSWoK`0L=Zxem2q}!XWLoT-kYMOx)!7fcgT35uC~0pySEme z`{wGWTkGr7>+Kb^n;W?BZH6ZP(9tQX%-7zF>vc2}LuWDI(9kh1G#7B99r4x6;_-V+k&c{nPUrR zAXJGRiMe~aup{0qzmLNjS_BC4cB#sXjckx{%_c&^xy{M61xEb>KW_AG5VFXUOjAG4 z^>Qlm9A#1N{4snY=(AmWzatb!ngqiqPbBZ7>Uhb3)dTkSGcL#&SH>iMO-IJBPua`u zo)LWZ>=NZLr758j{%(|uQuZ)pXq_4c!!>s|aDM9#`~1bzK3J1^^D#<2bNCccH7~-X}Ggi!pIIF>uFx%aPARGQsnC8ZQc8lrQ5o~smqOg>Ti^GNme94*w z)JZy{_{#$jxGQ&`M z!OMvZMHR>8*^>eS%o*6hJwn!l8VOOjZQJvh)@tnHVW&*GYPuxqXw}%M!(f-SQf`=L z5;=5w2;%82VMH6Xi&-K3W)o&K^+vJCepWZ-rW%+Dc6X3(){z$@4zjYxQ|}8UIojeC zYZpQ1dU{fy=oTr<4VX?$q)LP}IUmpiez^O&N3E_qPpchGTi5ZM6-2ScWlQq%V&R2Euz zO|Q0Hx>lY1Q1cW5xHv5!0OGU~PVEqSuy#fD72d#O`N!C;o=m+YioGu-wH2k6!t<~K zSr`E=W9)!g==~x9VV~-8{4ZN9{~-A9zJpRe%NGg$+MDuI-dH|b@BD)~>pPCGUNNzY zMDg||0@XGQgw`YCt5C&A{_+J}mvV9Wg{6V%2n#YSRN{AP#PY?1FF1#|vO_%e+#`|2*~wGAJaeRX6=IzFNeWhz6gJc8+(03Ph4y6ELAm=AkN7TOgMUEw*N{= z_)EIDQx5q22oUR+_b*tazu9+pX|n1c*IB-}{DqIj z-?E|ks{o3AGRNb;+iKcHkZvYJvFsW&83RAPs1Oh@IWy%l#5x2oUP6ZCtv+b|q>jsf zZ_9XO;V!>n`UxH1LvH8)L4?8raIvasEhkpQoJ`%!5rBs!0Tu(s_D{`4opB;57)pkX z4$A^8CsD3U5*!|bHIEqsn~{q+Ddj$ME@Gq4JXtgVz&7l{Ok!@?EA{B3P~NAqb9)4? zkQo30A^EbHfQ@87G5&EQTd`frrwL)&Yw?%-W@uy^Gn23%j?Y!Iea2xw<-f;esq zf%w5WN@E1}zyXtYv}}`U^B>W`>XPmdLj%4{P298|SisrE;7HvXX;A}Ffi8B#3Lr;1 zHt6zVb`8{#+e$*k?w8|O{Uh|&AG}|DG1PFo1i?Y*cQm$ZwtGcVgMwtBUDa{~L1KT-{jET4w60>{KZ27vXrHJ;fW{6| z=|Y4!&UX020wU1>1iRgB@Q#m~1^Z^9CG1LqDhYBrnx%IEdIty z!46iOoKlKs)c}newDG)rWUikD%j`)p z_w9Ph&e40=(2eBy;T!}*1p1f1SAUDP9iWy^u^Ubdj21Kn{46;GR+hwLO=4D11@c~V zI8x&(D({K~Df2E)Nx_yQvYfh4;MbMJ@Z}=Dt3_>iim~QZ*hZIlEs0mEb z_54+&*?wMD`2#vsQRN3KvoT>hWofI_Vf(^C1ff-Ike@h@saEf7g}<9T`W;HAne-Nd z>RR+&SP35w)xKn8^U$7))PsM!jKwYZ*RzEcG-OlTrX3}9a{q%#Un5E5W{{hp>w~;` zGky+3(vJvQyGwBo`tCpmo0mo((?nM8vf9aXrrY1Ve}~TuVkB(zeds^jEfI}xGBCM2 zL1|#tycSaWCurP+0MiActG3LCas@_@tao@(R1ANlwB$4K53egNE_;!&(%@Qo$>h`^1S_!hN6 z)vZtG$8fN!|BXBJ=SI>e(LAU(y(i*PHvgQ2llulxS8>qsimv7yL}0q_E5WiAz7)(f zC(ahFvG8&HN9+6^jGyLHM~$)7auppeWh_^zKk&C_MQ~8;N??OlyH~azgz5fe^>~7F zl3HnPN3z-kN)I$4@`CLCMQx3sG~V8hPS^}XDXZrQA>}mQPw%7&!sd(Pp^P=tgp-s^ zjl}1-KRPNWXgV_K^HkP__SR`S-|OF0bR-N5>I%ODj&1JUeAQ3$9i;B~$S6}*^tK?= z**%aCiH7y?xdY?{LgVP}S0HOh%0%LI$wRx;$T|~Y8R)Vdwa}kGWv8?SJVm^>r6+%I z#lj1aR94{@MP;t-scEYQWc#xFA30^}?|BeX*W#9OL;Q9#WqaaM546j5j29((^_8Nu z4uq}ESLr~r*O7E7$D{!k9W>`!SLoyA53i9QwRB{!pHe8um|aDE`Cg0O*{jmor)^t)3`>V>SWN-2VJcFmj^1?~tT=JrP`fVh*t zXHarp=8HEcR#vFe+1a%XXuK+)oFs`GDD}#Z+TJ}Ri`FvKO@ek2ayn}yaOi%(8p%2$ zpEu)v0Jym@f}U|-;}CbR=9{#<^z28PzkkTNvyKvJDZe+^VS2bES3N@Jq!-*}{oQlz z@8bgC_KnDnT4}d#&Cpr!%Yb?E!brx0!eVOw~;lLwUoz#Np%d$o%9scc3&zPm`%G((Le|6o1 zM(VhOw)!f84zG^)tZ1?Egv)d8cdNi+T${=5kV+j;Wf%2{3g@FHp^Gf*qO0q!u$=m9 zCaY`4mRqJ;FTH5`a$affE5dJrk~k`HTP_7nGTY@B9o9vvnbytaID;^b=Tzp7Q#DmD zC(XEN)Ktn39z5|G!wsVNnHi) z%^q94!lL|hF`IijA^9NR0F$@h7k5R^ljOW(;Td9grRN0Mb)l_l7##{2nPQ@?;VjXv zaLZG}yuf$r$<79rVPpXg?6iiieX|r#&`p#Con2i%S8*8F}(E) zI5E6c3tG*<;m~6>!&H!GJ6zEuhH7mkAzovdhLy;)q z{H2*8I^Pb}xC4s^6Y}6bJvMu=8>g&I)7!N!5QG$xseeU#CC?ZM-TbjsHwHgDGrsD= z{%f;@Sod+Ch66Ko2WF~;Ty)v>&x^aovCbCbD7>qF*!?BXmOV3(s|nxsb*Lx_2lpB7 zokUnzrk;P=T-&kUHO}td+Zdj!3n&NR?K~cRU zAXU!DCp?51{J4w^`cV#ye}(`SQhGQkkMu}O3M*BWt4UsC^jCFUy;wTINYmhD$AT;4 z?Xd{HaJjP`raZ39qAm;%beDbrLpbRf(mkKbANan7XsL>_pE2oo^$TgdidjRP!5-`% zv0d!|iKN$c0(T|L0C~XD0aS8t{*&#LnhE;1Kb<9&=c2B+9JeLvJr*AyyRh%@jHej=AetOMSlz^=!kxX>>B{2B1uIrQyfd8KjJ+DBy!h)~*(!|&L4^Q_07SQ~E zcemVP`{9CwFvPFu7pyVGCLhH?LhEVb2{7U+Z_>o25#+3<|8%1T^5dh}*4(kfJGry} zm%r#hU+__Z;;*4fMrX=Bkc@7|v^*B;HAl0((IBPPii%X9+u3DDF6%bI&6?Eu$8&aWVqHIM7mK6?Uvq$1|(-T|)IV<>e?!(rY zqkmO1MRaLeTR=)io(0GVtQT@s6rN%C6;nS3@eu;P#ry4q;^O@1ZKCJyp_Jo)Ty^QW z+vweTx_DLm{P-XSBj~Sl<%_b^$=}odJ!S2wAcxenmzFGX1t&Qp8Vxz2VT`uQsQYtdn&_0xVivIcxZ_hnrRtwq4cZSj1c-SG9 z7vHBCA=fd0O1<4*=lu$6pn~_pVKyL@ztw1swbZi0B?spLo56ZKu5;7ZeUml1Ws1?u zqMf1p{5myAzeX$lAi{jIUqo1g4!zWLMm9cfWcnw`k6*BR^?$2(&yW?>w;G$EmTA@a z6?y#K$C~ZT8+v{87n5Dm&H6Pb_EQ@V0IWmG9cG=O;(;5aMWWrIPzz4Q`mhK;qQp~a z+BbQrEQ+w{SeiuG-~Po5f=^EvlouB@_|4xQXH@A~KgpFHrwu%dwuCR)=B&C(y6J4J zvoGk9;lLs9%iA-IJGU#RgnZZR+@{5lYl8(e1h6&>Vc_mvg0d@);X zji4T|n#lB!>pfL|8tQYkw?U2bD`W{na&;*|znjmalA&f;*U++_aBYerq;&C8Kw7mI z7tsG*?7*5j&dU)Lje;^{D_h`%(dK|pB*A*1(Jj)w^mZ9HB|vGLkF1GEFhu&rH=r=8 zMxO42e{Si6$m+Zj`_mXb&w5Q(i|Yxyg?juUrY}78uo@~3v84|8dfgbPd0iQJRdMj< zncCNGdMEcsxu#o#B5+XD{tsg*;j-eF8`mp~K8O1J!Z0+>0=7O=4M}E?)H)ENE;P*F z$Ox?ril_^p0g7xhDUf(q652l|562VFlC8^r8?lQv;TMvn+*8I}&+hIQYh2 z1}uQQaag&!-+DZ@|C+C$bN6W;S-Z@)d1|en+XGvjbOxCa-qAF*LA=6s(Jg+g;82f$ z(Vb)8I)AH@cdjGFAR5Rqd0wiNCu!xtqWbcTx&5kslzTb^7A78~Xzw1($UV6S^VWiP zFd{Rimd-0CZC_Bu(WxBFW7+k{cOW7DxBBkJdJ;VsJ4Z@lERQr%3eVv&$%)b%<~ zCl^Y4NgO}js@u{|o~KTgH}>!* z_iDNqX2(As7T0xivMH|3SC1ivm8Q}6Ffcd7owUKN5lHAtzMM4<0v+ykUT!QiowO;`@%JGv+K$bBx@*S7C8GJVqQ_K>12}M`f_Ys=S zKFh}HM9#6Izb$Y{wYzItTy+l5U2oL%boCJn?R3?jP@n$zSIwlmyGq30Cw4QBO|14` zW5c);AN*J3&eMFAk$SR~2k|&+&Bc$e>s%c{`?d~85S-UWjA>DS5+;UKZ}5oVa5O(N zqqc@>)nee)+4MUjH?FGv%hm2{IlIF-QX}ym-7ok4Z9{V+ZHVZQl$A*x!(q%<2~iVv znUa+BX35&lCb#9VE-~Y^W_f;Xhl%vgjwdjzMy$FsSIj&ok}L+X`4>J=9BkN&nu^E*gbhj3(+D>C4E z@Fwq_=N)^bKFSHTzZk?-gNU$@l}r}dwGyh_fNi=9b|n}J>&;G!lzilbWF4B}BBq4f zYIOl?b)PSh#XTPp4IS5ZR_2C!E)Z`zH0OW%4;&~z7UAyA-X|sh9@~>cQW^COA9hV4 zXcA6qUo9P{bW1_2`eo6%hgbN%(G-F1xTvq!sc?4wN6Q4`e9Hku zFwvlAcRY?6h^Fj$R8zCNEDq8`=uZB8D-xn)tA<^bFFy}4$vA}Xq0jAsv1&5!h!yRA zU()KLJya5MQ`q&LKdH#fwq&(bNFS{sKlEh_{N%{XCGO+po#(+WCLmKW6&5iOHny>g z3*VFN?mx!16V5{zyuMWDVP8U*|BGT$(%IO|)?EF|OI*sq&RovH!N%=>i_c?K*A>>k zyg1+~++zY4Q)J;VWN0axhoIKx;l&G$gvj(#go^pZskEVj8^}is3Jw26LzYYVos0HX zRPvmK$dVxM8(Tc?pHFe0Z3uq){{#OK3i-ra#@+;*=ui8)y6hsRv z4Fxx1c1+fr!VI{L3DFMwXKrfl#Q8hfP@ajgEau&QMCxd{g#!T^;ATXW)nUg&$-n25 zruy3V!!;{?OTobo|0GAxe`Acn3GV@W=&n;~&9 zQM>NWW~R@OYORkJAo+eq1!4vzmf9K%plR4(tB@TR&FSbDoRgJ8qVcH#;7lQub*nq&?Z>7WM=oeEVjkaG zT#f)=o!M2DO5hLR+op>t0CixJCIeXH*+z{-XS|%jx)y(j&}Wo|3!l7{o)HU3m7LYyhv*xF&tq z%IN7N;D4raue&&hm0xM=`qv`+TK@;_xAcGKuK(2|75~ar2Yw)geNLSmVxV@x89bQu zpViVKKnlkwjS&&c|-X6`~xdnh}Ps)Hs z4VbUL^{XNLf7_|Oi>tA%?SG5zax}esF*FH3d(JH^Gvr7Rp*n=t7frH!U;!y1gJB^i zY_M$KL_}mW&XKaDEi9K-wZR|q*L32&m+2n_8lq$xRznJ7p8}V>w+d@?uB!eS3#u<} zIaqi!b!w}a2;_BfUUhGMy#4dPx>)_>yZ`ai?Rk`}d0>~ce-PfY-b?Csd(28yX22L% zI7XI>OjIHYTk_@Xk;Gu^F52^Gn6E1&+?4MxDS2G_#PQ&yXPXP^<-p|2nLTb@AAQEY zI*UQ9Pmm{Kat}wuazpjSyXCdnrD&|C1c5DIb1TnzF}f4KIV6D)CJ!?&l&{T)e4U%3HTSYqsQ zo@zWB1o}ceQSV)<4G<)jM|@@YpL+XHuWsr5AYh^Q{K=wSV99D~4RRU52FufmMBMmd z_H}L#qe(}|I9ZyPRD6kT>Ivj&2Y?qVZq<4bG_co_DP`sE*_Xw8D;+7QR$Uq(rr+u> z8bHUWbV19i#)@@G4bCco@Xb<8u~wVDz9S`#k@ciJtlu@uP1U0X?yov8v9U3VOig2t zL9?n$P3=1U_Emi$#slR>N5wH-=J&T=EdUHA}_Z zZIl3nvMP*AZS9{cDqFanrA~S5BqxtNm9tlu;^`)3X&V4tMAkJ4gEIPl= zoV!Gyx0N{3DpD@)pv^iS*dl2FwANu;1;%EDl}JQ7MbxLMAp>)UwNwe{=V}O-5C*>F zu?Ny+F64jZn<+fKjF01}8h5H_3pey|;%bI;SFg$w8;IC<8l|3#Lz2;mNNik6sVTG3 z+Su^rIE#40C4a-587$U~%KedEEw1%r6wdvoMwpmlXH$xPnNQN#f%Z7|p)nC>WsuO= z4zyqapLS<8(UJ~Qi9d|dQijb_xhA2)v>la)<1md5s^R1N&PiuA$^k|A<+2C?OiHbj z>Bn$~t)>Y(Zb`8hW7q9xQ=s>Rv81V+UiuZJc<23HplI88isqRCId89fb`Kt|CxVIg znWcwprwXnotO>3s&Oypkte^9yJjlUVVxSe%_xlzmje|mYOVPH^vjA=?6xd0vaj0Oz zwJ4OJNiFdnHJX3rw&inskjryukl`*fRQ#SMod5J|KroJRsVXa5_$q7whSQ{gOi*s0 z1LeCy|JBWRsDPn7jCb4s(p|JZiZ8+*ExC@Vj)MF|*Vp{B(ziccSn`G1Br9bV(v!C2 z6#?eqpJBc9o@lJ#^p-`-=`4i&wFe>2)nlPK1p9yPFzJCzBQbpkcR>={YtamIw)3nt z(QEF;+)4`>8^_LU)_Q3 zC5_7lgi_6y>U%m)m@}Ku4C}=l^J=<<7c;99ec3p{aR+v=diuJR7uZi%aQv$oP?dn?@6Yu_+*^>T0ptf(oobdL;6)N-I!TO`zg^Xbv3#L0I~sn@WGk-^SmPh5>W+LB<+1PU}AKa?FCWF|qMNELOgdxR{ zbqE7@jVe+FklzdcD$!(A$&}}H*HQFTJ+AOrJYnhh}Yvta(B zQ_bW4Rr;R~&6PAKwgLWXS{Bnln(vUI+~g#kl{r+_zbngT`Y3`^Qf=!PxN4IYX#iW4 zucW7@LLJA9Zh3(rj~&SyN_pjO8H&)|(v%!BnMWySBJV=eSkB3YSTCyIeJ{i;(oc%_hk{$_l;v>nWSB)oVeg+blh=HB5JSlG_r7@P z3q;aFoZjD_qS@zygYqCn=;Zxjo!?NK!%J$ z52lOP`8G3feEj+HTp@Tnn9X~nG=;tS+z}u{mQX_J0kxtr)O30YD%oo)L@wy`jpQYM z@M>Me=95k1p*FW~rHiV1CIfVc{K8r|#Kt(ApkXKsDG$_>76UGNhHExFCw#Ky9*B-z zNq2ga*xax!HMf_|Vp-86r{;~YgQKqu7%szk8$hpvi_2I`OVbG1doP(`gn}=W<8%Gn z%81#&WjkH4GV;4u43EtSW>K_Ta3Zj!XF?;SO3V#q=<=>Tc^@?A`i;&`-cYj|;^ zEo#Jl5zSr~_V-4}y8pnufXLa80vZY4z2ko7fj>DR)#z=wWuS1$$W!L?(y}YC+yQ|G z@L&`2upy3f>~*IquAjkVNU>}c10(fq#HdbK$~Q3l6|=@-eBbo>B9(6xV`*)sae58*f zym~RRVx;xoCG3`JV`xo z!lFw)=t2Hy)e!IFs?0~7osWk(d%^wxq&>_XD4+U#y&-VF%4z?XH^i4w`TxpF{`XhZ z%G}iEzf!T(l>g;W9<~K+)$g!{UvhW{E0Lis(S^%I8OF&%kr!gJ&fMOpM=&=Aj@wuL zBX?*6i51Qb$uhkwkFYkaD_UDE+)rh1c;(&Y=B$3)J&iJfQSx!1NGgPtK!$c9OtJuu zX(pV$bfuJpRR|K(dp@^j}i&HeJOh@|7lWo8^$*o~Xqo z5Sb+!EtJ&e@6F+h&+_1ETbg7LfP5GZjvIUIN3ibCOldAv z)>YdO|NH$x7AC8dr=<2ekiY1%fN*r~e5h6Yaw<{XIErujKV~tiyrvV_DV0AzEknC- zR^xKM3i<1UkvqBj3C{wDvytOd+YtDSGu!gEMg+!&|8BQrT*|p)(dwQLEy+ zMtMzij3zo40)CA!BKZF~yWg?#lWhqD3@qR)gh~D{uZaJO;{OWV8XZ_)J@r3=)T|kt zUS1pXr6-`!Z}w2QR7nP%d?ecf90;K_7C3d!UZ`N(TZoWNN^Q~RjVhQG{Y<%E1PpV^4 z-m-K+$A~-+VDABs^Q@U*)YvhY4Znn2^w>732H?NRK(5QSS$V@D7yz2BVX4)f5A04~$WbxGOam22>t&uD)JB8-~yiQW6ik;FGblY_I>SvB_z2?PS z*Qm&qbKI{H1V@YGWzpx`!v)WeLT02};JJo*#f$a*FH?IIad-^(;9XC#YTWN6;Z6+S zm4O1KH=#V@FJw7Pha0!9Vb%ZIM$)a`VRMoiN&C|$YA3~ZC*8ayZRY^fyuP6$n%2IU z$#XceYZeqLTXw(m$_z|33I$B4k~NZO>pP6)H_}R{E$i%USGy{l{-jOE;%CloYPEU+ zRFxOn4;7lIOh!7abb23YKD+_-?O z0FP9otcAh+oSj;=f#$&*ExUHpd&e#bSF%#8*&ItcL2H$Sa)?pt0Xtf+t)z$_u^wZi z44oE}r4kIZGy3!Mc8q$B&6JqtnHZ>Znn!Zh@6rgIu|yU+zG8q`q9%B18|T|oN3zMq z`l&D;U!OL~%>vo&q0>Y==~zLiCZk4v%s_7!9DxQ~id1LLE93gf*gg&2$|hB#j8;?3 z5v4S;oM6rT{Y;I+#FdmNw z){d%tNM<<#GN%n9ox7B=3#;u7unZ~tLB_vRZ52a&2=IM)2VkXm=L+Iqq~uk#Dug|x z>S84e+A7EiOY5lj*!q?6HDkNh~0g;0Jy(al!ZHHDtur9T$y-~)94HelX1NHjXWIM7UAe}$?jiz z9?P4`I0JM=G5K{3_%2jPLC^_Mlw?-kYYgb7`qGa3@dn|^1fRMwiyM@Ch z;CB&o7&&?c5e>h`IM;Wnha0QKnEp=$hA8TJgR-07N~U5(>9vJzeoFsSRBkDq=x(YgEMpb=l4TDD`2 zwVJpWGTA_u7}?ecW7s6%rUs&NXD3+n;jB86`X?8(l3MBo6)PdakI6V6a}22{)8ilT zM~T*mU}__xSy|6XSrJ^%lDAR3Lft%+yxC|ZUvSO_nqMX!_ul3;R#*{~4DA=h$bP)%8Yv9X zyp><|e8=_ttI}ZAwOd#dlnSjck#6%273{E$kJuCGu=I@O)&6ID{nWF5@gLb16sj|&Sb~+du4e4O_%_o`Ix4NRrAsyr1_}MuP94s>de8cH-OUkVPk3+K z&jW)It9QiU-ti~AuJkL`XMca8Oh4$SyJ=`-5WU<{cIh+XVH#e4d&zive_UHC!pN>W z3TB;Mn5i)9Qn)#6@lo4QpI3jFYc0~+jS)4AFz8fVC;lD^+idw^S~Qhq>Tg(!3$yLD zzktzoFrU@6s4wwCMz}edpF5i5Q1IMmEJQHzp(LAt)pgN3&O!&d?3W@6U4)I^2V{;- z6A(?zd93hS*uQmnh4T)nHnE{wVhh(=MMD(h(P4+^p83Om6t<*cUW>l(qJzr%5vp@K zN27ka(L{JX=1~e2^)F^i=TYj&;<7jyUUR2Bek^A8+3Up*&Xwc{)1nRR5CT8vG>ExV zHnF3UqXJOAno_?bnhCX-&kwI~Ti8t4`n0%Up>!U`ZvK^w2+0Cs-b9%w%4`$+To|k= zKtgc&l}P`*8IS>8DOe?EB84^kx4BQp3<7P{Pq}&p%xF_81pg!l2|u=&I{AuUgmF5n zJQCTLv}%}xbFGYtKfbba{CBo)lWW%Z>i(_NvLhoQZ*5-@2l&x>e+I~0Nld3UI9tdL zRzu8}i;X!h8LHVvN?C+|M81e>Jr38%&*9LYQec9Ax>?NN+9(_>XSRv&6hlCYB`>Qm z1&ygi{Y()OU4@D_jd_-7vDILR{>o|7-k)Sjdxkjgvi{@S>6GqiF|o`*Otr;P)kLHN zZkpts;0zw_6;?f(@4S1FN=m!4^mv~W+lJA`&7RH%2$)49z0A+8@0BCHtj|yH--AEL z0tW6G%X-+J+5a{5*WKaM0QDznf;V?L5&uQw+yegDNDP`hA;0XPYc6e0;Xv6|i|^F2WB)Z$LR|HR4 zTQsRAby9(^Z@yATyOgcfQw7cKyr^3Tz7lc7+JEwwzA7)|2x+PtEb>nD(tpxJQm)Kn zW9K_*r!L%~N*vS8<5T=iv|o!zTe9k_2jC_j*7ik^M_ zaf%k{WX{-;0*`t`G!&`eW;gChVXnJ-Rn)To8vW-?>>a%QU1v`ZC=U)f8iA@%JG0mZ zDqH;~mgBnrCP~1II<=V9;EBL)J+xzCoiRBaeH&J6rL!{4zIY8tZka?_FBeQeNO3q6 zyG_alW54Ba&wQf{&F1v-r1R6ID)PTsqjIBc+5MHkcW5Fnvi~{-FjKe)t1bl}Y;z@< z=!%zvpRua>>t_x}^}z0<7MI!H2v6|XAyR9!t50q-A)xk0nflgF4*OQlCGK==4S|wc zRMsSscNhRzHMBU8TdcHN!q^I}x0iXJ%uehac|Zs_B$p@CnF)HeXPpB_Za}F{<@6-4 zl%kml@}kHQ(ypD8FsPJ2=14xXJE|b20RUIgs!2|R3>LUMGF6X*B_I|$`Qg=;zm7C z{mEDy9dTmPbued7mlO@phdmAmJ7p@GR1bjCkMw6*G7#4+`k>fk1czdJUB!e@Q(~6# zwo%@p@V5RL0ABU2LH7Asq^quDUho@H>eTZH9f*no9fY0T zD_-9px3e}A!>>kv5wk91%C9R1J_Nh!*&Kk$J3KNxC}c_@zlgpJZ+5L)Nw|^p=2ue}CJtm;uj*Iqr)K})kA$xtNUEvX;4!Px*^&9T_`IN{D z{6~QY=Nau6EzpvufB^hflc#XIsSq0Y9(nf$d~6ZwK}fal92)fr%T3=q{0mP-EyP_G z)UR5h@IX}3Qll2b0oCAcBF>b*@Etu*aTLPU<%C>KoOrk=x?pN!#f_Og-w+;xbFgjQ zXp`et%lDBBh~OcFnMKMUoox0YwBNy`N0q~bSPh@+enQ=4RUw1) zpovN`QoV>vZ#5LvC;cl|6jPr}O5tu!Ipoyib8iXqy}TeJ;4+_7r<1kV0v5?Kv>fYp zg>9L`;XwXa&W7-jf|9~uP2iyF5`5AJ`Q~p4eBU$MCC00`rcSF>`&0fbd^_eqR+}mK z4n*PMMa&FOcc)vTUR zlDUAn-mh`ahi_`f`=39JYTNVjsTa_Y3b1GOIi)6dY)D}xeshB0T8Eov5%UhWd1)u}kjEQ|LDo{tqKKrYIfVz~@dp!! zMOnah@vp)%_-jDTUG09l+;{CkDCH|Q{NqX*uHa1YxFShy*1+;J`gywKaz|2Q{lG8x zP?KBur`}r`!WLKXY_K;C8$EWG>jY3UIh{+BLv0=2)KH%P}6xE2kg)%(-uA6lC?u8}{K(#P*c zE9C8t*u%j2r_{;Rpe1A{9nNXU;b_N0vNgyK!EZVut~}+R2rcbsHilqsOviYh-pYX= zHw@53nlmwYI5W5KP>&`dBZe0Jn?nAdC^HY1wlR6$u^PbpB#AS&5L6zqrXN&7*N2Q` z+Rae1EwS)H=aVSIkr8Ek^1jy2iS2o7mqm~Mr&g5=jjt7VxwglQ^`h#Mx+x2v|9ZAwE$i_9918MjJxTMr?n!bZ6n$}y11u8I9COTU`Z$Fi z!AeAQLMw^gp_{+0QTEJrhL424pVDp%wpku~XRlD3iv{vQ!lAf!_jyqd_h}+Tr1XG| z`*FT*NbPqvHCUsYAkFnM`@l4u_QH&bszpUK#M~XLJt{%?00GXY?u_{gj3Hvs!=N(I z(=AuWPijyoU!r?aFTsa8pLB&cx}$*%;K$e*XqF{~*rA-qn)h^!(-;e}O#B$|S~c+U zN4vyOK0vmtx$5K!?g*+J@G1NmlEI=pyZXZ69tAv=@`t%ag_Hk{LP~OH9iE)I= zaJ69b4kuCkV0V zo(M0#>phpQ_)@j;h%m{-a*LGi(72TP)ws2w*@4|C-3+;=5DmC4s7Lp95%n%@Ko zfdr3-a7m*dys9iIci$A=4NPJ`HfJ;hujLgU)ZRuJI`n;Pw|yksu!#LQnJ#dJysgNb z@@qwR^wrk(jbq4H?d!lNyy72~Dnn87KxsgQ!)|*m(DRM+eC$wh7KnS-mho3|KE)7h zK3k;qZ;K1Lj6uEXLYUYi)1FN}F@-xJ z@@3Hb84sl|j{4$3J}aTY@cbX@pzB_qM~APljrjju6P0tY{C@ zpUCOz_NFmALMv1*blCcwUD3?U6tYs+N%cmJ98D%3)%)Xu^uvzF zS5O!sc#X6?EwsYkvPo6A%O8&y8sCCQH<%f2togVwW&{M;PR!a(ZT_A+jVAbf{@5kL zB@Z(hb$3U{T_}SKA_CoQVU-;j>2J=L#lZ~aQCFg-d<9rzs$_gO&d5N6eFSc z1ml8)P*FSi+k@!^M9nDWR5e@ATD8oxtDu=36Iv2!;dZzidIS(PCtEuXAtlBb1;H%Z zwnC^Ek*D)EX4#Q>R$$WA2sxC_t(!!6Tr?C#@{3}n{<^o;9id1RA&-Pig1e-2B1XpG zliNjgmd3c&%A}s>qf{_j#!Z`fu0xIwm4L0)OF=u(OEmp;bLCIaZX$&J_^Z%4Sq4GZ zPn6sV_#+6pJmDN_lx@1;Zw6Md_p0w9h6mHtzpuIEwNn>OnuRSC2=>fP^Hqgc)xu^4 z<3!s`cORHJh#?!nKI`Et7{3C27+EuH)Gw1f)aoP|B3y?fuVfvpYYmmukx0ya-)TQX zR{ggy5cNf4X|g)nl#jC9p>7|09_S7>1D2GTRBUTW zAkQ=JMRogZqG#v;^=11O6@rPPwvJkr{bW-Qg8`q8GoD#K`&Y+S#%&B>SGRL>;ZunM@49!}Uy zN|bBCJ%sO;@3wl0>0gbl3L@1^O60ONObz8ZI7nder>(udj-jt`;yj^nTQ$L9`OU9W zX4alF#$|GiR47%x@s&LV>2Sz2R6?;2R~5k6V>)nz!o_*1Y!$p>BC5&?hJg_MiE6UBy>RkVZj`9UWbRkN-Hk!S`=BS3t3uyX6)7SF#)71*}`~Ogz z1rap5H6~dhBJ83;q-Y<5V35C2&F^JI-it(=5D#v!fAi9p#UwV~2tZQI+W(Dv?1t9? zfh*xpxxO{-(VGB>!Q&0%^YW_F!@aZS#ucP|YaD#>wd1Fv&Z*SR&mc;asi}1G) z_H>`!akh-Zxq9#io(7%;a$)w+{QH)Y$?UK1Dt^4)up!Szcxnu}kn$0afcfJL#IL+S z5gF_Y30j;{lNrG6m~$Ay?)*V9fZuU@3=kd40=LhazjFrau>(Y>SJNtOz>8x_X-BlA zIpl{i>OarVGj1v(4?^1`R}aQB&WCRQzS~;7R{tDZG=HhgrW@B`W|#cdyj%YBky)P= zpxuOZkW>S6%q7U{VsB#G(^FMsH5QuGXhb(sY+!-R8Bmv6Sx3WzSW<1MPPN1!&PurYky(@`bP9tz z52}LH9Q?+FF5jR6-;|+GVdRA!qtd;}*-h&iIw3Tq3qF9sDIb1FFxGbo&fbG5n8$3F zyY&PWL{ys^dTO}oZ#@sIX^BKW*bon=;te9j5k+T%wJ zNJtoN1~YVj4~YRrlZl)b&kJqp+Z`DqT!la$x&&IxgOQw#yZd-nBP3!7FijBXD|IsU8Zl^ zc6?MKpJQ+7ka|tZQLfchD$PD|;K(9FiLE|eUZX#EZxhG!S-63C$jWX1Yd!6-Yxi-u zjULIr|0-Q%D9jz}IF~S%>0(jOqZ(Ln<$9PxiySr&2Oic7vb<8q=46)Ln%Z|<*z5&> z3f~Zw@m;vR(bESB<=Jqkxn(=#hQw42l(7)h`vMQQTttz9XW6^|^8EK7qhju4r_c*b zJIi`)MB$w@9epwdIfnEBR+?~);yd6C(LeMC& zn&&N*?-g&BBJcV;8&UoZi4Lmxcj16ojlxR~zMrf=O_^i1wGb9X-0@6_rpjPYemIin zmJb+;lHe;Yp=8G)Q(L1bzH*}I>}uAqhj4;g)PlvD9_e_ScR{Ipq|$8NvAvLD8MYr}xl=bU~)f%B3E>r3Bu9_t|ThF3C5~BdOve zEbk^r&r#PT&?^V1cb{72yEWH}TXEE}w>t!cY~rA+hNOTK8FAtIEoszp!qqptS&;r$ zaYV-NX96-h$6aR@1xz6_E0^N49mU)-v#bwtGJm)ibygzJ8!7|WIrcb`$XH~^!a#s& z{Db-0IOTFq#9!^j!n_F}#Z_nX{YzBK8XLPVmc&X`fT7!@$U-@2KM9soGbmOSAmqV z{nr$L^MBo_u^Joyf0E^=eo{Rt0{{e$IFA(#*kP@SQd6lWT2-#>` zP1)7_@IO!9lk>Zt?#CU?cuhiLF&)+XEM9B)cS(gvQT!X3`wL*{fArTS;Ak`J<84du zALKPz4}3nlG8Fo^MH0L|oK2-4xIY!~Oux~1sw!+It)&D3p;+N8AgqKI`ld6v71wy8I!eP0o~=RVcFQR2Gr(eP_JbSytoQ$Yt}l*4r@A8Me94y z8cTDWhqlq^qoAhbOzGBXv^Wa4vUz$(7B!mX`T=x_ueKRRDfg&Uc-e1+z4x$jyW_Pm zp?U;-R#xt^Z8Ev~`m`iL4*c#65Nn)q#=Y0l1AuD&+{|8-Gsij3LUZXpM0Bx0u7WWm zH|%yE@-#XEph2}-$-thl+S;__ciBxSSzHveP%~v}5I%u!z_l_KoW{KRx2=eB33umE zIYFtu^5=wGU`Jab8#}cnYry@9p5UE#U|VVvx_4l49JQ;jQdp(uw=$^A$EA$LM%vmE zvdEOaIcp5qX8wX{mYf0;#51~imYYPn4=k&#DsKTxo{_Mg*;S495?OBY?#gv=edYC* z^O@-sd-qa+U24xvcbL0@C7_6o!$`)sVr-jSJE4XQUQ$?L7}2(}Eixqv;L8AdJAVqc zq}RPgpnDb@E_;?6K58r3h4-!4rT4Ab#rLHLX?eMOfluJk=3i1@Gt1i#iA=O`M0@x! z(HtJP9BMHXEzuD93m|B&woj0g6T?f#^)>J>|I4C5?Gam>n9!8CT%~aT;=oco5d6U8 zMXl(=W;$ND_8+DD*?|5bJ!;8ebESXMUKBAf7YBwNVJibGaJ*(2G`F%wx)grqVPjudiaq^Kl&g$8A2 zWMxMr@_$c}d+;_B`#kUX-t|4VKH&_f^^EP0&=DPLW)H)UzBG%%Tra*5 z%$kyZe3I&S#gfie^z5)!twG={3Cuh)FdeA!Kj<-9** zvT*5%Tb`|QbE!iW-XcOuy39>D3oe6x{>&<#E$o8Ac|j)wq#kQzz|ATd=Z0K!p2$QE zPu?jL8Lb^y3_CQE{*}sTDe!2!dtlFjq&YLY@2#4>XS`}v#PLrpvc4*@q^O{mmnr5D zmyJq~t?8>FWU5vZdE(%4cuZuao0GNjp3~Dt*SLaxI#g_u>hu@k&9Ho*#CZP~lFJHj z(e!SYlLigyc?&5-YxlE{uuk$9b&l6d`uIlpg_z15dPo*iU&|Khx2*A5Fp;8iK_bdP z?T6|^7@lcx2j0T@x>X7|kuuBSB7<^zeY~R~4McconTxA2flHC0_jFxmSTv-~?zVT| zG_|yDqa9lkF*B6_{j=T>=M8r<0s;@z#h)3BQ4NLl@`Xr__o7;~M&dL3J8fP&zLfDfy z);ckcTev{@OUlZ`bCo(-3? z1u1xD`PKgSg?RqeVVsF<1SLF;XYA@Bsa&cY!I48ZJn1V<3d!?s=St?TLo zC0cNr`qD*M#s6f~X>SCNVkva^9A2ZP>CoJ9bvgXe_c}WdX-)pHM5m7O zrHt#g$F0AO+nGA;7dSJ?)|Mo~cf{z2L)Rz!`fpi73Zv)H=a5K)*$5sf_IZypi($P5 zsPwUc4~P-J1@^3C6-r9{V-u0Z&Sl7vNfmuMY4yy*cL>_)BmQF!8Om9Dej%cHxbIzA zhtV0d{=%cr?;bpBPjt@4w=#<>k5ee=TiWAXM2~tUGfm z$s&!Dm0R^V$}fOR*B^kGaipi~rx~A2cS0;t&khV1a4u38*XRUP~f za!rZMtay8bsLt6yFYl@>-y^31(*P!L^^s@mslZy(SMsv9bVoX`O#yBgEcjCmGpyc* zeH$Dw6vB5P*;jor+JOX@;6K#+xc)Z9B8M=x2a@Wx-{snPGpRmOC$zpsqW*JCh@M2Y z#K+M(>=#d^>Of9C`))h<=Bsy)6zaMJ&x-t%&+UcpLjV`jo4R2025 zXaG8EA!0lQa)|dx-@{O)qP6`$rhCkoQqZ`^SW8g-kOwrwsK8 z3ms*AIcyj}-1x&A&vSq{r=QMyp3CHdWH35!sad#!Sm>^|-|afB+Q;|Iq@LFgqIp#Z zD1%H+3I?6RGnk&IFo|u+E0dCxXz4yI^1i!QTu7uvIEH>i3rR{srcST`LIRwdV1P;W z+%AN1NIf@xxvVLiSX`8ILA8MzNqE&7>%jMzGt9wm78bo9<;h*W84i29^w!>V>{N+S zd`5Zmz^G;f=icvoOZfK5#1ctx*~UwD=ab4DGQXehQ!XYnak*dee%YN$_ZPL%KZuz$ zD;$PpT;HM^$KwtQm@7uvT`i6>Hae1CoRVM2)NL<2-k2PiX=eAx+-6j#JI?M}(tuBW zkF%jjLR)O`gI2fcPBxF^HeI|DWwQWHVR!;;{BXXHskxh8F@BMDn`oEi-NHt;CLymW z=KSv5)3dyzec0T5B*`g-MQ<;gz=nIWKUi9ko<|4I(-E0k$QncH>E4l z**1w&#={&zv4Tvhgz#c29`m|;lU-jmaXFMC11 z*dlXDMEOG>VoLMc>!rApwOu2prKSi*!w%`yzGmS+k(zm*CsLK*wv{S_0WX^8A-rKy zbk^Gf_92^7iB_uUF)EE+ET4d|X|>d&mdN?x@vxKAQk`O+r4Qdu>XGy(a(19g;=jU} zFX{O*_NG>!$@jh!U369Lnc+D~qch3uT+_Amyi}*k#LAAwh}k8IPK5a-WZ81ufD>l> z$4cF}GSz>ce`3FAic}6W4Z7m9KGO?(eWqi@L|5Hq0@L|&2flN1PVl}XgQ2q*_n2s3 zt5KtowNkTYB5b;SVuoXA@i5irXO)A&%7?V`1@HGCB&)Wgk+l|^XXChq;u(nyPB}b3 zY>m5jkxpZgi)zfbgv&ec4Zqdvm+D<?Im*mXweS9H+V>)zF#Zp3)bhl$PbISY{5=_z!8&*Jv~NYtI-g!>fDs zmvL5O^U%!^VaKA9gvKw|5?-jk>~%CVGvctKmP$kpnpfN{D8@X*Aazi$txfa%vd-|E z>kYmV66W!lNekJPom29LdZ%(I+ZLZYTXzTg*to~m?7vp%{V<~>H+2}PQ?PPAq`36R z<%wR8v6UkS>Wt#hzGk#44W<%9S=nBfB);6clKwnxY}T*w21Qc3_?IJ@4gYzC7s;WP zVQNI(M=S=JT#xsZy7G`cR(BP9*je0bfeN8JN5~zY(DDs0t{LpHOIbN);?T-69Pf3R zSNe*&p2%AwXHL>__g+xd4Hlc_vu<25H?(`nafS%)3UPP7_4;gk-9ckt8SJRTv5v0M z_Hww`qPudL?ajIR&X*;$y-`<)6dxx1U~5eGS13CB!lX;3w7n&lDDiArbAhSycd}+b zya_3p@A`$kQy;|NJZ~s44Hqo7Hwt}X86NK=(ey>lgWTtGL6k@Gy;PbO!M%1~Wcn2k zUFP|*5d>t-X*RU8g%>|(wwj*~#l4z^Aatf^DWd1Wj#Q*AY0D^V@sC`M zjJc6qXu0I7Y*2;;gGu!plAFzG=J;1%eIOdn zQA>J&e05UN*7I5@yRhK|lbBSfJ+5Uq;!&HV@xfPZrgD}kE*1DSq^=%{o%|LChhl#0 zlMb<^a6ixzpd{kNZr|3jTGeEzuo}-eLT-)Q$#b{!vKx8Tg}swCni>{#%vDY$Ww$84 zew3c9BBovqb}_&BRo#^!G(1Eg((BScRZ}C)Oz?y`T5wOrv);)b^4XR8 zhJo7+<^7)qB>I;46!GySzdneZ>n_E1oWZY;kf94#)s)kWjuJN1c+wbVoNQcmnv}{> zN0pF+Sl3E}UQ$}slSZeLJrwT>Sr}#V(dVaezCQl2|4LN`7L7v&siYR|r7M(*JYfR$ zst3=YaDw$FSc{g}KHO&QiKxuhEzF{f%RJLKe3p*7=oo`WNP)M(9X1zIQPP0XHhY3c znrP{$4#Ol$A0s|4S7Gx2L23dv*Gv2o;h((XVn+9+$qvm}s%zi6nI-_s6?mG! zj{DV;qesJb&owKeEK?=J>UcAlYckA7Sl+I&IN=yasrZOkejir*kE@SN`fk<8Fgx*$ zy&fE6?}G)d_N`){P~U@1jRVA|2*69)KSe_}!~?+`Yb{Y=O~_+@!j<&oVQQMnhoIRU zA0CyF1OFfkK44n*JD~!2!SCPM;PRSk%1XL=0&rz00wxPs&-_eapJy#$h!eqY%nS0{ z!aGg58JIJPF3_ci%n)QSVpa2H`vIe$RD43;#IRfDV&Ibit z+?>HW4{2wOfC6Fw)}4x}i1maDxcE1qi@BS*qcxD2gE@h3#4cgU*D-&3z7D|tVZWt= z-Cy2+*Cm@P4GN_TPUtaVyVesbVDazF@)j8VJ4>XZv!f%}&eO1SvIgr}4`A*3#vat< z_MoByL(qW6L7SFZ#|Gc1fFN)L2PxY+{B8tJp+pxRyz*87)vXR}*=&ahXjBlQKguuf zX6x<<6fQulE^C*KH8~W%ptpaC0l?b=_{~*U4?5Vt;dgM4t_{&UZ1C2j?b>b+5}{IF_CUyvz-@QZPMlJ)r_tS$9kH%RPv#2_nMb zRLj5;chJ72*U`Z@Dqt4$@_+k$%|8m(HqLG!qT4P^DdfvGf&){gKnGCX#H0!;W=AGP zbA&Z`-__a)VTS}kKFjWGk z%|>yE?t*EJ!qeQ%dPk$;xIQ+P0;()PCBDgjJm6Buj{f^awNoVx+9<|lg3%-$G(*f) zll6oOkN|yamn1uyl2*N-lnqRI1cvs_JxLTeahEK=THV$Sz*gQhKNb*p0fNoda#-&F zB-qJgW^g}!TtM|0bS2QZekW7_tKu%GcJ!4?lObt0z_$mZ4rbQ0o=^curCs3bJK6sq z9fu-aW-l#>z~ca(B;4yv;2RZ?tGYAU)^)Kz{L|4oPj zdOf_?de|#yS)p2v8-N||+XL=O*%3+y)oI(HbM)Ds?q8~HPzIP(vs*G`iddbWq}! z(2!VjP&{Z1w+%eUq^ '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 000000000..ac1b06f93 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..2622d49e0 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,13 @@ +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" +} +rootProject.name = "xap-java-sdk" +include("xap-sdk") +include("generator") diff --git a/specs/openapi-merge.json b/specs/openapi-merge.json deleted file mode 100644 index 99d08b075..000000000 --- a/specs/openapi-merge.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "inputs": [ - { - "inputFile": "./xap-hotel.specs.yaml" - }, - { - "inputFile": "./xap-lodging.specs.yaml", - "dispute": { - "prefix": "Lodging" - } - }, - { - "inputFile": "./xap-car.specs.yaml", - "dispute": { - "prefix": "Cars" - } - }, - { - "inputFile": "./xap-sdp-v1.specs.yaml", - "dispute": { - "prefix": "Sdp" - } - }, - { - "inputFile": "./xap-activity.specs.yaml", - "dispute": { - "prefix": "Activities" - } - } - ], - "output": "./specs.yaml" -} diff --git a/specs/xap-activity.specs.yaml b/specs/xap-activity.specs.yaml deleted file mode 100644 index 2fe34aff6..000000000 --- a/specs/xap-activity.specs.yaml +++ /dev/null @@ -1,1335 +0,0 @@ -openapi: 3.0.1 -info: - title: EWSActivity Apis specification - description: OpenAPI Spec for EWS Activity APIs - contact: - name: Partner APIs - url: https://confluence.expedia.biz/pages/viewpage.action?pageId=833040081 - email: autobots@expedia.com - version: v3 - x-eg-lifecycle: LIVE - x-eg-tags: ["Partner", "Activities", "EWS", "ActivitySearch", "ActivityDetails", "ActivityLinks"] -servers: - - url: 'https://apim.expedia.com' - description: Production Server -tags: - - name: Activities List - - name: Activities Details -paths: - /activities/listings: - get: - tags: - - Activities List - description: The Activities Search API allows partners to search for Expedia Activity inventory. - operationId: get-activity-listings - parameters: - - name: location - in: query - description: |- - Can be a city name, street address, three-letter IATA Airport Code or a landmark name. - (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) - schema: - type: string - example: shenzhen - - name: geoLocation - in: query - description: |- - The latitude and longitude values identifying the center point of a search radius (circle). - North latitude will be represented by a positive value. South latitude by a negative value. - East longitude will be represented by a positive value. West longitude by a negative value. - The latitude and longitude values are joined together with a comma (,) character. - schema: - type: string - example: 25.070062,-121.538306 - - name: startDate - in: query - description: |- - Start date for the activity window in YYY-MM-DD format. - If an endDate value is supplied there must also be a startDate. - default: currentDate - schema: - type: string - format: date - example: 2021-10-01 - - name: endDate - in: query - description: |- - End date for the activity window in YYY-MM-DD format. - default: "startDate+14" - schema: - type: string - format: date - example: 2021-10-10 - - name: locale - in: query - description: |- - locale is composed of language identifier and region identifier, connected by "_" that specifies the language in which the response will be returned. - example: "fr_FR" refers to French as spoken in France, while "fr_CA" refers to French as spoken in Canada. - For a full list of supported locales please refer to the link at the bottom of the page. - schema: - type: string - example: en_US - - name: links - in: query - description: |- - Comma-separated list to specify the types of HATEAOS links returned in the API Response. - WD (deep link URL to web infosite) - AD (details API query) - explode: false - schema: - type: array - items: - type: string - enum: - - WD - - AD - example: WD - - name: Key - in: header - description: |- - Unique identifier assigned to partner. - Required for all requests. - Obtained from Expedia Account Manager or representative. - required: true - schema: - type: string - example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X - - name: Partner-Transaction-Id - in: header - description: Partner-generated identifier. - required: true - schema: - type: string - example: BestTravel-123456-798101112 - responses: - '500': - description: |- - Server side error i.e connection timeout while talking to downstream services, downstream returned error. The server responds back with this Http " - + "response code and with the appropriate JSON error response. - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: '#/components/schemas/Errors' - '200': - description: successful - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: '#/components/schemas/ActivityListingsResponse' - example: - TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Count: 1 - Location: shenzhen, gd - StartDate: 2021-08-01 - EndDate: 2021-08-08 - Categories: - - Count: 1 - CategoryName: Cruises & Water Tours - CategoryDisplayName: Cruises & Water Tours - GroupName: Tours - GroupDisplayName: Tours - Activities: - - Id: 166597 - Title: 'Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. - Peter''s Tour' - Description: Enjoy 5 of Seattle's most popular attractions with a multi-ticket booklet that’s valid for 9 consecutive days. This pass is perfect if you want to explore the city on your schedule, craft your own itinerary, and visit the city’s can’t-miss museums and most iconi.. - Media: - - Type: "1" - Size: t - Url: http://a.travel-assets.com/ lxweb/ media-vault/ 166597_m.jpeg? v=104741 - Categories: - - Walking & Bike Tours - Duration: PT3H0M - CancellationPolicy: - FreeCancellation: true - Price: - Category: Adult - TotalRate: - Value: 100 - Currency: USD - ReferencePrice: - Category: Adult - TotalRate: - Value: 110 - Currency: USD - Savings: - percentage: 42 - amount: - Value: "9" - Currency: USD - Redemption: - Type: Voucherless - Locations: - - Address: - Address1: 99 Union St - City: Seattle - PostalCode: "431625" - Province: WA - Country: USA - GeoLocation: - Latitude: "47.60772" - Longitude: -122.33936 - Locations: - - Address: - Address1: 99 Union St - City: Seattle - PostalCode: "431625" - Province: WA - Country: USA - GeoLocation: - Latitude: "47.60772" - Longitude: -122.33936 - Supplier: - Name: City Wonders - RecommendationScore: 90 - ReviewCount: 100 - Links: - WebDetails: - Href: https://www.expedia.com/things-to-do/space-needle-observation-deck-admission.a193678.activity-details?srp=true&location=sea - ApiDetails: - Accept: application/vnd.exp-activity.v3+json - Method: GET - Href: https://apim.expedia.com/activities/details/CgUyMDIzMBIyCgkyMDEzMDQ1OTYSCTIwOTc3MjcwOBoCMjQqCjIwMTctMTEtMTkyCjIwMTctMTEtMjUqAwoBMg - '400': - description: |- - Client side error while providing the request i.e bad / invalid input parameters. The server responds back with " - + "this Http response code and with the appropriate JSON error response. - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: AMBIGUOUS_LOCATION - Description: Multiple search locations found. - LocationKeyword: 99UnionSt - LocationOptions: - - ShortName: Union Grove, Wisconsin, United States of America - Address: Milwaukee (and vicinity), Wisconsin, United States of America - RequestedLocation: 'United States' - Locations: - - Name: Portland (and vicinity) - LocationId: seat001 - TransactionId: cecf62c8-c103-4181-b09d-53c7190d1c48 - '404': - description: No Route matched - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - no Route matched: - value: |- - { - "message": "no Route matched with those values" - } - '429': - description: API rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - API rate limit exceeded: - value: |- - { - "message": "API rate limit exceeded" - } - '401': - description: Unauthorized or Invalid authentication credentials - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - unauthorized: - value: |- - { - "message": "Unauthorized" - } - Invalid authentication credentials: - value: |- - { - "message": "Invalid authentication credentials" - } - '403': - description: cannot consume this service - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - cannot consume this service: - value: |- - { - "message": "You cannot consume this service" - } - '503': - description: name resolution failed - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - name resolution failed: - value: |- - { - "message": "name resolution failed" - } - '504': - description: upstream server is timing out - content: - text/plain: - examples: - upstream server is timing out: - value: The upstream server is timing out - security: - - basicSchema: [] - /activities/details/{offerToken}: - get: - tags: - - Activities Details - description: The Activity Details API provides detailed information about one selected activity. - operationId: get-activity-details - parameters: - - name: offerToken - in: path - description: the offerToken of a activity - required: true - schema: - type: string - example: CgY0NzY2NzgSCjIwMjEtMDUtMDIaCjIwMjEtMDUtMDc - - name: locale - in: query - description: |- - locale is composed of language identifier and region identifier, connected by "_" that specifies the language - in which the response will be returned. - example: "fr_FR" refers to French as spoken in France, while "fr_CA" refers to French as spoken in Canada. - For a full list of supported locales please refer to the link at the bottom of the page. - schema: - type: string - example: en_US - - name: Key - in: header - description: |- - Unique identifier assigned to partner. - Required for all requests. - Obtained from Expedia Account Manager or representative. - required: true - schema: - type: string - example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X - - name: Partner-Transaction-Id - in: header - description: Partner-generated identifier. - required: true - schema: - type: string - example: BestTravel-123456-798101112 - responses: - '400': - description: |- - Client side error while providing the request i.e bad / invalid input parameters. The server responds back with " - + "this Http response code and with the appropriate JSON error response. - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: INVALID_LINKS - Description: 'Invalid links. Allowed value are:[WS, AD, WD].' - TransactionId: 583b7277-772a-4802-8ac7-bcdf978abbdb - '500': - description: |- - Server side error i.e connection timeout while talking to downstream services, downstream returned error. The server responds back with this Http " - + "response code and with the appropriate JSON error response. - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: '#/components/schemas/Errors' - '200': - description: successful - content: - application/vnd.exp-activity.v3+json: - schema: - $ref: '#/components/schemas/ActivityDetailsResponse' - example: - TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Count: 1 - Location: shenzhen, gd - StartDate: 2021-08-01 - EndDate: 2021-08-08 - Categories: - - Count: 1 - CategoryName: Cruises & Water Tours - CategoryDisplayName: Cruises & Water Tours - GroupName: Tours - GroupDisplayName: Tours - Activities: - - Id: 166597 - Title: 'Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. - Peter''s Tour' - Description: Enjoy 5 of Seattle's most popular attractions with a multi-ticket booklet that’s valid for 9 consecutive days. This pass is perfect if you want to explore the city on your schedule, craft your own itinerary, and visit the city’s can’t-miss museums and most iconi.. - Media: - - Type: "1" - Size: t - Url: http://a.travel-assets.com/ lxweb/ media-vault/ 166597_m.jpeg? v=104741 - Categories: - - Walking & Bike Tours - Duration: PT3H0M - CancellationPolicy: - FreeCancellation: true - Price: - Category: Adult - TotalRate: - Value: 100 - Currency: USD - ReferencePrice: - Category: Adult - TotalRate: - Value: 110 - Currency: USD - Savings: - percentage: 42 - amount: - Value: "9" - Currency: USD - Redemption: - Type: Voucherless - Locations: - - Address: - Address1: 99 Union St - City: Seattle - PostalCode: "431625" - Province: WA - Country: USA - GeoLocation: - Latitude: "47.60772" - Longitude: -122.33936 - Locations: - - Address: - Address1: 99 Union St - City: Seattle - PostalCode: "431625" - Province: WA - Country: USA - GeoLocation: - Latitude: "47.60772" - Longitude: -122.33936 - Supplier: - Name: City Wonders - RecommendationScore: 90 - ReviewCount: 100 - Links: - WebDetails: - Href: https://www.expedia.com/things-to-do/space-needle-observation-deck-admission.a193678.activity-details?srp=true&location=sea - ApiDetails: - Accept: application/vnd.exp-activity.v3+json - Method: GET - Href: https://apim.expedia.com/activities/details/CgUyMDIzMBIyCgkyMDEzMDQ1OTYSCTIwOTc3MjcwOBoCMjQqCjIwMTctMTEtMTkyCjIwMTctMTEtMjUqAwoBMg - '404': - description: No Route matched - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - no Route matched: - value: |- - { - "message": "no Route matched with those values" - } - '429': - description: API rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - API rate limit exceeded: - value: |- - { - "message": "API rate limit exceeded" - } - '401': - description: Unauthorized or Invalid authentication credentials - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - unauthorized: - value: |- - { - "message": "Unauthorized" - } - Invalid authentication credentials: - value: |- - { - "message": "Invalid authentication credentials" - } - '403': - description: cannot consume this service - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - cannot consume this service: - value: |- - { - "message": "You cannot consume this service" - } - '503': - description: name resolution failed - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - name resolution failed: - value: |- - { - "message": "name resolution failed" - } - '504': - description: upstream server is timing out - content: - text/plain: - examples: - upstream server is timing out: - value: The upstream server is timing out - security: - - basicSchema: [] -components: - schemas: - Money: - required: - - Currency - - Value - type: object - properties: - Value: - type: string - description: The value of the element being defined. - example: "21.9" - Currency: - type: string - description: The ISO 4217 Currency Code that the value is expressed in. - example: USD - LocalCurrencyPrice: - $ref: '#/components/schemas/Money' - description: Container for the discount amount. - Price: - required: - - TotalRate - type: object - properties: - Category: - type: string - description: |- - Type of passenger. - Values supported are: - ADULT | SENIOR | CHILD - example: ADULT - TotalRate: - $ref: '#/components/schemas/Money' - TotalFees: - $ref: '#/components/schemas/Money' - TotalTaxesAndFees: - $ref: '#/components/schemas/Money' - ReferencePrice: - $ref: '#/components/schemas/ReferencePrice' - Savings: - $ref: '#/components/schemas/Savings' - description: The price of the offer - ReferencePrice: - required: - - TotalRate - type: object - properties: - TotalRate: - $ref: '#/components/schemas/Money' - TotalFees: - $ref: '#/components/schemas/Money' - TotalTaxesAndFees: - $ref: '#/components/schemas/Money' - description: Container for the reference price used for strike out display. - Restrictions: - required: - - Max - - Min - - Type - type: object - properties: - Type: - type: string - description: Type of the Restriction. - example: AGE - Max: - type: string - description: Maximum value allowed for the restriction type. - example: "255" - Min: - type: string - description: Minimum value allowed for the restriction type. - example: "9" - Description: - type: string - description: The text to describe the restriction. - example: 9+ years - description: Container of the Restrictions associated to this ticket. - Savings: - required: - - Amount - - Percentage - type: object - properties: - Percentage: - type: integer - description: The percentage of the price that has been discounted off the regular price for the current activity. - format: int32 - example: 10 - Amount: - $ref: '#/components/schemas/Money' - description: Container of savings information. - Ticket: - required: - - Code - - Count - - Id - - TicketPrice - type: object - properties: - Id: - type: integer - description: The numerical identifier for the ticket. - format: int32 - example: 6429 - Code: - type: string - description: |- - The code for the ticket. - Values supported are: - Adult - Traveler - Child - Group - Senior - Infant - Student - example: Adult - Count: - type: integer - description: The number of each ticket type to be booked. - format: int32 - example: 1 - Restrictions: - $ref: '#/components/schemas/Restrictions' - TicketPrice: - $ref: '#/components/schemas/Price' - description: The list of Ticket information. - Address: - type: object - properties: - Address1: - type: string - description: Street Number, Street Name, or PO Box. - example: 724 Pine St - Address2: - type: string - description: Apartment, Floor, Suite, Bldg # or more specific information about Address1. - example: Second Floor - Suite: - type: string - description: Suite/apartment number - example: "123" - City: - type: string - description: The city - example: New York - Province: - type: string - description: The state or province. - example: NY - Country: - type: string - description: 3-letter code for the country. - example: USA - PostalCode: - type: string - description: Zip/postal code. - example: "98004" - description: Address information - Country: - required: - - IsoCode2 - - IsoCode3 - - Name - type: object - properties: - Name: - type: string - description: country name - example: Ireland - Code: - type: string - description: 3-letter code for the country - example: IRL - IsoCode2: - type: string - description: 2-letter code for the country - example: IE - IsoCode3: - type: string - description: 3-letter code for the country - example: IRL - description: Container for disambiguation country information - Error: - required: - - Code - - Description - type: object - properties: - Code: - type: string - description: Error code describing the issue - example: AMBIGUOUS_LOCATION - DetailCode: - type: string - description: Detailed error code describing the issue. - example: MULTIPLE_AMBIGUOUS_LOCATION - Description: - type: string - description: A simple description of what the error is. - example: 'Multiple pickup locations found. ' - LocationKeyword: - type: string - description: The requested location that caused the error. - example: 'Portland. ' - LocationOptions: - type: array - description: 'List for possible locations from which the customer must choose - the best one to be re-submitted in the request. ' - items: - $ref: '#/components/schemas/LocationOption' - description: Container for error list. - Errors: - required: - - Errors - - TransactionId - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: '#/components/schemas/Error' - TransactionId: - type: string - description: A unique identifier for the transaction. - example: a9e371c4-89d9-4f9c-8df7-df105830e7fe - xml: - name: ErrorResponse - GeoLocation: - required: - - Latitude - - Longitude - type: object - properties: - Latitude: - type: string - description: Latitude of the location. - example: "38.184978" - Longitude: - type: string - description: Longitude of the location. - example: "85.7412" - Obfuscated: - type: boolean - description: Geographic information - Location: - type: object - properties: - Type: - type: string - description: The type of location code (MULTICITY | METROCODE). - example: MULTICITY - Id: - type: string - description: Expedia Region ID of the specified airport. - example: "6139103" - Name: - type: string - description: Location Name - example: Seattle-Tacoma International Airport - Code: - type: string - description: Location Code - example: SEA - LocationId: - type: string - description: Location id. - example: SEAT001 - Address: - $ref: '#/components/schemas/Address' - PointOfInterest: - type: string - GeoLocation: - $ref: '#/components/schemas/GeoLocation' - Neighborhood: - $ref: '#/components/schemas/Neighborhood' - RegionId: - type: integer - description: RegionId the location resides in. - format: int64 - example: 6200275 - Country: - $ref: '#/components/schemas/Country' - description: List of location(s) where the activity will happen. - LocationOption: - required: - - Locations - - RequestedLocation - type: object - properties: - RequestedLocation: - type: string - description: Location used in partner request. - example: Paris - Locations: - type: array - description: Container for list of possible locations that could be used to disambiguate the query. - items: - $ref: '#/components/schemas/Location' - Type: - type: string - description: Type of the location. - example: TRAINSTATION - RegionId: - type: string - description: RegionId the location resides in. - example: "6200275" - ShortName: - type: string - description: The name of the location which matches the location keyword. - example: Dublin Connolly Station - AirportCode: - type: string - description: Indicates the nearest major airport to the location. - example: DUB - Address: - type: string - description: The address of the location. - example: Dublin Connolly Station, Ireland - Country: - $ref: '#/components/schemas/Country' - GeoLocation: - $ref: '#/components/schemas/GeoLocation' - description: 'List for possible locations from which the customer must choose - the best one to be re-submitted in the request. ' - Neighborhood: - required: - - Id - - Name - type: object - properties: - Id: - type: string - description: Neighborhood id. - example: "6160232" - Name: - type: string - description: Neighborhood name. - example: Le Pharo - description: Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. - Activity: - required: - - Categories - - Description - - Duration - - FreeCancellation - - Id - - Media - - Price - - Supplier - - Title - type: object - properties: - Id: - type: integer - description: The numerical identifier for this particular activity - format: int32 - example: 166597 - Title: - type: string - description: The display title for this activity. - example: 'Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. Peter''s - Tour' - Description: - type: string - description: The description of the Activity. - example: Enjoy 5 of Seattle's most popular attractions with a multi-ticket booklet that’s valid for 9 consecutive days. This pass is perfect if you want to explore the city on your schedule, craft your own itinerary, and visit the city’s can’t-miss museums and most iconi... - Media: - type: array - description: List of activity Media. - items: - $ref: '#/components/schemas/Media' - Categories: - type: array - description: |- - A list of the Activity categories to which this particular activity belongs. - Possible values are: - Adventures - Air, Balloon & Helicopter Tours - Attractions - Cruises & Water Tours - Day Trips & Excursions - Food & Drink - Hop-on Hop-off - Multi-Day & Extended Tours - Nightlife - Private Tours - Private Transfers - Shared Transfers - Show & Sport Tickets - Sightseeing Passes - Theme Parks - Tours & Sightseeing - Walking & Bike Tours - Water Activities - Wedding Ceremonies - Winter Activities - example: - - Walking & Bike Tours - items: - type: string - description: A list of the Activity categories to which this particular activity belongs. - example: Walking & Bike Tours - xml: - name: Categories - Duration: - type: string - description: |- - The anticipated time duration for the activity. - Using java jdk Duration parsing. - example: PT1H0M - FreeCancellation: - type: boolean - description: A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. - example: true - Price: - $ref: '#/components/schemas/Price' - Redemption: - $ref: '#/components/schemas/Redemption' - ActivityLocations: - type: array - description: Container of location information where activity happens. - items: - $ref: '#/components/schemas/Location' - Supplier: - $ref: '#/components/schemas/Supplier' - ReviewScore: - type: integer - description: The overall Expedia score for the activity. - format: int32 - example: 72 - ReviewCount: - type: integer - description: The number of Expedia reviews that went into the calculation of the ReviewScore. - format: int32 - example: 19 - Links: - type: object - additionalProperties: - $ref: '#/components/schemas/Link' - description: HATEOAS links included in this response. - xml: - wrapped: true - CancellationPolicy: - $ref: '#/components/schemas/CancellationPolicy' - Highlights: - type: array - description: Web formatted statement of the Highlight(s) for the activity. - items: - type: string - description: Web formatted statement of the Highlight(s) for the activity. - xml: - name: Highlights - TermsAndConditions: - type: array - description: Terms and Conditions for the Activity. - items: - type: string - description: Terms and Conditions for the Activity. - xml: - name: TermsAndConditions - Inclusions: - type: array - description: Web formatted statement of what is included in the activity - items: - type: string - description: Web formatted statement of what is included in the activity - xml: - name: Inclusions - Exclusions: - type: array - description: Web formatted statement of what is NOT included in the activity - items: - type: string - description: Web formatted statement of what is NOT included in the activity - xml: - name: Exclusions - KnowBeforeYouBook: - type: array - description: Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. - items: - type: string - description: Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. - xml: - name: KnowBeforeYouBook - KnowBeforeYouGo: - type: array - description: Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. - items: - type: string - description: Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. - xml: - name: KnowBeforeYouGo - Offers: - type: array - description: Offers for the activity. - items: - $ref: '#/components/schemas/Offer' - description: Detailed information on the Activity. - AvailableTimeSlot: - required: - - AllDayActivity - - CancellationPolicy - - DateTime - - Tickets - type: object - properties: - DateTime: - type: string - description: The date and time when the activity happens. - format: date-time - AllDayActivity: - type: boolean - description: Indicates whether the activity is an all-day activity. - example: true - CancellationPolicy: - $ref: '#/components/schemas/CancellationPolicy' - Tickets: - type: array - description: Container for ticket information. - items: - $ref: '#/components/schemas/Ticket' - description: The list of available Time Slots for the activity. - CancellationPolicy: - required: - - FreeCancellation - type: object - properties: - FreeCancellation: - type: boolean - description: Indicates whether the activity can be canceled free of charge within the cancellation window or not. - example: true - CancelPolicyDescription: - type: string - description: The description of Cancellation Policy. - example: 72 hours - FreeCancellationMinHours: - type: integer - description: The minimum number of hours before activity when the activity can still be cancelled for free. - format: int32 - example: 72 - FreeCancellationEndDateTime: - type: string - description: The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. - format: date-time - description: Container for the Cancellation Policy information. - Link: - required: - - Href - type: object - properties: - Accept: - type: string - description: Accept header. - Method: - type: string - description: HTTP method to connect. - example: GET - Href: - type: string - description: HATEOAS URL to fetch details. - description: Container of HATEOAS URL's - Media: - required: - - Size - - Type - - Url - type: object - properties: - Type: - type: string - description: |- - type of the media. So far there is only one option: - 1: Image - example: "1" - Title: - type: string - description: Image title - example: Guestroom - Size: - type: string - description: |- - Image size - You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. - example: t - Url: - type: string - description: Image URL - example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg - description: List of activity Media. - Offer: - required: - - AvailableTimeSlots - - Duration - - Id - - OfferPrice - - Title - type: object - properties: - Id: - type: integer - description: The numerical identifier for the offer. - format: int32 - example: 166597 - Title: - type: string - description: A descriptive title for this offer. - example: 8:30 AM, Tour in English - Description: - type: string - description: Description of this offer. - Duration: - type: string - description: The anticipated time duration for the activity, e xpressed using Java JDK duration format. - AvailableTimeSlots: - type: array - description: The list of available Time Slots for the activity. - items: - $ref: '#/components/schemas/AvailableTimeSlot' - OfferPrice: - $ref: '#/components/schemas/Price' - Links: - type: object - additionalProperties: - $ref: '#/components/schemas/Link' - description: Container of HATEOAS URL's - xml: - wrapped: true - description: Offers for the activity. - Phone: - required: - - CountryCode - - Number - type: object - properties: - CountryCode: - type: string - description: Country code of traveler's phone number; only digits allowed. - example: "1" - AreaCode: - type: string - description: Area code of traveler's phone number; only digits allowed. - example: "614" - Number: - type: string - description: Traveler's phone number; only digits allowed. - example: "9288472" - ExtensionNumber: - type: string - description: The phone of the company providing the activity. - Redemption: - type: object - properties: - Type: - type: string - description: The type of redemption process associated to the activity. - example: Voucherless - RedemptionLocations: - type: array - description: List of redemption locations where the activity will take place, please refer to Location Section below. - items: - $ref: '#/components/schemas/Location' - description: Container of redemption information. - Supplier: - required: - - Name - type: object - properties: - Name: - type: string - description: The name of the company providing the activity. - example: City Wonders - Phone: - $ref: '#/components/schemas/Phone' - description: The details information of company providing the activity. - Warning: - required: - - Code - - Description - type: object - properties: - Code: - type: string - description: Standardized warning code. - example: INVALID_CORPORATE_DISCOUNT_CODE - Description: - type: string - description: Standardized warning description message. - example: The Corporate DiscountCode '811490' is unavailable, but we found other rates for you. - OriginalPrice: - $ref: '#/components/schemas/Money' - NewPrice: - $ref: '#/components/schemas/Money' - ChangedAmount: - $ref: '#/components/schemas/Money' - ChangedPercentage: - type: string - description: |- - The changed percentage. - In the sample 2.97 means the changed percentage is 2.97%. - example: "2.97" - Links: - type: object - additionalProperties: - $ref: '#/components/schemas/Link' - xml: - wrapped: true - description: Container for all warnings generated during the transaction. - ActivityListingsResponse: - required: - - Count - - Location - - TransactionId - type: object - properties: - Warnings: - type: array - description: Container for all warnings generated during the transaction. - items: - $ref: '#/components/schemas/Warning' - TransactionId: - type: string - description: A unique identifier for this transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Count: - type: integer - description: The number of activities returned in the response. - format: int64 - example: 100 - Location: - type: string - description: The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. - example: shenzhen, dg - StartDate: - type: string - description: The startDate of the returned group of activities in YYYY-MM-DD format. - format: date - example: 2021-08-01 - EndDate: - type: string - description: The endDate of returned group of activities in YYYY-MM-DD format. - format: date - example: 2021-08-10 - Activities: - type: array - description: List of activities matching the search criteria. - items: - $ref: '#/components/schemas/Activity' - Categories: - type: array - description: Container for a breakdown of how many of each type of Activity have been returned in the API response. - items: - $ref: '#/components/schemas/CategoryGroup' - CategoryGroup: - required: - - CategoryName - - Count - - GroupDisplayName - - GroupName - type: object - properties: - Count: - type: integer - description: The count of the number of categories the returned set of activities map to. - format: int32 - example: 10 - GroupName: - type: string - description: |- - The group which the category belongs - Possible value is: - Recommendations - Tours - Activities - Transportation - Promotions - Duration - example: Tours - GroupDisplayName: - type: string - description: The localized value for category name. - example: Wander- und Fahrradtouren - CategoryName: - type: string - description: The name of one of the categories. - example: Walking & Bike Tours - CategoryDisplayName: - type: string - description: Container for a breakdown of how many of each type of Activity have been returned in the API response. - ActivityDetailsResponse: - required: - - Location - - TransactionId - type: object - properties: - Warnings: - type: array - description: Container for all warnings generated during the transaction. - items: - $ref: '#/components/schemas/Warning' - TransactionId: - type: string - description: A unique identifier for this transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Location: - type: string - description: The location user searched, translated into the full, unambiguous format. - example: shenzhen, dg - StartDate: - type: string - description: The startDate of activities in YYY-MM-DD format. - format: date - example: 2021-08-01 - EndDate: - type: string - description: The endDate of activities in YYY-MM-DD format. - format: date - example: 2021-08-01 - ActivityDetails: - $ref: '#/components/schemas/Activity' - APIMError: - title: APIMError - properties: - message: - type: string - securitySchemes: - basicSchema: - type: http - scheme: basic diff --git a/specs/xap-car.specs.yaml b/specs/xap-car.specs.yaml deleted file mode 100644 index 777c6dcfb..000000000 --- a/specs/xap-car.specs.yaml +++ /dev/null @@ -1,1633 +0,0 @@ -openapi: 3.0.1 -info: - title: EWSCar API - description: EWSCar API allow users search cars and check car details. - contact: - name: EWSCar team - url: 'https://confluence.expedia.biz/display/EWS/EWS+Car' - email: autobots@expedia.com - version: v3 - x-eg-lifecycle: LIVE - x-eg-api-tags: - - EWS - - XAP - - Cars - - CarSearch - - CarDetails -tags: - - name: Cars Listings - - name: Cars Detail -servers: - - url: 'https://apim.expedia.com' - description: Production Server -paths: - /cars/listings: - get: - tags: ["Cars Listings"] - summary: Search Expedia car inventory - description: 'Search Expedia car inventory by date, pickup, and dropoff location to return a listing of available cars for hire.' - operationId: get-cars-listings - parameters: - - name: key - in: header - description: Unique identifier assigned to partner. - required: true - schema: - type: string - example: 11111111-2222-3333-4444-555555555555 - - name: Partner-Transaction-Id - in: header - description: '[Not consumed by Expedia] Partner-generated identifier.' - required: true - schema: - type: string - example: BestTravel-123456-798101112 - - name: pickup.airport - in: query - description: 'Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request.' - schema: - type: string - example: SEA - - name: pickup.city - in: query - description: 'The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request.' - schema: - type: string - - name: pickup.address - in: query - description: 'The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request.' - schema: - type: string - example: Seattle - - name: pickup.geoLocation - in: query - description: 'The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request.' - schema: - type: string - example: 111.00,-22.00 - - name: pickup.radius - in: query - description: 'Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See '' unit'' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.' - schema: - type: integer - example: 10 - - name: dropOff.airport - in: query - description: 'Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up.' - schema: - type: string - example: SEA - - name: dropOff.city - in: query - description: 'City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up.' - schema: - type: string - - name: dropOff.address - in: query - description: 'Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up.' - schema: - type: string - example: Seattle - - name: dropOff.geoLocation - in: query - description: 'Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up.' - schema: - type: string - example: 111.00,-22.00 - - name: dropOff.radius - in: query - description: 'Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See '' unit'' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same.' - schema: - type: integer - example: 10 - - name: pickupTime - in: query - description: 'Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.)' - required: true - schema: - type: string - format: date-time - example: '2021-06-05T10:00' - - name: dropOffTime - in: query - description: 'Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid.' - required: true - schema: - type: string - format: date-time - example: '2021-06-06T10:00' - - name: sortType - in: query - description: 'Method of sorting the car search results.Supported value: Price.If no value is present a sort by ''price'' will be assumed.' - schema: - type: string - enum: - - Price - - name: sortOrder - in: query - description: 'Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of ''ascending'' will be assumed.' - schema: - type: string - enum: - - ASC - - DESC - - name: limit - in: query - description: The maximum number of search results that will be returned by the query. - schema: - type: integer - example: 100 - - name: suppliers - in: query - description: 'A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier.' - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - example: - - 11 - - 12 - - name: carClasses - in: query - description: A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - example: 'economy' - - name: discount1.supplier - in: query - description: 'Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.' - schema: - type: string - example: Avis - - name: discount1.type - in: query - description: 'The type of discount to be applied.Supported values: CorpDiscount | Coupon.' - schema: - type: string - enum: - - CorpDiscount - - Coupon - - name: discount1.code - in: query - description: The code of the discount to be applied. - schema: - type: string - example: GB1234 - - name: transmissions - in: query - description: A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: airConditioning - in: query - description: Specify whether to filter for cars that include or exclude air conditioning. - schema: - type: boolean - - name: carTypes - in: query - description: A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - example: C,E - - name: unit - in: query - description: 'The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM.' - schema: - type: string - enum: - - KM - - MI - - name: driverAge - in: query - description: The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. - schema: - type: integer - example: 18 - - name: links - in: query - description: 'WS = WebSearch, AD = ApiDetails, WD = WebDetails' - explode: false - schema: - type: array - items: - type: string - enum: - - WS - - AD - - WD - - name: source - in: query - description: 'Indicates the source where the request is coming from.The available values for the source as below:browser - The value "browser" represents that the client is traditional website.mobile - The value "mobile" represents that the client is mobile.all - The value "all" indicates that the client includes both browser and mobile.Only one source value may be used at a time.' - schema: - type: string - enum: - - browser - - mobile - - all - responses: - '200': - description: car listing response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: '#/components/schemas/CarListingsResponse' - application/vnd.exp-car.v3+xml: - schema: - $ref: '#/components/schemas/CarListingsResponse' - '400': - description: errors response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: '#/components/schemas/Errors' - examples: - Errors: - description: Errors - value: - Errors: - - Code: INVALID_LINKS - Description: 'Invalid links. Allowed value are:[WS, AD, WD].' - TransactionId: 583b7277-772a-4802-8ac7-bcdf978abbdb - application/vnd.exp-car.v3+xml: - schema: - $ref: '#/components/schemas/DisambiguationResponse' - examples: - DisambiguationResponse: - description: DisambiguationResponse - value: - Errors: - - Code: AMBIGUOUS_LOCATION - DetailCode: MULTIPLE_AMBIGUOUS_PICKUP_LOCATION - Description: Multiple pickup locations found. - LocationKeyword: portland - LocationOptions: - - Type: MULTICITY - RequestedLocation: 'Portland (and vicinity)' - Locations: - - Name: Portland (and vicinity) - LocationId: seat001 - RegionId: '178299' - ShortName: Portland (and vicinity) - AirportCode: PDX - Address: 'Portland (and vicinity), Oregon, United States Of America' - Country: - Name: United States of America - IsoCode2: US - IsoCode3: USA - GeoLocation: - Latitude: '45.516740' - Longitude: '-122.680950' - - Type: CITY - RequestedLocation: 'Portland (and vicinity)' - Locations: - - Name: Portland (and vicinity) - LocationId: seat001 - RegionId: '6174134' - ShortName: Downtown Portland - AirportCode: PWM - Address: 'Downtown Portland, Portland, Maine, United States of America' - Country: - Name: United States of America - IsoCode2: US - IsoCode3: USA - GeoLocation: - Latitude: '43.655764' - Longitude: '-70.255458' - TransactionId: 81e0a6d6-8ca9-4adf-a1c8-08ba0d11dcef - '401': - description: Unauthorized or Invalid authentication credentials - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - unauthorized: - value: '{message":"Unauthorized"}' - Invalid authentication credentials: - value: '{"message":"Invalid authentication credentials"}' - '403': - description: cannot consume this service - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - cannot consume this service: - value: '{"message":"You cannot consume this service"}' - '404': - description: No Route matched - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - no Route matched: - value: '{"message":"no Route matched with those values"}' - '429': - description: API rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - API rate limit exceeded: - value: '{"message":"API rate limit exceeded"}' - '503': - description: service unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - name resolution failed: - value: '{"message":"name resolution failed"}' - '504': - description: upstream server is timing out - content: - text/plain: - examples: - upstream server is timing out: - value: The upstream server is timing out - security: - - basicAuth: [] - /cars/details/{offerToken}: - get: - tags: ["Cars Detail"] - summary: Get Extended information with a single car offer - description: 'Extended information about the rates, charges, fees, and other terms associated with a single car offer.' - operationId: get-car-details - parameters: - - name: key - in: header - description: Unique identifier assigned to partner. - required: true - schema: - type: string - example: 11111111-2222-3333-4444-555555555555 - - name: Partner-Transaction-Id - in: header - description: '[Not consumed by Expedia] Partner-generated identifier.' - required: true - schema: - type: string - example: BestTravel-123456-798101112 - - name: price - in: query - description: The total price for the product. - required: true - schema: - type: string - - name: currency - in: query - description: Price currency code - required: true - schema: - type: string - example: USD - - name: source - in: query - description: source mobile - The value mobile represents that the client is mobile. - schema: - type: string - example: mobile - - name: offerToken - in: path - description: car offer token - required: true - schema: - type: string - example: OFHSDJSJDFLJSDLKFJSDLJFLSDJFLSJDFL - responses: - '200': - description: car details successful response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: '#/components/schemas/CarDetailsResponse' - application/vnd.exp-car.v3+xml: - schema: - $ref: '#/components/schemas/CarDetailsResponse' - '400': - description: car details user fault response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: '#/components/schemas/Errors' - application/vnd.exp-car.v3+xml: - schema: - $ref: '#/components/schemas/Errors' - '401': - description: Unauthorized or Invalid authentication credentials - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - unauthorized: - value: '{message":"Unauthorized"}' - Invalid authentication credentials: - value: '{"message":"Invalid authentication credentials"}' - '403': - description: cannot consume this service - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - cannot consume this service: - value: '{"message":"You cannot consume this service"}' - '404': - description: No Route matched - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - no Route matched: - value: '{"message":"no Route matched with those values"}' - '429': - description: API rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - API rate limit exceeded: - value: '{"message":"API rate limit exceeded"}' - '500': - description: car details application error response - content: - application/vnd.exp-car.v3+json: - schema: - $ref: '#/components/schemas/Errors' - application/vnd.exp-car.v3+xml: - schema: - $ref: '#/components/schemas/Errors' - '503': - description: service unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - name resolution failed: - value: '{"message":"name resolution failed"}' - '504': - description: upstream server is timing out - content: - text/plain: - examples: - upstream server is timing out: - value: The upstream server is timing out - security: - - basicAuth: [] -components: - schemas: - AdditionalFee: - required: - - Amount - - FinanceCategory - - FinanceSubCategory - - IsRequired - type: object - properties: - IsRequired: - type: boolean - description: Indicates whether this additional fee is mandatory. - example: true - FinanceCategory: - type: string - description: Category of the fee / Coverages - example: Fee - FinanceSubCategory: - type: string - description: Sub category of the fee / Coverages . - example: Drop - Amount: - $ref: '#/components/schemas/Money' - Description: - type: string - description: Description of the fee. - example: DropOffCharge - Deductible: - $ref: '#/components/schemas/Deductible' - description: List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - Address: - required: - - Address1 - - City - - Country - type: object - properties: - Address1: - type: string - description: 'Street Number, Street Name, or PO Box' - example: 724 Pine St - Address2: - type: string - description: 'Apartment, Floor, Suite, Bldg # or more specific information about Address1.' - example: Second Floor - Suite: - type: string - description: Suite/apartment number - example: '123' - City: - type: string - description: The city - example: New York - Province: - type: string - description: The state or province - example: NY - Country: - type: string - description: 3-letter code for the country - example: USA - PostalCode: - type: string - description: Zip/postal code - example: '98004' - description: Address information - CancellationPolicy: - type: object - properties: - Cancellable: - type: boolean - description: Indicates if this car can be cancelled (free cancel or penalty cancel) - example: true - FreeCancellation: - type: boolean - description: Indicates if this car may be cancelled without a penalty. - example: true - FreeCancellationEndDateTime: - type: string - description: Indicates the latest time that the car can be cancelled for free. - format: date-time - PenaltyRules: - type: array - description: Container for penalty rules - items: - $ref: '#/components/schemas/PenaltyRule' - NonCancellableDateTimeRange: - $ref: '#/components/schemas/NonCancellableDateTimeRange' - description: Cancellation Policy Container. - Capacity: - required: - - AdultCount - type: object - properties: - AdultCount: - type: integer - description: The typical number of adults that can fit comfortably in the car. - format: int64 - example: 4 - ChildCount: - type: integer - description: The typical number of children that can fit comfortably in the car. - format: int64 - example: 0 - SmallLuggageCount: - type: integer - description: The typical number of small pieces of luggage that fit in the cargo space. - format: int64 - example: 2 - LargeLuggageCount: - type: integer - description: The typical number of large pieces of luggage that fit in the cargo space. - format: int64 - example: 2 - description: Capacity for car's properties. - Car: - required: - - CancellationPolicy - - DropOffDetails - - Id - - PickupDetails - - Price - - Supplier - - VehicleDetails - type: object - properties: - Id: - type: string - description: 'Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking.' - example: ECAR-39--1Trip-SEAC005-SEAC005 - DataTimeStamp: - type: string - description: DataTimeStamp - format: date-time - example: '2021-03-09T07:08:00Z' - OnlineCheckIn: - type: boolean - description: Indicate whether the supplier supports online checkin - example: true - SkipTheCounter: - type: boolean - description: Indicate whether the supplier supports skip the counter - example: true - VehicleDetails: - $ref: '#/components/schemas/VehicleDetails' - Supplier: - $ref: '#/components/schemas/Supplier' - PickupDetails: - $ref: '#/components/schemas/VendorLocationDetails' - DropOffDetails: - $ref: '#/components/schemas/VendorLocationDetails' - Links: - type: object - additionalProperties: - $ref: '#/components/schemas/Link' - description: A map of links to other Car APIs or Expedia websites. - xml: - wrapped: true - RateDetails: - $ref: '#/components/schemas/RateDetails' - Price: - $ref: '#/components/schemas/Price' - ReferencePrice: - $ref: '#/components/schemas/Money' - AdditionalFees: - type: array - description: List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - items: - $ref: '#/components/schemas/AdditionalFee' - CancellationPolicy: - $ref: '#/components/schemas/CancellationPolicy' - NoShowPenalty: - $ref: '#/components/schemas/PenaltyType' - Images: - type: array - description: List of image resources of the car product. - items: - $ref: '#/components/schemas/Image' - Rating: - $ref: '#/components/schemas/RatingWithoutDetails' - description: List of cars matching the search criteria. - CarCategory: - required: - - Code - - Value - type: object - properties: - Code: - type: string - description: Car category code. - example: M - Value: - type: string - description: Car category value. - example: Mini - description: 'Car category. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115008631767' - CarListingsResponse: - required: - - CarCount - - TransactionId - type: object - properties: - Warnings: - type: array - description: Container for warning codes - items: - $ref: '#/components/schemas/Warning' - TransactionId: - type: string - description: A unique identifier for this transaction. - example: 1111111-2222-3333-4444-55555555555 - CarCount: - type: integer - description: The number of cars offers returned in the response. - format: int64 - example: 1 - Cars: - type: array - description: List of cars matching the search criteria. - items: - $ref: '#/components/schemas/Car' - xml: - name: CarListingsResponse - CarType: - required: - - Code - - Value - type: object - properties: - Code: - type: string - description: Car type code. - example: C - Value: - type: string - description: Car type value. - example: 2/4 Door - description: 'Car type. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115002516708' - Country: - required: - - IsoCode2 - - IsoCode3 - - Name - type: object - properties: - Name: - type: string - description: country name - example: Ireland - Code: - type: string - description: 3-letter code for the country - example: IRL - IsoCode2: - type: string - description: 2-letter code for the country - example: IE - IsoCode3: - type: string - description: 3-letter code for the country - example: IRL - description: Container for disambiguation country information - DateRange: - required: - - EndDate - - StartDate - type: object - properties: - StartDate: - type: string - description: Start date at pickup location of the period. - format: date - example: '2021-06-27' - EndDate: - type: string - description: End date at pickup location of the period. - format: date - example: '2021-06-28' - description: Date range of the period. - DateTimePeriod: - required: - - DateRange - type: object - properties: - DateRange: - $ref: '#/components/schemas/DateRange' - TimeRanges: - type: array - description: A list of time range to indicate the operation hours of the date range. - items: - $ref: '#/components/schemas/TimeRange' - description: A List of date time periods to indicate the vendor business hours for the pickup time. - Deductible: - type: object - properties: - ExcessAmount: - $ref: '#/components/schemas/Money' - LiabilityAmount: - $ref: '#/components/schemas/Money' - DeductibleAmount: - $ref: '#/components/schemas/Money' - description: Indicate whether it is deductible - Discount: - required: - - Code - - Type - type: object - properties: - Type: - type: string - description: 'Discount type. Supported values : CorpDiscount | Coupon.' - example: CorpDiscount - Code: - type: string - description: Discount code. - example: G811490 - description: List of discount information. - Distance: - required: - - Value - type: object - properties: - Value: - type: string - description: The number of miles/kilometers of the distance (specified by the Unit). - example: '75' - Unit: - type: string - description: The unit (KM or MI) for the distance. - example: KM - Direction: - type: string - description: 'The direction of the location from the search ''center''.Possible values are: N,S,W,E,NW,NE,SW,SE' - example: 'N' - description: The extra distance information. - ExtraCostPerDistance: - required: - - Cost - - Distance - type: object - properties: - Distance: - $ref: '#/components/schemas/Distance' - Cost: - $ref: '#/components/schemas/Money' - description: Extra cost for each increment of distance used. - FuelAC: - required: - - Code - - Value - type: object - properties: - Code: - type: string - description: Car FuelAC code. - example: D - Value: - type: string - description: Car FuelAC value. - example: Diesel Air - description: 'Car fuel type and whether Air Conditioning is included. Please find list of Car Fuel AC Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005378328' - GeoLocation: - required: - - Latitude - - Longitude - type: object - properties: - Latitude: - type: string - description: Latitude of the location. - example: '38.184978' - Longitude: - type: string - description: Longitude of the location. - example: '85.7412' - Obfuscated: - type: boolean - description: Container for Geo location. - Image: - required: - - Href - - Size - - Type - type: object - properties: - Type: - type: string - description: 'Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide)' - Size: - type: string - description: 'Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide)' - Href: - type: string - description: URL for the image. - description: List of image resources of the car product. - Link: - required: - - Href - type: object - properties: - Accept: - type: string - description: Accept header. - Method: - type: string - description: HTTP method to connect. - example: GET - Href: - type: string - description: HATEOAS URL to fetch details. - description: 'A map of links to other Car APIs. possible link name: ApiBooking' - Location: - required: - - LocationId - type: object - properties: - Type: - type: string - description: The type of location code (MULTICITY | METROCODE). - example: MULTICITY - Id: - type: string - description: Expedia Region ID of the specified airport. - example: '6139103' - Name: - type: string - description: Location Name - example: Seattle-Tacoma International Airport - Code: - type: string - description: Location Code - example: SEA - LocationId: - type: string - description: Location id. - example: SEAT001 - Address: - $ref: '#/components/schemas/Address' - PointOfInterest: - type: string - GeoLocation: - $ref: '#/components/schemas/GeoLocation' - Neighborhood: - $ref: '#/components/schemas/Neighborhood' - RegionId: - type: integer - description: RegionId the location resides in. - format: int64 - example: 6200275 - Country: - $ref: '#/components/schemas/Country' - description: Container for list of possible locations that could be used to disambiguate the query. - Mileage: - required: - - FreeDistance - - FreeDistanceRatePeriod - type: object - properties: - FreeDistance: - $ref: '#/components/schemas/Distance' - FreeDistanceRatePeriod: - type: string - description: Rate period for free distance. - example: Daily - ExtraCostPerDistance: - $ref: '#/components/schemas/ExtraCostPerDistance' - description: A list of charges to be levied based on the mileage driven. - Money: - required: - - Currency - - Value - type: object - properties: - Value: - type: string - description: The value of the element being defined. - example: '21.9' - Currency: - type: string - description: The ISO 4217 Currency Code that the value is expressed in. - example: USD - LocalCurrencyPrice: - $ref: '#/components/schemas/Money' - description: Price of Special equipment. - Neighborhood: - required: - - Id - - Name - type: object - properties: - Id: - type: string - description: Neighborhood id. - example: '6160232' - Name: - type: string - description: Neighborhood name. - example: Le Pharo - description: Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. - NonCancellableDateTimeRange: - required: - - EndDateTime - - StartDateTime - type: object - properties: - StartDateTime: - type: string - description: The time of this non-cancellable window starts - format: date-time - EndDateTime: - type: string - description: The time of this non-cancellable window ends - format: date-time - description: Container for non-cancellable date and time range element - PenaltyRule: - required: - - EndDateTime - - Penalty - - StartDateTime - type: object - properties: - Penalty: - $ref: '#/components/schemas/PenaltyType' - StartDateTime: - type: string - description: The time when this penalty window starts - format: date-time - EndDateTime: - type: string - description: The time when this penalty window ends - format: date-time - description: Container for penalty rules - PenaltyType: - required: - - Currency - - Type - - Value - type: object - properties: - Type: - type: string - description: 'What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days.' - Value: - type: string - description: Value to indicate how many/much of the type listed above is going to be charged as a penalty. - example: '20.0' - Currency: - type: string - description: 'The currency of the amount, only valid when Type=AMOUNT' - example: USD - description: Container for no show penalty element - Price: - required: - - TotalPrice - type: object - properties: - RatePeriodUnitPrice: - $ref: '#/components/schemas/Money' - BasePrice: - $ref: '#/components/schemas/Money' - TaxesAndFees: - $ref: '#/components/schemas/Money' - TotalPriceDueAtBooking: - $ref: '#/components/schemas/Money' - TotalPrice: - $ref: '#/components/schemas/Money' - description: Pricing information for the rental. - RateDetails: - required: - - PrePay - - RatePeriod - type: object - properties: - RatePeriod: - type: string - description: 'Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend' - example: Daily - RateCode: - type: string - description: Rate plan identifier. - example: A3D10 - PrePay: - type: boolean - description: Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). - example: false - CreditCardRequired: - type: boolean - description: Indicates whether credit card is required for booking. - example: false - Discounts: - type: array - description: List of discount information. - items: - $ref: '#/components/schemas/Discount' - Mileages: - type: array - description: A list of charges to be levied based on the mileage driven. - items: - $ref: '#/components/schemas/Mileage' - MobileRate: - type: boolean - description: Indicates whether car offer is mobile rate. - example: true - description: The rate detail information for a car offer. - Rating: - required: - - RatingPercentage - - RatingCount - type: object - properties: - RatingPercentage: - type: string - description: The percentage of rating. - example: '87%' - RatingCount: - type: string - description: The total count of rating. - example: '2092' - RatingDetails: - type: array - description: List of all the details of rating. - items: - $ref: '#/components/schemas/RatingDetails' - description: The rating of the car being offered. - RatingWithoutDetails: - required: - - RatingPercentage - - RatingCount - type: object - properties: - RatingPercentage: - type: string - description: The percentage of rating. - example: '87%' - RatingCount: - type: string - description: The total count of rating. - example: '2092' - description: The rating of the car being offered. - RatingDetails: - required: - - Category - - Percentage - type: object - properties: - Category: - type: string - description: The category of rating detail. - example: 'Pick-up location' - Percentage: - type: string - description: The percentage of rating detail category. - example: '98' - description: List of all the details of rating. - Supplier: - required: - - Code - - Id - - Name - type: object - properties: - Id: - type: string - description: Supplier ID. - example: '3' - Name: - type: string - description: Supplier Name. - example: Advantage Rent-A-Car - Code: - type: string - description: Supplier Code. - example: AD - LogoImageUrl: - type: string - description: Supplier Logo Image Url. - example: 'https://media.int.expedia.com/int/cars/logos/NU.png' - description: The supplier of the car being offered. - TimeRange: - required: - - EndTime - - StartTime - type: object - properties: - StartTime: - type: string - description: Start time at pickup location of the date range. - format: time - example: '07:00:00' - EndTime: - type: string - description: End time at pickup location of the date range. - format: time - example: '17:00:00' - description: A list of time range to indicate the operation hours of the date range. - TransmissionDrive: - required: - - Code - - Value - type: object - properties: - Code: - type: string - description: Car transmission and drive code. - example: M - Value: - type: string - description: Car transmission and drive value. - example: Manual AWD - description: 'Car transmission and drive. Please find list of Car Transmission Drive Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005380028' - VehicleDetails: - required: - - CarCategory - - CarClass - - CarType - - FuelAC - - TransmissionDrive - type: object - properties: - Make: - type: string - description: Car manufacturer and model. - example: Kia Rio - CarClass: - type: string - description: Car category and type. - example: Economy 2/4Door Car - MinDoors: - type: integer - description: Minimal car door count. - format: int32 - example: 2 - MaxDoors: - type: integer - description: Maximal car door count. - format: int32 - example: 4 - FuelLevel: - type: string - description: Car fuel information. - example: Full to Full - CarCategory: - $ref: '#/components/schemas/CarCategory' - CarType: - $ref: '#/components/schemas/CarType' - TransmissionDrive: - $ref: '#/components/schemas/TransmissionDrive' - FuelAC: - $ref: '#/components/schemas/FuelAC' - Capacity: - $ref: '#/components/schemas/Capacity' - description: Specific information for a car. - VendorLocationDetails: - required: - - DateTime - - Location - type: object - properties: - DateTime: - type: string - description: Pickup date and time. - format: date-time - ShuttleCategory: - type: string - description: The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. - example: AirportShuttleToCounterAndCar - Location: - $ref: '#/components/schemas/Location' - Distance: - $ref: '#/components/schemas/Distance' - OpenSchedule: - type: array - description: A List of date time periods to indicate the vendor business hours for the pickup time. - items: - $ref: '#/components/schemas/DateTimePeriod' - description: Drop off information - Warning: - required: - - Code - - Description - type: object - properties: - Code: - type: string - description: Standardized warning code. - example: INVALID_CORPORATE_DISCOUNT_CODE - Description: - type: string - description: Standardized warning description message. - example: 'The Corporate DiscountCode ''811490'' is unavailable, but we found other rates for you.' - OriginalPrice: - $ref: '#/components/schemas/Money' - NewPrice: - $ref: '#/components/schemas/Money' - ChangedAmount: - $ref: '#/components/schemas/Money' - ChangedPercentage: - type: string - description: |- - The changed percentage. - In the sample 2.97 means the changed percentage is 2.97%. - example: '2.97' - Links: - type: object - additionalProperties: - $ref: '#/components/schemas/Link' - xml: - wrapped: true - description: Container for warning codes - Error: - required: - - Code - - Description - type: object - properties: - Code: - type: string - description: Error code describing the issue - example: AMBIGUOUS_LOCATION - DetailCode: - type: string - description: Detailed error code describing the issue. - example: MULTIPLE_AMBIGUOUS_LOCATION - Description: - type: string - description: A simple description of what the error is. - example: 'Multiple pickup locations found. ' - LocationKeyword: - type: string - description: The requested location that caused the error. - example: 'Portland. ' - LocationOptions: - type: array - description: 'List for possible locations from which the customer must choose the best one to be re-submitted in the request. ' - items: - $ref: '#/components/schemas/LocationOption' - description: Container for error list. - Errors: - required: - - Errors - - TransactionId - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: '#/components/schemas/Error' - TransactionId: - type: string - description: A unique identifier for the transaction. - example: a9e371c4-89d9-4f9c-8df7-df105830e7fe - xml: - name: ErrorResponse - LocationOption: - required: - - Locations - - RequestedLocation - type: object - properties: - RequestedLocation: - type: string - description: Location used in partner request. - example: Paris - Locations: - type: array - description: Container for list of possible locations that could be used to disambiguate the query. - items: - $ref: '#/components/schemas/Location' - Type: - type: string - description: Type of the location. - example: TRAINSTATION - RegionId: - type: string - description: RegionId the location resides in. - example: '6200275' - ShortName: - type: string - description: The name of the location which matches the location keyword. - example: Dublin Connolly Station - AirportCode: - type: string - description: Indicates the nearest major airport to the location. - example: DUB - Address: - type: string - description: The address of the location. - example: 'Dublin Connolly Station, Ireland' - Country: - $ref: '#/components/schemas/Country' - GeoLocation: - $ref: '#/components/schemas/GeoLocation' - description: 'List for possible locations from which the customer must choose the best one to be re-submitted in the request. ' - DisambiguationResponse: - required: - - Errors - - TransactionId - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: '#/components/schemas/Error' - TransactionId: - type: string - description: A unique identifier for the transaction. - example: ec007d1c-8d9d-4ed5-a880-da5b477d8c6c - xml: - name: DisambiguationResponse - CarDetails: - required: - - CancellationPolicy - - DropOffDetails - - PickupDetails - - Price - - Supplier - - VehicleDetails - type: object - properties: - OnlineCheckIn: - type: boolean - description: Indicate whether the supplier supports online checkin - example: true - SkipTheCounter: - type: boolean - description: Indicate whether the supplier supports skip the counter - example: true - VehicleDetails: - $ref: '#/components/schemas/VehicleDetails' - Supplier: - $ref: '#/components/schemas/Supplier' - PickupDetails: - $ref: '#/components/schemas/VendorLocationDetails' - DropOffDetails: - $ref: '#/components/schemas/VendorLocationDetails' - RateDetails: - $ref: '#/components/schemas/RateDetails' - Price: - $ref: '#/components/schemas/Price' - ReferencePrice: - $ref: '#/components/schemas/Money' - AdditionalFees: - type: array - description: List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - items: - $ref: '#/components/schemas/AdditionalFee' - TaxesAndFeesDetails: - type: array - description: List of TaxesAndFees Details - items: - $ref: '#/components/schemas/TaxesAndFees' - ExtraFeesDetails: - type: array - description: List of ExtraFeesDetails - items: - $ref: '#/components/schemas/ExtraFees' - SpecialEquipments: - type: array - description: Description and costs of any optional special equipment that may be rented with the car. - items: - $ref: '#/components/schemas/Equipment' - RentalLimits: - $ref: '#/components/schemas/RentalLimits' - CancellationPolicy: - $ref: '#/components/schemas/CancellationPolicy' - NoShowPenalty: - $ref: '#/components/schemas/PenaltyType' - CarPolicies: - type: array - description: A list of policies that apply to this car rental. - items: - $ref: '#/components/schemas/CarPolicy' - Images: - type: array - description: List of image resources of the car product. - items: - $ref: '#/components/schemas/Image' - Rating: - $ref: '#/components/schemas/Rating' - description: Details of requested car. - CarDetailsResponse: - required: - - TransactionId - type: object - properties: - Warnings: - type: array - description: Container for warning codes - items: - $ref: '#/components/schemas/Warning' - TransactionId: - type: string - description: A unique identifier for this transaction. - example: 1111111-2222-3333-4444-55555555555 - CarDetails: - $ref: '#/components/schemas/CarDetails' - ValidFormsOfPayment: - type: array - description: List of all the forms of payment that will be accepted for the booking of this rental transaction. - items: - $ref: '#/components/schemas/ValidFormsOfPayment' - Links: - type: object - additionalProperties: - $ref: '#/components/schemas/Link' - description: 'A map of links to other Car APIs. possible link name: ApiBooking' - xml: - wrapped: true - xml: - name: CarDetailsResponse - CarPolicy: - required: - - CategoryCode - type: object - properties: - CategoryCode: - type: string - description: 'The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) ' - example: Guarantee - PolicyText: - type: string - description: 'The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available.' - example: Credit card required. - description: A list of policies that apply to this car rental. - Duration: - required: - - Count - - Unit - type: object - properties: - Unit: - type: string - description: The unit for minimum amount of time for a rental. - example: Day - Count: - type: integer - description: The minimum number of units that qualify for minimum amount of time for a rental. - format: int64 - example: 1 - description: The maximum amount of time for a rental that still qualifies for this rate.This may or may not be the same as the current rental duration. - Equipment: - required: - - Code - - Name - type: object - properties: - Code: - type: string - description: Special equipment code - example: BabyChildSeat - Name: - type: string - description: Special equipment name - example: Baby Child Seat - RatePeriod: - type: string - description: 'Unit indicating the price of special equipment. Support value:Trip,Daily' - example: Trip - Price: - $ref: '#/components/schemas/Money' - description: Description and costs of any optional special equipment that may be rented with the car. - ExtraFees: - required: - - Amount - - Unit - - UnitCount - type: object - properties: - Unit: - type: string - description: 'Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily' - example: ExtraHourly - UnitCount: - type: integer - description: Numbers of period - format: int64 - example: 2 - Amount: - $ref: '#/components/schemas/Money' - description: List of ExtraFeesDetails - RentalLimits: - required: - - MaxDuration - - MinDuration - type: object - properties: - MinDuration: - $ref: '#/components/schemas/Duration' - MaxDuration: - $ref: '#/components/schemas/Duration' - description: Limitations that are part of this rental agreement. - TaxesAndFees: - required: - - Amount - - Description - type: object - properties: - Description: - type: string - description: TaxesAndFees description - example: "Rental, CONSOLIDATED FACILITY CHG 4.00/DAY\t" - Amount: - $ref: '#/components/schemas/Money' - description: List of TaxesAndFees Details - ValidFormsOfPayment: - required: - - BrandName - - PaymentMethod - - PaymentSubMethod - type: object - properties: - PaymentMethod: - type: string - description: Method of payment - example: CreditCard - PaymentSubMethod: - type: string - description: Sub method of payment - example: American Express - BrandName: - type: string - description: 'The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but "Visa/Carte Bleue" and "Visa/Delta are some of the exceptions.' - example: American Express - description: List of all the forms of payment that will be accepted for the booking of this rental transaction. - APIMError: - title: APIMError - properties: - message: - type: string - securitySchemes: - basicAuth: - type: http - scheme: basic diff --git a/specs/xap-hotel.specs.yaml b/specs/xap-hotel.specs.yaml deleted file mode 100644 index 978fed259..000000000 --- a/specs/xap-hotel.specs.yaml +++ /dev/null @@ -1,3394 +0,0 @@ -openapi: 3.0.1 -info: - title: EWSHotel API - description: | - The XAP Lodging Search APIs can be used by partners both booking via an Expedia website, or by partners that - will be booking via the XAP APIs. Each API also provides pre-configured links to the Expedia website, - the XAP Booking API, or both. - contact: - name: PartnerAPIs - url: https://confluence.expedia.biz/display/EWS/EWSHotel - email: dreamweaver@expedia.com - version: v3 - x-eg-lifecycle: LIVE - x-eg-tags: ["Partner", "EWS", "XAP", "EWSHotel", "Hotel", "Lodging", "LodgingListings", "LodgingDetails", "LodgingRateCalendar"] -tags: - - name: Lodging Listing - - name: Lodging Details - - name: Lodging Rate Calendar -servers: - - url: 'https://apim.expedia.com' - description: Production Server -paths: - /hotels/details/{offerToken}: - get: - tags: - - Lodging Details - summary: Get Extended information with a single property offer - description: Extended information about the rate, charges, fees, and financial terms associated with booking a single lodging rate plan offer. - operationId: get-lodging-details - parameters: - - name: Key - in: header - description: | - The partner API key is a case-sensitive, alphanumeric string that looks something like this: - - **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** - - The API Key is assigned and configured as part of the API on-boarding process. - It will be sent to the partner by their Expedia Account Manager or representative. - required: true - schema: - type: string - - name: Partner-Transaction-Id - in: header - description: | - The `Partner-Transaction-ID` is a required API request header element that is not consumed - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - back to the partner in the corresponding API response header. - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: offerToken - in: path - description: | - A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated - string of multiple values that defines a hotel offer. - required: true - schema: - type: string - - name: price - in: query - description: | - The total price of the selected property. - - This value will be used to determine if there is a price change between the details and booking request. - - The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned - along with the Lodging Details API response. - schema: - type: string - - name: currency - in: query - description: | - Value should be a standard ISO 3 letter currency code. - - The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from - the Lodging Listing API response. - - The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned - along with the Lodging Details response. - schema: - type: string - - name: locale - in: query - description: | - `locale` is composed of language identifier and region identifier, connected by "_" that specifies the - language in which the response will be returned. - - The `locale` value used in the Lodging Details API query should match the `locale` value that was used in - the Lodging Search API query. - schema: - type: string - - name: imageSizes - in: query - description: | - Indicate what size of image will be returned. - - The available image sizes are: - - t : Thumbnail - - s : Small - - b : Big - - y : 500x500v - - z : 1000x1000v - - Resolution from smallest to largest is t < s < b < y < z. - - If no `imageSizes` is specified, the t size images will be returned. - - If an image is missing in one size, we will try to fall back to the same image with lower resolution. - - (If image "_z" is not available, we will try to return image "_y", and if it is also unavailable, we will return image "_b", and so on.) - - Only one image size is allowed. - schema: - type: string - enum: - - t - - s - - b - - y - - z - default: t - - name: groupedAmenities - in: query - description: | - Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` - node will be returned in response, otherwise `Amenities` node will be returned. - schema: - type: boolean - responses: - "200": - description: Normal Response - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/HotelDetailsResponse' - "400": - description: User Fault - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: INVALID_NATURAL_KEY - Description: Invalid natural key. Malformed hotel natural key detected. - TransactionId: e883f530-9776-4011-a14d-3cc089feb6cf - "500": - description: Service Error - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: 1f497fa0-a996-4796-b97e-3ad269bf7624 - "401": - description: Invalid authentication credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Unauthorized - "403": - description: You cannot consume this service. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: API rate limit exceeded. - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Name resolution failed. - "504": - description: API time out. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: The upstream server is timing out - security: - - Authorization: [] - /hotels/listings: - get: - tags: - - Lodging Listing - summary: Search lodging inventory - description: | - Search Expedia lodging inventory by Location Keyword, Region ID, Lat/Long, or Hotel ID(s) and return - up to 1,000 offers in response. - - Provides deeplink to Expedia site to book, or rate plan info to enable API booking. - operationId: get-lodging-listings - parameters: - - name: Key - in: header - description: | - The partner API key is a case-sensitive, alphanumeric string that looks something like this: - - **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** - - The API Key is assigned and configured as part of the API on-boarding process. - It will be sent to the partner by their Expedia Account Manager or representative. - required: true - schema: - type: string - - name: Partner-Transaction-Id - in: header - description: | - The `Partner-Transaction-ID` is a required API request header element that is not consumed - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - back to the partner in the corresponding API response header. - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: ecomHotelIds - in: query - description: Comma-separated list of Expedia hotel IDs. There can be no spaces - between parameters. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - example: - - 28082 - - 11133 - - name: hcomHotelIds - in: query - description: Comma-separated list of Hotels.com hotel IDs. There can be no spaces - between parameters. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: geoLocation - in: query - description: | - The latitude and longitude values identifying the center point of a search radius (circle). - - North latitude will be represented by a positive value. South latitude by a negative value. - - East longitude will be represented by a positive value. West longitude by a negative value. - - The latitude and longitude values are joined together with a comma (,) character. - There can be no spaces between parameters. - - This parameter should be used in combination with the radius and unit parameters below. - schema: - type: string - - name: radius - in: query - description: | - The size of the search radius around a specified point when searching by - `geoLocation`, `locationKeyword`, or `regionids`. - - `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` - if not specified. `radius` must be less than 200 km or 124 mi. - - This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, - or `regionids` parameters." - schema: - type: integer - format: int64 - default: 25 - - name: unit - in: query - description: | - The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. - - Valid units are `km` and `mi`. - - This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, - or `regionids`. - schema: - type: string - default: km - enum: - - km - - mi - - name: locationKeyword - in: query - description: | - A keyword search for a location. The keyword can be a city, address, airport or a landmark. - - This parameter should be used in combination with the `radius` and `unit` parameters above to define - a circle around the landmark. - - The default radius value is 25 if not specified. - - Combined search is not supported, if more than one search method is included in the request, an error - will be returned. - schema: - type: string - - name: regionIds - in: query - description: | - Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. - Search returns set of all hotels in the combined regions. - - You may search using a string of 1 - 10 Region ID's. - More than 10 Region ID's are not supported and will generate and error. - - You can get the complete list of Expedia Region IDs from - [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). - - This parameter could be used in combination with the `radius` and `unit` parameters above to define - a circle around the `regionIds`. The default radius value is 0 if not specified. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: checkIn - in: query - description: | - Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - - This parameter should be used in combination with the `checkOut` parameter. - - If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns - a `Featured Offer` for each of the hotels found. - - If one of `checkIn` and `checkOut` is not included, an error will be returned. - - The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - schema: - type: string - format: date - example: '2023-09-12' - - name: checkOut - in: query - description: | - Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - - This parameter should be used in combination with the `checkIn` parameter. - - If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns - a `Featured Offer` for each of the hotels found. - - If one of `checkIn` and `checkOut` is not included, an error will be returned. - - The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - schema: - type: string - format: date - example: '2023-09-14' - - name: locale - in: query - description: | - `locale` is composed of language identifier and region identifier, connected by "_" that specifies - the language in which the response will be returned. - - You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. - - For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. - - If not specified in the query, the native language for that POS will be returned. - And if more than one language is supported, the response will be returned in the first language - depending on the language setting of the POS. - schema: - type: string - example: en_US - - name: currency - in: query - description: Value should be a standard ISO 3 letter currency code. - schema: - type: string - example: USD - - name: source - in: query - description: Indicate the source where the request is coming from. - schema: - type: string - enum: - - browser - - mobileapp - default: browser - - name: travelWithPets - in: query - description: | - Indicates if the search should include pet-friendly properties. - - If set to "True" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. - - The parameter is only applicable to the Vrbo brand. - schema: - type: boolean - default: false - - name: contentDetails - in: query - description: | - This parameter is optional and can be specified as the following values. - - lowest - - low (default) - - medium - - high - - ### *lowest* - Returns the absolute minimum response for up to 1,000 hotels: - - Count(Count of hotels that are actually returned) - - TotalHotelCount(Count of hotels that are requested) - - TransactionId - - StayDates - - LengthOfStay - - NumberOfRooms - - Occupants - - ***Hotels*** - - Id - - Status - - Links - - ***RoomTypes*** - - RoomKey [Deprecated] - - OfferId - - RatePlanType - - ***RatePlans*** - - RoomTypeId - - RatePlanId - - RateRuleId - - InventorySourceId - - RemainingCount - - Price - - MemberOnlyDeal - - Promotions - - PaymentMethod - - FullDepositUponBooking - - PaymentSchedule - - CancellationPolicy - - Price - - BaseRate - - TaxesAndFees - - TotalPrice - - TotalStrikeOutPrice - - AvgNightlyRate - - AvgNightlyStrikeOutRate - - AvgNightlyRateWithFees - - AvgNightlyStrikeOutRateWithFees - - HotelMandatoryFees - - TotalPriceWithHotelFees - - NightlyRates - - TaxesAndFeesDetails - - RefundableDamageDeposit - - This minimal response is the best for partners that store static hotel location data locally, - and who would like to have the smallest and fastest API response. - - ### *low* - Returns basic hotel information in response for up to 1,000 hotels. - - Includes all elements returned when `contentDetails=lowest` plus: - - ***Hotels*** - - Name - - PropertyType - - PropertyDetails - - LocalCurrencyCode - - Location - - Distance - - Description(may not be localized) - - ChainAndBrandInfo - - ThumbnailUrl - - StarRating - - GuestRating - - GuestReviewCount - - PetFriendly - - LgbtqiaFriendly - - ImportantNotices - - ***RoomTypes*** - - Description - - ***RatePlans*** - - InventorySourceCode - - PaymentTime - - ReserveWithDeposit - - FreeInternet - - FreeWiFi - - FreeParking - - FreeBreakfast - - ### *medium* - Returns more complete hotel information in response for up to 200 hotels. - - Includes all elements returned when `contentDetails=low` plus: - - ***Hotels*** - - HotelAmenities - - RoomAmenities - - ***RoomTypes*** - - ***RatePlans*** - - FreeInternetDetails - - FreeBreakfastDetails - - Amenities - - Amenities - - **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. - - ### *high* - Returns extended hotel information in response for up to 5 hotels. - - Includes all elements returned when `contentDetails=medium` plus: - - ***Hotels*** - - RenovationsAndClosures - - Policies - - OptionalExtras - - Media - - Accessibility - - ***RoomTypes*** - - SmokingOption - - BedTypeOptions - - RoomOccupancyPolicy - - Media - - **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. - schema: - type: string - enum: - - lowest - - low - - medium - - high - default: low - - name: allRoomTypes - in: query - description: | - Returns all available rate plans for the selected hotels. - - This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. - - Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. - - Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. - schema: - type: boolean - default: false - - name: links - in: query - description: | - - Comma-separated list to specify the types of deep links. - - WD (link to Web Details site) - - WS (link to Web Search Result page) - - AD (link for Details API) - - RC (link for RateCalendar API) - - WEB (include all website links) - - API (links for Details and RateCalendar API) - - There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. - - When requesting API deeplinks you will receive both a RateCalendar API link at the property level, - and Details API links at the room level, since the Lodging Details API only displays information - on rate plan offers. - - When requesting AD deeplinks, you will only receive Details API links at the room level. - `Links` node in property-level will be omitted. - - If you are looking for more complete details on a single property via the API, you should do another search - in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return - (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). - - **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only - return details on a specific room offer for specific dates. - explode: false - schema: - type: array - items: - type: string - enum: - - WD - - WS - - AD - - RC - - WEB - - API - - name: minStarRating - in: query - description: The minimum star rating for hotels returned in the response. - schema: - type: string - enum: - - "1.0" - - "1.5" - - "2.0" - - "2.5" - - "3.0" - - "3.5" - - "4.0" - - "4.5" - - "5.0" - - name: maxStarRating - in: query - description: The maximum star rating for hotels returned in the response. - schema: - type: string - enum: - - "1.0" - - "1.5" - - "2.0" - - "2.5" - - "3.0" - - "3.5" - - "4.0" - - "4.5" - - "5.0" - - name: limit - in: query - description: | - The maximum number of hotels returned in the response. Must be an integer greater than 0. - - If the value is greater than 1000, only the first 1000 hotels are returned. - - Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden - and a lower number of hotels to be returned. - - The `limit` parameter is intended to be used to control the response size, but partners should be careful - about combining it with other filter parameters, as each parameter that you add will shrink the response, - even to the point where you may even get a "no hotel found" error if none of the hotels in the base response - meet the combined filter requirements. - - Filters are cumulative in effect, and results must meet all filter requirements to be displayed. - schema: - type: integer - format: int64 - - name: queryText - in: query - description: | - Query text is used for a full text search of hotel data. - - Text search based on hotel name, description, address, promotion description, amenities description. - schema: - type: string - - name: availOnly - in: query - description: | - Specifies whether to return only available hotels in the search results. - - If the value of this parameter is true, the search results will only return hotels that have availability - during the requested dates. - - If there are no hotels with availability in your search then an empty record set will be returned. - - This parameter is ignored for dateless searches. - schema: - type: boolean - - name: smokingPreference - in: query - description: Specifies smoking preference. - schema: - type: string - enum: - - smoking - - nonsmoking - - both - - name: rateType - in: query - description: Indicate which type of `paymentMethod` for each room will be returned. - schema: - type: string - enum: - - payonline - - payhotel - - all - - name: imageSizes - in: query - description: | - Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when - `contentDetails=high`. - - The available image sizes are: - - t : Thumbnail - - s : Small - - b : Big - - y : 500x500v - - z : 1000x1000v - - Resolution from smallest to largest is t < s < b < y < z. - - If no `imageSizes` is specified, the t size images will be returned. - - If an image is missing in one size, we will try to fall back to the same image with lower resolution. - - (If image "_z" is not available, we will try to return image "_y", and if it is also unavailable, we will return image "_b", and so on.) - - Only one image size is allowed. - schema: - type: string - enum: - - t - - s - - b - - y - - z - - name: thumbnailImageSize - in: query - description: | - Indicate what size of image will be used for the single `thumbnail` image that is returned when - `contentDetails` is set to `low`, `medium` or `high`. - - The available thumbnail image sizes are: - - t : Thumbnail - - s : Small - - b : Big - - y : 500x500v - - z : 1000x1000v - - Resolution from smallest to largest is t < s < b < y < z. - - If no `thumbnailImageSize` is specified, the t size images will be returned. - - if no thumbnail image found, it would not return thumbnail image. - - Only one thumbnail image size is allowed. - schema: - type: string - enum: - - t - - s - - b - - y - - z - - name: includedPropertyTypeIds - in: query - description: | - Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. - - If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not - be returned in the response. Even in this case, the filtering is still being applied, even though there is - no `PropertyType` parameter in the response with which to validate. - - `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that - each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not - contain **both** of the parameters. - - A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: excludedPropertyTypeIds - in: query - description: | - Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. - - If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not - be returned in the response. Even in this case, the filtering is still being applied, even though there is - no `PropertyType` parameter in the response with which to validate. - - `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that - each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not - contain **both** of the parameters. - - A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: includedInventorySourceIds - in: query - description: | - Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory - sources. - - Query with the `includedInventorySourceIds` parameter included will only return listings from the requested - inventory sources. All others will be left out. - - `includedInventorySourceId=24` will return only Expedia lodging inventory. - - `includedInventorySourceId=83` will return only Vrbo lodging inventory. - - `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: freeCancellation - in: query - description: | - Specifies whether to return only free cancelable room rates in the search results. - - If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. - - If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. - - Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. - - This parameter is ignored for dateless searches. - schema: - type: boolean - - name: groupedAmenities - in: query - description: | - Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` - node will be returned in response, otherwise `Amenities` node will be returned. - schema: - type: boolean - - name: blockFullDepositRateplan - in: query - description: | - Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. - - If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. - - The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. - - This parameter is ignored for dateless search. - schema: - type: boolean - default: false - - name: ratePlanType - in: query - description: | - **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account - Manager if you need this parameter. - - To specify the desired rate plan types. The options are: - - standalone : Ask for standalone rates - - package : Ask for package rates, but standalone rate also may be returned if available. - - Otherwise only standalone rate plans will be returned. - - `WebSearchResult` and `WebDetails` links won't be returned for package rate. - schema: - type: string - enum: - - standalone - - package - - name: sortType - in: query - description: | - Specifies the field that the search results will be ordered by. - - To be used in conjunction with sortOrder parameter below. - - **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using - the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. - schema: - type: string - enum: - - price - - starrating - - avgrate - - deals - - guestrating - - hotelname - - distance - - totalpricewithfees - - name: sortOrder - in: query - description: | - Specifies the sort order of search results. - - If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. - - To be used in conjunction with the `sortType` parameter above. - schema: - type: string - enum: - - asc - - desc - default: asc - - name: room1.adults - in: query - description: | - Specifies the number of adults staying in a specific room. - - Default value is one room with 2 adults. - - Example: `room1.adults` is used to specify the number of adults in the first room. - schema: - type: integer - format: int64 - example: 2 - - name: room1.childAges - in: query - description: | - Comma-separated list that specifies the age(s) for each of the children in each of the rooms. - - Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. - - Children must be accompanied by an adult. - explode: false - schema: - type: array - items: - type: string - example: - - 8 - - 10 - - name: room2.adults - in: query - description: Specifies the number of adults staying in second room. - schema: - type: integer - format: int64 - - name: room2.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in second room. - explode: false - schema: - type: array - items: - type: string - - name: room3.adults - in: query - description: Specifies the number of adults staying in third room. - schema: - type: integer - format: int64 - - name: room3.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in third room. - explode: false - schema: - type: array - items: - type: string - - name: room4.adults - in: query - description: Specifies the number of adults staying in fourth room. - schema: - type: integer - format: int64 - - name: room4.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in fourth room. - explode: false - schema: - type: array - items: - type: string - - name: room5.adults - in: query - description: Specifies the number of adults staying in fifth room. - schema: - type: integer - format: int64 - - name: room5.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in fifth room. - explode: false - schema: - type: array - items: - type: string - - name: room6.adults - in: query - description: Specifies the number of adults staying in sixth room. - schema: - type: integer - format: int64 - - name: room6.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in sixth room. - explode: false - schema: - type: array - items: - type: string - - name: room7.adults - in: query - description: Specifies the number of adults staying in seventh room. - schema: - type: integer - format: int64 - - name: room7.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in seventh room. - explode: false - schema: - type: array - items: - type: string - - name: room8.adults - in: query - description: Specifies the number of adults staying in eighth room. - schema: - type: integer - format: int64 - - name: room8.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in eighth room. - explode: false - schema: - type: array - items: - type: string - responses: - "200": - description: Normal Response - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/HotelListingsResponse' - "400": - description: User Fault or DisambiguationResponse Fault - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/Errors' - examples: - DisambiguationResponse: - description: DisambiguationResponse - value: - TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - Errors: - - Code: AMBIGUOUS_LOCATION - DetailCode: MULTIPLE_AMBIGUOUS_LOCATION - Description: More than one location found - LocationKeyword: dublin - LocationOptions: - - Type: MULTICITY - RegionID: 178256 - ShortName: Dublin (and vicinity) - AirportCode: DUB - Address: Dublin (and vicinity), Ireland - Country: - Name: Ireland - IsoCode2: IE - IsoCode3: IRL - GeoLocation: - Latitude: 53.34402 - Longitude: -6.26146 - - Type: POI - RegionID: 553248621563220238 - ShortName: Market On Madison - AirportCode: MCN - Address: Market On Madison, Dublin, Georgia, United States of America - Country: - Name: United States of America - IsoCode2: US - IsoCode3: USA - GeoLocation: - Latitude: 32.539313 - Longitude: -82.902537 - UserFault: - description: UserFault - value: - Errors: - - Code: COMBINED_HOTEL_SELECT_CRITERIA - Description: | - Combined hotel search is not supported. Please specify either one of the following search - criteria: [geoLocation, regionIds, ecomHotelIds, hcomHotelIds, locationKeyword, hnk, offerId]. - TransactionId: 242d7a77-4063-439b-a9d0-12da0ff5116e - "500": - description: Service Error - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: 1490a74b-4c90-4e78-983d-4ede360ce52a - "401": - description: Invalid authentication credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Unauthorized - "403": - description: You cannot consume this service. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: API rate limit exceeded. - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: name resolution failed - "504": - description: API time out. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: The upstream server is timing out - security: - - Authorization: [] - /hotels/rateCalendar: - get: - tags: - - Lodging Rate Calendar - summary: Get rate calendar of a property - description: The Rate Calendar API will return the lowest rate plan for a range of days for one selected Expedia lodging property. - operationId: get-lodging-rate-calendar - parameters: - - name: Key - in: header - description: | - The partner API key is a case-sensitive, alphanumeric string that looks something like this: - - **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** - - The API Key is assigned and configured as part of the API on-boarding process. - It will be sent to the partner by their Expedia Account Manager or representative. - required: true - schema: - type: string - - name: Partner-Transaction-Id - in: header - description: | - The `Partner-Transaction-ID` is a required API request header element that is not consumed - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - back to the partner in the corresponding API response header. - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: ecomHotelId - in: query - description: | - The Expedia hotel ID for which the calendar is being requested. - - **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. - You may use one or the other, but not both. - schema: - type: string - - name: hcomHotelId - in: query - description: | - The Hotel.com hotel ID for which the calendar is being requested. - - **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. - You may use one or the other, but not both. - schema: - type: string - - name: startDate - in: query - description: | - Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. - - **Note**: The start date may not be in the past. - required: true - schema: - type: string - format: date - example: 2022-09-12 - - name: endDate - in: query - description: | - End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. - - **Note**: The end date must be after the start date. The maximum supported search range is 180 days. - required: true - schema: - type: string - format: date - example: 2022-09-14 - - name: lengthOfStay - in: query - description: The length of stay to retrieve the lowest price for. - schema: - type: integer - format: int32 - default: 1 - - name: currency - in: query - description: The requested currency expressed according to ISO 4217. - schema: - type: string - responses: - "200": - description: Normal Response - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/RateCalendarResponse' - "400": - description: User Fault - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: INVALID_HCOMHOTELID - Description: The hcomHotelId is invalid. Please specify correct - Hcom hotel id. - TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 - "409": - description: NO_RESULTS_FOUND - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: NO_RESULTS_FOUND - Description: | - Sorry, your query appears to be correctly formatted, but the inventory for which you are seeking - details is now unavailable. - TransactionId: 2423025a-916f-4994-972a-68ee2e6b1e92 - "500": - description: Service Error - content: - application/vnd.exp-hotel.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b - "401": - description: Invalid authentication credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Unauthorized - "403": - description: You cannot consume this service. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: API rate limit exceeded. - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Name resolution failed. - "504": - description: API time out. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: The upstream server is timing out. - security: - - Authorization: [] -components: - schemas: - Address: - type: object - properties: - Address1: - type: string - description: Street Number, Street Name, or PO Box - example: 724 Pine St - Address2: - type: string - description: Apartment, Floor, Suite, Bldg or more specific information about Address1. - example: Second Floor - City: - type: string - description: The city - example: New York - Province: - type: string - description: The state or province - example: NY - Country: - type: string - description: 3-letter code for the country - example: USA - PostalCode: - type: string - description: Zip/postal code - example: "98004" - description: The address information of the location. - AgeClassRestriction: - type: object - properties: - AgeClass: - type: string - description: Categories for hotel guests, based on age. - example: Senior - enum: - - All Ages - - Senior - - Adult - - Child - - Infant - - Other - AgeMinimum: - type: integer - description: The minimum age defined in a particular `AgeClass`. - format: int32 - example: 2 - AgeMaximum: - type: integer - description: | - The maximum age defined in a particular `AgeClass`. - - If not specified, the `AgeClass` has no upper bound. - format: int32 - example: 17 - MaxGuestCount: - type: integer - description: The max guest count allowed in a particular `AgeClass`. - format: int32 - example: 3 - description: Container for room occupancy rules based on the age of the guests. - BedType: - type: object - properties: - Id: - type: string - description: The bed type ID - example: "40" - Description: - type: string - description: The bed type description. - example: 1 bed - description: | - Statement of bed types available for this offer. A room may have several bed type options available. - - **NOTE**: due to the large number of bed type options available, we no longer publish a list of available - bed types. More information is available in - [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - CancellationPenaltyRule: - type: object - properties: - PenaltyNightCount: - type: integer - description: | - Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in - addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. - format: int32 - example: 1 - PenaltyPercentOfStay: - type: string - description: | - Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other - penalties listed. - example: "100" - PenaltyPrice: - allOf: - - $ref: '#/components/schemas/Money' - - description: Specifies the cancellation fee in terms of a set fee, in addition to any other penalties listed. - PenaltyStartDateTime: - type: string - description: | - The beginning of the window of time when the `CancellationPenaltyRule` is in effect. - - The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - format: date-time - example: 2022-07-23T15:00:00-08:00 - PenaltyEndDateTime: - type: string - description: | - The end of the window of time when the `CancellationPenaltyRule` is in effect. - - The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - format: date-time - example: 2022-07-25T15:00:00-08:00 - WaiverPolicy: - type: object - properties: - WaiverPolicyDescription: - type: string - description: | - The localized waiver policy description, which could be put in front of cancellation policy description. - example: | - You can cancel for a full refund up to 24 hours after booking (not applicable to bookings made within 72 hours of check-in time). After 24 hours: - CancellationPolicy: - type: object - properties: - WaiverPolicy: - $ref: '#/components/schemas/WaiverPolicy' - CancellableOnline: - type: boolean - description: "Boolean value to identify if the reservation can be cancelled\ - \ online.\nIf false, the customer will only be able to cancel a refundable\ - \ room by calling Expedia Customer Service." - example: true - Refundable: - type: boolean - description: Indicate whether the rate is refundable or not. - example: true - FreeCancellation: - type: boolean - description: Indicate whether the room can be cancelled free of charge. - example: true - FreeCancellationEndDateTime: - type: string - description: | - The date and time until which the room can be cancelled free of charge. - - This is expressed in the local time of the Hotel. - format: date-time - CancellationPenaltyRules: - type: array - description: Container for cancellation penalty details. - items: - $ref: '#/components/schemas/CancellationPenaltyRule' - CancelPolicyDescription: - type: string - description: Additional cancellation policy information available as static text. - example: Free cancellation available before 2022-07-18T16:00:00-08:00 - NonRefundableDateRanges: - type: array - description: | - A list of dates ranges that are non-refundable. - - **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation - penalty rule. - items: - $ref: '#/components/schemas/NonRefundableDateRange' - description: Container for room cancellation policy. - ChainAndBrandInfo: - type: object - properties: - ChainId: - type: integer - description: The chain id. - format: int32 - example: -5 - ChainName: - type: string - description: The name of the chain. - example: Hilton Worldwide - BrandId: - type: integer - description: The brand id. - format: int32 - example: 33 - BrandName: - type: string - description: The name of the brand. - example: Doubletree - description: | - The chain and brand information of hotel. - - Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - Country: - type: object - properties: - Name: - type: string - description: country name - example: Ireland - IsoCode2: - type: string - description: 2-letter code for the country - example: IE - IsoCode3: - type: string - description: 3-letter code for the country - example: IRL - description: Container for disambiguation country information - DepositDetail: - type: object - properties: - Type: - type: string - description: |- - Should be one of the following values: - PERCENT - The deposit amount is calculated as a percentage of the total booking cost. - NIGHT - The deposit amount is calculated in terms of nights plus tax. - AMOUNT - The deposit amount in USD. - REMAINDER - The deposit amount is equal to the booking cost minus any deposits that have been made before this point. - example: NIGHT - enum: - - PERCENT - - NIGHT - - AMOUNT - - REMAINDER - Value: - type: string - description: Value to indicate how many/much of the type listed above is - going to be charged as a deposit. - example: "1" - When: - $ref: '#/components/schemas/When' - description: Container for deposit policy details - DepositPolicy: - type: object - properties: - Description: - type: array - items: - type: string - Details: - type: array - description: Container for deposit policy details - items: - $ref: '#/components/schemas/DepositDetail' - description: Container for deposit policy details - Description: - type: object - properties: - LocationTeaser: - type: string - description: A description of the property's location. - example: Built on the original site of the University of Washington - HotelTeaser: - type: string - description: A description of the features and amenities of the property itself. - example: A top-notch fitness club and spa features a pool - RoomTeaser: - type: string - description: The common description for all of the rooms in the property. - example: "Renovated in May 2016, guest rooms feature upholstered chairs" - description: Container for the descriptions of the property. - Distance: - type: object - properties: - Value: - type: string - description: The distance between the center of the search and the hotel. - example: "75" - Unit: - type: string - description: The unit of distance. - example: km - enum: - - km - - mi - Direction: - type: string - description: The direction to the hotel from the center point of the search. - example: "N" - enum: - - N - - S - - W - - E - - NW - - NE - - SW - - SE - description: | - Container for distance information. - - Only returned for city/address search or `geoLocation` search or single `regionId` search. - GeoLocation: - type: object - properties: - Latitude: - type: string - description: Latitude of the location. - example: "38.184978" - Longitude: - type: string - description: Longitude of the location. - example: "85.7412" - Obfuscated: - type: boolean - description: Container for Geo location. - Hotel: - type: object - properties: - Id: - type: string - description: The unique, Expedia-specific hotel property identifier used to designate a single hotel. - example: "14747" - HcomId: - type: string - description: | - The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. - - This will only be returned if searching via hcomHotelIds in request. - example: "10532" - Name: - type: string - description: The common name of the hotel - example: Four Seasons Hotel Seattle - PropertyType: - $ref: '#/components/schemas/HotelPropertyType' - PropertyDetails: - $ref: '#/components/schemas/PropertyDetails' - LocalCurrencyCode: - type: string - description: The Local Currency Code for Hotel (which will be used for any - fees that must be paid at the hotel) - example: USD - Location: - allOf: - - $ref: '#/components/schemas/Location' - - description: Container for information about the location of the hotel. - PhoneInfos: - type: array - description: | - Container for property phone numbers. - - Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. - items: - $ref: '#/components/schemas/Phone' - Distance: - $ref: '#/components/schemas/Distance' - Description: - $ref: '#/components/schemas/Description' - Status: - type: string - description: | - Indicates whether there are available offers at the property during the dates requested, as well as - information as to why. - - Note that pricing will only be present in the API response for a status of `AVAILABLE`. - - If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be - returned. - - If there are available rooms, but none that meet the specific parameters of the search request, - then one of the other messages will be returned. - example: AVAILABLE - enum: - - AVAILABLE - - NOT_AVAILABLE - - ERROR - - NUMBER_OF_ADULTS_NOT_ACCEPTED - - NUMBER_OF_CHILDREN_NOT_ACCEPTED - - NUMBER_OF_INFANTS_NOT_ACCEPTED - - NUMBER_OF_PERSONS_NOT_ACCEPTED - - CHECK_IN_AGE_NOT_ACCEPTED - RenovationsAndClosures: - type: array - description: The information about renovations and closures - example: - - The following facilities are closed seasonally each year... - items: - type: string - description: The information about renovations and closures - example: The following facilities are closed seasonally each year... - ChainAndBrandInfo: - $ref: '#/components/schemas/ChainAndBrandInfo' - ThumbnailUrl: - type: string - description: | - URL of the thumbnail image of the hotel. - - Note that other images sizes are available - You can find a link to the complete list of Supported - Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - example: https://images.trvl-media.com/hotels/3000000/2170000/2163100/2163007/2163007_15_t.jpg - StarRating: - type: string - description: Star rating value of the hotel property. - example: "5.0" - enum: - - "1.0" - - "1.5" - - "2.0" - - "2.5" - - "3.0" - - "3.5" - - "4.0" - - "4.5" - - "5.0" - GuestRating: - type: string - description: | - Average overall guest rating of the hotel. - - The value is between 1.0 and 5.0 in 0.1 increments. - - Higher is better. - example: "4.5" - GuestReviewCount: - type: integer - description: The total count of guest reviews used to create the average - `GuestRating` above. - format: int32 - example: 240 - PetFriendly: - type: boolean - description: | - Indicates whether the property allows certain pets under certain circumstances. - - Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out - whether a particular pet will be permitted to stay at the property. - example: true - LgbtqiaFriendly: - type: boolean - description: This value is returned if the property owner has specifically - designated this property as LGBTQIA-friendly. - example: true - Links: - type: object - properties: - WebSearchResult: - allOf: - - $ref: '#/components/schemas/Link' - - description: Link to web search result page. - ApiRateCalendar: - allOf: - - $ref: '#/components/schemas/Link' - - description: Link for Rate Calendar API. - additionalProperties: - $ref: '#/components/schemas/Link' - description: | - Container for list of **HATEOAS** links to Expedia website to complete booking. - - This links section will only return a deeplink to the Website Search Results page by default. - - If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the - response, as the Lodging Details API returns details at the room offer level, and not at the property level. - Policies: - $ref: '#/components/schemas/HotelPolicies' - CleanlinessAndSafety: - type: object - additionalProperties: - type: array - items: - type: string - description: | - Container for all cleanliness and safety measures. - - The key is the measures category, the values are the information. The category will be: - - CLEANLINESS - - SOCIAL_DISTANCING - - SAFETY - - DISCLAIMER - example: - CLEANLINESS: - - Disinfectant is used to clean the property - - High-touch surfaces are cleaned and disinfected - - Sheets and towels are washed at 60°C/140°F or hotter - SOCIAL_DISTANCING: - - Contactless check-in and check-out - - Social distancing measures in place - OptionalExtras: - type: array - description: The optional extras info. - items: - type: string - description: The optional extras info. - ImportantNotices: - type: array - description: The important notices for hotel. - example: - - >- - This property can only accept bookings for essential travel or stays. - You may be asked to provide evidence of this on arrival. - For more information, check local advisories before you book. - items: - type: string - description: The important notices for hotel. - example: >- - This property can only accept bookings for essential travel or stays. - You may be asked to provide evidence of this on arrival. - For more information, check local advisories before you book. - Media: - type: array - description: Container for hotel images - items: - $ref: '#/components/schemas/Media' - HotelAmenities: - type: array - description: Container for all hotel amenities. - items: - allOf: - - $ref: '#/components/schemas/LodgingAmenity' - - description: Container for all hotel amenities. - - properties: - Id: - description: The identification number for a hotel amenity. - Name: - description: The description of a hotel amenity. - HotelDescriptiveAmenities: - type: object - additionalProperties: - type: array - items: - type: string - description: | - Container for all hotel amenities in group. - - The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - - PARKING - - FOOD_AND_DRINK - - INTERNET - - THINGS_TO_DO - - FAMILY_FRIENDLY - - CONVENIENCES - - GUEST_SERVICES - - BUSINESS_SERVICE - - OUTDOOR - - ACCESSIBILITY - - SPA - - ACTIVITIES_NEARBY - - LANGS_SPOKEN - - MORE - - The category for grouped amenities in hotel level for Vacation Rental hotel will be: - - BEACH - - SKI - - POOL/SPA - - INTERNET - - PARKING - - FAMILY_FRIENDLY - - KITCHEN - - DINING - - BEDROOM - - BATHROOMS - - LIVING_SPACES - - ENTERTAINMENT - - OUTDOORS - - LAUNDRY - - WORKSPACES - - CLIMATE_CONTROL - - PETS - - SUITABILITY/ACCESSIBILITY - - SERVICES_AND_CONVENIENCES - - LOCATION_HIGHLIGHTS - - THINGS_TO_DO - - GENERAL - - SAFETY - example: - FAMILY_FRIENDLY: - - Refrigerator - GUEST_SERVICES: - - 24-hour front desk - - Housekeeping (on request) - - Luggage storage - - Multilingual staff - MORE: - - At least 80% lighting from LEDs - - Communal living room - - Comprehensive food waste policy - RoomAmenities: - type: array - description: Container for all room amenities. - items: - allOf: - - $ref: '#/components/schemas/LodgingAmenity' - - description: Container for all room amenities. - - properties: - Id: - description: The identification number for a room amenity. - Name: - description: The description of a room amenity. - RoomDescriptiveAmenities: - type: object - additionalProperties: - type: array - items: - type: string - description: | - Container for all common room amenities in group. - - The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - - BEDROOM - - BATHROOM - - FOOD_AND_DRINK - - ENTERTAINMENT - - OUTDOOR_SPACE - - MORE - example: - ENTERTAINMENT: - - Flat-screen TV - - iPad - - iPod dock - - Satellite channels - FOOD_AND_DRINK: - - Free bottled water - - Refrigerator - MORE: - - Desk - - Eco-friendly cleaning products provided - - Energy-saving switches - Accessibility: - type: array - description: | - The accessibility options available for the room. - - Possible accessibility include: - - Accessible path of travel - - Accessible bathroom - - Roll-in shower - - Handicapped parking - - In-room accessibility - - Accessibility equipment for the deaf - - Braille or raised signage - example: - - Wheelchair-accessible on-site restaurant - - Wheelchair-accessible lounge - - Well-lit path to entrance - - Stair-free path to entrance - - Wheelchair accessible (may have limitations) - - Wheelchair accessible path of travel - - Accessible bathroom (in select rooms) - - Wheelchair-accessible public washroom - - In-room accessibility (in select rooms) - - Wheelchair-accessible registration desk - - Wheelchair-accessible fitness center - - Wheelchair-accessible meeting spaces/business center - items: - type: string - description: The accessibility options available for the room. - example: Wheelchair-accessible on-site restaurant - MemberOnlyDealAvailable: - type: boolean - description: Indicates whether the property has member only deal rates available. - example: true - RoomTypes: - type: array - description: Container for all of available room types. - items: - $ref: '#/components/schemas/RoomType' - description: Container for information on each offered hotel. - HotelDetailsResponse: - type: object - properties: - Warnings: - type: array - description: | - There were some errors or events during the transaction, but the API has still returned a response. - - Container for all warnings. - items: - allOf: - - $ref: '#/components/schemas/Warning' - - properties: - Code: - description: | - The code of the warning. - - Available values are: - - PRICE_DECREASED: The price decreased after shopping. - - PRICE_INCREASED: The price increased after shopping. - - CURRENCY_CHANGE: You will be charged in a different currency. - OriginalPrice: - description: The original price from the Lodging Search API response. - NewPrice: - description: The new price. - ChangedAmount: - description: The difference between `OriginalPrice` and `NewPrice`. - TransactionId: - type: string - description: Unique identifier for the transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - StayDates: - allOf: - - $ref: '#/components/schemas/StayDates' - - description: Dates of the requested property stay. - - properties: - CheckInDate: - description: | - Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. - - This parameter should be used in combination with the `checkOut` parameter. - - The maximum advanced search window is 330 days in the future. - - The maximum length of stay is 28 days. - CheckOutDate: - description: | - Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. - - This parameter should be used in combination with the `checkIn` parameter. - - The maximum advanced search window is 330 days in the future. - - The maximum length of stay is 28 days. - LengthOfStay: - type: integer - description: The number of stay nights. - format: int32 - example: 3 - NumberOfRooms: - type: integer - description: Number of rooms requested. - format: int32 - example: 3 - Occupants: - type: array - description: | - Container for the list of rooms requested by the traveler. - - Occupancy for each room is specified in this node. - items: - allOf: - - $ref: '#/components/schemas/Occupant' - - description: | - Container for the list of rooms requested by the traveler. - - Occupancy for each room is specified in this node. - - properties: - Adults: - description: Specifies the number of adults staying in each room. - ChildAges: - description: Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. - ValidFormsOfPayment: - type: array - description: Container for payment information. - items: - $ref: '#/components/schemas/ValidFormsOfPayment' - HotelDetails: - $ref: '#/components/schemas/Hotel' - HotelPolicies: - type: object - properties: - CheckInStartTime: - type: string - description: Beginning of the standard check-in window on the check in date, and in the local time of the hotel. - example: 3 PM - CheckInEndTime: - type: string - description: End of the standard check-in window on the check in date, and in the local time of the hotel. - example: 5 PM - SpecialCheckInInstructions: - type: array - description: Some special instructions needed care by customer when check in. - example: - - "Special Instructions: The check-in location differs from the property location. To check in, go to 301 N Water St." - items: - type: string - description: | - Any special instructions that the guest would need to know in order to check in. - - Particularly important in a vacation rental property, as many of these do not have a hosted front desk as - a hotel would. - example: "Special Instructions: The check-in location differs from the property location. To check in, go to 301 N Water St." - CheckOutTime: - type: string - description: Customers must check out before this time on the check out date, expressed in the local time of the hotel. - example: noon - PetPolicies: - type: array - description: The policy of the property toward having pets stay with guests. - example: - - Pets allowed, Up to 20 lb - items: - type: string - description: The policy of the property toward having pets stay with guests. - example: Pets allowed, Up to 20 lb - ChildrenAndExtraBedsPolicies: - type: array - description: The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. - example: - - Children are welcome, Cribs/infant beds (surcharge) - items: - type: string - description: Container for Hotel policy information. - HotelPropertyType: - type: object - properties: - Id: - type: integer - description: The id of hotel property type. - format: int32 - example: 13 - Name: - type: string - description: The name of hotel property type. - example: Ranch - description: | - Container for information on hotel property type. - - You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - Link: - type: object - properties: - Accept: - type: string - description: The Accept request header (for API queries only - not included for page URLs). - Method: - type: string - description: Method of request. - Href: - type: string - description: The URL of the destination web page or API query. - Location: - type: object - properties: - Address: - $ref: '#/components/schemas/Address' - GeoLocation: - allOf: - - $ref: '#/components/schemas/GeoLocation' - - description: Container for information on the geographic location of the hotel. - - properties: - Latitude: - type: string - description: | - The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. - - North latitude will be represented by a positive value. - - South latitude will be represented by a negative value. - example: "38.184978" - Longitude: - type: string - description: | - The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). - - East longitude will be represented by a positive value. - - West longitude will be represented by a negative value. - example: "85.7412" - Obfuscated: - type: boolean - description: | - Indicates whether the displayed Latitude/Longitude information is obfuscated. - - Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search - or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long - value will be returned that will indicate the general area within which the property is located, - but not the exact location of the property itself. - Neighborhood: - $ref: '#/components/schemas/Neighborhood' - description: Container for list of possible locations that could be used to - disambiguate the query. - LodgingAmenity: - type: object - properties: - Id: - type: string - example: "2065" - Name: - type: string - example: Business center - MandatoryFeesDetail: - type: object - properties: - Type: - type: string - description: Type of mandatory fee. - enum: - - City_LocalTax_Amt - - City_LocalTax_Pcnt - - CleaningFee_Amt - - CleaningFee_Pcnt - - ClubCardAdult - - ClubCardChild - - DestinationFee_Amt - - DestinationFee_Pcnt - - GalaDinnerAdult - - GalaDinnerChild - - GalaDinnerChineseNYAdult - - GalaDinnerChineseNYChild - - GalaDinnerNYDayAdult - - GalaDinnerNYDayChild - - GalaDinnerNYEveAdult - - GalaDinnerNYEveChild - - GalaDinnerValentinesDayAdult - - GalaDinnerValentinesDayChild - - GalaDinnerXMASDayAdult - - GalaDinnerXMASDayChild - - GalaDinnerXMASEveAdult - - GalaDinnerXMASEveChild - - ResortFee_Amt - - ResortFee_Pcnt - - SanitationFee - - SeasonalHeatingFee - - TourismFee_Amt - - TourismFee_Pcnt - - TowelSheetsFee_Amt - - TransferFee_Amt_Adult - - TransferFee_Amt_Child - - UtilitySurcharge - example: TransferFee_Amt_Child - Amount: - allOf: - - $ref: '#/components/schemas/Money' - - description: Value of hotel mandatory fee. - description: The breakdown for the taxes and fees that must be paid at the property. - Media: - type: object - properties: - Type: - type: string - description: | - Supported type of media. - - 1=Image. - - Only 1 is supported now. - example: "1" - enum: - - 1 - Title: - type: string - description: Image title - example: Guestroom - Size: - type: string - description: | - Image size. - You can find a link to the complete list of Supported Images Sizes in - [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - example: t - Url: - type: string - description: Image URL - example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg - description: Container for hotel images - Money: - type: object - properties: - Value: - type: string - description: The value of the element being defined. - example: "21.9" - Currency: - type: string - description: The ISO 4217 Currency Code that the value is expressed in. - example: USD - LocalCurrencyPrice: - $ref: '#/components/schemas/Money' - description: Pricing information of the stat date - Neighborhood: - type: object - properties: - Id: - type: string - description: Neighborhood id. - example: "6160232" - Name: - type: string - description: Neighborhood name. - example: Le Pharo - description: Geography entities which are typically contained within a city. - This includes the categories neighborhood and point of interest. Low level - regions are not a formally defined concept in the geography model. - NightlyRates: - type: object - properties: - StayDate: - type: string - format: date - example: 2022-07-19 - BaseRate: - $ref: '#/components/schemas/Money' - NonRefundableDateRange: - type: object - properties: - StartDate: - type: string - description: Start date of a non-refundable date range. - format: date - example: 2022-07-04 - EndDate: - type: string - description: End date of a non-refundable date range. - format: date - example: 2022-07-05 - Occupant: - type: object - properties: - Adults: - type: integer - description: | - The number of adults in a room. - format: int32 - example: 1 - ChildAges: - type: array - description: | - The ages of children in a room. - example: - - 2 - - 3 - - 5 - items: - type: integer - description: | - The age of children in a room. - format: int32 - description: Container for the list of room occupants. - PaymentSchedule: - type: object - properties: - Due: - type: string - description: Date/Time stamp when this installment/deposit should be paid by. - format: date - example: 2022-09-03 - Price: - allOf: - - $ref: '#/components/schemas/Money' - - description: The monetary amount of the install/deposit required to book the hotel and product. - description: Contains information on the payment schedule. - Phone: - type: object - properties: - CountryCode: - type: string - description: The designated country calling code. - example: "1" - AreaCode: - type: string - description: The phone's area code. - example: "614" - Number: - type: string - description: The phone's local number. - example: "9288472" - ExtensionNumber: - type: string - description: Optional extension number, if required to reach the hotel. - example: "3114" - Promotion: - type: object - properties: - Description: - type: string - description: The description of the promotion. - example: 20%Off - Amount: - allOf: - - $ref: '#/components/schemas/Money' - - description: | - The value of the promotion. - - **CMA Compliance Note (UK)**: Both standard room rates and promotional rates are set and managed by the - hoteliers and not Expedia. - PropertyDetails: - type: object - properties: - PropertyRegistryNumber: - type: string - description: The registry number of property. - example: P-20131 - HostLanguages: - type: array - description: The languages the host of property will speak. - example: ["English","Chinese"] - items: - type: string - MaxOccupancy: - type: integer - description: The maximum number of guests allowed to stay in the property. - format: int32 - example: 12 - NumberOfBedrooms: - type: integer - description: The number of bedrooms in the property. - format: int32 - example: 4 - NumberOfBathrooms: - type: integer - description: The number of bathrooms in the property. - format: int32 - example: 1 - SquareFeet: - type: string - description: Property area in square feet. - example: "123.5" - PropertyManager: - $ref: '#/components/schemas/PropertyManager' - description: | - Container for information about the hotel property detail. It will be shown for Vacation Rental hotel only. - PropertyManager: - type: object - properties: - Name: - type: string - description: The name of the property manager. - example: Mike - CalendarLastUpdated: - type: string - description: The latest updated date. - format: date - PhotoUrl: - type: string - description: The URL for property manager's photo. - example: https://imagesus-ssl.homeaway.com/mda01/ff30bc14-157c-43fc-ad8c-d2ce36bc7e83.4.1 - description: Container for information about the property manager. It will be shown for Vacation Rental hotel only. - RatePlan: - type: object - properties: - RoomTypeId: - type: string - description: The room type identifier. - example: "200287452" - RatePlanId: - type: string - description: The rate plan identifier. - example: "201714191" - RateRuleId: - type: string - description: The identifier of rate rule. - example: "213544817" - InventorySourceId: - type: string - description: The identification number of the source that provides the rate plan. - example: "24" - InventorySourceCode: - type: string - description: The source name that provided the rate plan. - example: JT - StayDates: - $ref: '#/components/schemas/StayDates' - RemainingCount: - type: integer - description: | - The number of rooms remaining through Expedia for this room type. - - **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, - only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's - inventory. - - When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel - through other channels. - - Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are - more than 100 rooms available within bookable Expedia inventory. - - **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to - consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number - remaining at the property. - format: int32 - example: 3 - Price: - type: object - description: Container for all price components of the rate plan. - properties: - BaseRate: - allOf: - - $ref: '#/components/schemas/Money' - description: The price of the rate plan for all occupants, excluding taxes and fees. - TaxesAndFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total rate of taxes and fees of the rate plan for all occupants. - TotalPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. - Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. - Promotion amount have been deducted from the `TotalPrice` value. - TotalStrikeOutPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the - pre-discount `TaxesAndFees`. - AvgNightlyRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` - divided by `StayDates` and by `room number`. - AvgNightlyStrikeOutRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average nightly strike out price per night per room of the rate plan, which is equal to the - strike out of `BaseRate` divided by `StayDates` and by `room number`. - HotelMandatoryFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total mandatory fees which will be charged at the hotel for the rate plan. - RefundableDamageDeposit: - allOf: - - $ref: '#/components/schemas/Money' - description: The refundable damage deposit. - NightlyRates: - type: array - items: - allOf: - - $ref: '#/components/schemas/NightlyRates' - - properties: - StayDate: - description: A single night during the requested stay. - BaseRate: - description: Container for nightly base rate. - description: Nightly base rate of the rate plan. - TaxesAndFeesDetails: - type: array - items: - allOf: - - $ref: '#/components/schemas/TaxesAndFeesDetail' - - properties: - CategoryCode: - description: Category ID of this specific tax or fee. - Amount: - description: The value of this specific tax or fee. - description: | - Container for taxes and fees detail information. - Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - RoomRates: - type: array - items: - allOf: - - $ref: '#/components/schemas/RoomRates' - description: Container for the rate information of all rooms. This is only returned in Lodging Details API. - MemberOnlyDeal: - type: boolean - description: | - Indicates whether the rate is for member only. - - Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - example: true - Promotions: - type: array - description: All promotion information of the `ratePlan`. - items: - $ref: '#/components/schemas/Promotion' - StandalonePrice: - type: object - description: | - The corresponded standalone price to the package rate plan (to show the `strikethrough`). - - Only returned when the returned `rateplan` is being used as part of a package. - properties: - BaseRate: - allOf: - - $ref: '#/components/schemas/Money' - description: The standalone price of the rate plan for all occupants, excluding taxes and fees. - StrikeOutBaseRate: - allOf: - - $ref: '#/components/schemas/Money' - description: The base rate strikeout in the standalone shopping path. - TaxesAndFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total standalone rate of taxes and fees of the rate plan for all occupants. - StrikeOutTaxesAndFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The taxes and fees strikeout in the standalone shopping path. - TotalPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. - Hotel mandatory fees are not included as these are paid at the hotel at checkout. - TotalStrikeOutPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - AvgNightlyRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average standalone nightly base rate per night per room of the rate plan, which is equal to the - `BaseRate` divided by `StayDates` and by `room number`. - AvgNightlyStrikeOutRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to - `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - HotelMandatoryFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total standalone mandatory fees. - StrikeOutHotelMandatoryFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The strikeout of the mandatory fees in the standalone shopping path. - TaxesAndFeesInclusive: - type: boolean - description: Indicates whether taxes and fees are included in base rate. - example: false - GuaranteeText: - type: string - description: Text description for any deposit information provide by the - property (if applicable). - example: Price Guarantee - PaymentMethod: - type: string - description: | - Room payment information. The available options are: - - Online: Pay at the time of booking - - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` - example: Online - enum: - - Online - - Hotel - PaymentTime: - type: string - description: | - The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - - UponBooking - - PayLater - - SupplierDiscretion - example: PayLater - enum: - - UponBooking - - PayLater - - SupplierDiscretion - FullDepositUponBooking: - type: boolean - description: | - It will be true if PaymentSchedule has one installment and the value of "Due" is booking date, otherwise, - it will be false. - example: true - PaymentSchedule: - type: array - description: Contains information on the payment schedule. - items: - $ref: '#/components/schemas/PaymentSchedule' - ReserveWithDeposit: - type: boolean - description: Indicates whether this rate plan need deposit to reserve. - example: true - FreeInternet: - type: boolean - description: Indicates whether the price of the room includes free Internet. (either wireless or wired) - example: true - FreeWiFi: - type: boolean - description: Indicates whether the price of the room includes free wireless Internet access. - example: true - FreeInternetDetails: - type: array - description: | - The localized details for the free internet amenity (only shown when FreeInternet = true). - - You can find a link to the complete list of Free Internet Details in - [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - example: - - "Free Wireless Internet, Wired high-speed Internet-comp" - items: - type: string - description: The localized details for the free internet amenity (only shown when FreeInternet = true). - example: Free Wireless Internet, Wired high-speed Internet-comp - FreeParking: - type: boolean - description: Indicates whether the price of the room includes free parking. - example: true - FreeBreakfast: - type: boolean - description: Indicates whether the price of the room includes free breakfast. - example: true - FreeBreakfastDetails: - type: array - description: | - The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). - - You can find a link to the complete list of Free Breakfast Details in - [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - example: - - Full Breakfast - - Full Board - items: - type: string - description: The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). - example: Full Breakfast - HcomRewardsEarn: - type: boolean - description: Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) - example: true - HcomRewardsBurn: - type: boolean - description: Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) - example: true - CancellationPolicy: - $ref: '#/components/schemas/CancellationPolicy' - Amenities: - type: array - description: The amenities of the `rateplan`. - items: - allOf: - - $ref: '#/components/schemas/LodgingAmenity' - - description: The amenities of the `rateplan`. - - properties: - Id: - description: Amenity ID. - Name: - description: Amenity Name. - description: Container for information on each rate plan. - RoomOccupancyPolicy: - type: object - properties: - MaxGuestCount: - type: integer - description: The maximum number of guests allowed to stay in a room. - format: int32 - example: 3 - MinCheckInAge: - type: integer - description: The minimum age required for check-in. - format: int32 - example: 19 - IncludedGuestCount: - type: integer - description: The number of guests included in base rate. - format: int32 - example: 2 - MinGuestAge: - type: integer - description: The minimum age required for any guest staying in the room. - format: int32 - example: 0 - AgeClassRestrictions: - type: array - description: Container for room occupancy rules based on the age of the guests. - items: - $ref: '#/components/schemas/AgeClassRestriction' - description: Room occupancy policy. - RoomPreference: - type: object - properties: - Type: - type: string - description: |- - The type of preference. Options are: - SmokingPreference - Bed - example: SmokingPreference - enum: - - SmokingPreference - - Bed - Value: - type: string - description: "The value of the room preference.\n\nFor SmokingPreference,\ - \ options are\n\nSmokingOrNonSmoking\nSmoking\nNonSmoking\nFor supported\ - \ Bed Types, please refer to the Related Links section at the bottom of\ - \ the page." - example: NonSmoking - description: Container for room preferences. - RoomRates: - type: object - properties: - RoomIndex: - type: integer - description: Index of which of the requested rooms this entry refers to. - format: int32 - example: 1 - BaseRate: - allOf: - - $ref: '#/components/schemas/Money' - - description: The price of the room, excluding taxes and fees. - TaxesAndFees: - allOf: - - $ref: '#/components/schemas/Money' - - description: The total rate of taxes and fees of the room. - TotalPrice: - allOf: - - $ref: '#/components/schemas/Money' - - description: | - The total price of the room, which is equal to the sum of the `BaseRate` and `TaxesAndFees`. - - Hotel mandatory fees are not included as these are paid at the property at checkout. - TotalStrikeOutPrice: - allOf: - - $ref: '#/components/schemas/Money' - - description: | - The total strike out price of the room, which is equal to the sum of the `BaseRate`'s totalStrikeOut - and `TaxesAndFees`'s totalStrikeOut. - TaxesAndFeesDetails: - type: array - description: | - The breakdown for taxes and fees for this room for the entire stay. - - Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - items: - allOf: - - $ref: '#/components/schemas/TaxesAndFeesDetail' - - properties: - CategoryCode: - description: Tax or fee category code. - Amount: - description: Tax or fee value. - MandatoryFeesDetails: - type: array - description: The breakdown for the taxes and fees that must be paid at the property. - items: - $ref: '#/components/schemas/MandatoryFeesDetail' - NightlyRates: - type: array - description: Container for the nightly rate of current room. - items: - allOf: - - $ref: '#/components/schemas/NightlyRates' - - description: Container for the nightly rate of current room. - - properties: - StayDate: - description: One date of the property stay - BaseRate: - description: Nightly Base Rate for the selected date of stay. - RoomType: - type: object - properties: - Description: - type: string - description: Text description of the room type. - example: "Room, 1 King Bed, City View (Seattle V)" - RoomKey: - type: string - description: | - An encrypted string which includes the information that could be used to address the current room type. - - `RoomKey` has been renamed as `OfferId`. - deprecated: true - OfferId: - type: string - description: An encrypted string which includes the information that could - be used to address the current room type. - example: wMRoCMjQqCDIwMTcwN - MerchantName: - type: string - description: Name of Merchant that did the initial Authentication. - example: EXPEDIA - RatePlanType: - type: string - description: | - Indicate the room type is sold as package or standalone. - example: package - enum: - - standalone - - package - - wholesale - RatePlans: - type: array - description: Container for rate plan information. - items: - $ref: '#/components/schemas/RatePlan' - Price: - type: object - description: Container of all price components of the room. - properties: - BaseRate: - allOf: - - $ref: '#/components/schemas/Money' - description: The price of the rate plan for all occupants, excluding taxes and fees. - TaxesAndFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total rate of taxes and fees of the rate plan for all occupants. - TotalPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel - mandatory fees are not included as these are paid at the hotel at checkout. - TotalStrikeOutPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s - `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. - AvgNightlyRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` - divided by `StayDates` and by `room number`. - AvgNightlyStrikeOutRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average nightly strike out rate per night per room of the room type, which is equal to the - strike out of `BaseRate` divided by `StayDates` and by `room number`. - AvgNightlyRateWithFees: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - AvgNightlyStrikeoutRateWithFees: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. - HotelMandatoryFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total mandatory fees which will be charged at the hotel for the rate plan. - TotalPriceWithHotelFees: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + - `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. - **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the - quoted price will only be accurate for the day of quote. This is due to the fact that - currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to - be collected at the hotel during the guest's stay if the cost is converted into any other currency. - **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to - be compliant with CMA requirements. - RefundableDamageDeposit: - allOf: - - $ref: '#/components/schemas/Money' - description: The refundable damage deposit for the rate plan. - StandalonePrice: - type: object - description: | - The corresponded standalone price to the package rate plan (to show the `strikethrough`). - - Only returned when this is a package rate plan. - properties: - BaseRate: - allOf: - - $ref: '#/components/schemas/Money' - description: The standalone price of the rate plan for all occupants, excluding taxes and fees. - StrikeOutBaseRate: - allOf: - - $ref: '#/components/schemas/Money' - description: The base rate strikeout in the standalone shopping path. - TaxesAndFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total standalone rate of taxes and fees of the rate plan for all occupants. - StrikeOutTaxesAndFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The taxes and fees strikeout in the standalone shopping path. - TotalPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. - Hotel mandatory fees are not included as these are paid at the hotel at checkout. - TotalStrikeOutPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - AvgNightlyRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average standalone nightly base rate per night per room of the rate plan, which is equal to the - `BaseRate` divided by `StayDates` and by `room number`. - AvgNightlyStrikeOutRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to - `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - HotelMandatoryFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total standalone mandatory fees. - StrikeOutHotelMandatoryFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The strikeout of the mandatory fees in the standalone shopping path. - Promotions [deprecated]: - type: array - description: | - All promotion information of the room. - - **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. - deprecated: true - items: - $ref: '#/components/schemas/Promotion' - Links: - type: object - properties: - WebSearchResult: - allOf: - - $ref: '#/components/schemas/Link' - - description: Link to web search result page. - WebDetails: - allOf: - - $ref: '#/components/schemas/Link' - - description: Link to web infosite. - ApiDetails: - allOf: - - $ref: '#/components/schemas/Link' - - description: Link for details API. - additionalProperties: - $ref: '#/components/schemas/Link' - description: | - Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking - of the selected offer. - - Which links are returned in this section are defined by the `links` parameter in the Search API query. - - Available links are: - - WebSearchResult (link to web search result page) - - WebDetails (link to web infosite) - - ApiDetails (link for details API) - SmokingOption: - type: string - description: The smoking options available for the room type. - example: SmokingOrNonSmoking - enum: - - SmokingOrNonSmoking - - Smoking - - NonSmoking - BedTypeOptions: - type: array - description: | - Statement of bed types available for this offer. A room may have several bed type options available. - - **NOTE**: due to the large number of bed type options available, we no longer publish a list of available - bed types. More information is available in - [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - items: - $ref: '#/components/schemas/BedType' - RoomOccupancyPolicy: - $ref: '#/components/schemas/RoomOccupancyPolicy' - Amenities: - type: array - description: Container for all room amenities. - items: - allOf: - - $ref: '#/components/schemas/LodgingAmenity' - - description: The amenity of the room. - - properties: - Id: - description: Amenity id - Name: - description: Amenity name - DescriptiveAmenities: - type: object - additionalProperties: - type: array - items: - type: string - description: | - Container for all room amenities in group. - - The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - - ACCESSIBILITY - - BATHROOM - - BEDROOM - - CLUB_EXEC - - FAMILY_FRIENDLY - - ENTERTAINMENT - - FOOD_AND_DRINK - - INTERNET - - MORE - - OUTDOOR_SPACE - - SAFETY - example: - FOOD_AND_DRINK: - - "2 restaurants" - - "Coffee/tea in common area(s)" - Media: - type: array - description: Container for Media elements. - items: - allOf: - - $ref: '#/components/schemas/Media' - - description: Media elements. - StayDates: - type: object - properties: - CheckInDate: - type: string - description: The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - format: date - CheckOutDate: - type: string - description: The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - format: date - description: Container for information for the stay dates of the rate plan. - TaxesAndFeesDetail: - type: object - properties: - CategoryCode: - type: string - example: "401" - Amount: - $ref: '#/components/schemas/Money' - ValidFormsOfPayment: - type: object - properties: - PaymentMethod: - type: string - description: The payment method. - example: DebitCard - Name: - type: string - description: The brand name of the payment sub-method to be displayed to the customer. - example: Visa - PaymentSubMethod: - type: string - description: The payment sub-method. - example: Visa - deprecated: true - BrandName: - type: string - description: | - The brand name of the payment sub-method to be displayed to the customer. - - In many cases it will be the same as the payment sub-method, but "Visa/Carte Blanche" and "Visa/Delta" are some of the exceptions. - example: Visa - deprecated: true - description: Container for hotel supported payment information. - Warning: - type: object - properties: - Code: - type: string - description: The code of a warning. - example: INVALID_CORPORATE_DISCOUNT_CODE - Description: - type: string - description: A detail information of what happened. - example: The Corporate DiscountCode '811490' is unavailable, but we found other rates for you. - OriginalPrice: - $ref: '#/components/schemas/Money' - NewPrice: - $ref: '#/components/schemas/Money' - ChangedAmount: - $ref: '#/components/schemas/Money' - ChangedPercentage: - type: string - description: |- - The changed percentage. - In the sample 2.97 means the changed percentage is 2.97%. - example: "2.97" - description: | - There were some errors or events during the transaction, but the API has still returned a response. - - Container for all warnings. - When: - type: object - properties: - Type: - type: string - description: |- - Indicates the time of the deposit collection. - Options are: - UPON_BOOKING - The customer must pay the deposit when booking the property. - DAYS_PRIOR - The customer must pay the deposit a number of days before arriving at the property. - UPON_ARRIVAL - The customer must pay the deposit upon arriving at the property. - example: UPON_BOOKING - enum: - - UPON_BOOKING - - DAYS_PRIOR - - UPON_ARRIVAL - Value: - type: string - description: This value will only be shown when Deposit Type is DAYS_PRIOR - to indicate the number of days prior to check in when the deposit will - be collected. - example: "1" - description: Indicate when to pay. - Error: - type: object - properties: - Code: - type: string - description: Error code describing the issue - example: AMBIGUOUS_LOCATION - DetailCode: - type: string - description: Detailed error code describing the issue. - example: MULTIPLE_AMBIGUOUS_LOCATION - Description: - type: string - description: A simple description of what the error is. - example: More than one location found - LocationKeyword: - type: string - description: The requested location that caused the error. - example: Portland - LocationOptions: - type: array - description: Container for possible matches to your ambiguous `locationKeyword` query. - items: - $ref: '#/components/schemas/LocationOption' - description: Container for error list. - Errors: - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: '#/components/schemas/Error' - TransactionId: - type: string - description: A unique identifier for the transaction. - example: a9e371c4-89d9-4f9c-8df7-df105830e7fe - LocationOption: - type: object - properties: - Type: - type: string - description: Type of the location. - example: TRAINSTATION - RegionId: - type: string - description: RegionId the location resides in. - example: "6200275" - ShortName: - type: string - description: The name of the location which matches the location keyword. - example: Dublin Connolly Station - AirportCode: - type: string - description: Indicates the nearest major airport to the location. - example: DUB - Address: - type: string - description: The address of the location. - example: "Dublin Connolly Station, Ireland" - Country: - $ref: '#/components/schemas/Country' - GeoLocation: - $ref: '#/components/schemas/GeoLocation' - description: Container for possible matches to your ambiguous `locationKeyword` query. - APIGatewayError: - type: object - properties: - message: - type: string - HotelListingsResponse: - type: object - properties: - Warnings: - type: array - description: | - There were some errors or events during the transaction, but the API has still returned a response. - - Container for all warnings. - items: - $ref: '#/components/schemas/Warning' - Count: - type: integer - description: The number of hotels actually returned in the response. - format: int32 - example: 99 - TotalHotelCount: - type: integer - description: The number of hotels present in the location. - format: int32 - example: 230 - TransactionId: - type: string - description: Unique identifier for the transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - StayDates: - allOf: - - $ref: '#/components/schemas/StayDates' - - description: Container for requested dates of stay. - LengthOfStay: - type: integer - description: The number of stay nights. - format: int32 - example: 3 - NumberOfRooms: - type: integer - description: The number of the rooms requested on behalf of the user. - format: int32 - example: 3 - Occupants: - type: array - description: Container of occupants. It is an array including occupants of each room. - items: - $ref: '#/components/schemas/Occupant' - Hotels: - type: array - description: Container for all hotels. - items: - $ref: '#/components/schemas/Hotel' - HotelRateCalendar: - type: object - properties: - EcomHotelId: - type: string - description: The unique, Expedia-specific hotel property identifier used to designate a single hotel. - example: "14747" - HcomHotelId: - type: string - description: | - The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. - - This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. - example: "10532" - RateCalendar: - type: array - description: Container for all rate calendar data. - items: - $ref: '#/components/schemas/RateCalendar' - description: Container for all hotel rate calendar data. - RateCalendar: - type: object - properties: - StayDate: - type: string - description: Stay date for which the price is returned. - format: date - example: 2022-09-02 - Price: - allOf: - - $ref: '#/components/schemas/Money' - - description: Container for pricing information. - - properties: - Value: - description: The total price of the corresponding date. - Currency: - description: | - The ISO 4217 Currency Code that the Value is expressed in. - - See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) - for a full list of supported currencies. - PriceLevel: - type: string - description: | - Indicates how that day's price compares to the other lowest price for that hotel over the searched date - range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - - HIGH: 65th percentile+ - - MEDIUM: 30th Percentile+ - - LOW: Anything lower than 30th percentile - example: MEDIUM - enum: - - HIGH - - MEDIUM - - LOW - Status: - type: string - description: Represents whether the offer is currently available. - enum: - - AVAILABLE - - NOT_AVAILABLE - example: AVAILABLE - description: The lowest rate information of requested days - RateCalendarResponse: - type: object - properties: - Warnings: - type: array - description: | - There were some errors or events during the transaction, but the API has still returned a response. - - Container for all warnings. - items: - $ref: '#/components/schemas/Warning' - TransactionId: - type: string - description: Unique identifier for the transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - RateCalendars: - type: array - description: Container for all hotel rate calendar data. - items: - $ref: '#/components/schemas/HotelRateCalendar' - securitySchemes: - Authorization: - type: http - scheme: basic diff --git a/specs/xap-lodging.specs.yaml b/specs/xap-lodging.specs.yaml deleted file mode 100644 index 5d919d589..000000000 --- a/specs/xap-lodging.specs.yaml +++ /dev/null @@ -1,998 +0,0 @@ -openapi: 3.0.1 -info: - title: EWSHotel API - description: | - The XAP Lodging Search APIs can be used by partners both booking via an Expedia website, or by partners that - will be booking via the XAP APIs. Each API also provides pre-configured links to the Expedia website, - the XAP Booking API, or both. - contact: - name: PartnerAPIs - url: https://confluence.expedia.biz/display/EWS/EWSHotel - email: dreamweaver@expedia.com - version: v3 - x-eg-lifecycle: LIVE - x-eg-tags: ["Partner", "EWS", "XAP", "EWSHotel", "Hotel", "Lodging", "LodgingQuotes","LodgingAvailabilityCalendar"] -tags: - - name: Lodging Quotes - - name: Lodging Availability Calendars -servers: - - url: 'https://apim.expedia.com' - description: Production Server -paths: - /lodging/quotes: - get: - tags: - - Lodging Quotes - summary: Get properties price and availability information - description: | - The Lodging Quotes API will return the price and availability information for given Expedia lodging property ID(s). - operationId: get-lodging-quotes - parameters: - - name: Key - in: header - description: | - The partner API key is a case-sensitive, alphanumeric string that looks something like this: - - **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** - - The API Key is assigned and configured as part of the API on-boarding process. - It will be sent to the partner by their Expedia Account Manager or representative. - required: true - schema: - type: string - - name: Partner-Transaction-Id - in: header - description: | - The `Partner-Transaction-ID` is a required API request header element that is not consumed - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - back to the partner in the corresponding API response header. - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: propertyIds - in: query - description: | - Comma-separated list of Expedia Property IDs. - - ***NOTE**: This API supports Expedia property IDs only by design – HCOM and Vrbo property IDs are - not supported.* - - *For optimal performance, limiting your request to a maximum of 200 properties is recommended.* - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - - name: checkIn - in: query - description: | - Check-in date for property stay in an ISO 8601 Date format. - - This parameter should be used in combination with the checkOut parameter. - - The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. - schema: - type: string - format: date - example: '2023-10-12' - - name: checkOut - in: query - description: | - Check-out date for property stay in an ISO 8601 Date format - - This parameter should be used in combination with the checkIn parameter. - - The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. - schema: - type: string - format: date - example: '2023-10-14' - - name: currency - in: query - description: | - The requested currency expressed according to ISO 4217. - - PoS default currency will be passed if another currency is not specified in the request. - schema: - type: string - - name: links - in: query - description: | - Comma-separated list to specify the types of deep links. - - WD (link to web infosite) - - WS (link to web search result page) - - WEB (include all website links) - explode: false - schema: - type: array - items: - type: string - enum: - - WD - - WS - - WEB - - name: travelWithPets - in: query - description: | - Indicates if the search should include pet-friendly properties. - - If set to "True" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. - - The parameter is only applicable to the Vrbo brand. - schema: - type: boolean - default: false - - name: room1.adults - in: query - description: | - Specifies the number of adults staying in a specific room. - - Example: `room1.adults` is used to specify the number of adults in the first room. - - ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo - properties should only include one room. e.g. 3 adults in room 1 and 3 in room 2, "room1.adults" is 6. - schema: - type: integer - format: int64 - example: 2 - - name: room1.childAges - in: query - description: | - Comma-separated list that specifies the age(s) for each of the children in each of the rooms. - - Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. - - Children must be accompanied by an adult. - - Total number of children is indicated by the number of childAges included. - - If there are no children in the party then this value should not be included. - - ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo - properties should include the ages of all the children in the first room. e.g. 1 child age 10 in room #1 - and 1 child age 11 in room #2, "room1.childAges" is 10,11. - explode: false - schema: - type: array - items: - type: string - example: - - 8 - - 10 - - name: room2.adults - in: query - description: Specifies the number of adults staying in second room. - schema: - type: integer - format: int64 - - name: room2.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in second room. - explode: false - schema: - type: array - items: - type: string - - name: room3.adults - in: query - description: Specifies the number of adults staying in third room. - schema: - type: integer - format: int64 - - name: room3.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in third room. - explode: false - schema: - type: array - items: - type: string - - name: room4.adults - in: query - description: Specifies the number of adults staying in fourth room. - schema: - type: integer - format: int64 - - name: room4.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in fourth room. - explode: false - schema: - type: array - items: - type: string - - name: room5.adults - in: query - description: Specifies the number of adults staying in fifth room. - schema: - type: integer - format: int64 - - name: room5.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in fifth room. - explode: false - schema: - type: array - items: - type: string - - name: room6.adults - in: query - description: Specifies the number of adults staying in sixth room. - schema: - type: integer - format: int64 - - name: room6.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in sixth room. - explode: false - schema: - type: array - items: - type: string - - name: room7.adults - in: query - description: Specifies the number of adults staying in seventh room. - schema: - type: integer - format: int64 - - name: room7.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in seventh room. - explode: false - schema: - type: array - items: - type: string - - name: room8.adults - in: query - description: Specifies the number of adults staying in eighth room. - schema: - type: integer - format: int64 - - name: room8.childAges - in: query - description: Comma-separated list that specifies the age(s) for each of the - children in eighth room. - explode: false - schema: - type: array - items: - type: string - responses: - "200": - description: Normal Response - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: '#/components/schemas/LodgingQuotesResponse' - examples: - Lodging Quotes Response: - value: |- - { - "Count": 1, - "TotalPropertyCount": 1, - "TransactionId": "0e1d7193-2289-481c-bdf9-b7ac0b0b3bfe", - "StayDates": { - "CheckInDate": "2024-11-29", - "CheckOutDate": "2024-12-04" - }, - "LengthOfStay": 5, - "Occupants": [ - { - "Adults": 2 - } - ], - "Properties": [ - { - "Id": "87704892", - "Status": "AVAILABLE", - "RoomTypes": [ - { - "RatePlans": [ - { - "CancellationPolicy": { - "Refundable": true, - "FreeCancellation": true, - "FreeCancellationEndDateTime": "2024-11-15T23:59:00-08:00", - "CancellationPenaltyRules": [ - { - "PenaltyPercentOfStay": "50.00", - "PenaltyStartDateTime": "2024-11-15T23:59:00-08:00", - "PenaltyEndDateTime": "2024-11-22T23:59:00-08:00" - }, - { - "PenaltyPercentOfStay": "100", - "PenaltyStartDateTime": "2024-11-22T23:59:00-08:00", - "PenaltyEndDateTime": "2024-11-29T00:00:00-08:00" - } - ] - } - } - ], - "Price": { - "BaseRate": { - "Value": "790.00", - "Currency": "USD" - }, - "TaxesAndFees": { - "Value": "348.48", - "Currency": "USD" - }, - "TotalPrice": { - "Value": "1138.48", - "Currency": "USD" - }, - "AvgNightlyRate": { - "Value": "158.00", - "Currency": "USD" - }, - "AvgNightlyRateWithFees": { - "Value": "198.80", - "Currency": "USD" - }, - "TotalPriceWithPropertyFees": { - "Value": "1138.48", - "Currency": "USD" - } - }, - "Links": { - "WebSearchResult": { - "Method": "GET", - "Href": "https://www.vrbo.com/search?selected=87704892&startDate=2024-11-29&endDate=2024-12-04&adults=2&tpid=9001&eapid=1&mpa=790.00&mpb=348.48&mpd=USD&mctc=15" - }, - "WebDetails": { - "Method": "GET", - "Href": "https://www.vrbo.com/3032772?adults=2&startDate=2024-11-29&endDate=2024-12-04&mpa=790.00&mpb=348.48&mpd=USD&mpe=1721730597" - } - } - } - ] - } - ] - } - "400": - description: User Fault - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: INVALID_PROPERTYID - Description: The PropertyIds is invalid. Which should be comma separated list of property IDs. - TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 - "500": - description: Service Error - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b - "401": - description: Invalid authentication credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Unauthorized - "403": - description: You cannot consume this service. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: API rate limit exceeded. - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Name resolution failed. - "504": - description: API time out. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: The upstream server is timing out. - security: - - Authorization: [] - /lodging/availabilityCalendars: - get: - tags: - - Lodging Availability Calendars - summary: Get availability calendars of properties - description: "Returns the availability of each day for a range of dates for given Expedia lodging properties." - operationId: get-lodging-availability-calendars - parameters: - - name: Key - in: header - description: | - The partner API key is a case-sensitive, alphanumeric string that looks something like this: - - **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** - - The API Key is assigned and configured as part of the API on-boarding process. - It will be sent to the partner by their Expedia Account Manager or representative. - required: true - schema: - type: string - - name: Partner-Transaction-Id - in: header - description: | - The `Partner-Transaction-ID` is a required API request header element that is not consumed - by Expedia. It will be required in all XAP v3 API request headers and will be mirrored - back to the partner in the corresponding API response header. - - The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - required: true - schema: - type: string - example: Partner123 - - name: propertyIds - in: query - description: | - Comma-separated list of Expedia Property IDs. - - The API request supports a maximum of 50 Property IDs in a single request. - explode: false - schema: - type: array - items: - type: string - uniqueItems: true - responses: - "200": - description: Normal Response - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: '#/components/schemas/AvailabilityCalendarResponse' - "400": - description: User Fault - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: INVALID_PROPERTYIDS - Description: The propertyIds is invalid. Which should be comma separated list of Expedia property IDs. - TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 - "500": - description: Service Error - content: - application/vnd.exp-lodging.v3+json: - schema: - $ref: '#/components/schemas/Errors' - example: - Errors: - - Code: APPLICATION_ERROR - Description: Application error. - TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b - "401": - description: Unauthorized or Invalid authentication credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Unauthorized - "403": - description: cannot consume this service. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: You cannot consume this service - "429": - description: API rate limit exceeded. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: API rate limit exceeded. - "503": - description: Service unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: Name resolution failed. - "504": - description: API time out. - content: - application/json: - schema: - $ref: '#/components/schemas/APIGatewayError' - example: - message: The upstream server is timing out. - security: - - Authorization: [] -components: - schemas: - CancellationPenaltyRule: - type: object - properties: - PenaltyPercentOfStay: - type: string - description: | - Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other - penalties listed. - example: "100" - PenaltyStartDateTime: - type: string - description: | - The beginning of the window of time when the `CancellationPenaltyRule` is in effect. - - The date and time are expressed in ISO 8601 International Date format, and local to the property. - format: date-time - example: 2022-07-23T15:00:00-08:00 - PenaltyEndDateTime: - type: string - description: | - The end of the window of time when the `CancellationPenaltyRule` is in effect. - - The date and time are expressed in ISO 8601 International Date format, and local to the property. - format: date-time - example: 2022-07-25T15:00:00-08:00 - description: Container for cancellation penalty details. - CancellationPolicy: - type: object - properties: - Refundable: - type: boolean - description: Indicate whether the rate is refundable or not. - example: true - FreeCancellation: - type: boolean - description: Indicate whether the room can be cancelled free of charge. - example: true - FreeCancellationEndDateTime: - type: string - description: The date and time until which the room can be cancelled free of charge. - format: date-time - CancellationPenaltyRules: - type: array - description: Container for Cancellation Penalty Rules information. - items: - $ref: '#/components/schemas/CancellationPenaltyRule' - description: Container for Cancellation Policy information. - Property: - type: object - properties: - Id: - type: string - description: The unique property identifier used to designate a single property. - example: "14747" - Status: - type: string - description: Represents whether the offer is currently available. - example: AVAILABLE - enum: - - AVAILABLE - - NOT_AVAILABLE - - ERROR - - NUMBER_OF_ADULTS_NOT_ACCEPTED - - NUMBER_OF_CHILDREN_NOT_ACCEPTED - - NUMBER_OF_INFANTS_NOT_ACCEPTED - - NUMBER_OF_PERSONS_NOT_ACCEPTED - - CHECK_IN_AGE_NOT_ACCEPTED - RoomTypes: - type: array - description: Container for all of available room types. - items: - $ref: '#/components/schemas/RoomType' - description: Container for information on each offered hotel. - Link: - type: object - properties: - Accept: - type: string - description: | - The Accept request header for API queries only. - - Note: this value will only be returned if the link is an API query, as website URLs do not require an - `Accept` header. - Method: - type: string - description: Method of request. - example: GET - Href: - type: string - description: The URL of the destination web page or API query. - Money: - type: object - properties: - Value: - type: string - description: The value of the element being defined. - example: "21.9" - Currency: - type: string - description: The ISO 4217 Currency Code that the value is expressed in. - example: USD - description: Pricing information of the stat date - Occupant: - type: object - properties: - Adults: - type: integer - description: The number of adults in a room. - format: int32 - example: 1 - ChildAges: - type: array - description: The ages of children in a room. - example: - - 2 - - 3 - - 5 - items: - type: integer - format: int32 - Promotion: - type: object - properties: - Description: - type: string - description: The description of the promotion. - example: 20%Off - Amount: - $ref: '#/components/schemas/Money' - RatePlan: - type: object - properties: - CancellationPolicy: - $ref: '#/components/schemas/CancellationPolicy' - Promotions: - type: array - description: All promotion information of the ratePlan. - items: - $ref: '#/components/schemas/Promotion' - description: Container for rate plan information. - RoomType: - type: object - properties: - RatePlans: - type: array - description: Container for rate plan information. - items: - $ref: '#/components/schemas/RatePlan' - Price: - type: object - properties: - BaseRate: - allOf: - - $ref: '#/components/schemas/Money' - description: The price of the rate plan for all occupants, excluding taxes and fees. - TaxesAndFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total amount of taxes and fees of the rate plan for all occupants. - TotalPrice: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. - Property mandatory fees are not included in this value as these are paid at the property at - checkout. - AvgNightlyRate: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` - divided by `StayDates` and by `room number`. - AvgNightlyRateWithFees: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - PropertyMandatoryFees: - allOf: - - $ref: '#/components/schemas/Money' - description: The total mandatory fees which will be charged at the property for the rate plan. - TotalPriceWithPropertyFees: - allOf: - - $ref: '#/components/schemas/Money' - description: | - The total price of the rate plan include property mandatory fees, which is equal to the sum of - `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. - **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the - quoted price will only be accurate for the day of quote. This is due to the fact that - currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to - be collected at the hotel during the guest's stay if the cost is converted into any other currency. - **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to - be compliant with CMA requirements. - RefundableDamageDeposit: - allOf: - - $ref: '#/components/schemas/Money' - description: The refundable damage deposit. - description: Container for Price information. - Links: - type: object - properties: - WebSearchResult: - allOf: - - $ref: '#/components/schemas/Link' - - description: Link to web search result page. - WebDetails: - allOf: - - $ref: '#/components/schemas/Link' - - description: Link to web infosite. - additionalProperties: - $ref: '#/components/schemas/Link' - description: | - Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. - - Which links are returned in this section are defined by the links parameter in the Search API query. - Available links are: - - WebDetails (link to web infosite) - - WebSearchResult (link to web search result page) - StayDates: - type: object - properties: - CheckInDate: - type: string - description: The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. - format: date - CheckOutDate: - type: string - description: The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. - format: date - description: | - Container for requested dates of stay. - Warning: - type: object - properties: - Code: - type: string - description: The code of a warning. - example: NO_RESULTS_FOUND - Description: - type: string - description: A description of what caused the issues. - example: | - Sorry, your query completed successfully, but did not return any inventory. Please adjust your - search parameters and try again. - Error: - type: object - properties: - Code: - type: string - description: Error code describing the issue - example: AMBIGUOUS_LOCATION - Description: - type: string - description: A simple description of what the error is. - example: 'Multiple pickup locations found. ' - description: Container for error list. - Errors: - type: object - properties: - Errors: - type: array - description: Container for error list. - items: - $ref: '#/components/schemas/Error' - TransactionId: - type: string - description: A unique identifier for the transaction. - example: a9e371c4-89d9-4f9c-8df7-df105830e7fe - APIGatewayError: - type: object - properties: - message: - type: string - LodgingQuotesResponse: - type: object - properties: - Warnings: - type: array - description: | - There were some errors or events during the transaction, but the API has still returned a response. - - Container for all warnings. - items: - $ref: '#/components/schemas/Warning' - Count: - type: integer - description: The number of properties actually returned in the response. - format: int32 - example: 99 - TotalPropertyCount: - type: integer - description: The number of properties requested. - format: int32 - example: 230 - TransactionId: - type: string - description: Unique identifier for the API transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - StayDates: - $ref: '#/components/schemas/StayDates' - LengthOfStay: - type: integer - description: The number of stay nights. - format: int32 - example: 3 - Occupants: - type: array - description: Container for the list of room occupants. - items: - $ref: '#/components/schemas/Occupant' - Properties: - type: array - description: Container for all properties. - items: - $ref: '#/components/schemas/Property' - DateRange: - type: object - description: The actual date range for the shown availability. - properties: - StartDate: - type: string - description: The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. - example: "2022-07-05" - format: date - EndDate: - type: string - description: The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. - example: "2023-07-05" - format: date - AvailabilityCalendar: - type: object - properties: - PropertyId: - type: string - description: The unique property identifier that designates a single property. - example: "74041788" - DateRange: - $ref: '#/components/schemas/DateRange' - Availability: - type: string - description: | - A string of codes that shows property availability, one for every day in the specified date range. - - Valid values include Y (available) and N (unavailable). - - ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands - for the `EndDate`.* - example: "YYYYYYNNNNNN" - ChangeOver: - type: string - description: | - A string of codes that shows changeover action, one for every day in the specified date range. - - Valid values include - - X (no action possible) - - C (check-in, checkout) - - O (checkout only) - - I (check-in only) - ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one - stands for the `EndDate`. All actions are possible if not returned.* - example: "XXIIICCCOOCC" - MinPriorNotify: - type: string - description: | - A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one - for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification - required for a given day. The unit is always day. - - ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` - and the last one stands for the `EndDate`. No limitation if not returned.* - example: "1,1,1,1,1,1,1,1,1,1,1,1,1" - MinStay: - type: string - description: | - A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every - day in the specified date range. - - Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. - - ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last - one stands for the `EndDate`. No limitation if not returned.* - example: "0,0,0,3,3,3,3,3,3,7,7,7,7,7,21,21,21" - MaxStay: - type: string - description: | - A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every - day in the specified date range. - - Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. - - ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the - last one stands for the `EndDate`. No limitation if not returned. - example: "0,0,0,31,31,31,371,370" - AvailabilityCalendarResponse: - type: object - properties: - Warnings: - type: array - description: | - There were some errors or events during the transaction, but the API has still returned a response. - - Container for all warnings. - items: - $ref: '#/components/schemas/Warning' - TransactionId: - type: string - description: Unique identifier for the transaction. - example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 - AvailabilityCalendars: - type: array - description: A list of the calendar entities. - items: - $ref: '#/components/schemas/AvailabilityCalendar' - example: |- - { - "TransactionId": "f06edfa3-27f4-44e6-838c-b8dd3d0a3210", - "AvailabilityCalendars": [ - { - "PropertyId": "74041788", - "DateRange": { - "StartDate": "2022-02-25", - "EndDate": "2025-02-24" - }, - "Availability":"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", - "ChangeOver": "OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", - "MinStay": "3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3", - "MaxStay": "379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", - "MinPriorNotify": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" - }, - { - "PropertyId": "1", - "DateRange": { - "StartDate": "2022-02-27", - "EndDate": "2023-11-04" - }, - "Availability": "NNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" - }, - { - "PropertyId": "123", - "DateRange": { - "StartDate": "2022-02-27", - "EndDate": "2023-11-04" - }, - "Availability": "NNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", - "ChangeOver": "XXXXXXIIICCCCCCCCCCCCCCCCCCCCXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOXXXXXIIICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOO", - "MinStay": "0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,7,6,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,5,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,9,8,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0", - "MaxStay": "0,0,0,0,0,0,21,21,20,19,18,17,16,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,20,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,0,0,0,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,0,0,0", - "MinPriorNotify": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" - } - ] - } - securitySchemes: - Authorization: - type: http - scheme: basic diff --git a/specs/xap-sdp-v1.specs.yaml b/specs/xap-sdp-v1.specs.yaml deleted file mode 100644 index 6e7e881d3..000000000 --- a/specs/xap-sdp-v1.specs.yaml +++ /dev/null @@ -1,392 +0,0 @@ -openapi: 3.0.1 -info: - title: EWS-Feed-Service APIs specification - version: v1 - description: OpenAPI Spec for EWS Feed Service APIs - contact: - name: Partner APIs - url: https://confluence.expedia.biz/display/EWS/EWS-feed-service - email: skywalker@expedia.com - x-eg-lifecycle: LIVE - x-eg-tags: ["ews", "feeds", "presignedurl", "downloadurl", "sdp", "staticInfo"] -servers: - - url: 'https://apim.expedia.com' - description: Production Server -paths: - /feed/v1/download-url: - get: - tags: - - download-url - operationId: get-feed-download-url - description: >- - Get the Download URL and other details of the static files. - parameters: - - name: Key - in: header - description: >- - Indicates a unique identifier assigned to every user of this API. - This attribute will help uniquely identify the caller. - required: true - deprecated: false - schema: - type: string - example: X99X9X9-99XX-9XX9-X999-99XX99X9X999 - - name: type - in: query - description: >- - The type of file, used to get files by type. - deprecated: false - required: true - schema: - type: string - enum: - - DESTINATION - - VENDORLOGO - - SUMMARY - - LISTINGS - - IMAGES - - AMENITIES - - LOCATIONS - - DESCRIPTIONS - - POLICIES - - GUEST_REVIEW - - VACATION_RENTAL - - ALL_REGIONS - - BOUNDING_POLYGON - - HOTEL_TO_REGION_HIERARCHY - - ROOM_DETAILS - example: SUMMARY - - name: locale - in: query - description: >- - Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: "{LanguageCode}-{CountryCode}".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. - deprecated: false - required: false - schema: - type: string - example: en-US - - name: pointOfSupply - in: query - description: >- - The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. - deprecated: false - required: false - schema: - type: string - enum: - - US - - AT - - BR - - CA - - FR - - DE - - GR - - IT - - JA - - KR - - MX - - PT - - ES - - TR - - AE - - GB - example: AT - - name: lodgingType - in: query - description: >- - The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. - deprecated: false - required: false - schema: - type: string - enum: - - CL - - VR - example: CL - - name: brand - in: query - description: >- - The downloadable files provided after specifying will only contain property information for that brand. - deprecated: false - required: false - schema: - type: string - enum: - - VRBO - responses: - '200': - content: - application/vnd.exp-lodging.v1+json: - schema: - $ref: '#/components/schemas/PresignedUrlResponse' - examples: - SDP-Summary: - value: - transactionId: c12dcd5d-4d05-42ed-8119-0e97e11f7deb - bestMatchedFile: - fileContentType: Summary - locale: de-DE - fileName: expedia-lodging-summary-en_us-all.jsonl.zip - fileSize: - unit: MB - value: 198.12 - fileLastUpdated: Tue Mar 28 08:38:14 UTC 2023 - downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/expedia-lodging-summary-en_us-all.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=58714cc22181faea3243d689741ba0e7f1a43ae8cab172984778ca5f8b963f1f - downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 - otherFileOptions: - - fileContentType: Summary - locale: en-US - fileName: expedia-lodging-summary_filtered_by_canada_en_us.jsonl.zip - fileSize: - unit: MB - value: 18.12 - fileLastUpdated: Tue Mar 28 06:37:36 UTC 2023 - downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/filtered/expedia-lodging-summary_filtered_by_canada_en_us.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=ac4389b81d4b9e6563fd234b16dafceaab5fcbe2931454da2fe9956b1e3f5919 - filterConditions: - pointOfSupply: CA - bestMatchedLink: - href: https://localhost:8443/feed/v1/download-url?type=SUMMARY&pointOfSupply=CA - method: GET - - fileContentType: Summary - locale: en-US - fileName: expedia-lodging-summary_filtered_by_conventional_en_us.jsonl.zip - fileSize: - unit: MB - value: 98.12 - fileLastUpdated: Tue Mar 28 06:38:11 UTC 2023 - downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/filtered/expedia-lodging-summary_filtered_by_conventional_en_us.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=9364ec533e909c2cb3331f16a449feee41a968492e61bcdd5761e56e7bbad73a - downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 - filterConditions: - structureType: CONVENTIONAL - bestMatchedLink: - href: https://localhost:8443/feed/v1/download-url?type=SUMMARY&loadgingType=CL - method: GET - VendorLogo: - value: - transactionId: c12dcd5d-4d05-42ed-8119-0e97e11f7deb - bestMatchedFile: - fileName: VendorLogos.json - fileSize: - unit: MB - value: 1.32 - fileLastUpdated: Tue Mar 28 06:38:11 UTC 2023 - downloadUrl: https://ews-generated-feeds-prod-p.s3.us-west-2.amazonaws.com/vendor-logos/VendorLogos.json?response-content-disposition=inline&X-Amz-Security-Token=XXX - downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 - description: Download URLs successfully generated for the feed files. - '400': - content: - application/vnd.exp-lodging.v1+json: - schema: - $ref: '#/components/schemas/PresignedUrlResponse' - example: - transactionId: 38dc7269-12b1-58c9-a381-4963c274cdfe - error: - code: INVALID_TYPE_ATTR - description: Invalid type provided. - description: Invalid request from the client. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - unauthorized: - value: - message: Unauthorized - Invalid authentication credentials: - value: - message: Invalid authentication credentials - description: Unauthorized or Invalid authentication credentials. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - cannot consume this service: - value: - message: You cannot consume this service - description: Cannot consume this service. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - no Route matched: - value: - message: no Route matched with those values - description: No Route matched. - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - API rate limit exceeded: - value: - message: API rate limit exceeded - description: API rate limit exceeded. - '500': - content: - application/vnd.exp-lodging.v1+json: - schema: - $ref: '#/components/schemas/PresignedUrlResponse' - example: - transactionId: 38dc7269-12b1-58c9-a381-4963c274cdfe - error: - code: SERVER_ERROR - description: An error has occurred while processing the request. - description: >- - Server side error like backend service has some issues or some - issues in EWS Feed service. The Error code is SERVER_ERROR. - '503': - content: - application/json: - schema: - $ref: '#/components/schemas/APIMError' - examples: - service unavailable: - value: - message: name resolution failed - description: Service unavailable. -components: - schemas: - PresignedUrlResponse: - type: object - properties: - transactionId: - type: string - description: Unique identifier for each API response. - error: - $ref: '#/components/schemas/Fault' - warning: - $ref: '#/components/schemas/Fault' - bestMatchedFile: - $ref: '#/components/schemas/FileInfo' - otherFileOptions: - type: array - items: - $ref: '#/components/schemas/FileInfo' - description: >- - Container for file Pre-signed download URL and informations. - FileInfo: - type: object - properties: - partner: - nullable: true - type: string - description: >- - The partner associated with the file. List of partners: `Bing`, - `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. - brand: - nullable: true - type: string - description: >- - The brand associated with the file content. List of brand: - `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, - `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. - fileContentType: - nullable: true - type: string - description: >- - The type associated with the file content. List of types: - `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, - `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` - locale: - nullable: true - type: string - description: The locale associated with the file content. - fileName: - type: string - description: File name. - size: - $ref: '#/components/schemas/FileSize' - fileLastUpdated: - type: string - description: >- - The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX - downloadUrl: - type: string - description: >- - Pre-signed URL is a self signed URL generated for a resource in S3 - with a set expiration time. - downloadUrlExpires: - type: string - description: >- - The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX - filterConditions: - $ref: '#/components/schemas/FilterConditions' - bestMatchedLink: - $ref: '#/components/schemas/Link' - Fault: - type: object - description: API returned information. - properties: - code: - type: string - description: Fault code. - description: - type: string - description: Fault description. - FileSize: - type: object - description: The information about the file size. - properties: - unit: - type: string - enum: - - KB - - MB - - GB - description: The unit about the file size. - value: - type: integer - format: int64 - description: The value about the file size. - FilterConditions: - nullable: true - type: object - description: Container filter condition for the filtered file. [Filters](https://confluence.expedia.biz/display/EWS/Filtered+Feed+File+Generation+Schedule+and+Access#FilteredFeedFileGenerationScheduleandAccess-Filters) - properties: - pointOfSupply: - type: string - description: >- - List of filter condition for PointOfSupplies: `US`, - `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, - `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, - `AE`,`GB`. - brand: - type: string - description: >- - List of filter condition for Brands: `VRBO`. - structureType: - type: string - description: >- - List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. - Link: - nullable: true - type: object - description: Contains link information, including link address, request method. Only provided if FileInfo is in OtherFileOptions. - properties: - href: - type: string - description: a link address. - method: - type: string - description: Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... - APIMError: - type: object - description: Error from the APIM. - properties: - message: - type: string - description: Error from the APIM. - securitySchemes: - BasicAuth: - type: http - scheme: basic -security: - - BasicAuth: [] -tags: - - name: download-url \ No newline at end of file diff --git a/tests/integration/README.md b/tests/integration/README.md deleted file mode 100644 index 87117d931..000000000 --- a/tests/integration/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# XAP Java SDK Integrations - -This repository contains integration tests of the Expedia Group XAP Java SDK. - -_**The following instructions apply if you want to run the integration tests locally.**_ - -## Requirements - -- Ensure you have a valid API key and secret from Expedia Group. - Check [Getting started with XAP](https://developers.expediagroup.com/xap/products/xap/set-up/getting-started) - for more info. -- Java 1.8 or higher -- Maven - -## Setup - -1. Clone the repository. -2. Navigate to the project directory `integrations`. -3. Run `mvn clean install` to build the project and install the dependencies including the XAP SDK. - -## Running the Integration Tests - -### Run with IntelliJ IDEA - -1. Navigate to the test class you want to run -2. Right-click on the class name and select `More Run/Debug` -> `Modify Run Configuration` -3. Check the `Modify options` -> `Add VM options` and add the following VM options: - ``` - -Dcom.expediagroup.xapjavasdk.apikey="{API_KEY}" - -Dcom.expediagroup.xapjavasdk.apisecret="{API_SECRET}" - ``` - Replace `{API_KEY}` and `{API_SECRET}` with your actual API key and secret. - > **Note:** If you are running the tests for Vrbo, you would need the following VM options - instead: - > ``` - > -Dcom.expediagroup.xapjavasdk.vrbokey="{VRBO_KEY}" - > -Dcom.expediagroup.xapjavasdk.vrbosecret="{VRBO_SECRET}" - > ``` - > The key you use must be enabled for Vrbo brand. If you are not sure, please reach out to your - account manager. -4. Click `OK` and then run the test class. - -### Run with Command Line - -Run the following command to run all integration tests: - -``` -mvn failsafe:integration-test \ - -Dcom.expediagroup.xapjavasdk.apikey="{API_KEY}" \ - -Dcom.expediagroup.xapjavasdk.apisecret="{API_SECRET}" \ - -Dcom.expediagroup.xapjavasdk.vrbokey="{VRBO_KEY}" \ - -Dcom.expediagroup.xapjavasdk.vrbosecret="{VRBO_SECRET}" \ - -f pom.xml -``` - -If your key is enabled for both Expedia and Vrbo brands, you may use the same key and secret -pair for the placeholders. Otherwise, you may run the tests separately by providing only the -required key and secret. For example: - -``` -mvn failsafe:integration-test \ - -Dit.test=TestClassName#testMethodName \ - -Dcom.expediagroup.xapjavasdk.apikey="{API_KEY}" \ - -Dcom.expediagroup.xapjavasdk.apisecret="{API_SECRET}" \ - -f pom.xml -``` - -Replace `TestClassName` and `testMethodName` with the actual test class name and method name, -and `{API_KEY}` and `{API_SECRET}` with your actual API key and secret. -> If `#testMethodName` is omitted, all test methods in the class will be executed. - -If you are running the tests for Vrbo, you should use the following command instead: - -``` -mvn failsafe:integration-test \ - -Dit.test=TestClassName#testMethodName \ - -Dcom.expediagroup.xapjavasdk.vrbokey="{VRBO_KEY}" \ - -Dcom.expediagroup.xapjavasdk.vrbosecret="{VRBO_SECRET}" - -f pom.xml -``` - -The key you use must be enabled for Vrbo brand. If you are not sure, please reach out to your -account manager. - -## License - -This project is licensed under the Apache License v2.0 - see the [LICENSE](../../LICENSE) for details. diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml deleted file mode 100644 index 3e50578d4..000000000 --- a/tests/integration/pom.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - 4.0.0 - - com.expediagroup - xap-java-sdk-integrations - 1.0-SNAPSHOT - - - 1.8 - 1.8 - 1.8 - UTF-8 - 1.1.0 - - - - - oss.sonatype.org-snapshot - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - - - - - - com.expediagroup - xap-sdk - ${xap-java-sdk.sdk.version} - - - org.apache.logging.log4j - log4j-api - 2.24.3 - - - org.apache.logging.log4j - log4j-slf4j2-impl - 2.24.3 - - - org.junit.jupiter - junit-jupiter - 5.12.0 - test - - - com.squareup.okhttp3 - mockwebserver - 4.12.0 - test - - - io.hosuaby - inject-resources-junit-jupiter - 1.0.0 - test - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.6.0 - - google_checks.xml - true - error - true - - - - - check - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 3.5.2 - - - integration-tests - - integration-test - verify - - - - **/*IT.java - - - - - - - org.apache.maven.plugins - maven-surefire-report-plugin - 3.5.2 - - - report - integration-test - - failsafe-report-only - - - - - - - diff --git a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/Constant.java b/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/Constant.java deleted file mode 100644 index f55c68988..000000000 --- a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/Constant.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.expediagroup.sdk.xap.integrations.common; - -import java.util.Base64; -import java.util.UUID; - -/** - * Constants used in the integration tests. - */ -public class Constant { - public static final String PARTNER_TRANSACTION_ID = "xap-sdk-integration-test"; - public static final String MOCK_KEY = UUID.randomUUID().toString(); - public static final String MOCK_SECRET = "mock"; - public static final String AUTHORIZATION = "Basic " + Base64.getEncoder() - .encodeToString((MOCK_KEY + ":" + MOCK_SECRET).getBytes()); - public static final String ACCEPT_HOTEL = "application/vnd.exp-hotel.v3+json"; - public static final String ACCEPT_LODGING = "application/vnd.exp-lodging.v3+json"; -} diff --git a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/XapIntegrationTests.java b/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/XapIntegrationTests.java deleted file mode 100644 index 26669c01c..000000000 --- a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/XapIntegrationTests.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.expediagroup.sdk.xap.integrations.common; - -import static com.expediagroup.sdk.xap.integrations.common.Constant.MOCK_KEY; -import static com.expediagroup.sdk.xap.integrations.common.Constant.MOCK_SECRET; - -import com.expediagroup.sdk.xap.client.XapClient; -import okhttp3.mockwebserver.MockWebServer; -import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.TestInstance; - - -/** - * Extension for setting up the required components for testing. - */ -@TestInstance(TestInstance.Lifecycle.PER_CLASS) -public abstract class XapIntegrationTests { - - protected XapClient xapClient; - protected MockWebServer mockWebServer; - - @BeforeEach - void setup() { - mockWebServer = new MockWebServer(); - - xapClient = XapClient.builder() - .key(MOCK_KEY) - .secret(MOCK_SECRET) - .endpoint(mockWebServer.url("/").toString()) - .build(); - } - - @AfterEach - void tearDown() throws Exception { - // Clean everything after each test to ensure clear state - if (mockWebServer != null) { - mockWebServer.shutdown(); - mockWebServer = null; - } - xapClient = null; - } -} diff --git a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/AvailabilityCalendarsIntegrationTests.java b/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/AvailabilityCalendarsIntegrationTests.java deleted file mode 100644 index c11907f1e..000000000 --- a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/AvailabilityCalendarsIntegrationTests.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.expediagroup.sdk.xap.integrations.lodging; - -import static com.expediagroup.sdk.xap.integrations.common.Constant.ACCEPT_HOTEL; -import static com.expediagroup.sdk.xap.integrations.common.Constant.ACCEPT_LODGING; -import static com.expediagroup.sdk.xap.integrations.common.Constant.AUTHORIZATION; -import static com.expediagroup.sdk.xap.integrations.common.Constant.MOCK_KEY; -import static com.expediagroup.sdk.xap.integrations.common.Constant.PARTNER_TRANSACTION_ID; - -import com.expediagroup.sdk.core.model.Response; -import com.expediagroup.sdk.xap.integrations.common.XapIntegrationTests; -import com.expediagroup.sdk.xap.models.AvailabilityCalendar; -import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse; -import com.expediagroup.sdk.xap.models.DateRange; -import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperation; -import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperationParams; -import io.hosuaby.inject.resources.junit.jupiter.GivenTextResource; -import io.hosuaby.inject.resources.junit.jupiter.TestWithResources; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import okhttp3.Headers; -import okhttp3.mockwebserver.MockResponse; -import okhttp3.mockwebserver.RecordedRequest; -import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - - -/** - * This class is used to test the integration of the Lodging Availability Calendars API. - */ -@TestWithResources -public class AvailabilityCalendarsIntegrationTests extends XapIntegrationTests { - @Test - public void testRequest() { - GetLodgingAvailabilityCalendarsOperationParams availabilityCalendarsOperationParams = - GetLodgingAvailabilityCalendarsOperationParams.builder() - .partnerTransactionId(UUID.randomUUID().toString()) - .propertyIds(new HashSet<>(Arrays.asList("123", "456", "789"))) - .build(); - - mockWebServer.enqueue( - new MockResponse() - .setHeader("Content-Type", ACCEPT_LODGING) - .setResponseCode(200) - .setBody("{}")); - - xapClient.execute( - new GetLodgingAvailabilityCalendarsOperation(availabilityCalendarsOperationParams)); - try { - RecordedRequest recordedRequest = mockWebServer.takeRequest(); - // method - Assertions.assertEquals("GET", recordedRequest.getMethod()); - // headers - Headers headers = recordedRequest.getHeaders(); - Assertions.assertEquals(availabilityCalendarsOperationParams.getPartnerTransactionId(), - headers.get("Partner-Transaction-Id")); - Assertions.assertEquals(ACCEPT_LODGING, headers.get("Accept")); - Assertions.assertEquals(MOCK_KEY, headers.get("key")); - Assertions.assertEquals(AUTHORIZATION, headers.get("Authorization")); - // path and query - String path = recordedRequest.getPath(); - Assertions.assertNotNull(path); - Assertions.assertTrue(path.startsWith("/lodging/availabilityCalendars")); - String query = path.substring(path.indexOf("?") + 1); - Assertions.assertTrue(query.contains("propertyIds=123%2C456%2C789")); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - - @Test - public void testResponse(@GivenTextResource("GetLodgingAvailabilityCalendarsResponse.json") String mockedResponse) { - GetLodgingAvailabilityCalendarsOperationParams params = - GetLodgingAvailabilityCalendarsOperationParams.builder() - .partnerTransactionId(PARTNER_TRANSACTION_ID) - .propertyIds(new HashSet<>(Arrays.asList("87704892", "83418323", "75028284", - "75030107", "91799474"))) - .build(); - - mockWebServer.enqueue( - new MockResponse() - .setHeader("Content-Type", ACCEPT_HOTEL) - .setHeader("partner-transaction-id", PARTNER_TRANSACTION_ID) - .setResponseCode(200) - .setBody(mockedResponse)); - - Response response = - xapClient.execute(new GetLodgingAvailabilityCalendarsOperation(params)); - verifyResponse(response); - } - - private void verifyResponse(Response response) { - Assertions.assertNotNull(response); - Assertions.assertEquals(200, response.getStatusCode()); - Map> headers = response.getHeaders(); - Assertions.assertNotNull(headers); - Assertions.assertEquals(PARTNER_TRANSACTION_ID, headers.get("partner-transaction-id") - .get(0)); - verifyAvailabilityCalendarResponse(response.getData()); - } - - private void verifyAvailabilityCalendarResponse( - AvailabilityCalendarResponse availabilityCalendarResponse) { - Assertions.assertNotNull(availabilityCalendarResponse); - Assertions.assertNull(availabilityCalendarResponse.getWarnings()); - Assertions.assertNotNull(availabilityCalendarResponse.getTransactionId()); - List availabilityCalendars = - availabilityCalendarResponse.getAvailabilityCalendars(); - Assertions.assertNotNull(availabilityCalendars); - if (availabilityCalendars.isEmpty()) { - Assertions.fail("No availability calendars found."); - } - availabilityCalendars.forEach(this::verifyAvailabilityCalendar); - } - - private void verifyAvailabilityCalendar(AvailabilityCalendar availabilityCalendar) { - Assertions.assertNotNull(availabilityCalendar); - Assertions.assertNotNull(availabilityCalendar.getPropertyId()); - DateRange dateRange = availabilityCalendar.getDateRange(); - Assertions.assertNotNull(dateRange); - Assertions.assertNotNull(dateRange.getStartDate()); - Assertions.assertNotNull(dateRange.getEndDate()); - Assertions.assertTrue(StringUtils.isNotBlank(availabilityCalendar.getAvailability())); - Assertions.assertTrue(StringUtils.isNotBlank(availabilityCalendar.getChangeOver())); - Assertions.assertTrue(StringUtils.isNotBlank(availabilityCalendar.getMinPriorNotify())); - Assertions.assertTrue(StringUtils.isNotBlank(availabilityCalendar.getMinStay())); - Assertions.assertTrue(StringUtils.isNotBlank(availabilityCalendar.getMaxStay())); - } -} diff --git a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/ListingsIntegrationTests.java b/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/ListingsIntegrationTests.java deleted file mode 100644 index 26c832e0c..000000000 --- a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/ListingsIntegrationTests.java +++ /dev/null @@ -1,501 +0,0 @@ -package com.expediagroup.sdk.xap.integrations.lodging; - -import static com.expediagroup.sdk.xap.integrations.common.Constant.ACCEPT_HOTEL; -import static com.expediagroup.sdk.xap.integrations.common.Constant.AUTHORIZATION; -import static com.expediagroup.sdk.xap.integrations.common.Constant.MOCK_KEY; - -import com.expediagroup.sdk.core.model.Response; -import com.expediagroup.sdk.xap.integrations.common.Constant; -import com.expediagroup.sdk.xap.integrations.common.XapIntegrationTests; -import com.expediagroup.sdk.xap.models.AgeClassRestriction; -import com.expediagroup.sdk.xap.models.BedType; -import com.expediagroup.sdk.xap.models.CancellationPolicy; -import com.expediagroup.sdk.xap.models.Distance; -import com.expediagroup.sdk.xap.models.Hotel; -import com.expediagroup.sdk.xap.models.HotelHotelAmenitiesInner; -import com.expediagroup.sdk.xap.models.HotelLinks; -import com.expediagroup.sdk.xap.models.HotelLinksApiRateCalendar; -import com.expediagroup.sdk.xap.models.HotelLinksWebSearchResult; -import com.expediagroup.sdk.xap.models.HotelListingsResponse; -import com.expediagroup.sdk.xap.models.HotelLocation; -import com.expediagroup.sdk.xap.models.HotelPropertyType; -import com.expediagroup.sdk.xap.models.HotelRoomAmenitiesInner; -import com.expediagroup.sdk.xap.models.LocationGeoLocation; -import com.expediagroup.sdk.xap.models.Media; -import com.expediagroup.sdk.xap.models.Neighborhood; -import com.expediagroup.sdk.xap.models.NonRefundableDateRange; -import com.expediagroup.sdk.xap.models.PaymentSchedule; -import com.expediagroup.sdk.xap.models.RatePlan; -import com.expediagroup.sdk.xap.models.RatePlanAmenitiesInner; -import com.expediagroup.sdk.xap.models.RatePlanPrice; -import com.expediagroup.sdk.xap.models.RatePlanPriceNightlyRatesInner; -import com.expediagroup.sdk.xap.models.RatePlanPriceTaxesAndFeesDetailsInner; -import com.expediagroup.sdk.xap.models.RatePlanStandalonePrice; -import com.expediagroup.sdk.xap.models.Room; -import com.expediagroup.sdk.xap.models.RoomOccupancyPolicy; -import com.expediagroup.sdk.xap.models.RoomType; -import com.expediagroup.sdk.xap.models.RoomTypeAmenitiesInner; -import com.expediagroup.sdk.xap.models.RoomTypeLinks; -import com.expediagroup.sdk.xap.models.RoomTypeLinksApiDetails; -import com.expediagroup.sdk.xap.models.RoomTypeLinksWebDetails; -import com.expediagroup.sdk.xap.models.RoomTypeMediaInner; -import com.expediagroup.sdk.xap.models.RoomTypePrice; -import com.expediagroup.sdk.xap.models.RoomTypeStandalonePrice; -import com.expediagroup.sdk.xap.models.StayDates; -import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperation; -import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperationParams; -import io.hosuaby.inject.resources.junit.jupiter.GivenTextResource; -import io.hosuaby.inject.resources.junit.jupiter.TestWithResources; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import okhttp3.Headers; -import okhttp3.mockwebserver.MockResponse; -import okhttp3.mockwebserver.RecordedRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - - -/** - * This class is used to test the integration of the Lodging Listings API. - */ -@TestWithResources -public class ListingsIntegrationTests extends XapIntegrationTests { - - @Test - public void testRequest() { - ArrayList rooms = new ArrayList<>(); - rooms.add(Room.builder().adults(1L).build()); - rooms.add(Room.builder().adults(2L).childAges(Arrays.asList(10L, 12L)).build()); - rooms.add(Room.builder().adults(1L).childAges(Collections.singletonList(5L)).build()); - rooms.add(Room.builder().adults(6L).build()); - rooms.add(Room.builder().adults(2L).childAges(Arrays.asList(3L, 4L)).build()); - rooms.add(Room.builder().adults(3L).childAges(Arrays.asList(1L, 2L, 3L, 4L, 5L)).build()); - rooms.add(Room.builder().adults(2L).childAges(Arrays.asList(1L, 2L, 3L, 4L)).build()); - rooms.add(Room.builder().adults(1L).build()); - - GetLodgingListingsOperationParams getLodgingListingsOperationParams = - GetLodgingListingsOperationParams.builder() - .partnerTransactionId(UUID.randomUUID().toString()) - // hotel selection - .ecomHotelIds(new HashSet<>(Arrays.asList("123", "456"))) - .hcomHotelIds(new HashSet<>(Arrays.asList("135", "246"))) - .geoLocation("47.6062,-122.3321") - .regionIds(new HashSet<>(Collections.singletonList("1001"))) - .locationKeyword("Space Needle, Seattle") - .radius(10) - .unit(GetLodgingListingsOperationParams.Unit.KM) - // search - .checkIn(LocalDate.now().plusDays(5)) - .checkOut(LocalDate.now().plusDays(10)) - .locale("en_US") - .currency("USD") - .rooms(rooms) - .source(GetLodgingListingsOperationParams.Source.BROWSER) - .travelWithPets(true) - // content detail - .contentDetails(GetLodgingListingsOperationParams.ContentDetails.HIGH) - .allRoomTypes(true) - .links(Arrays.asList(GetLodgingListingsOperationParams.Links.WEB, - GetLodgingListingsOperationParams.Links.API)) - // filtering - .minStarRating(GetLodgingListingsOperationParams.MinStarRating._1_PERIOD5) - .maxStarRating(GetLodgingListingsOperationParams.MaxStarRating._5_PERIOD0) - .limit(5) - .queryText("Seattle") - .availOnly(true) - .smokingPreference(GetLodgingListingsOperationParams.SmokingPreference.BOTH) - .rateType(GetLodgingListingsOperationParams.RateType.ALL) - .imageSizes(GetLodgingListingsOperationParams.ImageSizes.S) - .thumbnailImageSize(GetLodgingListingsOperationParams.ThumbnailImageSize.T) - .includedPropertyTypeIds(new HashSet<>(Arrays.asList("1", "2"))) - .excludedPropertyTypeIds(new HashSet<>(Arrays.asList("3", "4"))) - .includedInventorySourceIds(new HashSet<>(Arrays.asList("5", "6"))) - .freeCancellation(true) - .groupedAmenities(true) - .blockFullDepositRateplan(true) - // package pricing - .ratePlanType(GetLodgingListingsOperationParams.RatePlanType.PACKAGE) - // sorting - .sortType(GetLodgingListingsOperationParams.SortType.PRICE) - .sortOrder(GetLodgingListingsOperationParams.SortOrder.ASC) - .build(); - - mockWebServer.enqueue( - new MockResponse() - .setHeader("Content-Type", ACCEPT_HOTEL) - .setResponseCode(200) - .setBody("{}")); - - xapClient.execute(new GetLodgingListingsOperation(getLodgingListingsOperationParams)); - try { - RecordedRequest recordedRequest = mockWebServer.takeRequest(); - // method - Assertions.assertEquals("GET", recordedRequest.getMethod()); - // headers - Headers headers = recordedRequest.getHeaders(); - Assertions.assertEquals(getLodgingListingsOperationParams.getPartnerTransactionId(), - headers.get("Partner-Transaction-Id")); - Assertions.assertEquals(ACCEPT_HOTEL, headers.get("Accept")); - Assertions.assertEquals(MOCK_KEY, headers.get("key")); - Assertions.assertEquals(AUTHORIZATION, headers.get("Authorization")); - // path and query - String path = recordedRequest.getPath(); - Assertions.assertNotNull(path); - Assertions.assertTrue(path.startsWith("/hotels/listings")); - String query = path.substring(path.indexOf("?") + 1); - // hotel selection - Assertions.assertTrue(query.contains("ecomHotelIds=123%2C456")); - Assertions.assertTrue(query.contains("hcomHotelIds=135%2C246")); - Assertions.assertTrue(query.contains("geoLocation=47.6062%2C-122.3321")); - Assertions.assertTrue(query.contains("regionIds=1001")); - Assertions.assertTrue(query.contains("locationKeyword=Space+Needle%2C+Seattle")); - Assertions.assertTrue(query.contains("radius=10")); - Assertions.assertTrue(query.contains("unit=km")); - // search - Assertions.assertTrue( - query.contains("checkIn=" + getLodgingListingsOperationParams.getCheckIn())); - Assertions.assertTrue( - query.contains("checkOut=" + getLodgingListingsOperationParams.getCheckOut())); - Assertions.assertTrue(query.contains("locale=en_US")); - Assertions.assertTrue(query.contains("currency=USD")); - Assertions.assertTrue(query.contains("room1.adults=1")); - Assertions.assertTrue(query.contains("room2.adults=2")); - Assertions.assertTrue(query.contains("room2.childAges=10%2C12")); - Assertions.assertTrue(query.contains("room3.adults=1")); - Assertions.assertTrue(query.contains("room3.childAges=5")); - Assertions.assertTrue(query.contains("room4.adults=6")); - Assertions.assertTrue(query.contains("room5.adults=2")); - Assertions.assertTrue(query.contains("room5.childAges=3%2C4")); - Assertions.assertTrue(query.contains("room6.adults=3")); - Assertions.assertTrue(query.contains("room6.childAges=1%2C2%2C3%2C4%2C5")); - Assertions.assertTrue(query.contains("room7.adults=2")); - Assertions.assertTrue(query.contains("room7.childAges=1%2C2%2C3%2C4")); - Assertions.assertTrue(query.contains("room8.adults=1")); - Assertions.assertFalse(query.contains("room9")); - Assertions.assertTrue(query.contains("source=browser")); - Assertions.assertTrue(query.contains("travelWithPets=true")); - // content detail - Assertions.assertTrue(query.contains("contentDetails=high")); - Assertions.assertTrue(query.contains("allRoomTypes=true")); - Assertions.assertTrue(query.contains("links=WEB%2CAPI")); - // filtering - Assertions.assertTrue(query.contains("minStarRating=1.5")); - Assertions.assertTrue(query.contains("maxStarRating=5.0")); - Assertions.assertTrue(query.contains("limit=5")); - Assertions.assertTrue(query.contains("queryText=Seattle")); - Assertions.assertTrue(query.contains("availOnly=true")); - Assertions.assertTrue(query.contains("smokingPreference=both")); - Assertions.assertTrue(query.contains("rateType=all")); - Assertions.assertTrue(query.contains("imageSizes=s")); - Assertions.assertTrue(query.contains("thumbnailImageSize=t")); - Assertions.assertTrue(query.contains("includedPropertyTypeIds=1%2C2")); - Assertions.assertTrue(query.contains("excludedPropertyTypeIds=3%2C4")); - Assertions.assertTrue(query.contains("includedInventorySourceIds=5%2C6")); - Assertions.assertTrue(query.contains("freeCancellation=true")); - Assertions.assertTrue(query.contains("groupedAmenities=true")); - Assertions.assertTrue(query.contains("blockFullDepositRateplan=true")); - // package pricing - Assertions.assertTrue(query.contains("ratePlanType=package")); - // sorting - Assertions.assertTrue(query.contains("sortType=price")); - Assertions.assertTrue(query.contains("sortOrder=asc")); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - - } - - @Test - public void testResponse(@GivenTextResource("GetLodgingListingsResponse.json") String mockedResponse) { - GetLodgingListingsOperationParams operationParams = GetLodgingListingsOperationParams.builder() - .partnerTransactionId(Constant.PARTNER_TRANSACTION_ID) - .locationKeyword("Seattle") - .checkIn(LocalDate.now().plusDays(5)) - .checkOut(LocalDate.now().plusDays(10)) - .links(Arrays.asList(GetLodgingListingsOperationParams.Links.WEB, - GetLodgingListingsOperationParams.Links.API)) - .contentDetails(GetLodgingListingsOperationParams.ContentDetails.HIGH) - .availOnly(true) - .build(); - - mockWebServer.enqueue( - new MockResponse() - .setHeader("Content-Type", ACCEPT_HOTEL) - .setHeader("Partner-Transaction-Id", Constant.PARTNER_TRANSACTION_ID) - .setResponseCode(200) - .setBody(mockedResponse)); - - Response response = xapClient.execute( - new GetLodgingListingsOperation(operationParams) - ); - - verifyResponse(response); - } - - private void verifyResponse(Response response) { - Assertions.assertNotNull(response); - Assertions.assertEquals(200, response.getStatusCode()); - Map> headers = response.getHeaders(); - Assertions.assertNotNull(headers); - Assertions.assertEquals(Constant.PARTNER_TRANSACTION_ID, headers.get("partner-transaction-id") - .get(0)); - verifyHotelListingsResponse(response.getData()); - } - - private void verifyHotelListingsResponse( - HotelListingsResponse hotelListingsResponse) { - Assertions.assertNotNull(hotelListingsResponse); - Assertions.assertNull(hotelListingsResponse.getWarnings()); - Assertions.assertNotNull(hotelListingsResponse.getCount()); - Assertions.assertTrue(hotelListingsResponse.getCount() > 0); - Assertions.assertNotNull(hotelListingsResponse.getTotalHotelCount()); - Assertions.assertTrue(hotelListingsResponse.getTotalHotelCount() > 0); - Assertions.assertNotNull(hotelListingsResponse.getTransactionId()); - Assertions.assertNotNull(hotelListingsResponse.getStayDates()); - Assertions.assertNotNull(hotelListingsResponse.getLengthOfStay()); - Assertions.assertTrue(hotelListingsResponse.getLengthOfStay() > 0); - Assertions.assertNotNull(hotelListingsResponse.getNumberOfRooms()); - Assertions.assertTrue(hotelListingsResponse.getNumberOfRooms() > 0); - Assertions.assertNotNull(hotelListingsResponse.getOccupants()); - Assertions.assertFalse(hotelListingsResponse.getOccupants().isEmpty()); - Assertions.assertNotNull(hotelListingsResponse.getHotels()); - Assertions.assertFalse(hotelListingsResponse.getHotels().isEmpty()); - hotelListingsResponse.getHotels().forEach(this::verifyHotel); - } - - private void verifyHotel(Hotel hotel) { - Assertions.assertNotNull(hotel); - Assertions.assertNotNull(hotel.getId()); - Assertions.assertNotNull(hotel.getName()); - - HotelPropertyType propertyType = hotel.getPropertyType(); - if (propertyType != null) { - Assertions.assertNotNull(propertyType.getId()); - Assertions.assertNotNull(propertyType.getName()); - } - - HotelLocation location = hotel.getLocation(); - if (location != null) { - Assertions.assertNotNull(location.getAddress()); - - LocationGeoLocation geoLocation = location.getGeoLocation(); - if (geoLocation != null) { - Assertions.assertNotNull(geoLocation.getLatitude()); - Assertions.assertNotNull(geoLocation.getLongitude()); - Assertions.assertNotNull(geoLocation.getObfuscated()); - } - - Neighborhood neighborhood = location.getNeighborhood(); - if (neighborhood != null) { - Assertions.assertNotNull(neighborhood.getId()); - Assertions.assertNotNull(neighborhood.getName()); - } - } - - Distance distance = hotel.getDistance(); - if (distance != null) { - Assertions.assertNotNull(distance.getValue()); - Assertions.assertNotNull(distance.getUnit()); - Assertions.assertNotNull(distance.getDirection()); - } - - HotelLinks links = hotel.getLinks(); - Assertions.assertNotNull(links); - HotelLinksWebSearchResult webSearchResult = links.getWebSearchResult(); - Assertions.assertNotNull(webSearchResult); - Assertions.assertNotNull(webSearchResult.getMethod()); - Assertions.assertNotNull(webSearchResult.getHref()); - HotelLinksApiRateCalendar apiRateCalendar = links.getApiRateCalendar(); - Assertions.assertNotNull(apiRateCalendar); - Assertions.assertNotNull(apiRateCalendar.getAccept()); - Assertions.assertNotNull(apiRateCalendar.getMethod()); - Assertions.assertNotNull(apiRateCalendar.getHref()); - - List media = hotel.getMedia(); - if (media != null && !media.isEmpty()) { - media.forEach(item -> { - Assertions.assertNotNull(item.getType()); - Assertions.assertNotNull(item.getPropertySize()); - Assertions.assertNotNull(item.getUrl()); - }); - } - - List hotelAmenities = hotel.getHotelAmenities(); - if (hotelAmenities != null && !hotelAmenities.isEmpty()) { - hotelAmenities.forEach(item -> { - Assertions.assertNotNull(item.getId()); - Assertions.assertNotNull(item.getName()); - }); - } - - List roomAmenities = hotel.getRoomAmenities(); - if (roomAmenities != null && !roomAmenities.isEmpty()) { - roomAmenities.forEach(item -> { - Assertions.assertNotNull(item.getId()); - Assertions.assertNotNull(item.getName()); - }); - } - - List roomTypes = hotel.getRoomTypes(); - if (roomTypes != null && !roomTypes.isEmpty()) { - roomTypes.forEach(this::verifyRoomType); - } - } - - private void verifyRoomType(RoomType roomType) { - Assertions.assertNotNull(roomType); - Assertions.assertNotNull(roomType.getOfferId()); - Assertions.assertNotNull(roomType.getRatePlanType()); - - RoomTypePrice roomTypePrice = roomType.getPrice(); - if (roomTypePrice != null) { - Assertions.assertNotNull(roomTypePrice.getTotalPrice()); - Assertions.assertNotNull(roomTypePrice.getAvgNightlyRate()); - Assertions.assertNotNull(roomTypePrice.getTotalPriceWithHotelFees()); - } - - RoomTypeStandalonePrice standalonePrice = roomType.getStandalonePrice(); - if (standalonePrice != null) { - Assertions.assertNotNull(standalonePrice.getTotalPrice()); - Assertions.assertNotNull(standalonePrice.getAvgNightlyRate()); - } - - List bedTypeOptions = roomType.getBedTypeOptions(); - if (bedTypeOptions != null && !bedTypeOptions.isEmpty()) { - bedTypeOptions.forEach(item -> { - Assertions.assertNotNull(item.getId()); - Assertions.assertNotNull(item.getDescription()); - }); - } - - RoomOccupancyPolicy roomOccupancyPolicy = roomType.getRoomOccupancyPolicy(); - if (roomOccupancyPolicy != null) { - Assertions.assertNotNull(roomOccupancyPolicy.getMaxGuestCount()); - List ageClassRestrictions = - roomOccupancyPolicy.getAgeClassRestrictions(); - if (ageClassRestrictions != null && !ageClassRestrictions.isEmpty()) { - ageClassRestrictions.forEach(item -> { - Assertions.assertNotNull(item.getAgeClass()); - Assertions.assertNotNull(item.getAgeMinimum()); - }); - } - } - - List amenities = roomType.getAmenities(); - if (amenities != null && !amenities.isEmpty()) { - amenities.forEach(item -> { - Assertions.assertNotNull(item.getId()); - Assertions.assertNotNull(item.getName()); - }); - } - - List media = roomType.getMedia(); - if (media != null && !media.isEmpty()) { - media.forEach(item -> { - Assertions.assertNotNull(item.getType()); - Assertions.assertNotNull(item.getPropertySize()); - Assertions.assertNotNull(item.getUrl()); - }); - } - - RoomTypeLinks links = roomType.getLinks(); - Assertions.assertNotNull(links); - HotelLinksWebSearchResult webSearchResult = links.getWebSearchResult(); - Assertions.assertNotNull(webSearchResult); - Assertions.assertNotNull(webSearchResult.getMethod()); - Assertions.assertNotNull(webSearchResult.getHref()); - RoomTypeLinksWebDetails webDetails = links.getWebDetails(); - Assertions.assertNotNull(webDetails); - Assertions.assertNotNull(webDetails.getMethod()); - Assertions.assertNotNull(webDetails.getHref()); - RoomTypeLinksApiDetails apiDetails = links.getApiDetails(); - Assertions.assertNotNull(apiDetails); - Assertions.assertNotNull(apiDetails.getAccept()); - Assertions.assertNotNull(apiDetails.getMethod()); - Assertions.assertNotNull(apiDetails.getHref()); - - List ratePlans = roomType.getRatePlans(); - Assertions.assertNotNull(ratePlans); - Assertions.assertFalse(ratePlans.isEmpty()); - ratePlans.forEach(this::verifyRatePlan); - } - - private void verifyRatePlan(RatePlan ratePlan) { - Assertions.assertNotNull(ratePlan); - Assertions.assertNotNull(ratePlan.getRoomTypeId()); - Assertions.assertNotNull(ratePlan.getRatePlanId()); - Assertions.assertNotNull(ratePlan.getInventorySourceId()); - - StayDates stayDates = ratePlan.getStayDates(); - Assertions.assertNotNull(stayDates); - Assertions.assertNotNull(stayDates.getCheckInDate()); - Assertions.assertNotNull(stayDates.getCheckOutDate()); - - Assertions.assertNotNull(ratePlan.getRemainingCount()); - - RatePlanPrice ratePlanPrice = ratePlan.getPrice(); - if (ratePlanPrice != null) { - Assertions.assertNotNull(ratePlanPrice.getTotalPrice()); - Assertions.assertNotNull(ratePlanPrice.getAvgNightlyRate()); - - List nightlyRates = ratePlanPrice.getNightlyRates(); - if (nightlyRates != null && !nightlyRates.isEmpty()) { - nightlyRates.forEach(item -> { - Assertions.assertNotNull(item.getStayDate()); - Assertions.assertNotNull(item.getBaseRate()); - }); - } - - List taxesAndFeesDetails = - ratePlanPrice.getTaxesAndFeesDetails(); - if (taxesAndFeesDetails != null && !taxesAndFeesDetails.isEmpty()) { - taxesAndFeesDetails.forEach(item -> { - Assertions.assertNotNull(item.getCategoryCode()); - Assertions.assertNotNull(item.getAmount()); - }); - } - } - - RatePlanStandalonePrice standalonePrice = ratePlan.getStandalonePrice(); - if (standalonePrice != null) { - Assertions.assertNotNull(standalonePrice.getTotalPrice()); - Assertions.assertNotNull(standalonePrice.getAvgNightlyRate()); - } - - Assertions.assertNotNull(ratePlan.getPaymentMethod()); - - List paymentSchedule = ratePlan.getPaymentSchedule(); - if (paymentSchedule != null && !paymentSchedule.isEmpty()) { - paymentSchedule.forEach(item -> { - Assertions.assertNotNull(item.getDue()); - Assertions.assertNotNull(item.getPrice()); - }); - } - - CancellationPolicy cancellationPolicy = ratePlan.getCancellationPolicy(); - if (cancellationPolicy != null) { - List nonRefundableDateRanges = - cancellationPolicy.getNonRefundableDateRanges(); - if (nonRefundableDateRanges != null && !nonRefundableDateRanges.isEmpty()) { - nonRefundableDateRanges.forEach(item -> { - Assertions.assertNotNull(item.getStartDate()); - Assertions.assertNotNull(item.getEndDate()); - }); - } - } - - List amenities = ratePlan.getAmenities(); - if (amenities != null && !amenities.isEmpty()) { - amenities.forEach(item -> { - Assertions.assertNotNull(item.getId()); - Assertions.assertNotNull(item.getName()); - }); - } - } -} diff --git a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/QuotesIntegrationTests.java b/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/QuotesIntegrationTests.java deleted file mode 100644 index adffd2d9e..000000000 --- a/tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/QuotesIntegrationTests.java +++ /dev/null @@ -1,205 +0,0 @@ -package com.expediagroup.sdk.xap.integrations.lodging; - -import static com.expediagroup.sdk.xap.integrations.common.Constant.ACCEPT_HOTEL; -import static com.expediagroup.sdk.xap.integrations.common.Constant.ACCEPT_LODGING; -import static com.expediagroup.sdk.xap.integrations.common.Constant.AUTHORIZATION; -import static com.expediagroup.sdk.xap.integrations.common.Constant.MOCK_KEY; -import static com.expediagroup.sdk.xap.integrations.common.Constant.PARTNER_TRANSACTION_ID; - -import com.expediagroup.sdk.core.model.Response; -import com.expediagroup.sdk.xap.integrations.common.Constant; -import com.expediagroup.sdk.xap.integrations.common.XapIntegrationTests; -import com.expediagroup.sdk.xap.models.LodgingCancellationPolicy; -import com.expediagroup.sdk.xap.models.LodgingQuotesResponse; -import com.expediagroup.sdk.xap.models.LodgingRatePlan; -import com.expediagroup.sdk.xap.models.LodgingRoomType; -import com.expediagroup.sdk.xap.models.LodgingRoomTypePrice; -import com.expediagroup.sdk.xap.models.Property; -import com.expediagroup.sdk.xap.models.Room; -import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperation; -import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperationParams; -import io.hosuaby.inject.resources.junit.jupiter.GivenTextResource; -import io.hosuaby.inject.resources.junit.jupiter.TestWithResources; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import java.util.stream.Collectors; -import okhttp3.Headers; -import okhttp3.mockwebserver.MockResponse; -import okhttp3.mockwebserver.RecordedRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - - -/** - * This class is used to test the integration of the Lodging Quotes API. - */ -@TestWithResources -public class QuotesIntegrationTests extends XapIntegrationTests { - @Test - public void testRequest() { - ArrayList rooms = new ArrayList<>(); - rooms.add(Room.builder().adults(1L).build()); - rooms.add(Room.builder().adults(2L).childAges(Arrays.asList(10L, 12L)).build()); - rooms.add(Room.builder().adults(1L).childAges(Collections.singletonList(5L)).build()); - rooms.add(Room.builder().adults(6L).build()); - rooms.add(Room.builder().adults(2L).childAges(Arrays.asList(3L, 4L)).build()); - rooms.add(Room.builder().adults(3L).childAges(Arrays.asList(1L, 2L, 3L, 4L, 5L)).build()); - rooms.add(Room.builder().adults(2L).childAges(Arrays.asList(1L, 2L, 3L, 4L)).build()); - rooms.add(Room.builder().adults(1L).build()); - - GetLodgingQuotesOperationParams getLodgingQuotesOperationParams = - GetLodgingQuotesOperationParams.builder() - .partnerTransactionId(UUID.randomUUID().toString()) - .propertyIds(new HashSet<>(Arrays.asList("123", "456", "789"))) - .checkIn(LocalDate.now().plusDays(5)) - .checkOut(LocalDate.now().plusDays(10)) - .currency("USD") - .links(Collections.singletonList(GetLodgingQuotesOperationParams.Links.WEB)) - .rooms(rooms) - .travelWithPets(true) - .build(); - - mockWebServer.enqueue( - new MockResponse() - .setHeader("Content-Type", ACCEPT_LODGING) - .setResponseCode(200) - .setBody("{}")); - - xapClient.execute(new GetLodgingQuotesOperation(getLodgingQuotesOperationParams)); - try { - RecordedRequest recordedRequest = mockWebServer.takeRequest(); - // method - Assertions.assertEquals("GET", recordedRequest.getMethod()); - // headers - Headers headers = recordedRequest.getHeaders(); - Assertions.assertEquals(getLodgingQuotesOperationParams.getPartnerTransactionId(), - headers.get("Partner-Transaction-Id")); - Assertions.assertEquals(ACCEPT_LODGING, headers.get("Accept")); - Assertions.assertEquals(MOCK_KEY, headers.get("key")); - Assertions.assertEquals(AUTHORIZATION, headers.get("Authorization")); - // path and query - String path = recordedRequest.getPath(); - Assertions.assertNotNull(path); - Assertions.assertTrue(path.startsWith("/lodging/quotes")); - String query = path.substring(path.indexOf("?") + 1); - Assertions.assertTrue(query.contains("propertyIds=123%2C456%2C789")); - Assertions.assertTrue(query.contains( - "checkIn=" + getLodgingQuotesOperationParams.getCheckIn())); - Assertions.assertTrue(query.contains( - "checkOut=" + getLodgingQuotesOperationParams.getCheckOut())); - Assertions.assertTrue(query.contains("currency=USD")); - Assertions.assertTrue(query.contains("links=WEB")); - Assertions.assertTrue(query.contains("room1.adults=1")); - Assertions.assertTrue(query.contains("room2.adults=2")); - Assertions.assertTrue(query.contains("room2.childAges=10%2C12")); - Assertions.assertTrue(query.contains("room3.adults=1")); - Assertions.assertTrue(query.contains("room3.childAges=5")); - Assertions.assertTrue(query.contains("room4.adults=6")); - Assertions.assertTrue(query.contains("room5.adults=2")); - Assertions.assertTrue(query.contains("room5.childAges=3%2C4")); - Assertions.assertTrue(query.contains("room6.adults=3")); - Assertions.assertTrue(query.contains("room6.childAges=1%2C2%2C3%2C4%2C5")); - Assertions.assertTrue(query.contains("room7.adults=2")); - Assertions.assertTrue(query.contains("room7.childAges=1%2C2%2C3%2C4")); - Assertions.assertTrue(query.contains("room8.adults=1")); - Assertions.assertFalse(query.contains("room9")); - Assertions.assertTrue(query.contains("travelWithPets=true")); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - - @Test - public void testResponse(@GivenTextResource("GetLodgingQuotesResponse.json") String mockedResponse) { - GetLodgingQuotesOperationParams getLodgingQuotesOperationParams = - GetLodgingQuotesOperationParams.builder() - .partnerTransactionId(PARTNER_TRANSACTION_ID) - .propertyIds(new HashSet<>(Arrays.asList("87704892", "83418323", "75028284", "75030107", - "91799474"))) - .checkIn(LocalDate.now().plusDays(10)) - .checkOut(LocalDate.now().plusDays(15)) - .links(Collections.singletonList(GetLodgingQuotesOperationParams.Links.WEB)) - .build(); - - mockWebServer.enqueue( - new MockResponse() - .setHeader("Content-Type", ACCEPT_HOTEL) - .setHeader("partner-transaction-id", Constant.PARTNER_TRANSACTION_ID) - .setResponseCode(200) - .setBody(mockedResponse)); - - Response response = - xapClient.execute(new GetLodgingQuotesOperation(getLodgingQuotesOperationParams)); - verifyResponse(response); - } - - private void verifyResponse(Response response) { - Assertions.assertNotNull(response); - Assertions.assertEquals(200, response.getStatusCode()); - Map> headers = response.getHeaders(); - Assertions.assertNotNull(headers); - Assertions.assertEquals(Constant.PARTNER_TRANSACTION_ID, headers.get("partner-transaction-id") - .get(0)); - verifyLodgingQuotesResponse(response.getData()); - } - - private void verifyLodgingQuotesResponse(LodgingQuotesResponse lodgingQuotesResponse) { - Assertions.assertNotNull(lodgingQuotesResponse); - Assertions.assertNull(lodgingQuotesResponse.getWarnings()); - Assertions.assertNotNull(lodgingQuotesResponse.getCount()); - Assertions.assertTrue(lodgingQuotesResponse.getCount() > 0); - Assertions.assertNotNull(lodgingQuotesResponse.getTotalPropertyCount()); - Assertions.assertTrue(lodgingQuotesResponse.getTotalPropertyCount() > 0); - Assertions.assertNotNull(lodgingQuotesResponse.getTransactionId()); - Assertions.assertNotNull(lodgingQuotesResponse.getStayDates()); - Assertions.assertNotNull(lodgingQuotesResponse.getLengthOfStay()); - Assertions.assertTrue(lodgingQuotesResponse.getLengthOfStay() > 0); - Assertions.assertNotNull(lodgingQuotesResponse.getOccupants()); - Assertions.assertFalse(lodgingQuotesResponse.getOccupants().isEmpty()); - Assertions.assertNotNull(lodgingQuotesResponse.getProperties()); - Assertions.assertFalse(lodgingQuotesResponse.getProperties().isEmpty()); - List availProperties = lodgingQuotesResponse.getProperties() - .stream() - .filter(property -> Property.Status.AVAILABLE.equals(property.getStatus())) - .collect(Collectors.toList()); - if (availProperties.isEmpty()) { - Assertions.fail("No available properties found"); - } - availProperties.forEach(this::verifyProperty); - } - - private void verifyProperty(Property property) { - Assertions.assertNotNull(property); - Assertions.assertNotNull(property.getId()); - Assertions.assertNotNull(property.getStatus()); - Assertions.assertNotNull(property.getRoomTypes()); - Assertions.assertFalse(property.getRoomTypes().isEmpty()); - property.getRoomTypes().forEach(this::verifyRoomType); - } - - private void verifyRoomType(LodgingRoomType roomType) { - Assertions.assertNotNull(roomType); - LodgingRoomTypePrice price = roomType.getPrice(); - Assertions.assertNotNull(price); - Assertions.assertNotNull(price.getTotalPrice()); - Assertions.assertNotNull(price.getAvgNightlyRate()); - Assertions.assertNotNull(price.getTotalPriceWithPropertyFees()); - List ratePlans = roomType.getRatePlans(); - Assertions.assertNotNull(ratePlans); - Assertions.assertFalse(ratePlans.isEmpty()); - ratePlans.forEach(this::verifyRatePlan); - } - - private void verifyRatePlan(LodgingRatePlan ratePlan) { - LodgingCancellationPolicy cancellationPolicy = ratePlan.getCancellationPolicy(); - Assertions.assertNotNull(cancellationPolicy); - Assertions.assertNotNull(cancellationPolicy.getFreeCancellation()); - Assertions.assertNotNull(cancellationPolicy.getRefundable()); - } -} diff --git a/tests/integration/src/test/resources/GetLodgingAvailabilityCalendarsResponse.json b/tests/integration/src/test/resources/GetLodgingAvailabilityCalendarsResponse.json deleted file mode 100644 index b7b30d17f..000000000 --- a/tests/integration/src/test/resources/GetLodgingAvailabilityCalendarsResponse.json +++ /dev/null @@ -1 +0,0 @@ -{"TransactionId":"a3174b77-2aee-4e8a-83c4-2f70a4f0ba59","AvailabilityCalendars":[{"PropertyId":"75030107","DateRange":{"StartDate":"2025-02-05","EndDate":"2026-02-28"},"Availability":"NNNNNNNNNNNNNNNNNNNNNNNNYYYYYYYYYYYYYYYYYYYYYNNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNNNYYYYNNNNNNNNNNNNYYYYYYYYYYYYYYYYYNNNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY","ChangeOver":"XXXXXXXXXXXXXXXXXXXXXXXXICCCCCCCCCCCCCCCCCCCCOXXXXXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOXXXXXXICCCOXXXXXXXXXXXICCCCCCCCCCCCCCCCOXXXXXXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOXXXXXXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC","MinStay":"3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3","MaxStay":"365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365","MinPriorNotify":"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"},{"PropertyId":"87704892","DateRange":{"StartDate":"2025-02-06","EndDate":"2028-02-05"},"Availability":"YYYYYYYNNNNNNNNNNNNNNNNNNNYYYYYYYYYYYYYYYYYNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","ChangeOver":"CCCCCCOOXXXXXXXXXXXXXXXXXXICCCCCCCCCCCCCCCOOXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXC","MinStay":"2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,30,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,30,5,30,30,30,5,5,5,30,30,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2","MaxStay":"695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0","MinPriorNotify":"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"},{"PropertyId":"83418323","DateRange":{"StartDate":"2025-02-06","EndDate":"2027-02-06"},"Availability":"YYYYYYYNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","ChangeOver":"CCCCCCCOXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCIIIIICCIIIIICCIIIIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","MinStay":"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1","MaxStay":"27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27","MinPriorNotify":"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"},{"PropertyId":"91799474","DateRange":{"StartDate":"2025-02-06","EndDate":"2028-02-05"},"Availability":"NNNNNNNNNNNNNNNNNNNNNNYYYNNNNYYYNNNNYYYNNNNYYYNNNNYYYNNNNYYYNNNNYYYNNNNYYYNNNNYYYNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNYYYYYYYYYYYYYYNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","ChangeOver":"OXXXXXXXXXXXXXXXXXXXXXICCOXXXICCOXXXICCOXXXICCOXXXICCOXXXICCOXXXICCOXXXICCOXXXICCOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXICCCCCCCCCCCCCOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXC","MinStay":"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1","MaxStay":"695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0","MinPriorNotify":"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"}]} \ No newline at end of file diff --git a/tests/integration/src/test/resources/GetLodgingListingsResponse.json b/tests/integration/src/test/resources/GetLodgingListingsResponse.json deleted file mode 100644 index 6aa0c8c25..000000000 --- a/tests/integration/src/test/resources/GetLodgingListingsResponse.json +++ /dev/null @@ -1 +0,0 @@ -{"Count":4,"TotalHotelCount":5,"TransactionId":"59033fce-a679-44b7-a356-aac9db7e5168","StayDates":{"CheckInDate":"2025-02-11","CheckOutDate":"2025-02-16"},"LengthOfStay":5,"NumberOfRooms":1,"Occupants":[{"Adults":2}],"Hotels":[{"Id":"73460112","Name":"citizenM Seattle Pioneer Square","PropertyType":{"Id":1,"Name":"Hotel"},"LocalCurrencyCode":"USD","Location":{"Address":{"Address1":"60 Yesler Way","City":"Seattle","Province":"WA","Country":"USA","PostalCode":"98104"},"GeoLocation":{"Latitude":"47.602143","Longitude":"-122.33494","Obfuscated":false},"Neighborhood":{"Id":"800130","Name":"Downtown Seattle"}},"Distance":{"Value":"1.03","Unit":"km","Direction":"S"},"Description":{"LocationTeaser":"Located in Downtown Seattle, this hotel is steps from Pioneer Square and Seattle Waterfront. Lumen Field and Pike Place Market are also within 15 minutes. Pioneer Square Station is only a 5-minute walk and Occidental Mall Stop is 6 minutes. ","HotelTeaser":"This smoke-free hotel features a restaurant, a coffee shop/cafe, and coffee/tea in a common area. WiFi in public areas is free. Other amenities include a microwave in a common area, a 24-hour front desk, and express check-in. ","RoomTeaser":"Housekeeping is available on request. "},"Status":"AVAILABLE","ThumbnailUrl":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/85167557_t.jpg","StarRating":"4.0","GuestRating":"4.6","GuestReviewCount":2818,"PetFriendly":false,"LgbtqiaFriendly":true,"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.expedia.com/Hotel-Search?mpd=USD&tpid=1&mpe=1738841635&endDate=2025-02-16&adults=2&mpn=315880777&mpm=24&locale=en_US&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0¤cy=USD&rateplanid=393316100&selected=73460112&startDate=2025-02-11&mpb=147.57&mpa=819.85"},"ApiRateCalendar":{"Accept":"application/vnd.exp-hotel.v3+json","Method":"GET","Href":"https://apim.expedia.com/hotels/rateCalendar?ecomHotelId=73460112¤cy=USD&startDate=2025-02-06&endDate=2025-08-05&lengthOfStay=5"}},"Policies":{"CheckInStartTime":"2:00 PM","CheckInEndTime":"midnight","SpecialCheckInInstructions":["Front desk staff will greet guests on arrival at the property. Guests are recommended to download the property's CitizenM mobile app before check-in. "],"CheckOutTime":"11:00 AM","PetPolicies":["Pets not allowed (service animals welcome)"],"ChildrenAndExtraBedsPolicies":["Children are welcome.","Kids stay free! Children 10 years old and younger stay free when using existing bedding. ","Rollaway/extra beds are not available.","Cribs (infant beds) are not available."]},"OptionalExtras":["

  • Fee for buffet breakfast: approximately USD 19 per person
  • Late check-out fee: USD 39 (subject to availability)
","

The above list may not be comprehensive. Fees and deposits may not include tax and are subject to change.

"],"Media":[{"Type":"1","Title":"Primary image","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/85167557_t.jpg"},{"Type":"1","Title":"Lobby sitting area","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/372b6aeb_t.jpg"},{"Type":"1","Title":"Lobby sitting area","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/b36a1c9e_t.jpg"},{"Type":"1","Title":"Check-in/check-out kiosk","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/940ffd14_t.jpg"},{"Type":"1","Title":"Lobby lounge","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/8e851afe_t.jpg"},{"Type":"1","Title":"Lobby lounge","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/abd5d321_t.jpg"},{"Type":"1","Title":"Lobby lounge","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/ce78a52b_t.jpg"},{"Type":"1","Title":"Lobby lounge","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/w8654h6087x0y0-870e1566_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/ba6f2635_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/4d085105_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/7188515e_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/77ef4525_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/b714633c_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/ab42268e_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/1c6ea7af_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/d4794102_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/5603e085_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/f4912fe3_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/1793b778_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/7a4e39f8_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/af9d571b_t.jpg"},{"Type":"1","Title":"Breakfast buffet","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/w4925h5904x353y366-736f19a8_t.jpg"},{"Type":"1","Title":"Breakfast buffet","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/w7515h6601x0y0-8e5ceb97_t.jpg"},{"Type":"1","Title":"Bar (on property)","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/c92741c0_t.jpg"},{"Type":"1","Title":"Interior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/a53634bd_t.jpg"},{"Type":"1","Title":"Interior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/7589256a_t.jpg"},{"Type":"1","Title":"Interior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/fc4afd21_t.jpg"},{"Type":"1","Title":"Interior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/d29d315a_t.jpg"},{"Type":"1","Title":"Interior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/0c8beed1_t.jpg"},{"Type":"1","Title":"Interior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/4ba2c557_t.jpg"},{"Type":"1","Title":"Interior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/35aeebef_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/bf693950_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/95df0a15_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/17e89b5b_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/6479d720_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/d14c7395_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/b1d32fc2_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/d848a5d2_t.jpg"},{"Type":"1","Title":"Property entrance","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/af5a503a_t.jpg"},{"Type":"1","Title":"Property entrance","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/2e67a572_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/0b65a16e_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/293fde6f_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/5e7b0d38_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/c7e2fd57_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/0f3d2b5a_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/46cde8a4_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/2b69ecba_t.jpg"},{"Type":"1","Title":"Building design","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/158e4f72_t.jpg"},{"Type":"1","Title":"Point of interest","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/293a9d66_t.jpg"},{"Type":"1","Title":"Point of interest","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/4deda8a3_t.jpg"},{"Type":"1","Title":"Point of interest","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/9a5f9142_t.jpg"},{"Type":"1","Title":"Point of interest","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/874dd7df_t.jpg"},{"Type":"1","Title":"Point of interest","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/3678f72f_t.jpg"}],"HotelAmenities":[{"Id":"2177","Name":"Express check-in"},{"Id":"2050","Name":"Pets not allowed"},{"Id":"5058","Name":"Service animals are allowed"},{"Id":"1073744898","Name":"Coworking spaces"},{"Id":"5059","Name":"Service animals are exempt from fees/restrictions"},{"Id":"324","Name":"Coffee/tea in common areas"},{"Id":"8","Name":"Elevator"},{"Id":"1073745288","Name":"Locally-owned & organized tours & activities"},{"Id":"1073745352","Name":"Elevator door width (inches) - 35"},{"Id":"1073745289","Name":"Showcase for local artists"},{"Id":"1073745353","Name":"Elevator door width (centimeters) - 90"},{"Id":"2063","Name":"24-hour front desk"},{"Id":"1073745295","Name":"At least 80% of all lighting comes from LEDs"},{"Id":"2067","Name":"Express check-out"},{"Id":"2515","Name":"Year Built - 2022"},{"Id":"1073745301","Name":"Bulk dispenser for toiletries"},{"Id":"2390","Name":"Free WiFi"},{"Id":"1073745302","Name":"No single-use plastic soda bottles"},{"Id":"1073745303","Name":"No single-use plastic stirrers"},{"Id":"2137","Name":"Smoke-free property"},{"Id":"3929","Name":"Number of coffee shops/cafes - 1"},{"Id":"1073745305","Name":"No single-use plastic straws"},{"Id":"1073745307","Name":"No single-use plastic water bottles"},{"Id":"1073745308","Name":"Reusable cups only"},{"Id":"1073745310","Name":"Water-efficient showers only"},{"Id":"1073745311","Name":"Water-efficient toilets only"},{"Id":"2016","Name":"Safe-deposit box at front desk"},{"Id":"4003","Name":"Luggage storage"},{"Id":"1073744422","Name":"Coin laundry on site"},{"Id":"361","Name":"Breakfast available (surcharge)"},{"Id":"2537","Name":"Number of restaurants - 1"},{"Id":"1073743404","Name":"Shared microwave"},{"Id":"52","Name":"Total number of rooms - 216"},{"Id":"372","Name":"Television in common areas"},{"Id":"1073745332","Name":"No accessible shuttle"},{"Id":"54","Name":"Number of floors - 8"},{"Id":"55","Name":"Number of buildings/towers - 1"},{"Id":"2043","Name":"Multilingual staff"},{"Id":"1073744255","Name":"Eco-friendly cleaning products used"}],"RoomAmenities":[{"Id":"130","Name":"Refrigerator"},{"Id":"136","Name":"Phone"},{"Id":"1073744201","Name":"Soap"},{"Id":"1073743370","Name":"Towels provided"},{"Id":"1073744202","Name":"Shampoo"},{"Id":"2571","Name":"Pillowtop mattress"},{"Id":"1073743371","Name":"Bedsheets provided"},{"Id":"1073744203","Name":"Toilet paper"},{"Id":"1073744651","Name":"Hand-held showerhead"},{"Id":"141","Name":"Private bathroom"},{"Id":"1073744653","Name":"Closed captioned TV"},{"Id":"1073745294","Name":"Energy-saving switches"},{"Id":"144","Name":"Hair dryer"},{"Id":"145","Name":"Iron/ironing board"},{"Id":"146","Name":"In-room safe"},{"Id":"1073744658","Name":"Portable shower seat"},{"Id":"4947","Name":"Hydromassage showerhead"},{"Id":"1073743379","Name":"Number of bathrooms - 1"},{"Id":"1073744661","Name":"Lowered electrical outlets in bathroom"},{"Id":"1073744663","Name":"Lowered peephole/view port in door"},{"Id":"1073744665","Name":"Lowered locks/deadbolt"},{"Id":"2396","Name":"Satellite TV service"},{"Id":"2399","Name":"Flat-panel TV"},{"Id":"1073744673","Name":"Height-adjustable showerhead"},{"Id":"2026","Name":"Desk"},{"Id":"1073744684","Name":"Transfer shower"},{"Id":"1073744237","Name":"Laptop-friendly workspace"},{"Id":"2030","Name":"In-room climate control (air conditioning)"},{"Id":"3502","Name":"Rainfall showerhead"},{"Id":"1073744240","Name":"Eco-friendly cleaning products provided"},{"Id":"5105","Name":"iPad"},{"Id":"1073744241","Name":"Eco-friendly toiletries"},{"Id":"1073744689","Name":"Lever door handles"},{"Id":"2034","Name":"Premium bedding"},{"Id":"1073743285","Name":"In-room climate control (heating)"},{"Id":"2166","Name":"Shower only"},{"Id":"1073743926","Name":"Housekeeping on request"},{"Id":"2807","Name":"iPod docking station"},{"Id":"121","Name":"Wheelchair accessible"},{"Id":"1073744826","Name":"Number of days between towel changes: 3"},{"Id":"1073744829","Name":"Number of days between bed sheet changes: 3"},{"Id":"2559","Name":"Down comforter"}],"Accessibility":["Wheelchair-accessible on-site restaurant","Wheelchair-accessible lounge","Wheelchair accessible path of travel","Wheelchair-accessible public washroom","Well-lit path to entrance","Stair-free path to entrance","Wheelchair accessible (may have limitations)"],"RoomTypes":[{"Description":"Room, 1 King Bed","RoomKey":"Cgg3MzQ2MDExMhI0CgkzMTU4ODA3NzcSCTM5MzMxNjEwMBoCMjQgASoKMjAyNS0wMi0xMTIKMjAyNS0wMi0xNioDCgEyUgoIr9cBEK_XARgCWgJVUw","OfferId":"Cgg3MzQ2MDExMhI0CgkzMTU4ODA3NzcSCTM5MzMxNjEwMBoCMjQgASoKMjAyNS0wMi0xMTIKMjAyNS0wMi0xNioDCgEyUgoIr9cBEK_XARgCWgJVUw","RatePlanType":"standalone","RatePlans":[{"RoomTypeId":"315880777","RatePlanId":"393316100","RateRuleId":"802813980","InventorySourceId":"24","InventorySourceCode":"Expedia","StayDates":{"CheckInDate":"2025-02-11","CheckOutDate":"2025-02-16"},"RemainingCount":40,"Price":{"BaseRate":{"Value":"819.85","Currency":"USD"},"TaxesAndFees":{"Value":"147.57","Currency":"USD"},"TotalPrice":{"Value":"967.42","Currency":"USD"},"TotalStrikeOutPrice":{"Value":"1058.52","Currency":"USD"},"AvgNightlyRate":{"Value":"163.97","Currency":"USD"},"AvgNightlyStrikeOutRate":{"Value":"182.19","Currency":"USD"},"NightlyRates":[{"StayDate":"2025-02-11","BaseRate":{"Value":"143.99","Currency":"USD"}},{"StayDate":"2025-02-12","BaseRate":{"Value":"143.99","Currency":"USD"}},{"StayDate":"2025-02-13","BaseRate":{"Value":"129.59","Currency":"USD"}},{"StayDate":"2025-02-14","BaseRate":{"Value":"201.59","Currency":"USD"}},{"StayDate":"2025-02-15","BaseRate":{"Value":"200.69","Currency":"USD"}}]},"Promotions":[{"Description":"Save 10%","Amount":{"Value":"91.10","Currency":"USD"}}],"PaymentMethod":"Hotel","PaymentTime":"PayLater","FreeInternet":false,"FreeWiFi":false,"FreeParking":false,"FreeBreakfast":false,"CancellationPolicy":{"Refundable":true,"FreeCancellation":true,"FreeCancellationEndDateTime":"2025-02-09T23:59:00-08:00","CancellationPenaltyRules":[{"PenaltyPercentOfStay":"100","PenaltyStartDateTime":"2025-02-09T23:59:00-08:00","PenaltyEndDateTime":"2025-02-11T23:59:00-08:00"}],"CancelPolicyDescription":"There is no charge for cancellations made before 23:59 (property local time) on February 9, 2025.Cancellations or changes made after 23:59 (property local time) on February 9, 2025 or no-shows are subject to a property fee equal to 100% of the total amount paid for the reservation."}}],"Price":{"BaseRate":{"Value":"819.85","Currency":"USD"},"TaxesAndFees":{"Value":"147.57","Currency":"USD"},"TotalPrice":{"Value":"967.42","Currency":"USD"},"TotalStrikeOutPrice":{"Value":"1058.52","Currency":"USD"},"AvgNightlyRate":{"Value":"163.97","Currency":"USD"},"AvgNightlyStrikeOutRate":{"Value":"182.19","Currency":"USD"},"AvgNightlyRateWithFees":{"Value":"163.97","Currency":"USD"},"AvgNightlyStrikeOutRateWithFees":{"Value":"182.19","Currency":"USD"},"TotalPriceWithHotelFees":{"Value":"967.42","Currency":"USD"}},"Promotions":[{"Description":"Save 10%","Amount":{"Value":"91.10","Currency":"USD"}}],"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.expedia.com/Hotel-Search?mpd=USD&tpid=1&mpe=1738841635&endDate=2025-02-16&adults=2&mpn=315880777&mpm=24&mpp=1&locale=en_US&mpo=HC&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0¤cy=USD&rateplanid=393316100&selected=73460112&startDate=2025-02-11&mpb=147.57&mpa=819.85"},"WebDetails":{"Method":"GET","Href":"https://www.expedia.com/Hotel.h73460112.Hotel-Information?mpd=USD&tpid=1&mpe=1738841635&chkin=2025-02-11&mpm=24&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&chkout=2025-02-16®ionId=800130¤cy=USD&rateplanid=393316100&rm1=a2&langid=1033&mpb=147.57&mpa=819.85"},"ApiDetails":{"Accept":"application/vnd.exp-hotel.v3+json","Method":"GET","Href":"https://apim.expedia.com/hotels/details/Cgg3MzQ2MDExMhI0CgkzMTU4ODA3NzcSCTM5MzMxNjEwMBoCMjQgASoKMjAyNS0wMi0xMTIKMjAyNS0wMi0xNioDCgEyUgoIr9cBEK_XARgCWgJVUw?price=967.42¤cy=USD&locale=en_US"}},"SmokingOption":"NonSmoking","BedTypeOptions":[{"Id":"37321","Description":"1 King Bed"}],"RoomOccupancyPolicy":{"MaxGuestCount":2,"MinCheckInAge":18,"AgeClassRestrictions":[{"AgeClass":"Adult","AgeMinimum":11,"MaxGuestCount":2},{"AgeClass":"Child","AgeMinimum":0,"AgeMaximum":10,"MaxGuestCount":1}]},"Amenities":[{"Id":"4097","Name":"Number of living rooms 0"},{"Id":"1073744801","Name":"Location - ground floor"},{"Id":"4953","Name":"Number of bedrooms - 0"},{"Id":"4092","Name":"Square meters - 14"},{"Id":"4093","Name":"Square feet - 151"},{"Id":"1073744318","Name":"Ping - 4"}],"Media":[{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/1c6ea7af_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/ab42268e_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/b714633c_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/4d085105_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/77ef4525_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/ba6f2635_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/d4794102_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/5603e085_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/b1d32fc2_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/17e89b5b_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/6479d720_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/74000000/73470000/73460200/73460112/d14c7395_t.jpg"}]}]},{"Id":"546475","Name":"Grand Hyatt Seattle","PropertyType":{"Id":1,"Name":"Hotel"},"LocalCurrencyCode":"USD","Location":{"Address":{"Address1":"721 Pine St","City":"Seattle","Province":"WA","Country":"USA","PostalCode":"98101"},"GeoLocation":{"Latitude":"47.61271","Longitude":"-122.33407","Obfuscated":false},"Neighborhood":{"Id":"800130","Name":"Downtown Seattle"}},"Distance":{"Value":"0.31","Unit":"km","Direction":"NE"},"Description":{"LocationTeaser":"Located in Downtown Seattle, this luxury hotel is within a 10-minute walk of Seattle Convention Center Arch Building and Pike Place Market. Space Needle and Seattle Center are also within 1 mi (2 km). Westlake Station and Westlake Ave Hub Station are within a 5-minute walk. ","HotelTeaser":"Along with 4 restaurants, this hotel has a full-service spa and a 24-hour fitness center. WiFi in public areas is free. Additionally, a bar/lounge, a sauna, and a conference center are onsite. ","RoomTeaser":"Housekeeping is available on request. "},"Status":"AVAILABLE","ThumbnailUrl":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/a82db52a_t.jpg","StarRating":"4.5","GuestRating":"4.8","GuestReviewCount":1611,"PetFriendly":true,"LgbtqiaFriendly":true,"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.expedia.com/Hotel-Search?tpid=1&mpe=1738841635&endDate=2025-02-16&adults=2&locale=en_US&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&startDate=2025-02-11&mpd=USD&mpn=200672561¤cy=USD&rateplanid=397385363&mpm=24&selected=546475&mpb=280.05&mpa=1556.00"},"ApiRateCalendar":{"Accept":"application/vnd.exp-hotel.v3+json","Method":"GET","Href":"https://apim.expedia.com/hotels/rateCalendar?ecomHotelId=546475¤cy=USD&startDate=2025-02-06&endDate=2025-08-05&lengthOfStay=5"}},"Policies":{"CheckInStartTime":"4 PM","CheckInEndTime":"midnight","SpecialCheckInInstructions":["Front desk staff will greet guests on arrival at the property. "],"CheckOutTime":"noon","PetPolicies":["Pets allowed for an extra charge of USD 100.00 per accommodation, per stay","Dogs only","2 total (up to 75 lbs per pet)","Service animals are welcome, and are exempt from fees"],"ChildrenAndExtraBedsPolicies":["Children are welcome.","Kids stay free! Children 17 years old and younger stay free when using existing bedding. ","Rollaway/extra beds are available for USD 25 per night.","Free cribs (infant beds)!"]},"OptionalExtras":["
  • Fee for full breakfast: approximately USD 15 to 50 per person
  • Valet parking fee: USD 68.00 per night (in/out privileges)
  • Pet fee: USD 100.00 per accommodation, per stay
  • Service animals are exempt from fees
  • In-room microwave fee: USD 25 per stay
  • Rollaway bed fee: USD 25 per night
","

The above list may not be comprehensive. Fees and deposits may not include tax and are subject to change.

"],"Media":[{"Type":"1","Title":"Primary image","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/a82db52a_t.jpg"},{"Type":"1","Title":"Lobby","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/acc9a638_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/12b01fc0_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/41816cc5_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/d9cebb04_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/7d2fe4e7_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/3dd2eb56_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/8a291b1b_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/18e37ed0_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3837h2557x0y0-d7e0ca72_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3837h2558x0y0-4473e95d_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3840h2557x0y0-5462615b_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/01431637_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3748h3829x0y6-17b12404_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/0f8fd5ae_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/79ca6770_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/c02c7e5a_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/4ba03d74_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/ab70f6bd_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/17aca102_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/074648b5_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3836h2557x0y0-6ec80451_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3836h2558x0y0-369178f6_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3840h2556x0y0-8b6bc5ad_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3840h2557x0y0-d6d863df_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3834h2557x0y0-67c7d558_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/5e56a1bd_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3837h2557x0y0-f5ee441f_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/489a4814_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/34170d3e_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/0e328ff8_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/139a7d5a_t.jpg"},{"Type":"1","Title":"Fitness facility","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/a85b7c44_t.jpg"},{"Type":"1","Title":"Fitness facility","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/d57d6617_t.jpg"},{"Type":"1","Title":"Spa treatment","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/3bab9bb2_t.jpg"},{"Type":"1","Title":"Sports facility","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/98f89d13_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/c1abf301_t.jpg"},{"Type":"1","Title":"Delicatessen","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/ace1ff9b_t.jpg"},{"Type":"1","Title":"Coffee shop","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/f734254c_t.jpg"},{"Type":"1","Title":"Coffee shop","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/31f4f74c_t.jpg"},{"Type":"1","Title":"Breakfast meal","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/04a7af5b_t.jpg"},{"Type":"1","Title":"Bar (on property)","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/3ddf606d_t.jpg"},{"Type":"1","Title":"Bar (on property)","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/d51e90a7_t.jpg"},{"Type":"1","Title":"Bar (on property)","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/d565fe3e_t.jpg"},{"Type":"1","Title":"Business center","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/3050cc39_t.jpg"}],"HotelAmenities":[{"Id":"2177","Name":"Express check-in"},{"Id":"2822","Name":"Number of hot tubs - 1"},{"Id":"8","Name":"Elevator"},{"Id":"2063","Name":"24-hour front desk"},{"Id":"2065","Name":"Business center"},{"Id":"2066","Name":"Porter/bellhop"},{"Id":"2067","Name":"Express check-out"},{"Id":"2070","Name":"Dry cleaning/laundry service"},{"Id":"3864","Name":"Valet parking (surcharge)"},{"Id":"3865","Name":"Computer station"},{"Id":"2592","Name":"Conference space size (meters) - 2323"},{"Id":"2593","Name":"Number of meeting rooms - 1"},{"Id":"4003","Name":"Luggage storage"},{"Id":"40","Name":"Hair salon"},{"Id":"41","Name":"ATM/banking"},{"Id":"43","Name":"Concierge services"},{"Id":"44","Name":"Gift shops or newsstand"},{"Id":"3372","Name":"Conference center"},{"Id":"45","Name":"Shopping on site"},{"Id":"2349","Name":"Designated smoking areas"},{"Id":"51","Name":"Pets allowed"},{"Id":"52","Name":"Total number of rooms - 457"},{"Id":"54","Name":"Number of floors - 29"},{"Id":"55","Name":"Number of buildings/towers - 1"},{"Id":"5058","Name":"Service animals are allowed"},{"Id":"5059","Name":"Service animals are exempt from fees/restrictions"},{"Id":"3913","Name":"Number of bars/lounges - 1"},{"Id":"2123","Name":"Full-service spa"},{"Id":"81","Name":"Conference space"},{"Id":"2386","Name":"Grocery/convenience store"},{"Id":"2387","Name":"Tours/ticket assistance"},{"Id":"2515","Name":"Year Built - 2001"},{"Id":"1073743315","Name":"Electric car charging station"},{"Id":"2644","Name":"Pet max weight (per pet) in kg is 34"},{"Id":"2646","Name":"Pet max weight (per pet) in lb is 75"},{"Id":"2134","Name":"Steam room"},{"Id":"2390","Name":"Free WiFi"},{"Id":"2135","Name":"Sauna"},{"Id":"2392","Name":"Free wired internet"},{"Id":"3929","Name":"Number of coffee shops/cafes - 1"},{"Id":"2016","Name":"Safe-deposit box at front desk"},{"Id":"361","Name":"Breakfast available (surcharge)"},{"Id":"2537","Name":"Number of restaurants - 4"},{"Id":"2539","Name":"Conference space size (feet) - 25005"},{"Id":"1073744110","Name":"Ballroom"},{"Id":"1073744111","Name":"Banquet hall"},{"Id":"369","Name":"Laundry facilities"},{"Id":"4468","Name":"24-hour fitness facilities"},{"Id":"2809","Name":"Only dogs are allowed"},{"Id":"2811","Name":"Maximum number of pets per room 2"},{"Id":"2043","Name":"Multilingual staff"},{"Id":"2047","Name":"Free newspapers in lobby"}],"RoomAmenities":[{"Id":"130","Name":"Refrigerator"},{"Id":"132","Name":"Coffee/tea maker"},{"Id":"4420","Name":"Connecting/adjoining rooms available"},{"Id":"135","Name":"Hypo-allergenic bedding available"},{"Id":"136","Name":"Phone"},{"Id":"1073743370","Name":"Towels provided"},{"Id":"2571","Name":"Pillowtop mattress"},{"Id":"1073743371","Name":"Bedsheets provided"},{"Id":"142","Name":"Bathrobes"},{"Id":"143","Name":"Free toiletries"},{"Id":"144","Name":"Hair dryer"},{"Id":"145","Name":"Iron/ironing board"},{"Id":"2130","Name":"Microwave (on request)"},{"Id":"2579","Name":"TV size: 47"},{"Id":"2580","Name":"TV size measurement: inch"},{"Id":"2389","Name":"In-room safe (laptop compatible)"},{"Id":"4951","Name":"Free cribs/infant beds"},{"Id":"26","Name":"Television"},{"Id":"2396","Name":"Satellite TV service"},{"Id":"2015","Name":"Room service (24 hours)"},{"Id":"2399","Name":"Flat-panel TV"},{"Id":"2081","Name":"Premium TV channels"},{"Id":"2403","Name":"Free WiFi"},{"Id":"2405","Name":"Free wired internet"},{"Id":"2150","Name":"Blackout drapes/curtains"},{"Id":"2025","Name":"Designer toiletries"},{"Id":"2026","Name":"Desk"},{"Id":"2030","Name":"In-room climate control (air conditioning)"},{"Id":"2160","Name":"In-room massage available"},{"Id":"2034","Name":"Premium bedding"},{"Id":"2100","Name":"Wireless internet access"},{"Id":"1073742773","Name":"Microwave (surcharge)"},{"Id":"1073743926","Name":"Housekeeping on request"},{"Id":"2039","Name":"Pay movies"},{"Id":"2807","Name":"iPod docking station"}],"Accessibility":["Assistive listening devices available","Braille or raised signage","Wheelchair accessible path of travel","Wheelchair accessible (may have limitations)"],"RoomTypes":[{"Description":"Room, 1 King Bed, City View","RoomKey":"CgY1NDY0NzUSMgoJMjAwNjcyNTYxEgkzOTczODUzNjMaAjI0KgoyMDI1LTAyLTExMgoyMDI1LTAyLTE2KgMKATJSCgiv1wEQr9cBGAJaAlVT","OfferId":"CgY1NDY0NzUSMgoJMjAwNjcyNTYxEgkzOTczODUzNjMaAjI0KgoyMDI1LTAyLTExMgoyMDI1LTAyLTE2KgMKATJSCgiv1wEQr9cBGAJaAlVT","RatePlanType":"standalone","RatePlans":[{"RoomTypeId":"200672561","RatePlanId":"397385363","RateRuleId":"825250051","InventorySourceId":"24","InventorySourceCode":"Expedia","StayDates":{"CheckInDate":"2025-02-11","CheckOutDate":"2025-02-16"},"RemainingCount":1,"Price":{"BaseRate":{"Value":"1556.00","Currency":"USD"},"TaxesAndFees":{"Value":"280.05","Currency":"USD"},"TotalPrice":{"Value":"1836.05","Currency":"USD"},"AvgNightlyRate":{"Value":"311.20","Currency":"USD"},"NightlyRates":[{"StayDate":"2025-02-11","BaseRate":{"Value":"311.20","Currency":"USD"}},{"StayDate":"2025-02-12","BaseRate":{"Value":"311.20","Currency":"USD"}},{"StayDate":"2025-02-13","BaseRate":{"Value":"311.20","Currency":"USD"}},{"StayDate":"2025-02-14","BaseRate":{"Value":"311.20","Currency":"USD"}},{"StayDate":"2025-02-15","BaseRate":{"Value":"311.20","Currency":"USD"}}]},"PaymentMethod":"Online","FreeInternet":true,"FreeWiFi":true,"FreeInternetDetails":["Free WiFi","Free wired internet"],"FreeParking":false,"FreeBreakfast":false,"CancellationPolicy":{"Refundable":true,"FreeCancellation":true,"FreeCancellationEndDateTime":"2025-02-10T23:59:00-08:00","CancellationPenaltyRules":[{"PenaltyNightCount":1,"PenaltyStartDateTime":"2025-02-10T23:59:00-08:00","PenaltyEndDateTime":"2025-02-11T23:59:00-08:00"}],"CancelPolicyDescription":"There is no charge for cancellations made before 23:59 (property local time) on February 10, 2025.Cancellations or changes made after 23:59 (property local time) on February 10, 2025 or no-shows are subject to a property fee equal to the first nights rate plus taxes and fees."}}],"Price":{"BaseRate":{"Value":"1556.00","Currency":"USD"},"TaxesAndFees":{"Value":"280.05","Currency":"USD"},"TotalPrice":{"Value":"1836.05","Currency":"USD"},"AvgNightlyRate":{"Value":"311.20","Currency":"USD"},"AvgNightlyRateWithFees":{"Value":"311.20","Currency":"USD"},"TotalPriceWithHotelFees":{"Value":"1836.05","Currency":"USD"}},"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.expedia.com/Hotel-Search?tpid=1&mpe=1738841635&endDate=2025-02-16&adults=2&locale=en_US&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&startDate=2025-02-11&mpd=USD&mpn=200672561¤cy=USD&rateplanid=397385363&mpm=24&mpp=1&mpo=EC&selected=546475&mpb=280.05&mpa=1556.00"},"WebDetails":{"Method":"GET","Href":"https://www.expedia.com/Hotel.h546475.Hotel-Information?tpid=1&mpe=1738841635&chkin=2025-02-11&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&chkout=2025-02-16&rm1=a2&langid=1033&mpd=USD®ionId=800130¤cy=USD&rateplanid=397385363&mpm=24&mpb=280.05&mpa=1556.00"},"ApiDetails":{"Accept":"application/vnd.exp-hotel.v3+json","Method":"GET","Href":"https://apim.expedia.com/hotels/details/CgY1NDY0NzUSMgoJMjAwNjcyNTYxEgkzOTczODUzNjMaAjI0KgoyMDI1LTAyLTExMgoyMDI1LTAyLTE2KgMKATJSCgiv1wEQr9cBGAJaAlVT?price=1836.05¤cy=USD&locale=en_US"}},"SmokingOption":"NonSmoking","BedTypeOptions":[{"Id":"37321","Description":"1 King Bed"}],"RoomOccupancyPolicy":{"MaxGuestCount":3,"MinCheckInAge":21,"AgeClassRestrictions":[{"AgeClass":"Adult","AgeMinimum":21,"MaxGuestCount":2},{"AgeClass":"Child","AgeMinimum":1,"AgeMaximum":20,"MaxGuestCount":2},{"AgeClass":"Infant","AgeMinimum":0,"AgeMaximum":0,"MaxGuestCount":2}]},"Amenities":[{"Id":"4097","Name":"Number of living rooms 0"},{"Id":"1073744707","Name":"Wardrobe or closet"},{"Id":"1073743908","Name":"Pets not allowed"},{"Id":"4134","Name":"City view"},{"Id":"4310","Name":"Number of bathrooms - 1"},{"Id":"4311","Name":"Separate bathtub and shower"},{"Id":"4233","Name":"Private bathroom"},{"Id":"4953","Name":"Number of bedrooms - 0"},{"Id":"1073742841","Name":"Rollaway/extra beds (surcharge)"},{"Id":"4092","Name":"Square meters - 35"},{"Id":"4093","Name":"Square feet - 380"},{"Id":"1073744318","Name":"Ping - 10.68"}],"Media":[{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3834h2557x0y0-67c7d558_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/0f8fd5ae_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/c02c7e5a_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3836h2557x0y0-6ec80451_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/w3837h2557x0y0-f5ee441f_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/550000/546500/546475/139a7d5a_t.jpg"}]}]},{"Id":"7910","Name":"Coast Seattle Downtown Hotel by APA","PropertyType":{"Id":1,"Name":"Hotel"},"LocalCurrencyCode":"USD","Location":{"Address":{"Address1":"1301 6th Avenue","City":"Seattle","Province":"WA","Country":"USA","PostalCode":"98101"},"GeoLocation":{"Latitude":"47.609193","Longitude":"-122.332775","Obfuscated":false},"Neighborhood":{"Id":"800130","Name":"Downtown Seattle"}},"Distance":{"Value":"0.42","Unit":"km","Direction":"SE"},"Description":{"LocationTeaser":"Located in Downtown Seattle, this hotel is within a 10-minute walk of Seattle Convention Center Arch Building and Pike Place Market. Seattle Waterfront and Lumen Field are also within 1 mi (2 km). University Street Station is only a 4-minute walk and Westlake Station is 6 minutes. ","HotelTeaser":"Along with a restaurant, this hotel has a fitness center and a bar/lounge. Additionally, a microwave in a common area, a business center, and conference space are onsite. "},"Status":"AVAILABLE","ThumbnailUrl":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/f83ee252_t.jpg","StarRating":"4.0","GuestRating":"4.3","GuestReviewCount":1070,"PetFriendly":true,"LgbtqiaFriendly":true,"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.expedia.com/Hotel-Search?tpid=1&mpe=1738841635&endDate=2025-02-16&adults=2&locale=en_US&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&startDate=2025-02-11&mpd=USD&mpn=324954442¤cy=USD&rateplanid=396265793&mpm=24&selected=7910&mpb=233.45&mpa=1296.90"},"ApiRateCalendar":{"Accept":"application/vnd.exp-hotel.v3+json","Method":"GET","Href":"https://apim.expedia.com/hotels/rateCalendar?ecomHotelId=7910¤cy=USD&startDate=2025-02-06&endDate=2025-08-05&lengthOfStay=5"}},"Policies":{"CheckInStartTime":"4 PM","CheckInEndTime":"11:30 PM","SpecialCheckInInstructions":["The check-in location differs from the property location. Check-in location: [Hilton Honors App]. If you are planning to arrive after 11:30 PM please contact the property in advance using the information on the booking confirmation. Front desk staff will greet guests on arrival at the property. "],"CheckOutTime":"noon","PetPolicies":["Pets allowed for an extra charge of USD 50 per pet, per stay","Dogs only","2 total (up to 40 lbs per pet)","Service animals are welcome, and are exempt from fees"],"ChildrenAndExtraBedsPolicies":["Children are welcome.","Free rollaway/extra beds!","Free cribs (infant beds)!"]},"OptionalExtras":["
  • Fee for cooked-to-order breakfast: approximately USD 5.00 to 25.00 for adults, and USD 5.00 to 15.00 for children
  • Self parking fee: USD 49.00 per day
  • Pet fee: USD 50 per pet, per stay
  • Service animals are exempt from fees
  • Early check-in is available for a fee (subject to availability)
  • Late check-out is available for a fee (subject to availability)
","

The above list may not be comprehensive. Fees and deposits may not include tax and are subject to change.

"],"Media":[{"Type":"1","Title":"Primary image","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/f83ee252_t.jpg"},{"Type":"1","Title":"Lobby","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/c8c2fa75_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/b47859fb_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/5376e1fc_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/fe358753_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/90483241_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/1e5dd63b_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/2dd8fb4a_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/7d48b7f7_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/7738bd54_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/3828dd4f_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/a9844410_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/54b076c9_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/7cd1057d_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/9dfad776_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/02ca2d12_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/2d14e572_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/b3589c14_t.jpg"},{"Type":"1","Title":"Room amenity","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/f7f0ba73_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/5f88308a_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/ff9d2dac_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/5d83c477_t.jpg"},{"Type":"1","Title":"Fitness facility","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/5ea1e987_t.jpg"},{"Type":"1","Title":"Accessible bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/6f7e1587_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/8fae8056_t.jpg"},{"Type":"1","Title":"Breakfast meal","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/907890fa_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/88576a04_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/79642e16_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/7cd9f0f9_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/97e5b31b_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/48deb8c8_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/9c4e4ca4_t.jpg"},{"Type":"1","Title":"Point of interest","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/820791f3_t.jpg"}],"HotelAmenities":[{"Id":"2177","Name":"Express check-in"},{"Id":"5058","Name":"Service animals are allowed"},{"Id":"5059","Name":"Service animals are exempt from fees/restrictions"},{"Id":"1073743877","Name":"Water dispenser"},{"Id":"8","Name":"Elevator"},{"Id":"9","Name":"Fitness facilities"},{"Id":"3913","Name":"Number of bars/lounges - 1"},{"Id":"2125","Name":"Internet access in public areas - high speed"},{"Id":"2063","Name":"24-hour front desk"},{"Id":"81","Name":"Conference space"},{"Id":"2065","Name":"Business center"},{"Id":"2066","Name":"Porter/bellhop"},{"Id":"2386","Name":"Grocery/convenience store"},{"Id":"2067","Name":"Express check-out"},{"Id":"2515","Name":"Year Built - 1970"},{"Id":"2644","Name":"Pet max weight (per pet) in kg is 18"},{"Id":"2646","Name":"Pet max weight (per pet) in lb is 40"},{"Id":"2070","Name":"Dry cleaning/laundry service"},{"Id":"3862","Name":"Self parking (surcharge)"},{"Id":"2016","Name":"Safe-deposit box at front desk"},{"Id":"2592","Name":"Conference space size (meters) - 372"},{"Id":"2593","Name":"Number of meeting rooms - 4"},{"Id":"4003","Name":"Luggage storage"},{"Id":"41","Name":"ATM/banking"},{"Id":"361","Name":"Breakfast available (surcharge)"},{"Id":"2537","Name":"Number of restaurants - 1"},{"Id":"43","Name":"Concierge services"},{"Id":"2539","Name":"Conference space size (feet) - 4004"},{"Id":"44","Name":"Gift shops or newsstand"},{"Id":"1073743404","Name":"Shared microwave"},{"Id":"45","Name":"Shopping on site"},{"Id":"2349","Name":"Designated smoking areas"},{"Id":"1073744111","Name":"Banquet hall"},{"Id":"369","Name":"Laundry facilities"},{"Id":"51","Name":"Pets allowed"},{"Id":"52","Name":"Total number of rooms - 256"},{"Id":"372","Name":"Television in common areas"},{"Id":"54","Name":"Number of floors - 29"},{"Id":"55","Name":"Number of buildings/towers - 1"},{"Id":"2809","Name":"Only dogs are allowed"},{"Id":"2811","Name":"Maximum number of pets per room 2"},{"Id":"2043","Name":"Multilingual staff"},{"Id":"317","Name":"Fireplace in lobby"}],"RoomAmenities":[{"Id":"132","Name":"Coffee/tea maker"},{"Id":"4420","Name":"Connecting/adjoining rooms available"},{"Id":"133","Name":"Daily housekeeping"},{"Id":"2053","Name":"Room service"},{"Id":"136","Name":"Phone"},{"Id":"1073743370","Name":"Towels provided"},{"Id":"139","Name":"Free local calls"},{"Id":"1073743371","Name":"Bedsheets provided"},{"Id":"141","Name":"Private bathroom"},{"Id":"1073744653","Name":"Closed captioned TV"},{"Id":"143","Name":"Free toiletries"},{"Id":"144","Name":"Hair dryer"},{"Id":"146","Name":"In-room safe"},{"Id":"2130","Name":"Microwave (on request)"},{"Id":"3858","Name":"Bathtub or shower"},{"Id":"1073743379","Name":"Number of bathrooms - 1"},{"Id":"2389","Name":"In-room safe (laptop compatible)"},{"Id":"4951","Name":"Free cribs/infant beds"},{"Id":"1073745175","Name":"WiFi speed 25+ Mbps"},{"Id":"2398","Name":"Cable TV service"},{"Id":"2399","Name":"Flat-panel TV"},{"Id":"1073742815","Name":"Rollaway/extra beds (free)"},{"Id":"2081","Name":"Premium TV channels"},{"Id":"2403","Name":"Free WiFi"},{"Id":"2150","Name":"Blackout drapes/curtains"},{"Id":"2157","Name":"Internet access (surcharge)"},{"Id":"2030","Name":"In-room climate control (air conditioning)"},{"Id":"1073744241","Name":"Eco-friendly toiletries"},{"Id":"1073744243","Name":"Recycling"},{"Id":"1073744691","Name":"Telephone accessibility kit"},{"Id":"2100","Name":"Wireless internet access"},{"Id":"2039","Name":"Pay movies"},{"Id":"1073744443","Name":"Mini-fridge"},{"Id":"1073744765","Name":"Toothbrush and toothpaste available on request"},{"Id":"2046","Name":"High-speed internet access"}],"Accessibility":["Wheelchair-accessible on-site restaurant","Visual alarms in hallways","Handrails in stairways","Well-lit path to entrance","Stair-free path to entrance","Wheelchair accessible (may have limitations)","Wheelchair accessible path of travel","Wheelchair-accessible public washroom","Wheelchair accessible parking","Wheelchair-accessible concierge desk","Assistive listening devices available","Wheelchair-accessible path to elevator","Wheelchair-accessible registration desk","Wheelchair-accessible fitness center","Wheelchair-accessible meeting spaces/business center"],"RoomTypes":[{"Description":"Room, 2 Double Beds, Club Lounge Access, City View","RoomKey":"CgQ3OTEwEjQKCTMyNDk1NDQ0MhIJMzk2MjY1NzkzGgIyNCABKgoyMDI1LTAyLTExMgoyMDI1LTAyLTE2KgMKATJSCgiv1wEQr9cBGAJaAlVT","OfferId":"CgQ3OTEwEjQKCTMyNDk1NDQ0MhIJMzk2MjY1NzkzGgIyNCABKgoyMDI1LTAyLTExMgoyMDI1LTAyLTE2KgMKATJSCgiv1wEQr9cBGAJaAlVT","RatePlanType":"standalone","RatePlans":[{"RoomTypeId":"324954442","RatePlanId":"396265793","RateRuleId":"839739515","InventorySourceId":"24","InventorySourceCode":"Expedia","StayDates":{"CheckInDate":"2025-02-11","CheckOutDate":"2025-02-16"},"RemainingCount":4,"Price":{"BaseRate":{"Value":"1296.90","Currency":"USD"},"TaxesAndFees":{"Value":"233.45","Currency":"USD"},"TotalPrice":{"Value":"1530.35","Currency":"USD"},"TotalStrikeOutPrice":{"Value":"1674.45","Currency":"USD"},"AvgNightlyRate":{"Value":"259.38","Currency":"USD"},"AvgNightlyStrikeOutRate":{"Value":"288.20","Currency":"USD"},"NightlyRates":[{"StayDate":"2025-02-11","BaseRate":{"Value":"283.50","Currency":"USD"}},{"StayDate":"2025-02-12","BaseRate":{"Value":"291.60","Currency":"USD"}},{"StayDate":"2025-02-13","BaseRate":{"Value":"291.60","Currency":"USD"}},{"StayDate":"2025-02-14","BaseRate":{"Value":"215.10","Currency":"USD"}},{"StayDate":"2025-02-15","BaseRate":{"Value":"215.10","Currency":"USD"}}]},"Promotions":[{"Description":"Save 10%","Amount":{"Value":"144.10","Currency":"USD"}}],"PaymentMethod":"Hotel","PaymentTime":"PayLater","FreeInternet":true,"FreeWiFi":true,"FreeInternetDetails":["Free WiFi"],"FreeParking":false,"FreeBreakfast":true,"FreeBreakfastDetails":["Continental breakfast"],"CancellationPolicy":{"Refundable":true,"FreeCancellation":true,"FreeCancellationEndDateTime":"2025-02-10T16:00:00-08:00","CancellationPenaltyRules":[{"PenaltyNightCount":1,"PenaltyStartDateTime":"2025-02-10T16:00:00-08:00","PenaltyEndDateTime":"2025-02-11T16:00:00-08:00"}],"CancelPolicyDescription":"There is no charge for cancellations made before 16:00 (property local time) on February 10, 2025.Cancellations or changes made after 16:00 (property local time) on February 10, 2025 or no-shows are subject to a property fee equal to the first nights rate plus taxes and fees."},"Amenities":[{"Id":"2103","Name":"Continental breakfast"}]}],"Price":{"BaseRate":{"Value":"1296.90","Currency":"USD"},"TaxesAndFees":{"Value":"233.45","Currency":"USD"},"TotalPrice":{"Value":"1530.35","Currency":"USD"},"TotalStrikeOutPrice":{"Value":"1674.45","Currency":"USD"},"AvgNightlyRate":{"Value":"259.38","Currency":"USD"},"AvgNightlyStrikeOutRate":{"Value":"288.20","Currency":"USD"},"AvgNightlyRateWithFees":{"Value":"259.38","Currency":"USD"},"AvgNightlyStrikeOutRateWithFees":{"Value":"288.20","Currency":"USD"},"TotalPriceWithHotelFees":{"Value":"1530.35","Currency":"USD"}},"Promotions":[{"Description":"Save 10%","Amount":{"Value":"144.10","Currency":"USD"}}],"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.expedia.com/Hotel-Search?tpid=1&mpe=1738841635&endDate=2025-02-16&adults=2&locale=en_US&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&startDate=2025-02-11&mpd=USD&mpn=324954442¤cy=USD&rateplanid=396265793&mpm=24&mpp=1&mpo=HC&selected=7910&mpb=233.45&mpa=1296.90"},"WebDetails":{"Method":"GET","Href":"https://www.expedia.com/Hotel.h7910.Hotel-Information?tpid=1&mpe=1738841635&chkin=2025-02-11&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&chkout=2025-02-16&rm1=a2&langid=1033&mpd=USD®ionId=800130¤cy=USD&rateplanid=396265793&mpm=24&mpb=233.45&mpa=1296.90"},"ApiDetails":{"Accept":"application/vnd.exp-hotel.v3+json","Method":"GET","Href":"https://apim.expedia.com/hotels/details/CgQ3OTEwEjQKCTMyNDk1NDQ0MhIJMzk2MjY1NzkzGgIyNCABKgoyMDI1LTAyLTExMgoyMDI1LTAyLTE2KgMKATJSCgiv1wEQr9cBGAJaAlVT?price=1530.35¤cy=USD&locale=en_US"}},"SmokingOption":"NonSmoking","BedTypeOptions":[{"Id":"37365","Description":"2 Double Beds"}],"RoomOccupancyPolicy":{"MaxGuestCount":4,"MinCheckInAge":21,"AgeClassRestrictions":[{"AgeClass":"Adult","AgeMinimum":18,"MaxGuestCount":4},{"AgeClass":"Child","AgeMinimum":0,"AgeMaximum":17,"MaxGuestCount":3}]},"Amenities":[{"Id":"4310","Name":"Number of bathrooms - 1"},{"Id":"4121","Name":"Bathrobes"}],"Media":[{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/2dd8fb4a_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/3828dd4f_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/a9844410_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/54b076c9_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/5f88308a_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/10000/8000/7910/ff9d2dac_t.jpg"}]}]},{"Id":"26893","Name":"Mayflower Park Hotel","PropertyType":{"Id":1,"Name":"Hotel"},"LocalCurrencyCode":"USD","Location":{"Address":{"Address1":"405 Olive Way","City":"Seattle","Province":"WA","Country":"USA","PostalCode":"98101"},"GeoLocation":{"Latitude":"47.61223","Longitude":"-122.33853","Obfuscated":false},"Neighborhood":{"Id":"800130","Name":"Downtown Seattle"}},"Distance":{"Value":"0.13","Unit":"km","Direction":"NW"},"Description":{"LocationTeaser":"Located in Downtown Seattle, this historic hotel is within a 10-minute walk of Seattle Central Business District, Pike Place Market, and Paramount Theatre. Bell Street Cruise Terminal at Pier 66 and Seattle Convention Center Arch Building are also within 15 minutes. Westlake Ave Hub Station is only a 2-minute walk and Westlake Station is 2 minutes. ","HotelTeaser":"Along with a restaurant, this smoke-free hotel has a fitness center and a bar/lounge. WiFi in public areas is free. Additionally, valet parking, 24-hour room service, and a business center are onsite. ","RoomTeaser":"Housekeeping is available on request. "},"Status":"AVAILABLE","RenovationsAndClosures":["The following facilities are closed seasonally each year. They will be closed from January 1 to March 1:
  • Bar/Lounge
","The following facilities are closed on Sunday and Monday:
  • Bar/lounge
"],"ThumbnailUrl":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/3e2a8bbc_t.jpg","StarRating":"4.0","GuestRating":"4.7","GuestReviewCount":2134,"PetFriendly":false,"LgbtqiaFriendly":true,"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.expedia.com/Hotel-Search?tpid=1&mpe=1738841635&endDate=2025-02-16&adults=2&locale=en_US&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&startDate=2025-02-11&mpd=USD&mpn=212406505¤cy=USD&rateplanid=236111176&mpm=24&selected=26893&mpb=171.79&mpa=954.40"},"ApiRateCalendar":{"Accept":"application/vnd.exp-hotel.v3+json","Method":"GET","Href":"https://apim.expedia.com/hotels/rateCalendar?ecomHotelId=26893¤cy=USD&startDate=2025-02-06&endDate=2025-08-05&lengthOfStay=5"}},"Policies":{"CheckInStartTime":"4 PM","CheckInEndTime":"midnight","SpecialCheckInInstructions":["Front desk staff will greet guests on arrival at the property. "],"CheckOutTime":"noon","PetPolicies":["Pets not allowed"],"ChildrenAndExtraBedsPolicies":["Children are welcome.","Kids stay free! Children 17 years old and younger stay free when using existing bedding. "]},"OptionalExtras":["
  • Fee for cooked-to-order breakfast: approximately USD 12 to 30 per person
  • Valet parking fee: USD 50 per night (in/out privileges)
","

The above list may not be comprehensive. Fees and deposits may not include tax and are subject to change.

"],"Media":[{"Type":"1","Title":"Primary image","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/3e2a8bbc_t.jpg"},{"Type":"1","Title":"Lobby sitting area","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/4412ee7a_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/1aa66578_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/c82fd218_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/bd8ee5d1_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/3e0f9534_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/e02beb6c_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/f8b76d7c_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/e897f517_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/7e3a1dc0_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/d4855566_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/bfb35e25_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/0e97b70a_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/2eb8afe2_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/8e80af7a_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/f2c26024_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/53333c32_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/102212b0_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/f16e5c47_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/bfa94ba2_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/af4b63bf_t.jpg"},{"Type":"1","Title":"Living area","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/ffdee45e_t.jpg"},{"Type":"1","Title":"Living area","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/d06857f4_t.jpg"},{"Type":"1","Title":"Living area","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/9ab932e8_t.jpg"},{"Type":"1","Title":"Living area","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/b80384cf_t.jpg"},{"Type":"1","Title":"Living area","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/70873620_t.jpg"},{"Type":"1","Title":"Living area","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/4ac349fa_t.jpg"},{"Type":"1","Title":"Living room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/b3b2ae25_t.jpg"},{"Type":"1","Title":"Room amenity","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/4687e1f0_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/a7b9efcd_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/c361fdb8_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/341173bf_t.jpg"},{"Type":"1","Title":"Gym","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/db9aa87e_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/79dc9643_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/6ebb24c8_t.jpg"},{"Type":"1","Title":"Restaurant","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/95762b25_t.jpg"},{"Type":"1","Title":"Food and drink","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/2146e488_t.jpg"},{"Type":"1","Title":"Food and drink","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/c624a5b1_t.jpg"},{"Type":"1","Title":"Food and drink","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/df0b80e6_t.jpg"},{"Type":"1","Title":"Food and drink","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/f5035fb1_t.jpg"},{"Type":"1","Title":"Food and drink","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/dc0cbc6b_t.jpg"},{"Type":"1","Title":"Breakfast meal","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/65ced277_t.jpg"},{"Type":"1","Title":"Bar (on property)","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/8e98c72b_t.jpg"},{"Type":"1","Title":"Lounge","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/02a974a2_t.jpg"},{"Type":"1","Title":"Lounge","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/32db0821_t.jpg"},{"Type":"1","Title":"Interior","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/385c5a01_t.jpg"},{"Type":"1","Title":"Meeting facility","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/4c636168_t.jpg"},{"Type":"1","Title":"Meeting facility","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/f0de97f2_t.jpg"},{"Type":"1","Title":"Meeting facility","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/2822824d_t.jpg"},{"Type":"1","Title":"Meeting facility","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/f0e06809_t.jpg"},{"Type":"1","Title":"Interior detail","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/7e7ebbd0_t.jpg"},{"Type":"1","Title":"Front of property","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/59e34552_t.jpg"},{"Type":"1","Title":"Property entrance","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/7cde4f72_t.jpg"},{"Type":"1","Title":"Front of property - evening/night","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/d39ab7d3_t.jpg"},{"Type":"1","Title":"Front of property - evening/night","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/7f7f50da_t.jpg"},{"Type":"1","Title":"Exterior","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/9f08a510_t.jpg"},{"Type":"1","Title":"City view","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/04f82fd7_t.jpg"},{"Type":"1","Title":"City view","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/16d4b00d_t.jpg"}],"HotelAmenities":[{"Id":"2050","Name":"Pets not allowed"},{"Id":"8","Name":"Elevator"},{"Id":"1073745352","Name":"Elevator door width (inches) - 35"},{"Id":"9","Name":"Fitness facilities"},{"Id":"3913","Name":"Number of bars/lounges - 1"},{"Id":"1073745353","Name":"Elevator door width (centimeters) - 89"},{"Id":"2063","Name":"24-hour front desk"},{"Id":"2065","Name":"Business center"},{"Id":"2066","Name":"Porter/bellhop"},{"Id":"2515","Name":"Year Built - 1927"},{"Id":"2070","Name":"Dry cleaning/laundry service"},{"Id":"2390","Name":"Free WiFi"},{"Id":"3864","Name":"Valet parking (surcharge)"},{"Id":"2137","Name":"Smoke-free property"},{"Id":"2016","Name":"Safe-deposit box at front desk"},{"Id":"2593","Name":"Number of meeting rooms - 1"},{"Id":"4003","Name":"Luggage storage"},{"Id":"361","Name":"Breakfast available (surcharge)"},{"Id":"2537","Name":"Number of restaurants - 1"},{"Id":"43","Name":"Concierge services"},{"Id":"1073744111","Name":"Banquet hall"},{"Id":"369","Name":"Laundry facilities"},{"Id":"52","Name":"Total number of rooms - 160"},{"Id":"1073745332","Name":"No accessible shuttle"},{"Id":"54","Name":"Number of floors - 12"},{"Id":"2167","Name":"Wedding services"},{"Id":"2043","Name":"Multilingual staff"},{"Id":"317","Name":"Fireplace in lobby"},{"Id":"2047","Name":"Free newspapers in lobby"}],"RoomAmenities":[{"Id":"130","Name":"Refrigerator"},{"Id":"132","Name":"Coffee/tea maker"},{"Id":"135","Name":"Hypo-allergenic bedding available"},{"Id":"136","Name":"Phone"},{"Id":"2057","Name":"Free bottled water"},{"Id":"1073743370","Name":"Towels provided"},{"Id":"1073743371","Name":"Bedsheets provided"},{"Id":"141","Name":"Private bathroom"},{"Id":"1073744653","Name":"Closed captioned TV"},{"Id":"142","Name":"Bathrobes"},{"Id":"143","Name":"Free toiletries"},{"Id":"2575","Name":"LCD TV"},{"Id":"144","Name":"Hair dryer"},{"Id":"1073745360","Name":"Magnifying mirror"},{"Id":"145","Name":"Iron/ironing board"},{"Id":"146","Name":"In-room safe"},{"Id":"1073743379","Name":"Number of bathrooms - 1"},{"Id":"2580","Name":"TV size measurement: inch"},{"Id":"1073744661","Name":"Lowered electrical outlets in bathroom"},{"Id":"26","Name":"Television"},{"Id":"2398","Name":"Cable TV service"},{"Id":"2015","Name":"Room service (24 hours)"},{"Id":"2399","Name":"Flat-panel TV"},{"Id":"2081","Name":"Premium TV channels"},{"Id":"2402","Name":"HDTV"},{"Id":"2403","Name":"Free WiFi"},{"Id":"2150","Name":"Blackout drapes/curtains"},{"Id":"2025","Name":"Designer toiletries"},{"Id":"2026","Name":"Desk"},{"Id":"2030","Name":"In-room climate control (air conditioning)"},{"Id":"1073744686","Name":"Visual fire alarm"},{"Id":"1073744689","Name":"Lever door handles"},{"Id":"1073743285","Name":"In-room climate control (heating)"},{"Id":"2166","Name":"Shower only"},{"Id":"1073743926","Name":"Housekeeping on request"}],"Accessibility":["Wheelchair-accessible lounge","Visual alarms in hallways","Wheelchair accessible path of travel","Wheelchair-accessible public washroom","Wheelchairs available on site","Wheelchair-accessible path to elevator","Well-lit path to entrance","Stair-free path to entrance","Wheelchair accessible (may have limitations)"],"RoomTypes":[{"Description":"City Room, 1 Queen Bed","RoomKey":"CgUyNjg5MxI0CgkyMTI0MDY1MDUSCTIzNjExMTE3NhoCMjQgASoKMjAyNS0wMi0xMTIKMjAyNS0wMi0xNioDCgEyUgoIr9cBEK_XARgCWgJVUw","OfferId":"CgUyNjg5MxI0CgkyMTI0MDY1MDUSCTIzNjExMTE3NhoCMjQgASoKMjAyNS0wMi0xMTIKMjAyNS0wMi0xNioDCgEyUgoIr9cBEK_XARgCWgJVUw","RatePlanType":"standalone","RatePlans":[{"RoomTypeId":"212406505","RatePlanId":"236111176","RateRuleId":"743878424","InventorySourceId":"24","InventorySourceCode":"Expedia","StayDates":{"CheckInDate":"2025-02-11","CheckOutDate":"2025-02-16"},"RemainingCount":15,"Price":{"BaseRate":{"Value":"954.40","Currency":"USD"},"TaxesAndFees":{"Value":"171.79","Currency":"USD"},"TotalPrice":{"Value":"1126.19","Currency":"USD"},"TotalStrikeOutPrice":{"Value":"1364.79","Currency":"USD"},"AvgNightlyRate":{"Value":"190.88","Currency":"USD"},"AvgNightlyStrikeOutRate":{"Value":"238.60","Currency":"USD"},"NightlyRates":[{"StayDate":"2025-02-11","BaseRate":{"Value":"175.20","Currency":"USD"}},{"StayDate":"2025-02-12","BaseRate":{"Value":"180.00","Currency":"USD"}},{"StayDate":"2025-02-13","BaseRate":{"Value":"172.00","Currency":"USD"}},{"StayDate":"2025-02-14","BaseRate":{"Value":"156.00","Currency":"USD"}},{"StayDate":"2025-02-15","BaseRate":{"Value":"271.20","Currency":"USD"}}]},"Promotions":[{"Description":"Save 20%","Amount":{"Value":"238.60","Currency":"USD"}}],"PaymentMethod":"Hotel","PaymentTime":"PayLater","FreeInternet":true,"FreeWiFi":true,"FreeInternetDetails":["Free WiFi"],"FreeParking":false,"FreeBreakfast":false,"CancellationPolicy":{"Refundable":true,"FreeCancellation":true,"FreeCancellationEndDateTime":"2025-02-10T16:00:00-08:00","CancellationPenaltyRules":[{"PenaltyNightCount":1,"PenaltyStartDateTime":"2025-02-10T16:00:00-08:00","PenaltyEndDateTime":"2025-02-11T16:00:00-08:00"}],"CancelPolicyDescription":"There is no charge for cancellations made before 16:00 (property local time) on February 10, 2025.Cancellations or changes made after 16:00 (property local time) on February 10, 2025 or no-shows are subject to a property fee equal to the first nights rate plus taxes and fees."}}],"Price":{"BaseRate":{"Value":"954.40","Currency":"USD"},"TaxesAndFees":{"Value":"171.79","Currency":"USD"},"TotalPrice":{"Value":"1126.19","Currency":"USD"},"TotalStrikeOutPrice":{"Value":"1364.79","Currency":"USD"},"AvgNightlyRate":{"Value":"190.88","Currency":"USD"},"AvgNightlyStrikeOutRate":{"Value":"238.60","Currency":"USD"},"AvgNightlyRateWithFees":{"Value":"190.88","Currency":"USD"},"AvgNightlyStrikeOutRateWithFees":{"Value":"238.60","Currency":"USD"},"TotalPriceWithHotelFees":{"Value":"1126.19","Currency":"USD"}},"Promotions":[{"Description":"Save 20%","Amount":{"Value":"238.60","Currency":"USD"}}],"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.expedia.com/Hotel-Search?tpid=1&mpe=1738841635&endDate=2025-02-16&adults=2&locale=en_US&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&startDate=2025-02-11&mpd=USD&mpn=212406505¤cy=USD&rateplanid=236111176&mpm=24&mpp=1&mpo=HC&selected=26893&mpb=171.79&mpa=954.40"},"WebDetails":{"Method":"GET","Href":"https://www.expedia.com/Hotel.h26893.Hotel-Information?tpid=1&mpe=1738841635&chkin=2025-02-11&chid=59033fce-a679-44b7-a356-aac9db7e5168&eapid=0&chkout=2025-02-16&rm1=a2&langid=1033&mpd=USD®ionId=800130¤cy=USD&rateplanid=236111176&mpm=24&mpb=171.79&mpa=954.40"},"ApiDetails":{"Accept":"application/vnd.exp-hotel.v3+json","Method":"GET","Href":"https://apim.expedia.com/hotels/details/CgUyNjg5MxI0CgkyMTI0MDY1MDUSCTIzNjExMTE3NhoCMjQgASoKMjAyNS0wMi0xMTIKMjAyNS0wMi0xNioDCgEyUgoIr9cBEK_XARgCWgJVUw?price=1126.19¤cy=USD&locale=en_US"}},"SmokingOption":"NonSmoking","BedTypeOptions":[{"Id":"37310","Description":"1 Queen Bed"}],"RoomOccupancyPolicy":{"MaxGuestCount":2,"MinCheckInAge":18,"AgeClassRestrictions":[{"AgeClass":"Adult","AgeMinimum":18,"MaxGuestCount":2},{"AgeClass":"Child","AgeMinimum":0,"AgeMaximum":17,"MaxGuestCount":1}]},"Amenities":[{"Id":"4097","Name":"Number of living rooms 0"},{"Id":"4642","Name":"No rollaway/extra beds"},{"Id":"4643","Name":"No cribs (infant beds)"},{"Id":"1073744707","Name":"Wardrobe or closet"},{"Id":"4134","Name":"City view"},{"Id":"4953","Name":"Number of bedrooms - 0"},{"Id":"4092","Name":"Square meters - 15"},{"Id":"4093","Name":"Square feet - 161"},{"Id":"1073744318","Name":"Ping - 4.52"}],"Media":[{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/bd8ee5d1_t.jpg"},{"Type":"1","Title":"Room","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/bfb35e25_t.jpg"},{"Type":"1","Title":"Living area","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/ffdee45e_t.jpg"},{"Type":"1","Title":"Bathroom","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/c361fdb8_t.jpg"},{"Type":"1","Title":"City view","Size":"t","Url":"https://images.trvl-media.com/lodging/1000000/30000/26900/26893/16d4b00d_t.jpg"}]}]}]} \ No newline at end of file diff --git a/tests/integration/src/test/resources/GetLodgingQuotesResponse.json b/tests/integration/src/test/resources/GetLodgingQuotesResponse.json deleted file mode 100644 index 7f4441a1f..000000000 --- a/tests/integration/src/test/resources/GetLodgingQuotesResponse.json +++ /dev/null @@ -1 +0,0 @@ -{"Count":4,"TotalPropertyCount":5,"TransactionId":"5da99559-b548-49e5-840f-5ec749b00881","StayDates":{"CheckInDate":"2025-02-16","CheckOutDate":"2025-02-21"},"LengthOfStay":5,"Occupants":[{"Adults":2}],"Properties":[{"Id":"75030107","Status":"NOT_AVAILABLE"},{"Id":"87704892","Status":"NOT_AVAILABLE"},{"Id":"83418323","Status":"AVAILABLE","RoomTypes":[{"RatePlans":[{"CancellationPolicy":{"Refundable":true,"FreeCancellation":false,"CancellationPenaltyRules":[{"PenaltyPercentOfStay":"50.00","PenaltyStartDateTime":"2025-02-05T15:59:00-08:00","PenaltyEndDateTime":"2025-02-09T23:59:00-08:00"},{"PenaltyPercentOfStay":"100","PenaltyStartDateTime":"2025-02-09T23:59:00-08:00","PenaltyEndDateTime":"2025-02-16T00:00:00-08:00"}]}}],"Price":{"BaseRate":{"Value":"338.10","Currency":"USD"},"TaxesAndFees":{"Value":"218.86","Currency":"USD"},"TotalPrice":{"Value":"556.96","Currency":"USD"},"AvgNightlyRate":{"Value":"67.62","Currency":"USD"},"AvgNightlyRateWithFees":{"Value":"111.39","Currency":"USD"},"TotalPriceWithPropertyFees":{"Value":"556.96","Currency":"USD"}},"Links":{"WebSearchResult":{"Method":"GET","Href":"https://www.vrbo.com/search?mpd=USD&tpid=9001&endDate=2025-02-21&adults=2&eapid=1&selected=83418323&startDate=2025-02-16&mpb=218.86&mpa=338.10"},"WebDetails":{"Method":"GET","Href":"https://www.vrbo.com/2930936?mpd=USD&mpe=1738846806&endDate=2025-02-21&adults=2&startDate=2025-02-16&mpb=218.86&mpa=338.10"}}}]},{"Id":"91799474","Status":"NOT_AVAILABLE"}]} diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts new file mode 100644 index 000000000..c929a5717 --- /dev/null +++ b/xap-sdk/build.gradle.kts @@ -0,0 +1,76 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + +plugins { + kotlin("jvm") + id("java") + id("maven-publish") + id("org.jlleitschuh.gradle.ktlint") version "12.1.2" +} + +group = "com.expediagroup.sdk" +version = "1.0.0-SNAPSHOT" + +repositories { + mavenLocal() + mavenCentral() +} + +dependencies { + testImplementation(kotlin("test")) + api("com.expediagroup:sdk-rest:1.0.1-SNAPSHOT") + api("com.expediagroup:sdk-core:1.0.0-SNAPSHOT") + implementation("com.expediagroup:sdk-okhttp-transport:1.0.0-SNAPSHOT") + implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2") + implementation("org.hibernate:hibernate-validator:6.0.2.Final") + implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2") + implementation("javax.validation:validation-api:2.0.1.Final") + implementation("org.slf4j:slf4j-simple:2.0.16") + runtimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2") +} + +tasks.test { + useJUnitPlatform() +} + +kotlin { + jvmToolchain(21) + compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8) +} + +java { + withSourcesJar() + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 +} + +ktlint { + debug = true + version = "1.5.0" + verbose = true + + additionalEditorconfig = + mapOf( + "max_line_length" to "200", + "indent_style" to "space", + "indent_size" to "4", + "insert_final_newline" to "true", + "end_of_line" to "lf", + "ktlint_standard_enum-entry-name-case" to "disabled" + ) +} + + +publishing { + publications { + create("mavenJava") { + artifactId = "xap-sdk" + version = "1.0.0-SNAPSHOT" + groupId = project.property("groupId").toString() + from(components["java"]) + } + } + + repositories { + mavenLocal() + } +} diff --git a/xap-sdk/src/main/kotlin/.openapi-generator/FILES b/xap-sdk/src/main/kotlin/.openapi-generator/FILES new file mode 100644 index 000000000..1d5d912fa --- /dev/null +++ b/xap-sdk/src/main/kotlin/.openapi-generator/FILES @@ -0,0 +1,210 @@ +com/expediagroup/sdk/xap/models/APIGatewayError.kt +com/expediagroup/sdk/xap/models/APIMError.kt +com/expediagroup/sdk/xap/models/ActivitiesAddress.kt +com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt +com/expediagroup/sdk/xap/models/ActivitiesCountry.kt +com/expediagroup/sdk/xap/models/ActivitiesError.kt +com/expediagroup/sdk/xap/models/ActivitiesErrors.kt +com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt +com/expediagroup/sdk/xap/models/ActivitiesLink.kt +com/expediagroup/sdk/xap/models/ActivitiesLocation.kt +com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt +com/expediagroup/sdk/xap/models/ActivitiesMedia.kt +com/expediagroup/sdk/xap/models/ActivitiesMoney.kt +com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt +com/expediagroup/sdk/xap/models/ActivitiesPhone.kt +com/expediagroup/sdk/xap/models/ActivitiesPrice.kt +com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt +com/expediagroup/sdk/xap/models/ActivitiesWarning.kt +com/expediagroup/sdk/xap/models/Activity.kt +com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt +com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt +com/expediagroup/sdk/xap/models/AdditionalFee.kt +com/expediagroup/sdk/xap/models/Address.kt +com/expediagroup/sdk/xap/models/AgeClassRestriction.kt +com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt +com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt +com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt +com/expediagroup/sdk/xap/models/BedType.kt +com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt +com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt +com/expediagroup/sdk/xap/models/CancellationPolicy.kt +com/expediagroup/sdk/xap/models/Capacity.kt +com/expediagroup/sdk/xap/models/Car.kt +com/expediagroup/sdk/xap/models/CarCategory.kt +com/expediagroup/sdk/xap/models/CarDetails.kt +com/expediagroup/sdk/xap/models/CarDetailsResponse.kt +com/expediagroup/sdk/xap/models/CarListingsResponse.kt +com/expediagroup/sdk/xap/models/CarPolicy.kt +com/expediagroup/sdk/xap/models/CarType.kt +com/expediagroup/sdk/xap/models/CarsAddress.kt +com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt +com/expediagroup/sdk/xap/models/CarsCountry.kt +com/expediagroup/sdk/xap/models/CarsDateRange.kt +com/expediagroup/sdk/xap/models/CarsDistance.kt +com/expediagroup/sdk/xap/models/CarsError.kt +com/expediagroup/sdk/xap/models/CarsErrors.kt +com/expediagroup/sdk/xap/models/CarsGeoLocation.kt +com/expediagroup/sdk/xap/models/CarsLink.kt +com/expediagroup/sdk/xap/models/CarsLocation.kt +com/expediagroup/sdk/xap/models/CarsLocationOption.kt +com/expediagroup/sdk/xap/models/CarsMoney.kt +com/expediagroup/sdk/xap/models/CarsNeighborhood.kt +com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt +com/expediagroup/sdk/xap/models/CarsWarning.kt +com/expediagroup/sdk/xap/models/CategoryGroup.kt +com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt +com/expediagroup/sdk/xap/models/Country.kt +com/expediagroup/sdk/xap/models/DateRange.kt +com/expediagroup/sdk/xap/models/DateTimePeriod.kt +com/expediagroup/sdk/xap/models/Deductible.kt +com/expediagroup/sdk/xap/models/DepositDetail.kt +com/expediagroup/sdk/xap/models/DepositPolicy.kt +com/expediagroup/sdk/xap/models/Description.kt +com/expediagroup/sdk/xap/models/DisambiguationResponse.kt +com/expediagroup/sdk/xap/models/Discount.kt +com/expediagroup/sdk/xap/models/Distance.kt +com/expediagroup/sdk/xap/models/Duration.kt +com/expediagroup/sdk/xap/models/Equipment.kt +com/expediagroup/sdk/xap/models/Error.kt +com/expediagroup/sdk/xap/models/Errors.kt +com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt +com/expediagroup/sdk/xap/models/ExtraFees.kt +com/expediagroup/sdk/xap/models/Fault.kt +com/expediagroup/sdk/xap/models/FileInfo.kt +com/expediagroup/sdk/xap/models/FileSize.kt +com/expediagroup/sdk/xap/models/FilterConditions.kt +com/expediagroup/sdk/xap/models/FuelAC.kt +com/expediagroup/sdk/xap/models/GeoLocation.kt +com/expediagroup/sdk/xap/models/Hotel.kt +com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt +com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt +com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt +com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt +com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt +com/expediagroup/sdk/xap/models/HotelLinks.kt +com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt +com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt +com/expediagroup/sdk/xap/models/HotelListingsResponse.kt +com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt +com/expediagroup/sdk/xap/models/HotelLocation.kt +com/expediagroup/sdk/xap/models/HotelPolicies.kt +com/expediagroup/sdk/xap/models/HotelPropertyType.kt +com/expediagroup/sdk/xap/models/HotelRateCalendar.kt +com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt +com/expediagroup/sdk/xap/models/Image.kt +com/expediagroup/sdk/xap/models/Link.kt +com/expediagroup/sdk/xap/models/Location.kt +com/expediagroup/sdk/xap/models/LocationGeoLocation.kt +com/expediagroup/sdk/xap/models/LocationOption.kt +com/expediagroup/sdk/xap/models/LodgingAmenity.kt +com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt +com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt +com/expediagroup/sdk/xap/models/LodgingError.kt +com/expediagroup/sdk/xap/models/LodgingErrors.kt +com/expediagroup/sdk/xap/models/LodgingLink.kt +com/expediagroup/sdk/xap/models/LodgingMoney.kt +com/expediagroup/sdk/xap/models/LodgingOccupant.kt +com/expediagroup/sdk/xap/models/LodgingPromotion.kt +com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt +com/expediagroup/sdk/xap/models/LodgingRatePlan.kt +com/expediagroup/sdk/xap/models/LodgingRoomType.kt +com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt +com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt +com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt +com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt +com/expediagroup/sdk/xap/models/LodgingStayDates.kt +com/expediagroup/sdk/xap/models/LodgingWarning.kt +com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt +com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt +com/expediagroup/sdk/xap/models/Media.kt +com/expediagroup/sdk/xap/models/Mileage.kt +com/expediagroup/sdk/xap/models/Money.kt +com/expediagroup/sdk/xap/models/Neighborhood.kt +com/expediagroup/sdk/xap/models/NightlyRates.kt +com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt +com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt +com/expediagroup/sdk/xap/models/Occupant.kt +com/expediagroup/sdk/xap/models/Offer.kt +com/expediagroup/sdk/xap/models/PaymentSchedule.kt +com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt +com/expediagroup/sdk/xap/models/PenaltyRule.kt +com/expediagroup/sdk/xap/models/PenaltyType.kt +com/expediagroup/sdk/xap/models/Phone.kt +com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt +com/expediagroup/sdk/xap/models/Price.kt +com/expediagroup/sdk/xap/models/Promotion.kt +com/expediagroup/sdk/xap/models/PromotionAmount.kt +com/expediagroup/sdk/xap/models/Property.kt +com/expediagroup/sdk/xap/models/PropertyDetails.kt +com/expediagroup/sdk/xap/models/PropertyManager.kt +com/expediagroup/sdk/xap/models/RateCalendar.kt +com/expediagroup/sdk/xap/models/RateCalendarPrice.kt +com/expediagroup/sdk/xap/models/RateCalendarResponse.kt +com/expediagroup/sdk/xap/models/RateDetails.kt +com/expediagroup/sdk/xap/models/RatePlan.kt +com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt +com/expediagroup/sdk/xap/models/RatePlanPrice.kt +com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt +com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt +com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt +com/expediagroup/sdk/xap/models/Rating.kt +com/expediagroup/sdk/xap/models/RatingDetails.kt +com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt +com/expediagroup/sdk/xap/models/Redemption.kt +com/expediagroup/sdk/xap/models/ReferencePrice.kt +com/expediagroup/sdk/xap/models/RentalLimits.kt +com/expediagroup/sdk/xap/models/Restrictions.kt +com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt +com/expediagroup/sdk/xap/models/RoomPreference.kt +com/expediagroup/sdk/xap/models/RoomRates.kt +com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt +com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt +com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt +com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt +com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt +com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt +com/expediagroup/sdk/xap/models/RoomType.kt +com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt +com/expediagroup/sdk/xap/models/RoomTypeLinks.kt +com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt +com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt +com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt +com/expediagroup/sdk/xap/models/RoomTypePrice.kt +com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt +com/expediagroup/sdk/xap/models/Savings.kt +com/expediagroup/sdk/xap/models/SdpAPIMError.kt +com/expediagroup/sdk/xap/models/SdpLink.kt +com/expediagroup/sdk/xap/models/StayDates.kt +com/expediagroup/sdk/xap/models/Supplier.kt +com/expediagroup/sdk/xap/models/TaxesAndFees.kt +com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt +com/expediagroup/sdk/xap/models/Ticket.kt +com/expediagroup/sdk/xap/models/TimeRange.kt +com/expediagroup/sdk/xap/models/TransmissionDrive.kt +com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt +com/expediagroup/sdk/xap/models/VehicleDetails.kt +com/expediagroup/sdk/xap/models/VendorLocationDetails.kt +com/expediagroup/sdk/xap/models/WaiverPolicy.kt +com/expediagroup/sdk/xap/models/Warning.kt +com/expediagroup/sdk/xap/models/When.kt +com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt +com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt +com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt +com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt +com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt +com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt +com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt +com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt +com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt +com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt +com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt +com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt +com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt +com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt +com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt +com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt +com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt +com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt +com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt +com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt diff --git a/xap-sdk/src/main/kotlin/.openapi-generator/VERSION b/xap-sdk/src/main/kotlin/.openapi-generator/VERSION new file mode 100644 index 000000000..b23eb2752 --- /dev/null +++ b/xap-sdk/src/main/kotlin/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.11.0 diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/AsyncXapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/AsyncXapClient.kt new file mode 100644 index 000000000..0fe4c5edc --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/AsyncXapClient.kt @@ -0,0 +1,40 @@ +package com.expediagroup.sdk.xap + +import com.expediagroup.sdk.rest.AsyncRestClient +import com.expediagroup.sdk.rest.AsyncRestExecutor +import com.expediagroup.sdk.rest.model.Response +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationNoResponseBodyTrait +import com.expediagroup.sdk.xap.configuration.ApiEndpoint +import com.expediagroup.sdk.xap.configuration.AsyncClientBuilder +import com.expediagroup.sdk.xap.configuration.AsyncXapClientConfiguration +import com.expediagroup.sdk.xap.configuration.EndpointProvider +import com.expediagroup.sdk.xap.configuration.XAP_OBJECT_MAPPER +import com.expediagroup.sdk.xap.core.AsyncRequestExecutor +import java.util.concurrent.CompletableFuture + +class AsyncXapClient private constructor( + config: AsyncXapClientConfiguration +) : AsyncRestClient() { + private val apiEndpoint: ApiEndpoint = EndpointProvider.getXapApiEndpoint(config.environment) + + override val restExecutor: AsyncRestExecutor = + AsyncRestExecutor( + mapper = XAP_OBJECT_MAPPER, + serverUrl = apiEndpoint.endpoint, + requestExecutor = AsyncRequestExecutor(configuration = config) + ) + + fun execute(operation: OperationNoResponseBodyTrait): CompletableFuture> = restExecutor.execute(operation) + + fun execute(operation: JacksonModelOperationResponseBodyTrait): CompletableFuture> = restExecutor.execute(operation) + + companion object { + class Builder : AsyncClientBuilder() { + override fun build(): AsyncXapClient = AsyncXapClient(buildConfig()) + } + + @JvmStatic + fun builder() = Builder() + } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/XapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/XapClient.kt new file mode 100644 index 000000000..37d379611 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/XapClient.kt @@ -0,0 +1,49 @@ +package com.expediagroup.sdk.xap + +import com.expediagroup.sdk.rest.RestClient +import com.expediagroup.sdk.rest.RestExecutor +import com.expediagroup.sdk.rest.model.Response +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationNoResponseBodyTrait +import com.expediagroup.sdk.xap.configuration.ApiEndpoint +import com.expediagroup.sdk.xap.configuration.ClientBuilder +import com.expediagroup.sdk.xap.configuration.ClientEnvironment +import com.expediagroup.sdk.xap.configuration.EndpointProvider +import com.expediagroup.sdk.xap.configuration.XAP_OBJECT_MAPPER +import com.expediagroup.sdk.xap.configuration.XapClientConfiguration +import com.expediagroup.sdk.xap.core.RequestExecutor + +class XapClient private constructor( + config: XapClientConfiguration +) : RestClient() { + private val apiEndpoint: ApiEndpoint = EndpointProvider.getXapApiEndpoint(config.environment) + + override val restExecutor: RestExecutor = + RestExecutor( + mapper = XAP_OBJECT_MAPPER, + serverUrl = apiEndpoint.endpoint, + requestExecutor = + RequestExecutor( + configuration = + XapClientConfiguration( + key = config.key, + secret = config.secret, + environment = ClientEnvironment.PROD, + transport = config.transport + ) + ) + ) + + fun execute(operation: OperationNoResponseBodyTrait): Response = restExecutor.execute(operation) + + fun execute(operation: JacksonModelOperationResponseBodyTrait): Response = restExecutor.execute(operation) + + companion object { + class Builder : ClientBuilder() { + override fun build(): XapClient = XapClient(buildConfig()) + } + + @JvmStatic + fun builder() = Builder() + } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt new file mode 100644 index 000000000..d83825abd --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt @@ -0,0 +1,5 @@ +package com.expediagroup.sdk.xap.configuration + +data class ApiEndpoint( + val endpoint: String +) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt new file mode 100644 index 000000000..17ca34f47 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt @@ -0,0 +1,5 @@ +package com.expediagroup.sdk.xap.configuration + +enum class ClientEnvironment { + PROD +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt new file mode 100644 index 000000000..19ab69339 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt @@ -0,0 +1,22 @@ +package com.expediagroup.sdk.xap.configuration + +import com.expediagroup.sdk.core.exception.client.ExpediaGroupConfigurationException + +internal object EndpointProvider { + fun getXapApiEndpoint(environment: ClientEnvironment? = null): ApiEndpoint { + val env = environment ?: ClientEnvironment.PROD + + return try { + ApiEndpoint( + XapApiEndpoint.valueOf(env.name).url + ) + } catch (e: IllegalArgumentException) { + throw ExpediaGroupConfigurationException( + """ + Unsupported environment [$environment] for Supply API. + Supported environments are [${XapApiEndpoint.entries.joinToString(", ")}] + """ + ) + } + } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt new file mode 100644 index 000000000..038a889dc --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt @@ -0,0 +1,7 @@ +package com.expediagroup.sdk.xap.configuration + +enum class XapApiEndpoint( + val url: String +) { + PROD("https://apim.expedia.com") +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt new file mode 100644 index 000000000..7252df743 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt @@ -0,0 +1,88 @@ +package com.expediagroup.sdk.xap.configuration + +import com.expediagroup.sdk.core.transport.AsyncTransport +import com.expediagroup.sdk.core.transport.Transport +import com.expediagroup.sdk.rest.AsyncRestClient +import com.expediagroup.sdk.rest.RestClient + +data class XapClientConfiguration( + val key: String, + val secret: String, + val environment: ClientEnvironment? = null, + val transport: Transport? = null +) + +data class AsyncXapClientConfiguration( + val key: String, + val secret: String, + val environment: ClientEnvironment? = null, + val asyncTransport: AsyncTransport? = null +) + +abstract class ClientBuilder { + private var key: String? = null + private var secret: String? = null + private var environment: ClientEnvironment? = null + private var transport: Transport? = null + + fun key(key: String) = apply { this.key = key } + + fun secret(secret: String) = apply { this.secret = secret } + + fun environment(environment: ClientEnvironment) = apply { this.environment = environment } + + fun transport(transport: Transport) = apply { this.transport = transport } + + abstract fun build(): T + + protected fun buildConfig(): XapClientConfiguration { + require(key != null) { + "key is required" + } + + require(secret != null) { + "secret is required" + } + + return XapClientConfiguration( + key = key!!, + secret = secret!!, + environment = environment, + transport = transport + ) + } +} + +abstract class AsyncClientBuilder { + private var key: String? = null + private var secret: String? = null + private var environment: ClientEnvironment? = null + private var asyncTransport: AsyncTransport? = null + + fun key(key: String) = apply { this.key = key } + + fun secret(secret: String) = apply { this.secret = secret } + + fun environment(environment: ClientEnvironment) = apply { this.environment = environment } + + fun asyncTransport(asyncTransport: AsyncTransport) = apply { this.asyncTransport = asyncTransport } + + abstract fun build(): T + + protected fun buildConfig(): AsyncXapClientConfiguration { + require(key != null) { + "key is required" + } + + require(secret != null) { + "secret is required" + } + + return AsyncXapClientConfiguration( + key = key!!, + secret = secret!!, + environment = environment, + asyncTransport = asyncTransport + ) + } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt new file mode 100644 index 000000000..5d2174bc8 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt @@ -0,0 +1,8 @@ +package com.expediagroup.sdk.xap.configuration + +import com.fasterxml.jackson.databind.ObjectMapper +import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder + +val XAP_OBJECT_MAPPER: ObjectMapper = + jacksonMapperBuilder { + }.build().findAndRegisterModules() diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt new file mode 100644 index 000000000..cdb0717d0 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt @@ -0,0 +1,13 @@ +package com.expediagroup.sdk.xap.core + +import com.expediagroup.sdk.core.http.Request +import com.expediagroup.sdk.core.pipeline.RequestPipelineStep + +class ApiKeyHeaderStep( + private val apiKey: String +) : RequestPipelineStep { + override fun invoke(request: Request): Request = + request.newBuilder() + .addHeader("key", apiKey) + .build() +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt new file mode 100644 index 000000000..3bd6651db --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt @@ -0,0 +1,40 @@ +package com.expediagroup.sdk.xap.core + +import com.expediagroup.sdk.core.authentication.basic.BasicAuthenticationManager +import com.expediagroup.sdk.core.authentication.common.Credentials +import com.expediagroup.sdk.core.logging.LoggerDecorator +import com.expediagroup.sdk.core.pipeline.ExecutionPipeline +import com.expediagroup.sdk.core.pipeline.step.BasicAuthenticationStep +import com.expediagroup.sdk.core.pipeline.step.RequestHeadersStep +import com.expediagroup.sdk.core.pipeline.step.RequestLoggingStep +import com.expediagroup.sdk.core.pipeline.step.ResponseLoggingStep +import com.expediagroup.sdk.core.transport.AbstractAsyncRequestExecutor +import com.expediagroup.sdk.xap.configuration.AsyncXapClientConfiguration +import org.slf4j.LoggerFactory + +class AsyncRequestExecutor( + configuration: AsyncXapClientConfiguration +) : AbstractAsyncRequestExecutor(configuration.asyncTransport) { + private val authManager = + BasicAuthenticationManager( + credentials = Credentials(configuration.key, configuration.secret) + ) + + override val executionPipeline = + ExecutionPipeline( + requestPipeline = + listOf( + RequestHeadersStep(), + BasicAuthenticationStep(authManager), + RequestLoggingStep(logger) + ), + responsePipeline = + listOf( + ResponseLoggingStep(logger) + ) + ) + + companion object { + private val logger = LoggerDecorator(LoggerFactory.getLogger(this::class.java.enclosingClass)) + } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt new file mode 100644 index 000000000..7656813f3 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt @@ -0,0 +1,41 @@ +package com.expediagroup.sdk.xap.core + +import com.expediagroup.sdk.core.authentication.basic.BasicAuthenticationManager +import com.expediagroup.sdk.core.authentication.common.Credentials +import com.expediagroup.sdk.core.logging.LoggerDecorator +import com.expediagroup.sdk.core.pipeline.ExecutionPipeline +import com.expediagroup.sdk.core.pipeline.step.BasicAuthenticationStep +import com.expediagroup.sdk.core.pipeline.step.RequestHeadersStep +import com.expediagroup.sdk.core.pipeline.step.RequestLoggingStep +import com.expediagroup.sdk.core.pipeline.step.ResponseLoggingStep +import com.expediagroup.sdk.core.transport.AbstractRequestExecutor +import com.expediagroup.sdk.xap.configuration.XapClientConfiguration +import org.slf4j.LoggerFactory + +class RequestExecutor( + configuration: XapClientConfiguration +) : AbstractRequestExecutor(configuration.transport) { + private val authManager = + BasicAuthenticationManager( + credentials = Credentials(configuration.key, configuration.secret) + ) + + override val executionPipeline = + ExecutionPipeline( + requestPipeline = + listOf( + RequestHeadersStep(), + ApiKeyHeaderStep(configuration.key), + BasicAuthenticationStep(authManager), + RequestLoggingStep(logger) + ), + responsePipeline = + listOf( + ResponseLoggingStep(logger) + ) + ) + + companion object { + private val logger = LoggerDecorator(LoggerFactory.getLogger(this::class.java.enclosingClass)) + } +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt similarity index 85% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt index 09112ca39..dc512ec80 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param message - */ +*/ data class APIGatewayError( @JsonProperty("message") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt similarity index 85% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt index 25345be0b..df27c5798 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param message - */ +*/ data class APIMError( @JsonProperty("message") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt index f159e2b55..d3e610056 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt @@ -13,31 +13,16 @@ * 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.expediagroup.sdk.rest.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 +* Address information * @param address1 Street Number, Street Name, or PO Box. * @param address2 Apartment, Floor, Suite, Bldg * @param suite Suite/apartment number @@ -45,7 +30,7 @@ import javax.validation.Validation * @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") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt index 79657c6a7..b24ba3ab4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,12 +23,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for the Cancellation Policy information. +* Container for the Cancellation Policy information. * @param freeCancellation Indicates whether the activity can be canceled free of charge within the cancellation window or not. * @param cancelPolicyDescription The description of Cancellation Policy. * @param freeCancellationMinHours The minimum number of hours before activity when the activity can still be cancelled for free. * @param freeCancellationEndDateTime The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. - */ +*/ data class ActivitiesCancellationPolicy( // Indicates whether the activity can be canceled free of charge within the cancellation window or not. @JsonProperty("FreeCancellation") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt index c8b05c7fa..a7be376e9 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,12 +23,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for disambiguation country information +* Container for disambiguation country information * @param name country name * @param isoCode2 2-letter code for the country * @param isoCode3 3-letter code for the country * @param code 3-letter code for the country - */ +*/ data class ActivitiesCountry( // country name @JsonProperty("Name") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt index af0401354..86ba932be 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesLocationOption import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,13 +24,13 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for error list. +* Container for error list. * @param code Error code describing the issue * @param description A simple description of what the error is. * @param detailCode Detailed error code describing the issue. * @param locationKeyword The requested location that caused the error. * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. - */ +*/ data class ActivitiesError( // Error code describing the issue @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt index 1295fed19..5531dddfc 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesError import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,10 +24,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * +* * @param errors Container for error list. * @param transactionId A unique identifier for the transaction. - */ +*/ data class ActivitiesErrors( // Container for error list. @JsonProperty("Errors") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt index e14ba3684..5c82f1f2e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Geographic information +* Geographic information * @param latitude Latitude of the location. * @param longitude Longitude of the location. * @param obfuscated - */ +*/ data class ActivitiesGeoLocation( // Latitude of the location. @JsonProperty("Latitude") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt index f34efbe35..306c38caf 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container of HATEOAS URL's +* Container of HATEOAS URL's * @param href HATEOAS URL to fetch details. * @param accept Accept header. * @param method HTTP method to connect. - */ +*/ data class ActivitiesLink( // HATEOAS URL to fetch details. @JsonProperty("Href") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt similarity index 93% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt index 3c3cb2fe0..359351e9f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesAddress import com.expediagroup.sdk.xap.models.ActivitiesCountry import com.expediagroup.sdk.xap.models.ActivitiesGeoLocation @@ -41,7 +26,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * List of location(s) where the activity will happen. +* List of location(s) where the activity will happen. * @param type The type of location code (MULTICITY | METROCODE). * @param id Expedia Region ID of the specified airport. * @param name Location Name @@ -53,7 +38,7 @@ import javax.validation.Validation * @param neighborhood * @param regionId RegionId the location resides in. * @param country - */ +*/ data class ActivitiesLocation( // The type of location code (MULTICITY | METROCODE). @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt index 88e54b697..f70e156ae 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesCountry import com.expediagroup.sdk.xap.models.ActivitiesGeoLocation import com.expediagroup.sdk.xap.models.ActivitiesLocation @@ -41,7 +26,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List for possible locations from which the customer must choose the best one to be re-submitted in the request. +* List for possible locations from which the customer must choose the best one to be re-submitted in the request. * @param requestedLocation Location used in partner request. * @param locations Container for list of possible locations that could be used to disambiguate the query. * @param type Type of the location. @@ -51,7 +36,7 @@ import javax.validation.constraints.NotNull * @param address The address of the location. * @param country * @param geoLocation - */ +*/ data class ActivitiesLocationOption( // Location used in partner request. @JsonProperty("RequestedLocation") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt index b8ffe6ae0..0388cc72e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,12 +23,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of activity Media. +* List of activity Media. * @param type type of the media. So far there is only one option: 1: Image * @param propertySize Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. * @param url Image URL * @param title Image title - */ +*/ data class ActivitiesMedia( // type of the media. So far there is only one option: 1: Image @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt index 524a014e2..a304be2d6 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for the discount amount. +* Container for the discount amount. * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class ActivitiesMoney( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt similarity index 81% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt index a7cec9c15..9c8cb787e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. +* Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. * @param id Neighborhood id. * @param name Neighborhood name. - */ +*/ data class ActivitiesNeighborhood( // Neighborhood id. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt index 8af792ad6..8627770a6 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,12 +23,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The phone of the company providing the activity. +* The phone of the company providing the activity. * @param countryCode Country code of traveler's phone number; only digits allowed. * @param number Traveler's phone number; only digits allowed. * @param areaCode Area code of traveler's phone number; only digits allowed. * @param extensionNumber - */ +*/ data class ActivitiesPhone( // Country code of traveler's phone number; only digits allowed. @JsonProperty("CountryCode") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt index 7e469e3ce..874ea2297 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesMoney import com.expediagroup.sdk.xap.models.ReferencePrice import com.expediagroup.sdk.xap.models.Savings @@ -41,14 +26,14 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The price of the offer +* The price of the offer * @param totalRate * @param category Type of passenger. Values supported are: ADULT | SENIOR | CHILD * @param totalFees * @param totalTaxesAndFees * @param referencePrice * @param savings - */ +*/ data class ActivitiesPrice( @JsonProperty("TotalRate") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt index 2a5297ce5..4588599fb 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesPhone import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,10 +24,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The details information of company providing the activity. +* The details information of company providing the activity. * @param name The name of the company providing the activity. * @param phone - */ +*/ data class ActivitiesSupplier( // The name of the company providing the activity. @JsonProperty("Name") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt index 71c3fae09..cb075b67e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesLink import com.expediagroup.sdk.xap.models.ActivitiesMoney import com.fasterxml.jackson.annotation.JsonProperty @@ -40,7 +25,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for all warnings generated during the transaction. +* Container for all warnings generated during the transaction. * @param code Standardized warning code. * @param description Standardized warning description message. * @param originalPrice @@ -48,7 +33,7 @@ import javax.validation.constraints.NotNull * @param changedAmount * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. * @param links - */ +*/ data class ActivitiesWarning( // Standardized warning code. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt similarity index 97% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt index 420114d70..b69791c41 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesCancellationPolicy import com.expediagroup.sdk.xap.models.ActivitiesLink import com.expediagroup.sdk.xap.models.ActivitiesLocation @@ -46,7 +31,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Detailed information on the Activity. +* Detailed information on the Activity. * @param id The numerical identifier for this particular activity * @param title The display title for this activity. * @param description The description of the Activity. @@ -69,7 +54,7 @@ import javax.validation.constraints.NotNull * @param knowBeforeYouBook Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. * @param knowBeforeYouGo Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. * @param offers Offers for the activity. - */ +*/ data class Activity( // The numerical identifier for this particular activity @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt index 337bba6f7..afb2a95fc 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesWarning import com.expediagroup.sdk.xap.models.Activity import com.fasterxml.jackson.annotation.JsonProperty @@ -40,14 +25,14 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * +* * @param transactionId A unique identifier for this transaction. * @param location The location user searched, translated into the full, unambiguous format. * @param warnings Container for all warnings generated during the transaction. * @param startDate The startDate of activities in YYY-MM-DD format. * @param endDate The endDate of activities in YYY-MM-DD format. * @param activityDetails - */ +*/ data class ActivityDetailsResponse( // A unique identifier for this transaction. @JsonProperty("TransactionId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt similarity index 94% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt index 79cbaf463..e59306900 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesWarning import com.expediagroup.sdk.xap.models.Activity import com.expediagroup.sdk.xap.models.CategoryGroup @@ -41,7 +26,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * +* * @param transactionId A unique identifier for this transaction. * @param count The number of activities returned in the response. * @param location The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. @@ -50,7 +35,7 @@ import javax.validation.constraints.NotNull * @param endDate The endDate of returned group of activities in YYYY-MM-DD format. * @param activities List of activities matching the search criteria. * @param categories Container for a breakdown of how many of each type of Activity have been returned in the API response. - */ +*/ data class ActivityListingsResponse( // A unique identifier for this transaction. @JsonProperty("TransactionId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt index 30241211d..6d8f05d8e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney import com.expediagroup.sdk.xap.models.Deductible import com.fasterxml.jackson.annotation.JsonProperty @@ -40,14 +25,14 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver +* List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver * @param isRequired Indicates whether this additional fee is mandatory. * @param financeCategory Category of the fee / Coverages * @param financeSubCategory Sub category of the fee / Coverages . * @param amount * @param description Description of the fee. * @param deductible - */ +*/ data class AdditionalFee( // Indicates whether this additional fee is mandatory. @JsonProperty("IsRequired") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt index d10f7d59c..9f2f1a70c 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt @@ -13,38 +13,23 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * The address information of the location. +* The address information of the location. * @param address1 Street Number, Street Name, or PO Box * @param address2 Apartment, Floor, Suite, Bldg or more specific information about Address1. * @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 Address( // Street Number, Street Name, or PO Box @JsonProperty("Address1") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt index a3c948d70..6f370129f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * Container for room occupancy rules based on the age of the guests. +* Container for room occupancy rules based on the age of the guests. * @param ageClass Categories for hotel guests, based on age. * @param ageMinimum The minimum age defined in a particular `AgeClass`. * @param ageMaximum The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. * @param maxGuestCount The max guest count allowed in a particular `AgeClass`. - */ +*/ data class AgeClassRestriction( // Categories for hotel guests, based on age. @JsonProperty("AgeClass") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt similarity index 95% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt index 9e0076e00..1731a8114 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.DateRange import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,7 +23,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param propertyId The unique property identifier that designates a single property. * @param dateRange * @param availability A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* @@ -46,7 +31,7 @@ import javax.validation.Validation * @param minPriorNotify A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* * @param minStay A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* * @param maxStay A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. - */ +*/ data class AvailabilityCalendar( // The unique property identifier that designates a single property. @JsonProperty("PropertyId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt index 1539de6b9..29d04fff4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.AvailabilityCalendar import com.expediagroup.sdk.xap.models.LodgingWarning import com.fasterxml.jackson.annotation.JsonProperty @@ -39,11 +24,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. * @param transactionId Unique identifier for the transaction. * @param availabilityCalendars A list of the calendar entities. - */ +*/ data class AvailabilityCalendarResponse( // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. @JsonProperty("Warnings") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt index 31d96f56d..70954f6f3 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesCancellationPolicy import com.expediagroup.sdk.xap.models.Ticket import com.fasterxml.jackson.annotation.JsonProperty @@ -40,12 +25,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The list of available Time Slots for the activity. +* The list of available Time Slots for the activity. * @param dateTime The date and time when the activity happens. * @param allDayActivity Indicates whether the activity is an all-day activity. * @param cancellationPolicy * @param tickets Container for ticket information. - */ +*/ data class AvailableTimeSlot( // The date and time when the activity happens. @JsonProperty("DateTime") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt similarity index 77% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt index 8dd01d693..1f0cecf95 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). +* Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). * @param id The bed type ID * @param description The bed type description. - */ +*/ data class BedType( // The bed type ID @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt similarity index 93% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt index 813dd4764..9b80035f7 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CancellationPenaltyRulePenaltyPrice import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,13 +23,13 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param penaltyNightCount Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. * @param penaltyPrice * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - */ +*/ data class CancellationPenaltyRule( // Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. @JsonProperty("PenaltyNightCount") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt index 448d38b1f..83ceea1fe 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class CancellationPenaltyRulePenaltyPrice( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt similarity index 94% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt index 5a12667ea..6d8adc44a 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CancellationPenaltyRule import com.expediagroup.sdk.xap.models.NonRefundableDateRange import com.expediagroup.sdk.xap.models.WaiverPolicy @@ -40,7 +25,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for room cancellation policy. +* Container for room cancellation policy. * @param waiverPolicy * @param cancellableOnline Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. * @param refundable Indicate whether the rate is refundable or not. @@ -49,7 +34,7 @@ import javax.validation.Validation * @param cancellationPenaltyRules Container for cancellation penalty details. * @param cancelPolicyDescription Additional cancellation policy information available as static text. * @param nonRefundableDateRanges A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. - */ +*/ data class CancellationPolicy( @JsonProperty("WaiverPolicy") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt index 17fbeb6c1..6da09a7fc 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * Capacity for car's properties. +* Capacity for car's properties. * @param adultCount The typical number of adults that can fit comfortably in the car. * @param childCount The typical number of children that can fit comfortably in the car. * @param smallLuggageCount The typical number of small pieces of luggage that fit in the cargo space. * @param largeLuggageCount The typical number of large pieces of luggage that fit in the cargo space. - */ +*/ data class Capacity( // The typical number of adults that can fit comfortably in the car. @JsonProperty("AdultCount") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt similarity index 96% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt index 2e806cdb7..c067fd063 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.AdditionalFee import com.expediagroup.sdk.xap.models.CarsCancellationPolicy import com.expediagroup.sdk.xap.models.CarsLink @@ -50,7 +35,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of cars matching the search criteria. +* List of cars matching the search criteria. * @param id Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. * @param vehicleDetails * @param supplier @@ -68,7 +53,7 @@ import javax.validation.constraints.NotNull * @param noShowPenalty * @param images List of image resources of the car product. * @param rating - */ +*/ data class Car( // Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt similarity index 83% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt index df984b321..b3d0b5d42 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Car category. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115008631767 +* Car category. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115008631767 * @param code Car category code. * @param `value` Car category value. - */ +*/ data class CarCategory( // Car category code. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt similarity index 96% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt index e2047620e..c40363aea 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.AdditionalFee import com.expediagroup.sdk.xap.models.CarPolicy import com.expediagroup.sdk.xap.models.CarsCancellationPolicy @@ -54,7 +39,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Details of requested car. +* Details of requested car. * @param vehicleDetails * @param supplier * @param pickupDetails @@ -74,7 +59,7 @@ import javax.validation.constraints.NotNull * @param carPolicies A list of policies that apply to this car rental. * @param images List of image resources of the car product. * @param rating - */ +*/ data class CarDetails( @JsonProperty("VehicleDetails") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt index 3649d3c5d..e7539f0dd 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarDetails import com.expediagroup.sdk.xap.models.CarsLink import com.expediagroup.sdk.xap.models.CarsValidFormsOfPayment @@ -42,13 +27,13 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * +* * @param transactionId A unique identifier for this transaction. * @param warnings Container for warning codes * @param carDetails * @param validFormsOfPayment List of all the forms of payment that will be accepted for the booking of this rental transaction. * @param links A map of links to other Car APIs. possible link name: ApiBooking - */ +*/ data class CarDetailsResponse( // A unique identifier for this transaction. @JsonProperty("TransactionId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt index c98eeed36..e1b80535d 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Car import com.expediagroup.sdk.xap.models.CarsWarning import com.fasterxml.jackson.annotation.JsonProperty @@ -40,12 +25,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * +* * @param transactionId A unique identifier for this transaction. * @param carCount The number of cars offers returned in the response. * @param warnings Container for warning codes * @param cars List of cars matching the search criteria. - */ +*/ data class CarListingsResponse( // A unique identifier for this transaction. @JsonProperty("TransactionId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt index 4e181742b..a065ac273 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * A list of policies that apply to this car rental. +* A list of policies that apply to this car rental. * @param categoryCode The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) * @param policyText The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. - */ +*/ data class CarPolicy( // The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) @JsonProperty("CategoryCode") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt similarity index 83% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt index e5694075b..7c2dcda4c 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Car type. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115002516708 +* Car type. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115002516708 * @param code Car type code. * @param `value` Car type value. - */ +*/ data class CarType( // Car type code. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt index 55c39e7d0..9eed0edb9 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,7 +23,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Address information +* Address information * @param address1 Street Number, Street Name, or PO Box * @param city The city * @param country 3-letter code for the country @@ -46,7 +31,7 @@ import javax.validation.constraints.NotNull * @param suite Suite/apartment number * @param province The state or province * @param postalCode Zip/postal code - */ +*/ data class CarsAddress( // Street Number, Street Name, or PO Box @JsonProperty("Address1") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt index 5b98a5167..69eec7c10 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.NonCancellableDateTimeRange import com.expediagroup.sdk.xap.models.PenaltyRule import com.fasterxml.jackson.annotation.JsonProperty @@ -39,13 +24,13 @@ import javax.validation.Valid import javax.validation.Validation /** - * Cancellation Policy Container. +* Cancellation Policy Container. * @param cancellable Indicates if this car can be cancelled (free cancel or penalty cancel) * @param freeCancellation Indicates if this car may be cancelled without a penalty. * @param freeCancellationEndDateTime Indicates the latest time that the car can be cancelled for free. * @param penaltyRules Container for penalty rules * @param nonCancellableDateTimeRange - */ +*/ data class CarsCancellationPolicy( // Indicates if this car can be cancelled (free cancel or penalty cancel) @JsonProperty("Cancellable") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt index a77c1f2d7..38c99dc55 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,12 +23,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for disambiguation country information +* Container for disambiguation country information * @param name country name * @param isoCode2 2-letter code for the country * @param isoCode3 3-letter code for the country * @param code 3-letter code for the country - */ +*/ data class CarsCountry( // country name @JsonProperty("Name") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt index 175d2ab4c..e8367a886 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * Date range of the period. +* Date range of the period. * @param startDate Start date at pickup location of the period. * @param endDate End date at pickup location of the period. - */ +*/ data class CarsDateRange( // Start date at pickup location of the period. @JsonProperty("StartDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt index 9ddab12f4..a6e9e8fe4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The extra distance information. +* The extra distance information. * @param `value` The number of miles/kilometers of the distance (specified by the Unit). * @param unit The unit (KM or MI) for the distance. * @param direction The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE - */ +*/ data class CarsDistance( // The number of miles/kilometers of the distance (specified by the Unit). @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt index dee35fba4..be49f6442 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsLocationOption import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,13 +24,13 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for error list. +* Container for error list. * @param code Error code describing the issue * @param description A simple description of what the error is. * @param detailCode Detailed error code describing the issue. * @param locationKeyword The requested location that caused the error. * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. - */ +*/ data class CarsError( // Error code describing the issue @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt index 31d0e6c13..db5ab1317 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsError import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,10 +24,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * +* * @param errors Container for error list. * @param transactionId A unique identifier for the transaction. - */ +*/ data class CarsErrors( // Container for error list. @JsonProperty("Errors") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt index 8f4854918..ef731156e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for Geo location. +* Container for Geo location. * @param latitude Latitude of the location. * @param longitude Longitude of the location. * @param obfuscated - */ +*/ data class CarsGeoLocation( // Latitude of the location. @JsonProperty("Latitude") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt index 620b2083b..d995ff9c5 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * A map of links to other Car APIs. possible link name: ApiBooking +* A map of links to other Car APIs. possible link name: ApiBooking * @param href HATEOAS URL to fetch details. * @param accept Accept header. * @param method HTTP method to connect. - */ +*/ data class CarsLink( // HATEOAS URL to fetch details. @JsonProperty("Href") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt index 2c3a77fae..4a650f935 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsAddress import com.expediagroup.sdk.xap.models.CarsCountry import com.expediagroup.sdk.xap.models.CarsGeoLocation @@ -42,7 +27,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for list of possible locations that could be used to disambiguate the query. +* Container for list of possible locations that could be used to disambiguate the query. * @param locationId Location id. * @param type The type of location code (MULTICITY | METROCODE). * @param id Expedia Region ID of the specified airport. @@ -54,7 +39,7 @@ import javax.validation.constraints.NotNull * @param neighborhood * @param regionId RegionId the location resides in. * @param country - */ +*/ data class CarsLocation( // Location id. @JsonProperty("LocationId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt index 129b2c18a..d0a2b672c 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsCountry import com.expediagroup.sdk.xap.models.CarsGeoLocation import com.expediagroup.sdk.xap.models.CarsLocation @@ -41,7 +26,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List for possible locations from which the customer must choose the best one to be re-submitted in the request. +* List for possible locations from which the customer must choose the best one to be re-submitted in the request. * @param requestedLocation Location used in partner request. * @param locations Container for list of possible locations that could be used to disambiguate the query. * @param type Type of the location. @@ -51,7 +36,7 @@ import javax.validation.constraints.NotNull * @param address The address of the location. * @param country * @param geoLocation - */ +*/ data class CarsLocationOption( // Location used in partner request. @JsonProperty("RequestedLocation") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt index 8cc209bff..876fa4da5 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Price of Special equipment. +* Price of Special equipment. * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class CarsMoney( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt similarity index 81% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt index 2bff29b2d..2f238b959 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. +* Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. * @param id Neighborhood id. * @param name Neighborhood name. - */ +*/ data class CarsNeighborhood( // Neighborhood id. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt index 96d0a0194..bd915a756 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of all the forms of payment that will be accepted for the booking of this rental transaction. +* List of all the forms of payment that will be accepted for the booking of this rental transaction. * @param paymentMethod Method of payment * @param paymentSubMethod Sub method of payment * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. - */ +*/ data class CarsValidFormsOfPayment( // Method of payment @JsonProperty("PaymentMethod") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt index e94f77176..b75276e91 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsLink import com.expediagroup.sdk.xap.models.CarsMoney import com.fasterxml.jackson.annotation.JsonProperty @@ -40,7 +25,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for warning codes +* Container for warning codes * @param code Standardized warning code. * @param description Standardized warning description message. * @param originalPrice @@ -48,7 +33,7 @@ import javax.validation.constraints.NotNull * @param changedAmount * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. * @param links - */ +*/ data class CarsWarning( // Standardized warning code. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt index ec433a734..04f9edc7f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,13 +23,13 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for a breakdown of how many of each type of Activity have been returned in the API response. +* Container for a breakdown of how many of each type of Activity have been returned in the API response. * @param count The count of the number of categories the returned set of activities map to. * @param groupName The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration * @param groupDisplayName The localized value for category name. * @param categoryName The name of one of the categories. * @param categoryDisplayName - */ +*/ data class CategoryGroup( // The count of the number of categories the returned set of activities map to. @JsonProperty("Count") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt index 96f6032f4..a44620cc4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt @@ -13,36 +13,21 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * The chain and brand information of hotel. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. +* The chain and brand information of hotel. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. * @param chainId The chain id. * @param chainName The name of the chain. * @param brandId The brand id. * @param brandName The name of the brand. - */ +*/ data class ChainAndBrandInfo( // The chain id. @JsonProperty("ChainId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt index debe86224..a358d2334 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for disambiguation country information +* Container for disambiguation country information * @param name country name * @param isoCode2 2-letter code for the country * @param isoCode3 3-letter code for the country - */ +*/ data class Country( // country name @JsonProperty("Name") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt index fa031697f..8605a1bbc 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * The actual date range for the shown availability. +* The actual date range for the shown availability. * @param startDate The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. * @param endDate The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. - */ +*/ data class DateRange( // The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. @JsonProperty("StartDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt index 5a8ccf07e..42113dc63 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsDateRange import com.expediagroup.sdk.xap.models.TimeRange import com.fasterxml.jackson.annotation.JsonProperty @@ -40,10 +25,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * A List of date time periods to indicate the vendor business hours for the pickup time. +* A List of date time periods to indicate the vendor business hours for the pickup time. * @param dateRange * @param timeRanges A list of time range to indicate the operation hours of the date range. - */ +*/ data class DateTimePeriod( @JsonProperty("DateRange") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt index 65516b64c..f83001b5d 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * Indicate whether it is deductible +* Indicate whether it is deductible * @param excessAmount * @param liabilityAmount * @param deductibleAmount - */ +*/ data class Deductible( @JsonProperty("ExcessAmount") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt index 456f33481..ab92bea6f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.When import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for deposit policy details +* Container for deposit policy details * @param type Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a deposit. * @param `when` - */ +*/ data class DepositDetail( // Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt index e9100a633..20d70d2e0 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.DepositDetail import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for deposit policy details +* Container for deposit policy details * @param description * @param details Container for deposit policy details - */ +*/ data class DepositPolicy( @JsonProperty("Description") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt index 56080fb2f..a19bf1b85 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for the descriptions of the property. +* Container for the descriptions of the property. * @param locationTeaser A description of the property's location. * @param hotelTeaser A description of the features and amenities of the property itself. * @param roomTeaser The common description for all of the rooms in the property. - */ +*/ data class Description( // A description of the property's location. @JsonProperty("LocationTeaser") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt index 9dccf2592..ac2742356 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsError import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,10 +24,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * +* * @param errors Container for error list. * @param transactionId A unique identifier for the transaction. - */ +*/ data class DisambiguationResponse( // Container for error list. @JsonProperty("Errors") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt index 24e75d55e..35a636ec9 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of discount information. +* List of discount information. * @param type Discount type. Supported values : CorpDiscount | Coupon. * @param code Discount code. - */ +*/ data class Discount( // Discount type. Supported values : CorpDiscount | Coupon. @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt index 9230cbaf3..f375189bf 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for distance information. Only returned for city/address search or `geoLocation` search or single `regionId` search. +* Container for distance information. Only returned for city/address search or `geoLocation` search or single `regionId` search. * @param `value` The distance between the center of the search and the hotel. * @param unit The unit of distance. * @param direction The direction to the hotel from the center point of the search. - */ +*/ data class Distance( // The distance between the center of the search and the hotel. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt similarity index 84% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt index aa3cffc68..48c945f5e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The maximum amount of time for a rental that still qualifies for this rate.This may or may not be the same as the current rental duration. +* The maximum amount of time for a rental that still qualifies for this rate.This may or may not be the same as the current rental duration. * @param unit The unit for minimum amount of time for a rental. * @param count The minimum number of units that qualify for minimum amount of time for a rental. - */ +*/ data class Duration( // The unit for minimum amount of time for a rental. @JsonProperty("Unit") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt index 35d65f84c..1d02d5049 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,12 +24,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Description and costs of any optional special equipment that may be rented with the car. +* Description and costs of any optional special equipment that may be rented with the car. * @param code Special equipment code * @param name Special equipment name * @param ratePeriod Unit indicating the price of special equipment. Support value:Trip,Daily * @param price - */ +*/ data class Equipment( // Special equipment code @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt index de9e1b406..b44a220e0 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LocationOption import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,13 +23,13 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for error list. +* Container for error list. * @param code Error code describing the issue * @param detailCode Detailed error code describing the issue. * @param description A simple description of what the error is. * @param locationKeyword The requested location that caused the error. * @param locationOptions Container for possible matches to your ambiguous `locationKeyword` query. - */ +*/ data class Error( // Error code describing the issue @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt index 41e530928..73325b204 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Error import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param errors Container for error list. * @param transactionId A unique identifier for the transaction. - */ +*/ data class Errors( // Container for error list. @JsonProperty("Errors") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt index 541d9b2af..9fe48a643 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.CarsMoney import com.fasterxml.jackson.annotation.JsonProperty @@ -40,10 +25,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Extra cost for each increment of distance used. +* Extra cost for each increment of distance used. * @param distance * @param cost - */ +*/ data class ExtraCostPerDistance( @JsonProperty("Distance") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt index e98dcdc20..7db16c436 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,11 +24,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of ExtraFeesDetails +* List of ExtraFeesDetails * @param unit Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily * @param unitCount Numbers of period * @param amount - */ +*/ data class ExtraFees( // Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily @JsonProperty("Unit") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt index cef192a49..3475b908a 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * API returned information. +* API returned information. * @param code Fault code. * @param description Fault description. - */ +*/ data class Fault( // Fault code. @JsonProperty("code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt similarity index 95% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt index fe1a11f85..a6a6097b4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.FileSize import com.expediagroup.sdk.xap.models.FilterConditions import com.expediagroup.sdk.xap.models.SdpLink @@ -40,7 +25,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param partner The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. * @param brand The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. * @param fileContentType The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` @@ -52,7 +37,7 @@ import javax.validation.Validation * @param downloadUrlExpires The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX * @param filterConditions * @param bestMatchedLink - */ +*/ data class FileInfo( // The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. @JsonProperty("partner") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt index 877fffe0a..b2a9722c4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * The information about the file size. +* The information about the file size. * @param unit The unit about the file size. * @param `value` The value about the file size. - */ +*/ data class FileSize( // The unit about the file size. @JsonProperty("unit") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt similarity index 85% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt index a9359a600..16e94bf22 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container filter condition for the filtered file. [Filters](https://confluence.expedia.biz/display/EWS/Filtered+Feed+File+Generation+Schedule+and+Access#FilteredFeedFileGenerationScheduleandAccess-Filters) +* Container filter condition for the filtered file. [Filters](https://confluence.expedia.biz/display/EWS/Filtered+Feed+File+Generation+Schedule+and+Access#FilteredFeedFileGenerationScheduleandAccess-Filters) * @param pointOfSupply List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. * @param brand List of filter condition for Brands: `VRBO`. * @param structureType List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. - */ +*/ data class FilterConditions( // List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. @JsonProperty("pointOfSupply") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt similarity index 82% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt index fb7b26c15..df6914a6a 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Car fuel type and whether Air Conditioning is included. Please find list of Car Fuel AC Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005378328 +* Car fuel type and whether Air Conditioning is included. Please find list of Car Fuel AC Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005378328 * @param code Car FuelAC code. * @param `value` Car FuelAC value. - */ +*/ data class FuelAC( // Car FuelAC code. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt index 279c90827..e29afb3f7 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for Geo location. +* Container for Geo location. * @param latitude Latitude of the location. * @param longitude Longitude of the location. * @param obfuscated - */ +*/ data class GeoLocation( // Latitude of the location. @JsonProperty("Latitude") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt similarity index 98% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt index 6856ffcf5..99caf09b7 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ChainAndBrandInfo import com.expediagroup.sdk.xap.models.Description import com.expediagroup.sdk.xap.models.Distance @@ -50,7 +35,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for information on each offered hotel. +* Container for information on each offered hotel. * @param id The unique, Expedia-specific hotel property identifier used to designate a single hotel. * @param hcomId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. * @param name The common name of the hotel @@ -83,7 +68,7 @@ import javax.validation.Validation * @param accessibility The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage * @param memberOnlyDealAvailable Indicates whether the property has member only deal rates available. * @param roomTypes Container for all of available room types. - */ +*/ data class Hotel( // The unique, Expedia-specific hotel property identifier used to designate a single hotel. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt similarity index 94% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt index 909eca952..3ba30ec11 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Hotel import com.expediagroup.sdk.xap.models.HotelDetailsResponseOccupantsInner import com.expediagroup.sdk.xap.models.HotelDetailsResponseStayDates @@ -42,7 +27,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. * @param transactionId Unique identifier for the transaction. * @param stayDates @@ -51,7 +36,7 @@ import javax.validation.Validation * @param occupants Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. * @param validFormsOfPayment Container for payment information. * @param hotelDetails - */ +*/ data class HotelDetailsResponse( // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. @JsonProperty("Warnings") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt index a2fef6c22..ed360fddd 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param adults Specifies the number of adults staying in each room. * @param childAges Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. - */ +*/ data class HotelDetailsResponseOccupantsInner( // Specifies the number of adults staying in each room. @JsonProperty("Adults") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt index 7b5b89bfb..929feb9f9 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param checkInDate Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. * @param checkOutDate Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - */ +*/ data class HotelDetailsResponseStayDates( // Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. @JsonProperty("CheckInDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt similarity index 93% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt index 09db60810..890b1ac22 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt @@ -13,38 +13,23 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param code The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. * @param description A detail information of what happened. * @param originalPrice The original price from the Lodging Search API response. * @param newPrice The new price. * @param changedAmount The difference between `OriginalPrice` and `NewPrice`. * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - */ +*/ data class HotelDetailsResponseWarningsInner( // The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt index 1efdca550..9c5b875e5 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param id The identification number for a hotel amenity. * @param name The description of a hotel amenity. - */ +*/ data class HotelHotelAmenitiesInner( // The identification number for a hotel amenity. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt similarity index 79% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt index 747228435..4ea686052 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.HotelLinksApiRateCalendar import com.expediagroup.sdk.xap.models.HotelLinksWebSearchResult import com.expediagroup.sdk.xap.models.Link @@ -40,10 +25,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for list of **HATEOAS** links to Expedia website to complete booking. This links section will only return a deeplink to the Website Search Results page by default. If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the response, as the Lodging Details API returns details at the room offer level, and not at the property level. +* Container for list of **HATEOAS** links to Expedia website to complete booking. This links section will only return a deeplink to the Website Search Results page by default. If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the response, as the Lodging Details API returns details at the room offer level, and not at the property level. * @param webSearchResult * @param apiRateCalendar - */ +*/ data class HotelLinks( @JsonProperty("WebSearchResult") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt index 9e046cb5a..10fb591f7 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param accept The Accept request header (for API queries only - not included for page URLs). * @param method Method of request. * @param href The URL of the destination web page or API query. - */ +*/ data class HotelLinksApiRateCalendar( // The Accept request header (for API queries only - not included for page URLs). @JsonProperty("Accept") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt index f39b5e4e8..69b194781 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param accept The Accept request header (for API queries only - not included for page URLs). * @param method Method of request. * @param href The URL of the destination web page or API query. - */ +*/ data class HotelLinksWebSearchResult( // The Accept request header (for API queries only - not included for page URLs). @JsonProperty("Accept") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt similarity index 94% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt index 098fbc5e5..bf29ad17d 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Hotel import com.expediagroup.sdk.xap.models.HotelListingsResponseStayDates import com.expediagroup.sdk.xap.models.Occupant @@ -41,7 +26,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. * @param count The number of hotels actually returned in the response. * @param totalHotelCount The number of hotels present in the location. @@ -51,7 +36,7 @@ import javax.validation.Validation * @param numberOfRooms The number of the rooms requested on behalf of the user. * @param occupants Container of occupants. It is an array including occupants of each room. * @param hotels Container for all hotels. - */ +*/ data class HotelListingsResponse( // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. @JsonProperty("Warnings") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt index d01cb1c2d..505dc2b71 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * +* * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - */ +*/ data class HotelListingsResponseStayDates( // The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. @JsonProperty("CheckInDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt index 2e66d5ac5..24ab521de 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Address import com.expediagroup.sdk.xap.models.LocationGeoLocation import com.expediagroup.sdk.xap.models.Neighborhood @@ -40,11 +25,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param address * @param geoLocation * @param neighborhood - */ +*/ data class HotelLocation( @JsonProperty("Address") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt similarity index 93% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt index 2b71be3d4..8424e5456 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt @@ -13,38 +13,23 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for Hotel policy information. +* Container for Hotel policy information. * @param checkInStartTime Beginning of the standard check-in window on the check in date, and in the local time of the hotel. * @param checkInEndTime End of the standard check-in window on the check in date, and in the local time of the hotel. * @param specialCheckInInstructions Some special instructions needed care by customer when check in. * @param checkOutTime Customers must check out before this time on the check out date, expressed in the local time of the hotel. * @param petPolicies The policy of the property toward having pets stay with guests. * @param childrenAndExtraBedsPolicies The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. - */ +*/ data class HotelPolicies( // Beginning of the standard check-in window on the check in date, and in the local time of the hotel. @JsonProperty("CheckInStartTime") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt similarity index 80% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt index f12b4691f..f61118fb3 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for information on hotel property type. You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). +* Container for information on hotel property type. You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). * @param id The id of hotel property type. * @param name The name of hotel property type. - */ +*/ data class HotelPropertyType( // The id of hotel property type. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt index bc634ac91..371c59c8d 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.RateCalendar import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for all hotel rate calendar data. +* Container for all hotel rate calendar data. * @param ecomHotelId The unique, Expedia-specific hotel property identifier used to designate a single hotel. * @param hcomHotelId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. * @param rateCalendar Container for all rate calendar data. - */ +*/ data class HotelRateCalendar( // The unique, Expedia-specific hotel property identifier used to designate a single hotel. @JsonProperty("EcomHotelId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt index 632f3b125..a9c6ba825 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param id The identification number for a room amenity. * @param name The description of a room amenity. - */ +*/ data class HotelRoomAmenitiesInner( // The identification number for a room amenity. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt index 6d3a24ba2..68590facb 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of image resources of the car product. +* List of image resources of the car product. * @param type Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) * @param propertySize Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) * @param href URL for the image. - */ +*/ data class Image( // Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt index 0d1a271ca..a03d3bbff 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param accept The Accept request header (for API queries only - not included for page URLs). * @param method Method of request. * @param href The URL of the destination web page or API query. - */ +*/ data class Link( // The Accept request header (for API queries only - not included for page URLs). @JsonProperty("Accept") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt index b10b28b93..8c43218d2 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Address import com.expediagroup.sdk.xap.models.LocationGeoLocation import com.expediagroup.sdk.xap.models.Neighborhood @@ -40,11 +25,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for list of possible locations that could be used to disambiguate the query. +* Container for list of possible locations that could be used to disambiguate the query. * @param address * @param geoLocation * @param neighborhood - */ +*/ data class Location( @JsonProperty("Address") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt index 2f75e9973..9bb933708 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param latitude The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. * @param longitude The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. * @param obfuscated Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. - */ +*/ data class LocationGeoLocation( // The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. @JsonProperty("Latitude") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt index fe3af0eab..213477a3f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Country import com.expediagroup.sdk.xap.models.GeoLocation import com.fasterxml.jackson.annotation.JsonProperty @@ -39,7 +24,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for possible matches to your ambiguous `locationKeyword` query. +* Container for possible matches to your ambiguous `locationKeyword` query. * @param type Type of the location. * @param regionId RegionId the location resides in. * @param shortName The name of the location which matches the location keyword. @@ -47,7 +32,7 @@ import javax.validation.Validation * @param address The address of the location. * @param country * @param geoLocation - */ +*/ data class LocationOption( // Type of the location. @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt index 7c31b4b32..24daef25e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param id * @param name - */ +*/ data class LodgingAmenity( @JsonProperty("Id") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt index 687fe84c2..f8a6c666d 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for cancellation penalty details. +* Container for cancellation penalty details. * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. - */ +*/ data class LodgingCancellationPenaltyRule( // Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. @JsonProperty("PenaltyPercentOfStay") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt index 6ca1f264d..8d360914e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingCancellationPenaltyRule import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,12 +23,12 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for Cancellation Policy information. +* Container for Cancellation Policy information. * @param refundable Indicate whether the rate is refundable or not. * @param freeCancellation Indicate whether the room can be cancelled free of charge. * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. * @param cancellationPenaltyRules Container for Cancellation Penalty Rules information. - */ +*/ data class LodgingCancellationPolicy( // Indicate whether the rate is refundable or not. @JsonProperty("Refundable") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt index 09cb9a147..ab79cba9b 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for error list. +* Container for error list. * @param code Error code describing the issue * @param description A simple description of what the error is. - */ +*/ data class LodgingError( // Error code describing the issue @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt index a9eba2d8e..e73e83cee 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingError import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param errors Container for error list. * @param transactionId A unique identifier for the transaction. - */ +*/ data class LodgingErrors( // Container for error list. @JsonProperty("Errors") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt index 88b173658..2df4873ae 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. * @param method Method of request. * @param href The URL of the destination web page or API query. - */ +*/ data class LodgingLink( // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. @JsonProperty("Accept") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt index 890f2c1f2..6a1ad31c1 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Pricing information of the stat date +* Pricing information of the stat date * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. - */ +*/ data class LodgingMoney( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt index d0bd6ce52..4c3be5974 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param adults The number of adults in a room. * @param childAges The ages of children in a room. - */ +*/ data class LodgingOccupant( // The number of adults in a room. @JsonProperty("Adults") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt index e5bd5b15f..2a6bcf2c6 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingMoney import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param description The description of the promotion. * @param amount - */ +*/ data class LodgingPromotion( // The description of the promotion. @JsonProperty("Description") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt similarity index 94% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt index 4d59f99a7..40aea108f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingOccupant import com.expediagroup.sdk.xap.models.LodgingStayDates import com.expediagroup.sdk.xap.models.LodgingWarning @@ -41,7 +26,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. * @param count The number of properties actually returned in the response. * @param totalPropertyCount The number of properties requested. @@ -50,7 +35,7 @@ import javax.validation.Validation * @param lengthOfStay The number of stay nights. * @param occupants Container for the list of room occupants. * @param properties Container for all properties. - */ +*/ data class LodgingQuotesResponse( // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. @JsonProperty("Warnings") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt index e06c7748b..8e7762857 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingCancellationPolicy import com.expediagroup.sdk.xap.models.LodgingPromotion import com.fasterxml.jackson.annotation.JsonProperty @@ -39,10 +24,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for rate plan information. +* Container for rate plan information. * @param cancellationPolicy * @param promotions All promotion information of the ratePlan. - */ +*/ data class LodgingRatePlan( @JsonProperty("CancellationPolicy") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt index 8e46f1a6d..54cc29559 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingRatePlan import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinks import com.expediagroup.sdk.xap.models.LodgingRoomTypePrice @@ -40,11 +25,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param ratePlans Container for rate plan information. * @param price * @param links - */ +*/ data class LodgingRoomType( // Container for rate plan information. @JsonProperty("RatePlans") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt similarity index 80% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt index e1f92ed21..52ef6bb0d 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingLink import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinksWebDetails import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinksWebSearchResult @@ -40,10 +25,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the links parameter in the Search API query. Available links are: - WebDetails (link to web infosite) - WebSearchResult (link to web search result page) +* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the links parameter in the Search API query. Available links are: - WebDetails (link to web infosite) - WebSearchResult (link to web search result page) * @param webSearchResult * @param webDetails - */ +*/ data class LodgingRoomTypeLinks( @JsonProperty("WebSearchResult") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt index 0c86902f4..157ec76f1 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. * @param method Method of request. * @param href The URL of the destination web page or API query. - */ +*/ data class LodgingRoomTypeLinksWebDetails( // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. @JsonProperty("Accept") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt index 95df79e67..df17ce2da 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. * @param method Method of request. * @param href The URL of the destination web page or API query. - */ +*/ data class LodgingRoomTypeLinksWebSearchResult( // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. @JsonProperty("Accept") diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt new file mode 100644 index 000000000..94c6480c8 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt @@ -0,0 +1,149 @@ +/* + * 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. + */ +package com.expediagroup.sdk.xap.models + +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.xap.models.LodgingMoney +import com.fasterxml.jackson.annotation.JsonProperty +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator +import javax.validation.Valid +import javax.validation.Validation + +/** +* Container for Price information. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total amount of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. + * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + * @param propertyMandatoryFees The total mandatory fees which will be charged at the property for the rate plan. + * @param totalPriceWithPropertyFees The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + * @param refundableDamageDeposit The refundable damage deposit. +*/ +data class LodgingRoomTypePrice( + // The price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + @field:Valid + val baseRate: LodgingMoney? = null, + // The total amount of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + @field:Valid + val taxesAndFees: LodgingMoney? = null, + // The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. + @JsonProperty("TotalPrice") + @field:Valid + val totalPrice: LodgingMoney? = null, + // The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + @field:Valid + val avgNightlyRate: LodgingMoney? = null, + // The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + @JsonProperty("AvgNightlyRateWithFees") + @field:Valid + val avgNightlyRateWithFees: LodgingMoney? = null, + // The total mandatory fees which will be charged at the property for the rate plan. + @JsonProperty("PropertyMandatoryFees") + @field:Valid + val propertyMandatoryFees: LodgingMoney? = null, + // The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + @JsonProperty("TotalPriceWithPropertyFees") + @field:Valid + val totalPriceWithPropertyFees: LodgingMoney? = null, + // The refundable damage deposit. + @JsonProperty("RefundableDamageDeposit") + @field:Valid + val refundableDamageDeposit: LodgingMoney? = null +) { + companion object { + @JvmStatic + fun builder() = Builder() + } + + class Builder( + private var baseRate: LodgingMoney? = null, + private var taxesAndFees: LodgingMoney? = null, + private var totalPrice: LodgingMoney? = null, + private var avgNightlyRate: LodgingMoney? = null, + private var avgNightlyRateWithFees: LodgingMoney? = null, + private var propertyMandatoryFees: LodgingMoney? = null, + private var totalPriceWithPropertyFees: LodgingMoney? = null, + private var refundableDamageDeposit: LodgingMoney? = null + ) { + fun baseRate(baseRate: LodgingMoney?) = apply { this.baseRate = baseRate } + + fun taxesAndFees(taxesAndFees: LodgingMoney?) = apply { this.taxesAndFees = taxesAndFees } + + fun totalPrice(totalPrice: LodgingMoney?) = apply { this.totalPrice = totalPrice } + + fun avgNightlyRate(avgNightlyRate: LodgingMoney?) = apply { this.avgNightlyRate = avgNightlyRate } + + fun avgNightlyRateWithFees(avgNightlyRateWithFees: LodgingMoney?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } + + fun propertyMandatoryFees(propertyMandatoryFees: LodgingMoney?) = apply { this.propertyMandatoryFees = propertyMandatoryFees } + + fun totalPriceWithPropertyFees(totalPriceWithPropertyFees: LodgingMoney?) = apply { this.totalPriceWithPropertyFees = totalPriceWithPropertyFees } + + fun refundableDamageDeposit(refundableDamageDeposit: LodgingMoney?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } + + fun build(): LodgingRoomTypePrice { + val instance = + LodgingRoomTypePrice( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyRateWithFees = avgNightlyRateWithFees, + propertyMandatoryFees = propertyMandatoryFees, + totalPriceWithPropertyFees = totalPriceWithPropertyFees, + refundableDamageDeposit = refundableDamageDeposit + ) + + validate(instance) + + return instance + } + + private fun validate(instance: LodgingRoomTypePrice) { + 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( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyRateWithFees = avgNightlyRateWithFees, + propertyMandatoryFees = propertyMandatoryFees, + totalPriceWithPropertyFees = totalPriceWithPropertyFees, + refundableDamageDeposit = refundableDamageDeposit + ) +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt index 87bea51dd..422ef5634 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * Container for requested dates of stay. +* Container for requested dates of stay. * @param checkInDate The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. * @param checkOutDate The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. - */ +*/ data class LodgingStayDates( // The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. @JsonProperty("CheckInDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt index 9a7b84983..1cc1d7b03 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param code The code of a warning. * @param description A description of what caused the issues. - */ +*/ data class LodgingWarning( // The code of a warning. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt similarity index 93% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt index b33bcc200..d43a075f7 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.MandatoryFeesDetailAmount import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * The breakdown for the taxes and fees that must be paid at the property. +* The breakdown for the taxes and fees that must be paid at the property. * @param type Type of mandatory fee. * @param amount - */ +*/ data class MandatoryFeesDetail( // Type of mandatory fee. @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt index 4263b0be2..35a34ca46 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class MandatoryFeesDetailAmount( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt index f04faf656..9a0b0d119 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt @@ -13,36 +13,21 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for hotel images +* Container for hotel images * @param type Supported type of media. 1=Image. Only 1 is supported now. * @param title Image title * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). * @param url Image URL - */ +*/ data class Media( // Supported type of media. 1=Image. Only 1 is supported now. @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt index dcd643dec..8be03c371 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.ExtraCostPerDistance import com.fasterxml.jackson.annotation.JsonProperty @@ -40,11 +25,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * A list of charges to be levied based on the mileage driven. +* A list of charges to be levied based on the mileage driven. * @param freeDistance * @param freeDistanceRatePeriod Rate period for free distance. * @param extraCostPerDistance - */ +*/ data class Mileage( @JsonProperty("FreeDistance") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt index ca5a04bd5..5993ace0d 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Pricing information of the stat date +* Pricing information of the stat date * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class Money( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt similarity index 80% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt index 38f7ad11c..e6188eb6f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. +* Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. * @param id Neighborhood id. * @param name Neighborhood name. - */ +*/ data class Neighborhood( // Neighborhood id. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt index 3d9cdfe50..8ddaf9f9e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param stayDate * @param baseRate - */ +*/ data class NightlyRates( @JsonProperty("StayDate") val stayDate: java.time.LocalDate? = null, diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt index 40acb6691..3a42d419a 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * Container for non-cancellable date and time range element +* Container for non-cancellable date and time range element * @param startDateTime The time of this non-cancellable window starts * @param endDateTime The time of this non-cancellable window ends - */ +*/ data class NonCancellableDateTimeRange( // The time of this non-cancellable window starts @JsonProperty("StartDateTime") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt index 80f7c2bd6..d91795002 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * +* * @param startDate Start date of a non-refundable date range. * @param endDate End date of a non-refundable date range. - */ +*/ data class NonRefundableDateRange( // Start date of a non-refundable date range. @JsonProperty("StartDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt index 37b9ba019..b584ec378 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for the list of room occupants. +* Container for the list of room occupants. * @param adults The number of adults in a room. * @param childAges The ages of children in a room. - */ +*/ data class Occupant( // The number of adults in a room. @JsonProperty("Adults") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt index eb1e00553..f93e8d44b 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesLink import com.expediagroup.sdk.xap.models.ActivitiesPrice import com.expediagroup.sdk.xap.models.AvailableTimeSlot @@ -41,7 +26,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Offers for the activity. +* Offers for the activity. * @param id The numerical identifier for the offer. * @param title A descriptive title for this offer. * @param duration The anticipated time duration for the activity, e xpressed using Java JDK duration format. @@ -49,7 +34,7 @@ import javax.validation.constraints.NotNull * @param offerPrice * @param description Description of this offer. * @param links Container of HATEOAS URL's - */ +*/ data class Offer( // The numerical identifier for the offer. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt index 025044cdd..1d9e08797 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.PaymentSchedulePrice import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * Contains information on the payment schedule. +* Contains information on the payment schedule. * @param due Date/Time stamp when this installment/deposit should be paid by. * @param price - */ +*/ data class PaymentSchedule( // Date/Time stamp when this installment/deposit should be paid by. @JsonProperty("Due") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt index 84106a19e..a2fd05be0 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class PaymentSchedulePrice( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt index 19c7a22ce..d7af587ad 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.PenaltyType import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,11 +24,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for penalty rules +* Container for penalty rules * @param penalty * @param startDateTime The time when this penalty window starts * @param endDateTime The time when this penalty window ends - */ +*/ data class PenaltyRule( @JsonProperty("Penalty") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt index 5896c61fc..9e0c52065 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,11 +23,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for no show penalty element +* Container for no show penalty element * @param type What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a penalty. * @param currency The currency of the amount, only valid when Type=AMOUNT - */ +*/ data class PenaltyType( // What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt index 34966455d..75ff08ed2 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt @@ -13,36 +13,21 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param countryCode The designated country calling code. * @param areaCode The phone's area code. * @param number The phone's local number. * @param extensionNumber Optional extension number, if required to reach the hotel. - */ +*/ data class Phone( // The designated country calling code. @JsonProperty("CountryCode") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt index 7b09f4df8..78c6381e6 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Fault import com.expediagroup.sdk.xap.models.FileInfo import com.fasterxml.jackson.annotation.JsonProperty @@ -39,13 +24,13 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param transactionId Unique identifier for each API response. * @param error * @param warning * @param bestMatchedFile * @param otherFileOptions Container for file Pre-signed download URL and informations. - */ +*/ data class PresignedUrlResponse( // Unique identifier for each API response. @JsonProperty("transactionId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt index a756e2b3a..05a56aa45 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,13 +24,13 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Pricing information for the rental. +* Pricing information for the rental. * @param totalPrice * @param ratePeriodUnitPrice * @param basePrice * @param taxesAndFees * @param totalPriceDueAtBooking - */ +*/ data class Price( @JsonProperty("TotalPrice") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt index 0939d422c..5345758ab 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.PromotionAmount import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param description The description of the promotion. * @param amount - */ +*/ data class Promotion( // The description of the promotion. @JsonProperty("Description") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt index 58152aba5..c0b3f9d8e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class PromotionAmount( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt index b5f444a48..f9a345a74 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingRoomType import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for information on each offered hotel. +* Container for information on each offered hotel. * @param id The unique property identifier used to designate a single property. * @param status Represents whether the offer is currently available. * @param roomTypes Container for all of available room types. - */ +*/ data class Property( // The unique property identifier used to designate a single property. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt index 9d3c6b357..4c8d75231 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.PropertyManager import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,7 +23,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for information about the hotel property detail. It will be shown for Vacation Rental hotel only. +* Container for information about the hotel property detail. It will be shown for Vacation Rental hotel only. * @param propertyRegistryNumber The registry number of property. * @param hostLanguages The languages the host of property will speak. * @param maxOccupancy The maximum number of guests allowed to stay in the property. @@ -46,7 +31,7 @@ import javax.validation.Validation * @param numberOfBathrooms The number of bathrooms in the property. * @param squareFeet Property area in square feet. * @param propertyManager - */ +*/ data class PropertyDetails( // The registry number of property. @JsonProperty("PropertyRegistryNumber") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt index 7ea7695e4..0888282ac 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for information about the property manager. It will be shown for Vacation Rental hotel only. +* Container for information about the property manager. It will be shown for Vacation Rental hotel only. * @param name The name of the property manager. * @param calendarLastUpdated The latest updated date. * @param photoUrl The URL for property manager's photo. - */ +*/ data class PropertyManager( // The name of the property manager. @JsonProperty("Name") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt index 6d569d02b..6257d8428 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.RateCalendarPrice import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,12 +23,12 @@ import javax.validation.Valid import javax.validation.Validation /** - * The lowest rate information of requested days +* The lowest rate information of requested days * @param stayDate Stay date for which the price is returned. * @param price * @param priceLevel Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile * @param status Represents whether the offer is currently available. - */ +*/ data class RateCalendar( // Stay date for which the price is returned. @JsonProperty("StayDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt index 6b55c8a57..9f12f0595 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The total price of the corresponding date. * @param currency The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. * @param localCurrencyPrice - */ +*/ data class RateCalendarPrice( // The total price of the corresponding date. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt index 978111dab..8549fc41f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.HotelRateCalendar import com.expediagroup.sdk.xap.models.Warning import com.fasterxml.jackson.annotation.JsonProperty @@ -39,11 +24,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. * @param transactionId Unique identifier for the transaction. * @param rateCalendars Container for all hotel rate calendar data. - */ +*/ data class RateCalendarResponse( // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. @JsonProperty("Warnings") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt similarity index 92% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt index efca8821d..9512a7fa8 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Discount import com.expediagroup.sdk.xap.models.Mileage import com.fasterxml.jackson.annotation.JsonProperty @@ -40,7 +25,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The rate detail information for a car offer. +* The rate detail information for a car offer. * @param ratePeriod Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend * @param prePay Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). * @param rateCode Rate plan identifier. @@ -48,7 +33,7 @@ import javax.validation.constraints.NotNull * @param discounts List of discount information. * @param mileages A list of charges to be levied based on the mileage driven. * @param mobileRate Indicates whether car offer is mobile rate. - */ +*/ data class RateDetails( // Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend @JsonProperty("RatePeriod") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt similarity index 98% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt index f644328f8..587d90622 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CancellationPolicy import com.expediagroup.sdk.xap.models.PaymentSchedule import com.expediagroup.sdk.xap.models.Promotion @@ -44,7 +29,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for information on each rate plan. +* Container for information on each rate plan. * @param roomTypeId The room type identifier. * @param ratePlanId The rate plan identifier. * @param rateRuleId The identifier of rate rule. @@ -73,7 +58,7 @@ import javax.validation.Validation * @param hcomRewardsBurn Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) * @param cancellationPolicy * @param amenities The amenities of the `rateplan`. - */ +*/ data class RatePlan( // The room type identifier. @JsonProperty("RoomTypeId") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt index e573e018d..ff87f2ace 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param id Amenity ID. * @param name Amenity Name. - */ +*/ data class RatePlanAmenitiesInner( // Amenity ID. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt similarity index 54% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt index e50b26b92..35491b951 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt @@ -13,79 +13,65 @@ * 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.expediagroup.sdk.xap.models.RatePlanPriceAvgNightlyRate -import com.expediagroup.sdk.xap.models.RatePlanPriceAvgNightlyStrikeOutRate -import com.expediagroup.sdk.xap.models.RatePlanPriceBaseRate -import com.expediagroup.sdk.xap.models.RatePlanPriceHotelMandatoryFees +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.xap.models.Money import com.expediagroup.sdk.xap.models.RatePlanPriceNightlyRatesInner -import com.expediagroup.sdk.xap.models.RatePlanPriceRefundableDamageDeposit -import com.expediagroup.sdk.xap.models.RatePlanPriceRoomRatesInner -import com.expediagroup.sdk.xap.models.RatePlanPriceTaxesAndFees import com.expediagroup.sdk.xap.models.RatePlanPriceTaxesAndFeesDetailsInner -import com.expediagroup.sdk.xap.models.RatePlanPriceTotalPrice -import com.expediagroup.sdk.xap.models.RatePlanPriceTotalStrikeOutPrice +import com.expediagroup.sdk.xap.models.RoomRates import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for all price components of the rate plan. - * @param baseRate - * @param taxesAndFees - * @param totalPrice - * @param totalStrikeOutPrice - * @param avgNightlyRate - * @param avgNightlyStrikeOutRate - * @param hotelMandatoryFees - * @param refundableDamageDeposit +* Container for all price components of the rate plan. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. + * @param totalStrikeOutPrice The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. + * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. + * @param refundableDamageDeposit The refundable damage deposit. * @param nightlyRates Nightly base rate of the rate plan. * @param taxesAndFeesDetails Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. * @param roomRates Container for the rate information of all rooms. This is only returned in Lodging Details API. - */ +*/ data class RatePlanPrice( + // The price of the rate plan for all occupants, excluding taxes and fees. @JsonProperty("BaseRate") @field:Valid - val baseRate: RatePlanPriceBaseRate? = null, + val baseRate: Money? = null, + // The total rate of taxes and fees of the rate plan for all occupants. @JsonProperty("TaxesAndFees") @field:Valid - val taxesAndFees: RatePlanPriceTaxesAndFees? = null, + val taxesAndFees: Money? = null, + // The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. @JsonProperty("TotalPrice") @field:Valid - val totalPrice: RatePlanPriceTotalPrice? = null, + val totalPrice: Money? = null, + // The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. @JsonProperty("TotalStrikeOutPrice") @field:Valid - val totalStrikeOutPrice: RatePlanPriceTotalStrikeOutPrice? = null, + val totalStrikeOutPrice: Money? = null, + // The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. @JsonProperty("AvgNightlyRate") @field:Valid - val avgNightlyRate: RatePlanPriceAvgNightlyRate? = null, + val avgNightlyRate: Money? = null, + // The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. @JsonProperty("AvgNightlyStrikeOutRate") @field:Valid - val avgNightlyStrikeOutRate: RatePlanPriceAvgNightlyStrikeOutRate? = null, + val avgNightlyStrikeOutRate: Money? = null, + // The total mandatory fees which will be charged at the hotel for the rate plan. @JsonProperty("HotelMandatoryFees") @field:Valid - val hotelMandatoryFees: RatePlanPriceHotelMandatoryFees? = null, + val hotelMandatoryFees: Money? = null, + // The refundable damage deposit. @JsonProperty("RefundableDamageDeposit") @field:Valid - val refundableDamageDeposit: RatePlanPriceRefundableDamageDeposit? = null, + val refundableDamageDeposit: Money? = null, // Nightly base rate of the rate plan. @JsonProperty("NightlyRates") @field:Valid @@ -97,7 +83,7 @@ data class RatePlanPrice( // Container for the rate information of all rooms. This is only returned in Lodging Details API. @JsonProperty("RoomRates") @field:Valid - val roomRates: kotlin.collections.List? = null + val roomRates: kotlin.collections.List? = null ) { companion object { @JvmStatic @@ -105,39 +91,39 @@ data class RatePlanPrice( } class Builder( - private var baseRate: RatePlanPriceBaseRate? = null, - private var taxesAndFees: RatePlanPriceTaxesAndFees? = null, - private var totalPrice: RatePlanPriceTotalPrice? = null, - private var totalStrikeOutPrice: RatePlanPriceTotalStrikeOutPrice? = null, - private var avgNightlyRate: RatePlanPriceAvgNightlyRate? = null, - private var avgNightlyStrikeOutRate: RatePlanPriceAvgNightlyStrikeOutRate? = null, - private var hotelMandatoryFees: RatePlanPriceHotelMandatoryFees? = null, - private var refundableDamageDeposit: RatePlanPriceRefundableDamageDeposit? = null, + private var baseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var refundableDamageDeposit: Money? = null, private var nightlyRates: kotlin.collections.List? = null, private var taxesAndFeesDetails: kotlin.collections.List? = null, - private var roomRates: kotlin.collections.List? = null + private var roomRates: kotlin.collections.List? = null ) { - fun baseRate(baseRate: RatePlanPriceBaseRate?) = apply { this.baseRate = baseRate } + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - fun taxesAndFees(taxesAndFees: RatePlanPriceTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - fun totalPrice(totalPrice: RatePlanPriceTotalPrice?) = apply { this.totalPrice = totalPrice } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - fun totalStrikeOutPrice(totalStrikeOutPrice: RatePlanPriceTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - fun avgNightlyRate(avgNightlyRate: RatePlanPriceAvgNightlyRate?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: RatePlanPriceAvgNightlyStrikeOutRate?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - fun hotelMandatoryFees(hotelMandatoryFees: RatePlanPriceHotelMandatoryFees?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - fun refundableDamageDeposit(refundableDamageDeposit: RatePlanPriceRefundableDamageDeposit?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } + fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - fun roomRates(roomRates: kotlin.collections.List?) = apply { this.roomRates = roomRates } + fun roomRates(roomRates: kotlin.collections.List?) = apply { this.roomRates = roomRates } fun build(): RatePlanPrice { val instance = diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt index 2149da0c4..63eeca4f8 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param stayDate A single night during the requested stay. * @param baseRate Container for nightly base rate. - */ +*/ data class RatePlanPriceNightlyRatesInner( // A single night during the requested stay. @JsonProperty("StayDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt index 39cdae6df..5edc4be41 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param categoryCode Category ID of this specific tax or fee. * @param amount The value of this specific tax or fee. - */ +*/ data class RatePlanPriceTaxesAndFeesDetailsInner( // Category ID of this specific tax or fee. @JsonProperty("CategoryCode") diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt new file mode 100644 index 000000000..f787c3d91 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt @@ -0,0 +1,169 @@ +/* + * 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. + */ +package com.expediagroup.sdk.xap.models + +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.xap.models.Money +import com.fasterxml.jackson.annotation.JsonProperty +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator +import javax.validation.Valid +import javax.validation.Validation + +/** +* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when the returned `rateplan` is being used as part of a package. + * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. + * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. + * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. + * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. + * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total standalone mandatory fees. + * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. +*/ +data class RatePlanStandalonePrice( + // The standalone price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + @field:Valid + val baseRate: Money? = null, + // The base rate strikeout in the standalone shopping path. + @JsonProperty("StrikeOutBaseRate") + @field:Valid + val strikeOutBaseRate: Money? = null, + // The total standalone rate of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + @field:Valid + val taxesAndFees: Money? = null, + // The taxes and fees strikeout in the standalone shopping path. + @JsonProperty("StrikeOutTaxesAndFees") + @field:Valid + val strikeOutTaxesAndFees: Money? = null, + // The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + @JsonProperty("TotalPrice") + @field:Valid + val totalPrice: Money? = null, + // The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + @JsonProperty("TotalStrikeOutPrice") + @field:Valid + val totalStrikeOutPrice: Money? = null, + // The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + @field:Valid + val avgNightlyRate: Money? = null, + // The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyStrikeOutRate") + @field:Valid + val avgNightlyStrikeOutRate: Money? = null, + // The total standalone mandatory fees. + @JsonProperty("HotelMandatoryFees") + @field:Valid + val hotelMandatoryFees: Money? = null, + // The strikeout of the mandatory fees in the standalone shopping path. + @JsonProperty("StrikeOutHotelMandatoryFees") + @field:Valid + val strikeOutHotelMandatoryFees: Money? = null +) { + companion object { + @JvmStatic + fun builder() = Builder() + } + + class Builder( + private var baseRate: Money? = null, + private var strikeOutBaseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var strikeOutTaxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var strikeOutHotelMandatoryFees: Money? = null + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + + fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } + + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + + fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } + + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + + fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } + + fun build(): RatePlanStandalonePrice { + val instance = + RatePlanStandalonePrice( + baseRate = baseRate, + strikeOutBaseRate = strikeOutBaseRate, + taxesAndFees = taxesAndFees, + strikeOutTaxesAndFees = strikeOutTaxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees + ) + + validate(instance) + + return instance + } + + private fun validate(instance: RatePlanStandalonePrice) { + 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( + baseRate = baseRate, + strikeOutBaseRate = strikeOutBaseRate, + taxesAndFees = taxesAndFees, + strikeOutTaxesAndFees = strikeOutTaxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees + ) +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt index 561c4766b..ad33e13a4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.RatingDetails import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,11 +24,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The rating of the car being offered. +* The rating of the car being offered. * @param ratingPercentage The percentage of rating. * @param ratingCount The total count of rating. * @param ratingDetails List of all the details of rating. - */ +*/ data class Rating( // The percentage of rating. @JsonProperty("RatingPercentage") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt index 28e075cb8..c163d12c6 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of all the details of rating. +* List of all the details of rating. * @param category The category of rating detail. * @param percentage The percentage of rating detail category. - */ +*/ data class RatingDetails( // The category of rating detail. @JsonProperty("Category") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt index 184f6d22a..db2ebf10c 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The rating of the car being offered. +* The rating of the car being offered. * @param ratingPercentage The percentage of rating. * @param ratingCount The total count of rating. - */ +*/ data class RatingWithoutDetails( // The percentage of rating. @JsonProperty("RatingPercentage") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt index 32a02d013..84a6dabd8 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesLocation import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container of redemption information. +* Container of redemption information. * @param type The type of redemption process associated to the activity. * @param redemptionLocations List of redemption locations where the activity will take place, please refer to Location Section below. - */ +*/ data class Redemption( // The type of redemption process associated to the activity. @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt index 8657fc46b..a7825136c 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesMoney import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,11 +24,11 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container for the reference price used for strike out display. +* Container for the reference price used for strike out display. * @param totalRate * @param totalFees * @param totalTaxesAndFees - */ +*/ data class ReferencePrice( @JsonProperty("TotalRate") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt index 2764c1589..da2313dc9 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Duration import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,10 +24,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Limitations that are part of this rental agreement. +* Limitations that are part of this rental agreement. * @param minDuration * @param maxDuration - */ +*/ data class RentalLimits( @JsonProperty("MinDuration") @field:NotNull diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt index e442400b4..8ec6edae8 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,12 +23,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container of the Restrictions associated to this ticket. +* Container of the Restrictions associated to this ticket. * @param type Type of the Restriction. * @param max Maximum value allowed for the restriction type. * @param min Minimum value allowed for the restriction type. * @param description The text to describe the restriction. - */ +*/ data class Restrictions( // Type of the Restriction. @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt similarity index 50% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt index 3b86043e9..be4540479 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt @@ -1,18 +1,3 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.models data class Room( diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt index 784bbeea1..2e35a4285 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.AgeClassRestriction import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,13 +23,13 @@ import javax.validation.Valid import javax.validation.Validation /** - * Room occupancy policy. +* Room occupancy policy. * @param maxGuestCount The maximum number of guests allowed to stay in a room. * @param minCheckInAge The minimum age required for check-in. * @param includedGuestCount The number of guests included in base rate. * @param minGuestAge The minimum age required for any guest staying in the room. * @param ageClassRestrictions Container for room occupancy rules based on the age of the guests. - */ +*/ data class RoomOccupancyPolicy( // The maximum number of guests allowed to stay in a room. @JsonProperty("MaxGuestCount") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt index 1ff685628..e7a8ade3b 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for room preferences. +* Container for room preferences. * @param type The type of preference. Options are: SmokingPreference Bed * @param `value` The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. - */ +*/ data class RoomPreference( // The type of preference. Options are: SmokingPreference Bed @JsonProperty("Type") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt similarity index 94% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt index 4c7b21ab3..ec630e9a4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.MandatoryFeesDetail import com.expediagroup.sdk.xap.models.RoomRatesBaseRate import com.expediagroup.sdk.xap.models.RoomRatesNightlyRatesInner @@ -44,7 +29,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param roomIndex Index of which of the requested rooms this entry refers to. * @param baseRate * @param taxesAndFees @@ -53,7 +38,7 @@ import javax.validation.Validation * @param taxesAndFeesDetails The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. * @param mandatoryFeesDetails The breakdown for the taxes and fees that must be paid at the property. * @param nightlyRates Container for the nightly rate of current room. - */ +*/ data class RoomRates( // Index of which of the requested rooms this entry refers to. @JsonProperty("RoomIndex") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt index d394ff996..f25a57b66 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class RoomRatesBaseRate( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt index 343dd3abc..1a8c5d714 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param stayDate One date of the property stay * @param baseRate Nightly Base Rate for the selected date of stay. - */ +*/ data class RoomRatesNightlyRatesInner( // One date of the property stay @JsonProperty("StayDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt index c954065d2..56b1fe471 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class RoomRatesTaxesAndFees( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt index e7f4b0ae5..c2ad40fae 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param categoryCode Tax or fee category code. * @param amount Tax or fee value. - */ +*/ data class RoomRatesTaxesAndFeesDetailsInner( // Tax or fee category code. @JsonProperty("CategoryCode") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt index 1505b956c..43dd2d2c4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class RoomRatesTotalPrice( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt index 536d30cbd..6e58135da 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,11 +23,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param `value` The value of the element being defined. * @param currency The ISO 4217 Currency Code that the value is expressed in. * @param localCurrencyPrice - */ +*/ data class RoomRatesTotalStrikeOutPrice( // The value of the element being defined. @JsonProperty("Value") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt similarity index 97% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt index 5b42f0176..bd48bf7e3 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.BedType import com.expediagroup.sdk.xap.models.Promotion import com.expediagroup.sdk.xap.models.RatePlan @@ -46,7 +31,7 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param description Text description of the room type. * @param roomKey An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. * @param offerId An encrypted string which includes the information that could be used to address the current room type. @@ -63,7 +48,7 @@ import javax.validation.Validation * @param amenities Container for all room amenities. * @param descriptiveAmenities Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY * @param media Container for Media elements. - */ +*/ data class RoomType( // Text description of the room type. @JsonProperty("Description") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt index 7e419fa50..3579dfb8f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param id Amenity id * @param name Amenity name - */ +*/ data class RoomTypeAmenitiesInner( // Amenity id @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt similarity index 81% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt index 20e424b4b..b42480f0c 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.HotelLinksWebSearchResult import com.expediagroup.sdk.xap.models.Link import com.expediagroup.sdk.xap.models.RoomTypeLinksApiDetails @@ -41,11 +26,11 @@ import javax.validation.Valid import javax.validation.Validation /** - * Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the `links` parameter in the Search API query. Available links are: - WebSearchResult (link to web search result page) - WebDetails (link to web infosite) - ApiDetails (link for details API) +* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the `links` parameter in the Search API query. Available links are: - WebSearchResult (link to web search result page) - WebDetails (link to web infosite) - ApiDetails (link for details API) * @param webSearchResult * @param webDetails * @param apiDetails - */ +*/ data class RoomTypeLinks( @JsonProperty("WebSearchResult") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt index 510b729bc..8b9bcc69b 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param accept The Accept request header (for API queries only - not included for page URLs). * @param method Method of request. * @param href The URL of the destination web page or API query. - */ +*/ data class RoomTypeLinksApiDetails( // The Accept request header (for API queries only - not included for page URLs). @JsonProperty("Accept") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt index 90367647f..54893b7a0 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt @@ -13,35 +13,20 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param accept The Accept request header (for API queries only - not included for page URLs). * @param method Method of request. * @param href The URL of the destination web page or API query. - */ +*/ data class RoomTypeLinksWebDetails( // The Accept request header (for API queries only - not included for page URLs). @JsonProperty("Accept") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt index c70093121..9bf539f98 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt @@ -13,36 +13,21 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param type Supported type of media. 1=Image. Only 1 is supported now. * @param title Image title * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). * @param url Image URL - */ +*/ data class RoomTypeMediaInner( // Supported type of media. 1=Image. Only 1 is supported now. @JsonProperty("Type") diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt new file mode 100644 index 000000000..a7326d9cd --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt @@ -0,0 +1,179 @@ +/* + * 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. + */ +package com.expediagroup.sdk.xap.models + +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.xap.models.Money +import com.fasterxml.jackson.annotation.JsonProperty +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator +import javax.validation.Valid +import javax.validation.Validation + +/** +* Container of all price components of the room. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. + * @param avgNightlyRate The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + * @param avgNightlyStrikeoutRateWithFees The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. + * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. + * @param totalPriceWithHotelFees The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + * @param refundableDamageDeposit The refundable damage deposit for the rate plan. +*/ +data class RoomTypePrice( + // The price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + @field:Valid + val baseRate: Money? = null, + // The total rate of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + @field:Valid + val taxesAndFees: Money? = null, + // The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + @JsonProperty("TotalPrice") + @field:Valid + val totalPrice: Money? = null, + // The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. + @JsonProperty("TotalStrikeOutPrice") + @field:Valid + val totalStrikeOutPrice: Money? = null, + // The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + @field:Valid + val avgNightlyRate: Money? = null, + // The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyStrikeOutRate") + @field:Valid + val avgNightlyStrikeOutRate: Money? = null, + // The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + @JsonProperty("AvgNightlyRateWithFees") + @field:Valid + val avgNightlyRateWithFees: Money? = null, + // The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. + @JsonProperty("AvgNightlyStrikeoutRateWithFees") + @field:Valid + val avgNightlyStrikeoutRateWithFees: Money? = null, + // The total mandatory fees which will be charged at the hotel for the rate plan. + @JsonProperty("HotelMandatoryFees") + @field:Valid + val hotelMandatoryFees: Money? = null, + // The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + @JsonProperty("TotalPriceWithHotelFees") + @field:Valid + val totalPriceWithHotelFees: Money? = null, + // The refundable damage deposit for the rate plan. + @JsonProperty("RefundableDamageDeposit") + @field:Valid + val refundableDamageDeposit: Money? = null +) { + companion object { + @JvmStatic + fun builder() = Builder() + } + + class Builder( + private var baseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var avgNightlyRateWithFees: Money? = null, + private var avgNightlyStrikeoutRateWithFees: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var totalPriceWithHotelFees: Money? = null, + private var refundableDamageDeposit: Money? = null + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + + fun avgNightlyRateWithFees(avgNightlyRateWithFees: Money?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } + + fun avgNightlyStrikeoutRateWithFees(avgNightlyStrikeoutRateWithFees: Money?) = apply { this.avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees } + + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + + fun totalPriceWithHotelFees(totalPriceWithHotelFees: Money?) = apply { this.totalPriceWithHotelFees = totalPriceWithHotelFees } + + fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } + + fun build(): RoomTypePrice { + val instance = + RoomTypePrice( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + avgNightlyRateWithFees = avgNightlyRateWithFees, + avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, + hotelMandatoryFees = hotelMandatoryFees, + totalPriceWithHotelFees = totalPriceWithHotelFees, + refundableDamageDeposit = refundableDamageDeposit + ) + + validate(instance) + + return instance + } + + private fun validate(instance: RoomTypePrice) { + 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( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + avgNightlyRateWithFees = avgNightlyRateWithFees, + avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, + hotelMandatoryFees = hotelMandatoryFees, + totalPriceWithHotelFees = totalPriceWithHotelFees, + refundableDamageDeposit = refundableDamageDeposit + ) +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt new file mode 100644 index 000000000..a23ee2774 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt @@ -0,0 +1,169 @@ +/* + * 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. + */ +package com.expediagroup.sdk.xap.models + +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.xap.models.Money +import com.fasterxml.jackson.annotation.JsonProperty +import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator +import javax.validation.Valid +import javax.validation.Validation + +/** +* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when this is a package rate plan. + * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. + * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. + * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. + * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. + * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total standalone mandatory fees. + * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. +*/ +data class RoomTypeStandalonePrice( + // The standalone price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + @field:Valid + val baseRate: Money? = null, + // The base rate strikeout in the standalone shopping path. + @JsonProperty("StrikeOutBaseRate") + @field:Valid + val strikeOutBaseRate: Money? = null, + // The total standalone rate of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + @field:Valid + val taxesAndFees: Money? = null, + // The taxes and fees strikeout in the standalone shopping path. + @JsonProperty("StrikeOutTaxesAndFees") + @field:Valid + val strikeOutTaxesAndFees: Money? = null, + // The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + @JsonProperty("TotalPrice") + @field:Valid + val totalPrice: Money? = null, + // The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + @JsonProperty("TotalStrikeOutPrice") + @field:Valid + val totalStrikeOutPrice: Money? = null, + // The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + @field:Valid + val avgNightlyRate: Money? = null, + // The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyStrikeOutRate") + @field:Valid + val avgNightlyStrikeOutRate: Money? = null, + // The total standalone mandatory fees. + @JsonProperty("HotelMandatoryFees") + @field:Valid + val hotelMandatoryFees: Money? = null, + // The strikeout of the mandatory fees in the standalone shopping path. + @JsonProperty("StrikeOutHotelMandatoryFees") + @field:Valid + val strikeOutHotelMandatoryFees: Money? = null +) { + companion object { + @JvmStatic + fun builder() = Builder() + } + + class Builder( + private var baseRate: Money? = null, + private var strikeOutBaseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var strikeOutTaxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var strikeOutHotelMandatoryFees: Money? = null + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + + fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } + + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + + fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } + + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + + fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } + + fun build(): RoomTypeStandalonePrice { + val instance = + RoomTypeStandalonePrice( + baseRate = baseRate, + strikeOutBaseRate = strikeOutBaseRate, + taxesAndFees = taxesAndFees, + strikeOutTaxesAndFees = strikeOutTaxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees + ) + + validate(instance) + + return instance + } + + private fun validate(instance: RoomTypeStandalonePrice) { + 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( + baseRate = baseRate, + strikeOutBaseRate = strikeOutBaseRate, + taxesAndFees = taxesAndFees, + strikeOutTaxesAndFees = strikeOutTaxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees + ) +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt index 9282cb674..5b8a21c73 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesMoney import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,10 +24,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Container of savings information. +* Container of savings information. * @param percentage The percentage of the price that has been discounted off the regular price for the current activity. * @param amount - */ +*/ data class Savings( // The percentage of the price that has been discounted off the regular price for the current activity. @JsonProperty("Percentage") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt similarity index 84% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt index f38340930..b131ccf96 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Error from the APIM. +* Error from the APIM. * @param message Error from the APIM. - */ +*/ data class SdpAPIMError( // Error from the APIM. @JsonProperty("message") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt similarity index 84% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt index ff2c3747a..d9888ede5 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Contains link information, including link address, request method. Only provided if FileInfo is in OtherFileOptions. +* Contains link information, including link address, request method. Only provided if FileInfo is in OtherFileOptions. * @param href a link address. * @param method Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... - */ +*/ data class SdpLink( // a link address. @JsonProperty("href") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt index c999f33de..a700c35a4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Validation /** - * Container for information for the stay dates of the rate plan. +* Container for information for the stay dates of the rate plan. * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - */ +*/ data class StayDates( // The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. @JsonProperty("CheckInDate") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt similarity index 88% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt index 74f9bba8e..e1de3af7c 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,12 +23,12 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The supplier of the car being offered. +* The supplier of the car being offered. * @param id Supplier ID. * @param name Supplier Name. * @param code Supplier Code. * @param logoImageUrl Supplier Logo Image Url. - */ +*/ data class Supplier( // Supplier ID. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt index 37d1118a7..78376f621 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -39,10 +24,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * List of TaxesAndFees Details +* List of TaxesAndFees Details * @param description TaxesAndFees description * @param amount - */ +*/ data class TaxesAndFees( // TaxesAndFees description @JsonProperty("Description") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt index e1b99baf7..53b17bd9c 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,10 +23,10 @@ import javax.validation.Valid import javax.validation.Validation /** - * +* * @param categoryCode * @param amount - */ +*/ data class TaxesAndFeesDetail( @JsonProperty("CategoryCode") @field:Valid diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt index 741c82f28..7f42222ca 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesPrice import com.expediagroup.sdk.xap.models.Restrictions import com.fasterxml.jackson.annotation.JsonProperty @@ -40,13 +25,13 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * The list of Ticket information. +* The list of Ticket information. * @param id The numerical identifier for the ticket. * @param code The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student * @param count The number of each ticket type to be booked. * @param ticketPrice * @param restrictions - */ +*/ data class Ticket( // The numerical identifier for the ticket. @JsonProperty("Id") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt similarity index 86% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt index 9366c8573..72864d263 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * A list of time range to indicate the operation hours of the date range. +* A list of time range to indicate the operation hours of the date range. * @param startTime Start time at pickup location of the date range. * @param endTime End time at pickup location of the date range. - */ +*/ data class TimeRange( // Start time at pickup location of the date range. @JsonProperty("StartTime") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt similarity index 83% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt index 1fc2fa112..ac63f192e 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid @@ -38,10 +23,10 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Car transmission and drive. Please find list of Car Transmission Drive Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005380028 +* Car transmission and drive. Please find list of Car Transmission Drive Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005380028 * @param code Car transmission and drive code. * @param `value` Car transmission and drive value. - */ +*/ data class TransmissionDrive( // Car transmission and drive code. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt index 6310bb6fb..5329b80d4 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt @@ -13,36 +13,21 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Container for hotel supported payment information. +* Container for hotel supported payment information. * @param paymentMethod The payment method. * @param name The brand name of the payment sub-method to be displayed to the customer. * @param paymentSubMethod The payment sub-method. * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. - */ +*/ data class ValidFormsOfPayment( // The payment method. @JsonProperty("PaymentMethod") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt similarity index 93% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt index 8c3675c28..fbd93a030 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Capacity import com.expediagroup.sdk.xap.models.CarCategory import com.expediagroup.sdk.xap.models.CarType @@ -43,7 +28,7 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Specific information for a car. +* Specific information for a car. * @param carClass Car category and type. * @param carCategory * @param carType @@ -54,7 +39,7 @@ import javax.validation.constraints.NotNull * @param maxDoors Maximal car door count. * @param fuelLevel Car fuel information. * @param capacity - */ +*/ data class VehicleDetails( // Car category and type. @JsonProperty("CarClass") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt similarity index 91% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt index 2a05c1f50..97f76144f 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.CarsLocation import com.expediagroup.sdk.xap.models.DateTimePeriod @@ -41,13 +26,13 @@ import javax.validation.Validation import javax.validation.constraints.NotNull /** - * Drop off information +* Drop off information * @param dateTime Pickup date and time. * @param location * @param shuttleCategory The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. * @param distance * @param openSchedule A List of date time periods to indicate the vendor business hours for the pickup time. - */ +*/ data class VendorLocationDetails( // Pickup date and time. @JsonProperty("DateTime") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt similarity index 87% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt index 4d0bb5d15..611c894d8 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt @@ -13,33 +13,18 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * +* * @param waiverPolicyDescription The localized waiver policy description, which could be put in front of cancellation policy description. - */ +*/ data class WaiverPolicy( // The localized waiver policy description, which could be put in front of cancellation policy description. @JsonProperty("WaiverPolicyDescription") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt similarity index 89% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt index 86b7d77b1..859ce42ed 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt @@ -13,24 +13,9 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator @@ -38,14 +23,14 @@ import javax.validation.Valid import javax.validation.Validation /** - * There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. +* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. * @param code The code of a warning. * @param description A detail information of what happened. * @param originalPrice * @param newPrice * @param changedAmount * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - */ +*/ data class Warning( // The code of a warning. @JsonProperty("Code") diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt similarity index 90% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt index f1a5224c1..59112e4f9 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt @@ -13,34 +13,19 @@ * 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.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.fasterxml.jackson.annotation.JsonProperty import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation /** - * Indicate when to pay. +* Indicate when to pay. * @param type Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. * @param `value` This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. - */ +*/ data class When( // Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. @JsonProperty("Type") diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt new file mode 100644 index 000000000..4441276e3 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt @@ -0,0 +1,46 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.ActivityDetailsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * + * @property params [GetActivityDetailsOperationParams] + */ +class GetActivityDetailsOperation( + val params: GetActivityDetailsOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/activities/details/{offerToken}" + + url = + url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true + ) + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt similarity index 75% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt index 03f1b89b1..4d28dac63 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt @@ -1,27 +1,12 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -43,7 +28,7 @@ data class GetActivityDetailsOperationParams( @field:Valid val locale: kotlin.String? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -108,22 +93,34 @@ data class GetActivityDetailsOperationParams( locale = locale ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-activity.v3+json") - } + add("Accept", "application/vnd.exp-activity.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { locale?.let { - append("locale", it) + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } } - override fun getPathParams(): Map = + fun getPathParams(): Map = buildMap { offerToken?.also { put("offerToken", offerToken) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt new file mode 100644 index 000000000..bf76b5b37 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt @@ -0,0 +1,39 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.ActivityListingsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * + * @property params [GetActivityListingsOperationParams] + */ +class GetActivityListingsOperation( + val params: GetActivityListingsOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/activities/listings" + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt similarity index 70% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt index 55bf59454..3f80ecac3 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt @@ -1,27 +1,12 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -60,7 +45,7 @@ data class GetActivityListingsOperationParams( GetActivityListingsOperationParams.Links >? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -170,37 +155,105 @@ data class GetActivityListingsOperationParams( links = links ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-activity.v3+json") - } + add("Accept", "application/vnd.exp-activity.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { location?.let { - append("location", it) + val key = "location" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } geoLocation?.let { - append("geoLocation", it) + val key = "geoLocation" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } startDate?.let { - append("startDate", it.toString()) + val key = "startDate" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } endDate?.let { - append("endDate", it.toString()) + val key = "endDate" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } locale?.let { - append("locale", it) + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } links?.let { - appendAll("links", toMultiValue(it.map { item -> item.value }, "csv")) - } - } + val key = "links" + val value = + buildList { + addAll(it.map { it.value }) + } - override fun getPathParams(): Map = - buildMap { + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) + } } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt new file mode 100644 index 000000000..3abaae8a8 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt @@ -0,0 +1,46 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.CarDetailsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get Extended information with a single car offer + * @property params [GetCarDetailsOperationParams] + */ +class GetCarDetailsOperation( + val params: GetCarDetailsOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/cars/details/{offerToken}" + + url = + url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true + ) + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt similarity index 68% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt index e7d897da3..4aa71e9e2 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt @@ -1,27 +1,12 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -51,7 +36,7 @@ data class GetCarDetailsOperationParams( @field:Valid val source: kotlin.String? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -132,28 +117,64 @@ data class GetCarDetailsOperationParams( source = source ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-car.v3+json,application/vnd.exp-car.v3+xml") - } + add("Accept", "application/vnd.exp-car.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { price?.let { - append("price", it) + val key = "price" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } currency?.let { - append("currency", it) + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } source?.let { - append("source", it) + val key = "source" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } } - override fun getPathParams(): Map = + fun getPathParams(): Map = buildMap { offerToken?.also { put("offerToken", offerToken) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt new file mode 100644 index 000000000..39238b3cf --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt @@ -0,0 +1,39 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.CarListingsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Search Expedia car inventory + * @property params [GetCarsListingsOperationParams] + */ +class GetCarsListingsOperation( + val params: GetCarsListingsOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/cars/listings" + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt similarity index 70% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt index e2d314963..e43c0e4aa 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt @@ -1,29 +1,13 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import java.time.temporal.ChronoUnit import javax.validation.Valid import javax.validation.Validation import javax.validation.constraints.NotNull @@ -148,7 +132,7 @@ data class GetCarsListingsOperationParams( null, val source: GetCarsListingsOperationParams.Source? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -486,100 +470,420 @@ data class GetCarsListingsOperationParams( source = source ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-car.v3+json,application/vnd.exp-car.v3+xml") - } + add("Accept", "application/vnd.exp-car.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { pickupAirport?.let { - append("pickup.airport", it) + val key = "pickup.airport" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } pickupCity?.let { - append("pickup.city", it) + val key = "pickup.city" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } pickupAddress?.let { - append("pickup.address", it) + val key = "pickup.address" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } pickupGeoLocation?.let { - append("pickup.geoLocation", it) + val key = "pickup.geoLocation" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } pickupRadius?.let { - append("pickup.radius", it.toString()) + val key = "pickup.radius" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } dropOffAirport?.let { - append("dropOff.airport", it) + val key = "dropOff.airport" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } dropOffCity?.let { - append("dropOff.city", it) + val key = "dropOff.city" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } dropOffAddress?.let { - append("dropOff.address", it) + val key = "dropOff.address" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } dropOffGeoLocation?.let { - append("dropOff.geoLocation", it) + val key = "dropOff.geoLocation" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } dropOffRadius?.let { - append("dropOff.radius", it.toString()) + val key = "dropOff.radius" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } pickupTime?.let { - append("pickupTime", it.truncatedTo(ChronoUnit.MINUTES).toString()) + val key = "pickupTime" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } dropOffTime?.let { - append("dropOffTime", it.truncatedTo(ChronoUnit.MINUTES).toString()) + val key = "dropOffTime" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } sortType?.let { - append("sortType", it.value) + val key = "sortType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } sortOrder?.let { - append("sortOrder", it.value) + val key = "sortOrder" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } limit?.let { - append("limit", it.toString()) + val key = "limit" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } suppliers?.let { - appendAll("suppliers", toMultiValue(it, "csv")) + val key = "suppliers" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } carClasses?.let { - appendAll("carClasses", toMultiValue(it, "csv")) + val key = "carClasses" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } discount1Supplier?.let { - append("discount1.supplier", it) + val key = "discount1.supplier" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } discount1Type?.let { - append("discount1.type", it.value) + val key = "discount1.type" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } discount1Code?.let { - append("discount1.code", it) + val key = "discount1.code" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } transmissions?.let { - appendAll("transmissions", toMultiValue(it, "csv")) + val key = "transmissions" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } airConditioning?.let { - append("airConditioning", it.toString()) + val key = "airConditioning" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } carTypes?.let { - appendAll("carTypes", toMultiValue(it, "csv")) + val key = "carTypes" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } unit?.let { - append("unit", it.value) + val key = "unit" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } driverAge?.let { - append("driverAge", it.toString()) + val key = "driverAge" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } links?.let { - appendAll("links", toMultiValue(it.map { item -> item.value }, "csv")) + val key = "links" + val value = + buildList { + addAll(it.map { it.value }) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } source?.let { - append("source", it.value) + val key = "source" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } } - - override fun getPathParams(): Map = - buildMap { - } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt new file mode 100644 index 000000000..7819855b7 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt @@ -0,0 +1,34 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.PresignedUrlResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * + * @property params [GetFeedDownloadUrlOperationParams] + */ +class GetFeedDownloadUrlOperation( + val params: GetFeedDownloadUrlOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/feed/v1/download-url" + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt similarity index 73% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt index 6d9b971a2..dc7d7e4c6 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt @@ -1,27 +1,11 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -47,7 +31,7 @@ data class GetFeedDownloadUrlOperationParams( null, val brand: GetFeedDownloadUrlOperationParams.Brand? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -182,31 +166,82 @@ data class GetFeedDownloadUrlOperationParams( brand = brand ) - override fun getHeaders(): Headers = - Headers.build { - append("Accept", "application/vnd.exp-lodging.v1+json") - } - - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { type?.let { - append("type", it.value) + val key = "type" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } locale?.let { - append("locale", it) + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } pointOfSupply?.let { - append("pointOfSupply", it.value) + val key = "pointOfSupply" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } lodgingType?.let { - append("lodgingType", it.value) + val key = "lodgingType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } brand?.let { - append("brand", it.value) + val key = "brand" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } } - - override fun getPathParams(): Map = - buildMap { - } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt new file mode 100644 index 000000000..f81075bd0 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt @@ -0,0 +1,39 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get availability calendars of properties + * @property params [GetLodgingAvailabilityCalendarsOperationParams] + */ +class GetLodgingAvailabilityCalendarsOperation( + val params: GetLodgingAvailabilityCalendarsOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/lodging/availabilityCalendars" + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt similarity index 74% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt index 08363b387..8a6b25d3a 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt @@ -1,27 +1,12 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -41,7 +26,7 @@ data class GetLodgingAvailabilityCalendarsOperationParams( kotlin.String >? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -104,22 +89,30 @@ data class GetLodgingAvailabilityCalendarsOperationParams( propertyIds = propertyIds ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-lodging.v3+json") - } + add("Accept", "application/vnd.exp-lodging.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { propertyIds?.let { - appendAll("propertyIds", toMultiValue(it, "csv")) - } - } + val key = "propertyIds" + val value = + buildList { + addAll(it) + } - override fun getPathParams(): Map = - buildMap { + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) + } } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt new file mode 100644 index 000000000..48bad9536 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt @@ -0,0 +1,46 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.HotelDetailsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get Extended information with a single property offer + * @property params [GetLodgingDetailsOperationParams] + */ +class GetLodgingDetailsOperation( + val params: GetLodgingDetailsOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/hotels/details/{offerToken}" + + url = + url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true + ) + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt similarity index 77% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt index 44403bb61..028776e69 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt @@ -1,27 +1,12 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -58,7 +43,7 @@ data class GetLodgingDetailsOperationParams( @field:Valid val groupedAmenities: kotlin.Boolean? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -165,34 +150,94 @@ data class GetLodgingDetailsOperationParams( groupedAmenities = groupedAmenities ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-hotel.v3+json") - } + add("Accept", "application/vnd.exp-hotel.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { price?.let { - append("price", it) + val key = "price" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } currency?.let { - append("currency", it) + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } locale?.let { - append("locale", it) + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } imageSizes?.let { - append("imageSizes", it.value) + val key = "imageSizes" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } groupedAmenities?.let { - append("groupedAmenities", it.toString()) + val key = "groupedAmenities" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } } - override fun getPathParams(): Map = + fun getPathParams(): Map = buildMap { offerToken?.also { put("offerToken", offerToken) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt new file mode 100644 index 000000000..5422f6c7b --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt @@ -0,0 +1,39 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.HotelListingsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Search lodging inventory + * @property params [GetLodgingListingsOperationParams] + */ +class GetLodgingListingsOperation( + val params: GetLodgingListingsOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/hotels/listings" + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt similarity index 74% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt index e8661f32f..89938d9fb 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt @@ -1,28 +1,13 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.expediagroup.sdk.xap.models.Room import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -253,7 +238,7 @@ data class GetLodgingListingsOperationParams( kotlin.String >? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -854,169 +839,765 @@ data class GetLodgingListingsOperationParams( room8ChildAges = room8ChildAges ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-hotel.v3+json") - } + add("Accept", "application/vnd.exp-hotel.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { ecomHotelIds?.let { - appendAll("ecomHotelIds", toMultiValue(it, "csv")) + val key = "ecomHotelIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } hcomHotelIds?.let { - appendAll("hcomHotelIds", toMultiValue(it, "csv")) + val key = "hcomHotelIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } geoLocation?.let { - append("geoLocation", it) + val key = "geoLocation" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } radius?.let { - append("radius", it.toString()) + val key = "radius" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } unit?.let { - append("unit", it.value) + val key = "unit" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } locationKeyword?.let { - append("locationKeyword", it) + val key = "locationKeyword" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } regionIds?.let { - appendAll("regionIds", toMultiValue(it, "csv")) + val key = "regionIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } checkIn?.let { - append("checkIn", it.toString()) + val key = "checkIn" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } checkOut?.let { - append("checkOut", it.toString()) + val key = "checkOut" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } locale?.let { - append("locale", it) + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } currency?.let { - append("currency", it) + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } source?.let { - append("source", it.value) + val key = "source" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } travelWithPets?.let { - append("travelWithPets", it.toString()) + val key = "travelWithPets" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } contentDetails?.let { - append("contentDetails", it.value) + val key = "contentDetails" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } allRoomTypes?.let { - append("allRoomTypes", it.toString()) + val key = "allRoomTypes" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } links?.let { - appendAll("links", toMultiValue(it.map { item -> item.value }, "csv")) + val key = "links" + val value = + buildList { + addAll(it.map { it.value }) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } minStarRating?.let { - append("minStarRating", it.value) + val key = "minStarRating" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } maxStarRating?.let { - append("maxStarRating", it.value) + val key = "maxStarRating" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } limit?.let { - append("limit", it.toString()) + val key = "limit" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } queryText?.let { - append("queryText", it) + val key = "queryText" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } availOnly?.let { - append("availOnly", it.toString()) + val key = "availOnly" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } smokingPreference?.let { - append("smokingPreference", it.value) + val key = "smokingPreference" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } rateType?.let { - append("rateType", it.value) + val key = "rateType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } imageSizes?.let { - append("imageSizes", it.value) + val key = "imageSizes" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } thumbnailImageSize?.let { - append("thumbnailImageSize", it.value) + val key = "thumbnailImageSize" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } includedPropertyTypeIds?.let { - appendAll("includedPropertyTypeIds", toMultiValue(it, "csv")) + val key = "includedPropertyTypeIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } excludedPropertyTypeIds?.let { - appendAll("excludedPropertyTypeIds", toMultiValue(it, "csv")) + val key = "excludedPropertyTypeIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } includedInventorySourceIds?.let { - appendAll("includedInventorySourceIds", toMultiValue(it, "csv")) + val key = "includedInventorySourceIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } freeCancellation?.let { - append("freeCancellation", it.toString()) + val key = "freeCancellation" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } groupedAmenities?.let { - append("groupedAmenities", it.toString()) + val key = "groupedAmenities" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } blockFullDepositRateplan?.let { - append("blockFullDepositRateplan", it.toString()) + val key = "blockFullDepositRateplan" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } ratePlanType?.let { - append("ratePlanType", it.value) + val key = "ratePlanType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } sortType?.let { - append("sortType", it.value) + val key = "sortType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } sortOrder?.let { - append("sortOrder", it.value) + val key = "sortOrder" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room1Adults?.let { - append("room1.adults", it.toString()) + val key = "room1.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room1ChildAges?.let { - appendAll("room1.childAges", toMultiValue(it, "csv")) + val key = "room1.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room2Adults?.let { - append("room2.adults", it.toString()) + val key = "room2.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room2ChildAges?.let { - appendAll("room2.childAges", toMultiValue(it, "csv")) + val key = "room2.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room3Adults?.let { - append("room3.adults", it.toString()) + val key = "room3.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room3ChildAges?.let { - appendAll("room3.childAges", toMultiValue(it, "csv")) + val key = "room3.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room4Adults?.let { - append("room4.adults", it.toString()) + val key = "room4.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room4ChildAges?.let { - appendAll("room4.childAges", toMultiValue(it, "csv")) + val key = "room4.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room5Adults?.let { - append("room5.adults", it.toString()) + val key = "room5.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room5ChildAges?.let { - appendAll("room5.childAges", toMultiValue(it, "csv")) + val key = "room5.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room6Adults?.let { - append("room6.adults", it.toString()) + val key = "room6.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room6ChildAges?.let { - appendAll("room6.childAges", toMultiValue(it, "csv")) + val key = "room6.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room7Adults?.let { - append("room7.adults", it.toString()) + val key = "room7.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room7ChildAges?.let { - appendAll("room7.childAges", toMultiValue(it, "csv")) + val key = "room7.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room8Adults?.let { - append("room8.adults", it.toString()) + val key = "room8.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room8ChildAges?.let { - appendAll("room8.childAges", toMultiValue(it, "csv")) + val key = "room8.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } } - - override fun getPathParams(): Map = - buildMap { - } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt new file mode 100644 index 000000000..ee92f9f39 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt @@ -0,0 +1,39 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.LodgingQuotesResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get properties price and availability information + * @property params [GetLodgingQuotesOperationParams] + */ +class GetLodgingQuotesOperation( + val params: GetLodgingQuotesOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/lodging/quotes" + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt similarity index 64% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt index ecf9284fe..e32527f32 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt @@ -1,28 +1,13 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.expediagroup.sdk.xap.models.Room import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -143,7 +128,7 @@ data class GetLodgingQuotesOperationParams( kotlin.String >? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -373,85 +358,345 @@ data class GetLodgingQuotesOperationParams( room8ChildAges = room8ChildAges ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-lodging.v3+json") - } + add("Accept", "application/vnd.exp-lodging.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { propertyIds?.let { - appendAll("propertyIds", toMultiValue(it, "csv")) + val key = "propertyIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } checkIn?.let { - append("checkIn", it.toString()) + val key = "checkIn" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } checkOut?.let { - append("checkOut", it.toString()) + val key = "checkOut" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } currency?.let { - append("currency", it) + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } links?.let { - appendAll("links", toMultiValue(it.map { item -> item.value }, "csv")) + val key = "links" + val value = + buildList { + addAll(it.map { it.value }) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } travelWithPets?.let { - append("travelWithPets", it.toString()) + val key = "travelWithPets" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room1Adults?.let { - append("room1.adults", it.toString()) + val key = "room1.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room1ChildAges?.let { - appendAll("room1.childAges", toMultiValue(it, "csv")) + val key = "room1.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room2Adults?.let { - append("room2.adults", it.toString()) + val key = "room2.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room2ChildAges?.let { - appendAll("room2.childAges", toMultiValue(it, "csv")) + val key = "room2.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room3Adults?.let { - append("room3.adults", it.toString()) + val key = "room3.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room3ChildAges?.let { - appendAll("room3.childAges", toMultiValue(it, "csv")) + val key = "room3.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room4Adults?.let { - append("room4.adults", it.toString()) + val key = "room4.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room4ChildAges?.let { - appendAll("room4.childAges", toMultiValue(it, "csv")) + val key = "room4.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room5Adults?.let { - append("room5.adults", it.toString()) + val key = "room5.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room5ChildAges?.let { - appendAll("room5.childAges", toMultiValue(it, "csv")) + val key = "room5.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room6Adults?.let { - append("room6.adults", it.toString()) + val key = "room6.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room6ChildAges?.let { - appendAll("room6.childAges", toMultiValue(it, "csv")) + val key = "room6.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room7Adults?.let { - append("room7.adults", it.toString()) + val key = "room7.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room7ChildAges?.let { - appendAll("room7.childAges", toMultiValue(it, "csv")) + val key = "room7.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) } room8Adults?.let { - append("room8.adults", it.toString()) + val key = "room8.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } room8ChildAges?.let { - appendAll("room8.childAges", toMultiValue(it, "csv")) - } - } + val key = "room8.childAges" + val value = + buildList { + addAll(it) + } - override fun getPathParams(): Map = - buildMap { + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + ) + ) + } } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt new file mode 100644 index 000000000..112c487f6 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt @@ -0,0 +1,39 @@ +package com.expediagroup.sdk.xap.operations + +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.RateCalendarResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get rate calendar of a property + * @property params [GetLodgingRateCalendarOperationParams] + */ +class GetLodgingRateCalendarOperation( + val params: GetLodgingRateCalendarOperationParams +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/hotels/rateCalendar" + + return url + } + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getHeaders(): Headers = this.params.getHeaders() + + override fun getUrlQueryParams() = this.params.getQueryParams() +} diff --git a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt similarity index 69% rename from code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt index c3f4b290a..b8e6d45e5 100644 --- a/code/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt @@ -1,27 +1,12 @@ -/* - * 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. - */ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.model.OperationParams -import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.xap.infrastructure.* +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import io.ktor.http.Headers -import io.ktor.http.Parameters import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import javax.validation.Valid import javax.validation.Validation @@ -59,7 +44,7 @@ data class GetLodgingRateCalendarOperationParams( @field:Valid val currency: kotlin.String? = null -) : OperationParams { +) { companion object { @JvmStatic fun builder() = Builder() @@ -156,37 +141,105 @@ data class GetLodgingRateCalendarOperationParams( currency = currency ) - override fun getHeaders(): Headers = - Headers.build { + fun getHeaders(): Headers = + Headers.builder().apply { partnerTransactionId?.let { - append("Partner-Transaction-Id", it) + add("Partner-Transaction-Id", it) } - append("Accept", "application/vnd.exp-hotel.v3+json") - } + add("Accept", "application/vnd.exp-hotel.v3+json") + }.build() - override fun getQueryParams(): Parameters = - Parameters.build { + fun getQueryParams(): List = + buildList { ecomHotelId?.let { - append("ecomHotelId", it) + val key = "ecomHotelId" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } hcomHotelId?.let { - append("hcomHotelId", it) + val key = "hcomHotelId" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } startDate?.let { - append("startDate", it.toString()) + val key = "startDate" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } endDate?.let { - append("endDate", it.toString()) + val key = "endDate" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } lengthOfStay?.let { - append("lengthOfStay", it.toString()) + val key = "lengthOfStay" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } currency?.let { - append("currency", it) + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + ) + ) } } - - override fun getPathParams(): Map = - buildMap { - } } From b5b3acbb6719ca5e53ee7dd634532a8833621ab7 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 17 Mar 2025 05:19:37 +0300 Subject: [PATCH 02/40] initial commit --- .../generate-and-publish-sdk-sources.yaml | 23 - .github/workflows/generate-docs-site.yml | 22 - .github/workflows/generate-publish-sdk.yaml | 33 + .github/workflows/integration-tests.yaml | 65 - .github/workflows/pr-auto-approve.yaml | 16 - .github/workflows/release-sdk.yaml | 29 - .github/workflows/run-examples.yaml | 65 - .../workflows/verify-examples-and-tests.yaml | 56 - build.gradle.kts | 3 + generator/build.gradle.kts | 29 +- .../resources/post-processor/.editorconfig | 8 + .../resources/post-processor/.eslintignore | 1 + .../resources/post-processor/.eslintrc.json | 3 + .../resources/post-processor/.prettierrc.js | 3 + .../change-builder-method-param-type.yaml | 8 + .../change-class-param-type.yaml | 11 + .../change-builder-method-param-type.yaml | 8 + .../change-class-param-type.yaml | 11 + .../change-builder-method-param-type.yaml | 8 + .../change-class-param-type.yaml | 11 + .../change-builder-method-params-type.yaml | 11 + .../change-class-params-type.yaml | 16 + .../import-chrono-unit.yaml | 4 + .../truncate-pickup-dropoff-times.yaml | 16 + .../add-rooms-builder-method.yaml | 8 + .../import-room.yaml | 4 + .../remove-room-builder-methods.yaml | 14 + .../add-rooms-builder-method.yaml | 8 + .../import-room.yaml | 4 + .../remove-room-builder-methods.yaml | 14 + .../change-builder-method-params-type.yaml | 11 + .../change-class-params-type.yaml | 16 + .../change-builder-method-params-type.yaml | 11 + .../change-class-params-type.yaml | 16 + .../change-builder-method-param-type.yaml | 8 + .../change-class-param-type.yaml | 11 + .../rooms.kt | 48 + .../rooms.kt | 48 + .../post-processor/package-lock.json | 3307 +++++++ .../resources/post-processor/package.json | 33 + .../resources/post-processor/src/index.ts | 45 + ...ctivities-cancellation-policy-processor.ts | 32 + .../available-time-slot-processor.ts | 32 + .../cars-cancellation-policy-processor.ts | 32 + .../src/processors/dummy-processor.ts | 15 + ...ars-listings-operation-params-processor.ts | 54 + ...ing-listings-operation-params-processor.ts | 51 + ...dging-quotes-operation-params-processor.ts | 51 + ...n-cancellable-date-time-range-processor.ts | 32 + .../src/processors/penalty-rule-processor.ts | 32 + .../src/processors/processor.ts | 28 + .../src/processors/shared.types.ts | 3 + .../vendor-location-details-processor.ts | 32 + .../resources/post-processor/tsconfig.json | 11 + generator/src/main/resources/specs.yaml | 8438 +++++++++++++++++ .../operations/params/imports.mustache | 5 - gradle.properties | 29 +- settings.gradle.kts | 4 + xap-sdk/build.gradle.kts | 58 +- xap-sdk/gradle.properties | 6 + .../src/main/kotlin/.openapi-generator/FILES | 1 + .../sdk/xap/{ => client}/AsyncXapClient.kt | 2 +- .../sdk/xap/{ => client}/XapClient.kt | 2 +- .../sdk/xap/models/APIGatewayError.kt | 82 +- .../expediagroup/sdk/xap/models/APIMError.kt | 82 +- .../sdk/xap/models/ActivitiesAddress.kt | 226 +- .../models/ActivitiesCancellationPolicy.kt | 157 +- .../sdk/xap/models/ActivitiesCountry.kt | 167 +- .../sdk/xap/models/ActivitiesError.kt | 187 +- .../sdk/xap/models/ActivitiesErrors.kt | 125 +- .../sdk/xap/models/ActivitiesGeoLocation.kt | 137 +- .../sdk/xap/models/ActivitiesLink.kt | 135 +- .../sdk/xap/models/ActivitiesLocation.kt | 311 +- .../xap/models/ActivitiesLocationOption.kt | 289 +- .../sdk/xap/models/ActivitiesMedia.kt | 167 +- .../sdk/xap/models/ActivitiesMoney.kt | 137 +- .../sdk/xap/models/ActivitiesNeighborhood.kt | 115 +- .../sdk/xap/models/ActivitiesPhone.kt | 161 +- .../sdk/xap/models/ActivitiesPrice.kt | 197 +- .../sdk/xap/models/ActivitiesSupplier.kt | 109 +- .../sdk/xap/models/ActivitiesWarning.kt | 227 +- .../expediagroup/sdk/xap/models/Activity.kt | 623 +- .../sdk/xap/models/ActivityDetailsResponse.kt | 209 +- .../xap/models/ActivityListingsResponse.kt | 261 +- .../sdk/xap/models/AdditionalFee.kt | 215 +- .../expediagroup/sdk/xap/models/Address.kt | 202 +- .../sdk/xap/models/AgeClassRestriction.kt | 195 +- .../sdk/xap/models/AvailabilityCalendar.kt | 226 +- .../models/AvailabilityCalendarResponse.kt | 132 +- .../sdk/xap/models/AvailableTimeSlot.kt | 175 +- .../expediagroup/sdk/xap/models/BedType.kt | 108 +- .../sdk/xap/models/CancellationPenaltyRule.kt | 175 +- .../CancellationPenaltyRulePenaltyPrice.kt | 130 +- .../sdk/xap/models/CancellationPolicy.kt | 247 +- .../expediagroup/sdk/xap/models/Capacity.kt | 152 +- .../com/expediagroup/sdk/xap/models/Car.kt | 474 +- .../sdk/xap/models/CarCategory.kt | 115 +- .../expediagroup/sdk/xap/models/CarDetails.kt | 517 +- .../sdk/xap/models/CarDetailsResponse.kt | 183 +- .../sdk/xap/models/CarListingsResponse.kt | 163 +- .../expediagroup/sdk/xap/models/CarPolicy.kt | 111 +- .../expediagroup/sdk/xap/models/CarType.kt | 115 +- .../sdk/xap/models/CarsAddress.kt | 239 +- .../sdk/xap/models/CarsCancellationPolicy.kt | 175 +- .../sdk/xap/models/CarsCountry.kt | 167 +- .../sdk/xap/models/CarsDateRange.kt | 109 +- .../sdk/xap/models/CarsDistance.kt | 135 +- .../expediagroup/sdk/xap/models/CarsError.kt | 187 +- .../expediagroup/sdk/xap/models/CarsErrors.kt | 125 +- .../sdk/xap/models/CarsGeoLocation.kt | 137 +- .../expediagroup/sdk/xap/models/CarsLink.kt | 135 +- .../sdk/xap/models/CarsLocation.kt | 316 +- .../sdk/xap/models/CarsLocationOption.kt | 289 +- .../expediagroup/sdk/xap/models/CarsMoney.kt | 137 +- .../sdk/xap/models/CarsNeighborhood.kt | 115 +- .../sdk/xap/models/CarsValidFormsOfPayment.kt | 143 +- .../sdk/xap/models/CarsWarning.kt | 227 +- .../sdk/xap/models/CategoryGroup.kt | 191 +- .../sdk/xap/models/ChainAndBrandInfo.kt | 154 +- .../expediagroup/sdk/xap/models/Country.kt | 130 +- .../expediagroup/sdk/xap/models/DateRange.kt | 103 +- .../sdk/xap/models/DateTimePeriod.kt | 109 +- .../expediagroup/sdk/xap/models/Deductible.kt | 124 +- .../sdk/xap/models/DepositDetail.kt | 161 +- .../sdk/xap/models/DepositPolicy.kt | 104 +- .../sdk/xap/models/Description.kt | 130 +- .../sdk/xap/models/DisambiguationResponse.kt | 125 +- .../expediagroup/sdk/xap/models/Discount.kt | 115 +- .../expediagroup/sdk/xap/models/Distance.kt | 208 +- .../expediagroup/sdk/xap/models/Duration.kt | 113 +- .../expediagroup/sdk/xap/models/Equipment.kt | 161 +- .../com/expediagroup/sdk/xap/models/Error.kt | 178 +- .../com/expediagroup/sdk/xap/models/Errors.kt | 108 +- .../sdk/xap/models/ExtraCostPerDistance.kt | 111 +- .../expediagroup/sdk/xap/models/ExtraFees.kt | 139 +- .../com/expediagroup/sdk/xap/models/Fault.kt | 106 +- .../expediagroup/sdk/xap/models/FileInfo.kt | 318 +- .../expediagroup/sdk/xap/models/FileSize.kt | 129 +- .../sdk/xap/models/FilterConditions.kt | 130 +- .../com/expediagroup/sdk/xap/models/FuelAC.kt | 115 +- .../sdk/xap/models/GeoLocation.kt | 128 +- .../com/expediagroup/sdk/xap/models/Hotel.kt | 883 +- .../sdk/xap/models/HotelDetailsResponse.kt | 246 +- .../HotelDetailsResponseOccupantsInner.kt | 108 +- .../models/HotelDetailsResponseStayDates.kt | 108 +- .../HotelDetailsResponseWarningsInner.kt | 204 +- .../xap/models/HotelHotelAmenitiesInner.kt | 108 +- .../expediagroup/sdk/xap/models/HotelLinks.kt | 104 +- .../xap/models/HotelLinksApiRateCalendar.kt | 132 +- .../xap/models/HotelLinksWebSearchResult.kt | 132 +- .../sdk/xap/models/HotelListingsResponse.kt | 270 +- .../models/HotelListingsResponseStayDates.kt | 105 +- .../sdk/xap/models/HotelLocation.kt | 126 +- .../sdk/xap/models/HotelPolicies.kt | 202 +- .../sdk/xap/models/HotelPropertyType.kt | 107 +- .../sdk/xap/models/HotelRateCalendar.kt | 130 +- .../sdk/xap/models/HotelRoomAmenitiesInner.kt | 108 +- .../com/expediagroup/sdk/xap/models/Image.kt | 143 +- .../com/expediagroup/sdk/xap/models/Link.kt | 132 +- .../expediagroup/sdk/xap/models/Location.kt | 124 +- .../sdk/xap/models/LocationGeoLocation.kt | 132 +- .../sdk/xap/models/LocationOption.kt | 222 +- .../sdk/xap/models/LodgingAmenity.kt | 104 +- .../models/LodgingCancellationPenaltyRule.kt | 128 +- .../xap/models/LodgingCancellationPolicy.kt | 153 +- .../sdk/xap/models/LodgingError.kt | 106 +- .../sdk/xap/models/LodgingErrors.kt | 108 +- .../sdk/xap/models/LodgingLink.kt | 132 +- .../sdk/xap/models/LodgingMoney.kt | 106 +- .../sdk/xap/models/LodgingOccupant.kt | 107 +- .../sdk/xap/models/LodgingPromotion.kt | 106 +- .../sdk/xap/models/LodgingQuotesResponse.kt | 247 +- .../sdk/xap/models/LodgingRatePlan.kt | 104 +- .../sdk/xap/models/LodgingRoomType.kt | 128 +- .../sdk/xap/models/LodgingRoomTypeLinks.kt | 104 +- .../models/LodgingRoomTypeLinksWebDetails.kt | 132 +- .../LodgingRoomTypeLinksWebSearchResult.kt | 132 +- .../sdk/xap/models/LodgingRoomTypePrice.kt | 250 +- .../sdk/xap/models/LodgingStayDates.kt | 105 +- .../sdk/xap/models/LodgingWarning.kt | 108 +- .../sdk/xap/models/MandatoryFeesDetail.kt | 279 +- .../xap/models/MandatoryFeesDetailAmount.kt | 130 +- .../com/expediagroup/sdk/xap/models/Media.kt | 171 +- .../expediagroup/sdk/xap/models/Mileage.kt | 135 +- .../com/expediagroup/sdk/xap/models/Money.kt | 128 +- .../sdk/xap/models/Neighborhood.kt | 106 +- .../sdk/xap/models/NightlyRates.kt | 103 +- .../xap/models/NonCancellableDateTimeRange.kt | 109 +- .../sdk/xap/models/NonRefundableDateRange.kt | 105 +- .../expediagroup/sdk/xap/models/Occupant.kt | 105 +- .../com/expediagroup/sdk/xap/models/Offer.kt | 251 +- .../sdk/xap/models/PaymentSchedule.kt | 103 +- .../sdk/xap/models/PaymentSchedulePrice.kt | 130 +- .../sdk/xap/models/PenaltyRule.kt | 137 +- .../sdk/xap/models/PenaltyType.kt | 143 +- .../com/expediagroup/sdk/xap/models/Phone.kt | 156 +- .../sdk/xap/models/PresignedUrlResponse.kt | 174 +- .../com/expediagroup/sdk/xap/models/Price.kt | 173 +- .../expediagroup/sdk/xap/models/Promotion.kt | 106 +- .../sdk/xap/models/PromotionAmount.kt | 130 +- .../expediagroup/sdk/xap/models/Property.kt | 183 +- .../sdk/xap/models/PropertyDetails.kt | 223 +- .../sdk/xap/models/PropertyManager.kt | 129 +- .../sdk/xap/models/RateCalendar.kt | 197 +- .../sdk/xap/models/RateCalendarPrice.kt | 130 +- .../sdk/xap/models/RateCalendarResponse.kt | 132 +- .../sdk/xap/models/RateDetails.kt | 235 +- .../expediagroup/sdk/xap/models/RatePlan.kt | 755 +- .../sdk/xap/models/RatePlanAmenitiesInner.kt | 108 +- .../sdk/xap/models/RatePlanPrice.kt | 322 +- .../models/RatePlanPriceNightlyRatesInner.kt | 108 +- .../RatePlanPriceTaxesAndFeesDetailsInner.kt | 108 +- .../sdk/xap/models/RatePlanStandalonePrice.kt | 300 +- .../com/expediagroup/sdk/xap/models/Rating.kt | 139 +- .../sdk/xap/models/RatingDetails.kt | 115 +- .../sdk/xap/models/RatingWithoutDetails.kt | 115 +- .../expediagroup/sdk/xap/models/Redemption.kt | 106 +- .../sdk/xap/models/ReferencePrice.kt | 129 +- .../sdk/xap/models/RentalLimits.kt | 111 +- .../sdk/xap/models/Restrictions.kt | 167 +- .../com/expediagroup/sdk/xap/models/Room.kt | 7 +- .../sdk/xap/models/RoomOccupancyPolicy.kt | 174 +- .../sdk/xap/models/RoomPreference.kt | 129 +- .../expediagroup/sdk/xap/models/RoomRates.kt | 243 +- .../sdk/xap/models/RoomRatesBaseRate.kt | 130 +- .../xap/models/RoomRatesNightlyRatesInner.kt | 108 +- .../sdk/xap/models/RoomRatesTaxesAndFees.kt | 130 +- .../RoomRatesTaxesAndFeesDetailsInner.kt | 108 +- .../sdk/xap/models/RoomRatesTotalPrice.kt | 130 +- .../models/RoomRatesTotalStrikeOutPrice.kt | 130 +- .../expediagroup/sdk/xap/models/RoomType.kt | 462 +- .../sdk/xap/models/RoomTypeAmenitiesInner.kt | 108 +- .../sdk/xap/models/RoomTypeLinks.kt | 126 +- .../sdk/xap/models/RoomTypeLinksApiDetails.kt | 132 +- .../sdk/xap/models/RoomTypeLinksWebDetails.kt | 132 +- .../sdk/xap/models/RoomTypeMediaInner.kt | 173 +- .../sdk/xap/models/RoomTypePrice.kt | 322 +- .../sdk/xap/models/RoomTypeStandalonePrice.kt | 300 +- .../expediagroup/sdk/xap/models/Savings.kt | 111 +- .../sdk/xap/models/SdpAPIMError.kt | 82 +- .../expediagroup/sdk/xap/models/SdpLink.kt | 106 +- .../expediagroup/sdk/xap/models/StayDates.kt | 103 +- .../expediagroup/sdk/xap/models/Supplier.kt | 167 +- .../sdk/xap/models/TaxesAndFees.kt | 113 +- .../sdk/xap/models/TaxesAndFeesDetail.kt | 104 +- .../com/expediagroup/sdk/xap/models/Ticket.kt | 187 +- .../expediagroup/sdk/xap/models/TimeRange.kt | 115 +- .../sdk/xap/models/TransmissionDrive.kt | 115 +- .../sdk/xap/models/ValidFormsOfPayment.kt | 154 +- .../sdk/xap/models/VehicleDetails.kt | 307 +- .../sdk/xap/models/VendorLocationDetails.kt | 181 +- .../sdk/xap/models/WaiverPolicy.kt | 84 +- .../expediagroup/sdk/xap/models/Warning.kt | 198 +- .../com/expediagroup/sdk/xap/models/When.kt | 131 +- .../operations/GetActivityDetailsOperation.kt | 94 +- .../GetActivityDetailsOperationParams.kt | 264 +- .../GetActivityListingsOperation.kt | 81 +- .../GetActivityListingsOperationParams.kt | 572 +- .../xap/operations/GetCarDetailsOperation.kt | 94 +- .../GetCarDetailsOperationParams.kt | 396 +- .../operations/GetCarsListingsOperation.kt | 82 +- .../GetCarsListingsOperationParams.kt | 2042 ++-- .../operations/GetFeedDownloadUrlOperation.kt | 76 +- .../GetFeedDownloadUrlOperationParams.kt | 555 +- ...etLodgingAvailabilityCalendarsOperation.kt | 81 +- ...ingAvailabilityCalendarsOperationParams.kt | 240 +- .../operations/GetLodgingDetailsOperation.kt | 94 +- .../GetLodgingDetailsOperationParams.kt | 550 +- .../operations/GetLodgingListingsOperation.kt | 81 +- .../GetLodgingListingsOperationParams.kt | 3819 +++++--- .../operations/GetLodgingQuotesOperation.kt | 81 +- .../GetLodgingQuotesOperationParams.kt | 725 +- .../GetLodgingRateCalendarOperation.kt | 81 +- .../GetLodgingRateCalendarOperationParams.kt | 542 +- 274 files changed, 35873 insertions(+), 19632 deletions(-) delete mode 100644 .github/workflows/generate-and-publish-sdk-sources.yaml delete mode 100644 .github/workflows/generate-docs-site.yml create mode 100644 .github/workflows/generate-publish-sdk.yaml delete mode 100644 .github/workflows/integration-tests.yaml delete mode 100644 .github/workflows/pr-auto-approve.yaml delete mode 100644 .github/workflows/release-sdk.yaml delete mode 100644 .github/workflows/run-examples.yaml delete mode 100644 .github/workflows/verify-examples-and-tests.yaml create mode 100644 generator/src/main/resources/post-processor/.editorconfig create mode 100644 generator/src/main/resources/post-processor/.eslintignore create mode 100644 generator/src/main/resources/post-processor/.eslintrc.json create mode 100644 generator/src/main/resources/post-processor/.prettierrc.js create mode 100644 generator/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-builder-method-param-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-class-param-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/available-time-slot/change-builder-method-param-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/available-time-slot/change-class-param-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-builder-method-param-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-class-param-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-builder-method-params-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-class-params-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/import-chrono-unit.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/truncate-pickup-dropoff-times.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/add-rooms-builder-method.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/import-room.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/remove-room-builder-methods.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/add-rooms-builder-method.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/import-room.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/remove-room-builder-methods.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-builder-method-params-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-class-params-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/penalty-rule/change-builder-method-params-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/penalty-rule/change-class-params-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/vendor-location-details/change-builder-method-param-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/rules/vendor-location-details/change-class-param-type.yaml create mode 100644 generator/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt create mode 100644 generator/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt create mode 100644 generator/src/main/resources/post-processor/package-lock.json create mode 100644 generator/src/main/resources/post-processor/package.json create mode 100644 generator/src/main/resources/post-processor/src/index.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/activities-cancellation-policy-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/available-time-slot-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/cars-cancellation-policy-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/dummy-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/get-cars-listings-operation-params-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/get-lodging-listings-operation-params-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/get-lodging-quotes-operation-params-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/non-cancellable-date-time-range-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/penalty-rule-processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/processor.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/shared.types.ts create mode 100644 generator/src/main/resources/post-processor/src/processors/vendor-location-details-processor.ts create mode 100644 generator/src/main/resources/post-processor/tsconfig.json create mode 100644 generator/src/main/resources/specs.yaml delete mode 100644 generator/src/main/resources/templates/operations/params/imports.mustache create mode 100644 xap-sdk/gradle.properties rename xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/{ => client}/AsyncXapClient.kt (97%) rename xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/{ => client}/XapClient.kt (98%) diff --git a/.github/workflows/generate-and-publish-sdk-sources.yaml b/.github/workflows/generate-and-publish-sdk-sources.yaml deleted file mode 100644 index 192ae1066..000000000 --- a/.github/workflows/generate-and-publish-sdk-sources.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Generate and Publish SDK Sources - -on: - workflow_dispatch: - inputs: - version: - description: | - SDK Version. - E.g., 1.0.0, 1.0.1, 1.0.0-SNAPSHOT, etc. - required: true - type: string - -jobs: - generate-and-publish-sources: - uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-full-workflow.yaml@v20250203 - secrets: inherit - with: - name: xap - ref: ${{ github.head_ref || github.ref_name }} - repository: 'ExpediaGroup/xap-java-sdk' - sdk_repo_ref: 'v20250203' - transformations: '--headers key --operationIdsToTags' - version: ${{ inputs.version }} diff --git a/.github/workflows/generate-docs-site.yml b/.github/workflows/generate-docs-site.yml deleted file mode 100644 index 99492167a..000000000 --- a/.github/workflows/generate-docs-site.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Deploy Reference Documentation - -on: - workflow_dispatch: - inputs: - ref: - description: 'Branch or tag to deploy reference docs from. Defaults to current branch.' - type: string - required: false - default: '' - -permissions: - id-token: write - -jobs: - deploy-reference-docs: - uses: "ExpediaGroup/expediagroup-java-sdk/.github/workflows/generate-ref-docs.yaml@main" - with: - buildsystem: 'maven' - ref: ${{ inputs.ref != '' && inputs.ref || github.ref }} - secrets: - GITHUB_PAT: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml new file mode 100644 index 000000000..2cfc2bcd9 --- /dev/null +++ b/.github/workflows/generate-publish-sdk.yaml @@ -0,0 +1,33 @@ +on: + push: + +jobs: + generate-and-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set Up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + + - name: Install Post Processor + working-directory: generator/src/main/resources/post-processor + run: npm ci && npm run clean && npm run compile + + - name: Generate SDK + working-directory: generator + run: | + export KOTLIN_POST_PROCESS_FILE="npm run --prefix src/main/resources/post-processor process" + + + - name: Publish Snapshots + env: + GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} + GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + run: ./gradlew publishSnapshots diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml deleted file mode 100644 index f75a1cda2..000000000 --- a/.github/workflows/integration-tests.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: Integration Test - -on: - workflow_call: - inputs: - jdk: - description: 'JDK version to use' - required: true - type: string - distribution: - description: 'JDK distribution to use' - required: false - type: string - default: 'corretto' - branch: - description: 'Branch to build SDK and run integration tests from' - required: true - type: string - -jobs: - integration-tests: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - repository: 'ExpediaGroup/xap-java-sdk' - ref: ${{ inputs.branch }} - path: sdk-repo - - - name: Parse SDK version - id: parse-sdk-version - working-directory: sdk-repo/code - shell: python -u {0} - run: | - import os - import xml.etree.ElementTree as ET - - tree = ET.parse("pom.xml") - root = tree.getroot() - version = root.find("{*}version").text - - with open(os.getenv("GITHUB_OUTPUT"), "a") as GITHUB_OUTPUT: - print(f"version={version}", file=GITHUB_OUTPUT) - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: ${{ inputs.jdk }} - distribution: ${{ inputs.distribution }} - - - name: Install SDK - working-directory: sdk-repo/code - run: | - mvn clean install - - - name: Run Integration Tests - working-directory: sdk-repo/tests/integration - run: | - mvn verify \ - -Dcom.expediagroup.xapjavasdk.apikey="${{ secrets.API_KEY }}" \ - -Dcom.expediagroup.xapjavasdk.apisecret="${{ secrets.API_SECRET }}" \ - -Dcom.expediagroup.xapjavasdk.vrbokey="${{ secrets.VRBO_KEY }}" \ - -Dcom.expediagroup.xapjavasdk.vrbosecret="${{ secrets.VRBO_SECRET }}" \ - -Dxap-java-sdk.sdk.version="${{ steps.parse-sdk-version.outputs.version }}" diff --git a/.github/workflows/pr-auto-approve.yaml b/.github/workflows/pr-auto-approve.yaml deleted file mode 100644 index 99bdeaf2b..000000000 --- a/.github/workflows/pr-auto-approve.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: Auto First Approval for Bot PRs -on: pull_request - -jobs: - auto-first-approve: - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: read - if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]' - steps: - - name: Provide first approval - uses: hmarr/auto-approve-action@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - review-message: "Renovate and Dependabot PRs are automatically approved. Still requires human review." diff --git a/.github/workflows/release-sdk.yaml b/.github/workflows/release-sdk.yaml deleted file mode 100644 index 64871904d..000000000 --- a/.github/workflows/release-sdk.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: Release SDK - -on: - workflow_dispatch: - inputs: - branch: - description: | - Branch to release the SDK from. - Defaults to the branch the action is being run from. - type: string - default: '' - -jobs: - integration-tests: - strategy: - matrix: - jdk: [ 8, 11, 17, 21 ] - uses: ./.github/workflows/integration-tests.yaml - secrets: inherit - with: - branch: ${{ inputs.branch }} - jdk: ${{ matrix.jdk }} - - release-sdk: - uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-release-sdk.yaml@v20250203 - needs: [ integration-tests ] - secrets: inherit - with: - branch: ${{ inputs.branch }} diff --git a/.github/workflows/run-examples.yaml b/.github/workflows/run-examples.yaml deleted file mode 100644 index d6f30fbea..000000000 --- a/.github/workflows/run-examples.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: Run Examples -on: - workflow_call: - inputs: - jdk: - description: 'JDK version to use' - required: true - type: string - distribution: - description: 'JDK distribution to use' - required: false - type: string - default: 'corretto' - branch: - description: 'Branch to build SDK and run examples from' - required: true - type: string - -jobs: - run-examples: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - repository: 'ExpediaGroup/xap-java-sdk' - ref: ${{ inputs.branch }} - path: sdk-repo - - - name: Parse SDK version - id: parse-sdk-version - working-directory: sdk-repo/code - shell: python -u {0} - run: | - import os - import xml.etree.ElementTree as ET - - tree = ET.parse("pom.xml") - root = tree.getroot() - version = root.find("{*}version").text - - with open(os.getenv("GITHUB_OUTPUT"), "a") as GITHUB_OUTPUT: - print(f"version={version}", file=GITHUB_OUTPUT) - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: ${{ inputs.jdk }} - distribution: ${{ inputs.distribution }} - - - name: Install SDK - working-directory: sdk-repo/code - run: | - mvn clean install - - - name: Run Examples - working-directory: sdk-repo/examples - run: | - mvn install exec:java \ - -Dexec.mainClass="com.expediagroup.sdk.xap.examples.XapSdkDemoTestRun" \ - -Dcom.expediagroup.xapjavasdk.apikey="${{ secrets.API_KEY }}" \ - -Dcom.expediagroup.xapjavasdk.apisecret="${{ secrets.API_SECRET }}" \ - -Dcom.expediagroup.xapjavasdk.vrbokey="${{ secrets.VRBO_KEY }}" \ - -Dcom.expediagroup.xapjavasdk.vrbosecret="${{ secrets.VRBO_SECRET }}" \ - -Dxap-java-sdk.sdk.version="${{ steps.parse-sdk-version.outputs.version }}" diff --git a/.github/workflows/verify-examples-and-tests.yaml b/.github/workflows/verify-examples-and-tests.yaml deleted file mode 100644 index 804e7f315..000000000 --- a/.github/workflows/verify-examples-and-tests.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: Verify Examples and Integration Tests -on: - pull_request: - branches: - - 'main' -jobs: - detect-changes: - runs-on: ubuntu-latest - permissions: - pull-requests: read - outputs: - examples: ${{ steps.filter.outputs.examples }} - integration-tests: ${{ steps.filter.outputs.integration-tests }} - steps: - - uses: dorny/paths-filter@v3 - id: filter - with: - filters: | - examples: - - 'examples/**' - integration-tests: - - 'tests/integration/**' - - verify-examples: - needs: detect-changes - if: ${{ needs.detect-changes.outputs.examples == 'true' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - java-version: '11' - distribution: 'temurin' - - name: verify examples - working-directory: examples - run: | - mvn verify \ - -Dcom.expediagroup.xapjavasdk.apikey="${{ secrets.API_KEY }}" \ - -Dcom.expediagroup.xapjavasdk.apisecret="${{ secrets.API_SECRET }}" \ - -Dcom.expediagroup.xapjavasdk.vrbokey="${{ secrets.VRBO_KEY }}" \ - -Dcom.expediagroup.xapjavasdk.vrbosecret="${{ secrets.VRBO_SECRET }}" \ - - verify-integration-tests: - needs: detect-changes - if: ${{ needs.detect-changes.outputs.integration-tests == 'true' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - java-version: '11' - distribution: 'temurin' - - name: verify integration tests - working-directory: tests/integration - run: | - mvn verify diff --git a/build.gradle.kts b/build.gradle.kts index 91264bb31..c0ebeae88 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,6 +7,9 @@ version = "1.0-SNAPSHOT" repositories { mavenCentral() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + } } dependencies { diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index 3c6764946..ece4e6481 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -1,13 +1,14 @@ import com.samskivert.mustache.Mustache import com.samskivert.mustache.Template -import java.io.Serializable -import java.io.Writer +import org.jlleitschuh.gradle.ktlint.tasks.KtLintFormatTask import org.openapitools.codegen.CodegenConstants import org.openapitools.codegen.CodegenResponse +import java.io.Serializable +import java.io.Writer plugins { kotlin("jvm") version "2.1.10" - id("com.expediagroup.sdk.openapigenerator") version "1.0.0-SNAPSHOT" + id("com.expediagroup.sdk.openapigenerator") version "0.0.3-beta-SNAPSHOT" id("org.jlleitschuh.gradle.ktlint") version "12.1.2" } @@ -16,7 +17,9 @@ version = "1.0-SNAPSHOT" repositories { mavenCentral() - mavenLocal() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + } } dependencies { @@ -33,7 +36,7 @@ kotlin { } openApiGenerate { - inputSpec = System.getProperty("inputSpec") ?: "specs.yaml" + inputSpec = System.getProperty("inputSpec") ?: "$projectDir/src/main/resources/specs.yaml" invokerPackage = "com.expediagroup.sdk.xap" apiPackage = "com.expediagroup.sdk.xap.operations" @@ -47,7 +50,7 @@ openApiGenerate { enablePostProcessFile = true templateDir = "$projectDir/src/main/resources/templates" - configFile = "$projectDir/src/main/generator-config.yaml" + configFile = "$projectDir/src/main/resources/generator-config.yaml" outputDir = "$rootDir/xap-sdk/src/main/kotlin" additionalProperties.put(CodegenConstants.ENUM_PROPERTY_NAMING, "UPPERCASE") @@ -56,17 +59,21 @@ openApiGenerate { configOptions.put("sourceFolder", "") globalProperties.put("supportingFiles", "Room.kt") - globalProperties.put("KOTLIN_POST_PROCESS_FILE", "npm run --prefix post-processor process") } + class Lambdas { class AllowedMediaTypesLambda : Mustache.Lambda, Serializable { - override fun execute(fragment: Template.Fragment, writer: Writer) { + override fun execute( + fragment: Template.Fragment, + writer: Writer, + ) { val response: CodegenResponse = fragment.context() as CodegenResponse if (response.is2xx) { - val mediaTypes: List = response.content.keys.filter { - !it.contains("xml", ignoreCase = true) - } + val mediaTypes: List = + response.content.keys.filter { + !it.contains("xml", ignoreCase = true) + } val context = mapOf("mediaTypes" to mediaTypes) fragment.execute(context, writer) diff --git a/generator/src/main/resources/post-processor/.editorconfig b/generator/src/main/resources/post-processor/.editorconfig new file mode 100644 index 000000000..79fe80267 --- /dev/null +++ b/generator/src/main/resources/post-processor/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +insert_final_newline = true diff --git a/generator/src/main/resources/post-processor/.eslintignore b/generator/src/main/resources/post-processor/.eslintignore new file mode 100644 index 000000000..567609b12 --- /dev/null +++ b/generator/src/main/resources/post-processor/.eslintignore @@ -0,0 +1 @@ +build/ diff --git a/generator/src/main/resources/post-processor/.eslintrc.json b/generator/src/main/resources/post-processor/.eslintrc.json new file mode 100644 index 000000000..f95bb333f --- /dev/null +++ b/generator/src/main/resources/post-processor/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts/" +} diff --git a/generator/src/main/resources/post-processor/.prettierrc.js b/generator/src/main/resources/post-processor/.prettierrc.js new file mode 100644 index 000000000..ff1548339 --- /dev/null +++ b/generator/src/main/resources/post-processor/.prettierrc.js @@ -0,0 +1,3 @@ +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/generator/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-builder-method-param-type.yaml b/generator/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-builder-method-param-type.yaml new file mode 100644 index 000000000..9196a5d5a --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-builder-method-param-type.yaml @@ -0,0 +1,8 @@ +rule: + kind: user_type + inside: + kind: parameter + regex: freeCancellationEndDateTime + stopBy: + kind: class_declaration + regex: Builder diff --git a/generator/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-class-param-type.yaml b/generator/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-class-param-type.yaml new file mode 100644 index 000000000..8aa1ed890 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/activities-cancellation-policy/change-class-param-type.yaml @@ -0,0 +1,11 @@ +rule: + kind: user_type + pattern: $TYPE + inside: + any: + - kind: class_parameter + regex: freeCancellationEndDateTime + - kind: nullable_type + inside: + kind: class_parameter + regex: freeCancellationEndDateTime diff --git a/generator/src/main/resources/post-processor/assets/rules/available-time-slot/change-builder-method-param-type.yaml b/generator/src/main/resources/post-processor/assets/rules/available-time-slot/change-builder-method-param-type.yaml new file mode 100644 index 000000000..508fadcdc --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/available-time-slot/change-builder-method-param-type.yaml @@ -0,0 +1,8 @@ +rule: + kind: user_type + inside: + kind: parameter + regex: dateTime + stopBy: + kind: class_declaration + regex: Builder diff --git a/generator/src/main/resources/post-processor/assets/rules/available-time-slot/change-class-param-type.yaml b/generator/src/main/resources/post-processor/assets/rules/available-time-slot/change-class-param-type.yaml new file mode 100644 index 000000000..63cfebce3 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/available-time-slot/change-class-param-type.yaml @@ -0,0 +1,11 @@ +rule: + kind: user_type + pattern: $TYPE + inside: + any: + - kind: class_parameter + regex: dateTime + - kind: nullable_type + inside: + kind: class_parameter + regex: dateTime diff --git a/generator/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-builder-method-param-type.yaml b/generator/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-builder-method-param-type.yaml new file mode 100644 index 000000000..9196a5d5a --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-builder-method-param-type.yaml @@ -0,0 +1,8 @@ +rule: + kind: user_type + inside: + kind: parameter + regex: freeCancellationEndDateTime + stopBy: + kind: class_declaration + regex: Builder diff --git a/generator/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-class-param-type.yaml b/generator/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-class-param-type.yaml new file mode 100644 index 000000000..8aa1ed890 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/car-cancellation-policy/change-class-param-type.yaml @@ -0,0 +1,11 @@ +rule: + kind: user_type + pattern: $TYPE + inside: + any: + - kind: class_parameter + regex: freeCancellationEndDateTime + - kind: nullable_type + inside: + kind: class_parameter + regex: freeCancellationEndDateTime diff --git a/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-builder-method-params-type.yaml b/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-builder-method-params-type.yaml new file mode 100644 index 000000000..c273f8d4a --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-builder-method-params-type.yaml @@ -0,0 +1,11 @@ +rule: + kind: user_type + inside: + any: + - kind: parameter + regex: pickupTime + - kind: parameter + regex: dropOffTime + stopBy: + kind: class_declaration + regex: Builder diff --git a/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-class-params-type.yaml b/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-class-params-type.yaml new file mode 100644 index 000000000..606ec0fd5 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/change-class-params-type.yaml @@ -0,0 +1,16 @@ +rule: + kind: user_type + pattern: $TYPE + inside: + any: + - kind: class_parameter + regex: pickupTime + - kind: class_parameter + regex: dropOffTime + - kind: nullable_type + inside: + any: + - kind: class_parameter + regex: pickupTime + - kind: class_parameter + regex: dropOffTime diff --git a/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/import-chrono-unit.yaml b/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/import-chrono-unit.yaml new file mode 100644 index 000000000..214190f54 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/import-chrono-unit.yaml @@ -0,0 +1,4 @@ +rule: + kind: "import_header" + regex: "OperationParams" + pattern: "$HEADER" diff --git a/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/truncate-pickup-dropoff-times.yaml b/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/truncate-pickup-dropoff-times.yaml new file mode 100644 index 000000000..eb09ba3b3 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-cars-listings-operation-params/truncate-pickup-dropoff-times.yaml @@ -0,0 +1,16 @@ +rule: + kind: value_argument + nthChild: 2 + inside: + kind: call_suffix + stopBy: end + has: + any: + - kind: value_arguments + regex: pickupTime + - kind: value_arguments + regex: dropOffTime + inside: + kind: function_declaration + stopBy: end + regex: getQueryParams diff --git a/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/add-rooms-builder-method.yaml b/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/add-rooms-builder-method.yaml new file mode 100644 index 000000000..18244f782 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/add-rooms-builder-method.yaml @@ -0,0 +1,8 @@ +rule: + kind: 'function_declaration' + regex: 'fun build' + pattern: '$FUNC' + inside: + kind: 'class_body' + inside: + pattern: 'class Builder' diff --git a/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/import-room.yaml b/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/import-room.yaml new file mode 100644 index 000000000..214190f54 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/import-room.yaml @@ -0,0 +1,4 @@ +rule: + kind: "import_header" + regex: "OperationParams" + pattern: "$HEADER" diff --git a/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/remove-room-builder-methods.yaml b/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/remove-room-builder-methods.yaml new file mode 100644 index 000000000..4590c8918 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-lodging-listings-operation-params/remove-room-builder-methods.yaml @@ -0,0 +1,14 @@ +utils: + room-builder: + kind: 'function_declaration' + regex: 'fun room*' + inside: + kind: 'class_body' + inside: + pattern: 'class Builder' +rule: + any: + - matches: room-builder + - kind: 'multiline_comment' + precedes: + matches: room-builder diff --git a/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/add-rooms-builder-method.yaml b/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/add-rooms-builder-method.yaml new file mode 100644 index 000000000..18244f782 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/add-rooms-builder-method.yaml @@ -0,0 +1,8 @@ +rule: + kind: 'function_declaration' + regex: 'fun build' + pattern: '$FUNC' + inside: + kind: 'class_body' + inside: + pattern: 'class Builder' diff --git a/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/import-room.yaml b/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/import-room.yaml new file mode 100644 index 000000000..214190f54 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/import-room.yaml @@ -0,0 +1,4 @@ +rule: + kind: "import_header" + regex: "OperationParams" + pattern: "$HEADER" diff --git a/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/remove-room-builder-methods.yaml b/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/remove-room-builder-methods.yaml new file mode 100644 index 000000000..4590c8918 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/get-lodging-quotes-operation-params/remove-room-builder-methods.yaml @@ -0,0 +1,14 @@ +utils: + room-builder: + kind: 'function_declaration' + regex: 'fun room*' + inside: + kind: 'class_body' + inside: + pattern: 'class Builder' +rule: + any: + - matches: room-builder + - kind: 'multiline_comment' + precedes: + matches: room-builder diff --git a/generator/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-builder-method-params-type.yaml b/generator/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-builder-method-params-type.yaml new file mode 100644 index 000000000..d99331336 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-builder-method-params-type.yaml @@ -0,0 +1,11 @@ +rule: + kind: user_type + inside: + any: + - kind: parameter + regex: startDateTime + - kind: parameter + regex: endDateTime + stopBy: + kind: class_declaration + regex: Builder diff --git a/generator/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-class-params-type.yaml b/generator/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-class-params-type.yaml new file mode 100644 index 000000000..a162d9560 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/non-cancellable-date-time-range/change-class-params-type.yaml @@ -0,0 +1,16 @@ +rule: + kind: user_type + pattern: $TYPE + inside: + any: + - kind: class_parameter + regex: startDateTime + - kind: class_parameter + regex: endDateTime + - kind: nullable_type + inside: + any: + - kind: class_parameter + regex: startDateTime + - kind: class_parameter + regex: endDateTime diff --git a/generator/src/main/resources/post-processor/assets/rules/penalty-rule/change-builder-method-params-type.yaml b/generator/src/main/resources/post-processor/assets/rules/penalty-rule/change-builder-method-params-type.yaml new file mode 100644 index 000000000..d99331336 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/penalty-rule/change-builder-method-params-type.yaml @@ -0,0 +1,11 @@ +rule: + kind: user_type + inside: + any: + - kind: parameter + regex: startDateTime + - kind: parameter + regex: endDateTime + stopBy: + kind: class_declaration + regex: Builder diff --git a/generator/src/main/resources/post-processor/assets/rules/penalty-rule/change-class-params-type.yaml b/generator/src/main/resources/post-processor/assets/rules/penalty-rule/change-class-params-type.yaml new file mode 100644 index 000000000..a162d9560 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/penalty-rule/change-class-params-type.yaml @@ -0,0 +1,16 @@ +rule: + kind: user_type + pattern: $TYPE + inside: + any: + - kind: class_parameter + regex: startDateTime + - kind: class_parameter + regex: endDateTime + - kind: nullable_type + inside: + any: + - kind: class_parameter + regex: startDateTime + - kind: class_parameter + regex: endDateTime diff --git a/generator/src/main/resources/post-processor/assets/rules/vendor-location-details/change-builder-method-param-type.yaml b/generator/src/main/resources/post-processor/assets/rules/vendor-location-details/change-builder-method-param-type.yaml new file mode 100644 index 000000000..508fadcdc --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/vendor-location-details/change-builder-method-param-type.yaml @@ -0,0 +1,8 @@ +rule: + kind: user_type + inside: + kind: parameter + regex: dateTime + stopBy: + kind: class_declaration + regex: Builder diff --git a/generator/src/main/resources/post-processor/assets/rules/vendor-location-details/change-class-param-type.yaml b/generator/src/main/resources/post-processor/assets/rules/vendor-location-details/change-class-param-type.yaml new file mode 100644 index 000000000..63cfebce3 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/rules/vendor-location-details/change-class-param-type.yaml @@ -0,0 +1,11 @@ +rule: + kind: user_type + pattern: $TYPE + inside: + any: + - kind: class_parameter + regex: dateTime + - kind: nullable_type + inside: + kind: class_parameter + regex: dateTime diff --git a/generator/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt b/generator/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt new file mode 100644 index 000000000..4f844ba41 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt @@ -0,0 +1,48 @@ +fun rooms(rooms: List) = + apply { + if (rooms.size > 8) { + throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( + constraintViolations = listOf("rooms: size must be between 0 and 8") + ) + } + + rooms.elementAtOrNull(0)?.let { + this.room1Adults = it.adults + this.room1ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(1)?.let { + this.room2Adults = it.adults + this.room2ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(2)?.let { + this.room3Adults = it.adults + this.room3ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(3)?.let { + this.room4Adults = it.adults + this.room4ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(4)?.let { + this.room5Adults = it.adults + this.room5ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(5)?.let { + this.room6Adults = it.adults + this.room6ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(6)?.let { + this.room7Adults = it.adults + this.room7ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(7)?.let { + this.room8Adults = it.adults + this.room8ChildAges = it.childAges?.map { item -> item.toString() } + } + } diff --git a/generator/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt b/generator/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt new file mode 100644 index 000000000..4f844ba41 --- /dev/null +++ b/generator/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt @@ -0,0 +1,48 @@ +fun rooms(rooms: List) = + apply { + if (rooms.size > 8) { + throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( + constraintViolations = listOf("rooms: size must be between 0 and 8") + ) + } + + rooms.elementAtOrNull(0)?.let { + this.room1Adults = it.adults + this.room1ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(1)?.let { + this.room2Adults = it.adults + this.room2ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(2)?.let { + this.room3Adults = it.adults + this.room3ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(3)?.let { + this.room4Adults = it.adults + this.room4ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(4)?.let { + this.room5Adults = it.adults + this.room5ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(5)?.let { + this.room6Adults = it.adults + this.room6ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(6)?.let { + this.room7Adults = it.adults + this.room7ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(7)?.let { + this.room8Adults = it.adults + this.room8ChildAges = it.childAges?.map { item -> item.toString() } + } + } diff --git a/generator/src/main/resources/post-processor/package-lock.json b/generator/src/main/resources/post-processor/package-lock.json new file mode 100644 index 000000000..ab72b7a21 --- /dev/null +++ b/generator/src/main/resources/post-processor/package-lock.json @@ -0,0 +1,3307 @@ +{ + "name": "post-processor", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "version": "0.0.0", + "license": "Apache-2.0", + "dependencies": { + "@ast-grep/napi": "0.33.1", + "yaml": "2.7.0" + }, + "devDependencies": { + "@types/node": "22.13.5", + "gts": "6.0.2", + "tsc-alias": "1.8.10", + "typescript": "5.7.3" + } + }, + "node_modules/@ast-grep/napi": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi/-/napi-0.33.1.tgz", + "integrity": "sha512-AfUsqmEa8NoYq1QhY2LWKCgKRBrCW89WB2D7t4hhTwXcfBB+CWRtY11vUughpfGLrdyziPst7kpdFzI9TC9Efw==", + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@ast-grep/napi-darwin-arm64": "0.33.1", + "@ast-grep/napi-darwin-x64": "0.33.1", + "@ast-grep/napi-linux-arm64-gnu": "0.33.1", + "@ast-grep/napi-linux-arm64-musl": "0.33.1", + "@ast-grep/napi-linux-x64-gnu": "0.33.1", + "@ast-grep/napi-linux-x64-musl": "0.33.1", + "@ast-grep/napi-win32-arm64-msvc": "0.33.1", + "@ast-grep/napi-win32-ia32-msvc": "0.33.1", + "@ast-grep/napi-win32-x64-msvc": "0.33.1" + } + }, + "node_modules/@ast-grep/napi-darwin-arm64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-darwin-arm64/-/napi-darwin-arm64-0.33.1.tgz", + "integrity": "sha512-HJcjxDhF1THn6VlUMpYFQoZBWWMk3flBJpLEDWLjH3Umk7/4tQvaJeKwhl32Snegj35p9SHGz1cS8D2k1nDsEg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ast-grep/napi-darwin-x64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-darwin-x64/-/napi-darwin-x64-0.33.1.tgz", + "integrity": "sha512-Gu3dd+7RZcLyte/xwBX4ErT12GYgGeQGQh6743NffChyVnpwZpj2aWmdkD8gHRKswXz2dp5R01QMCV0G5o8rDQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ast-grep/napi-linux-arm64-gnu": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-linux-arm64-gnu/-/napi-linux-arm64-gnu-0.33.1.tgz", + "integrity": "sha512-4rvHBtq/0Ziwr93Mp86GQPMMySNHCMXnSIdJqJjTikt/LhJNdxmXtEVadashwxbBGWvcIy8dL6OCBHblzY/3ZQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ast-grep/napi-linux-arm64-musl": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-linux-arm64-musl/-/napi-linux-arm64-musl-0.33.1.tgz", + "integrity": "sha512-+vTHYYP8iRG9lZHhcpQRxAuD8CBYXJHFXgsevmnurS/R53r0YjNtrtj6W33e7RYXY5hehmey2Cz/5h6OhdLcJw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ast-grep/napi-linux-x64-gnu": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-linux-x64-gnu/-/napi-linux-x64-gnu-0.33.1.tgz", + "integrity": "sha512-Qm42//ZHIi2XvyvHboRPaNt32v143feG2aCqxZ2qhKJCI33abtH8pW8MF90Ix85d927xYtTwZX/ovOmJ4bghFQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ast-grep/napi-linux-x64-musl": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-linux-x64-musl/-/napi-linux-x64-musl-0.33.1.tgz", + "integrity": "sha512-+ye9d8nwgi+f9yhA0NEv5lDcpfIF7xhCcF9FerIKpksX57oI68QWNz1bOWHOuebaf9Wc0hgEtfai7lzcDWcsnA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ast-grep/napi-win32-arm64-msvc": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-win32-arm64-msvc/-/napi-win32-arm64-msvc-0.33.1.tgz", + "integrity": "sha512-0IrPtvqMUJmvmbBN3JcAmUoKUxsWMmrp0VAoJ+zUBHcz3GeWDISgxrUcx1z6edMeF+Ktm0SUG2LfqrzFhUqMyw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ast-grep/napi-win32-ia32-msvc": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-win32-ia32-msvc/-/napi-win32-ia32-msvc-0.33.1.tgz", + "integrity": "sha512-rM6kK19Z9mknXQLZYvIGW1vR472n0dzhexWRM4O8BAL33B4NXA0qa7lX7I3ioHBTOUx0dGW10oNRm3yindUohg==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ast-grep/napi-win32-x64-msvc": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@ast-grep/napi-win32-x64-msvc/-/napi-win32-x64-msvc-0.33.1.tgz", + "integrity": "sha512-8ATNhuU28PoUBxSgsPQnPpY+rl8DPEQCuUS55X0BLAvNQwR+Tc4MHHHX1FwjQxLLSAPfd5weiG4XQA+l7sIr0w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", + "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.25.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", + "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true + }, + "node_modules/@types/node": { + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/builtins": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz", + "integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-n": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", + "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==", + "dev": true, + "dependencies": { + "builtins": "^5.0.1", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", + "ignore": "^5.1.1", + "is-core-module": "^2.11.0", + "minimatch": "^3.1.2", + "resolve": "^1.22.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/gts": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/gts/-/gts-6.0.2.tgz", + "integrity": "sha512-lp9+eDzzm6TYqiBpgGY00EInxBHFTJiU5brsVp11qXCJEw7Q6WNNngja0spZeqSFWSquaRuHQUuWxdZLaxnKmw==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "5.62.0", + "@typescript-eslint/parser": "5.62.0", + "chalk": "^4.1.2", + "eslint": "8.57.1", + "eslint-config-prettier": "9.1.0", + "eslint-plugin-n": "15.7.0", + "eslint-plugin-prettier": "5.2.1", + "execa": "^5.0.0", + "inquirer": "^7.3.3", + "json5": "^2.1.3", + "meow": "^9.0.0", + "ncp": "^2.0.0", + "prettier": "3.3.3", + "rimraf": "3.0.2", + "write-file-atomic": "^4.0.0" + }, + "bin": { + "gts": "build/src/cli.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "node_modules/mylas": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/mylas/-/mylas-2.1.13.tgz", + "integrity": "sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==", + "dev": true, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/raouldeheer" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, + "node_modules/ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", + "dev": true, + "bin": { + "ncp": "bin/ncp" + } + }, + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/plimit-lit": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/plimit-lit/-/plimit-lit-1.6.1.tgz", + "integrity": "sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==", + "dev": true, + "dependencies": { + "queue-lit": "^1.5.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-lit": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/queue-lit/-/queue-lit-1.5.2.tgz", + "integrity": "sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/synckit": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/synckit/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/tsc-alias": { + "version": "1.8.10", + "resolved": "https://registry.npmjs.org/tsc-alias/-/tsc-alias-1.8.10.tgz", + "integrity": "sha512-Ibv4KAWfFkFdKJxnWfVtdOmB0Zi1RJVxcbPGiCDsFpCQSsmpWyuzHG3rQyI5YkobWwxFPEyQfu1hdo4qLG2zPw==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.3", + "commander": "^9.0.0", + "globby": "^11.0.4", + "mylas": "^2.1.9", + "normalize-path": "^3.0.0", + "plimit-lit": "^1.2.6" + }, + "bin": { + "tsc-alias": "dist/bin/index.js" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/generator/src/main/resources/post-processor/package.json b/generator/src/main/resources/post-processor/package.json new file mode 100644 index 000000000..dd0f05a29 --- /dev/null +++ b/generator/src/main/resources/post-processor/package.json @@ -0,0 +1,33 @@ +{ + "name": "", + "version": "0.0.0", + "description": "", + "main": "build/src/index.js", + "types": "build/src/index.d.ts", + "files": [ + "build/src" + ], + "license": "Apache-2.0", + "keywords": [], + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "lint": "gts lint", + "clean": "gts clean", + "compile": "tsc", + "fix": "gts fix", + "prepare": "npm run compile", + "pretest": "npm run compile", + "posttest": "npm run lint", + "process": "node build/src/index.js" + }, + "devDependencies": { + "@types/node": "22.13.5", + "gts": "6.0.2", + "tsc-alias": "1.8.10", + "typescript": "5.7.3" + }, + "dependencies": { + "@ast-grep/napi": "0.33.1", + "yaml": "2.7.0" + } +} diff --git a/generator/src/main/resources/post-processor/src/index.ts b/generator/src/main/resources/post-processor/src/index.ts new file mode 100644 index 000000000..78e401680 --- /dev/null +++ b/generator/src/main/resources/post-processor/src/index.ts @@ -0,0 +1,45 @@ +import {CarsCancellationPolicyProcessor} from './processors/cars-cancellation-policy-processor'; +import {GetLodgingListingsOperationParamsProcessor} from './processors/get-lodging-listings-operation-params-processor'; +import {GetLodgingQuotesOperationParamsProcessor} from './processors/get-lodging-quotes-operation-params-processor'; +import {NonCancellableDateTimeRangeProcessor} from './processors/non-cancellable-date-time-range-processor'; +import {PenaltyRuleProcessor} from './processors/penalty-rule-processor'; +import {VendorLocationDetailsProcessor} from './processors/vendor-location-details-processor'; +import {GetCarsListingsOperationParamsProcessor} from './processors/get-cars-listings-operation-params-processor'; +import {ActivitiesCancellationPolicyProcessor} from './processors/activities-cancellation-policy-processor'; +import {AvailableTimeSlotProcessor} from './processors/available-time-slot-processor'; + +import * as path from 'path'; + +const args = process.argv.slice(2); +const filePath = args[0]; +const fileName = path.parse(filePath).name; + +switch (fileName) { + case 'CarsCancellationPolicy': + new CarsCancellationPolicyProcessor().process(filePath); + break; + case 'GetLodgingListingsOperationParams': + new GetLodgingListingsOperationParamsProcessor().process(filePath); + break; + case 'GetLodgingQuotesOperationParams': + new GetLodgingQuotesOperationParamsProcessor().process(filePath); + break; + case 'NonCancellableDateTimeRange': + new NonCancellableDateTimeRangeProcessor().process(filePath); + break; + case 'PenaltyRule': + new PenaltyRuleProcessor().process(filePath); + break; + case 'VendorLocationDetails': + new VendorLocationDetailsProcessor().process(filePath); + break; + case 'GetCarsListingsOperationParams': + new GetCarsListingsOperationParamsProcessor().process(filePath); + break; + case 'ActivitiesCancellationPolicy': + new ActivitiesCancellationPolicyProcessor().process(filePath); + break; + case 'AvailableTimeSlot': + new AvailableTimeSlotProcessor().process(filePath); + break; +} diff --git a/generator/src/main/resources/post-processor/src/processors/activities-cancellation-policy-processor.ts b/generator/src/main/resources/post-processor/src/processors/activities-cancellation-policy-processor.ts new file mode 100644 index 000000000..0e0e93289 --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/activities-cancellation-policy-processor.ts @@ -0,0 +1,32 @@ +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class ActivitiesCancellationPolicyProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'activities-cancellation-policy'; + + constructor() { + super(); + this.rules = [ + this.changeClassParamType, + this.changeBuilderMethodParamType, + ].map(rule => rule.bind(this)); + } + + changeClassParamType(root: SgNode): Edit[] { + const config = this.readRule('change-class-param-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } + + changeBuilderMethodParamType(root: SgNode): Edit[] { + const config = this.readRule('change-builder-method-param-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/available-time-slot-processor.ts b/generator/src/main/resources/post-processor/src/processors/available-time-slot-processor.ts new file mode 100644 index 000000000..8f023644d --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/available-time-slot-processor.ts @@ -0,0 +1,32 @@ +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class AvailableTimeSlotProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'available-time-slot'; + + constructor() { + super(); + this.rules = [ + this.changeClassParamType, + this.changeBuilderMethodParamType, + ].map(rule => rule.bind(this)); + } + + changeClassParamType(root: SgNode): Edit[] { + const config = this.readRule('change-class-param-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } + + changeBuilderMethodParamType(root: SgNode): Edit[] { + const config = this.readRule('change-builder-method-param-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/cars-cancellation-policy-processor.ts b/generator/src/main/resources/post-processor/src/processors/cars-cancellation-policy-processor.ts new file mode 100644 index 000000000..79b6277f9 --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/cars-cancellation-policy-processor.ts @@ -0,0 +1,32 @@ +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class CarsCancellationPolicyProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'car-cancellation-policy'; + + constructor() { + super(); + this.rules = [ + this.changeClassParamType, + this.changeBuilderMethodParamType, + ].map(rule => rule.bind(this)); + } + + changeClassParamType(root: SgNode): Edit[] { + const config = this.readRule('change-class-param-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } + + changeBuilderMethodParamType(root: SgNode): Edit[] { + const config = this.readRule('change-builder-method-param-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/dummy-processor.ts b/generator/src/main/resources/post-processor/src/processors/dummy-processor.ts new file mode 100644 index 000000000..c42ebac7b --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/dummy-processor.ts @@ -0,0 +1,15 @@ +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; +import { SgNode } from '@ast-grep/napi'; + +class DummyProcessor extends Processor { + id = 'dummy'; + rules: RuleFunction[] = [ + (root: SgNode) => { + // Dummy rule: No edits + return []; + } + ]; +} + +export default DummyProcessor; diff --git a/generator/src/main/resources/post-processor/src/processors/get-cars-listings-operation-params-processor.ts b/generator/src/main/resources/post-processor/src/processors/get-cars-listings-operation-params-processor.ts new file mode 100644 index 000000000..4b5b27e45 --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/get-cars-listings-operation-params-processor.ts @@ -0,0 +1,54 @@ +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class GetCarsListingsOperationParamsProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'get-cars-listings-operation-params'; + + constructor() { + super(); + this.rules = [ + this.changeClassParamType, + this.changeBuilderMethodParamType, + this.importChronoUnit, + this.truncatePickupDropoffTimes, + ].map(rule => rule.bind(this)); + } + + changeClassParamType(root: SgNode): Edit[] { + const config = this.readRule('change-class-params-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } + + changeBuilderMethodParamType(root: SgNode): Edit[] { + const config = this.readRule('change-builder-method-params-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } + + importChronoUnit(root: SgNode): Edit[] { + const config = this.readRule('import-chrono-unit'); + + return root.findAll(config).map(node => { + const room = 'import java.time.temporal.ChronoUnit'; + const header = node.getMatch('HEADER')?.text(); + + return node.replace(`${room}\n${header}`); + }); + + } + + truncatePickupDropoffTimes(root: SgNode): Edit[] { + const config = this.readRule('truncate-pickup-dropoff-times'); + + return root.findAll(config).map(node => { + return node.replace('it.truncatedTo(ChronoUnit.MINUTES).toString()'); + }); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/get-lodging-listings-operation-params-processor.ts b/generator/src/main/resources/post-processor/src/processors/get-lodging-listings-operation-params-processor.ts new file mode 100644 index 000000000..c750e84bb --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/get-lodging-listings-operation-params-processor.ts @@ -0,0 +1,51 @@ +import * as fs from 'node:fs'; +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class GetLodgingListingsOperationParamsProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'get-lodging-listings-operation-params'; + + constructor() { + super(); + this.rules = [ + this.removeRoomBuilderMethods, + this.importRoom, + this.addRoomsBuilderMethod, + ].map(rule => rule.bind(this)); + } + + removeRoomBuilderMethods(root: SgNode): Edit[] { + const config = this.readRule('remove-room-builder-methods'); + + return root.findAll(config).map(node => { + return node.replace(''); + }); + } + + importRoom(root: SgNode): Edit[] { + const config = this.readRule('import-room'); + + return root.findAll(config).map(node => { + const room = 'import com.expediagroup.sdk.xap.models.Room'; + const header = node.getMatch('HEADER')?.text(); + + return node.replace(`${room}\n${header}`); + }); + } + + addRoomsBuilderMethod(root: SgNode): Edit[] { + const config = this.readRule('add-rooms-builder-method'); + + const source = fs.readFileSync( + './assets/templates/get-lodging-listings-operation-params/rooms.kt', + 'utf-8' + ); + + return root.findAll(config).map(node => { + const func = node.getMatch('FUNC')?.text(); + return node.replace(`${source}\n${func}`); + }); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/get-lodging-quotes-operation-params-processor.ts b/generator/src/main/resources/post-processor/src/processors/get-lodging-quotes-operation-params-processor.ts new file mode 100644 index 000000000..93fbb390b --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/get-lodging-quotes-operation-params-processor.ts @@ -0,0 +1,51 @@ +import * as fs from 'node:fs'; +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class GetLodgingQuotesOperationParamsProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'get-lodging-quotes-operation-params'; + + constructor() { + super(); + this.rules = [ + this.removeRoomBuilderMethods, + this.importRoom, + this.addRoomsBuilderMethod, + ].map(rule => rule.bind(this)); + } + + removeRoomBuilderMethods(root: SgNode): Edit[] { + const config = this.readRule('remove-room-builder-methods'); + + return root.findAll(config).map(node => { + return node.replace(''); + }); + } + + importRoom(root: SgNode): Edit[] { + const config = this.readRule('import-room'); + + return root.findAll(config).map(node => { + const room = 'import com.expediagroup.sdk.xap.models.Room'; + const header = node.getMatch('HEADER')?.text(); + + return node.replace(`${room}\n${header}`); + }); + } + + addRoomsBuilderMethod(root: SgNode): Edit[] { + const config = this.readRule('add-rooms-builder-method'); + + const source = fs.readFileSync( + './assets/templates/get-lodging-quotes-operation-params/rooms.kt', + 'utf-8' + ); + + return root.findAll(config).map(node => { + const func = node.getMatch('FUNC')?.text(); + return node.replace(`${source}\n${func}`); + }); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/non-cancellable-date-time-range-processor.ts b/generator/src/main/resources/post-processor/src/processors/non-cancellable-date-time-range-processor.ts new file mode 100644 index 000000000..27f5b5f7a --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/non-cancellable-date-time-range-processor.ts @@ -0,0 +1,32 @@ +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class NonCancellableDateTimeRangeProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'non-cancellable-date-time-range'; + + constructor() { + super(); + this.rules = [ + this.changeClassParamType, + this.changeBuilderMethodParamType, + ].map(rule => rule.bind(this)); + } + + changeClassParamType(root: SgNode): Edit[] { + const config = this.readRule('change-class-params-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } + + changeBuilderMethodParamType(root: SgNode): Edit[] { + const config = this.readRule('change-builder-method-params-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/penalty-rule-processor.ts b/generator/src/main/resources/post-processor/src/processors/penalty-rule-processor.ts new file mode 100644 index 000000000..b9fa1b69f --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/penalty-rule-processor.ts @@ -0,0 +1,32 @@ +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class PenaltyRuleProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'penalty-rule'; + + constructor() { + super(); + this.rules = [ + this.changeClassParamType, + this.changeBuilderMethodParamType, + ].map(rule => rule.bind(this)); + } + + changeClassParamType(root: SgNode): Edit[] { + const config = this.readRule('change-class-params-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } + + changeBuilderMethodParamType(root: SgNode): Edit[] { + const config = this.readRule('change-builder-method-params-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/processor.ts b/generator/src/main/resources/post-processor/src/processors/processor.ts new file mode 100644 index 000000000..d7b2dac68 --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/processor.ts @@ -0,0 +1,28 @@ +import {PathOrFileDescriptor} from 'fs'; +import * as fs from 'node:fs'; +import {Lang, NapiConfig, parse} from '@ast-grep/napi'; +import * as yaml from 'yaml'; +import {RuleFunction} from './shared.types'; + +export abstract class Processor { + abstract rules: RuleFunction[]; + abstract id: String; + + process(filePath: PathOrFileDescriptor): void { + const source = fs.readFileSync(filePath, 'utf-8'); + const ast = parse(Lang.Kotlin, source); + const root = ast.root(); + + const edits = this.rules.flatMap(func => func(root)); + const newSource = root.commitEdits(edits); + fs.writeFileSync(filePath, newSource); + } + + readRule(ruleName: string): NapiConfig { + const rule = fs.readFileSync( + `./assets/rules/${this.id}/${ruleName}.yaml`, + 'utf-8' + ); + return yaml.parse(rule); + } +} diff --git a/generator/src/main/resources/post-processor/src/processors/shared.types.ts b/generator/src/main/resources/post-processor/src/processors/shared.types.ts new file mode 100644 index 000000000..a86cb67d3 --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/shared.types.ts @@ -0,0 +1,3 @@ +import {Edit, SgNode} from '@ast-grep/napi'; + +export type RuleFunction = {(root: SgNode): Edit[]}; diff --git a/generator/src/main/resources/post-processor/src/processors/vendor-location-details-processor.ts b/generator/src/main/resources/post-processor/src/processors/vendor-location-details-processor.ts new file mode 100644 index 000000000..a236862c1 --- /dev/null +++ b/generator/src/main/resources/post-processor/src/processors/vendor-location-details-processor.ts @@ -0,0 +1,32 @@ +import {Edit, NapiConfig, SgNode} from '@ast-grep/napi'; +import {Processor} from './processor'; +import {RuleFunction} from './shared.types'; + +export class VendorLocationDetailsProcessor extends Processor { + rules: RuleFunction[]; + id: String = 'vendor-location-details'; + + constructor() { + super(); + this.rules = [ + this.changeClassParamType, + this.changeBuilderMethodParamType, + ].map(rule => rule.bind(this)); + } + + changeClassParamType(root: SgNode): Edit[] { + const config = this.readRule('change-class-param-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } + + changeBuilderMethodParamType(root: SgNode): Edit[] { + const config = this.readRule('change-builder-method-param-type'); + + return root.findAll(config).map(node => { + return node.replace('java.time.LocalDateTime'); + }); + } +} diff --git a/generator/src/main/resources/post-processor/tsconfig.json b/generator/src/main/resources/post-processor/tsconfig.json new file mode 100644 index 000000000..d1646f011 --- /dev/null +++ b/generator/src/main/resources/post-processor/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ] +} diff --git a/generator/src/main/resources/specs.yaml b/generator/src/main/resources/specs.yaml new file mode 100644 index 000000000..96baec46d --- /dev/null +++ b/generator/src/main/resources/specs.yaml @@ -0,0 +1,8438 @@ +openapi: 3.0.3 +info: + title: EWSHotel API + description: > + The XAP Lodging Search APIs can be used by partners both booking via an + Expedia website, or by partners that + + will be booking via the XAP APIs. Each API also provides pre-configured links to the Expedia website, + + the XAP Booking API, or both. + contact: + name: PartnerAPIs + url: https://confluence.expedia.biz/display/EWS/EWSHotel + email: dreamweaver@expedia.com + version: v3 + x-eg-lifecycle: LIVE + x-eg-tags: + - Partner + - EWS + - XAP + - EWSHotel + - Hotel + - Lodging + - LodgingListings + - LodgingDetails + - LodgingRateCalendar +servers: + - url: https://apim.expedia.com + description: Production Server +security: + - BasicAuth: [] +tags: + - name: Lodging Listing + - name: Lodging Details + - name: Lodging Rate Calendar + - name: Lodging Quotes + - name: Lodging Availability Calendars + - name: Cars Listings + - name: Cars Detail + - name: download-url + - name: Activities List + - name: Activities Details +paths: + "/hotels/details/{offerToken}": + get: + tags: + - get-lodging-details + summary: Get Extended information with a single property offer + description: Extended information about the rate, charges, fees, and financial + terms associated with booking a single lodging rate plan offer. + operationId: get-lodging-details + parameters: + - name: Partner-Transaction-Id + in: header + description: > + The `Partner-Transaction-ID` is a required API request header + element that is not consumed + + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + + back to the partner in the corresponding API response header. + + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: offerToken + in: path + description: > + A Hotel Natural Key from the Lodging Search API -> Hotels -> + RoomTypes -> OfferId. It is a concatenated + + string of multiple values that defines a hotel offer. + required: true + schema: + type: string + - name: price + in: query + description: > + The total price of the selected property. + + + This value will be used to determine if there is a price change between the details and booking request. + + + The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned + + along with the Lodging Details API response. + schema: + type: string + - name: currency + in: query + description: > + Value should be a standard ISO 3 letter currency code. + + + The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from + + the Lodging Listing API response. + + + The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned + + along with the Lodging Details response. + schema: + type: string + - name: locale + in: query + description: > + `locale` is composed of language identifier and region identifier, + connected by "_" that specifies the + + language in which the response will be returned. + + + The `locale` value used in the Lodging Details API query should match the `locale` value that was used in + + the Lodging Search API query. + schema: + type: string + - name: imageSizes + in: query + description: > + Indicate what size of image will be returned. + + + The available image sizes are: + + - t : Thumbnail + + - s : Small + + - b : Big + + - y : 500x500v + + - z : 1000x1000v + + + Resolution from smallest to largest is t < s < b < y < z. + + + If no `imageSizes` is specified, the t size images will be returned. + + + If an image is missing in one size, we will try to fall back to the same image with lower resolution. + + + (If image "_z" is not available, we will try to return image "_y", and if it is also unavailable, we will return image "_b", and so on.) + + + Only one image size is allowed. + schema: + type: string + enum: + - t + - s + - b + - y + - z + default: t + - name: groupedAmenities + in: query + description: > + Specifies whether to return the grouped amenities. If + `groupedAmenities` is true, `DescriptiveAmenities` + + node will be returned in response, otherwise `Amenities` node will be returned. + schema: + type: boolean + responses: + "200": + description: Normal Response + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/HotelDetailsResponse" + "400": + description: User Fault + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/Errors" + example: + Errors: + - Code: INVALID_NATURAL_KEY + Description: Invalid natural key. Malformed hotel natural key detected. + TransactionId: e883f530-9776-4011-a14d-3cc089feb6cf + "401": + description: Invalid authentication credentials. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Unauthorized + "403": + description: You cannot consume this service. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: API rate limit exceeded. + "500": + description: Service Error + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/Errors" + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: 1f497fa0-a996-4796-b97e-3ad269bf7624 + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Name resolution failed. + "504": + description: API time out. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: The upstream server is timing out + security: + - Authorization: [] + /hotels/listings: + get: + tags: + - get-lodging-listings + summary: Search lodging inventory + description: > + Search Expedia lodging inventory by Location Keyword, Region ID, + Lat/Long, or Hotel ID(s) and return + + up to 1,000 offers in response. + + + Provides deeplink to Expedia site to book, or rate plan info to enable API booking. + operationId: get-lodging-listings + parameters: + - name: Partner-Transaction-Id + in: header + description: > + The `Partner-Transaction-ID` is a required API request header + element that is not consumed + + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + + back to the partner in the corresponding API response header. + + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: ecomHotelIds + in: query + description: Comma-separated list of Expedia hotel IDs. There can be no spaces + between parameters. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + example: + - 28082 + - 11133 + - name: hcomHotelIds + in: query + description: Comma-separated list of Hotels.com hotel IDs. There can be no + spaces between parameters. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: geoLocation + in: query + description: > + The latitude and longitude values identifying the center point of a + search radius (circle). + + + North latitude will be represented by a positive value. South latitude by a negative value. + + + East longitude will be represented by a positive value. West longitude by a negative value. + + + The latitude and longitude values are joined together with a comma (,) character. + + There can be no spaces between parameters. + + + This parameter should be used in combination with the radius and unit parameters below. + schema: + type: string + - name: radius + in: query + description: > + The size of the search radius around a specified point when + searching by + + `geoLocation`, `locationKeyword`, or `regionids`. + + + `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` + + if not specified. `radius` must be less than 200 km or 124 mi. + + + This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, + + or `regionids` parameters." + schema: + type: integer + format: int64 + default: 25 + - name: unit + in: query + description: > + The unit of measure for searches performed via `geoLocation`, + `locationKeyword`, or `regionids`. + + + Valid units are `km` and `mi`. + + + This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, + + or `regionids`. + schema: + type: string + default: km + enum: + - km + - mi + - name: locationKeyword + in: query + description: > + A keyword search for a location. The keyword can be a city, address, + airport or a landmark. + + + This parameter should be used in combination with the `radius` and `unit` parameters above to define + + a circle around the landmark. + + + The default radius value is 25 if not specified. + + + Combined search is not supported, if more than one search method is included in the request, an error + + will be returned. + schema: + type: string + - name: regionIds + in: query + description: > + Comma-separated list of Expedia Region IDs. There can be no spaces + between parameters. + + Search returns set of all hotels in the combined regions. + + + You may search using a string of 1 - 10 Region ID's. + + More than 10 Region ID's are not supported and will generate and error. + + + You can get the complete list of Expedia Region IDs from + + [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). + + + This parameter could be used in combination with the `radius` and `unit` parameters above to define + + a circle around the `regionIds`. The default radius value is 0 if not specified. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: checkIn + in: query + description: > + Check-in date for hotel stay in an ISO 8601 Date format + [YYYY-MM-DD]. + + + This parameter should be used in combination with the `checkOut` parameter. + + + If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns + + a `Featured Offer` for each of the hotels found. + + + If one of `checkIn` and `checkOut` is not included, an error will be returned. + + + The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + schema: + type: string + format: date + example: 2023-09-12 + - name: checkOut + in: query + description: > + Checkout date for hotel stay in an ISO 8601 Date format + [YYYY-MM-DD]. + + + This parameter should be used in combination with the `checkIn` parameter. + + + If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns + + a `Featured Offer` for each of the hotels found. + + + If one of `checkIn` and `checkOut` is not included, an error will be returned. + + + The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + schema: + type: string + format: date + example: 2023-09-14 + - name: locale + in: query + description: > + `locale` is composed of language identifier and region identifier, + connected by "_" that specifies + + the language in which the response will be returned. + + + You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. + + + For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. + + + If not specified in the query, the native language for that POS will be returned. + + And if more than one language is supported, the response will be returned in the first language + + depending on the language setting of the POS. + schema: + type: string + example: en_US + - name: currency + in: query + description: Value should be a standard ISO 3 letter currency code. + schema: + type: string + example: USD + - name: source + in: query + description: Indicate the source where the request is coming from. + schema: + type: string + enum: + - browser + - mobileapp + default: browser + - name: travelWithPets + in: query + description: > + Indicates if the search should include pet-friendly properties. + + + If set to "True" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. + + + The parameter is only applicable to the Vrbo brand. + schema: + type: boolean + default: false + - name: contentDetails + in: query + description: > + This parameter is optional and can be specified as the following + values. + + - lowest + + - low (default) + + - medium + + - high + + + ### *lowest* + + Returns the absolute minimum response for up to 1,000 hotels: + + - Count(Count of hotels that are actually returned) + + - TotalHotelCount(Count of hotels that are requested) + + - TransactionId + + - StayDates + + - LengthOfStay + + - NumberOfRooms + + - Occupants + + - ***Hotels*** + - Id + - Status + - Links + - ***RoomTypes*** + - RoomKey [Deprecated] + - OfferId + - RatePlanType + - ***RatePlans*** + - RoomTypeId + - RatePlanId + - RateRuleId + - InventorySourceId + - RemainingCount + - Price + - MemberOnlyDeal + - Promotions + - PaymentMethod + - FullDepositUponBooking + - PaymentSchedule + - CancellationPolicy + - Price + - BaseRate + - TaxesAndFees + - TotalPrice + - TotalStrikeOutPrice + - AvgNightlyRate + - AvgNightlyStrikeOutRate + - AvgNightlyRateWithFees + - AvgNightlyStrikeOutRateWithFees + - HotelMandatoryFees + - TotalPriceWithHotelFees + - NightlyRates + - TaxesAndFeesDetails + - RefundableDamageDeposit + + This minimal response is the best for partners that store static hotel location data locally, + + and who would like to have the smallest and fastest API response. + + + ### *low* + + Returns basic hotel information in response for up to 1,000 hotels. + + + Includes all elements returned when `contentDetails=lowest` plus: + + - ***Hotels*** + - Name + - PropertyType + - PropertyDetails + - LocalCurrencyCode + - Location + - Distance + - Description(may not be localized) + - ChainAndBrandInfo + - ThumbnailUrl + - StarRating + - GuestRating + - GuestReviewCount + - PetFriendly + - LgbtqiaFriendly + - ImportantNotices + - ***RoomTypes*** + - Description + - ***RatePlans*** + - InventorySourceCode + - PaymentTime + - ReserveWithDeposit + - FreeInternet + - FreeWiFi + - FreeParking + - FreeBreakfast + + ### *medium* + + Returns more complete hotel information in response for up to 200 hotels. + + + Includes all elements returned when `contentDetails=low` plus: + + - ***Hotels*** + - HotelAmenities + - RoomAmenities + - ***RoomTypes*** + - ***RatePlans*** + - FreeInternetDetails + - FreeBreakfastDetails + - Amenities + - Amenities + + **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. + + + ### *high* + + Returns extended hotel information in response for up to 5 hotels. + + + Includes all elements returned when `contentDetails=medium` plus: + + - ***Hotels*** + - RenovationsAndClosures + - Policies + - OptionalExtras + - Media + - Accessibility + - ***RoomTypes*** + - SmokingOption + - BedTypeOptions + - RoomOccupancyPolicy + - Media + + **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. + schema: + type: string + enum: + - lowest + - low + - medium + - high + default: low + - name: allRoomTypes + in: query + description: > + Returns all available rate plans for the selected hotels. + + + This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. + + + Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. + + + Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. + schema: + type: boolean + default: false + - name: links + in: query + description: > + + Comma-separated list to specify the types of deep links. + + - WD (link to Web Details site) + + - WS (link to Web Search Result page) + + - AD (link for Details API) + + - RC (link for RateCalendar API) + + - WEB (include all website links) + + - API (links for Details and RateCalendar API) + + + There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. + + + When requesting API deeplinks you will receive both a RateCalendar API link at the property level, + + and Details API links at the room level, since the Lodging Details API only displays information + + on rate plan offers. + + + When requesting AD deeplinks, you will only receive Details API links at the room level. + + `Links` node in property-level will be omitted. + + + If you are looking for more complete details on a single property via the API, you should do another search + + in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return + + (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). + + + **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only + + return details on a specific room offer for specific dates. + explode: false + schema: + type: array + items: + type: string + enum: + - WD + - WS + - AD + - RC + - WEB + - API + - name: minStarRating + in: query + description: The minimum star rating for hotels returned in the response. + schema: + type: string + enum: + - "1.0" + - "1.5" + - "2.0" + - "2.5" + - "3.0" + - "3.5" + - "4.0" + - "4.5" + - "5.0" + - name: maxStarRating + in: query + description: The maximum star rating for hotels returned in the response. + schema: + type: string + enum: + - "1.0" + - "1.5" + - "2.0" + - "2.5" + - "3.0" + - "3.5" + - "4.0" + - "4.5" + - "5.0" + - name: limit + in: query + description: > + The maximum number of hotels returned in the response. Must be an + integer greater than 0. + + + If the value is greater than 1000, only the first 1000 hotels are returned. + + + Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden + + and a lower number of hotels to be returned. + + + The `limit` parameter is intended to be used to control the response size, but partners should be careful + + about combining it with other filter parameters, as each parameter that you add will shrink the response, + + even to the point where you may even get a "no hotel found" error if none of the hotels in the base response + + meet the combined filter requirements. + + + Filters are cumulative in effect, and results must meet all filter requirements to be displayed. + schema: + type: integer + format: int64 + - name: queryText + in: query + description: > + Query text is used for a full text search of hotel data. + + + Text search based on hotel name, description, address, promotion description, amenities description. + schema: + type: string + - name: availOnly + in: query + description: > + Specifies whether to return only available hotels in the search + results. + + + If the value of this parameter is true, the search results will only return hotels that have availability + + during the requested dates. + + + If there are no hotels with availability in your search then an empty record set will be returned. + + + This parameter is ignored for dateless searches. + schema: + type: boolean + - name: smokingPreference + in: query + description: Specifies smoking preference. + schema: + type: string + enum: + - smoking + - nonsmoking + - both + - name: rateType + in: query + description: Indicate which type of `paymentMethod` for each room will be + returned. + schema: + type: string + enum: + - payonline + - payhotel + - all + - name: imageSizes + in: query + description: > + Indicates what size images will be displayed for `hotelPhotos` and + `roomPhotos` are returned when + + `contentDetails=high`. + + + The available image sizes are: + + - t : Thumbnail + + - s : Small + + - b : Big + + - y : 500x500v + + - z : 1000x1000v + + + Resolution from smallest to largest is t < s < b < y < z. + + + If no `imageSizes` is specified, the t size images will be returned. + + + If an image is missing in one size, we will try to fall back to the same image with lower resolution. + + + (If image "_z" is not available, we will try to return image "_y", and if it is also unavailable, we will return image "_b", and so on.) + + + Only one image size is allowed. + schema: + type: string + enum: + - t + - s + - b + - y + - z + - name: thumbnailImageSize + in: query + description: > + Indicate what size of image will be used for the single `thumbnail` + image that is returned when + + `contentDetails` is set to `low`, `medium` or `high`. + + + The available thumbnail image sizes are: + + - t : Thumbnail + + - s : Small + + - b : Big + + - y : 500x500v + + - z : 1000x1000v + + + Resolution from smallest to largest is t < s < b < y < z. + + + If no `thumbnailImageSize` is specified, the t size images will be returned. + + + if no thumbnail image found, it would not return thumbnail image. + + + Only one thumbnail image size is allowed. + schema: + type: string + enum: + - t + - s + - b + - y + - z + - name: includedPropertyTypeIds + in: query + description: > + Only return hotels where the `PropertyType` ID is one of the IDs in + the `includedPropertyTypeIds` field. + + + If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not + + be returned in the response. Even in this case, the filtering is still being applied, even though there is + + no `PropertyType` parameter in the response with which to validate. + + + `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that + + each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not + + contain **both** of the parameters. + + + A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: excludedPropertyTypeIds + in: query + description: > + Return all hotels **except** those whose `PropertyType` ID is in the + `excludedPropertyTypeIds` field. + + + If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not + + be returned in the response. Even in this case, the filtering is still being applied, even though there is + + no `PropertyType` parameter in the response with which to validate. + + + `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that + + each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not + + contain **both** of the parameters. + + + A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: includedInventorySourceIds + in: query + description: > + Querying with no `includedInventorySourceIds` parameter will return + listings from all available inventory + + sources. + + + Query with the `includedInventorySourceIds` parameter included will only return listings from the requested + + inventory sources. All others will be left out. + + + `includedInventorySourceId=24` will return only Expedia lodging inventory. + + + `includedInventorySourceId=83` will return only Vrbo lodging inventory. + + + `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: freeCancellation + in: query + description: > + Specifies whether to return only free cancelable room rates in the + search results. + + + If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. + + + If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. + + + Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. + + + This parameter is ignored for dateless searches. + schema: + type: boolean + - name: groupedAmenities + in: query + description: > + Specifies whether to return the grouped amenities. If + `groupedAmenities` is true, `DescriptiveAmenities` + + node will be returned in response, otherwise `Amenities` node will be returned. + schema: + type: boolean + - name: blockFullDepositRateplan + in: query + description: > + Specifies whether to return `rateplan` with `FullDepositUponBooking` + as true. + + + If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. + + + The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. + + + This parameter is ignored for dateless search. + schema: + type: boolean + default: false + - name: ratePlanType + in: query + description: > + **Note**: This parameter is visible to partners only by + configuration. Please contact your Expedia Account + + Manager if you need this parameter. + + + To specify the desired rate plan types. The options are: + + - standalone : Ask for standalone rates + + - package : Ask for package rates, but standalone rate also may be returned if available. + + + Otherwise only standalone rate plans will be returned. + + + `WebSearchResult` and `WebDetails` links won't be returned for package rate. + schema: + type: string + enum: + - standalone + - package + - name: sortType + in: query + description: > + Specifies the field that the search results will be ordered by. + + + To be used in conjunction with sortOrder parameter below. + + + **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using + + the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. + schema: + type: string + enum: + - price + - starrating + - avgrate + - deals + - guestrating + - hotelname + - distance + - totalpricewithfees + - name: sortOrder + in: query + description: > + Specifies the sort order of search results. + + + If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. + + + To be used in conjunction with the `sortType` parameter above. + schema: + type: string + enum: + - asc + - desc + default: asc + - name: room1.adults + in: query + description: > + Specifies the number of adults staying in a specific room. + + + Default value is one room with 2 adults. + + + Example: `room1.adults` is used to specify the number of adults in the first room. + schema: + type: integer + format: int64 + example: 2 + - name: room1.childAges + in: query + description: > + Comma-separated list that specifies the age(s) for each of the + children in each of the rooms. + + + Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. + + + Children must be accompanied by an adult. + explode: false + schema: + type: array + items: + type: string + example: + - 8 + - 10 + - name: room2.adults + in: query + description: Specifies the number of adults staying in second room. + schema: + type: integer + format: int64 + - name: room2.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in second room. + explode: false + schema: + type: array + items: + type: string + - name: room3.adults + in: query + description: Specifies the number of adults staying in third room. + schema: + type: integer + format: int64 + - name: room3.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in third room. + explode: false + schema: + type: array + items: + type: string + - name: room4.adults + in: query + description: Specifies the number of adults staying in fourth room. + schema: + type: integer + format: int64 + - name: room4.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in fourth room. + explode: false + schema: + type: array + items: + type: string + - name: room5.adults + in: query + description: Specifies the number of adults staying in fifth room. + schema: + type: integer + format: int64 + - name: room5.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in fifth room. + explode: false + schema: + type: array + items: + type: string + - name: room6.adults + in: query + description: Specifies the number of adults staying in sixth room. + schema: + type: integer + format: int64 + - name: room6.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in sixth room. + explode: false + schema: + type: array + items: + type: string + - name: room7.adults + in: query + description: Specifies the number of adults staying in seventh room. + schema: + type: integer + format: int64 + - name: room7.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in seventh room. + explode: false + schema: + type: array + items: + type: string + - name: room8.adults + in: query + description: Specifies the number of adults staying in eighth room. + schema: + type: integer + format: int64 + - name: room8.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in eighth room. + explode: false + schema: + type: array + items: + type: string + responses: + "200": + description: Normal Response + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/HotelListingsResponse" + "400": + description: User Fault or DisambiguationResponse Fault + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/Errors" + examples: + DisambiguationResponse: + description: DisambiguationResponse + value: + TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Errors: + - Code: AMBIGUOUS_LOCATION + DetailCode: MULTIPLE_AMBIGUOUS_LOCATION + Description: More than one location found + LocationKeyword: dublin + LocationOptions: + - Type: MULTICITY + RegionID: 178256 + ShortName: Dublin (and vicinity) + AirportCode: DUB + Address: Dublin (and vicinity), Ireland + Country: + Name: Ireland + IsoCode2: IE + IsoCode3: IRL + GeoLocation: + Latitude: 53.34402 + Longitude: -6.26146 + - Type: POI + RegionID: 553248621563220200 + ShortName: Market On Madison + AirportCode: MCN + Address: Market On Madison, Dublin, Georgia, United States of America + Country: + Name: United States of America + IsoCode2: US + IsoCode3: USA + GeoLocation: + Latitude: 32.539313 + Longitude: -82.902537 + UserFault: + description: UserFault + value: + Errors: + - Code: COMBINED_HOTEL_SELECT_CRITERIA + Description: > + Combined hotel search is not supported. Please specify + either one of the following search + + criteria: [geoLocation, regionIds, ecomHotelIds, hcomHotelIds, locationKeyword, hnk, offerId]. + TransactionId: 242d7a77-4063-439b-a9d0-12da0ff5116e + "401": + description: Invalid authentication credentials. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Unauthorized + "403": + description: You cannot consume this service. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: API rate limit exceeded. + "500": + description: Service Error + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/Errors" + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: 1490a74b-4c90-4e78-983d-4ede360ce52a + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: name resolution failed + "504": + description: API time out. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: The upstream server is timing out + security: + - Authorization: [] + /hotels/rateCalendar: + get: + tags: + - get-lodging-rate-calendar + summary: Get rate calendar of a property + description: The Rate Calendar API will return the lowest rate plan for a range + of days for one selected Expedia lodging property. + operationId: get-lodging-rate-calendar + parameters: + - name: Partner-Transaction-Id + in: header + description: > + The `Partner-Transaction-ID` is a required API request header + element that is not consumed + + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + + back to the partner in the corresponding API response header. + + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: ecomHotelId + in: query + description: > + The Expedia hotel ID for which the calendar is being requested. + + + **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. + + You may use one or the other, but not both. + schema: + type: string + - name: hcomHotelId + in: query + description: > + The Hotel.com hotel ID for which the calendar is being requested. + + + **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. + + You may use one or the other, but not both. + schema: + type: string + - name: startDate + in: query + description: > + Start date for check-in search range in an ISO 8601 Date format + [YYYY-MM-DD]. + + + **Note**: The start date may not be in the past. + required: true + schema: + type: string + format: date + example: 2022-09-12T00:00:00.000Z + - name: endDate + in: query + description: > + End date for check-in search range in an ISO 8601 Date format + [YYYY-MM-DD]. + + + **Note**: The end date must be after the start date. The maximum supported search range is 180 days. + required: true + schema: + type: string + format: date + example: 2022-09-14T00:00:00.000Z + - name: lengthOfStay + in: query + description: The length of stay to retrieve the lowest price for. + schema: + type: integer + format: int32 + default: 1 + - name: currency + in: query + description: The requested currency expressed according to ISO 4217. + schema: + type: string + responses: + "200": + description: Normal Response + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/RateCalendarResponse" + "400": + description: User Fault + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/Errors" + example: + Errors: + - Code: INVALID_HCOMHOTELID + Description: The hcomHotelId is invalid. Please specify correct Hcom hotel id. + TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 + "401": + description: Invalid authentication credentials. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Unauthorized + "403": + description: You cannot consume this service. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: You cannot consume this service + "409": + description: NO_RESULTS_FOUND + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/Errors" + example: + Errors: + - Code: NO_RESULTS_FOUND + Description: > + Sorry, your query appears to be correctly formatted, but + the inventory for which you are seeking + + details is now unavailable. + TransactionId: 2423025a-916f-4994-972a-68ee2e6b1e92 + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: API rate limit exceeded. + "500": + description: Service Error + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: "#/components/schemas/Errors" + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Name resolution failed. + "504": + description: API time out. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: The upstream server is timing out. + security: + - Authorization: [] + /lodging/quotes: + get: + tags: + - get-lodging-quotes + summary: Get properties price and availability information + description: > + The Lodging Quotes API will return the price and availability + information for given Expedia lodging property ID(s). + operationId: get-lodging-quotes + parameters: + - name: Partner-Transaction-Id + in: header + description: > + The `Partner-Transaction-ID` is a required API request header + element that is not consumed + + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + + back to the partner in the corresponding API response header. + + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: propertyIds + in: query + description: > + Comma-separated list of Expedia Property IDs. + + + ***NOTE**: This API supports Expedia property IDs only by design – HCOM and Vrbo property IDs are + + not supported.* + + + *For optimal performance, limiting your request to a maximum of 200 properties is recommended.* + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: checkIn + in: query + description: > + Check-in date for property stay in an ISO 8601 Date format. + + + This parameter should be used in combination with the checkOut parameter. + + + The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. + schema: + type: string + format: date + example: 2023-10-12 + - name: checkOut + in: query + description: > + Check-out date for property stay in an ISO 8601 Date format + + + This parameter should be used in combination with the checkIn parameter. + + + The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. + schema: + type: string + format: date + example: 2023-10-14 + - name: currency + in: query + description: > + The requested currency expressed according to ISO 4217. + + + PoS default currency will be passed if another currency is not specified in the request. + schema: + type: string + - name: links + in: query + description: | + Comma-separated list to specify the types of deep links. + - WD (link to web infosite) + - WS (link to web search result page) + - WEB (include all website links) + explode: false + schema: + type: array + items: + type: string + enum: + - WD + - WS + - WEB + - name: travelWithPets + in: query + description: > + Indicates if the search should include pet-friendly properties. + + + If set to "True" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. + + + The parameter is only applicable to the Vrbo brand. + schema: + type: boolean + default: false + - name: room1.adults + in: query + description: > + Specifies the number of adults staying in a specific room. + + + Example: `room1.adults` is used to specify the number of adults in the first room. + + + ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo + + properties should only include one room. e.g. 3 adults in room 1 and 3 in room 2, "room1.adults" is 6. + schema: + type: integer + format: int64 + example: 2 + - name: room1.childAges + in: query + description: > + Comma-separated list that specifies the age(s) for each of the + children in each of the rooms. + + + Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. + + + Children must be accompanied by an adult. + + + Total number of children is indicated by the number of childAges included. + + + If there are no children in the party then this value should not be included. + + + ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo + + properties should include the ages of all the children in the first room. e.g. 1 child age 10 in room #1 + + and 1 child age 11 in room #2, "room1.childAges" is 10,11. + explode: false + schema: + type: array + items: + type: string + example: + - 8 + - 10 + - name: room2.adults + in: query + description: Specifies the number of adults staying in second room. + schema: + type: integer + format: int64 + - name: room2.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in second room. + explode: false + schema: + type: array + items: + type: string + - name: room3.adults + in: query + description: Specifies the number of adults staying in third room. + schema: + type: integer + format: int64 + - name: room3.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in third room. + explode: false + schema: + type: array + items: + type: string + - name: room4.adults + in: query + description: Specifies the number of adults staying in fourth room. + schema: + type: integer + format: int64 + - name: room4.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in fourth room. + explode: false + schema: + type: array + items: + type: string + - name: room5.adults + in: query + description: Specifies the number of adults staying in fifth room. + schema: + type: integer + format: int64 + - name: room5.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in fifth room. + explode: false + schema: + type: array + items: + type: string + - name: room6.adults + in: query + description: Specifies the number of adults staying in sixth room. + schema: + type: integer + format: int64 + - name: room6.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in sixth room. + explode: false + schema: + type: array + items: + type: string + - name: room7.adults + in: query + description: Specifies the number of adults staying in seventh room. + schema: + type: integer + format: int64 + - name: room7.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in seventh room. + explode: false + schema: + type: array + items: + type: string + - name: room8.adults + in: query + description: Specifies the number of adults staying in eighth room. + schema: + type: integer + format: int64 + - name: room8.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in eighth room. + explode: false + schema: + type: array + items: + type: string + responses: + "200": + description: Normal Response + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: "#/components/schemas/LodgingQuotesResponse" + examples: + Lodging Quotes Response: + value: >- + { + "Count": 1, + "TotalPropertyCount": 1, + "TransactionId": "0e1d7193-2289-481c-bdf9-b7ac0b0b3bfe", + "StayDates": { + "CheckInDate": "2024-11-29", + "CheckOutDate": "2024-12-04" + }, + "LengthOfStay": 5, + "Occupants": [ + { + "Adults": 2 + } + ], + "Properties": [ + { + "Id": "87704892", + "Status": "AVAILABLE", + "RoomTypes": [ + { + "RatePlans": [ + { + "CancellationPolicy": { + "Refundable": true, + "FreeCancellation": true, + "FreeCancellationEndDateTime": "2024-11-15T23:59:00-08:00", + "CancellationPenaltyRules": [ + { + "PenaltyPercentOfStay": "50.00", + "PenaltyStartDateTime": "2024-11-15T23:59:00-08:00", + "PenaltyEndDateTime": "2024-11-22T23:59:00-08:00" + }, + { + "PenaltyPercentOfStay": "100", + "PenaltyStartDateTime": "2024-11-22T23:59:00-08:00", + "PenaltyEndDateTime": "2024-11-29T00:00:00-08:00" + } + ] + } + } + ], + "Price": { + "BaseRate": { + "Value": "790.00", + "Currency": "USD" + }, + "TaxesAndFees": { + "Value": "348.48", + "Currency": "USD" + }, + "TotalPrice": { + "Value": "1138.48", + "Currency": "USD" + }, + "AvgNightlyRate": { + "Value": "158.00", + "Currency": "USD" + }, + "AvgNightlyRateWithFees": { + "Value": "198.80", + "Currency": "USD" + }, + "TotalPriceWithPropertyFees": { + "Value": "1138.48", + "Currency": "USD" + } + }, + "Links": { + "WebSearchResult": { + "Method": "GET", + "Href": "https://www.vrbo.com/search?selected=87704892&startDate=2024-11-29&endDate=2024-12-04&adults=2&tpid=9001&eapid=1&mpa=790.00&mpb=348.48&mpd=USD&mctc=15" + }, + "WebDetails": { + "Method": "GET", + "Href": "https://www.vrbo.com/3032772?adults=2&startDate=2024-11-29&endDate=2024-12-04&mpa=790.00&mpb=348.48&mpd=USD&mpe=1721730597" + } + } + } + ] + } + ] + } + "400": + description: User Fault + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: "#/components/schemas/LodgingErrors" + example: + Errors: + - Code: INVALID_PROPERTYID + Description: The PropertyIds is invalid. Which should be comma separated list of + property IDs. + TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 + "401": + description: Invalid authentication credentials. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Unauthorized + "403": + description: You cannot consume this service. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: API rate limit exceeded. + "500": + description: Service Error + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: "#/components/schemas/LodgingErrors" + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Name resolution failed. + "504": + description: API time out. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: The upstream server is timing out. + security: + - Authorization: [] + /lodging/availabilityCalendars: + get: + tags: + - get-lodging-availability-calendars + summary: Get availability calendars of properties + description: Returns the availability of each day for a range of dates for given + Expedia lodging properties. + operationId: get-lodging-availability-calendars + parameters: + - name: Partner-Transaction-Id + in: header + description: > + The `Partner-Transaction-ID` is a required API request header + element that is not consumed + + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + + back to the partner in the corresponding API response header. + + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: propertyIds + in: query + description: > + Comma-separated list of Expedia Property IDs. + + + The API request supports a maximum of 50 Property IDs in a single request. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + responses: + "200": + description: Normal Response + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: "#/components/schemas/AvailabilityCalendarResponse" + "400": + description: User Fault + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: "#/components/schemas/LodgingErrors" + example: + Errors: + - Code: INVALID_PROPERTYIDS + Description: The propertyIds is invalid. Which should be comma separated list of + Expedia property IDs. + TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 + "401": + description: Unauthorized or Invalid authentication credentials. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Unauthorized + "403": + description: cannot consume this service. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: API rate limit exceeded. + "500": + description: Service Error + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: "#/components/schemas/LodgingErrors" + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: Name resolution failed. + "504": + description: API time out. + content: + application/json: + schema: + $ref: "#/components/schemas/APIGatewayError" + example: + message: The upstream server is timing out. + security: + - Authorization: [] + /cars/listings: + get: + tags: + - get-cars-listings + summary: Search Expedia car inventory + description: Search Expedia car inventory by date, pickup, and dropoff location + to return a listing of available cars for hire. + operationId: get-cars-listings + parameters: + - name: Partner-Transaction-Id + in: header + description: "[Not consumed by Expedia] Partner-generated identifier." + required: true + schema: + type: string + example: BestTravel-123456-798101112 + - name: pickup.airport + in: query + description: "Three letter code for the airport at which the customer would like + to pick up the car.Supported values: standard 3 letter IATA Airport + Code.Please see a full list of Car Vendor Codes and Airport Codes in + the Related Links Section below.Cannot coexist with other pickup + parameters, only one pickup parameter is allowed per request." + schema: + type: string + example: SEA + - name: pickup.city + in: query + description: The name of the city in which the customer would like to pick up + the car.Search results will include up to 40 rental locations that + are closest to the center point of the search.Cannot coexist with + other pickup parameters, only one pickup parameter is allowed per + request. + schema: + type: string + - name: pickup.address + in: query + description: The address of a car rental location where the customer would like + to pick up the car.Cannot coexist with other pickup parameters, only + one pickup parameter is allowed per request. + schema: + type: string + example: Seattle + - name: pickup.geoLocation + in: query + description: The latitude and longitude that defines where the customer would + like to pick up the car.Latitude and longitude are separated by + comma.South latitudes and West longitudes are represented by + negative values.Cannot coexist with other pickup parameters, only + one pickup parameter is allowed per request. + schema: + type: string + example: 111.00,-22.00 + - name: pickup.radius + in: query + description: Radius used in conjunction with a point to define the search area + when searching by lat/ long, city or address.See ' unit' parameter + below to select miles or kilometers.If no value is specified a + default value of 25 will be assumed. + schema: + type: integer + example: 10 + - name: dropOff.airport + in: query + description: "Three letter code for the airport at which the customer would like + to drop off the car.Supported values: standard 3 letter IATA Airport + Code.Please see a full list of Car Vendor Codes and Airport Codes in + the Related Links Section below.Cannot coexist with other drop off + parameters, only one drop off parameter is allowed per request.If no + drop off location is specified, it is assumed that the customer will + be dropping the car off at the same location at which they picked it + up." + schema: + type: string + example: SEA + - name: dropOff.city + in: query + description: City name for the location at which the customer would like to drop + off the car.Cannot coexist with other drop off parameters, only one + drop off parameter is allowed in a request.If no drop off location + is specified, it is assumed that the customer will be dropping the + car off at the same location at which they picked it up. + schema: + type: string + - name: dropOff.address + in: query + description: Address for the location at which the customer would like to drop + off the car.Cannot coexist with other drop off parameters, only one + drop off parameter is allowed in a request.If no drop off location + is specified, it is assumed that the customer will be dropping the + car off at the same location at which they picked it up. + schema: + type: string + example: Seattle + - name: dropOff.geoLocation + in: query + description: Latitude and longitude for the location at which the customer would + like to drop off the car.Latitude and longitude are separated by + comma.South latitudes and West longitudes are represented by + negative values.Cannot coexist with other drop off parameters, only + one drop off parameter is allowed per request.If no drop off + location is specified, it is assumed that the customer will be + dropping the car off at the same location at which they picked it + up. + schema: + type: string + example: 111.00,-22.00 + - name: dropOff.radius + in: query + description: "Radius used in conjunction with a point to define the search area + when searching by lat/ long, city or address.See ' unit' parameter + below to select miles or kilometers.If no value is specified a + default value of 25 will be assumed.Note: The pickup radius value + will be used (instead of the the drop-off radius) when the requested + pickup and drop-off city/address are exactly the same." + schema: + type: integer + example: 10 + - name: pickupTime + in: query + description: Requested car pickup date and time.Date should be ISO8601 Date + format.The default TIME is 10:30:00.The supported search window is + today to 330 days in the future.(Note that each rental counter has + different hours of operation. If you select a time in the middle of + the night there may be no inventory available as all locations may + be closed.) + required: true + schema: + type: string + format: date-time + example: 2021-06-05T10:00 + - name: dropOffTime + in: query + description: "Requested car drop off date and time. Date should be ISO8601 Date + format.The supported search window is today to 330 days in the + future.Note: The dropOffTime must be at least 2 hours later than the + pickupTime for the request to be valid." + required: true + schema: + type: string + format: date-time + example: 2021-06-06T10:00 + - name: sortType + in: query + description: "Method of sorting the car search results.Supported value: Price.If + no value is present a sort by 'price' will be assumed." + schema: + type: string + enum: + - Price + - name: sortOrder + in: query + description: "Order of sorting the car search results.Supported values: ASC, + DESCIf no value is present a sort order of 'ascending' will be + assumed." + schema: + type: string + enum: + - ASC + - DESC + - name: limit + in: query + description: The maximum number of search results that will be returned by the + query. + schema: + type: integer + example: 100 + - name: suppliers + in: query + description: "A list of supplier ids or supplier names to be used to filter + search results.Multiple supplier names or ids may be separated by + comma.Please see a full list of Expedia Vendor Codes & Names in the + Related Links Section below.The max count of suppliers requested is + limited to 20.Note: while you may filter using either supplier name + or supplier ID, it is recommended that you use supplier ID, as this + value will remain consistent in the event of a merger or other name + change by the supplier." + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + example: + - 11 + - 12 + - name: carClasses + in: query + description: A list of car classes to be used to filter search results.Multiple + car classes may be separated by comma.Please see Class List in the + Related Links Section below for all options. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + example: economy + - name: discount1.supplier + in: query + description: "Name or ID of the supplier who issued a coupon or discount + code.NOTE: Only ONE discount code per transaction is currently + supported by the API. If you enter more than one discount code, only + the first one will be honored.Please see a full list of Expedia + Vendor Codes & Names in the Related Links Section below." + schema: + type: string + example: Avis + - name: discount1.type + in: query + description: "The type of discount to be applied.Supported values: CorpDiscount + | Coupon." + schema: + type: string + enum: + - CorpDiscount + - Coupon + - name: discount1.code + in: query + description: The code of the discount to be applied. + schema: + type: string + example: GB1234 + - name: transmissions + in: query + description: A list of car transmission drive codes to be used to filter search + results.Multiple car classes may be separated by a comma.Please see + a full list of Transmission Drive Codes in the Related Links Section + below. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: airConditioning + in: query + description: Specify whether to filter for cars that include or exclude air + conditioning. + schema: + type: boolean + - name: carTypes + in: query + description: A list of car types to be used to filter search results.Multiple + car types may be separated by comma.Please see a full list of Car + Type Codes in the Related Links Section below. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + example: C,E + - name: unit + in: query + description: "The distance unit for the radius of a location-based search, or + the distance between the center point of a search and the vendor + location.Supported values: KM | MI.Default value: KM." + schema: + type: string + enum: + - KM + - MI + - name: driverAge + in: query + description: The age of the driver that will be renting the car.This value is + required in the UK and optional elsewhere. + schema: + type: integer + example: 18 + - name: links + in: query + description: WS = WebSearch, AD = ApiDetails, WD = WebDetails + explode: false + schema: + type: array + items: + type: string + enum: + - WS + - AD + - WD + - name: source + in: query + description: Indicates the source where the request is coming from.The available + values for the source as below:browser - The value "browser" + represents that the client is traditional website.mobile - The value + "mobile" represents that the client is mobile.all - The value "all" + indicates that the client includes both browser and mobile.Only one + source value may be used at a time. + schema: + type: string + enum: + - browser + - mobile + - all + responses: + "200": + description: car listing response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: "#/components/schemas/CarListingsResponse" + application/vnd.exp-car.v3+xml: + schema: + $ref: "#/components/schemas/CarListingsResponse" + "400": + description: errors response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: "#/components/schemas/CarsErrors" + examples: + Errors: + description: Errors + value: + Errors: + - Code: INVALID_LINKS + Description: Invalid links. Allowed value are:[WS, AD, WD]. + TransactionId: 583b7277-772a-4802-8ac7-bcdf978abbdb + application/vnd.exp-car.v3+xml: + schema: + $ref: "#/components/schemas/DisambiguationResponse" + examples: + DisambiguationResponse: + description: DisambiguationResponse + value: + Errors: + - Code: AMBIGUOUS_LOCATION + DetailCode: MULTIPLE_AMBIGUOUS_PICKUP_LOCATION + Description: Multiple pickup locations found. + LocationKeyword: portland + LocationOptions: + - Type: MULTICITY + RequestedLocation: Portland (and vicinity) + Locations: + - Name: Portland (and vicinity) + LocationId: seat001 + RegionId: "178299" + ShortName: Portland (and vicinity) + AirportCode: PDX + Address: Portland (and vicinity), Oregon, United States Of America + Country: + Name: United States of America + IsoCode2: US + IsoCode3: USA + GeoLocation: + Latitude: "45.516740" + Longitude: "-122.680950" + - Type: CITY + RequestedLocation: Portland (and vicinity) + Locations: + - Name: Portland (and vicinity) + LocationId: seat001 + RegionId: "6174134" + ShortName: Downtown Portland + AirportCode: PWM + Address: Downtown Portland, Portland, Maine, United States of America + Country: + Name: United States of America + IsoCode2: US + IsoCode3: USA + GeoLocation: + Latitude: "43.655764" + Longitude: "-70.255458" + TransactionId: 81e0a6d6-8ca9-4adf-a1c8-08ba0d11dcef + "401": + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + unauthorized: + value: '{message":"Unauthorized"}' + Invalid authentication credentials: + value: '{"message":"Invalid authentication credentials"}' + "403": + description: cannot consume this service + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + cannot consume this service: + value: '{"message":"You cannot consume this service"}' + "404": + description: No Route matched + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + no Route matched: + value: '{"message":"no Route matched with those values"}' + "429": + description: API rate limit exceeded + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + API rate limit exceeded: + value: '{"message":"API rate limit exceeded"}' + "503": + description: service unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + name resolution failed: + value: '{"message":"name resolution failed"}' + "504": + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicAuth: [] + "/cars/details/{offerToken}": + get: + tags: + - get-car-details + summary: Get Extended information with a single car offer + description: Extended information about the rates, charges, fees, and other + terms associated with a single car offer. + operationId: get-car-details + parameters: + - name: Partner-Transaction-Id + in: header + description: "[Not consumed by Expedia] Partner-generated identifier." + required: true + schema: + type: string + example: BestTravel-123456-798101112 + - name: price + in: query + description: The total price for the product. + required: true + schema: + type: string + - name: currency + in: query + description: Price currency code + required: true + schema: + type: string + example: USD + - name: source + in: query + description: source mobile - The value mobile represents that the client is + mobile. + schema: + type: string + example: mobile + - name: offerToken + in: path + description: car offer token + required: true + schema: + type: string + example: OFHSDJSJDFLJSDLKFJSDLJFLSDJFLSJDFL + responses: + "200": + description: car details successful response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: "#/components/schemas/CarDetailsResponse" + application/vnd.exp-car.v3+xml: + schema: + $ref: "#/components/schemas/CarDetailsResponse" + "400": + description: car details user fault response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: "#/components/schemas/CarsErrors" + application/vnd.exp-car.v3+xml: + schema: + $ref: "#/components/schemas/CarsErrors" + "401": + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + unauthorized: + value: '{message":"Unauthorized"}' + Invalid authentication credentials: + value: '{"message":"Invalid authentication credentials"}' + "403": + description: cannot consume this service + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + cannot consume this service: + value: '{"message":"You cannot consume this service"}' + "404": + description: No Route matched + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + no Route matched: + value: '{"message":"no Route matched with those values"}' + "429": + description: API rate limit exceeded + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + API rate limit exceeded: + value: '{"message":"API rate limit exceeded"}' + "500": + description: car details application error response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: "#/components/schemas/CarsErrors" + application/vnd.exp-car.v3+xml: + schema: + $ref: "#/components/schemas/CarsErrors" + "503": + description: service unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + name resolution failed: + value: '{"message":"name resolution failed"}' + "504": + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicAuth: [] + /feed/v1/download-url: + get: + tags: + - get-feed-download-url + operationId: get-feed-download-url + description: Get the Download URL and other details of the static files. + parameters: + - name: type + in: query + description: The type of file, used to get files by type. + deprecated: false + required: true + schema: + type: string + enum: + - DESTINATION + - VENDORLOGO + - SUMMARY + - LISTINGS + - IMAGES + - AMENITIES + - LOCATIONS + - DESCRIPTIONS + - POLICIES + - GUEST_REVIEW + - VACATION_RENTAL + - ALL_REGIONS + - BOUNDING_POLYGON + - HOTEL_TO_REGION_HIERARCHY + - ROOM_DETAILS + example: SUMMARY + - name: locale + in: query + description: 'Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: + "{LanguageCode}-{CountryCode}".Support multiple values, for the feed + files that support localization, Use this parameter to help filter + out the localization files you want to download. If not using this + parameter, then this API will return all locales files for specified + type. If the specified type of file is not supported localization, + there is no file will be returned.' + deprecated: false + required: false + schema: + type: string + example: en-US + - name: pointOfSupply + in: query + description: The point of supply means a country generally. The downloadable + files provided after specifying will only contain properties' + information for that country. + deprecated: false + required: false + schema: + type: string + enum: + - US + - AT + - BR + - CA + - FR + - DE + - GR + - IT + - JA + - KR + - MX + - PT + - ES + - TR + - AE + - GB + example: AT + - name: lodgingType + in: query + description: The lodging type also means structure type, it only can be + `CL`(Conventional Lodging) and `VR`(Vacation Rental). The + downloadable files provided after specifying will only contain + property information for that lodging type. + deprecated: false + required: false + schema: + type: string + enum: + - CL + - VR + example: CL + - name: brand + in: query + description: The downloadable files provided after specifying will only contain + property information for that brand. + deprecated: false + required: false + schema: + type: string + enum: + - VRBO + responses: + "200": + content: + application/vnd.exp-lodging.v1+json: + schema: + $ref: "#/components/schemas/PresignedUrlResponse" + examples: + SDP-Summary: + value: + transactionId: c12dcd5d-4d05-42ed-8119-0e97e11f7deb + bestMatchedFile: + fileContentType: Summary + locale: de-DE + fileName: expedia-lodging-summary-en_us-all.jsonl.zip + fileSize: + unit: MB + value: 198.12 + fileLastUpdated: Tue Mar 28 08:38:14 UTC 2023 + downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/expedia-lodging-summary-en_us-all.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=58714cc22181faea3243d689741ba0e7f1a43ae8cab172984778ca5f8b963f1f + downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 + otherFileOptions: + - fileContentType: Summary + locale: en-US + fileName: expedia-lodging-summary_filtered_by_canada_en_us.jsonl.zip + fileSize: + unit: MB + value: 18.12 + fileLastUpdated: Tue Mar 28 06:37:36 UTC 2023 + downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/filtered/expedia-lodging-summary_filtered_by_canada_en_us.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=ac4389b81d4b9e6563fd234b16dafceaab5fcbe2931454da2fe9956b1e3f5919 + filterConditions: + pointOfSupply: CA + bestMatchedLink: + href: https://localhost:8443/feed/v1/download-url?type=SUMMARY&pointOfSupply=CA + method: GET + - fileContentType: Summary + locale: en-US + fileName: expedia-lodging-summary_filtered_by_conventional_en_us.jsonl.zip + fileSize: + unit: MB + value: 98.12 + fileLastUpdated: Tue Mar 28 06:38:11 UTC 2023 + downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/filtered/expedia-lodging-summary_filtered_by_conventional_en_us.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=9364ec533e909c2cb3331f16a449feee41a968492e61bcdd5761e56e7bbad73a + downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 + filterConditions: + structureType: CONVENTIONAL + bestMatchedLink: + href: https://localhost:8443/feed/v1/download-url?type=SUMMARY&loadgingType=CL + method: GET + VendorLogo: + value: + transactionId: c12dcd5d-4d05-42ed-8119-0e97e11f7deb + bestMatchedFile: + fileName: VendorLogos.json + fileSize: + unit: MB + value: 1.32 + fileLastUpdated: Tue Mar 28 06:38:11 UTC 2023 + downloadUrl: https://ews-generated-feeds-prod-p.s3.us-west-2.amazonaws.com/vendor-logos/VendorLogos.json?response-content-disposition=inline&X-Amz-Security-Token=XXX + downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 + description: Download URLs successfully generated for the feed files. + "400": + content: + application/vnd.exp-lodging.v1+json: + schema: + $ref: "#/components/schemas/PresignedUrlResponse" + example: + transactionId: 38dc7269-12b1-58c9-a381-4963c274cdfe + error: + code: INVALID_TYPE_ATTR + description: Invalid type provided. + description: Invalid request from the client. + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/SdpAPIMError" + examples: + unauthorized: + value: + message: Unauthorized + Invalid authentication credentials: + value: + message: Invalid authentication credentials + description: Unauthorized or Invalid authentication credentials. + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/SdpAPIMError" + examples: + cannot consume this service: + value: + message: You cannot consume this service + description: Cannot consume this service. + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/SdpAPIMError" + examples: + no Route matched: + value: + message: no Route matched with those values + description: No Route matched. + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/SdpAPIMError" + examples: + API rate limit exceeded: + value: + message: API rate limit exceeded + description: API rate limit exceeded. + "500": + content: + application/vnd.exp-lodging.v1+json: + schema: + $ref: "#/components/schemas/PresignedUrlResponse" + example: + transactionId: 38dc7269-12b1-58c9-a381-4963c274cdfe + error: + code: SERVER_ERROR + description: An error has occurred while processing the request. + description: Server side error like backend service has some issues or some + issues in EWS Feed service. The Error code is SERVER_ERROR. + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/SdpAPIMError" + examples: + service unavailable: + value: + message: name resolution failed + description: Service unavailable. + /activities/listings: + get: + tags: + - get-activity-listings + description: The Activities Search API allows partners to search for Expedia + Activity inventory. + operationId: get-activity-listings + parameters: + - name: location + in: query + description: >- + Can be a city name, street address, three-letter IATA Airport Code + or a landmark name. + + (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) + schema: + type: string + example: shenzhen + - name: geoLocation + in: query + description: >- + The latitude and longitude values identifying the center point of a + search radius (circle). + + North latitude will be represented by a positive value. South latitude by a negative value. + + East longitude will be represented by a positive value. West longitude by a negative value. + + The latitude and longitude values are joined together with a comma (,) character. + schema: + type: string + example: 25.070062,-121.538306 + - name: startDate + in: query + description: |- + Start date for the activity window in YYY-MM-DD format. + If an endDate value is supplied there must also be a startDate. + default: currentDate + schema: + type: string + format: date + example: 2021-10-01T00:00:00.000Z + - name: endDate + in: query + description: |- + End date for the activity window in YYY-MM-DD format. + default: "startDate+14" + schema: + type: string + format: date + example: 2021-10-10T00:00:00.000Z + - name: locale + in: query + description: >- + locale is composed of language identifier and region identifier, + connected by "_" that specifies the language in which the response + will be returned. + + example: "fr_FR" refers to French as spoken in France, while "fr_CA" refers to French as spoken in Canada. + + For a full list of supported locales please refer to the link at the bottom of the page. + schema: + type: string + example: en_US + - name: links + in: query + description: >- + Comma-separated list to specify the types of HATEAOS links returned + in the API Response. + + WD (deep link URL to web infosite) + + AD (details API query) + explode: false + schema: + type: array + items: + type: string + enum: + - WD + - AD + example: WD + - name: Partner-Transaction-Id + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: BestTravel-123456-798101112 + responses: + "200": + description: successful + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: "#/components/schemas/ActivityListingsResponse" + example: + TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Count: 1 + Location: shenzhen, gd + StartDate: 2021-08-01T00:00:00.000Z + EndDate: 2021-08-08T00:00:00.000Z + Categories: + - Count: 1 + CategoryName: Cruises & Water Tours + CategoryDisplayName: Cruises & Water Tours + GroupName: Tours + GroupDisplayName: Tours + Activities: + - Id: 166597 + Title: "Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. Peter's Tour" + Description: Enjoy 5 of Seattle's most popular attractions with a multi-ticket + booklet that’s valid for 9 consecutive days. This pass is + perfect if you want to explore the city on your schedule, + craft your own itinerary, and visit the city’s can’t-miss + museums and most iconi.. + Media: + - Type: "1" + Size: t + Url: http://a.travel-assets.com/ lxweb/ media-vault/ 166597_m.jpeg? v=104741 + Categories: + - Walking & Bike Tours + Duration: PT3H0M + CancellationPolicy: + FreeCancellation: true + Price: + Category: Adult + TotalRate: + Value: 100 + Currency: USD + ReferencePrice: + Category: Adult + TotalRate: + Value: 110 + Currency: USD + Savings: + percentage: 42 + amount: + Value: "9" + Currency: USD + Redemption: + Type: Voucherless + Locations: + - Address: + Address1: 99 Union St + City: Seattle + PostalCode: "431625" + Province: WA + Country: USA + GeoLocation: + Latitude: "47.60772" + Longitude: -122.33936 + Locations: + - Address: + Address1: 99 Union St + City: Seattle + PostalCode: "431625" + Province: WA + Country: USA + GeoLocation: + Latitude: "47.60772" + Longitude: -122.33936 + Supplier: + Name: City Wonders + RecommendationScore: 90 + ReviewCount: 100 + Links: + WebDetails: + Href: https://www.expedia.com/things-to-do/space-needle-observation-deck-admission.a193678.activity-details?srp=true&location=sea + ApiDetails: + Accept: application/vnd.exp-activity.v3+json + Method: GET + Href: https://apim.expedia.com/activities/details/CgUyMDIzMBIyCgkyMDEzMDQ1OTYSCTIwOTc3MjcwOBoCMjQqCjIwMTctMTEtMTkyCjIwMTctMTEtMjUqAwoBMg + "400": + description: >- + Client side error while providing the request i.e bad / invalid + input parameters. The server responds back with " + + "this Http response code and with the appropriate JSON error response. + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: "#/components/schemas/ActivitiesErrors" + example: + Errors: + - Code: AMBIGUOUS_LOCATION + Description: Multiple search locations found. + LocationKeyword: 99UnionSt + LocationOptions: + - ShortName: Union Grove, Wisconsin, United States of America + Address: Milwaukee (and vicinity), Wisconsin, United States of America + RequestedLocation: United States + Locations: + - Name: Portland (and vicinity) + LocationId: seat001 + TransactionId: cecf62c8-c103-4181-b09d-53c7190d1c48 + "401": + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + "403": + description: cannot consume this service + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + "404": + description: No Route matched + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + "429": + description: API rate limit exceeded + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + "500": + description: >- + Server side error i.e connection timeout while talking to downstream + services, downstream returned error. The server responds back with + this Http " + + "response code and with the appropriate JSON error response. + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: "#/components/schemas/ActivitiesErrors" + "503": + description: name resolution failed + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + "504": + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicSchema: [] + "/activities/details/{offerToken}": + get: + tags: + - get-activity-details + description: The Activity Details API provides detailed information about one + selected activity. + operationId: get-activity-details + parameters: + - name: offerToken + in: path + description: the offerToken of a activity + required: true + schema: + type: string + example: CgY0NzY2NzgSCjIwMjEtMDUtMDIaCjIwMjEtMDUtMDc + - name: locale + in: query + description: >- + locale is composed of language identifier and region identifier, + connected by "_" that specifies the language + + in which the response will be returned. + + example: "fr_FR" refers to French as spoken in France, while "fr_CA" refers to French as spoken in Canada. + + For a full list of supported locales please refer to the link at the bottom of the page. + schema: + type: string + example: en_US + - name: Partner-Transaction-Id + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: BestTravel-123456-798101112 + responses: + "200": + description: successful + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: "#/components/schemas/ActivityDetailsResponse" + example: + TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Count: 1 + Location: shenzhen, gd + StartDate: 2021-08-01T00:00:00.000Z + EndDate: 2021-08-08T00:00:00.000Z + Categories: + - Count: 1 + CategoryName: Cruises & Water Tours + CategoryDisplayName: Cruises & Water Tours + GroupName: Tours + GroupDisplayName: Tours + Activities: + - Id: 166597 + Title: "Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. Peter's Tour" + Description: Enjoy 5 of Seattle's most popular attractions with a multi-ticket + booklet that’s valid for 9 consecutive days. This pass is + perfect if you want to explore the city on your schedule, + craft your own itinerary, and visit the city’s can’t-miss + museums and most iconi.. + Media: + - Type: "1" + Size: t + Url: http://a.travel-assets.com/ lxweb/ media-vault/ 166597_m.jpeg? v=104741 + Categories: + - Walking & Bike Tours + Duration: PT3H0M + CancellationPolicy: + FreeCancellation: true + Price: + Category: Adult + TotalRate: + Value: 100 + Currency: USD + ReferencePrice: + Category: Adult + TotalRate: + Value: 110 + Currency: USD + Savings: + percentage: 42 + amount: + Value: "9" + Currency: USD + Redemption: + Type: Voucherless + Locations: + - Address: + Address1: 99 Union St + City: Seattle + PostalCode: "431625" + Province: WA + Country: USA + GeoLocation: + Latitude: "47.60772" + Longitude: -122.33936 + Locations: + - Address: + Address1: 99 Union St + City: Seattle + PostalCode: "431625" + Province: WA + Country: USA + GeoLocation: + Latitude: "47.60772" + Longitude: -122.33936 + Supplier: + Name: City Wonders + RecommendationScore: 90 + ReviewCount: 100 + Links: + WebDetails: + Href: https://www.expedia.com/things-to-do/space-needle-observation-deck-admission.a193678.activity-details?srp=true&location=sea + ApiDetails: + Accept: application/vnd.exp-activity.v3+json + Method: GET + Href: https://apim.expedia.com/activities/details/CgUyMDIzMBIyCgkyMDEzMDQ1OTYSCTIwOTc3MjcwOBoCMjQqCjIwMTctMTEtMTkyCjIwMTctMTEtMjUqAwoBMg + "400": + description: >- + Client side error while providing the request i.e bad / invalid + input parameters. The server responds back with " + + "this Http response code and with the appropriate JSON error response. + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: "#/components/schemas/ActivitiesErrors" + example: + Errors: + - Code: INVALID_LINKS + Description: Invalid links. Allowed value are:[WS, AD, WD]. + TransactionId: 583b7277-772a-4802-8ac7-bcdf978abbdb + "401": + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + "403": + description: cannot consume this service + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + "404": + description: No Route matched + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + "429": + description: API rate limit exceeded + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + "500": + description: >- + Server side error i.e connection timeout while talking to downstream + services, downstream returned error. The server responds back with + this Http " + + "response code and with the appropriate JSON error response. + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: "#/components/schemas/ActivitiesErrors" + "503": + description: name resolution failed + content: + application/json: + schema: + $ref: "#/components/schemas/APIMError" + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + "504": + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicSchema: [] +components: + schemas: + Address: + type: object + properties: + Address1: + type: string + description: Street Number, Street Name, or PO Box + example: 724 Pine St + Address2: + type: string + description: Apartment, Floor, Suite, Bldg or more specific information about + Address1. + example: Second Floor + City: + type: string + description: The city + example: New York + Province: + type: string + description: The state or province + example: NY + Country: + type: string + description: 3-letter code for the country + example: USA + PostalCode: + type: string + description: Zip/postal code + example: "98004" + description: The address information of the location. + AgeClassRestriction: + type: object + properties: + AgeClass: + type: string + description: Categories for hotel guests, based on age. + example: Senior + enum: + - All Ages + - Senior + - Adult + - Child + - Infant + - Other + AgeMinimum: + type: integer + description: The minimum age defined in a particular `AgeClass`. + format: int32 + example: 2 + AgeMaximum: + type: integer + description: | + The maximum age defined in a particular `AgeClass`. + + If not specified, the `AgeClass` has no upper bound. + format: int32 + example: 17 + MaxGuestCount: + type: integer + description: The max guest count allowed in a particular `AgeClass`. + format: int32 + example: 3 + description: Container for room occupancy rules based on the age of the guests. + BedType: + type: object + properties: + Id: + type: string + description: The bed type ID + example: "40" + Description: + type: string + description: The bed type description. + example: 1 bed + description: > + Statement of bed types available for this offer. A room may have several + bed type options available. + + + **NOTE**: due to the large number of bed type options available, we no longer publish a list of available + + bed types. More information is available in + + [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + CancellationPenaltyRule: + type: object + properties: + PenaltyNightCount: + type: integer + description: > + Specifies the per-stay cancellation fee charged in terms of the cost + of the number of nights listed, in + + addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. + format: int32 + example: 1 + PenaltyPercentOfStay: + type: string + description: > + Specifies the per-stay cancellation fee charged as a percentage of + the total rate, in addition to any other + + penalties listed. + example: "100" + PenaltyPrice: + allOf: + - $ref: "#/components/schemas/Money" + - description: Specifies the cancellation fee in terms of a set fee, in addition + to any other penalties listed. + PenaltyStartDateTime: + type: string + description: > + The beginning of the window of time when the + `CancellationPenaltyRule` is in effect. + + + The date and time are expressed in ISO 8601 International Date format, and local to the hotel. + format: date-time + example: 2022-07-23T23:00:00.000Z + PenaltyEndDateTime: + type: string + description: > + The end of the window of time when the `CancellationPenaltyRule` is + in effect. + + + The date and time are expressed in ISO 8601 International Date format, and local to the hotel. + format: date-time + example: 2022-07-25T23:00:00.000Z + WaiverPolicy: + type: object + properties: + WaiverPolicyDescription: + type: string + description: > + The localized waiver policy description, which could be put in front + of cancellation policy description. + example: > + You can cancel for a full refund up to 24 hours after booking (not + applicable to bookings made within 72 hours of check-in time). After + 24 hours: + CancellationPolicy: + type: object + properties: + WaiverPolicy: + $ref: "#/components/schemas/WaiverPolicy" + CancellableOnline: + type: boolean + description: >- + Boolean value to identify if the reservation can be cancelled + online. + + If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. + example: true + Refundable: + type: boolean + description: Indicate whether the rate is refundable or not. + example: true + FreeCancellation: + type: boolean + description: Indicate whether the room can be cancelled free of charge. + example: true + FreeCancellationEndDateTime: + type: string + description: > + The date and time until which the room can be cancelled free of + charge. + + + This is expressed in the local time of the Hotel. + format: date-time + CancellationPenaltyRules: + type: array + description: Container for cancellation penalty details. + items: + $ref: "#/components/schemas/CancellationPenaltyRule" + CancelPolicyDescription: + type: string + description: Additional cancellation policy information available as static text. + example: Free cancellation available before 2022-07-18T16:00:00-08:00 + NonRefundableDateRanges: + type: array + description: > + A list of dates ranges that are non-refundable. + + + **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation + + penalty rule. + items: + $ref: "#/components/schemas/NonRefundableDateRange" + description: Container for room cancellation policy. + ChainAndBrandInfo: + type: object + properties: + ChainId: + type: integer + description: The chain id. + format: int32 + example: -5 + ChainName: + type: string + description: The name of the chain. + example: Hilton Worldwide + BrandId: + type: integer + description: The brand id. + format: int32 + example: 33 + BrandName: + type: string + description: The name of the brand. + example: Doubletree + description: > + The chain and brand information of hotel. + + + Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + Country: + type: object + properties: + Name: + type: string + description: country name + example: Ireland + IsoCode2: + type: string + description: 2-letter code for the country + example: IE + IsoCode3: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + DepositDetail: + type: object + properties: + Type: + type: string + description: >- + Should be one of the following values: + + PERCENT + + The deposit amount is calculated as a percentage of the total booking cost. + + NIGHT + + The deposit amount is calculated in terms of nights plus tax. + + AMOUNT + + The deposit amount in USD. + + REMAINDER + + The deposit amount is equal to the booking cost minus any deposits that have been made before this point. + example: NIGHT + enum: + - PERCENT + - NIGHT + - AMOUNT + - REMAINDER + Value: + type: string + description: Value to indicate how many/much of the type listed above is going + to be charged as a deposit. + example: "1" + When: + $ref: "#/components/schemas/When" + description: Container for deposit policy details + DepositPolicy: + type: object + properties: + Description: + type: array + items: + type: string + Details: + type: array + description: Container for deposit policy details + items: + $ref: "#/components/schemas/DepositDetail" + description: Container for deposit policy details + Description: + type: object + properties: + LocationTeaser: + type: string + description: A description of the property's location. + example: Built on the original site of the University of Washington + HotelTeaser: + type: string + description: A description of the features and amenities of the property itself. + example: A top-notch fitness club and spa features a pool + RoomTeaser: + type: string + description: The common description for all of the rooms in the property. + example: Renovated in May 2016, guest rooms feature upholstered chairs + description: Container for the descriptions of the property. + Distance: + type: object + properties: + Value: + type: string + description: The distance between the center of the search and the hotel. + example: "75" + Unit: + type: string + description: The unit of distance. + example: km + enum: + - km + - mi + Direction: + type: string + description: The direction to the hotel from the center point of the search. + example: N + enum: + - N + - S + - W + - E + - NW + - NE + - SW + - SE + description: > + Container for distance information. + + + Only returned for city/address search or `geoLocation` search or single `regionId` search. + GeoLocation: + type: object + properties: + Latitude: + type: string + description: Latitude of the location. + example: "38.184978" + Longitude: + type: string + description: Longitude of the location. + example: "85.7412" + Obfuscated: + type: boolean + description: Container for Geo location. + Hotel: + type: object + properties: + Id: + type: string + description: The unique, Expedia-specific hotel property identifier used to + designate a single hotel. + example: "14747" + HcomId: + type: string + description: > + The unique, Hotels.com-specific hotel property identifier used to + designate a single hotel. + + + This will only be returned if searching via hcomHotelIds in request. + example: "10532" + Name: + type: string + description: The common name of the hotel + example: Four Seasons Hotel Seattle + PropertyType: + $ref: "#/components/schemas/HotelPropertyType" + PropertyDetails: + $ref: "#/components/schemas/PropertyDetails" + LocalCurrencyCode: + type: string + description: The Local Currency Code for Hotel (which will be used for any fees + that must be paid at the hotel) + example: USD + Location: + allOf: + - $ref: "#/components/schemas/Location" + - description: Container for information about the location of the hotel. + PhoneInfos: + type: array + description: > + Container for property phone numbers. + + + Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. + items: + $ref: "#/components/schemas/Phone" + Distance: + $ref: "#/components/schemas/Distance" + Description: + $ref: "#/components/schemas/Description" + Status: + type: string + description: > + Indicates whether there are available offers at the property during + the dates requested, as well as + + information as to why. + + + Note that pricing will only be present in the API response for a status of `AVAILABLE`. + + + If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be + + returned. + + + If there are available rooms, but none that meet the specific parameters of the search request, + + then one of the other messages will be returned. + example: AVAILABLE + enum: + - AVAILABLE + - NOT_AVAILABLE + - ERROR + - NUMBER_OF_ADULTS_NOT_ACCEPTED + - NUMBER_OF_CHILDREN_NOT_ACCEPTED + - NUMBER_OF_INFANTS_NOT_ACCEPTED + - NUMBER_OF_PERSONS_NOT_ACCEPTED + - CHECK_IN_AGE_NOT_ACCEPTED + RenovationsAndClosures: + type: array + description: The information about renovations and closures + example: + - The following facilities are closed seasonally each year... + items: + type: string + description: The information about renovations and closures + example: The following facilities are closed seasonally each year... + ChainAndBrandInfo: + $ref: "#/components/schemas/ChainAndBrandInfo" + ThumbnailUrl: + type: string + description: > + URL of the thumbnail image of the hotel. + + + Note that other images sizes are available - You can find a link to the complete list of Supported + + Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + example: https://images.trvl-media.com/hotels/3000000/2170000/2163100/2163007/2163007_15_t.jpg + StarRating: + type: string + description: Star rating value of the hotel property. + example: "5.0" + enum: + - "1.0" + - "1.5" + - "2.0" + - "2.5" + - "3.0" + - "3.5" + - "4.0" + - "4.5" + - "5.0" + GuestRating: + type: string + description: | + Average overall guest rating of the hotel. + + The value is between 1.0 and 5.0 in 0.1 increments. + + Higher is better. + example: "4.5" + GuestReviewCount: + type: integer + description: The total count of guest reviews used to create the average + `GuestRating` above. + format: int32 + example: 240 + PetFriendly: + type: boolean + description: > + Indicates whether the property allows certain pets under certain + circumstances. + + + Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out + + whether a particular pet will be permitted to stay at the property. + example: true + LgbtqiaFriendly: + type: boolean + description: This value is returned if the property owner has specifically + designated this property as LGBTQIA-friendly. + example: true + Links: + type: object + properties: + WebSearchResult: + allOf: + - $ref: "#/components/schemas/Link" + - description: Link to web search result page. + ApiRateCalendar: + allOf: + - $ref: "#/components/schemas/Link" + - description: Link for Rate Calendar API. + additionalProperties: + $ref: "#/components/schemas/Link" + description: > + Container for list of **HATEOAS** links to Expedia website to + complete booking. + + + This links section will only return a deeplink to the Website Search Results page by default. + + + If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the + + response, as the Lodging Details API returns details at the room offer level, and not at the property level. + Policies: + $ref: "#/components/schemas/HotelPolicies" + CleanlinessAndSafety: + type: object + additionalProperties: + type: array + items: + type: string + description: > + Container for all cleanliness and safety measures. + + + The key is the measures category, the values are the information. The category will be: + + - CLEANLINESS + + - SOCIAL_DISTANCING + + - SAFETY + + - DISCLAIMER + example: + CLEANLINESS: + - Disinfectant is used to clean the property + - High-touch surfaces are cleaned and disinfected + - Sheets and towels are washed at 60°C/140°F or hotter + SOCIAL_DISTANCING: + - Contactless check-in and check-out + - Social distancing measures in place + OptionalExtras: + type: array + description: The optional extras info. + items: + type: string + description: The optional extras info. + ImportantNotices: + type: array + description: The important notices for hotel. + example: + - This property can only accept bookings for essential travel or + stays. You may be asked to provide evidence of this on arrival. + For more information, check local advisories before you book. + items: + type: string + description: The important notices for hotel. + example: This property can only accept bookings for essential travel or stays. + You may be asked to provide evidence of this on arrival. For more + information, check local advisories before you book. + Media: + type: array + description: Container for hotel images + items: + $ref: "#/components/schemas/Media" + HotelAmenities: + type: array + description: Container for all hotel amenities. + items: + allOf: + - $ref: "#/components/schemas/LodgingAmenity" + - description: Container for all hotel amenities. + - properties: + Id: + description: The identification number for a hotel amenity. + Name: + description: The description of a hotel amenity. + HotelDescriptiveAmenities: + type: object + additionalProperties: + type: array + items: + type: string + description: > + Container for all hotel amenities in group. + + + The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: + + - PARKING + + - FOOD_AND_DRINK + + - INTERNET + + - THINGS_TO_DO + + - FAMILY_FRIENDLY + + - CONVENIENCES + + - GUEST_SERVICES + + - BUSINESS_SERVICE + + - OUTDOOR + + - ACCESSIBILITY + + - SPA + + - ACTIVITIES_NEARBY + + - LANGS_SPOKEN + + - MORE + + + The category for grouped amenities in hotel level for Vacation Rental hotel will be: + + - BEACH + + - SKI + + - POOL/SPA + + - INTERNET + + - PARKING + + - FAMILY_FRIENDLY + + - KITCHEN + + - DINING + + - BEDROOM + + - BATHROOMS + + - LIVING_SPACES + + - ENTERTAINMENT + + - OUTDOORS + + - LAUNDRY + + - WORKSPACES + + - CLIMATE_CONTROL + + - PETS + + - SUITABILITY/ACCESSIBILITY + + - SERVICES_AND_CONVENIENCES + + - LOCATION_HIGHLIGHTS + + - THINGS_TO_DO + + - GENERAL + + - SAFETY + example: + FAMILY_FRIENDLY: + - Refrigerator + GUEST_SERVICES: + - 24-hour front desk + - Housekeeping (on request) + - Luggage storage + - Multilingual staff + MORE: + - At least 80% lighting from LEDs + - Communal living room + - Comprehensive food waste policy + RoomAmenities: + type: array + description: Container for all room amenities. + items: + allOf: + - $ref: "#/components/schemas/LodgingAmenity" + - description: Container for all room amenities. + - properties: + Id: + description: The identification number for a room amenity. + Name: + description: The description of a room amenity. + RoomDescriptiveAmenities: + type: object + additionalProperties: + type: array + items: + type: string + description: > + Container for all common room amenities in group. + + + The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: + + - BEDROOM + + - BATHROOM + + - FOOD_AND_DRINK + + - ENTERTAINMENT + + - OUTDOOR_SPACE + + - MORE + example: + ENTERTAINMENT: + - Flat-screen TV + - iPad + - iPod dock + - Satellite channels + FOOD_AND_DRINK: + - Free bottled water + - Refrigerator + MORE: + - Desk + - Eco-friendly cleaning products provided + - Energy-saving switches + Accessibility: + type: array + description: | + The accessibility options available for the room. + + Possible accessibility include: + - Accessible path of travel + - Accessible bathroom + - Roll-in shower + - Handicapped parking + - In-room accessibility + - Accessibility equipment for the deaf + - Braille or raised signage + example: + - Wheelchair-accessible on-site restaurant + - Wheelchair-accessible lounge + - Well-lit path to entrance + - Stair-free path to entrance + - Wheelchair accessible (may have limitations) + - Wheelchair accessible path of travel + - Accessible bathroom (in select rooms) + - Wheelchair-accessible public washroom + - In-room accessibility (in select rooms) + - Wheelchair-accessible registration desk + - Wheelchair-accessible fitness center + - Wheelchair-accessible meeting spaces/business center + items: + type: string + description: The accessibility options available for the room. + example: Wheelchair-accessible on-site restaurant + MemberOnlyDealAvailable: + type: boolean + description: Indicates whether the property has member only deal rates available. + example: true + RoomTypes: + type: array + description: Container for all of available room types. + items: + $ref: "#/components/schemas/RoomType" + description: Container for information on each offered hotel. + HotelDetailsResponse: + type: object + properties: + Warnings: + type: array + description: > + There were some errors or events during the transaction, but the API + has still returned a response. + + + Container for all warnings. + items: + allOf: + - $ref: "#/components/schemas/Warning" + - properties: + Code: + description: > + The code of the warning. + + + Available values are: + + - PRICE_DECREASED: The price decreased after shopping. + + - PRICE_INCREASED: The price increased after shopping. + + - CURRENCY_CHANGE: You will be charged in a different currency. + OriginalPrice: + description: The original price from the Lodging Search API response. + NewPrice: + description: The new price. + ChangedAmount: + description: The difference between `OriginalPrice` and `NewPrice`. + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + StayDates: + allOf: + - $ref: "#/components/schemas/StayDates" + - description: Dates of the requested property stay. + - properties: + CheckInDate: + description: > + Check-in date for property stay in an ISO 8601 Date format + [YYYY-MM-DD]. + + + This parameter should be used in combination with the `checkOut` parameter. + + + The maximum advanced search window is 330 days in the future. + + + The maximum length of stay is 28 days. + CheckOutDate: + description: > + Checkout date for property stay in an ISO 8601 Date format + [YYYY-MM-DD]. + + + This parameter should be used in combination with the `checkIn` parameter. + + + The maximum advanced search window is 330 days in the future. + + + The maximum length of stay is 28 days. + LengthOfStay: + type: integer + description: The number of stay nights. + format: int32 + example: 3 + NumberOfRooms: + type: integer + description: Number of rooms requested. + format: int32 + example: 3 + Occupants: + type: array + description: | + Container for the list of rooms requested by the traveler. + + Occupancy for each room is specified in this node. + items: + allOf: + - $ref: "#/components/schemas/Occupant" + - description: | + Container for the list of rooms requested by the traveler. + + Occupancy for each room is specified in this node. + - properties: + Adults: + description: Specifies the number of adults staying in each room. + ChildAges: + description: Specifies the age(s) of each of the children staying in the room, + as well as the number of children in the room. + ValidFormsOfPayment: + type: array + description: Container for payment information. + items: + $ref: "#/components/schemas/ValidFormsOfPayment" + HotelDetails: + $ref: "#/components/schemas/Hotel" + HotelPolicies: + type: object + properties: + CheckInStartTime: + type: string + description: Beginning of the standard check-in window on the check in date, and + in the local time of the hotel. + example: 3 PM + CheckInEndTime: + type: string + description: End of the standard check-in window on the check in date, and in + the local time of the hotel. + example: 5 PM + SpecialCheckInInstructions: + type: array + description: Some special instructions needed care by customer when check in. + example: + - "Special Instructions: The check-in location differs from the + property location. To check in, go to 301 N Water St." + items: + type: string + description: > + Any special instructions that the guest would need to know in + order to check in. + + + Particularly important in a vacation rental property, as many of these do not have a hosted front desk as + + a hotel would. + example: "Special Instructions: The check-in location differs from the property + location. To check in, go to 301 N Water St." + CheckOutTime: + type: string + description: Customers must check out before this time on the check out date, + expressed in the local time of the hotel. + example: noon + PetPolicies: + type: array + description: The policy of the property toward having pets stay with guests. + example: + - Pets allowed, Up to 20 lb + items: + type: string + description: The policy of the property toward having pets stay with guests. + example: Pets allowed, Up to 20 lb + ChildrenAndExtraBedsPolicies: + type: array + description: The policy of the hotel for having children stay at the hotel, as + well as for including extra beds in the room. + example: + - Children are welcome, Cribs/infant beds (surcharge) + items: + type: string + description: Container for Hotel policy information. + HotelPropertyType: + type: object + properties: + Id: + type: integer + description: The id of hotel property type. + format: int32 + example: 13 + Name: + type: string + description: The name of hotel property type. + example: Ranch + description: > + Container for information on hotel property type. + + + You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + Link: + type: object + properties: + Accept: + type: string + description: The Accept request header (for API queries only - not included for + page URLs). + Method: + type: string + description: Method of request. + Href: + type: string + description: The URL of the destination web page or API query. + Location: + type: object + properties: + Address: + $ref: "#/components/schemas/Address" + GeoLocation: + allOf: + - $ref: "#/components/schemas/GeoLocation" + - description: Container for information on the geographic location of the hotel. + - properties: + Latitude: + type: string + description: > + The geographic coordinates of the hotel property, based on a + horizontal angular measurement relative to The Equator. + + + North latitude will be represented by a positive value. + + + South latitude will be represented by a negative value. + example: "38.184978" + Longitude: + type: string + description: > + The geographic coordinates of the hotel property, based on a + vertical angular measurement relative to the universal Prime + Meridian (Royal Observatory, Greenwich). + + + East longitude will be represented by a positive value. + + + West longitude will be represented by a negative value. + example: "85.7412" + Obfuscated: + type: boolean + description: > + Indicates whether the displayed Latitude/Longitude + information is obfuscated. + + + Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search + + or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long + + value will be returned that will indicate the general area within which the property is located, + + but not the exact location of the property itself. + Neighborhood: + $ref: "#/components/schemas/Neighborhood" + description: Container for list of possible locations that could be used to + disambiguate the query. + LodgingAmenity: + type: object + properties: + Id: + type: string + example: "2065" + Name: + type: string + example: Business center + MandatoryFeesDetail: + type: object + properties: + Type: + type: string + description: Type of mandatory fee. + enum: + - City_LocalTax_Amt + - City_LocalTax_Pcnt + - CleaningFee_Amt + - CleaningFee_Pcnt + - ClubCardAdult + - ClubCardChild + - DestinationFee_Amt + - DestinationFee_Pcnt + - GalaDinnerAdult + - GalaDinnerChild + - GalaDinnerChineseNYAdult + - GalaDinnerChineseNYChild + - GalaDinnerNYDayAdult + - GalaDinnerNYDayChild + - GalaDinnerNYEveAdult + - GalaDinnerNYEveChild + - GalaDinnerValentinesDayAdult + - GalaDinnerValentinesDayChild + - GalaDinnerXMASDayAdult + - GalaDinnerXMASDayChild + - GalaDinnerXMASEveAdult + - GalaDinnerXMASEveChild + - ResortFee_Amt + - ResortFee_Pcnt + - SanitationFee + - SeasonalHeatingFee + - TourismFee_Amt + - TourismFee_Pcnt + - TowelSheetsFee_Amt + - TransferFee_Amt_Adult + - TransferFee_Amt_Child + - UtilitySurcharge + example: TransferFee_Amt_Child + Amount: + allOf: + - $ref: "#/components/schemas/Money" + - description: Value of hotel mandatory fee. + description: The breakdown for the taxes and fees that must be paid at the property. + Media: + type: object + properties: + Type: + type: string + description: | + Supported type of media. + + 1=Image. + + Only 1 is supported now. + example: "1" + enum: + - 1 + Title: + type: string + description: Image title + example: Guestroom + Size: + type: string + description: > + Image size. + + You can find a link to the complete list of Supported Images Sizes in + + [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + example: t + Url: + type: string + description: Image URL + example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg + description: Container for hotel images + Money: + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: "#/components/schemas/Money" + description: Pricing information of the stat date + Neighborhood: + type: object + properties: + Id: + type: string + description: Neighborhood id. + example: "6160232" + Name: + type: string + description: Neighborhood name. + example: Le Pharo + description: Geography entities which are typically contained within a city. + This includes the categories neighborhood and point of interest. Low + level regions are not a formally defined concept in the geography model. + NightlyRates: + type: object + properties: + StayDate: + type: string + format: date + example: 2022-07-19T00:00:00.000Z + BaseRate: + $ref: "#/components/schemas/Money" + NonRefundableDateRange: + type: object + properties: + StartDate: + type: string + description: Start date of a non-refundable date range. + format: date + example: 2022-07-04T00:00:00.000Z + EndDate: + type: string + description: End date of a non-refundable date range. + format: date + example: 2022-07-05T00:00:00.000Z + Occupant: + type: object + properties: + Adults: + type: integer + description: | + The number of adults in a room. + format: int32 + example: 1 + ChildAges: + type: array + description: | + The ages of children in a room. + example: + - 2 + - 3 + - 5 + items: + type: integer + description: | + The age of children in a room. + format: int32 + description: Container for the list of room occupants. + PaymentSchedule: + type: object + properties: + Due: + type: string + description: Date/Time stamp when this installment/deposit should be paid by. + format: date + example: 2022-09-03T00:00:00.000Z + Price: + allOf: + - $ref: "#/components/schemas/Money" + - description: The monetary amount of the install/deposit required to book the + hotel and product. + description: Contains information on the payment schedule. + Phone: + type: object + properties: + CountryCode: + type: string + description: The designated country calling code. + example: "1" + AreaCode: + type: string + description: The phone's area code. + example: "614" + Number: + type: string + description: The phone's local number. + example: "9288472" + ExtensionNumber: + type: string + description: Optional extension number, if required to reach the hotel. + example: "3114" + Promotion: + type: object + properties: + Description: + type: string + description: The description of the promotion. + example: 20%Off + Amount: + allOf: + - $ref: "#/components/schemas/Money" + - description: > + The value of the promotion. + + + **CMA Compliance Note (UK)**: Both standard room rates and promotional rates are set and managed by the + + hoteliers and not Expedia. + PropertyDetails: + type: object + properties: + PropertyRegistryNumber: + type: string + description: The registry number of property. + example: P-20131 + HostLanguages: + type: array + description: The languages the host of property will speak. + example: + - English + - Chinese + items: + type: string + MaxOccupancy: + type: integer + description: The maximum number of guests allowed to stay in the property. + format: int32 + example: 12 + NumberOfBedrooms: + type: integer + description: The number of bedrooms in the property. + format: int32 + example: 4 + NumberOfBathrooms: + type: integer + description: The number of bathrooms in the property. + format: int32 + example: 1 + SquareFeet: + type: string + description: Property area in square feet. + example: "123.5" + PropertyManager: + $ref: "#/components/schemas/PropertyManager" + description: > + Container for information about the hotel property detail. It will be + shown for Vacation Rental hotel only. + PropertyManager: + type: object + properties: + Name: + type: string + description: The name of the property manager. + example: Mike + CalendarLastUpdated: + type: string + description: The latest updated date. + format: date + PhotoUrl: + type: string + description: The URL for property manager's photo. + example: https://imagesus-ssl.homeaway.com/mda01/ff30bc14-157c-43fc-ad8c-d2ce36bc7e83.4.1 + description: Container for information about the property manager. It will be + shown for Vacation Rental hotel only. + RatePlan: + type: object + properties: + RoomTypeId: + type: string + description: The room type identifier. + example: "200287452" + RatePlanId: + type: string + description: The rate plan identifier. + example: "201714191" + RateRuleId: + type: string + description: The identifier of rate rule. + example: "213544817" + InventorySourceId: + type: string + description: The identification number of the source that provides the rate plan. + example: "24" + InventorySourceCode: + type: string + description: The source name that provided the rate plan. + example: JT + StayDates: + $ref: "#/components/schemas/StayDates" + RemainingCount: + type: integer + description: > + The number of rooms remaining through Expedia for this room type. + + + **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, + + only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's + + inventory. + + + When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel + + through other channels. + + + Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are + + more than 100 rooms available within bookable Expedia inventory. + + + **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to + + consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number + + remaining at the property. + format: int32 + example: 3 + Price: + type: object + description: Container for all price components of the rate plan. + properties: + BaseRate: + allOf: + - $ref: "#/components/schemas/Money" + description: The price of the rate plan for all occupants, excluding taxes and + fees. + TaxesAndFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The total rate of taxes and fees of the rate plan for all + occupants. + TotalPrice: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total price of the rate plan, which is equal to the sum of + `BaseRate` + `TaxesAndFees`. + + Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. + + Promotion amount have been deducted from the `TotalPrice` value. + TotalStrikeOutPrice: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total amount to strikeout price. This value is the sum of + the pre-discount `BaseRate` + the + + pre-discount `TaxesAndFees`. + AvgNightlyRate: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average nightly base rate per night per room of the rate + plan, which is equal to the `BaseRate` + + divided by `StayDates` and by `room number`. + AvgNightlyStrikeOutRate: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average nightly strike out price per night per room of the + rate plan, which is equal to the + + strike out of `BaseRate` divided by `StayDates` and by `room number`. + HotelMandatoryFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The total mandatory fees which will be charged at the hotel for the + rate plan. + RefundableDamageDeposit: + allOf: + - $ref: "#/components/schemas/Money" + description: The refundable damage deposit. + NightlyRates: + type: array + items: + allOf: + - $ref: "#/components/schemas/NightlyRates" + - properties: + StayDate: + description: A single night during the requested stay. + BaseRate: + description: Container for nightly base rate. + description: Nightly base rate of the rate plan. + TaxesAndFeesDetails: + type: array + items: + allOf: + - $ref: "#/components/schemas/TaxesAndFeesDetail" + - properties: + CategoryCode: + description: Category ID of this specific tax or fee. + Amount: + description: The value of this specific tax or fee. + description: > + Container for taxes and fees detail information. + + Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + RoomRates: + type: array + items: + allOf: + - $ref: "#/components/schemas/RoomRates" + description: Container for the rate information of all rooms. This is only + returned in Lodging Details API. + MemberOnlyDeal: + type: boolean + description: > + Indicates whether the rate is for member only. + + + Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + example: true + Promotions: + type: array + description: All promotion information of the `ratePlan`. + items: + $ref: "#/components/schemas/Promotion" + StandalonePrice: + type: object + description: > + The corresponded standalone price to the package rate plan (to show + the `strikethrough`). + + + Only returned when the returned `rateplan` is being used as part of a package. + properties: + BaseRate: + allOf: + - $ref: "#/components/schemas/Money" + description: The standalone price of the rate plan for all occupants, excluding + taxes and fees. + StrikeOutBaseRate: + allOf: + - $ref: "#/components/schemas/Money" + description: The base rate strikeout in the standalone shopping path. + TaxesAndFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The total standalone rate of taxes and fees of the rate plan for + all occupants. + StrikeOutTaxesAndFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The taxes and fees strikeout in the standalone shopping path. + TotalPrice: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total standalone price of the rate plan, which is equal to + the sum of `BaseRate` and `TaxesAndFees`. + + Hotel mandatory fees are not included as these are paid at the hotel at checkout. + TotalStrikeOutPrice: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total strikeout in the standalone shopping path, which is + equal to the sum of `StrikeOutBaseRate` and + `StrikeOutTaxesAndFees`. + AvgNightlyRate: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average standalone nightly base rate per night per room of + the rate plan, which is equal to the + + `BaseRate` divided by `StayDates` and by `room number`. + AvgNightlyStrikeOutRate: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average strikeout of the base rate in the standalone + shopping path, which is per night per room and is equal to + + `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + HotelMandatoryFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The total standalone mandatory fees. + StrikeOutHotelMandatoryFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The strikeout of the mandatory fees in the standalone shopping + path. + TaxesAndFeesInclusive: + type: boolean + description: Indicates whether taxes and fees are included in base rate. + example: false + GuaranteeText: + type: string + description: Text description for any deposit information provide by the + property (if applicable). + example: Price Guarantee + PaymentMethod: + type: string + description: > + Room payment information. The available options are: + + - Online: Pay at the time of booking + + - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` + example: Online + enum: + - Online + - Hotel + PaymentTime: + type: string + description: > + The time when the booking amount will be charged on the traveler’s + credit card. Valid values are as follows: + + - UponBooking + + - PayLater + + - SupplierDiscretion + example: PayLater + enum: + - UponBooking + - PayLater + - SupplierDiscretion + FullDepositUponBooking: + type: boolean + description: > + It will be true if PaymentSchedule has one installment and the value + of "Due" is booking date, otherwise, + + it will be false. + example: true + PaymentSchedule: + type: array + description: Contains information on the payment schedule. + items: + $ref: "#/components/schemas/PaymentSchedule" + ReserveWithDeposit: + type: boolean + description: Indicates whether this rate plan need deposit to reserve. + example: true + FreeInternet: + type: boolean + description: Indicates whether the price of the room includes free Internet. + (either wireless or wired) + example: true + FreeWiFi: + type: boolean + description: Indicates whether the price of the room includes free wireless + Internet access. + example: true + FreeInternetDetails: + type: array + description: > + The localized details for the free internet amenity (only shown when + FreeInternet = true). + + + You can find a link to the complete list of Free Internet Details in + + [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + example: + - Free Wireless Internet, Wired high-speed Internet-comp + items: + type: string + description: The localized details for the free internet amenity (only shown + when FreeInternet = true). + example: Free Wireless Internet, Wired high-speed Internet-comp + FreeParking: + type: boolean + description: Indicates whether the price of the room includes free parking. + example: true + FreeBreakfast: + type: boolean + description: Indicates whether the price of the room includes free breakfast. + example: true + FreeBreakfastDetails: + type: array + description: > + The localized details for the free breakfast amenity (only shown + when FreeBreakfast = true). + + + You can find a link to the complete list of Free Breakfast Details in + + [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + example: + - Full Breakfast + - Full Board + items: + type: string + description: The localized details for the free breakfast amenity (only shown + when FreeBreakfast = true). + example: Full Breakfast + HcomRewardsEarn: + type: boolean + description: Indicate whether the room qualifies for Hcom Rewards Earn. + (Hotels.com partners only) + example: true + HcomRewardsBurn: + type: boolean + description: Indicate whether the room qualifies for Hcom Rewards Burn. + (Hotels.com partners only) + example: true + CancellationPolicy: + $ref: "#/components/schemas/CancellationPolicy" + Amenities: + type: array + description: The amenities of the `rateplan`. + items: + allOf: + - $ref: "#/components/schemas/LodgingAmenity" + - description: The amenities of the `rateplan`. + - properties: + Id: + description: Amenity ID. + Name: + description: Amenity Name. + description: Container for information on each rate plan. + RoomOccupancyPolicy: + type: object + properties: + MaxGuestCount: + type: integer + description: The maximum number of guests allowed to stay in a room. + format: int32 + example: 3 + MinCheckInAge: + type: integer + description: The minimum age required for check-in. + format: int32 + example: 19 + IncludedGuestCount: + type: integer + description: The number of guests included in base rate. + format: int32 + example: 2 + MinGuestAge: + type: integer + description: The minimum age required for any guest staying in the room. + format: int32 + example: 0 + AgeClassRestrictions: + type: array + description: Container for room occupancy rules based on the age of the guests. + items: + $ref: "#/components/schemas/AgeClassRestriction" + description: Room occupancy policy. + RoomPreference: + type: object + properties: + Type: + type: string + description: |- + The type of preference. Options are: + SmokingPreference + Bed + example: SmokingPreference + enum: + - SmokingPreference + - Bed + Value: + type: string + description: >- + The value of the room preference. + + + For SmokingPreference, options are + + + SmokingOrNonSmoking + + Smoking + + NonSmoking + + For supported Bed Types, please refer to the Related Links section at the bottom of the page. + example: NonSmoking + description: Container for room preferences. + RoomRates: + type: object + properties: + RoomIndex: + type: integer + description: Index of which of the requested rooms this entry refers to. + format: int32 + example: 1 + BaseRate: + allOf: + - $ref: "#/components/schemas/Money" + - description: The price of the room, excluding taxes and fees. + TaxesAndFees: + allOf: + - $ref: "#/components/schemas/Money" + - description: The total rate of taxes and fees of the room. + TotalPrice: + allOf: + - $ref: "#/components/schemas/Money" + - description: > + The total price of the room, which is equal to the sum of the + `BaseRate` and `TaxesAndFees`. + + + Hotel mandatory fees are not included as these are paid at the property at checkout. + TotalStrikeOutPrice: + allOf: + - $ref: "#/components/schemas/Money" + - description: > + The total strike out price of the room, which is equal to the + sum of the `BaseRate`'s totalStrikeOut + + and `TaxesAndFees`'s totalStrikeOut. + TaxesAndFeesDetails: + type: array + description: > + The breakdown for taxes and fees for this room for the entire stay. + + + Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + items: + allOf: + - $ref: "#/components/schemas/TaxesAndFeesDetail" + - properties: + CategoryCode: + description: Tax or fee category code. + Amount: + description: Tax or fee value. + MandatoryFeesDetails: + type: array + description: The breakdown for the taxes and fees that must be paid at the + property. + items: + $ref: "#/components/schemas/MandatoryFeesDetail" + NightlyRates: + type: array + description: Container for the nightly rate of current room. + items: + allOf: + - $ref: "#/components/schemas/NightlyRates" + - description: Container for the nightly rate of current room. + - properties: + StayDate: + description: One date of the property stay + BaseRate: + description: Nightly Base Rate for the selected date of stay. + RoomType: + type: object + properties: + Description: + type: string + description: Text description of the room type. + example: Room, 1 King Bed, City View (Seattle V) + RoomKey: + type: string + description: > + An encrypted string which includes the information that could be + used to address the current room type. + + + `RoomKey` has been renamed as `OfferId`. + deprecated: true + OfferId: + type: string + description: An encrypted string which includes the information that could be + used to address the current room type. + example: wMRoCMjQqCDIwMTcwN + MerchantName: + type: string + description: Name of Merchant that did the initial Authentication. + example: EXPEDIA + RatePlanType: + type: string + description: | + Indicate the room type is sold as package or standalone. + example: package + enum: + - standalone + - package + - wholesale + RatePlans: + type: array + description: Container for rate plan information. + items: + $ref: "#/components/schemas/RatePlan" + Price: + type: object + description: Container of all price components of the room. + properties: + BaseRate: + allOf: + - $ref: "#/components/schemas/Money" + description: The price of the rate plan for all occupants, excluding taxes and + fees. + TaxesAndFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The total rate of taxes and fees of the rate plan for all + occupants. + TotalPrice: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total price of the rate plan, which is equal to the sum of + `BaseRate` and `TaxesAndFees`. Hotel + + mandatory fees are not included as these are paid at the hotel at checkout. + TotalStrikeOutPrice: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total strike out price of the rate plan, which is equal to + the sum of `BaseRate`'s + + `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. + AvgNightlyRate: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average nightly base rate per night per room of the room + type, which is equal to the `BaseRate` + + divided by `StayDates` and by `room number`. + AvgNightlyStrikeOutRate: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average nightly strike out rate per night per room of the + room type, which is equal to the + + strike out of `BaseRate` divided by `StayDates` and by `room number`. + AvgNightlyRateWithFees: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average nightly rate per night per room of the room type, + including all fees except those imposed by the government. + AvgNightlyStrikeoutRateWithFees: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average nightly strike out rate per night per room of the + room type, including all fees except those imposed by the + government. + HotelMandatoryFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The total mandatory fees which will be charged at the hotel for the + rate plan. + TotalPriceWithHotelFees: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total combined price that includes `TotalPrice` that will be + charged by Expedia (`BaseRate` + + + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. + + **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the + + quoted price will only be accurate for the day of quote. This is due to the fact that + + currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to + + be collected at the hotel during the guest's stay if the cost is converted into any other currency. + + **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to + + be compliant with CMA requirements. + RefundableDamageDeposit: + allOf: + - $ref: "#/components/schemas/Money" + description: The refundable damage deposit for the rate plan. + StandalonePrice: + type: object + description: > + The corresponded standalone price to the package rate plan (to show + the `strikethrough`). + + + Only returned when this is a package rate plan. + properties: + BaseRate: + allOf: + - $ref: "#/components/schemas/Money" + description: The standalone price of the rate plan for all occupants, excluding + taxes and fees. + StrikeOutBaseRate: + allOf: + - $ref: "#/components/schemas/Money" + description: The base rate strikeout in the standalone shopping path. + TaxesAndFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The total standalone rate of taxes and fees of the rate plan for + all occupants. + StrikeOutTaxesAndFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The taxes and fees strikeout in the standalone shopping path. + TotalPrice: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total standalone price of the rate plan, which is equal to + the sum of `BaseRate` and `TaxesAndFees`. + + Hotel mandatory fees are not included as these are paid at the hotel at checkout. + TotalStrikeOutPrice: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The total strikeout in the standalone shopping path, which is + equal to the sum of `StrikeOutBaseRate` and + `StrikeOutTaxesAndFees`. + AvgNightlyRate: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average standalone nightly base rate per night per room of + the rate plan, which is equal to the + + `BaseRate` divided by `StayDates` and by `room number`. + AvgNightlyStrikeOutRate: + allOf: + - $ref: "#/components/schemas/Money" + description: > + The average strikeout of the base rate in the standalone + shopping path, which is per night per room and is equal to + + `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + HotelMandatoryFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The total standalone mandatory fees. + StrikeOutHotelMandatoryFees: + allOf: + - $ref: "#/components/schemas/Money" + description: The strikeout of the mandatory fees in the standalone shopping + path. + "Promotions [deprecated]": + type: array + description: > + All promotion information of the room. + + + **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. + deprecated: true + items: + $ref: "#/components/schemas/Promotion" + Links: + type: object + properties: + WebSearchResult: + allOf: + - $ref: "#/components/schemas/Link" + - description: Link to web search result page. + WebDetails: + allOf: + - $ref: "#/components/schemas/Link" + - description: Link to web infosite. + ApiDetails: + allOf: + - $ref: "#/components/schemas/Link" + - description: Link for details API. + additionalProperties: + $ref: "#/components/schemas/Link" + description: > + Container for list of HATEOAS links to either Expedia website or + additional Expedia APIs to complete booking + + of the selected offer. + + + Which links are returned in this section are defined by the `links` parameter in the Search API query. + + + Available links are: + + - WebSearchResult (link to web search result page) + + - WebDetails (link to web infosite) + + - ApiDetails (link for details API) + SmokingOption: + type: string + description: The smoking options available for the room type. + example: SmokingOrNonSmoking + enum: + - SmokingOrNonSmoking + - Smoking + - NonSmoking + BedTypeOptions: + type: array + description: > + Statement of bed types available for this offer. A room may have + several bed type options available. + + + **NOTE**: due to the large number of bed type options available, we no longer publish a list of available + + bed types. More information is available in + + [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + items: + $ref: "#/components/schemas/BedType" + RoomOccupancyPolicy: + $ref: "#/components/schemas/RoomOccupancyPolicy" + Amenities: + type: array + description: Container for all room amenities. + items: + allOf: + - $ref: "#/components/schemas/LodgingAmenity" + - description: The amenity of the room. + - properties: + Id: + description: Amenity id + Name: + description: Amenity name + DescriptiveAmenities: + type: object + additionalProperties: + type: array + items: + type: string + description: > + Container for all room amenities in group. + + + The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: + + - ACCESSIBILITY + + - BATHROOM + + - BEDROOM + + - CLUB_EXEC + + - FAMILY_FRIENDLY + + - ENTERTAINMENT + + - FOOD_AND_DRINK + + - INTERNET + + - MORE + + - OUTDOOR_SPACE + + - SAFETY + example: + FOOD_AND_DRINK: + - 2 restaurants + - Coffee/tea in common area(s) + Media: + type: array + description: Container for Media elements. + items: + allOf: + - $ref: "#/components/schemas/Media" + - description: Media elements. + StayDates: + type: object + properties: + CheckInDate: + type: string + description: The initial day of the hotel stay in an ISO 8601 Date format + [YYYY-MM-DD]. + format: date + CheckOutDate: + type: string + description: The final day of the hotel stay in an ISO 8601 Date format + [YYYY-MM-DD]. + format: date + description: Container for information for the stay dates of the rate plan. + TaxesAndFeesDetail: + type: object + properties: + CategoryCode: + type: string + example: "401" + Amount: + $ref: "#/components/schemas/Money" + ValidFormsOfPayment: + type: object + properties: + PaymentMethod: + type: string + description: The payment method. + example: DebitCard + Name: + type: string + description: The brand name of the payment sub-method to be displayed to the + customer. + example: Visa + PaymentSubMethod: + type: string + description: The payment sub-method. + example: Visa + deprecated: true + BrandName: + type: string + description: > + The brand name of the payment sub-method to be displayed to the + customer. + + + In many cases it will be the same as the payment sub-method, but "Visa/Carte Blanche" and "Visa/Delta" are some of the exceptions. + example: Visa + deprecated: true + description: Container for hotel supported payment information. + Warning: + type: object + properties: + Code: + type: string + description: The code of a warning. + example: INVALID_CORPORATE_DISCOUNT_CODE + Description: + type: string + description: A detail information of what happened. + example: The Corporate DiscountCode '811490' is unavailable, but we found other + rates for you. + OriginalPrice: + $ref: "#/components/schemas/Money" + NewPrice: + $ref: "#/components/schemas/Money" + ChangedAmount: + $ref: "#/components/schemas/Money" + ChangedPercentage: + type: string + description: |- + The changed percentage. + In the sample 2.97 means the changed percentage is 2.97%. + example: "2.97" + description: > + There were some errors or events during the transaction, but the API has + still returned a response. + + + Container for all warnings. + When: + type: object + properties: + Type: + type: string + description: >- + Indicates the time of the deposit collection. + + Options are: + + UPON_BOOKING + + The customer must pay the deposit when booking the property. + + DAYS_PRIOR + + The customer must pay the deposit a number of days before arriving at the property. + + UPON_ARRIVAL + + The customer must pay the deposit upon arriving at the property. + example: UPON_BOOKING + enum: + - UPON_BOOKING + - DAYS_PRIOR + - UPON_ARRIVAL + Value: + type: string + description: This value will only be shown when Deposit Type is DAYS_PRIOR to + indicate the number of days prior to check in when the deposit will + be collected. + example: "1" + description: Indicate when to pay. + Error: + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + DetailCode: + type: string + description: Detailed error code describing the issue. + example: MULTIPLE_AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: More than one location found + LocationKeyword: + type: string + description: The requested location that caused the error. + example: Portland + LocationOptions: + type: array + description: Container for possible matches to your ambiguous `locationKeyword` + query. + items: + $ref: "#/components/schemas/LocationOption" + description: Container for error list. + Errors: + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: "#/components/schemas/Error" + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + LocationOption: + type: object + properties: + Type: + type: string + description: Type of the location. + example: TRAINSTATION + RegionId: + type: string + description: RegionId the location resides in. + example: "6200275" + ShortName: + type: string + description: The name of the location which matches the location keyword. + example: Dublin Connolly Station + AirportCode: + type: string + description: Indicates the nearest major airport to the location. + example: DUB + Address: + type: string + description: The address of the location. + example: Dublin Connolly Station, Ireland + Country: + $ref: "#/components/schemas/Country" + GeoLocation: + $ref: "#/components/schemas/GeoLocation" + description: Container for possible matches to your ambiguous `locationKeyword` query. + APIGatewayError: + type: object + properties: + message: + type: string + HotelListingsResponse: + type: object + properties: + Warnings: + type: array + description: > + There were some errors or events during the transaction, but the API + has still returned a response. + + + Container for all warnings. + items: + $ref: "#/components/schemas/Warning" + Count: + type: integer + description: The number of hotels actually returned in the response. + format: int32 + example: 99 + TotalHotelCount: + type: integer + description: The number of hotels present in the location. + format: int32 + example: 230 + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + StayDates: + allOf: + - $ref: "#/components/schemas/StayDates" + - description: Container for requested dates of stay. + LengthOfStay: + type: integer + description: The number of stay nights. + format: int32 + example: 3 + NumberOfRooms: + type: integer + description: The number of the rooms requested on behalf of the user. + format: int32 + example: 3 + Occupants: + type: array + description: Container of occupants. It is an array including occupants of each + room. + items: + $ref: "#/components/schemas/Occupant" + Hotels: + type: array + description: Container for all hotels. + items: + $ref: "#/components/schemas/Hotel" + HotelRateCalendar: + type: object + properties: + EcomHotelId: + type: string + description: The unique, Expedia-specific hotel property identifier used to + designate a single hotel. + example: "14747" + HcomHotelId: + type: string + description: > + The unique, Hotels.com-specific hotel property identifier used to + designate a single hotel. + + + This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. + example: "10532" + RateCalendar: + type: array + description: Container for all rate calendar data. + items: + $ref: "#/components/schemas/RateCalendar" + description: Container for all hotel rate calendar data. + RateCalendar: + type: object + properties: + StayDate: + type: string + description: Stay date for which the price is returned. + format: date + example: 2022-09-02T00:00:00.000Z + Price: + allOf: + - $ref: "#/components/schemas/Money" + - description: Container for pricing information. + - properties: + Value: + description: The total price of the corresponding date. + Currency: + description: > + The ISO 4217 Currency Code that the Value is expressed in. + + + See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) + + for a full list of supported currencies. + PriceLevel: + type: string + description: > + Indicates how that day's price compares to the other lowest price + for that hotel over the searched date + + range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: + + - HIGH: 65th percentile+ + + - MEDIUM: 30th Percentile+ + + - LOW: Anything lower than 30th percentile + example: MEDIUM + enum: + - HIGH + - MEDIUM + - LOW + Status: + type: string + description: Represents whether the offer is currently available. + enum: + - AVAILABLE + - NOT_AVAILABLE + example: AVAILABLE + description: The lowest rate information of requested days + RateCalendarResponse: + type: object + properties: + Warnings: + type: array + description: > + There were some errors or events during the transaction, but the API + has still returned a response. + + + Container for all warnings. + items: + $ref: "#/components/schemas/Warning" + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + RateCalendars: + type: array + description: Container for all hotel rate calendar data. + items: + $ref: "#/components/schemas/HotelRateCalendar" + LodgingCancellationPenaltyRule: + type: object + properties: + PenaltyPercentOfStay: + type: string + description: > + Specifies the per-stay cancellation fee charged as a percentage of + the total rate, in addition to any other + + penalties listed. + example: "100" + PenaltyStartDateTime: + type: string + description: > + The beginning of the window of time when the + `CancellationPenaltyRule` is in effect. + + + The date and time are expressed in ISO 8601 International Date format, and local to the property. + format: date-time + example: 2022-07-23T23:00:00.000Z + PenaltyEndDateTime: + type: string + description: > + The end of the window of time when the `CancellationPenaltyRule` is + in effect. + + + The date and time are expressed in ISO 8601 International Date format, and local to the property. + format: date-time + example: 2022-07-25T23:00:00.000Z + description: Container for cancellation penalty details. + LodgingCancellationPolicy: + type: object + properties: + Refundable: + type: boolean + description: Indicate whether the rate is refundable or not. + example: true + FreeCancellation: + type: boolean + description: Indicate whether the room can be cancelled free of charge. + example: true + FreeCancellationEndDateTime: + type: string + description: The date and time until which the room can be cancelled free of + charge. + format: date-time + CancellationPenaltyRules: + type: array + description: Container for Cancellation Penalty Rules information. + items: + $ref: "#/components/schemas/LodgingCancellationPenaltyRule" + description: Container for Cancellation Policy information. + Property: + type: object + properties: + Id: + type: string + description: The unique property identifier used to designate a single property. + example: "14747" + Status: + type: string + description: Represents whether the offer is currently available. + example: AVAILABLE + enum: + - AVAILABLE + - NOT_AVAILABLE + - ERROR + - NUMBER_OF_ADULTS_NOT_ACCEPTED + - NUMBER_OF_CHILDREN_NOT_ACCEPTED + - NUMBER_OF_INFANTS_NOT_ACCEPTED + - NUMBER_OF_PERSONS_NOT_ACCEPTED + - CHECK_IN_AGE_NOT_ACCEPTED + RoomTypes: + type: array + description: Container for all of available room types. + items: + $ref: "#/components/schemas/LodgingRoomType" + description: Container for information on each offered hotel. + LodgingLink: + type: object + properties: + Accept: + type: string + description: > + The Accept request header for API queries only. + + + Note: this value will only be returned if the link is an API query, as website URLs do not require an + + `Accept` header. + Method: + type: string + description: Method of request. + example: GET + Href: + type: string + description: The URL of the destination web page or API query. + LodgingMoney: + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + description: Pricing information of the stat date + LodgingOccupant: + type: object + properties: + Adults: + type: integer + description: The number of adults in a room. + format: int32 + example: 1 + ChildAges: + type: array + description: The ages of children in a room. + example: + - 2 + - 3 + - 5 + items: + type: integer + format: int32 + LodgingPromotion: + type: object + properties: + Description: + type: string + description: The description of the promotion. + example: 20%Off + Amount: + $ref: "#/components/schemas/LodgingMoney" + LodgingRatePlan: + type: object + properties: + CancellationPolicy: + $ref: "#/components/schemas/LodgingCancellationPolicy" + Promotions: + type: array + description: All promotion information of the ratePlan. + items: + $ref: "#/components/schemas/LodgingPromotion" + description: Container for rate plan information. + LodgingRoomType: + type: object + properties: + RatePlans: + type: array + description: Container for rate plan information. + items: + $ref: "#/components/schemas/LodgingRatePlan" + Price: + type: object + properties: + BaseRate: + allOf: + - $ref: "#/components/schemas/LodgingMoney" + description: The price of the rate plan for all occupants, excluding taxes and + fees. + TaxesAndFees: + allOf: + - $ref: "#/components/schemas/LodgingMoney" + description: The total amount of taxes and fees of the rate plan for all + occupants. + TotalPrice: + allOf: + - $ref: "#/components/schemas/LodgingMoney" + description: > + The total price of the rate plan, which is equal to the sum of + `BaseRate` + `TaxesAndFees`. + + Property mandatory fees are not included in this value as these are paid at the property at + + checkout. + AvgNightlyRate: + allOf: + - $ref: "#/components/schemas/LodgingMoney" + description: > + The average nightly base rate per night per room of the rate + plan, which is equal to the `BaseRate` + + divided by `StayDates` and by `room number`. + AvgNightlyRateWithFees: + allOf: + - $ref: "#/components/schemas/LodgingMoney" + description: > + The average nightly rate per night per room of the room type, + including all fees except those imposed by the government. + PropertyMandatoryFees: + allOf: + - $ref: "#/components/schemas/LodgingMoney" + description: The total mandatory fees which will be charged at the property for + the rate plan. + TotalPriceWithPropertyFees: + allOf: + - $ref: "#/components/schemas/LodgingMoney" + description: > + The total price of the rate plan include property mandatory + fees, which is equal to the sum of + + `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. + + **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the + + quoted price will only be accurate for the day of quote. This is due to the fact that + + currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to + + be collected at the hotel during the guest's stay if the cost is converted into any other currency. + + **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to + + be compliant with CMA requirements. + RefundableDamageDeposit: + allOf: + - $ref: "#/components/schemas/LodgingMoney" + description: The refundable damage deposit. + description: Container for Price information. + Links: + type: object + properties: + WebSearchResult: + allOf: + - $ref: "#/components/schemas/LodgingLink" + - description: Link to web search result page. + WebDetails: + allOf: + - $ref: "#/components/schemas/LodgingLink" + - description: Link to web infosite. + additionalProperties: + $ref: "#/components/schemas/LodgingLink" + description: > + Container for list of HATEOAS links to either Expedia website or + additional Expedia APIs to complete booking of the selected offer. + + + Which links are returned in this section are defined by the links parameter in the Search API query. + + Available links are: + + - WebDetails (link to web infosite) + + - WebSearchResult (link to web search result page) + LodgingStayDates: + type: object + properties: + CheckInDate: + type: string + description: The initial day of the property stay in an ISO 8601 Date format + [YYYY-MM-DD]. + format: date + CheckOutDate: + type: string + description: The final day of the property stay in an ISO 8601 Date format + [YYYY-MM-DD]. + format: date + description: | + Container for requested dates of stay. + LodgingWarning: + type: object + properties: + Code: + type: string + description: The code of a warning. + example: NO_RESULTS_FOUND + Description: + type: string + description: A description of what caused the issues. + example: > + Sorry, your query completed successfully, but did not return any + inventory. Please adjust your + + search parameters and try again. + LodgingError: + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: "Multiple pickup locations found. " + description: Container for error list. + LodgingErrors: + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: "#/components/schemas/LodgingError" + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + LodgingQuotesResponse: + type: object + properties: + Warnings: + type: array + description: > + There were some errors or events during the transaction, but the API + has still returned a response. + + + Container for all warnings. + items: + $ref: "#/components/schemas/LodgingWarning" + Count: + type: integer + description: The number of properties actually returned in the response. + format: int32 + example: 99 + TotalPropertyCount: + type: integer + description: The number of properties requested. + format: int32 + example: 230 + TransactionId: + type: string + description: Unique identifier for the API transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + StayDates: + $ref: "#/components/schemas/LodgingStayDates" + LengthOfStay: + type: integer + description: The number of stay nights. + format: int32 + example: 3 + Occupants: + type: array + description: Container for the list of room occupants. + items: + $ref: "#/components/schemas/LodgingOccupant" + Properties: + type: array + description: Container for all properties. + items: + $ref: "#/components/schemas/Property" + DateRange: + type: object + description: The actual date range for the shown availability. + properties: + StartDate: + type: string + description: The initial day of the date range in an ISO 8601 Date format + [YYYY-MM-DD]. + example: 2022-07-05 + format: date + EndDate: + type: string + description: The final day of the date range in an ISO 8601 Date format + [YYYY-MM-DD]. + example: 2023-07-05 + format: date + AvailabilityCalendar: + type: object + properties: + PropertyId: + type: string + description: The unique property identifier that designates a single property. + example: "74041788" + DateRange: + $ref: "#/components/schemas/DateRange" + Availability: + type: string + description: > + A string of codes that shows property availability, one for every + day in the specified date range. + + + Valid values include Y (available) and N (unavailable). + + + ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands + + for the `EndDate`.* + example: YYYYYYNNNNNN + ChangeOver: + type: string + description: > + A string of codes that shows changeover action, one for every day in + the specified date range. + + + Valid values include + + - X (no action possible) + + - C (check-in, checkout) + + - O (checkout only) + + - I (check-in only) + + ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one + + stands for the `EndDate`. All actions are possible if not returned.* + example: XXIIICCCOOCC + MinPriorNotify: + type: string + description: > + A comma-separated list of numbers that shows how many days before a + reservation the booking must occur, one + + for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification + + required for a given day. The unit is always day. + + + ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` + + and the last one stands for the `EndDate`. No limitation if not returned.* + example: 1,1,1,1,1,1,1,1,1,1,1,1,1 + MinStay: + type: string + description: > + A comma-separated list of numbers that show the minimum number of + days a traveler can stay, one for every + + day in the specified date range. + + + Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. + + + ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last + + one stands for the `EndDate`. No limitation if not returned.* + example: 0,0,0,3,3,3,3,3,3,7,7,7,7,7,21,21,21 + MaxStay: + type: string + description: > + A comma-separated list of numbers that show the maximum number of + days a traveler can stay, one for every + + day in the specified date range. + + + Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. + + + ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the + + last one stands for the `EndDate`. No limitation if not returned. + example: 0,0,0,31,31,31,371,370 + AvailabilityCalendarResponse: + type: object + properties: + Warnings: + type: array + description: > + There were some errors or events during the transaction, but the API + has still returned a response. + + + Container for all warnings. + items: + $ref: "#/components/schemas/LodgingWarning" + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + AvailabilityCalendars: + type: array + description: A list of the calendar entities. + items: + $ref: "#/components/schemas/AvailabilityCalendar" + example: >- + { + "TransactionId": "f06edfa3-27f4-44e6-838c-b8dd3d0a3210", + "AvailabilityCalendars": [ + { + "PropertyId": "74041788", + "DateRange": { + "StartDate": "2022-02-25", + "EndDate": "2025-02-24" + }, + "Availability":"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", + "ChangeOver": "OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "MinStay": "3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3", + "MaxStay": "379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", + "MinPriorNotify": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" + }, + { + "PropertyId": "1", + "DateRange": { + "StartDate": "2022-02-27", + "EndDate": "2023-11-04" + }, + "Availability": "NNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" + }, + { + "PropertyId": "123", + "DateRange": { + "StartDate": "2022-02-27", + "EndDate": "2023-11-04" + }, + "Availability": "NNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", + "ChangeOver": "XXXXXXIIICCCCCCCCCCCCCCCCCCCCXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOXXXXXIIICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOO", + "MinStay": "0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,7,6,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,5,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,9,8,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0", + "MaxStay": "0,0,0,0,0,0,21,21,20,19,18,17,16,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,20,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,0,0,0,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,0,0,0", + "MinPriorNotify": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" + } + ] + } + AdditionalFee: + required: + - Amount + - FinanceCategory + - FinanceSubCategory + - IsRequired + type: object + properties: + IsRequired: + type: boolean + description: Indicates whether this additional fee is mandatory. + example: true + FinanceCategory: + type: string + description: Category of the fee / Coverages + example: Fee + FinanceSubCategory: + type: string + description: Sub category of the fee / Coverages . + example: Drop + Amount: + $ref: "#/components/schemas/CarsMoney" + Description: + type: string + description: Description of the fee. + example: DropOffCharge + Deductible: + $ref: "#/components/schemas/Deductible" + description: List of additional fees including both mandatory and optional + fees.such as young driver fee/drop off fee /CollisionDamageWaiver + CarsAddress: + required: + - Address1 + - City + - Country + type: object + properties: + Address1: + type: string + description: Street Number, Street Name, or PO Box + example: 724 Pine St + Address2: + type: string + description: "Apartment, Floor, Suite, Bldg # or more specific information about + Address1." + example: Second Floor + Suite: + type: string + description: Suite/apartment number + example: "123" + City: + type: string + description: The city + example: New York + Province: + type: string + description: The state or province + example: NY + Country: + type: string + description: 3-letter code for the country + example: USA + PostalCode: + type: string + description: Zip/postal code + example: "98004" + description: Address information + CarsCancellationPolicy: + type: object + properties: + Cancellable: + type: boolean + description: Indicates if this car can be cancelled (free cancel or penalty + cancel) + example: true + FreeCancellation: + type: boolean + description: Indicates if this car may be cancelled without a penalty. + example: true + FreeCancellationEndDateTime: + type: string + description: Indicates the latest time that the car can be cancelled for free. + format: date-time + PenaltyRules: + type: array + description: Container for penalty rules + items: + $ref: "#/components/schemas/PenaltyRule" + NonCancellableDateTimeRange: + $ref: "#/components/schemas/NonCancellableDateTimeRange" + description: Cancellation Policy Container. + Capacity: + required: + - AdultCount + type: object + properties: + AdultCount: + type: integer + description: The typical number of adults that can fit comfortably in the car. + format: int64 + example: 4 + ChildCount: + type: integer + description: The typical number of children that can fit comfortably in the car. + format: int64 + example: 0 + SmallLuggageCount: + type: integer + description: The typical number of small pieces of luggage that fit in the cargo + space. + format: int64 + example: 2 + LargeLuggageCount: + type: integer + description: The typical number of large pieces of luggage that fit in the cargo + space. + format: int64 + example: 2 + description: Capacity for car's properties. + Car: + required: + - CancellationPolicy + - DropOffDetails + - Id + - PickupDetails + - Price + - Supplier + - VehicleDetails + type: object + properties: + Id: + type: string + description: "Uniquely identifies a Car Offer.Note: since pay-online and + pay-at-the-counter Car Offers have the same associated Rate Code, + the Offer ID is the only unique identifier to differentiate between + the two offers when referencing or booking." + example: ECAR-39--1Trip-SEAC005-SEAC005 + DataTimeStamp: + type: string + description: DataTimeStamp + format: date-time + example: 2021-03-09T07:08:00Z + OnlineCheckIn: + type: boolean + description: Indicate whether the supplier supports online checkin + example: true + SkipTheCounter: + type: boolean + description: Indicate whether the supplier supports skip the counter + example: true + VehicleDetails: + $ref: "#/components/schemas/VehicleDetails" + Supplier: + $ref: "#/components/schemas/Supplier" + PickupDetails: + $ref: "#/components/schemas/VendorLocationDetails" + DropOffDetails: + $ref: "#/components/schemas/VendorLocationDetails" + Links: + type: object + additionalProperties: + $ref: "#/components/schemas/CarsLink" + description: A map of links to other Car APIs or Expedia websites. + xml: + wrapped: true + RateDetails: + $ref: "#/components/schemas/RateDetails" + Price: + $ref: "#/components/schemas/Price" + ReferencePrice: + $ref: "#/components/schemas/CarsMoney" + AdditionalFees: + type: array + description: List of additional fees including both mandatory and optional + fees.such as young driver fee/drop off fee /CollisionDamageWaiver + items: + $ref: "#/components/schemas/AdditionalFee" + CancellationPolicy: + $ref: "#/components/schemas/CarsCancellationPolicy" + NoShowPenalty: + $ref: "#/components/schemas/PenaltyType" + Images: + type: array + description: List of image resources of the car product. + items: + $ref: "#/components/schemas/Image" + Rating: + $ref: "#/components/schemas/RatingWithoutDetails" + description: List of cars matching the search criteria. + CarCategory: + required: + - Code + - Value + type: object + properties: + Code: + type: string + description: Car category code. + example: M + Value: + type: string + description: Car category value. + example: Mini + description: Car category. Please find list of Car Type Codes in + https://expediaintegration.zendesk.com/hc/en-us/articles/115008631767 + CarListingsResponse: + required: + - CarCount + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for warning codes + items: + $ref: "#/components/schemas/CarsWarning" + TransactionId: + type: string + description: A unique identifier for this transaction. + example: 1111111-2222-3333-4444-55555555555 + CarCount: + type: integer + description: The number of cars offers returned in the response. + format: int64 + example: 1 + Cars: + type: array + description: List of cars matching the search criteria. + items: + $ref: "#/components/schemas/Car" + xml: + name: CarListingsResponse + CarType: + required: + - Code + - Value + type: object + properties: + Code: + type: string + description: Car type code. + example: C + Value: + type: string + description: Car type value. + example: 2/4 Door + description: Car type. Please find list of Car Type Codes in + https://expediaintegration.zendesk.com/hc/en-us/articles/115002516708 + CarsCountry: + required: + - IsoCode2 + - IsoCode3 + - Name + type: object + properties: + Name: + type: string + description: country name + example: Ireland + Code: + type: string + description: 3-letter code for the country + example: IRL + IsoCode2: + type: string + description: 2-letter code for the country + example: IE + IsoCode3: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + CarsDateRange: + required: + - EndDate + - StartDate + type: object + properties: + StartDate: + type: string + description: Start date at pickup location of the period. + format: date + example: 2021-06-27 + EndDate: + type: string + description: End date at pickup location of the period. + format: date + example: 2021-06-28 + description: Date range of the period. + DateTimePeriod: + required: + - DateRange + type: object + properties: + DateRange: + $ref: "#/components/schemas/CarsDateRange" + TimeRanges: + type: array + description: A list of time range to indicate the operation hours of the date + range. + items: + $ref: "#/components/schemas/TimeRange" + description: A List of date time periods to indicate the vendor business hours + for the pickup time. + Deductible: + type: object + properties: + ExcessAmount: + $ref: "#/components/schemas/CarsMoney" + LiabilityAmount: + $ref: "#/components/schemas/CarsMoney" + DeductibleAmount: + $ref: "#/components/schemas/CarsMoney" + description: Indicate whether it is deductible + Discount: + required: + - Code + - Type + type: object + properties: + Type: + type: string + description: "Discount type. Supported values : CorpDiscount | Coupon." + example: CorpDiscount + Code: + type: string + description: Discount code. + example: G811490 + description: List of discount information. + CarsDistance: + required: + - Value + type: object + properties: + Value: + type: string + description: The number of miles/kilometers of the distance (specified by the + Unit). + example: "75" + Unit: + type: string + description: The unit (KM or MI) for the distance. + example: KM + Direction: + type: string + description: "The direction of the location from the search 'center'.Possible + values are: N,S,W,E,NW,NE,SW,SE" + example: N + description: The extra distance information. + ExtraCostPerDistance: + required: + - Cost + - Distance + type: object + properties: + Distance: + $ref: "#/components/schemas/CarsDistance" + Cost: + $ref: "#/components/schemas/CarsMoney" + description: Extra cost for each increment of distance used. + FuelAC: + required: + - Code + - Value + type: object + properties: + Code: + type: string + description: Car FuelAC code. + example: D + Value: + type: string + description: Car FuelAC value. + example: Diesel Air + description: Car fuel type and whether Air Conditioning is included. Please find + list of Car Fuel AC Codes in + https://expediaintegration.zendesk.com/hc/en-us/articles/115005378328 + CarsGeoLocation: + required: + - Latitude + - Longitude + type: object + properties: + Latitude: + type: string + description: Latitude of the location. + example: "38.184978" + Longitude: + type: string + description: Longitude of the location. + example: "85.7412" + Obfuscated: + type: boolean + description: Container for Geo location. + Image: + required: + - Href + - Size + - Type + type: object + properties: + Type: + type: string + description: Resource typeSupported values :Thumbnail - (70 pixels wide)Image - + (165 pixels wide) + Size: + type: string + description: Size of imageSupported values :s - (165 pixels wide)t - (70 pixels + wide) + Href: + type: string + description: URL for the image. + description: List of image resources of the car product. + CarsLink: + required: + - Href + type: object + properties: + Accept: + type: string + description: Accept header. + Method: + type: string + description: HTTP method to connect. + example: GET + Href: + type: string + description: HATEOAS URL to fetch details. + description: "A map of links to other Car APIs. possible link name: ApiBooking" + CarsLocation: + required: + - LocationId + type: object + properties: + Type: + type: string + description: The type of location code (MULTICITY | METROCODE). + example: MULTICITY + Id: + type: string + description: Expedia Region ID of the specified airport. + example: "6139103" + Name: + type: string + description: Location Name + example: Seattle-Tacoma International Airport + Code: + type: string + description: Location Code + example: SEA + LocationId: + type: string + description: Location id. + example: SEAT001 + Address: + $ref: "#/components/schemas/CarsAddress" + PointOfInterest: + type: string + GeoLocation: + $ref: "#/components/schemas/CarsGeoLocation" + Neighborhood: + $ref: "#/components/schemas/CarsNeighborhood" + RegionId: + type: integer + description: RegionId the location resides in. + format: int64 + example: 6200275 + Country: + $ref: "#/components/schemas/CarsCountry" + description: Container for list of possible locations that could be used to + disambiguate the query. + Mileage: + required: + - FreeDistance + - FreeDistanceRatePeriod + type: object + properties: + FreeDistance: + $ref: "#/components/schemas/CarsDistance" + FreeDistanceRatePeriod: + type: string + description: Rate period for free distance. + example: Daily + ExtraCostPerDistance: + $ref: "#/components/schemas/ExtraCostPerDistance" + description: A list of charges to be levied based on the mileage driven. + CarsMoney: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: "#/components/schemas/CarsMoney" + description: Price of Special equipment. + CarsNeighborhood: + required: + - Id + - Name + type: object + properties: + Id: + type: string + description: Neighborhood id. + example: "6160232" + Name: + type: string + description: Neighborhood name. + example: Le Pharo + description: Geography entities which are typically contained within a city. + This includes the categories neighborhood and point of interest. Low + level regions are not a formally defined concept in the geography model. + NonCancellableDateTimeRange: + required: + - EndDateTime + - StartDateTime + type: object + properties: + StartDateTime: + type: string + description: The time of this non-cancellable window starts + format: date-time + EndDateTime: + type: string + description: The time of this non-cancellable window ends + format: date-time + description: Container for non-cancellable date and time range element + PenaltyRule: + required: + - EndDateTime + - Penalty + - StartDateTime + type: object + properties: + Penalty: + $ref: "#/components/schemas/PenaltyType" + StartDateTime: + type: string + description: The time when this penalty window starts + format: date-time + EndDateTime: + type: string + description: The time when this penalty window ends + format: date-time + description: Container for penalty rules + PenaltyType: + required: + - Currency + - Type + - Value + type: object + properties: + Type: + type: string + description: "What the penalty amount is based on. should be one of the + following values:AMOUNT : it means the user is charged a fixed + amount specified in the value node. Say 50$ for example.PERCENT : it + means the user is charged a percentage of the base rate/total + rate.PERDAY : it means the user is charged Per Day Price. For eg.., + if the value is 2, it means the penalty amount will the Per day + price of 2 days." + Value: + type: string + description: Value to indicate how many/much of the type listed above is going + to be charged as a penalty. + example: "20.0" + Currency: + type: string + description: The currency of the amount, only valid when Type=AMOUNT + example: USD + description: Container for no show penalty element + Price: + required: + - TotalPrice + type: object + properties: + RatePeriodUnitPrice: + $ref: "#/components/schemas/CarsMoney" + BasePrice: + $ref: "#/components/schemas/CarsMoney" + TaxesAndFees: + $ref: "#/components/schemas/CarsMoney" + TotalPriceDueAtBooking: + $ref: "#/components/schemas/CarsMoney" + TotalPrice: + $ref: "#/components/schemas/CarsMoney" + description: Pricing information for the rental. + RateDetails: + required: + - PrePay + - RatePeriod + type: object + properties: + RatePeriod: + type: string + description: "Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend" + example: Daily + RateCode: + type: string + description: Rate plan identifier. + example: A3D10 + PrePay: + type: boolean + description: Indicates whether this reservation should be paid at the time of + booking (true) or at time of rental return (false). + example: false + CreditCardRequired: + type: boolean + description: Indicates whether credit card is required for booking. + example: false + Discounts: + type: array + description: List of discount information. + items: + $ref: "#/components/schemas/Discount" + Mileages: + type: array + description: A list of charges to be levied based on the mileage driven. + items: + $ref: "#/components/schemas/Mileage" + MobileRate: + type: boolean + description: Indicates whether car offer is mobile rate. + example: true + description: The rate detail information for a car offer. + Rating: + required: + - RatingPercentage + - RatingCount + type: object + properties: + RatingPercentage: + type: string + description: The percentage of rating. + example: 87% + RatingCount: + type: string + description: The total count of rating. + example: "2092" + RatingDetails: + type: array + description: List of all the details of rating. + items: + $ref: "#/components/schemas/RatingDetails" + description: The rating of the car being offered. + RatingWithoutDetails: + required: + - RatingPercentage + - RatingCount + type: object + properties: + RatingPercentage: + type: string + description: The percentage of rating. + example: 87% + RatingCount: + type: string + description: The total count of rating. + example: "2092" + description: The rating of the car being offered. + RatingDetails: + required: + - Category + - Percentage + type: object + properties: + Category: + type: string + description: The category of rating detail. + example: Pick-up location + Percentage: + type: string + description: The percentage of rating detail category. + example: "98" + description: List of all the details of rating. + Supplier: + required: + - Code + - Id + - Name + type: object + properties: + Id: + type: string + description: Supplier ID. + example: "3" + Name: + type: string + description: Supplier Name. + example: Advantage Rent-A-Car + Code: + type: string + description: Supplier Code. + example: AD + LogoImageUrl: + type: string + description: Supplier Logo Image Url. + example: https://media.int.expedia.com/int/cars/logos/NU.png + description: The supplier of the car being offered. + TimeRange: + required: + - EndTime + - StartTime + type: object + properties: + StartTime: + type: string + description: Start time at pickup location of the date range. + format: time + example: 07:00:00 + EndTime: + type: string + description: End time at pickup location of the date range. + format: time + example: 17:00:00 + description: A list of time range to indicate the operation hours of the date range. + TransmissionDrive: + required: + - Code + - Value + type: object + properties: + Code: + type: string + description: Car transmission and drive code. + example: M + Value: + type: string + description: Car transmission and drive value. + example: Manual AWD + description: Car transmission and drive. Please find list of Car Transmission + Drive Codes in + https://expediaintegration.zendesk.com/hc/en-us/articles/115005380028 + VehicleDetails: + required: + - CarCategory + - CarClass + - CarType + - FuelAC + - TransmissionDrive + type: object + properties: + Make: + type: string + description: Car manufacturer and model. + example: Kia Rio + CarClass: + type: string + description: Car category and type. + example: Economy 2/4Door Car + MinDoors: + type: integer + description: Minimal car door count. + format: int32 + example: 2 + MaxDoors: + type: integer + description: Maximal car door count. + format: int32 + example: 4 + FuelLevel: + type: string + description: Car fuel information. + example: Full to Full + CarCategory: + $ref: "#/components/schemas/CarCategory" + CarType: + $ref: "#/components/schemas/CarType" + TransmissionDrive: + $ref: "#/components/schemas/TransmissionDrive" + FuelAC: + $ref: "#/components/schemas/FuelAC" + Capacity: + $ref: "#/components/schemas/Capacity" + description: Specific information for a car. + VendorLocationDetails: + required: + - DateTime + - Location + type: object + properties: + DateTime: + type: string + description: Pickup date and time. + format: date-time + ShuttleCategory: + type: string + description: The category of shuttle from the terminal to the rental car + counter. Please find list of Shuttle Categories in the Related Links + Section below. + example: AirportShuttleToCounterAndCar + Location: + $ref: "#/components/schemas/CarsLocation" + Distance: + $ref: "#/components/schemas/CarsDistance" + OpenSchedule: + type: array + description: A List of date time periods to indicate the vendor business hours + for the pickup time. + items: + $ref: "#/components/schemas/DateTimePeriod" + description: Drop off information + CarsWarning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Standardized warning code. + example: INVALID_CORPORATE_DISCOUNT_CODE + Description: + type: string + description: Standardized warning description message. + example: The Corporate DiscountCode '811490' is unavailable, but we found other + rates for you. + OriginalPrice: + $ref: "#/components/schemas/CarsMoney" + NewPrice: + $ref: "#/components/schemas/CarsMoney" + ChangedAmount: + $ref: "#/components/schemas/CarsMoney" + ChangedPercentage: + type: string + description: |- + The changed percentage. + In the sample 2.97 means the changed percentage is 2.97%. + example: "2.97" + Links: + type: object + additionalProperties: + $ref: "#/components/schemas/CarsLink" + xml: + wrapped: true + description: Container for warning codes + CarsError: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + DetailCode: + type: string + description: Detailed error code describing the issue. + example: MULTIPLE_AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: "Multiple pickup locations found. " + LocationKeyword: + type: string + description: The requested location that caused the error. + example: "Portland. " + LocationOptions: + type: array + description: "List for possible locations from which the customer must choose + the best one to be re-submitted in the request. " + items: + $ref: "#/components/schemas/CarsLocationOption" + description: Container for error list. + CarsErrors: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: "#/components/schemas/CarsError" + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + CarsLocationOption: + required: + - Locations + - RequestedLocation + type: object + properties: + RequestedLocation: + type: string + description: Location used in partner request. + example: Paris + Locations: + type: array + description: Container for list of possible locations that could be used to + disambiguate the query. + items: + $ref: "#/components/schemas/CarsLocation" + Type: + type: string + description: Type of the location. + example: TRAINSTATION + RegionId: + type: string + description: RegionId the location resides in. + example: "6200275" + ShortName: + type: string + description: The name of the location which matches the location keyword. + example: Dublin Connolly Station + AirportCode: + type: string + description: Indicates the nearest major airport to the location. + example: DUB + Address: + type: string + description: The address of the location. + example: Dublin Connolly Station, Ireland + Country: + $ref: "#/components/schemas/CarsCountry" + GeoLocation: + $ref: "#/components/schemas/CarsGeoLocation" + description: "List for possible locations from which the customer must choose + the best one to be re-submitted in the request. " + DisambiguationResponse: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: "#/components/schemas/CarsError" + TransactionId: + type: string + description: A unique identifier for the transaction. + example: ec007d1c-8d9d-4ed5-a880-da5b477d8c6c + xml: + name: DisambiguationResponse + CarDetails: + required: + - CancellationPolicy + - DropOffDetails + - PickupDetails + - Price + - Supplier + - VehicleDetails + type: object + properties: + OnlineCheckIn: + type: boolean + description: Indicate whether the supplier supports online checkin + example: true + SkipTheCounter: + type: boolean + description: Indicate whether the supplier supports skip the counter + example: true + VehicleDetails: + $ref: "#/components/schemas/VehicleDetails" + Supplier: + $ref: "#/components/schemas/Supplier" + PickupDetails: + $ref: "#/components/schemas/VendorLocationDetails" + DropOffDetails: + $ref: "#/components/schemas/VendorLocationDetails" + RateDetails: + $ref: "#/components/schemas/RateDetails" + Price: + $ref: "#/components/schemas/Price" + ReferencePrice: + $ref: "#/components/schemas/CarsMoney" + AdditionalFees: + type: array + description: List of additional fees including both mandatory and optional + fees.such as young driver fee/drop off fee /CollisionDamageWaiver + items: + $ref: "#/components/schemas/AdditionalFee" + TaxesAndFeesDetails: + type: array + description: List of TaxesAndFees Details + items: + $ref: "#/components/schemas/TaxesAndFees" + ExtraFeesDetails: + type: array + description: List of ExtraFeesDetails + items: + $ref: "#/components/schemas/ExtraFees" + SpecialEquipments: + type: array + description: Description and costs of any optional special equipment that may be + rented with the car. + items: + $ref: "#/components/schemas/Equipment" + RentalLimits: + $ref: "#/components/schemas/RentalLimits" + CancellationPolicy: + $ref: "#/components/schemas/CarsCancellationPolicy" + NoShowPenalty: + $ref: "#/components/schemas/PenaltyType" + CarPolicies: + type: array + description: A list of policies that apply to this car rental. + items: + $ref: "#/components/schemas/CarPolicy" + Images: + type: array + description: List of image resources of the car product. + items: + $ref: "#/components/schemas/Image" + Rating: + $ref: "#/components/schemas/Rating" + description: Details of requested car. + CarDetailsResponse: + required: + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for warning codes + items: + $ref: "#/components/schemas/CarsWarning" + TransactionId: + type: string + description: A unique identifier for this transaction. + example: 1111111-2222-3333-4444-55555555555 + CarDetails: + $ref: "#/components/schemas/CarDetails" + ValidFormsOfPayment: + type: array + description: List of all the forms of payment that will be accepted for the + booking of this rental transaction. + items: + $ref: "#/components/schemas/CarsValidFormsOfPayment" + Links: + type: object + additionalProperties: + $ref: "#/components/schemas/CarsLink" + description: "A map of links to other Car APIs. possible link name: ApiBooking" + xml: + wrapped: true + xml: + name: CarDetailsResponse + CarPolicy: + required: + - CategoryCode + type: object + properties: + CategoryCode: + type: string + description: "The category that this policy applies to (e.g. cancellation, + drivers license requirements, driver age requirements) " + example: Guarantee + PolicyText: + type: string + description: The raw text of the policy.This is generally localized into the + requested language, but may be English if no other translations are + available. + example: Credit card required. + description: A list of policies that apply to this car rental. + Duration: + required: + - Count + - Unit + type: object + properties: + Unit: + type: string + description: The unit for minimum amount of time for a rental. + example: Day + Count: + type: integer + description: The minimum number of units that qualify for minimum amount of time + for a rental. + format: int64 + example: 1 + description: The maximum amount of time for a rental that still qualifies for + this rate.This may or may not be the same as the current rental + duration. + Equipment: + required: + - Code + - Name + type: object + properties: + Code: + type: string + description: Special equipment code + example: BabyChildSeat + Name: + type: string + description: Special equipment name + example: Baby Child Seat + RatePeriod: + type: string + description: Unit indicating the price of special equipment. Support + value:Trip,Daily + example: Trip + Price: + $ref: "#/components/schemas/CarsMoney" + description: Description and costs of any optional special equipment that may be + rented with the car. + ExtraFees: + required: + - Amount + - Unit + - UnitCount + type: object + properties: + Unit: + type: string + description: "Rate period beyond the base rate. Supported values: ExtraHourly, + ExtraDaily" + example: ExtraHourly + UnitCount: + type: integer + description: Numbers of period + format: int64 + example: 2 + Amount: + $ref: "#/components/schemas/CarsMoney" + description: List of ExtraFeesDetails + RentalLimits: + required: + - MaxDuration + - MinDuration + type: object + properties: + MinDuration: + $ref: "#/components/schemas/Duration" + MaxDuration: + $ref: "#/components/schemas/Duration" + description: Limitations that are part of this rental agreement. + TaxesAndFees: + required: + - Amount + - Description + type: object + properties: + Description: + type: string + description: TaxesAndFees description + example: "Rental, CONSOLIDATED FACILITY CHG 4.00/DAY\t" + Amount: + $ref: "#/components/schemas/CarsMoney" + description: List of TaxesAndFees Details + CarsValidFormsOfPayment: + required: + - BrandName + - PaymentMethod + - PaymentSubMethod + type: object + properties: + PaymentMethod: + type: string + description: Method of payment + example: CreditCard + PaymentSubMethod: + type: string + description: Sub method of payment + example: American Express + BrandName: + type: string + description: The brand name of the payment sub-method to be displayed to the + customer. In many cases it will be the same as the payment + sub-method, but "Visa/Carte Bleue" and "Visa/Delta are some of the + exceptions. + example: American Express + description: List of all the forms of payment that will be accepted for the + booking of this rental transaction. + APIMError: + title: APIMError + properties: + message: + type: string + PresignedUrlResponse: + type: object + properties: + transactionId: + type: string + description: Unique identifier for each API response. + error: + $ref: "#/components/schemas/Fault" + warning: + $ref: "#/components/schemas/Fault" + bestMatchedFile: + $ref: "#/components/schemas/FileInfo" + otherFileOptions: + type: array + items: + $ref: "#/components/schemas/FileInfo" + description: Container for file Pre-signed download URL and informations. + FileInfo: + type: object + properties: + partner: + nullable: true + type: string + description: "The partner associated with the file. List of partners: `Bing`, + `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`." + brand: + nullable: true + type: string + description: "The brand associated with the file content. List of brand: + `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, + `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`." + fileContentType: + nullable: true + type: string + description: "The type associated with the file content. List of types: + `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, + `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental`" + locale: + nullable: true + type: string + description: The locale associated with the file content. + fileName: + type: string + description: File name. + size: + $ref: "#/components/schemas/FileSize" + fileLastUpdated: + type: string + description: The time about the file last updated. The format is + uuuu-MM-dd'T'HH:mm:ss.SSSX + downloadUrl: + type: string + description: Pre-signed URL is a self signed URL generated for a resource in S3 + with a set expiration time. + downloadUrlExpires: + type: string + description: The time about the download Url expires. The format is + uuuu-MM-dd'T'HH:mm:ss.SSSX + filterConditions: + $ref: "#/components/schemas/FilterConditions" + bestMatchedLink: + $ref: "#/components/schemas/SdpLink" + Fault: + type: object + description: API returned information. + properties: + code: + type: string + description: Fault code. + description: + type: string + description: Fault description. + FileSize: + type: object + description: The information about the file size. + properties: + unit: + type: string + enum: + - KB + - MB + - GB + description: The unit about the file size. + value: + type: integer + format: int64 + description: The value about the file size. + FilterConditions: + nullable: true + type: object + description: Container filter condition for the filtered file. + [Filters](https://confluence.expedia.biz/display/EWS/Filtered+Feed+File+Generation+Schedule+and+Access#FilteredFeedFileGenerationScheduleandAccess-Filters) + properties: + pointOfSupply: + type: string + description: "List of filter condition for PointOfSupplies: `US`, + `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, + `AE`,`GB`." + brand: + type: string + description: "List of filter condition for Brands: `VRBO`." + structureType: + type: string + description: "List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`." + SdpLink: + nullable: true + type: object + description: Contains link information, including link address, request method. + Only provided if FileInfo is in OtherFileOptions. + properties: + href: + type: string + description: a link address. + method: + type: string + description: Request method, it will support `GET`, `POST`, `DELETE` and `PUT` + etc... + SdpAPIMError: + type: object + description: Error from the APIM. + properties: + message: + type: string + description: Error from the APIM. + ActivitiesMoney: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: "#/components/schemas/ActivitiesMoney" + description: Container for the discount amount. + ActivitiesPrice: + required: + - TotalRate + type: object + properties: + Category: + type: string + description: |- + Type of passenger. + Values supported are: + ADULT | SENIOR | CHILD + example: ADULT + TotalRate: + $ref: "#/components/schemas/ActivitiesMoney" + TotalFees: + $ref: "#/components/schemas/ActivitiesMoney" + TotalTaxesAndFees: + $ref: "#/components/schemas/ActivitiesMoney" + ReferencePrice: + $ref: "#/components/schemas/ReferencePrice" + Savings: + $ref: "#/components/schemas/Savings" + description: The price of the offer + ReferencePrice: + required: + - TotalRate + type: object + properties: + TotalRate: + $ref: "#/components/schemas/ActivitiesMoney" + TotalFees: + $ref: "#/components/schemas/ActivitiesMoney" + TotalTaxesAndFees: + $ref: "#/components/schemas/ActivitiesMoney" + description: Container for the reference price used for strike out display. + Restrictions: + required: + - Max + - Min + - Type + type: object + properties: + Type: + type: string + description: Type of the Restriction. + example: AGE + Max: + type: string + description: Maximum value allowed for the restriction type. + example: "255" + Min: + type: string + description: Minimum value allowed for the restriction type. + example: "9" + Description: + type: string + description: The text to describe the restriction. + example: 9+ years + description: Container of the Restrictions associated to this ticket. + Savings: + required: + - Amount + - Percentage + type: object + properties: + Percentage: + type: integer + description: The percentage of the price that has been discounted off the + regular price for the current activity. + format: int32 + example: 10 + Amount: + $ref: "#/components/schemas/ActivitiesMoney" + description: Container of savings information. + Ticket: + required: + - Code + - Count + - Id + - TicketPrice + type: object + properties: + Id: + type: integer + description: The numerical identifier for the ticket. + format: int32 + example: 6429 + Code: + type: string + description: |- + The code for the ticket. + Values supported are: + Adult + Traveler + Child + Group + Senior + Infant + Student + example: Adult + Count: + type: integer + description: The number of each ticket type to be booked. + format: int32 + example: 1 + Restrictions: + $ref: "#/components/schemas/Restrictions" + TicketPrice: + $ref: "#/components/schemas/ActivitiesPrice" + description: The list of Ticket information. + ActivitiesAddress: + type: object + properties: + Address1: + type: string + description: Street Number, Street Name, or PO Box. + example: 724 Pine St + Address2: + type: string + description: Apartment, Floor, Suite, Bldg + example: Second Floor + Suite: + type: string + description: Suite/apartment number + example: "123" + City: + type: string + description: The city + example: New York + Province: + type: string + description: The state or province. + example: NY + Country: + type: string + description: 3-letter code for the country. + example: USA + PostalCode: + type: string + description: Zip/postal code. + example: "98004" + description: Address information + ActivitiesCountry: + required: + - IsoCode2 + - IsoCode3 + - Name + type: object + properties: + Name: + type: string + description: country name + example: Ireland + Code: + type: string + description: 3-letter code for the country + example: IRL + IsoCode2: + type: string + description: 2-letter code for the country + example: IE + IsoCode3: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + ActivitiesError: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + DetailCode: + type: string + description: Detailed error code describing the issue. + example: MULTIPLE_AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: "Multiple pickup locations found. " + LocationKeyword: + type: string + description: The requested location that caused the error. + example: "Portland. " + LocationOptions: + type: array + description: "List for possible locations from which the customer must choose + the best one to be re-submitted in the request. " + items: + $ref: "#/components/schemas/ActivitiesLocationOption" + description: Container for error list. + ActivitiesErrors: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: "#/components/schemas/ActivitiesError" + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + ActivitiesGeoLocation: + required: + - Latitude + - Longitude + type: object + properties: + Latitude: + type: string + description: Latitude of the location. + example: "38.184978" + Longitude: + type: string + description: Longitude of the location. + example: "85.7412" + Obfuscated: + type: boolean + description: Geographic information + ActivitiesLocation: + type: object + properties: + Type: + type: string + description: The type of location code (MULTICITY | METROCODE). + example: MULTICITY + Id: + type: string + description: Expedia Region ID of the specified airport. + example: "6139103" + Name: + type: string + description: Location Name + example: Seattle-Tacoma International Airport + Code: + type: string + description: Location Code + example: SEA + LocationId: + type: string + description: Location id. + example: SEAT001 + Address: + $ref: "#/components/schemas/ActivitiesAddress" + PointOfInterest: + type: string + GeoLocation: + $ref: "#/components/schemas/ActivitiesGeoLocation" + Neighborhood: + $ref: "#/components/schemas/ActivitiesNeighborhood" + RegionId: + type: integer + description: RegionId the location resides in. + format: int64 + example: 6200275 + Country: + $ref: "#/components/schemas/ActivitiesCountry" + description: List of location(s) where the activity will happen. + ActivitiesLocationOption: + required: + - Locations + - RequestedLocation + type: object + properties: + RequestedLocation: + type: string + description: Location used in partner request. + example: Paris + Locations: + type: array + description: Container for list of possible locations that could be used to + disambiguate the query. + items: + $ref: "#/components/schemas/ActivitiesLocation" + Type: + type: string + description: Type of the location. + example: TRAINSTATION + RegionId: + type: string + description: RegionId the location resides in. + example: "6200275" + ShortName: + type: string + description: The name of the location which matches the location keyword. + example: Dublin Connolly Station + AirportCode: + type: string + description: Indicates the nearest major airport to the location. + example: DUB + Address: + type: string + description: The address of the location. + example: Dublin Connolly Station, Ireland + Country: + $ref: "#/components/schemas/ActivitiesCountry" + GeoLocation: + $ref: "#/components/schemas/ActivitiesGeoLocation" + description: "List for possible locations from which the customer must choose + the best one to be re-submitted in the request. " + ActivitiesNeighborhood: + required: + - Id + - Name + type: object + properties: + Id: + type: string + description: Neighborhood id. + example: "6160232" + Name: + type: string + description: Neighborhood name. + example: Le Pharo + description: Geography entities which are typically contained within a city. + This includes the categories neighborhood and point of interest. Low + level regions are not a formally defined concept in the geography model. + Activity: + required: + - Categories + - Description + - Duration + - FreeCancellation + - Id + - Media + - Price + - Supplier + - Title + type: object + properties: + Id: + type: integer + description: The numerical identifier for this particular activity + format: int32 + example: 166597 + Title: + type: string + description: The display title for this activity. + example: "Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. Peter's Tour" + Description: + type: string + description: The description of the Activity. + example: Enjoy 5 of Seattle's most popular attractions with a multi-ticket + booklet that’s valid for 9 consecutive days. This pass is perfect if + you want to explore the city on your schedule, craft your own + itinerary, and visit the city’s can’t-miss museums and most iconi... + Media: + type: array + description: List of activity Media. + items: + $ref: "#/components/schemas/ActivitiesMedia" + Categories: + type: array + description: >- + A list of the Activity categories to which this particular activity + belongs. + + Possible values are: + + Adventures + + Air, Balloon & Helicopter Tours + + Attractions + + Cruises & Water Tours + + Day Trips & Excursions + + Food & Drink + + Hop-on Hop-off + + Multi-Day & Extended Tours + + Nightlife + + Private Tours + + Private Transfers + + Shared Transfers + + Show & Sport Tickets + + Sightseeing Passes + + Theme Parks + + Tours & Sightseeing + + Walking & Bike Tours + + Water Activities + + Wedding Ceremonies + + Winter Activities + example: + - Walking & Bike Tours + items: + type: string + description: A list of the Activity categories to which this particular activity + belongs. + example: Walking & Bike Tours + xml: + name: Categories + Duration: + type: string + description: |- + The anticipated time duration for the activity. + Using java jdk Duration parsing. + example: PT1H0M + FreeCancellation: + type: boolean + description: A boolean value describing whether or not this activity reservation + can be cancelled without incurring a penalty. + example: true + Price: + $ref: "#/components/schemas/ActivitiesPrice" + Redemption: + $ref: "#/components/schemas/Redemption" + ActivityLocations: + type: array + description: Container of location information where activity happens. + items: + $ref: "#/components/schemas/ActivitiesLocation" + Supplier: + $ref: "#/components/schemas/ActivitiesSupplier" + ReviewScore: + type: integer + description: The overall Expedia score for the activity. + format: int32 + example: 72 + ReviewCount: + type: integer + description: The number of Expedia reviews that went into the calculation of the + ReviewScore. + format: int32 + example: 19 + Links: + type: object + additionalProperties: + $ref: "#/components/schemas/ActivitiesLink" + description: HATEOAS links included in this response. + xml: + wrapped: true + CancellationPolicy: + $ref: "#/components/schemas/ActivitiesCancellationPolicy" + Highlights: + type: array + description: Web formatted statement of the Highlight(s) for the activity. + items: + type: string + description: Web formatted statement of the Highlight(s) for the activity. + xml: + name: Highlights + TermsAndConditions: + type: array + description: Terms and Conditions for the Activity. + items: + type: string + description: Terms and Conditions for the Activity. + xml: + name: TermsAndConditions + Inclusions: + type: array + description: Web formatted statement of what is included in the activity + items: + type: string + description: Web formatted statement of what is included in the activity + xml: + name: Inclusions + Exclusions: + type: array + description: Web formatted statement of what is NOT included in the activity + items: + type: string + description: Web formatted statement of what is NOT included in the activity + xml: + name: Exclusions + KnowBeforeYouBook: + type: array + description: Web formatted statement of things that a purchaser should be aware + of BEFORE they book this activity. + items: + type: string + description: Web formatted statement of things that a purchaser should be aware + of BEFORE they book this activity. + xml: + name: KnowBeforeYouBook + KnowBeforeYouGo: + type: array + description: Web formatted statement of things that a purchaser should be aware + of BEFORE they go to this activity. + items: + type: string + description: Web formatted statement of things that a purchaser should be aware + of BEFORE they go to this activity. + xml: + name: KnowBeforeYouGo + Offers: + type: array + description: Offers for the activity. + items: + $ref: "#/components/schemas/Offer" + description: Detailed information on the Activity. + AvailableTimeSlot: + required: + - AllDayActivity + - CancellationPolicy + - DateTime + - Tickets + type: object + properties: + DateTime: + type: string + description: The date and time when the activity happens. + format: date-time + AllDayActivity: + type: boolean + description: Indicates whether the activity is an all-day activity. + example: true + CancellationPolicy: + $ref: "#/components/schemas/ActivitiesCancellationPolicy" + Tickets: + type: array + description: Container for ticket information. + items: + $ref: "#/components/schemas/Ticket" + description: The list of available Time Slots for the activity. + ActivitiesCancellationPolicy: + required: + - FreeCancellation + type: object + properties: + FreeCancellation: + type: boolean + description: Indicates whether the activity can be canceled free of charge + within the cancellation window or not. + example: true + CancelPolicyDescription: + type: string + description: The description of Cancellation Policy. + example: 72 hours + FreeCancellationMinHours: + type: integer + description: The minimum number of hours before activity when the activity can + still be cancelled for free. + format: int32 + example: 72 + FreeCancellationEndDateTime: + type: string + description: The date and time after which the activity will not be able to be + cancelled for free, stated in the local time to where the activity + takes place. + format: date-time + description: Container for the Cancellation Policy information. + ActivitiesLink: + required: + - Href + type: object + properties: + Accept: + type: string + description: Accept header. + Method: + type: string + description: HTTP method to connect. + example: GET + Href: + type: string + description: HATEOAS URL to fetch details. + description: Container of HATEOAS URL's + ActivitiesMedia: + required: + - Size + - Type + - Url + type: object + properties: + Type: + type: string + description: |- + type of the media. So far there is only one option: + 1: Image + example: "1" + Title: + type: string + description: Image title + example: Guestroom + Size: + type: string + description: >- + Image size + + You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. + example: t + Url: + type: string + description: Image URL + example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg + description: List of activity Media. + Offer: + required: + - AvailableTimeSlots + - Duration + - Id + - OfferPrice + - Title + type: object + properties: + Id: + type: integer + description: The numerical identifier for the offer. + format: int32 + example: 166597 + Title: + type: string + description: A descriptive title for this offer. + example: 8:30 AM, Tour in English + Description: + type: string + description: Description of this offer. + Duration: + type: string + description: The anticipated time duration for the activity, e xpressed using + Java JDK duration format. + AvailableTimeSlots: + type: array + description: The list of available Time Slots for the activity. + items: + $ref: "#/components/schemas/AvailableTimeSlot" + OfferPrice: + $ref: "#/components/schemas/ActivitiesPrice" + Links: + type: object + additionalProperties: + $ref: "#/components/schemas/ActivitiesLink" + description: Container of HATEOAS URL's + xml: + wrapped: true + description: Offers for the activity. + ActivitiesPhone: + required: + - CountryCode + - Number + type: object + properties: + CountryCode: + type: string + description: Country code of traveler's phone number; only digits allowed. + example: "1" + AreaCode: + type: string + description: Area code of traveler's phone number; only digits allowed. + example: "614" + Number: + type: string + description: Traveler's phone number; only digits allowed. + example: "9288472" + ExtensionNumber: + type: string + description: The phone of the company providing the activity. + Redemption: + type: object + properties: + Type: + type: string + description: The type of redemption process associated to the activity. + example: Voucherless + RedemptionLocations: + type: array + description: List of redemption locations where the activity will take place, + please refer to Location Section below. + items: + $ref: "#/components/schemas/ActivitiesLocation" + description: Container of redemption information. + ActivitiesSupplier: + required: + - Name + type: object + properties: + Name: + type: string + description: The name of the company providing the activity. + example: City Wonders + Phone: + $ref: "#/components/schemas/ActivitiesPhone" + description: The details information of company providing the activity. + ActivitiesWarning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Standardized warning code. + example: INVALID_CORPORATE_DISCOUNT_CODE + Description: + type: string + description: Standardized warning description message. + example: The Corporate DiscountCode '811490' is unavailable, but we found other + rates for you. + OriginalPrice: + $ref: "#/components/schemas/ActivitiesMoney" + NewPrice: + $ref: "#/components/schemas/ActivitiesMoney" + ChangedAmount: + $ref: "#/components/schemas/ActivitiesMoney" + ChangedPercentage: + type: string + description: |- + The changed percentage. + In the sample 2.97 means the changed percentage is 2.97%. + example: "2.97" + Links: + type: object + additionalProperties: + $ref: "#/components/schemas/ActivitiesLink" + xml: + wrapped: true + description: Container for all warnings generated during the transaction. + ActivityListingsResponse: + required: + - Count + - Location + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for all warnings generated during the transaction. + items: + $ref: "#/components/schemas/ActivitiesWarning" + TransactionId: + type: string + description: A unique identifier for this transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Count: + type: integer + description: The number of activities returned in the response. + format: int64 + example: 100 + Location: + type: string + description: The location that the user searched, expressed in the exact format + that the inventory system uses to designate the location. + example: shenzhen, dg + StartDate: + type: string + description: The startDate of the returned group of activities in YYYY-MM-DD + format. + format: date + example: 2021-08-01T00:00:00.000Z + EndDate: + type: string + description: The endDate of returned group of activities in YYYY-MM-DD format. + format: date + example: 2021-08-10T00:00:00.000Z + Activities: + type: array + description: List of activities matching the search criteria. + items: + $ref: "#/components/schemas/Activity" + Categories: + type: array + description: Container for a breakdown of how many of each type of Activity have + been returned in the API response. + items: + $ref: "#/components/schemas/CategoryGroup" + CategoryGroup: + required: + - CategoryName + - Count + - GroupDisplayName + - GroupName + type: object + properties: + Count: + type: integer + description: The count of the number of categories the returned set of + activities map to. + format: int32 + example: 10 + GroupName: + type: string + description: |- + The group which the category belongs + Possible value is: + Recommendations + Tours + Activities + Transportation + Promotions + Duration + example: Tours + GroupDisplayName: + type: string + description: The localized value for category name. + example: Wander- und Fahrradtouren + CategoryName: + type: string + description: The name of one of the categories. + example: Walking & Bike Tours + CategoryDisplayName: + type: string + description: Container for a breakdown of how many of each type of Activity have + been returned in the API response. + ActivityDetailsResponse: + required: + - Location + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for all warnings generated during the transaction. + items: + $ref: "#/components/schemas/ActivitiesWarning" + TransactionId: + type: string + description: A unique identifier for this transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Location: + type: string + description: The location user searched, translated into the full, unambiguous + format. + example: shenzhen, dg + StartDate: + type: string + description: The startDate of activities in YYY-MM-DD format. + format: date + example: 2021-08-01T00:00:00.000Z + EndDate: + type: string + description: The endDate of activities in YYY-MM-DD format. + format: date + example: 2021-08-01T00:00:00.000Z + ActivityDetails: + $ref: "#/components/schemas/Activity" + securitySchemes: + Authorization: + type: http + scheme: basic diff --git a/generator/src/main/resources/templates/operations/params/imports.mustache b/generator/src/main/resources/templates/operations/params/imports.mustache deleted file mode 100644 index 82a589439..000000000 --- a/generator/src/main/resources/templates/operations/params/imports.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{>traits/imports}} -{{#imports}} - import {{import}} -{{/imports}} -import com.expediagroup.sdk.xap.models.Room \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 3e45131bf..3f89b0550 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,28 @@ kotlin.code.style=official -groupId=com.expediagroup -version=1.0.0-SNAPSHOT -artifactName=xap-sdk -# Needed for Dokka docs generation +# Publishing defaults +GROUP_ID=com.expediagroup + +# POM +POM_URL=https://github.com/ExpediaGroup/xap-java-sdk +POM_LICENCE_NAME=MIT +POM_LICENCE_DIST=repo + +# POM LICENSE +LICENSE_NAME=The Apache License, Version 2.0 +LICENSE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt +LICENSE_DISTRIBUTION=repo +LICENSE_COMMENTS=A business-friendly OSS license + +# POM DEVELOPERS +DEVELOPER_NAME=Expedia Group Committers +DEVELOPER_ORG=Expedia Group +DEVELOPER_ORG_URL=https://www.expediagroup.com/ + +# SCM +POM_SCM_URL=https://github.com/ExpediaGroup/xap-java-sdk +POM_SCM_CONNECTION=scm:git:git://github.com/ExpediaGroup/xap-java-sdk.git +POM_SCM_DEVELOPER_CONNECTION=scm:git:ssh://github.com/ExpediaGroup/xap-java-sdk.git + +# JVM PARAMS org.gradle.jvmargs=-Xmx2g diff --git a/settings.gradle.kts b/settings.gradle.kts index 2622d49e0..b4ee28019 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -2,9 +2,13 @@ pluginManagement { repositories { mavenLocal() gradlePluginPortal() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + } } } + plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index c929a5717..4b18a11d2 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -11,19 +11,18 @@ group = "com.expediagroup.sdk" version = "1.0.0-SNAPSHOT" repositories { - mavenLocal() mavenCentral() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + } } dependencies { testImplementation(kotlin("test")) - api("com.expediagroup:sdk-rest:1.0.1-SNAPSHOT") - api("com.expediagroup:sdk-core:1.0.0-SNAPSHOT") - implementation("com.expediagroup:sdk-okhttp-transport:1.0.0-SNAPSHOT") + api("com.expediagroup:expediagroup-sdk-rest:0.0.1-beta-SNAPSHOT") + implementation("com.expediagroup:expediagroup-sdk-transport-okhttp:0.0.1-beta-SNAPSHOT") implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2") - implementation("org.hibernate:hibernate-validator:6.0.2.Final") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2") - implementation("javax.validation:validation-api:2.0.1.Final") implementation("org.slf4j:slf4j-simple:2.0.16") runtimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2") } @@ -55,22 +54,51 @@ ktlint { "indent_size" to "4", "insert_final_newline" to "true", "end_of_line" to "lf", - "ktlint_standard_enum-entry-name-case" to "disabled" + "ktlint_standard_enum-entry-name-case" to "disabled", ) } - publishing { publications { create("mavenJava") { - artifactId = "xap-sdk" - version = "1.0.0-SNAPSHOT" - groupId = project.property("groupId").toString() from(components["java"]) - } - } + artifactId = project.property("ARTIFACT_NAME").toString() + groupId = project.property("GROUP_ID").toString() + version = if (project.hasProperty("SNAPSHOT_VERSION")) { + project.property("SNAPSHOT_VERSION").toString() + } else { + project.property("VERSION").toString() + } + description = project.findProperty("DESCRIPTION")?.toString() - repositories { - mavenLocal() + pom { + name.set(project.property("ARTIFACT_NAME").toString()) + description.set(project.findProperty("DESCRIPTION")?.toString()) + url.set(project.property("POM_URL").toString()) + + licenses { + license { + name.set(project.property("LICENSE_NAME").toString()) + url.set(project.property("LICENSE_URL").toString()) + distribution.set(project.property("LICENSE_DISTRIBUTION").toString()) + comments.set(project.property("LICENSE_COMMENTS").toString()) + } + } + + developers { + developer { + name.set(project.property("DEVELOPER_NAME").toString()) + organization.set(project.property("DEVELOPER_ORG").toString()) + organizationUrl.set(project.property("DEVELOPER_ORG_URL").toString()) + } + } + + scm { + url.set(project.property("POM_SCM_URL").toString()) + connection.set(project.property("POM_SCM_CONNECTION").toString()) + developerConnection.set(project.property("POM_SCM_DEVELOPER_CONNECTION").toString()) + } + } + } } } diff --git a/xap-sdk/gradle.properties b/xap-sdk/gradle.properties new file mode 100644 index 000000000..3408c83c6 --- /dev/null +++ b/xap-sdk/gradle.properties @@ -0,0 +1,6 @@ +ARTIFACT_NAME=xap-sdk +DESCRIPTION=The Expedia API Platform (XAP) SDK + +# x-release-please-start-version +VERSION=2.0.0-alpha-SNAPSHOT +# x-release-please-end diff --git a/xap-sdk/src/main/kotlin/.openapi-generator/FILES b/xap-sdk/src/main/kotlin/.openapi-generator/FILES index 1d5d912fa..1f7f98b14 100644 --- a/xap-sdk/src/main/kotlin/.openapi-generator/FILES +++ b/xap-sdk/src/main/kotlin/.openapi-generator/FILES @@ -155,6 +155,7 @@ com/expediagroup/sdk/xap/models/Redemption.kt com/expediagroup/sdk/xap/models/ReferencePrice.kt com/expediagroup/sdk/xap/models/RentalLimits.kt com/expediagroup/sdk/xap/models/Restrictions.kt +com/expediagroup/sdk/xap/models/Room.kt com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt com/expediagroup/sdk/xap/models/RoomPreference.kt com/expediagroup/sdk/xap/models/RoomRates.kt diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/AsyncXapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt similarity index 97% rename from xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/AsyncXapClient.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt index 0fe4c5edc..c0eea61b5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/AsyncXapClient.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt @@ -1,4 +1,4 @@ -package com.expediagroup.sdk.xap +package com.expediagroup.sdk.xap.client import com.expediagroup.sdk.rest.AsyncRestClient import com.expediagroup.sdk.rest.AsyncRestExecutor diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/XapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt similarity index 98% rename from xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/XapClient.kt rename to xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt index 37d379611..ed6f42251 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/XapClient.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt @@ -1,4 +1,4 @@ -package com.expediagroup.sdk.xap +package com.expediagroup.sdk.xap.client import com.expediagroup.sdk.rest.RestClient import com.expediagroup.sdk.rest.RestExecutor diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt index dc512ec80..920c0a576 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt @@ -15,63 +15,51 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param message +* + * @param message */ data class APIGatewayError( - @JsonProperty("message") - @field:Valid - val message: kotlin.String? = null + @JsonProperty("message") +val message: kotlin.String? = null ) { + + + + init { + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var message: kotlin.String? = null - ) { - fun message(message: kotlin.String?) = apply { this.message = message } - - fun build(): APIGatewayError { - val instance = - APIGatewayError( - message = message - ) - - validate(instance) - - return instance - } - - private fun validate(instance: APIGatewayError) { - 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}" } - ) - } - } + class Builder( + private var message: kotlin.String? = null + ) { + fun message(message: kotlin.String?) = apply { this.message = message } + + fun build(): APIGatewayError { + val instance = APIGatewayError( + message = message + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( message = message - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt index df27c5798..6780847ab 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt @@ -15,63 +15,51 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param message +* + * @param message */ data class APIMError( - @JsonProperty("message") - @field:Valid - val message: kotlin.String? = null + @JsonProperty("message") +val message: kotlin.String? = null ) { + + + + init { + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var message: kotlin.String? = null - ) { - fun message(message: kotlin.String?) = apply { this.message = message } - - fun build(): APIMError { - val instance = - APIMError( - message = message - ) - - validate(instance) - - return instance - } - - private fun validate(instance: APIMError) { - 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}" } - ) - } - } + class Builder( + private var message: kotlin.String? = null + ) { + fun message(message: kotlin.String?) = apply { this.message = message } + + fun build(): APIMError { + val instance = APIMError( + message = message + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( message = message - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt index d3e610056..6ce6f9299 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt @@ -15,118 +15,142 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.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. + * @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 + /* Street Number, Street Name, or PO Box. */ +@JsonProperty("Address1") +val address1: kotlin.String? = null, + + /* Apartment, Floor, Suite, Bldg */ +@JsonProperty("Address2") +val address2: kotlin.String? = null, + + /* Suite/apartment number */ +@JsonProperty("Suite") +val suite: kotlin.String? = null, + + /* The city */ +@JsonProperty("City") +val city: kotlin.String? = null, + + /* The state or province. */ +@JsonProperty("Province") +val province: kotlin.String? = null, + + /* 3-letter code for the country. */ +@JsonProperty("Country") +val country: kotlin.String? = null, + + /* Zip/postal code. */ +@JsonProperty("PostalCode") +val postalCode: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @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}" } - ) - } - } + 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 + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( address1 = address1, address2 = address2, suite = suite, @@ -134,5 +158,5 @@ data class ActivitiesAddress( province = province, country = country, postalCode = postalCode - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt index b24ba3ab4..57eb51f81 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt @@ -15,94 +15,103 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for the Cancellation Policy information. - * @param freeCancellation Indicates whether the activity can be canceled free of charge within the cancellation window or not. - * @param cancelPolicyDescription The description of Cancellation Policy. - * @param freeCancellationMinHours The minimum number of hours before activity when the activity can still be cancelled for free. - * @param freeCancellationEndDateTime The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. + * @param freeCancellation Indicates whether the activity can be canceled free of charge within the cancellation window or not. + * @param cancelPolicyDescription The description of Cancellation Policy. + * @param freeCancellationMinHours The minimum number of hours before activity when the activity can still be cancelled for free. + * @param freeCancellationEndDateTime The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. */ data class ActivitiesCancellationPolicy( - // Indicates whether the activity can be canceled free of charge within the cancellation window or not. - @JsonProperty("FreeCancellation") - @field:NotNull - @field:Valid - val freeCancellation: kotlin.Boolean, - // The description of Cancellation Policy. - @JsonProperty("CancelPolicyDescription") - @field:Valid - val cancelPolicyDescription: kotlin.String? = null, - // The minimum number of hours before activity when the activity can still be cancelled for free. - @JsonProperty("FreeCancellationMinHours") - val freeCancellationMinHours: kotlin.Int? = null, - // The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. - @JsonProperty("FreeCancellationEndDateTime") - val freeCancellationEndDateTime: java.time.LocalDateTime? = null + /* Indicates whether the activity can be canceled free of charge within the cancellation window or not. */ +@JsonProperty("FreeCancellation") +val freeCancellation: + kotlin.Boolean +, + + /* The description of Cancellation Policy. */ +@JsonProperty("CancelPolicyDescription") +val cancelPolicyDescription: kotlin.String? = null, + + /* The minimum number of hours before activity when the activity can still be cancelled for free. */ +@JsonProperty("FreeCancellationMinHours") +val freeCancellationMinHours: kotlin.Int? = null, + + /* The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. */ +@JsonProperty("FreeCancellationEndDateTime") +val freeCancellationEndDateTime: java.time.LocalDateTime? = null ) { + + + + init { + require(freeCancellation != null) { "freeCancellation must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var freeCancellation: kotlin.Boolean? = null, - private var cancelPolicyDescription: kotlin.String? = null, - private var freeCancellationMinHours: kotlin.Int? = null, - private var freeCancellationEndDateTime: java.time.LocalDateTime? = null - ) { - fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } - - fun cancelPolicyDescription(cancelPolicyDescription: kotlin.String?) = apply { this.cancelPolicyDescription = cancelPolicyDescription } - - fun freeCancellationMinHours(freeCancellationMinHours: kotlin.Int?) = apply { this.freeCancellationMinHours = freeCancellationMinHours } - - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - - fun build(): ActivitiesCancellationPolicy { - val instance = - ActivitiesCancellationPolicy( - freeCancellation = freeCancellation!!, - cancelPolicyDescription = cancelPolicyDescription, - freeCancellationMinHours = freeCancellationMinHours, - freeCancellationEndDateTime = freeCancellationEndDateTime - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesCancellationPolicy) { - 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}" } - ) - } - } + class Builder( + private var freeCancellation: kotlin.Boolean? = null, + private var cancelPolicyDescription: kotlin.String? = null, + private var freeCancellationMinHours: kotlin.Int? = null, + private var freeCancellationEndDateTime: java.time.LocalDateTime? = null + ) { + fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } + fun cancelPolicyDescription(cancelPolicyDescription: kotlin.String?) = apply { this.cancelPolicyDescription = cancelPolicyDescription } + fun freeCancellationMinHours(freeCancellationMinHours: kotlin.Int?) = apply { this.freeCancellationMinHours = freeCancellationMinHours } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + + fun build(): ActivitiesCancellationPolicy { + val instance = ActivitiesCancellationPolicy( + freeCancellation = freeCancellation!!, + cancelPolicyDescription = cancelPolicyDescription, + freeCancellationMinHours = freeCancellationMinHours, + freeCancellationEndDateTime = freeCancellationEndDateTime + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( freeCancellation = freeCancellation!!, cancelPolicyDescription = cancelPolicyDescription, freeCancellationMinHours = freeCancellationMinHours, freeCancellationEndDateTime = freeCancellationEndDateTime - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt index a7be376e9..236e4816b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt @@ -15,98 +15,109 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for disambiguation country information - * @param name country name - * @param isoCode2 2-letter code for the country - * @param isoCode3 3-letter code for the country - * @param code 3-letter code for the country + * @param name country name + * @param isoCode2 2-letter code for the country + * @param isoCode3 3-letter code for the country + * @param code 3-letter code for the country */ data class ActivitiesCountry( - // country name - @JsonProperty("Name") - @field:NotNull - @field:Valid - val name: kotlin.String, - // 2-letter code for the country - @JsonProperty("IsoCode2") - @field:NotNull - @field:Valid - val isoCode2: kotlin.String, - // 3-letter code for the country - @JsonProperty("IsoCode3") - @field:NotNull - @field:Valid - val isoCode3: kotlin.String, - // 3-letter code for the country - @JsonProperty("Code") - @field:Valid - val code: kotlin.String? = null + /* country name */ +@JsonProperty("Name") +val name: + kotlin.String +, + + /* 2-letter code for the country */ +@JsonProperty("IsoCode2") +val isoCode2: + kotlin.String +, + + /* 3-letter code for the country */ +@JsonProperty("IsoCode3") +val isoCode3: + kotlin.String +, + + /* 3-letter code for the country */ +@JsonProperty("Code") +val code: kotlin.String? = null ) { + + + + init { + require(name != null) { "name must not be null" } + + + + + + + + require(isoCode2 != null) { "isoCode2 must not be null" } + + + + + + + + require(isoCode3 != null) { "isoCode3 must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var isoCode2: kotlin.String? = null, - private var isoCode3: kotlin.String? = null, - private var code: kotlin.String? = null - ) { - fun name(name: kotlin.String) = apply { this.name = name } - - fun isoCode2(isoCode2: kotlin.String) = apply { this.isoCode2 = isoCode2 } - - fun isoCode3(isoCode3: kotlin.String) = apply { this.isoCode3 = isoCode3 } - - fun code(code: kotlin.String?) = apply { this.code = code } - - fun build(): ActivitiesCountry { - val instance = - ActivitiesCountry( - name = name!!, - isoCode2 = isoCode2!!, - isoCode3 = isoCode3!!, - code = code - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesCountry) { - 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}" } - ) - } - } + class Builder( + private var name: kotlin.String? = null, + private var isoCode2: kotlin.String? = null, + private var isoCode3: kotlin.String? = null, + private var code: kotlin.String? = null + ) { + fun name(name: kotlin.String) = apply { this.name = name } + fun isoCode2(isoCode2: kotlin.String) = apply { this.isoCode2 = isoCode2 } + fun isoCode3(isoCode3: kotlin.String) = apply { this.isoCode3 = isoCode3 } + fun code(code: kotlin.String?) = apply { this.code = code } + + fun build(): ActivitiesCountry { + val instance = ActivitiesCountry( + name = name!!, + isoCode2 = isoCode2!!, + isoCode3 = isoCode3!!, + code = code + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( name = name!!, isoCode2 = isoCode2!!, isoCode3 = isoCode3!!, code = code - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt index 86ba932be..904d6ff7f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt @@ -15,108 +15,123 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesLocationOption + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for error list. - * @param code Error code describing the issue - * @param description A simple description of what the error is. - * @param detailCode Detailed error code describing the issue. - * @param locationKeyword The requested location that caused the error. - * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. + * @param code Error code describing the issue + * @param description A simple description of what the error is. + * @param detailCode Detailed error code describing the issue. + * @param locationKeyword The requested location that caused the error. + * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. */ data class ActivitiesError( - // Error code describing the issue - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // A simple description of what the error is. - @JsonProperty("Description") - @field:NotNull - @field:Valid - val description: kotlin.String, - // Detailed error code describing the issue. - @JsonProperty("DetailCode") - @field:Valid - val detailCode: kotlin.String? = null, - // The requested location that caused the error. - @JsonProperty("LocationKeyword") - @field:Valid - val locationKeyword: kotlin.String? = null, - // List for possible locations from which the customer must choose the best one to be re-submitted in the request. - @JsonProperty("LocationOptions") - @field:Valid - val locationOptions: kotlin.collections.List? = null + /* Error code describing the issue */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* A simple description of what the error is. */ +@JsonProperty("Description") +val description: + kotlin.String +, + + /* Detailed error code describing the issue. */ +@JsonProperty("DetailCode") +val detailCode: kotlin.String? = null, + + /* The requested location that caused the error. */ +@JsonProperty("LocationKeyword") +val locationKeyword: kotlin.String? = null, + + /* List for possible locations from which the customer must choose the best one to be re-submitted in the request. */ +@JsonProperty("LocationOptions") +val locationOptions: kotlin.collections.List? = null ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(description != null) { "description must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var detailCode: kotlin.String? = null, - private var locationKeyword: kotlin.String? = null, - private var locationOptions: kotlin.collections.List? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun description(description: kotlin.String) = apply { this.description = description } - - fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } - - fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } - - fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } - - fun build(): ActivitiesError { - val instance = - ActivitiesError( - code = code!!, - description = description!!, - detailCode = detailCode, - locationKeyword = locationKeyword, - locationOptions = locationOptions - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesError) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var detailCode: kotlin.String? = null, + private var locationKeyword: kotlin.String? = null, + private var locationOptions: kotlin.collections.List? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun description(description: kotlin.String) = apply { this.description = description } + fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } + fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } + fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } + + fun build(): ActivitiesError { + val instance = ActivitiesError( + code = code!!, + description = description!!, + detailCode = detailCode, + locationKeyword = locationKeyword, + locationOptions = locationOptions + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, description = description!!, detailCode = detailCode, locationKeyword = locationKeyword, locationOptions = locationOptions - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt index 5531dddfc..293d429c2 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt @@ -15,81 +15,80 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesError + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class ActivitiesErrors( - // Container for error list. - @JsonProperty("Errors") - @field:NotNull - @field:Valid - val errors: kotlin.collections - .List< - ActivitiesError - >, - // A unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:NotNull - @field:Valid - val transactionId: kotlin.String + /* Container for error list. */ +@JsonProperty("Errors") +val errors: + kotlin.collections. + List +< + ActivitiesError +> + +, + + /* A unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: + kotlin.String + ) { + + + + init { + require(errors != null) { "errors must not be null" } + + + + + + + + require(transactionId != null) { "transactionId must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - - fun build(): ActivitiesErrors { - val instance = - ActivitiesErrors( - errors = errors!!, - transactionId = transactionId!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesErrors) { - 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}" } - ) - } - } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null + ) { + fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + + fun build(): ActivitiesErrors { + val instance = ActivitiesErrors( + errors = errors!!, + transactionId = transactionId!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( errors = errors!!, transactionId = transactionId!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt index 5c82f1f2e..59530789c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt @@ -15,86 +15,89 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Geographic information - * @param latitude Latitude of the location. - * @param longitude Longitude of the location. - * @param obfuscated + * @param latitude Latitude of the location. + * @param longitude Longitude of the location. + * @param obfuscated */ data class ActivitiesGeoLocation( - // Latitude of the location. - @JsonProperty("Latitude") - @field:NotNull - @field:Valid - val latitude: kotlin.String, - // Longitude of the location. - @JsonProperty("Longitude") - @field:NotNull - @field:Valid - val longitude: kotlin.String, - @JsonProperty("Obfuscated") - @field:Valid - val obfuscated: kotlin.Boolean? = null + /* Latitude of the location. */ +@JsonProperty("Latitude") +val latitude: + kotlin.String +, + + /* Longitude of the location. */ +@JsonProperty("Longitude") +val longitude: + kotlin.String +, + + @JsonProperty("Obfuscated") +val obfuscated: kotlin.Boolean? = null ) { + + + + init { + require(latitude != null) { "latitude must not be null" } + + + + + + + + require(longitude != null) { "longitude must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String) = apply { this.latitude = latitude } - - fun longitude(longitude: kotlin.String) = apply { this.longitude = longitude } - - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } - - fun build(): ActivitiesGeoLocation { - val instance = - ActivitiesGeoLocation( - latitude = latitude!!, - longitude = longitude!!, - obfuscated = obfuscated - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesGeoLocation) { - 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}" } - ) - } - } + class Builder( + private var latitude: kotlin.String? = null, + private var longitude: kotlin.String? = null, + private var obfuscated: kotlin.Boolean? = null + ) { + fun latitude(latitude: kotlin.String) = apply { this.latitude = latitude } + fun longitude(longitude: kotlin.String) = apply { this.longitude = longitude } + fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + + fun build(): ActivitiesGeoLocation { + val instance = ActivitiesGeoLocation( + latitude = latitude!!, + longitude = longitude!!, + obfuscated = obfuscated + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( latitude = latitude!!, longitude = longitude!!, obfuscated = obfuscated - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt index 306c38caf..9cd6a7471 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt @@ -15,86 +15,87 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container of HATEOAS URL's - * @param href HATEOAS URL to fetch details. - * @param accept Accept header. - * @param method HTTP method to connect. + * @param href HATEOAS URL to fetch details. + * @param accept Accept header. + * @param method HTTP method to connect. */ data class ActivitiesLink( - // HATEOAS URL to fetch details. - @JsonProperty("Href") - @field:NotNull - @field:Valid - val href: kotlin.String, - // Accept header. - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // HTTP method to connect. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null + /* HATEOAS URL to fetch details. */ +@JsonProperty("Href") +val href: + kotlin.String +, + + /* Accept header. */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* HTTP method to connect. */ +@JsonProperty("Method") +val method: kotlin.String? = null ) { + + + + init { + require(href != null) { "href must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var href: kotlin.String? = null, - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null - ) { - fun href(href: kotlin.String) = apply { this.href = href } - - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun build(): ActivitiesLink { - val instance = - ActivitiesLink( - href = href!!, - accept = accept, - method = method - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesLink) { - 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}" } - ) - } - } + class Builder( + private var href: kotlin.String? = null, + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null + ) { + fun href(href: kotlin.String) = apply { this.href = href } + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + + fun build(): ActivitiesLink { + val instance = ActivitiesLink( + href = href!!, + accept = accept, + method = method + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( href = href!!, accept = accept, method = method - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt index 359351e9f..87cd7ba62 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt @@ -15,152 +15,201 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesAddress import com.expediagroup.sdk.xap.models.ActivitiesCountry import com.expediagroup.sdk.xap.models.ActivitiesGeoLocation import com.expediagroup.sdk.xap.models.ActivitiesNeighborhood + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * List of location(s) where the activity will happen. - * @param type The type of location code (MULTICITY | METROCODE). - * @param id Expedia Region ID of the specified airport. - * @param name Location Name - * @param code Location Code - * @param locationId Location id. - * @param address - * @param pointOfInterest - * @param geoLocation - * @param neighborhood - * @param regionId RegionId the location resides in. - * @param country + * @param type The type of location code (MULTICITY | METROCODE). + * @param id Expedia Region ID of the specified airport. + * @param name Location Name + * @param code Location Code + * @param locationId Location id. + * @param address + * @param pointOfInterest + * @param geoLocation + * @param neighborhood + * @param regionId RegionId the location resides in. + * @param country */ data class ActivitiesLocation( - // The type of location code (MULTICITY | METROCODE). - @JsonProperty("Type") - @field:Valid - val type: kotlin.String? = null, - // Expedia Region ID of the specified airport. - @JsonProperty("Id") - @field:Valid - val id: kotlin.String? = null, - // Location Name - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null, - // Location Code - @JsonProperty("Code") - @field:Valid - val code: kotlin.String? = null, - // Location id. - @JsonProperty("LocationId") - @field:Valid - val locationId: kotlin.String? = null, - @JsonProperty("Address") - @field:Valid - val address: ActivitiesAddress? = null, - @JsonProperty("PointOfInterest") - @field:Valid - val pointOfInterest: kotlin.String? = null, - @JsonProperty("GeoLocation") - @field:Valid - val geoLocation: ActivitiesGeoLocation? = null, - @JsonProperty("Neighborhood") - @field:Valid - val neighborhood: ActivitiesNeighborhood? = null, - // RegionId the location resides in. - @JsonProperty("RegionId") - val regionId: kotlin.Long? = null, - @JsonProperty("Country") - @field:Valid - val country: ActivitiesCountry? = null + /* The type of location code (MULTICITY | METROCODE). */ +@JsonProperty("Type") +val type: kotlin.String? = null, + + /* Expedia Region ID of the specified airport. */ +@JsonProperty("Id") +val id: kotlin.String? = null, + + /* Location Name */ +@JsonProperty("Name") +val name: kotlin.String? = null, + + /* Location Code */ +@JsonProperty("Code") +val code: kotlin.String? = null, + + /* Location id. */ +@JsonProperty("LocationId") +val locationId: kotlin.String? = null, + + @JsonProperty("Address") +val address: ActivitiesAddress? = null, + + @JsonProperty("PointOfInterest") +val pointOfInterest: kotlin.String? = null, + + @JsonProperty("GeoLocation") +val geoLocation: ActivitiesGeoLocation? = null, + + @JsonProperty("Neighborhood") +val neighborhood: ActivitiesNeighborhood? = null, + + /* RegionId the location resides in. */ +@JsonProperty("RegionId") +val regionId: kotlin.Long? = null, + + @JsonProperty("Country") +val country: ActivitiesCountry? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var id: kotlin.String? = null, - private var name: kotlin.String? = null, - private var code: kotlin.String? = null, - private var locationId: kotlin.String? = null, - private var address: ActivitiesAddress? = null, - private var pointOfInterest: kotlin.String? = null, - private var geoLocation: ActivitiesGeoLocation? = null, - private var neighborhood: ActivitiesNeighborhood? = null, - private var regionId: kotlin.Long? = null, - private var country: ActivitiesCountry? = null - ) { - fun type(type: kotlin.String?) = apply { this.type = type } - - fun id(id: kotlin.String?) = apply { this.id = id } - - fun name(name: kotlin.String?) = apply { this.name = name } - - fun code(code: kotlin.String?) = apply { this.code = code } - - fun locationId(locationId: kotlin.String?) = apply { this.locationId = locationId } - - fun address(address: ActivitiesAddress?) = apply { this.address = address } - - fun pointOfInterest(pointOfInterest: kotlin.String?) = apply { this.pointOfInterest = pointOfInterest } - - fun geoLocation(geoLocation: ActivitiesGeoLocation?) = apply { this.geoLocation = geoLocation } - - fun neighborhood(neighborhood: ActivitiesNeighborhood?) = apply { this.neighborhood = neighborhood } - - fun regionId(regionId: kotlin.Long?) = apply { this.regionId = regionId } - - fun country(country: ActivitiesCountry?) = apply { this.country = country } - - fun build(): ActivitiesLocation { - val instance = - ActivitiesLocation( - type = type, - id = id, - name = name, - code = code, - locationId = locationId, - address = address, - pointOfInterest = pointOfInterest, - geoLocation = geoLocation, - neighborhood = neighborhood, - regionId = regionId, - country = country - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesLocation) { - 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}" } - ) - } - } + class Builder( + private var type: kotlin.String? = null, + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + private var code: kotlin.String? = null, + private var locationId: kotlin.String? = null, + private var address: ActivitiesAddress? = null, + private var pointOfInterest: kotlin.String? = null, + private var geoLocation: ActivitiesGeoLocation? = null, + private var neighborhood: ActivitiesNeighborhood? = null, + private var regionId: kotlin.Long? = null, + private var country: ActivitiesCountry? = null + ) { + fun type(type: kotlin.String?) = apply { this.type = type } + fun id(id: kotlin.String?) = apply { this.id = id } + fun name(name: kotlin.String?) = apply { this.name = name } + fun code(code: kotlin.String?) = apply { this.code = code } + fun locationId(locationId: kotlin.String?) = apply { this.locationId = locationId } + fun address(address: ActivitiesAddress?) = apply { this.address = address } + fun pointOfInterest(pointOfInterest: kotlin.String?) = apply { this.pointOfInterest = pointOfInterest } + fun geoLocation(geoLocation: ActivitiesGeoLocation?) = apply { this.geoLocation = geoLocation } + fun neighborhood(neighborhood: ActivitiesNeighborhood?) = apply { this.neighborhood = neighborhood } + fun regionId(regionId: kotlin.Long?) = apply { this.regionId = regionId } + fun country(country: ActivitiesCountry?) = apply { this.country = country } + + fun build(): ActivitiesLocation { + val instance = ActivitiesLocation( + type = type, + id = id, + name = name, + code = code, + locationId = locationId, + address = address, + pointOfInterest = pointOfInterest, + geoLocation = geoLocation, + neighborhood = neighborhood, + regionId = regionId, + country = country + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( type = type, id = id, name = name, @@ -172,5 +221,5 @@ data class ActivitiesLocation( neighborhood = neighborhood, regionId = regionId, country = country - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt index f70e156ae..846702107 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt @@ -15,143 +15,184 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesCountry import com.expediagroup.sdk.xap.models.ActivitiesGeoLocation import com.expediagroup.sdk.xap.models.ActivitiesLocation + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* List for possible locations from which the customer must choose the best one to be re-submitted in the request. - * @param requestedLocation Location used in partner request. - * @param locations Container for list of possible locations that could be used to disambiguate the query. - * @param type Type of the location. - * @param regionId RegionId the location resides in. - * @param shortName The name of the location which matches the location keyword. - * @param airportCode Indicates the nearest major airport to the location. - * @param address The address of the location. - * @param country - * @param geoLocation +* List for possible locations from which the customer must choose the best one to be re-submitted in the request. + * @param requestedLocation Location used in partner request. + * @param locations Container for list of possible locations that could be used to disambiguate the query. + * @param type Type of the location. + * @param regionId RegionId the location resides in. + * @param shortName The name of the location which matches the location keyword. + * @param airportCode Indicates the nearest major airport to the location. + * @param address The address of the location. + * @param country + * @param geoLocation */ data class ActivitiesLocationOption( - // Location used in partner request. - @JsonProperty("RequestedLocation") - @field:NotNull - @field:Valid - val requestedLocation: kotlin.String, - // Container for list of possible locations that could be used to disambiguate the query. - @JsonProperty("Locations") - @field:NotNull - @field:Valid - val locations: kotlin.collections - .List< - ActivitiesLocation - >, - // Type of the location. - @JsonProperty("Type") - @field:Valid - val type: kotlin.String? = null, - // RegionId the location resides in. - @JsonProperty("RegionId") - @field:Valid - val regionId: kotlin.String? = null, - // The name of the location which matches the location keyword. - @JsonProperty("ShortName") - @field:Valid - val shortName: kotlin.String? = null, - // Indicates the nearest major airport to the location. - @JsonProperty("AirportCode") - @field:Valid - val airportCode: kotlin.String? = null, - // The address of the location. - @JsonProperty("Address") - @field:Valid - val address: kotlin.String? = null, - @JsonProperty("Country") - @field:Valid - val country: ActivitiesCountry? = null, - @JsonProperty("GeoLocation") - @field:Valid - val geoLocation: ActivitiesGeoLocation? = null + /* Location used in partner request. */ +@JsonProperty("RequestedLocation") +val requestedLocation: + kotlin.String +, + + /* Container for list of possible locations that could be used to disambiguate the query. */ +@JsonProperty("Locations") +val locations: + kotlin.collections. + List +< + ActivitiesLocation +> + +, + + /* Type of the location. */ +@JsonProperty("Type") +val type: kotlin.String? = null, + + /* RegionId the location resides in. */ +@JsonProperty("RegionId") +val regionId: kotlin.String? = null, + + /* The name of the location which matches the location keyword. */ +@JsonProperty("ShortName") +val shortName: kotlin.String? = null, + + /* Indicates the nearest major airport to the location. */ +@JsonProperty("AirportCode") +val airportCode: kotlin.String? = null, + + /* The address of the location. */ +@JsonProperty("Address") +val address: kotlin.String? = null, + + @JsonProperty("Country") +val country: ActivitiesCountry? = null, + + @JsonProperty("GeoLocation") +val geoLocation: ActivitiesGeoLocation? = null ) { + + + + init { + require(requestedLocation != null) { "requestedLocation must not be null" } + + + + + + + + require(locations != null) { "locations must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var requestedLocation: kotlin.String? = null, - private var locations: kotlin.collections.List? = null, - private var type: kotlin.String? = null, - private var regionId: kotlin.String? = null, - private var shortName: kotlin.String? = null, - private var airportCode: kotlin.String? = null, - private var address: kotlin.String? = null, - private var country: ActivitiesCountry? = null, - private var geoLocation: ActivitiesGeoLocation? = null - ) { - fun requestedLocation(requestedLocation: kotlin.String) = apply { this.requestedLocation = requestedLocation } - - fun locations(locations: kotlin.collections.List) = apply { this.locations = locations } - - fun type(type: kotlin.String?) = apply { this.type = type } - - fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } - - fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } - - fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } - - fun address(address: kotlin.String?) = apply { this.address = address } - - fun country(country: ActivitiesCountry?) = apply { this.country = country } - - fun geoLocation(geoLocation: ActivitiesGeoLocation?) = apply { this.geoLocation = geoLocation } - - fun build(): ActivitiesLocationOption { - val instance = - ActivitiesLocationOption( - requestedLocation = requestedLocation!!, - locations = locations!!, - type = type, - regionId = regionId, - shortName = shortName, - airportCode = airportCode, - address = address, - country = country, - geoLocation = geoLocation - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesLocationOption) { - 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}" } - ) - } - } + class Builder( + private var requestedLocation: kotlin.String? = null, + private var locations: kotlin.collections.List? = null, + private var type: kotlin.String? = null, + private var regionId: kotlin.String? = null, + private var shortName: kotlin.String? = null, + private var airportCode: kotlin.String? = null, + private var address: kotlin.String? = null, + private var country: ActivitiesCountry? = null, + private var geoLocation: ActivitiesGeoLocation? = null + ) { + fun requestedLocation(requestedLocation: kotlin.String) = apply { this.requestedLocation = requestedLocation } + fun locations(locations: kotlin.collections.List) = apply { this.locations = locations } + fun type(type: kotlin.String?) = apply { this.type = type } + fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } + fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } + fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } + fun address(address: kotlin.String?) = apply { this.address = address } + fun country(country: ActivitiesCountry?) = apply { this.country = country } + fun geoLocation(geoLocation: ActivitiesGeoLocation?) = apply { this.geoLocation = geoLocation } + + fun build(): ActivitiesLocationOption { + val instance = ActivitiesLocationOption( + requestedLocation = requestedLocation!!, + locations = locations!!, + type = type, + regionId = regionId, + shortName = shortName, + airportCode = airportCode, + address = address, + country = country, + geoLocation = geoLocation + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( requestedLocation = requestedLocation!!, locations = locations!!, type = type, @@ -161,5 +202,5 @@ data class ActivitiesLocationOption( address = address, country = country, geoLocation = geoLocation - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt index 0388cc72e..23128af0d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt @@ -15,98 +15,109 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of activity Media. - * @param type type of the media. So far there is only one option: 1: Image - * @param propertySize Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. - * @param url Image URL - * @param title Image title + * @param type type of the media. So far there is only one option: 1: Image + * @param propertySize Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. + * @param url Image URL + * @param title Image title */ data class ActivitiesMedia( - // type of the media. So far there is only one option: 1: Image - @JsonProperty("Type") - @field:NotNull - @field:Valid - val type: kotlin.String, - // Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. - @JsonProperty("Size") - @field:NotNull - @field:Valid - val propertySize: kotlin.String, - // Image URL - @JsonProperty("Url") - @field:NotNull - @field:Valid - val url: kotlin.String, - // Image title - @JsonProperty("Title") - @field:Valid - val title: kotlin.String? = null + /* type of the media. So far there is only one option: 1: Image */ +@JsonProperty("Type") +val type: + kotlin.String +, + + /* Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. */ +@JsonProperty("Size") +val propertySize: + kotlin.String +, + + /* Image URL */ +@JsonProperty("Url") +val url: + kotlin.String +, + + /* Image title */ +@JsonProperty("Title") +val title: kotlin.String? = null ) { + + + + init { + require(type != null) { "type must not be null" } + + + + + + + + require(propertySize != null) { "propertySize must not be null" } + + + + + + + + require(url != null) { "url must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var propertySize: kotlin.String? = null, - private var url: kotlin.String? = null, - private var title: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - - fun propertySize(propertySize: kotlin.String) = apply { this.propertySize = propertySize } - - fun url(url: kotlin.String) = apply { this.url = url } - - fun title(title: kotlin.String?) = apply { this.title = title } - - fun build(): ActivitiesMedia { - val instance = - ActivitiesMedia( - type = type!!, - propertySize = propertySize!!, - url = url!!, - title = title - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesMedia) { - 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}" } - ) - } - } + class Builder( + private var type: kotlin.String? = null, + private var propertySize: kotlin.String? = null, + private var url: kotlin.String? = null, + private var title: kotlin.String? = null + ) { + fun type(type: kotlin.String) = apply { this.type = type } + fun propertySize(propertySize: kotlin.String) = apply { this.propertySize = propertySize } + fun url(url: kotlin.String) = apply { this.url = url } + fun title(title: kotlin.String?) = apply { this.title = title } + + fun build(): ActivitiesMedia { + val instance = ActivitiesMedia( + type = type!!, + propertySize = propertySize!!, + url = url!!, + title = title + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( type = type!!, propertySize = propertySize!!, url = url!!, title = title - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt index a304be2d6..af756daba 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt @@ -15,86 +15,89 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for the discount amount. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class ActivitiesMoney( - // The value of the element being defined. - @JsonProperty("Value") - @field:NotNull - @field:Valid - val `value`: kotlin.String, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:NotNull - @field:Valid - val currency: kotlin.String, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: ActivitiesMoney? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: + kotlin.String +, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: + kotlin.String +, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: ActivitiesMoney? = null ) { + + + + init { + require(`value` != null) { "`value` must not be null" } + + + + + + + + require(currency != null) { "currency must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: ActivitiesMoney? = null - ) { - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: ActivitiesMoney?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): ActivitiesMoney { - val instance = - ActivitiesMoney( - `value` = `value`!!, - currency = currency!!, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesMoney) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: ActivitiesMoney? = null + ) { + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: ActivitiesMoney?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): ActivitiesMoney { + val instance = ActivitiesMoney( + `value` = `value`!!, + currency = currency!!, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`!!, currency = currency!!, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt index 9c8cb787e..52b2c4ba9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. - * @param id Neighborhood id. - * @param name Neighborhood name. + * @param id Neighborhood id. + * @param name Neighborhood name. */ data class ActivitiesNeighborhood( - // Neighborhood id. - @JsonProperty("Id") - @field:NotNull - @field:Valid - val id: kotlin.String, - // Neighborhood name. - @JsonProperty("Name") - @field:NotNull - @field:Valid - val name: kotlin.String + /* Neighborhood id. */ +@JsonProperty("Id") +val id: + kotlin.String +, + + /* Neighborhood name. */ +@JsonProperty("Name") +val name: + kotlin.String + ) { + + + + init { + require(id != null) { "id must not be null" } + + + + + + + + require(name != null) { "name must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.String) = apply { this.id = id } - - fun name(name: kotlin.String) = apply { this.name = name } - - fun build(): ActivitiesNeighborhood { - val instance = - ActivitiesNeighborhood( - id = id!!, - name = name!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesNeighborhood) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null + ) { + fun id(id: kotlin.String) = apply { this.id = id } + fun name(name: kotlin.String) = apply { this.name = name } + + fun build(): ActivitiesNeighborhood { + val instance = ActivitiesNeighborhood( + id = id!!, + name = name!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id!!, name = name!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt index 8627770a6..1f7f6c836 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt @@ -15,96 +15,105 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The phone of the company providing the activity. - * @param countryCode Country code of traveler's phone number; only digits allowed. - * @param number Traveler's phone number; only digits allowed. - * @param areaCode Area code of traveler's phone number; only digits allowed. - * @param extensionNumber + * @param countryCode Country code of traveler's phone number; only digits allowed. + * @param number Traveler's phone number; only digits allowed. + * @param areaCode Area code of traveler's phone number; only digits allowed. + * @param extensionNumber */ data class ActivitiesPhone( - // Country code of traveler's phone number; only digits allowed. - @JsonProperty("CountryCode") - @field:NotNull - @field:Valid - val countryCode: kotlin.String, - // Traveler's phone number; only digits allowed. - @JsonProperty("Number") - @field:NotNull - @field:Valid - val number: kotlin.String, - // Area code of traveler's phone number; only digits allowed. - @JsonProperty("AreaCode") - @field:Valid - val areaCode: kotlin.String? = null, - @JsonProperty("ExtensionNumber") - @field:Valid - val extensionNumber: kotlin.String? = null + /* Country code of traveler's phone number; only digits allowed. */ +@JsonProperty("CountryCode") +val countryCode: + kotlin.String +, + + /* Traveler's phone number; only digits allowed. */ +@JsonProperty("Number") +val number: + kotlin.String +, + + /* Area code of traveler's phone number; only digits allowed. */ +@JsonProperty("AreaCode") +val areaCode: kotlin.String? = null, + + @JsonProperty("ExtensionNumber") +val extensionNumber: kotlin.String? = null ) { + + + + init { + require(countryCode != null) { "countryCode must not be null" } + + + + + + + + require(number != null) { "number must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var countryCode: kotlin.String? = null, - private var number: kotlin.String? = null, - private var areaCode: kotlin.String? = null, - private var extensionNumber: kotlin.String? = null - ) { - fun countryCode(countryCode: kotlin.String) = apply { this.countryCode = countryCode } - - fun number(number: kotlin.String) = apply { this.number = number } - - fun areaCode(areaCode: kotlin.String?) = apply { this.areaCode = areaCode } - - fun extensionNumber(extensionNumber: kotlin.String?) = apply { this.extensionNumber = extensionNumber } - - fun build(): ActivitiesPhone { - val instance = - ActivitiesPhone( - countryCode = countryCode!!, - number = number!!, - areaCode = areaCode, - extensionNumber = extensionNumber - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesPhone) { - 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}" } - ) - } - } + class Builder( + private var countryCode: kotlin.String? = null, + private var number: kotlin.String? = null, + private var areaCode: kotlin.String? = null, + private var extensionNumber: kotlin.String? = null + ) { + fun countryCode(countryCode: kotlin.String) = apply { this.countryCode = countryCode } + fun number(number: kotlin.String) = apply { this.number = number } + fun areaCode(areaCode: kotlin.String?) = apply { this.areaCode = areaCode } + fun extensionNumber(extensionNumber: kotlin.String?) = apply { this.extensionNumber = extensionNumber } + + fun build(): ActivitiesPhone { + val instance = ActivitiesPhone( + countryCode = countryCode!!, + number = number!!, + areaCode = areaCode, + extensionNumber = extensionNumber + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( countryCode = countryCode!!, number = number!!, areaCode = areaCode, extensionNumber = extensionNumber - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt index 874ea2297..b460b02fd 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt @@ -15,114 +15,133 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesMoney import com.expediagroup.sdk.xap.models.ReferencePrice import com.expediagroup.sdk.xap.models.Savings + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The price of the offer - * @param totalRate - * @param category Type of passenger. Values supported are: ADULT | SENIOR | CHILD - * @param totalFees - * @param totalTaxesAndFees - * @param referencePrice - * @param savings + * @param totalRate + * @param category Type of passenger. Values supported are: ADULT | SENIOR | CHILD + * @param totalFees + * @param totalTaxesAndFees + * @param referencePrice + * @param savings */ data class ActivitiesPrice( - @JsonProperty("TotalRate") - @field:NotNull - @field:Valid - val totalRate: ActivitiesMoney, - // Type of passenger. Values supported are: ADULT | SENIOR | CHILD - @JsonProperty("Category") - @field:Valid - val category: kotlin.String? = null, - @JsonProperty("TotalFees") - @field:Valid - val totalFees: ActivitiesMoney? = null, - @JsonProperty("TotalTaxesAndFees") - @field:Valid - val totalTaxesAndFees: ActivitiesMoney? = null, - @JsonProperty("ReferencePrice") - @field:Valid - val referencePrice: ReferencePrice? = null, - @JsonProperty("Savings") - @field:Valid - val savings: Savings? = null + @JsonProperty("TotalRate") +val totalRate: + ActivitiesMoney +, + + /* Type of passenger. Values supported are: ADULT | SENIOR | CHILD */ +@JsonProperty("Category") +val category: kotlin.String? = null, + + @JsonProperty("TotalFees") +val totalFees: ActivitiesMoney? = null, + + @JsonProperty("TotalTaxesAndFees") +val totalTaxesAndFees: ActivitiesMoney? = null, + + @JsonProperty("ReferencePrice") +val referencePrice: ReferencePrice? = null, + + @JsonProperty("Savings") +val savings: Savings? = null ) { + + + + init { + require(totalRate != null) { "totalRate must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var totalRate: ActivitiesMoney? = null, - private var category: kotlin.String? = null, - private var totalFees: ActivitiesMoney? = null, - private var totalTaxesAndFees: ActivitiesMoney? = null, - private var referencePrice: ReferencePrice? = null, - private var savings: Savings? = null - ) { - fun totalRate(totalRate: ActivitiesMoney) = apply { this.totalRate = totalRate } - - fun category(category: kotlin.String?) = apply { this.category = category } - - fun totalFees(totalFees: ActivitiesMoney?) = apply { this.totalFees = totalFees } - - fun totalTaxesAndFees(totalTaxesAndFees: ActivitiesMoney?) = apply { this.totalTaxesAndFees = totalTaxesAndFees } - - fun referencePrice(referencePrice: ReferencePrice?) = apply { this.referencePrice = referencePrice } - - fun savings(savings: Savings?) = apply { this.savings = savings } - - fun build(): ActivitiesPrice { - val instance = - ActivitiesPrice( - totalRate = totalRate!!, - category = category, - totalFees = totalFees, - totalTaxesAndFees = totalTaxesAndFees, - referencePrice = referencePrice, - savings = savings - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesPrice) { - 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}" } - ) - } - } + class Builder( + private var totalRate: ActivitiesMoney? = null, + private var category: kotlin.String? = null, + private var totalFees: ActivitiesMoney? = null, + private var totalTaxesAndFees: ActivitiesMoney? = null, + private var referencePrice: ReferencePrice? = null, + private var savings: Savings? = null + ) { + fun totalRate(totalRate: ActivitiesMoney) = apply { this.totalRate = totalRate } + fun category(category: kotlin.String?) = apply { this.category = category } + fun totalFees(totalFees: ActivitiesMoney?) = apply { this.totalFees = totalFees } + fun totalTaxesAndFees(totalTaxesAndFees: ActivitiesMoney?) = apply { this.totalTaxesAndFees = totalTaxesAndFees } + fun referencePrice(referencePrice: ReferencePrice?) = apply { this.referencePrice = referencePrice } + fun savings(savings: Savings?) = apply { this.savings = savings } + + fun build(): ActivitiesPrice { + val instance = ActivitiesPrice( + totalRate = totalRate!!, + category = category, + totalFees = totalFees, + totalTaxesAndFees = totalTaxesAndFees, + referencePrice = referencePrice, + savings = savings + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( totalRate = totalRate!!, category = category, totalFees = totalFees, totalTaxesAndFees = totalTaxesAndFees, referencePrice = referencePrice, savings = savings - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt index 4588599fb..784e7ad23 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt @@ -15,76 +15,71 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesPhone + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The details information of company providing the activity. - * @param name The name of the company providing the activity. - * @param phone + * @param name The name of the company providing the activity. + * @param phone */ data class ActivitiesSupplier( - // The name of the company providing the activity. - @JsonProperty("Name") - @field:NotNull - @field:Valid - val name: kotlin.String, - @JsonProperty("Phone") - @field:Valid - val phone: ActivitiesPhone? = null + /* The name of the company providing the activity. */ +@JsonProperty("Name") +val name: + kotlin.String +, + + @JsonProperty("Phone") +val phone: ActivitiesPhone? = null ) { + + + + init { + require(name != null) { "name must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var phone: ActivitiesPhone? = null - ) { - fun name(name: kotlin.String) = apply { this.name = name } - - fun phone(phone: ActivitiesPhone?) = apply { this.phone = phone } - - fun build(): ActivitiesSupplier { - val instance = - ActivitiesSupplier( - name = name!!, - phone = phone - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesSupplier) { - 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}" } - ) - } - } + class Builder( + private var name: kotlin.String? = null, + private var phone: ActivitiesPhone? = null + ) { + fun name(name: kotlin.String) = apply { this.name = name } + fun phone(phone: ActivitiesPhone?) = apply { this.phone = phone } + + fun build(): ActivitiesSupplier { + val instance = ActivitiesSupplier( + name = name!!, + phone = phone + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( name = name!!, phone = phone - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt index cb075b67e..9963373fa 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt @@ -15,119 +15,146 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesLink import com.expediagroup.sdk.xap.models.ActivitiesMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for all warnings generated during the transaction. - * @param code Standardized warning code. - * @param description Standardized warning description message. - * @param originalPrice - * @param newPrice - * @param changedAmount - * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - * @param links + * @param code Standardized warning code. + * @param description Standardized warning description message. + * @param originalPrice + * @param newPrice + * @param changedAmount + * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. + * @param links */ data class ActivitiesWarning( - // Standardized warning code. - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // Standardized warning description message. - @JsonProperty("Description") - @field:NotNull - @field:Valid - val description: kotlin.String, - @JsonProperty("OriginalPrice") - @field:Valid - val originalPrice: ActivitiesMoney? = null, - @JsonProperty("NewPrice") - @field:Valid - val newPrice: ActivitiesMoney? = null, - @JsonProperty("ChangedAmount") - @field:Valid - val changedAmount: ActivitiesMoney? = null, - // The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - @JsonProperty("ChangedPercentage") - @field:Valid - val changedPercentage: kotlin.String? = null, - @JsonProperty("Links") - @field:Valid - val links: kotlin.collections.Map? = null + /* Standardized warning code. */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* Standardized warning description message. */ +@JsonProperty("Description") +val description: + kotlin.String +, + + @JsonProperty("OriginalPrice") +val originalPrice: ActivitiesMoney? = null, + + @JsonProperty("NewPrice") +val newPrice: ActivitiesMoney? = null, + + @JsonProperty("ChangedAmount") +val changedAmount: ActivitiesMoney? = null, + + /* The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ +@JsonProperty("ChangedPercentage") +val changedPercentage: kotlin.String? = null, + + @JsonProperty("Links") +val links: kotlin.collections.Map? = null ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(description != null) { "description must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var originalPrice: ActivitiesMoney? = null, - private var newPrice: ActivitiesMoney? = null, - private var changedAmount: ActivitiesMoney? = null, - private var changedPercentage: kotlin.String? = null, - private var links: kotlin.collections.Map? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun description(description: kotlin.String) = apply { this.description = description } - - fun originalPrice(originalPrice: ActivitiesMoney?) = apply { this.originalPrice = originalPrice } - - fun newPrice(newPrice: ActivitiesMoney?) = apply { this.newPrice = newPrice } - - fun changedAmount(changedAmount: ActivitiesMoney?) = apply { this.changedAmount = changedAmount } - - fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } - - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun build(): ActivitiesWarning { - val instance = - ActivitiesWarning( - code = code!!, - description = description!!, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount, - changedPercentage = changedPercentage, - links = links - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivitiesWarning) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var originalPrice: ActivitiesMoney? = null, + private var newPrice: ActivitiesMoney? = null, + private var changedAmount: ActivitiesMoney? = null, + private var changedPercentage: kotlin.String? = null, + private var links: kotlin.collections.Map? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun description(description: kotlin.String) = apply { this.description = description } + fun originalPrice(originalPrice: ActivitiesMoney?) = apply { this.originalPrice = originalPrice } + fun newPrice(newPrice: ActivitiesMoney?) = apply { this.newPrice = newPrice } + fun changedAmount(changedAmount: ActivitiesMoney?) = apply { this.changedAmount = changedAmount } + fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + + fun build(): ActivitiesWarning { + val instance = ActivitiesWarning( + code = code!!, + description = description!!, + originalPrice = originalPrice, + newPrice = newPrice, + changedAmount = changedAmount, + changedPercentage = changedPercentage, + links = links + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, description = description!!, originalPrice = originalPrice, @@ -135,5 +162,5 @@ data class ActivitiesWarning( changedAmount = changedAmount, changedPercentage = changedPercentage, links = links - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt index b69791c41..f10bffad6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt @@ -15,7 +15,6 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesCancellationPolicy import com.expediagroup.sdk.xap.models.ActivitiesLink import com.expediagroup.sdk.xap.models.ActivitiesLocation @@ -24,260 +23,400 @@ import com.expediagroup.sdk.xap.models.ActivitiesPrice import com.expediagroup.sdk.xap.models.ActivitiesSupplier import com.expediagroup.sdk.xap.models.Offer import com.expediagroup.sdk.xap.models.Redemption + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Detailed information on the Activity. - * @param id The numerical identifier for this particular activity - * @param title The display title for this activity. - * @param description The description of the Activity. - * @param media List of activity Media. - * @param categories A list of the Activity categories to which this particular activity belongs. Possible values are: Adventures Air, Balloon & Helicopter Tours Attractions Cruises & Water Tours Day Trips & Excursions Food & Drink Hop-on Hop-off Multi-Day & Extended Tours Nightlife Private Tours Private Transfers Shared Transfers Show & Sport Tickets Sightseeing Passes Theme Parks Tours & Sightseeing Walking & Bike Tours Water Activities Wedding Ceremonies Winter Activities - * @param duration The anticipated time duration for the activity. Using java jdk Duration parsing. - * @param freeCancellation A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. - * @param price - * @param supplier - * @param redemption - * @param activityLocations Container of location information where activity happens. - * @param reviewScore The overall Expedia score for the activity. - * @param reviewCount The number of Expedia reviews that went into the calculation of the ReviewScore. - * @param links HATEOAS links included in this response. - * @param cancellationPolicy - * @param highlights Web formatted statement of the Highlight(s) for the activity. - * @param termsAndConditions Terms and Conditions for the Activity. - * @param inclusions Web formatted statement of what is included in the activity - * @param exclusions Web formatted statement of what is NOT included in the activity - * @param knowBeforeYouBook Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. - * @param knowBeforeYouGo Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. - * @param offers Offers for the activity. + * @param id The numerical identifier for this particular activity + * @param title The display title for this activity. + * @param description The description of the Activity. + * @param media List of activity Media. + * @param categories A list of the Activity categories to which this particular activity belongs. Possible values are: Adventures Air, Balloon & Helicopter Tours Attractions Cruises & Water Tours Day Trips & Excursions Food & Drink Hop-on Hop-off Multi-Day & Extended Tours Nightlife Private Tours Private Transfers Shared Transfers Show & Sport Tickets Sightseeing Passes Theme Parks Tours & Sightseeing Walking & Bike Tours Water Activities Wedding Ceremonies Winter Activities + * @param duration The anticipated time duration for the activity. Using java jdk Duration parsing. + * @param freeCancellation A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. + * @param price + * @param supplier + * @param redemption + * @param activityLocations Container of location information where activity happens. + * @param reviewScore The overall Expedia score for the activity. + * @param reviewCount The number of Expedia reviews that went into the calculation of the ReviewScore. + * @param links HATEOAS links included in this response. + * @param cancellationPolicy + * @param highlights Web formatted statement of the Highlight(s) for the activity. + * @param termsAndConditions Terms and Conditions for the Activity. + * @param inclusions Web formatted statement of what is included in the activity + * @param exclusions Web formatted statement of what is NOT included in the activity + * @param knowBeforeYouBook Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. + * @param knowBeforeYouGo Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. + * @param offers Offers for the activity. */ data class Activity( - // The numerical identifier for this particular activity - @JsonProperty("Id") - val id: kotlin.Int, - // The display title for this activity. - @JsonProperty("Title") - @field:NotNull - @field:Valid - val title: kotlin.String, - // The description of the Activity. - @JsonProperty("Description") - @field:NotNull - @field:Valid - val description: kotlin.String, - // List of activity Media. - @JsonProperty("Media") - @field:NotNull - @field:Valid - val media: kotlin.collections - .List< - ActivitiesMedia - >, - // A list of the Activity categories to which this particular activity belongs. Possible values are: Adventures Air, Balloon & Helicopter Tours Attractions Cruises & Water Tours Day Trips & Excursions Food & Drink Hop-on Hop-off Multi-Day & Extended Tours Nightlife Private Tours Private Transfers Shared Transfers Show & Sport Tickets Sightseeing Passes Theme Parks Tours & Sightseeing Walking & Bike Tours Water Activities Wedding Ceremonies Winter Activities - @JsonProperty("Categories") - @field:NotNull - @field:Valid - val categories: kotlin.collections - .List< - kotlin.String - >, - // The anticipated time duration for the activity. Using java jdk Duration parsing. - @JsonProperty("Duration") - @field:NotNull - @field:Valid - val duration: kotlin.String, - // A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. - @JsonProperty("FreeCancellation") - @field:NotNull - @field:Valid - val freeCancellation: kotlin.Boolean, - @JsonProperty("Price") - @field:NotNull - @field:Valid - val price: ActivitiesPrice, - @JsonProperty("Supplier") - @field:NotNull - @field:Valid - val supplier: ActivitiesSupplier, - @JsonProperty("Redemption") - @field:Valid - val redemption: Redemption? = null, - // Container of location information where activity happens. - @JsonProperty("ActivityLocations") - @field:Valid - val activityLocations: kotlin.collections.List? = null, - // The overall Expedia score for the activity. - @JsonProperty("ReviewScore") - val reviewScore: kotlin.Int? = null, - // The number of Expedia reviews that went into the calculation of the ReviewScore. - @JsonProperty("ReviewCount") - val reviewCount: kotlin.Int? = null, - // HATEOAS links included in this response. - @JsonProperty("Links") - @field:Valid - val links: kotlin.collections.Map? = null, - @JsonProperty("CancellationPolicy") - @field:Valid - val cancellationPolicy: ActivitiesCancellationPolicy? = null, - // Web formatted statement of the Highlight(s) for the activity. - @JsonProperty("Highlights") - @field:Valid - val highlights: kotlin.collections.List? = null, - // Terms and Conditions for the Activity. - @JsonProperty("TermsAndConditions") - @field:Valid - val termsAndConditions: kotlin.collections.List? = null, - // Web formatted statement of what is included in the activity - @JsonProperty("Inclusions") - @field:Valid - val inclusions: kotlin.collections.List? = null, - // Web formatted statement of what is NOT included in the activity - @JsonProperty("Exclusions") - @field:Valid - val exclusions: kotlin.collections.List? = null, - // Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. - @JsonProperty("KnowBeforeYouBook") - @field:Valid - val knowBeforeYouBook: kotlin.collections.List? = null, - // Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. - @JsonProperty("KnowBeforeYouGo") - @field:Valid - val knowBeforeYouGo: kotlin.collections.List? = null, - // Offers for the activity. - @JsonProperty("Offers") - @field:Valid - val offers: kotlin.collections.List? = null + /* The numerical identifier for this particular activity */ +@JsonProperty("Id") +val id: + kotlin.Int +, + + /* The display title for this activity. */ +@JsonProperty("Title") +val title: + kotlin.String +, + + /* The description of the Activity. */ +@JsonProperty("Description") +val description: + kotlin.String +, + + /* List of activity Media. */ +@JsonProperty("Media") +val media: + kotlin.collections. + List +< + ActivitiesMedia +> + +, + + /* A list of the Activity categories to which this particular activity belongs. Possible values are: Adventures Air, Balloon & Helicopter Tours Attractions Cruises & Water Tours Day Trips & Excursions Food & Drink Hop-on Hop-off Multi-Day & Extended Tours Nightlife Private Tours Private Transfers Shared Transfers Show & Sport Tickets Sightseeing Passes Theme Parks Tours & Sightseeing Walking & Bike Tours Water Activities Wedding Ceremonies Winter Activities */ +@JsonProperty("Categories") +val categories: + kotlin.collections. + List +< + kotlin.String +> + +, + + /* The anticipated time duration for the activity. Using java jdk Duration parsing. */ +@JsonProperty("Duration") +val duration: + kotlin.String +, + + /* A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. */ +@JsonProperty("FreeCancellation") +val freeCancellation: + kotlin.Boolean +, + + @JsonProperty("Price") +val price: + ActivitiesPrice +, + + @JsonProperty("Supplier") +val supplier: + ActivitiesSupplier +, + + @JsonProperty("Redemption") +val redemption: Redemption? = null, + + /* Container of location information where activity happens. */ +@JsonProperty("ActivityLocations") +val activityLocations: kotlin.collections.List? = null, + + /* The overall Expedia score for the activity. */ +@JsonProperty("ReviewScore") +val reviewScore: kotlin.Int? = null, + + /* The number of Expedia reviews that went into the calculation of the ReviewScore. */ +@JsonProperty("ReviewCount") +val reviewCount: kotlin.Int? = null, + + /* HATEOAS links included in this response. */ +@JsonProperty("Links") +val links: kotlin.collections.Map? = null, + + @JsonProperty("CancellationPolicy") +val cancellationPolicy: ActivitiesCancellationPolicy? = null, + + /* Web formatted statement of the Highlight(s) for the activity. */ +@JsonProperty("Highlights") +val highlights: kotlin.collections.List? = null, + + /* Terms and Conditions for the Activity. */ +@JsonProperty("TermsAndConditions") +val termsAndConditions: kotlin.collections.List? = null, + + /* Web formatted statement of what is included in the activity */ +@JsonProperty("Inclusions") +val inclusions: kotlin.collections.List? = null, + + /* Web formatted statement of what is NOT included in the activity */ +@JsonProperty("Exclusions") +val exclusions: kotlin.collections.List? = null, + + /* Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. */ +@JsonProperty("KnowBeforeYouBook") +val knowBeforeYouBook: kotlin.collections.List? = null, + + /* Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. */ +@JsonProperty("KnowBeforeYouGo") +val knowBeforeYouGo: kotlin.collections.List? = null, + + /* Offers for the activity. */ +@JsonProperty("Offers") +val offers: kotlin.collections.List? = null ) { + + + + init { + require(id != null) { "id must not be null" } + + + + + + + + require(title != null) { "title must not be null" } + + + + + + + + require(description != null) { "description must not be null" } + + + + + + + + require(media != null) { "media must not be null" } + + + + + + + + require(categories != null) { "categories must not be null" } + + + + + + + + require(duration != null) { "duration must not be null" } + + + + + + + + require(freeCancellation != null) { "freeCancellation must not be null" } + + + + + + + + require(price != null) { "price must not be null" } + + + + + + + + require(supplier != null) { "supplier must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Int? = null, - private var title: kotlin.String? = null, - private var description: kotlin.String? = null, - private var media: kotlin.collections.List? = null, - private var categories: kotlin.collections.List? = null, - private var duration: kotlin.String? = null, - private var freeCancellation: kotlin.Boolean? = null, - private var price: ActivitiesPrice? = null, - private var supplier: ActivitiesSupplier? = null, - private var redemption: Redemption? = null, - private var activityLocations: kotlin.collections.List? = null, - private var reviewScore: kotlin.Int? = null, - private var reviewCount: kotlin.Int? = null, - private var links: kotlin.collections.Map? = null, - private var cancellationPolicy: ActivitiesCancellationPolicy? = null, - private var highlights: kotlin.collections.List? = null, - private var termsAndConditions: kotlin.collections.List? = null, - private var inclusions: kotlin.collections.List? = null, - private var exclusions: kotlin.collections.List? = null, - private var knowBeforeYouBook: kotlin.collections.List? = null, - private var knowBeforeYouGo: kotlin.collections.List? = null, - private var offers: kotlin.collections.List? = null - ) { - fun id(id: kotlin.Int) = apply { this.id = id } - - fun title(title: kotlin.String) = apply { this.title = title } - - fun description(description: kotlin.String) = apply { this.description = description } - - fun media(media: kotlin.collections.List) = apply { this.media = media } - - fun categories(categories: kotlin.collections.List) = apply { this.categories = categories } - - fun duration(duration: kotlin.String) = apply { this.duration = duration } - - fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } - - fun price(price: ActivitiesPrice) = apply { this.price = price } - - fun supplier(supplier: ActivitiesSupplier) = apply { this.supplier = supplier } - - fun redemption(redemption: Redemption?) = apply { this.redemption = redemption } - - fun activityLocations(activityLocations: kotlin.collections.List?) = apply { this.activityLocations = activityLocations } - - fun reviewScore(reviewScore: kotlin.Int?) = apply { this.reviewScore = reviewScore } - - fun reviewCount(reviewCount: kotlin.Int?) = apply { this.reviewCount = reviewCount } - - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun cancellationPolicy(cancellationPolicy: ActivitiesCancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } - - fun highlights(highlights: kotlin.collections.List?) = apply { this.highlights = highlights } - - fun termsAndConditions(termsAndConditions: kotlin.collections.List?) = apply { this.termsAndConditions = termsAndConditions } - - fun inclusions(inclusions: kotlin.collections.List?) = apply { this.inclusions = inclusions } - - fun exclusions(exclusions: kotlin.collections.List?) = apply { this.exclusions = exclusions } - - fun knowBeforeYouBook(knowBeforeYouBook: kotlin.collections.List?) = apply { this.knowBeforeYouBook = knowBeforeYouBook } - - fun knowBeforeYouGo(knowBeforeYouGo: kotlin.collections.List?) = apply { this.knowBeforeYouGo = knowBeforeYouGo } - - fun offers(offers: kotlin.collections.List?) = apply { this.offers = offers } - - fun build(): Activity { - val instance = - Activity( - id = id!!, - title = title!!, - description = description!!, - media = media!!, - categories = categories!!, - duration = duration!!, - freeCancellation = freeCancellation!!, - price = price!!, - supplier = supplier!!, - redemption = redemption, - activityLocations = activityLocations, - reviewScore = reviewScore, - reviewCount = reviewCount, - links = links, - cancellationPolicy = cancellationPolicy, - highlights = highlights, - termsAndConditions = termsAndConditions, - inclusions = inclusions, - exclusions = exclusions, - knowBeforeYouBook = knowBeforeYouBook, - knowBeforeYouGo = knowBeforeYouGo, - offers = offers - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Activity) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator + class Builder( + private var id: kotlin.Int? = null, + private var title: kotlin.String? = null, + private var description: kotlin.String? = null, + private var media: kotlin.collections.List? = null, + private var categories: kotlin.collections.List? = null, + private var duration: kotlin.String? = null, + private var freeCancellation: kotlin.Boolean? = null, + private var price: ActivitiesPrice? = null, + private var supplier: ActivitiesSupplier? = null, + private var redemption: Redemption? = null, + private var activityLocations: kotlin.collections.List? = null, + private var reviewScore: kotlin.Int? = null, + private var reviewCount: kotlin.Int? = null, + private var links: kotlin.collections.Map? = null, + private var cancellationPolicy: ActivitiesCancellationPolicy? = null, + private var highlights: kotlin.collections.List? = null, + private var termsAndConditions: kotlin.collections.List? = null, + private var inclusions: kotlin.collections.List? = null, + private var exclusions: kotlin.collections.List? = null, + private var knowBeforeYouBook: kotlin.collections.List? = null, + private var knowBeforeYouGo: kotlin.collections.List? = null, + private var offers: kotlin.collections.List? = null + ) { + fun id(id: kotlin.Int) = apply { this.id = id } + fun title(title: kotlin.String) = apply { this.title = title } + fun description(description: kotlin.String) = apply { this.description = description } + fun media(media: kotlin.collections.List) = apply { this.media = media } + fun categories(categories: kotlin.collections.List) = apply { this.categories = categories } + fun duration(duration: kotlin.String) = apply { this.duration = duration } + fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } + fun price(price: ActivitiesPrice) = apply { this.price = price } + fun supplier(supplier: ActivitiesSupplier) = apply { this.supplier = supplier } + fun redemption(redemption: Redemption?) = apply { this.redemption = redemption } + fun activityLocations(activityLocations: kotlin.collections.List?) = apply { this.activityLocations = activityLocations } + fun reviewScore(reviewScore: kotlin.Int?) = apply { this.reviewScore = reviewScore } + fun reviewCount(reviewCount: kotlin.Int?) = apply { this.reviewCount = reviewCount } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + fun cancellationPolicy(cancellationPolicy: ActivitiesCancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } + fun highlights(highlights: kotlin.collections.List?) = apply { this.highlights = highlights } + fun termsAndConditions(termsAndConditions: kotlin.collections.List?) = apply { this.termsAndConditions = termsAndConditions } + fun inclusions(inclusions: kotlin.collections.List?) = apply { this.inclusions = inclusions } + fun exclusions(exclusions: kotlin.collections.List?) = apply { this.exclusions = exclusions } + fun knowBeforeYouBook(knowBeforeYouBook: kotlin.collections.List?) = apply { this.knowBeforeYouBook = knowBeforeYouBook } + fun knowBeforeYouGo(knowBeforeYouGo: kotlin.collections.List?) = apply { this.knowBeforeYouGo = knowBeforeYouGo } + fun offers(offers: kotlin.collections.List?) = apply { this.offers = offers } - val violations = validator.validate(instance) + fun build(): Activity { + val instance = Activity( + id = id!!, + title = title!!, + description = description!!, + media = media!!, + categories = categories!!, + duration = duration!!, + freeCancellation = freeCancellation!!, + price = price!!, + supplier = supplier!!, + redemption = redemption, + activityLocations = activityLocations, + reviewScore = reviewScore, + reviewCount = reviewCount, + links = links, + cancellationPolicy = cancellationPolicy, + highlights = highlights, + termsAndConditions = termsAndConditions, + inclusions = inclusions, + exclusions = exclusions, + knowBeforeYouBook = knowBeforeYouBook, + knowBeforeYouGo = knowBeforeYouGo, + offers = offers + ) - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } - } + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id!!, title = title!!, description = description!!, @@ -300,5 +439,5 @@ data class Activity( knowBeforeYouBook = knowBeforeYouBook, knowBeforeYouGo = knowBeforeYouGo, offers = offers - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt index afb2a95fc..09800b209 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt @@ -15,116 +15,139 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesWarning import com.expediagroup.sdk.xap.models.Activity + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* - * @param transactionId A unique identifier for this transaction. - * @param location The location user searched, translated into the full, unambiguous format. - * @param warnings Container for all warnings generated during the transaction. - * @param startDate The startDate of activities in YYY-MM-DD format. - * @param endDate The endDate of activities in YYY-MM-DD format. - * @param activityDetails +* + * @param transactionId A unique identifier for this transaction. + * @param location The location user searched, translated into the full, unambiguous format. + * @param warnings Container for all warnings generated during the transaction. + * @param startDate The startDate of activities in YYY-MM-DD format. + * @param endDate The endDate of activities in YYY-MM-DD format. + * @param activityDetails */ data class ActivityDetailsResponse( - // A unique identifier for this transaction. - @JsonProperty("TransactionId") - @field:NotNull - @field:Valid - val transactionId: kotlin.String, - // The location user searched, translated into the full, unambiguous format. - @JsonProperty("Location") - @field:NotNull - @field:Valid - val location: kotlin.String, - // Container for all warnings generated during the transaction. - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - // The startDate of activities in YYY-MM-DD format. - @JsonProperty("StartDate") - val startDate: java.time.LocalDate? = null, - // The endDate of activities in YYY-MM-DD format. - @JsonProperty("EndDate") - val endDate: java.time.LocalDate? = null, - @JsonProperty("ActivityDetails") - @field:Valid - val activityDetails: Activity? = null + /* A unique identifier for this transaction. */ +@JsonProperty("TransactionId") +val transactionId: + kotlin.String +, + + /* The location user searched, translated into the full, unambiguous format. */ +@JsonProperty("Location") +val location: + kotlin.String +, + + /* Container for all warnings generated during the transaction. */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + /* The startDate of activities in YYY-MM-DD format. */ +@JsonProperty("StartDate") +val startDate: java.time.LocalDate? = null, + + /* The endDate of activities in YYY-MM-DD format. */ +@JsonProperty("EndDate") +val endDate: java.time.LocalDate? = null, + + @JsonProperty("ActivityDetails") +val activityDetails: Activity? = null ) { + + + + init { + require(transactionId != null) { "transactionId must not be null" } + + + + + + + + require(location != null) { "location must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var transactionId: kotlin.String? = null, - private var location: kotlin.String? = null, - private var warnings: kotlin.collections.List? = null, - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null, - private var activityDetails: Activity? = null - ) { - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - - fun location(location: kotlin.String) = apply { this.location = location } - - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - - fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } - - fun activityDetails(activityDetails: Activity?) = apply { this.activityDetails = activityDetails } - - fun build(): ActivityDetailsResponse { - val instance = - ActivityDetailsResponse( - transactionId = transactionId!!, - location = location!!, - warnings = warnings, - startDate = startDate, - endDate = endDate, - activityDetails = activityDetails - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivityDetailsResponse) { - 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}" } - ) - } - } + class Builder( + private var transactionId: kotlin.String? = null, + private var location: kotlin.String? = null, + private var warnings: kotlin.collections.List? = null, + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null, + private var activityDetails: Activity? = null + ) { + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + fun location(location: kotlin.String) = apply { this.location = location } + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } + fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } + fun activityDetails(activityDetails: Activity?) = apply { this.activityDetails = activityDetails } + + fun build(): ActivityDetailsResponse { + val instance = ActivityDetailsResponse( + transactionId = transactionId!!, + location = location!!, + warnings = warnings, + startDate = startDate, + endDate = endDate, + activityDetails = activityDetails + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( transactionId = transactionId!!, location = location!!, warnings = warnings, startDate = startDate, endDate = endDate, activityDetails = activityDetails - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt index e59306900..f71a09898 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt @@ -15,130 +15,169 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesWarning import com.expediagroup.sdk.xap.models.Activity import com.expediagroup.sdk.xap.models.CategoryGroup + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* - * @param transactionId A unique identifier for this transaction. - * @param count The number of activities returned in the response. - * @param location The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. - * @param warnings Container for all warnings generated during the transaction. - * @param startDate The startDate of the returned group of activities in YYYY-MM-DD format. - * @param endDate The endDate of returned group of activities in YYYY-MM-DD format. - * @param activities List of activities matching the search criteria. - * @param categories Container for a breakdown of how many of each type of Activity have been returned in the API response. +* + * @param transactionId A unique identifier for this transaction. + * @param count The number of activities returned in the response. + * @param location The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. + * @param warnings Container for all warnings generated during the transaction. + * @param startDate The startDate of the returned group of activities in YYYY-MM-DD format. + * @param endDate The endDate of returned group of activities in YYYY-MM-DD format. + * @param activities List of activities matching the search criteria. + * @param categories Container for a breakdown of how many of each type of Activity have been returned in the API response. */ data class ActivityListingsResponse( - // A unique identifier for this transaction. - @JsonProperty("TransactionId") - @field:NotNull - @field:Valid - val transactionId: kotlin.String, - // The number of activities returned in the response. - @JsonProperty("Count") - val count: kotlin.Long, - // The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. - @JsonProperty("Location") - @field:NotNull - @field:Valid - val location: kotlin.String, - // Container for all warnings generated during the transaction. - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - // The startDate of the returned group of activities in YYYY-MM-DD format. - @JsonProperty("StartDate") - val startDate: java.time.LocalDate? = null, - // The endDate of returned group of activities in YYYY-MM-DD format. - @JsonProperty("EndDate") - val endDate: java.time.LocalDate? = null, - // List of activities matching the search criteria. - @JsonProperty("Activities") - @field:Valid - val activities: kotlin.collections.List? = null, - // Container for a breakdown of how many of each type of Activity have been returned in the API response. - @JsonProperty("Categories") - @field:Valid - val categories: kotlin.collections.List? = null + /* A unique identifier for this transaction. */ +@JsonProperty("TransactionId") +val transactionId: + kotlin.String +, + + /* The number of activities returned in the response. */ +@JsonProperty("Count") +val count: + kotlin.Long +, + + /* The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. */ +@JsonProperty("Location") +val location: + kotlin.String +, + + /* Container for all warnings generated during the transaction. */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + /* The startDate of the returned group of activities in YYYY-MM-DD format. */ +@JsonProperty("StartDate") +val startDate: java.time.LocalDate? = null, + + /* The endDate of returned group of activities in YYYY-MM-DD format. */ +@JsonProperty("EndDate") +val endDate: java.time.LocalDate? = null, + + /* List of activities matching the search criteria. */ +@JsonProperty("Activities") +val activities: kotlin.collections.List? = null, + + /* Container for a breakdown of how many of each type of Activity have been returned in the API response. */ +@JsonProperty("Categories") +val categories: kotlin.collections.List? = null ) { + + + + init { + require(transactionId != null) { "transactionId must not be null" } + + + + + + + + require(count != null) { "count must not be null" } + + + + + + + + require(location != null) { "location must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var transactionId: kotlin.String? = null, - private var count: kotlin.Long? = null, - private var location: kotlin.String? = null, - private var warnings: kotlin.collections.List? = null, - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null, - private var activities: kotlin.collections.List? = null, - private var categories: kotlin.collections.List? = null - ) { - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - - fun count(count: kotlin.Long) = apply { this.count = count } - - fun location(location: kotlin.String) = apply { this.location = location } - - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - - fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } - - fun activities(activities: kotlin.collections.List?) = apply { this.activities = activities } - - fun categories(categories: kotlin.collections.List?) = apply { this.categories = categories } - - fun build(): ActivityListingsResponse { - val instance = - ActivityListingsResponse( - transactionId = transactionId!!, - count = count!!, - location = location!!, - warnings = warnings, - startDate = startDate, - endDate = endDate, - activities = activities, - categories = categories - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ActivityListingsResponse) { - 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}" } - ) - } - } + class Builder( + private var transactionId: kotlin.String? = null, + private var count: kotlin.Long? = null, + private var location: kotlin.String? = null, + private var warnings: kotlin.collections.List? = null, + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null, + private var activities: kotlin.collections.List? = null, + private var categories: kotlin.collections.List? = null + ) { + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + fun count(count: kotlin.Long) = apply { this.count = count } + fun location(location: kotlin.String) = apply { this.location = location } + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } + fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } + fun activities(activities: kotlin.collections.List?) = apply { this.activities = activities } + fun categories(categories: kotlin.collections.List?) = apply { this.categories = categories } + + fun build(): ActivityListingsResponse { + val instance = ActivityListingsResponse( + transactionId = transactionId!!, + count = count!!, + location = location!!, + warnings = warnings, + startDate = startDate, + endDate = endDate, + activities = activities, + categories = categories + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( transactionId = transactionId!!, count = count!!, location = location!!, @@ -147,5 +186,5 @@ data class ActivityListingsResponse( endDate = endDate, activities = activities, categories = categories - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt index 6d8f05d8e..7c3aff8fc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt @@ -15,119 +15,144 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney import com.expediagroup.sdk.xap.models.Deductible + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - * @param isRequired Indicates whether this additional fee is mandatory. - * @param financeCategory Category of the fee / Coverages - * @param financeSubCategory Sub category of the fee / Coverages . - * @param amount - * @param description Description of the fee. - * @param deductible + * @param isRequired Indicates whether this additional fee is mandatory. + * @param financeCategory Category of the fee / Coverages + * @param financeSubCategory Sub category of the fee / Coverages . + * @param amount + * @param description Description of the fee. + * @param deductible */ data class AdditionalFee( - // Indicates whether this additional fee is mandatory. - @JsonProperty("IsRequired") - @field:NotNull - @field:Valid - val isRequired: kotlin.Boolean, - // Category of the fee / Coverages - @JsonProperty("FinanceCategory") - @field:NotNull - @field:Valid - val financeCategory: kotlin.String, - // Sub category of the fee / Coverages . - @JsonProperty("FinanceSubCategory") - @field:NotNull - @field:Valid - val financeSubCategory: kotlin.String, - @JsonProperty("Amount") - @field:NotNull - @field:Valid - val amount: CarsMoney, - // Description of the fee. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null, - @JsonProperty("Deductible") - @field:Valid - val deductible: Deductible? = null + /* Indicates whether this additional fee is mandatory. */ +@JsonProperty("IsRequired") +val isRequired: + kotlin.Boolean +, + + /* Category of the fee / Coverages */ +@JsonProperty("FinanceCategory") +val financeCategory: + kotlin.String +, + + /* Sub category of the fee / Coverages . */ +@JsonProperty("FinanceSubCategory") +val financeSubCategory: + kotlin.String +, + + @JsonProperty("Amount") +val amount: + CarsMoney +, + + /* Description of the fee. */ +@JsonProperty("Description") +val description: kotlin.String? = null, + + @JsonProperty("Deductible") +val deductible: Deductible? = null ) { + + + + init { + require(isRequired != null) { "isRequired must not be null" } + + + + + + + + require(financeCategory != null) { "financeCategory must not be null" } + + + + + + + + require(financeSubCategory != null) { "financeSubCategory must not be null" } + + + + + + + + require(amount != null) { "amount must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var isRequired: kotlin.Boolean? = null, - private var financeCategory: kotlin.String? = null, - private var financeSubCategory: kotlin.String? = null, - private var amount: CarsMoney? = null, - private var description: kotlin.String? = null, - private var deductible: Deductible? = null - ) { - fun isRequired(isRequired: kotlin.Boolean) = apply { this.isRequired = isRequired } - - fun financeCategory(financeCategory: kotlin.String) = apply { this.financeCategory = financeCategory } - - fun financeSubCategory(financeSubCategory: kotlin.String) = apply { this.financeSubCategory = financeSubCategory } - - fun amount(amount: CarsMoney) = apply { this.amount = amount } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun deductible(deductible: Deductible?) = apply { this.deductible = deductible } - - fun build(): AdditionalFee { - val instance = - AdditionalFee( - isRequired = isRequired!!, - financeCategory = financeCategory!!, - financeSubCategory = financeSubCategory!!, - amount = amount!!, - description = description, - deductible = deductible - ) - - validate(instance) - - return instance - } - - private fun validate(instance: AdditionalFee) { - 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}" } - ) - } - } + class Builder( + private var isRequired: kotlin.Boolean? = null, + private var financeCategory: kotlin.String? = null, + private var financeSubCategory: kotlin.String? = null, + private var amount: CarsMoney? = null, + private var description: kotlin.String? = null, + private var deductible: Deductible? = null + ) { + fun isRequired(isRequired: kotlin.Boolean) = apply { this.isRequired = isRequired } + fun financeCategory(financeCategory: kotlin.String) = apply { this.financeCategory = financeCategory } + fun financeSubCategory(financeSubCategory: kotlin.String) = apply { this.financeSubCategory = financeSubCategory } + fun amount(amount: CarsMoney) = apply { this.amount = amount } + fun description(description: kotlin.String?) = apply { this.description = description } + fun deductible(deductible: Deductible?) = apply { this.deductible = deductible } + + fun build(): AdditionalFee { + val instance = AdditionalFee( + isRequired = isRequired!!, + financeCategory = financeCategory!!, + financeSubCategory = financeSubCategory!!, + amount = amount!!, + description = description, + deductible = deductible + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( isRequired = isRequired!!, financeCategory = financeCategory!!, financeSubCategory = financeSubCategory!!, amount = amount!!, description = description, deductible = deductible - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt index 9f2f1a70c..bb76b3a58 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt @@ -15,114 +15,132 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * The address information of the location. - * @param address1 Street Number, Street Name, or PO Box - * @param address2 Apartment, Floor, Suite, Bldg or more specific information about Address1. - * @param city The city - * @param province The state or province - * @param country 3-letter code for the country - * @param postalCode Zip/postal code + * @param address1 Street Number, Street Name, or PO Box + * @param address2 Apartment, Floor, Suite, Bldg or more specific information about Address1. + * @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 Address( - // Street Number, Street Name, or PO Box - @JsonProperty("Address1") - @field:Valid - val address1: kotlin.String? = null, - // Apartment, Floor, Suite, Bldg or more specific information about Address1. - @JsonProperty("Address2") - @field:Valid - val address2: 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 + /* Street Number, Street Name, or PO Box */ +@JsonProperty("Address1") +val address1: kotlin.String? = null, + + /* Apartment, Floor, Suite, Bldg or more specific information about Address1. */ +@JsonProperty("Address2") +val address2: kotlin.String? = null, + + /* The city */ +@JsonProperty("City") +val city: kotlin.String? = null, + + /* The state or province */ +@JsonProperty("Province") +val province: kotlin.String? = null, + + /* 3-letter code for the country */ +@JsonProperty("Country") +val country: kotlin.String? = null, + + /* Zip/postal code */ +@JsonProperty("PostalCode") +val postalCode: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var address1: kotlin.String? = null, - private var address2: 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 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(): Address { - val instance = - Address( - address1 = address1, - address2 = address2, - city = city, - province = province, - country = country, - postalCode = postalCode - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Address) { - 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}" } - ) - } - } + class Builder( + private var address1: kotlin.String? = null, + private var address2: 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 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(): Address { + val instance = Address( + address1 = address1, + address2 = address2, + city = city, + province = province, + country = country, + postalCode = postalCode + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( address1 = address1, address2 = address2, city = city, province = province, country = country, postalCode = postalCode - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt index 6f370129f..66cea9d59 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt @@ -15,113 +15,124 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** * Container for room occupancy rules based on the age of the guests. - * @param ageClass Categories for hotel guests, based on age. - * @param ageMinimum The minimum age defined in a particular `AgeClass`. - * @param ageMaximum The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. - * @param maxGuestCount The max guest count allowed in a particular `AgeClass`. + * @param ageClass Categories for hotel guests, based on age. + * @param ageMinimum The minimum age defined in a particular `AgeClass`. + * @param ageMaximum The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. + * @param maxGuestCount The max guest count allowed in a particular `AgeClass`. */ data class AgeClassRestriction( - // Categories for hotel guests, based on age. - @JsonProperty("AgeClass") - val ageClass: AgeClassRestriction.AgeClass? = null, - // The minimum age defined in a particular `AgeClass`. - @JsonProperty("AgeMinimum") - val ageMinimum: kotlin.Int? = null, - // The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. - @JsonProperty("AgeMaximum") - val ageMaximum: kotlin.Int? = null, - // The max guest count allowed in a particular `AgeClass`. - @JsonProperty("MaxGuestCount") - val maxGuestCount: kotlin.Int? = null + /* Categories for hotel guests, based on age. */ +@JsonProperty("AgeClass") +val ageClass: AgeClassRestriction.AgeClass? = null, + + /* The minimum age defined in a particular `AgeClass`. */ +@JsonProperty("AgeMinimum") +val ageMinimum: kotlin.Int? = null, + + /* The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. */ +@JsonProperty("AgeMaximum") +val ageMaximum: kotlin.Int? = null, + + /* The max guest count allowed in a particular `AgeClass`. */ +@JsonProperty("MaxGuestCount") +val maxGuestCount: kotlin.Int? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } - class Builder( - private var ageClass: AgeClassRestriction.AgeClass? = null, - private var ageMinimum: kotlin.Int? = null, - private var ageMaximum: kotlin.Int? = null, - private var maxGuestCount: kotlin.Int? = null - ) { - fun ageClass(ageClass: AgeClassRestriction.AgeClass?) = apply { this.ageClass = ageClass } - - fun ageMinimum(ageMinimum: kotlin.Int?) = apply { this.ageMinimum = ageMinimum } - - fun ageMaximum(ageMaximum: kotlin.Int?) = apply { this.ageMaximum = ageMaximum } - - fun maxGuestCount(maxGuestCount: kotlin.Int?) = apply { this.maxGuestCount = maxGuestCount } - - fun build(): AgeClassRestriction { - val instance = - AgeClassRestriction( - ageClass = ageClass, - ageMinimum = ageMinimum, - ageMaximum = ageMaximum, - maxGuestCount = maxGuestCount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: AgeClassRestriction) { - 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}" } - ) - } - } + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var ageClass: AgeClassRestriction.AgeClass? = null, + private var ageMinimum: kotlin.Int? = null, + private var ageMaximum: kotlin.Int? = null, + private var maxGuestCount: kotlin.Int? = null + ) { + fun ageClass(ageClass: AgeClassRestriction.AgeClass?) = apply { this.ageClass = ageClass } + fun ageMinimum(ageMinimum: kotlin.Int?) = apply { this.ageMinimum = ageMinimum } + fun ageMaximum(ageMaximum: kotlin.Int?) = apply { this.ageMaximum = ageMaximum } + fun maxGuestCount(maxGuestCount: kotlin.Int?) = apply { this.maxGuestCount = maxGuestCount } + + fun build(): AgeClassRestriction { + val instance = AgeClassRestriction( ageClass = ageClass, ageMinimum = ageMinimum, ageMaximum = ageMaximum, maxGuestCount = maxGuestCount - ) + ) - /** - * Categories for hotel guests, based on age. - * Values: ALL_AGES,SENIOR,ADULT,CHILD,INFANT,OTHER - */ - enum class AgeClass(val value: kotlin.String) { - @JsonProperty("All Ages") - ALL_AGES("All Ages"), - - @JsonProperty("Senior") - SENIOR("Senior"), - - @JsonProperty("Adult") - ADULT("Adult"), - - @JsonProperty("Child") - CHILD("Child"), - - @JsonProperty("Infant") - INFANT("Infant"), - - @JsonProperty("Other") - OTHER("Other") + return instance + } } + + fun toBuilder() = Builder( + ageClass = ageClass, + ageMinimum = ageMinimum, + ageMaximum = ageMaximum, + maxGuestCount = maxGuestCount + ) + + /** + * Categories for hotel guests, based on age. + * Values: ALL_AGES,SENIOR,ADULT,CHILD,INFANT,OTHER + */ + enum class AgeClass(val value: kotlin.String) { + @JsonProperty("All Ages") + ALL_AGES("All Ages"), + + @JsonProperty("Senior") + SENIOR("Senior"), + + @JsonProperty("Adult") + ADULT("Adult"), + + @JsonProperty("Child") + CHILD("Child"), + + @JsonProperty("Infant") + INFANT("Infant"), + + @JsonProperty("Other") + OTHER("Other"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt index 1731a8114..391ccea75 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt @@ -15,118 +15,142 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.DateRange + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param propertyId The unique property identifier that designates a single property. - * @param dateRange - * @param availability A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* - * @param changeOver A string of codes that shows changeover action, one for every day in the specified date range. Valid values include - X (no action possible) - C (check-in, checkout) - O (checkout only) - I (check-in only) ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. All actions are possible if not returned.* - * @param minPriorNotify A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* - * @param minStay A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* - * @param maxStay A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. +* + * @param propertyId The unique property identifier that designates a single property. + * @param dateRange + * @param availability A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* + * @param changeOver A string of codes that shows changeover action, one for every day in the specified date range. Valid values include - X (no action possible) - C (check-in, checkout) - O (checkout only) - I (check-in only) ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. All actions are possible if not returned.* + * @param minPriorNotify A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* + * @param minStay A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* + * @param maxStay A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. */ data class AvailabilityCalendar( - // The unique property identifier that designates a single property. - @JsonProperty("PropertyId") - @field:Valid - val propertyId: kotlin.String? = null, - @JsonProperty("DateRange") - @field:Valid - val dateRange: DateRange? = null, - // A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* - @JsonProperty("Availability") - @field:Valid - val availability: kotlin.String? = null, - // A string of codes that shows changeover action, one for every day in the specified date range. Valid values include - X (no action possible) - C (check-in, checkout) - O (checkout only) - I (check-in only) ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. All actions are possible if not returned.* - @JsonProperty("ChangeOver") - @field:Valid - val changeOver: kotlin.String? = null, - // A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* - @JsonProperty("MinPriorNotify") - @field:Valid - val minPriorNotify: kotlin.String? = null, - // A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* - @JsonProperty("MinStay") - @field:Valid - val minStay: kotlin.String? = null, - // A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. - @JsonProperty("MaxStay") - @field:Valid - val maxStay: kotlin.String? = null + /* The unique property identifier that designates a single property. */ +@JsonProperty("PropertyId") +val propertyId: kotlin.String? = null, + + @JsonProperty("DateRange") +val dateRange: DateRange? = null, + + /* A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* */ +@JsonProperty("Availability") +val availability: kotlin.String? = null, + + /* A string of codes that shows changeover action, one for every day in the specified date range. Valid values include - X (no action possible) - C (check-in, checkout) - O (checkout only) - I (check-in only) ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. All actions are possible if not returned.* */ +@JsonProperty("ChangeOver") +val changeOver: kotlin.String? = null, + + /* A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* */ +@JsonProperty("MinPriorNotify") +val minPriorNotify: kotlin.String? = null, + + /* A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* */ +@JsonProperty("MinStay") +val minStay: kotlin.String? = null, + + /* A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. */ +@JsonProperty("MaxStay") +val maxStay: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var propertyId: kotlin.String? = null, - private var dateRange: DateRange? = null, - private var availability: kotlin.String? = null, - private var changeOver: kotlin.String? = null, - private var minPriorNotify: kotlin.String? = null, - private var minStay: kotlin.String? = null, - private var maxStay: kotlin.String? = null - ) { - fun propertyId(propertyId: kotlin.String?) = apply { this.propertyId = propertyId } - - fun dateRange(dateRange: DateRange?) = apply { this.dateRange = dateRange } - - fun availability(availability: kotlin.String?) = apply { this.availability = availability } - - fun changeOver(changeOver: kotlin.String?) = apply { this.changeOver = changeOver } - - fun minPriorNotify(minPriorNotify: kotlin.String?) = apply { this.minPriorNotify = minPriorNotify } - - fun minStay(minStay: kotlin.String?) = apply { this.minStay = minStay } - - fun maxStay(maxStay: kotlin.String?) = apply { this.maxStay = maxStay } - - fun build(): AvailabilityCalendar { - val instance = - AvailabilityCalendar( - propertyId = propertyId, - dateRange = dateRange, - availability = availability, - changeOver = changeOver, - minPriorNotify = minPriorNotify, - minStay = minStay, - maxStay = maxStay - ) - - validate(instance) - - return instance - } - - private fun validate(instance: AvailabilityCalendar) { - 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}" } - ) - } - } + class Builder( + private var propertyId: kotlin.String? = null, + private var dateRange: DateRange? = null, + private var availability: kotlin.String? = null, + private var changeOver: kotlin.String? = null, + private var minPriorNotify: kotlin.String? = null, + private var minStay: kotlin.String? = null, + private var maxStay: kotlin.String? = null + ) { + fun propertyId(propertyId: kotlin.String?) = apply { this.propertyId = propertyId } + fun dateRange(dateRange: DateRange?) = apply { this.dateRange = dateRange } + fun availability(availability: kotlin.String?) = apply { this.availability = availability } + fun changeOver(changeOver: kotlin.String?) = apply { this.changeOver = changeOver } + fun minPriorNotify(minPriorNotify: kotlin.String?) = apply { this.minPriorNotify = minPriorNotify } + fun minStay(minStay: kotlin.String?) = apply { this.minStay = minStay } + fun maxStay(maxStay: kotlin.String?) = apply { this.maxStay = maxStay } + + fun build(): AvailabilityCalendar { + val instance = AvailabilityCalendar( + propertyId = propertyId, + dateRange = dateRange, + availability = availability, + changeOver = changeOver, + minPriorNotify = minPriorNotify, + minStay = minStay, + maxStay = maxStay + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( propertyId = propertyId, dateRange = dateRange, availability = availability, @@ -134,5 +158,5 @@ data class AvailabilityCalendar( minPriorNotify = minPriorNotify, minStay = minStay, maxStay = maxStay - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt index 29d04fff4..d0b74bcd7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt @@ -15,86 +15,86 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.AvailabilityCalendar import com.expediagroup.sdk.xap.models.LodgingWarning + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param transactionId Unique identifier for the transaction. - * @param availabilityCalendars A list of the calendar entities. +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param transactionId Unique identifier for the transaction. + * @param availabilityCalendars A list of the calendar entities. */ data class AvailabilityCalendarResponse( - // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - // Unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:Valid - val transactionId: kotlin.String? = null, - // A list of the calendar entities. - @JsonProperty("AvailabilityCalendars") - @field:Valid - val availabilityCalendars: kotlin.collections.List? = null + /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + /* Unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: kotlin.String? = null, + + /* A list of the calendar entities. */ +@JsonProperty("AvailabilityCalendars") +val availabilityCalendars: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null, - private var availabilityCalendars: kotlin.collections.List? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - - fun availabilityCalendars(availabilityCalendars: kotlin.collections.List?) = apply { this.availabilityCalendars = availabilityCalendars } - - fun build(): AvailabilityCalendarResponse { - val instance = - AvailabilityCalendarResponse( - warnings = warnings, - transactionId = transactionId, - availabilityCalendars = availabilityCalendars - ) - - validate(instance) - - return instance - } - - private fun validate(instance: AvailabilityCalendarResponse) { - 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}" } - ) - } - } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + private var availabilityCalendars: kotlin.collections.List? = null + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun availabilityCalendars(availabilityCalendars: kotlin.collections.List?) = apply { this.availabilityCalendars = availabilityCalendars } + + fun build(): AvailabilityCalendarResponse { + val instance = AvailabilityCalendarResponse( + warnings = warnings, + transactionId = transactionId, + availabilityCalendars = availabilityCalendars + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( warnings = warnings, transactionId = transactionId, availabilityCalendars = availabilityCalendars - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt index 70954f6f3..b86ef5b40 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt @@ -15,101 +15,118 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesCancellationPolicy import com.expediagroup.sdk.xap.models.Ticket + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The list of available Time Slots for the activity. - * @param dateTime The date and time when the activity happens. - * @param allDayActivity Indicates whether the activity is an all-day activity. - * @param cancellationPolicy - * @param tickets Container for ticket information. + * @param dateTime The date and time when the activity happens. + * @param allDayActivity Indicates whether the activity is an all-day activity. + * @param cancellationPolicy + * @param tickets Container for ticket information. */ data class AvailableTimeSlot( - // The date and time when the activity happens. - @JsonProperty("DateTime") - val dateTime: java.time.LocalDateTime, - // Indicates whether the activity is an all-day activity. - @JsonProperty("AllDayActivity") - @field:NotNull - @field:Valid - val allDayActivity: kotlin.Boolean, - @JsonProperty("CancellationPolicy") - @field:NotNull - @field:Valid - val cancellationPolicy: ActivitiesCancellationPolicy, - // Container for ticket information. - @JsonProperty("Tickets") - @field:NotNull - @field:Valid - val tickets: kotlin.collections - .List< - Ticket - > + /* The date and time when the activity happens. */ +@JsonProperty("DateTime") +val dateTime: + java.time.LocalDateTime +, + + /* Indicates whether the activity is an all-day activity. */ +@JsonProperty("AllDayActivity") +val allDayActivity: + kotlin.Boolean +, + + @JsonProperty("CancellationPolicy") +val cancellationPolicy: + ActivitiesCancellationPolicy +, + + /* Container for ticket information. */ +@JsonProperty("Tickets") +val tickets: + kotlin.collections. + List +< + Ticket +> + + ) { + + + + init { + require(dateTime != null) { "dateTime must not be null" } + + + + + + + + require(allDayActivity != null) { "allDayActivity must not be null" } + + + + + + + + require(cancellationPolicy != null) { "cancellationPolicy must not be null" } + + + + + + + + require(tickets != null) { "tickets must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var dateTime: java.time.LocalDateTime? = null, - private var allDayActivity: kotlin.Boolean? = null, - private var cancellationPolicy: ActivitiesCancellationPolicy? = null, - private var tickets: kotlin.collections.List? = null - ) { - fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } - - fun allDayActivity(allDayActivity: kotlin.Boolean) = apply { this.allDayActivity = allDayActivity } - - fun cancellationPolicy(cancellationPolicy: ActivitiesCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } - - fun tickets(tickets: kotlin.collections.List) = apply { this.tickets = tickets } - - fun build(): AvailableTimeSlot { - val instance = - AvailableTimeSlot( - dateTime = dateTime!!, - allDayActivity = allDayActivity!!, - cancellationPolicy = cancellationPolicy!!, - tickets = tickets!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: AvailableTimeSlot) { - 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}" } - ) - } - } + class Builder( + private var dateTime: java.time.LocalDateTime? = null, + private var allDayActivity: kotlin.Boolean? = null, + private var cancellationPolicy: ActivitiesCancellationPolicy? = null, + private var tickets: kotlin.collections.List? = null + ) { + fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } + fun allDayActivity(allDayActivity: kotlin.Boolean) = apply { this.allDayActivity = allDayActivity } + fun cancellationPolicy(cancellationPolicy: ActivitiesCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } + fun tickets(tickets: kotlin.collections.List) = apply { this.tickets = tickets } + + fun build(): AvailableTimeSlot { + val instance = AvailableTimeSlot( + dateTime = dateTime!!, + allDayActivity = allDayActivity!!, + cancellationPolicy = cancellationPolicy!!, + tickets = tickets!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( dateTime = dateTime!!, allDayActivity = allDayActivity!!, cancellationPolicy = cancellationPolicy!!, tickets = tickets!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt index 1f0cecf95..be9f29768 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - * @param id The bed type ID - * @param description The bed type description. +* Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + * @param id The bed type ID + * @param description The bed type description. */ data class BedType( - // The bed type ID - @JsonProperty("Id") - @field:Valid - val id: kotlin.String? = null, - // The bed type description. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null + /* The bed type ID */ +@JsonProperty("Id") +val id: kotlin.String? = null, + + /* The bed type description. */ +@JsonProperty("Description") +val description: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun build(): BedType { - val instance = - BedType( - id = id, - description = description - ) - - validate(instance) - - return instance - } - - private fun validate(instance: BedType) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.String? = null, + private var description: kotlin.String? = null + ) { + fun id(id: kotlin.String?) = apply { this.id = id } + fun description(description: kotlin.String?) = apply { this.description = description } + + fun build(): BedType { + val instance = BedType( + id = id, + description = description + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id, description = description - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt index 9b80035f7..b0358376d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt @@ -15,101 +15,116 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CancellationPenaltyRulePenaltyPrice + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param penaltyNightCount Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. - * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. - * @param penaltyPrice - * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. +* + * @param penaltyNightCount Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. + * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. + * @param penaltyPrice + * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. + * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. */ data class CancellationPenaltyRule( - // Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. - @JsonProperty("PenaltyNightCount") - val penaltyNightCount: kotlin.Int? = null, - // Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. - @JsonProperty("PenaltyPercentOfStay") - @field:Valid - val penaltyPercentOfStay: kotlin.String? = null, - @JsonProperty("PenaltyPrice") - @field:Valid - val penaltyPrice: CancellationPenaltyRulePenaltyPrice? = null, - // The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - @JsonProperty("PenaltyStartDateTime") - val penaltyStartDateTime: java.time.OffsetDateTime? = null, - // The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - @JsonProperty("PenaltyEndDateTime") - val penaltyEndDateTime: java.time.OffsetDateTime? = null + /* Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. */ +@JsonProperty("PenaltyNightCount") +val penaltyNightCount: kotlin.Int? = null, + + /* Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. */ +@JsonProperty("PenaltyPercentOfStay") +val penaltyPercentOfStay: kotlin.String? = null, + + @JsonProperty("PenaltyPrice") +val penaltyPrice: CancellationPenaltyRulePenaltyPrice? = null, + + /* The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. */ +@JsonProperty("PenaltyStartDateTime") +val penaltyStartDateTime: java.time.OffsetDateTime? = null, + + /* The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. */ +@JsonProperty("PenaltyEndDateTime") +val penaltyEndDateTime: java.time.OffsetDateTime? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var penaltyNightCount: kotlin.Int? = null, - private var penaltyPercentOfStay: kotlin.String? = null, - private var penaltyPrice: CancellationPenaltyRulePenaltyPrice? = null, - private var penaltyStartDateTime: java.time.OffsetDateTime? = null, - private var penaltyEndDateTime: java.time.OffsetDateTime? = null - ) { - fun penaltyNightCount(penaltyNightCount: kotlin.Int?) = apply { this.penaltyNightCount = penaltyNightCount } - - fun penaltyPercentOfStay(penaltyPercentOfStay: kotlin.String?) = apply { this.penaltyPercentOfStay = penaltyPercentOfStay } - - fun penaltyPrice(penaltyPrice: CancellationPenaltyRulePenaltyPrice?) = apply { this.penaltyPrice = penaltyPrice } - - fun penaltyStartDateTime(penaltyStartDateTime: java.time.OffsetDateTime?) = apply { this.penaltyStartDateTime = penaltyStartDateTime } - - fun penaltyEndDateTime(penaltyEndDateTime: java.time.OffsetDateTime?) = apply { this.penaltyEndDateTime = penaltyEndDateTime } - - fun build(): CancellationPenaltyRule { - val instance = - CancellationPenaltyRule( - penaltyNightCount = penaltyNightCount, - penaltyPercentOfStay = penaltyPercentOfStay, - penaltyPrice = penaltyPrice, - penaltyStartDateTime = penaltyStartDateTime, - penaltyEndDateTime = penaltyEndDateTime - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CancellationPenaltyRule) { - 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}" } - ) - } - } + class Builder( + private var penaltyNightCount: kotlin.Int? = null, + private var penaltyPercentOfStay: kotlin.String? = null, + private var penaltyPrice: CancellationPenaltyRulePenaltyPrice? = null, + private var penaltyStartDateTime: java.time.OffsetDateTime? = null, + private var penaltyEndDateTime: java.time.OffsetDateTime? = null + ) { + fun penaltyNightCount(penaltyNightCount: kotlin.Int?) = apply { this.penaltyNightCount = penaltyNightCount } + fun penaltyPercentOfStay(penaltyPercentOfStay: kotlin.String?) = apply { this.penaltyPercentOfStay = penaltyPercentOfStay } + fun penaltyPrice(penaltyPrice: CancellationPenaltyRulePenaltyPrice?) = apply { this.penaltyPrice = penaltyPrice } + fun penaltyStartDateTime(penaltyStartDateTime: java.time.OffsetDateTime?) = apply { this.penaltyStartDateTime = penaltyStartDateTime } + fun penaltyEndDateTime(penaltyEndDateTime: java.time.OffsetDateTime?) = apply { this.penaltyEndDateTime = penaltyEndDateTime } + + fun build(): CancellationPenaltyRule { + val instance = CancellationPenaltyRule( + penaltyNightCount = penaltyNightCount, + penaltyPercentOfStay = penaltyPercentOfStay, + penaltyPrice = penaltyPrice, + penaltyStartDateTime = penaltyStartDateTime, + penaltyEndDateTime = penaltyEndDateTime + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( penaltyNightCount = penaltyNightCount, penaltyPercentOfStay = penaltyPercentOfStay, penaltyPrice = penaltyPrice, penaltyStartDateTime = penaltyStartDateTime, penaltyEndDateTime = penaltyEndDateTime - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt index 83ceea1fe..b496986ac 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class CancellationPenaltyRulePenaltyPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): CancellationPenaltyRulePenaltyPrice { - val instance = - CancellationPenaltyRulePenaltyPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CancellationPenaltyRulePenaltyPrice) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): CancellationPenaltyRulePenaltyPrice { + val instance = CancellationPenaltyRulePenaltyPrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt index 6d8adc44a..c07f39e5e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt @@ -15,128 +15,159 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CancellationPenaltyRule import com.expediagroup.sdk.xap.models.NonRefundableDateRange import com.expediagroup.sdk.xap.models.WaiverPolicy + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for room cancellation policy. - * @param waiverPolicy - * @param cancellableOnline Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. - * @param refundable Indicate whether the rate is refundable or not. - * @param freeCancellation Indicate whether the room can be cancelled free of charge. - * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. This is expressed in the local time of the Hotel. - * @param cancellationPenaltyRules Container for cancellation penalty details. - * @param cancelPolicyDescription Additional cancellation policy information available as static text. - * @param nonRefundableDateRanges A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. + * @param waiverPolicy + * @param cancellableOnline Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. + * @param refundable Indicate whether the rate is refundable or not. + * @param freeCancellation Indicate whether the room can be cancelled free of charge. + * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. This is expressed in the local time of the Hotel. + * @param cancellationPenaltyRules Container for cancellation penalty details. + * @param cancelPolicyDescription Additional cancellation policy information available as static text. + * @param nonRefundableDateRanges A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. */ data class CancellationPolicy( - @JsonProperty("WaiverPolicy") - @field:Valid - val waiverPolicy: WaiverPolicy? = null, - // Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. - @JsonProperty("CancellableOnline") - @field:Valid - val cancellableOnline: kotlin.Boolean? = null, - // Indicate whether the rate is refundable or not. - @JsonProperty("Refundable") - @field:Valid - val refundable: kotlin.Boolean? = null, - // Indicate whether the room can be cancelled free of charge. - @JsonProperty("FreeCancellation") - @field:Valid - val freeCancellation: kotlin.Boolean? = null, - // The date and time until which the room can be cancelled free of charge. This is expressed in the local time of the Hotel. - @JsonProperty("FreeCancellationEndDateTime") - val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, - // Container for cancellation penalty details. - @JsonProperty("CancellationPenaltyRules") - @field:Valid - val cancellationPenaltyRules: kotlin.collections.List? = null, - // Additional cancellation policy information available as static text. - @JsonProperty("CancelPolicyDescription") - @field:Valid - val cancelPolicyDescription: kotlin.String? = null, - // A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. - @JsonProperty("NonRefundableDateRanges") - @field:Valid - val nonRefundableDateRanges: kotlin.collections.List? = null + @JsonProperty("WaiverPolicy") +val waiverPolicy: WaiverPolicy? = null, + + /* Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. */ +@JsonProperty("CancellableOnline") +val cancellableOnline: kotlin.Boolean? = null, + + /* Indicate whether the rate is refundable or not. */ +@JsonProperty("Refundable") +val refundable: kotlin.Boolean? = null, + + /* Indicate whether the room can be cancelled free of charge. */ +@JsonProperty("FreeCancellation") +val freeCancellation: kotlin.Boolean? = null, + + /* The date and time until which the room can be cancelled free of charge. This is expressed in the local time of the Hotel. */ +@JsonProperty("FreeCancellationEndDateTime") +val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + + /* Container for cancellation penalty details. */ +@JsonProperty("CancellationPenaltyRules") +val cancellationPenaltyRules: kotlin.collections.List? = null, + + /* Additional cancellation policy information available as static text. */ +@JsonProperty("CancelPolicyDescription") +val cancelPolicyDescription: kotlin.String? = null, + + /* A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. */ +@JsonProperty("NonRefundableDateRanges") +val nonRefundableDateRanges: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var waiverPolicy: WaiverPolicy? = null, - private var cancellableOnline: kotlin.Boolean? = null, - private var refundable: kotlin.Boolean? = null, - private var freeCancellation: kotlin.Boolean? = null, - private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, - private var cancellationPenaltyRules: kotlin.collections.List? = null, - private var cancelPolicyDescription: kotlin.String? = null, - private var nonRefundableDateRanges: kotlin.collections.List? = null - ) { - fun waiverPolicy(waiverPolicy: WaiverPolicy?) = apply { this.waiverPolicy = waiverPolicy } - - fun cancellableOnline(cancellableOnline: kotlin.Boolean?) = apply { this.cancellableOnline = cancellableOnline } - - fun refundable(refundable: kotlin.Boolean?) = apply { this.refundable = refundable } - - fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - - fun cancellationPenaltyRules(cancellationPenaltyRules: kotlin.collections.List?) = apply { this.cancellationPenaltyRules = cancellationPenaltyRules } - - fun cancelPolicyDescription(cancelPolicyDescription: kotlin.String?) = apply { this.cancelPolicyDescription = cancelPolicyDescription } - - fun nonRefundableDateRanges(nonRefundableDateRanges: kotlin.collections.List?) = apply { this.nonRefundableDateRanges = nonRefundableDateRanges } - - fun build(): CancellationPolicy { - val instance = - CancellationPolicy( - waiverPolicy = waiverPolicy, - cancellableOnline = cancellableOnline, - refundable = refundable, - freeCancellation = freeCancellation, - freeCancellationEndDateTime = freeCancellationEndDateTime, - cancellationPenaltyRules = cancellationPenaltyRules, - cancelPolicyDescription = cancelPolicyDescription, - nonRefundableDateRanges = nonRefundableDateRanges - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CancellationPolicy) { - 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}" } - ) - } - } + class Builder( + private var waiverPolicy: WaiverPolicy? = null, + private var cancellableOnline: kotlin.Boolean? = null, + private var refundable: kotlin.Boolean? = null, + private var freeCancellation: kotlin.Boolean? = null, + private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + private var cancellationPenaltyRules: kotlin.collections.List? = null, + private var cancelPolicyDescription: kotlin.String? = null, + private var nonRefundableDateRanges: kotlin.collections.List? = null + ) { + fun waiverPolicy(waiverPolicy: WaiverPolicy?) = apply { this.waiverPolicy = waiverPolicy } + fun cancellableOnline(cancellableOnline: kotlin.Boolean?) = apply { this.cancellableOnline = cancellableOnline } + fun refundable(refundable: kotlin.Boolean?) = apply { this.refundable = refundable } + fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + fun cancellationPenaltyRules(cancellationPenaltyRules: kotlin.collections.List?) = apply { this.cancellationPenaltyRules = cancellationPenaltyRules } + fun cancelPolicyDescription(cancelPolicyDescription: kotlin.String?) = apply { this.cancelPolicyDescription = cancelPolicyDescription } + fun nonRefundableDateRanges(nonRefundableDateRanges: kotlin.collections.List?) = apply { this.nonRefundableDateRanges = nonRefundableDateRanges } + + fun build(): CancellationPolicy { + val instance = CancellationPolicy( + waiverPolicy = waiverPolicy, + cancellableOnline = cancellableOnline, + refundable = refundable, + freeCancellation = freeCancellation, + freeCancellationEndDateTime = freeCancellationEndDateTime, + cancellationPenaltyRules = cancellationPenaltyRules, + cancelPolicyDescription = cancelPolicyDescription, + nonRefundableDateRanges = nonRefundableDateRanges + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( waiverPolicy = waiverPolicy, cancellableOnline = cancellableOnline, refundable = refundable, @@ -145,5 +176,5 @@ data class CancellationPolicy( cancellationPenaltyRules = cancellationPenaltyRules, cancelPolicyDescription = cancelPolicyDescription, nonRefundableDateRanges = nonRefundableDateRanges - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt index 6da09a7fc..3f99f467d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt @@ -15,89 +15,103 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** * Capacity for car's properties. - * @param adultCount The typical number of adults that can fit comfortably in the car. - * @param childCount The typical number of children that can fit comfortably in the car. - * @param smallLuggageCount The typical number of small pieces of luggage that fit in the cargo space. - * @param largeLuggageCount The typical number of large pieces of luggage that fit in the cargo space. + * @param adultCount The typical number of adults that can fit comfortably in the car. + * @param childCount The typical number of children that can fit comfortably in the car. + * @param smallLuggageCount The typical number of small pieces of luggage that fit in the cargo space. + * @param largeLuggageCount The typical number of large pieces of luggage that fit in the cargo space. */ data class Capacity( - // The typical number of adults that can fit comfortably in the car. - @JsonProperty("AdultCount") - val adultCount: kotlin.Long, - // The typical number of children that can fit comfortably in the car. - @JsonProperty("ChildCount") - val childCount: kotlin.Long? = null, - // The typical number of small pieces of luggage that fit in the cargo space. - @JsonProperty("SmallLuggageCount") - val smallLuggageCount: kotlin.Long? = null, - // The typical number of large pieces of luggage that fit in the cargo space. - @JsonProperty("LargeLuggageCount") - val largeLuggageCount: kotlin.Long? = null + /* The typical number of adults that can fit comfortably in the car. */ +@JsonProperty("AdultCount") +val adultCount: + kotlin.Long +, + + /* The typical number of children that can fit comfortably in the car. */ +@JsonProperty("ChildCount") +val childCount: kotlin.Long? = null, + + /* The typical number of small pieces of luggage that fit in the cargo space. */ +@JsonProperty("SmallLuggageCount") +val smallLuggageCount: kotlin.Long? = null, + + /* The typical number of large pieces of luggage that fit in the cargo space. */ +@JsonProperty("LargeLuggageCount") +val largeLuggageCount: kotlin.Long? = null ) { + + + + init { + require(adultCount != null) { "adultCount must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var adultCount: kotlin.Long? = null, - private var childCount: kotlin.Long? = null, - private var smallLuggageCount: kotlin.Long? = null, - private var largeLuggageCount: kotlin.Long? = null - ) { - fun adultCount(adultCount: kotlin.Long) = apply { this.adultCount = adultCount } - - fun childCount(childCount: kotlin.Long?) = apply { this.childCount = childCount } - - fun smallLuggageCount(smallLuggageCount: kotlin.Long?) = apply { this.smallLuggageCount = smallLuggageCount } - - fun largeLuggageCount(largeLuggageCount: kotlin.Long?) = apply { this.largeLuggageCount = largeLuggageCount } - - fun build(): Capacity { - val instance = - Capacity( - adultCount = adultCount!!, - childCount = childCount, - smallLuggageCount = smallLuggageCount, - largeLuggageCount = largeLuggageCount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Capacity) { - 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}" } - ) - } - } + class Builder( + private var adultCount: kotlin.Long? = null, + private var childCount: kotlin.Long? = null, + private var smallLuggageCount: kotlin.Long? = null, + private var largeLuggageCount: kotlin.Long? = null + ) { + fun adultCount(adultCount: kotlin.Long) = apply { this.adultCount = adultCount } + fun childCount(childCount: kotlin.Long?) = apply { this.childCount = childCount } + fun smallLuggageCount(smallLuggageCount: kotlin.Long?) = apply { this.smallLuggageCount = smallLuggageCount } + fun largeLuggageCount(largeLuggageCount: kotlin.Long?) = apply { this.largeLuggageCount = largeLuggageCount } + + fun build(): Capacity { + val instance = Capacity( + adultCount = adultCount!!, + childCount = childCount, + smallLuggageCount = smallLuggageCount, + largeLuggageCount = largeLuggageCount + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( adultCount = adultCount!!, childCount = childCount, smallLuggageCount = smallLuggageCount, largeLuggageCount = largeLuggageCount - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt index c067fd063..04fb1e557 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt @@ -15,7 +15,6 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.AdditionalFee import com.expediagroup.sdk.xap.models.CarsCancellationPolicy import com.expediagroup.sdk.xap.models.CarsLink @@ -28,204 +27,303 @@ import com.expediagroup.sdk.xap.models.RatingWithoutDetails import com.expediagroup.sdk.xap.models.Supplier import com.expediagroup.sdk.xap.models.VehicleDetails import com.expediagroup.sdk.xap.models.VendorLocationDetails + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of cars matching the search criteria. - * @param id Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. - * @param vehicleDetails - * @param supplier - * @param pickupDetails - * @param dropOffDetails - * @param price - * @param cancellationPolicy - * @param dataTimeStamp DataTimeStamp - * @param onlineCheckIn Indicate whether the supplier supports online checkin - * @param skipTheCounter Indicate whether the supplier supports skip the counter - * @param links A map of links to other Car APIs or Expedia websites. - * @param rateDetails - * @param referencePrice - * @param additionalFees List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - * @param noShowPenalty - * @param images List of image resources of the car product. - * @param rating + * @param id Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. + * @param vehicleDetails + * @param supplier + * @param pickupDetails + * @param dropOffDetails + * @param price + * @param cancellationPolicy + * @param dataTimeStamp DataTimeStamp + * @param onlineCheckIn Indicate whether the supplier supports online checkin + * @param skipTheCounter Indicate whether the supplier supports skip the counter + * @param links A map of links to other Car APIs or Expedia websites. + * @param rateDetails + * @param referencePrice + * @param additionalFees List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + * @param noShowPenalty + * @param images List of image resources of the car product. + * @param rating */ data class Car( - // Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. - @JsonProperty("Id") - @field:NotNull - @field:Valid - val id: kotlin.String, - @JsonProperty("VehicleDetails") - @field:NotNull - @field:Valid - val vehicleDetails: VehicleDetails, - @JsonProperty("Supplier") - @field:NotNull - @field:Valid - val supplier: Supplier, - @JsonProperty("PickupDetails") - @field:NotNull - @field:Valid - val pickupDetails: VendorLocationDetails, - @JsonProperty("DropOffDetails") - @field:NotNull - @field:Valid - val dropOffDetails: VendorLocationDetails, - @JsonProperty("Price") - @field:NotNull - @field:Valid - val price: Price, - @JsonProperty("CancellationPolicy") - @field:NotNull - @field:Valid - val cancellationPolicy: CarsCancellationPolicy, - // DataTimeStamp - @JsonProperty("DataTimeStamp") - val dataTimeStamp: java.time.OffsetDateTime? = null, - // Indicate whether the supplier supports online checkin - @JsonProperty("OnlineCheckIn") - @field:Valid - val onlineCheckIn: kotlin.Boolean? = null, - // Indicate whether the supplier supports skip the counter - @JsonProperty("SkipTheCounter") - @field:Valid - val skipTheCounter: kotlin.Boolean? = null, - // A map of links to other Car APIs or Expedia websites. - @JsonProperty("Links") - @field:Valid - val links: kotlin.collections.Map? = null, - @JsonProperty("RateDetails") - @field:Valid - val rateDetails: RateDetails? = null, - @JsonProperty("ReferencePrice") - @field:Valid - val referencePrice: CarsMoney? = null, - // List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - @JsonProperty("AdditionalFees") - @field:Valid - val additionalFees: kotlin.collections.List? = null, - @JsonProperty("NoShowPenalty") - @field:Valid - val noShowPenalty: PenaltyType? = null, - // List of image resources of the car product. - @JsonProperty("Images") - @field:Valid - val images: kotlin.collections.List? = null, - @JsonProperty("Rating") - @field:Valid - val rating: RatingWithoutDetails? = null + /* Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. */ +@JsonProperty("Id") +val id: + kotlin.String +, + + @JsonProperty("VehicleDetails") +val vehicleDetails: + VehicleDetails +, + + @JsonProperty("Supplier") +val supplier: + Supplier +, + + @JsonProperty("PickupDetails") +val pickupDetails: + VendorLocationDetails +, + + @JsonProperty("DropOffDetails") +val dropOffDetails: + VendorLocationDetails +, + + @JsonProperty("Price") +val price: + Price +, + + @JsonProperty("CancellationPolicy") +val cancellationPolicy: + CarsCancellationPolicy +, + + /* DataTimeStamp */ +@JsonProperty("DataTimeStamp") +val dataTimeStamp: java.time.OffsetDateTime? = null, + + /* Indicate whether the supplier supports online checkin */ +@JsonProperty("OnlineCheckIn") +val onlineCheckIn: kotlin.Boolean? = null, + + /* Indicate whether the supplier supports skip the counter */ +@JsonProperty("SkipTheCounter") +val skipTheCounter: kotlin.Boolean? = null, + + /* A map of links to other Car APIs or Expedia websites. */ +@JsonProperty("Links") +val links: kotlin.collections.Map? = null, + + @JsonProperty("RateDetails") +val rateDetails: RateDetails? = null, + + @JsonProperty("ReferencePrice") +val referencePrice: CarsMoney? = null, + + /* List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver */ +@JsonProperty("AdditionalFees") +val additionalFees: kotlin.collections.List? = null, + + @JsonProperty("NoShowPenalty") +val noShowPenalty: PenaltyType? = null, + + /* List of image resources of the car product. */ +@JsonProperty("Images") +val images: kotlin.collections.List? = null, + + @JsonProperty("Rating") +val rating: RatingWithoutDetails? = null ) { + + + + init { + require(id != null) { "id must not be null" } + + + + + + + + require(vehicleDetails != null) { "vehicleDetails must not be null" } + + + + + + + + require(supplier != null) { "supplier must not be null" } + + + + + + + + require(pickupDetails != null) { "pickupDetails must not be null" } + + + + + + + + require(dropOffDetails != null) { "dropOffDetails must not be null" } + + + + + + + + require(price != null) { "price must not be null" } + + + + + + + + require(cancellationPolicy != null) { "cancellationPolicy must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var vehicleDetails: VehicleDetails? = null, - private var supplier: Supplier? = null, - private var pickupDetails: VendorLocationDetails? = null, - private var dropOffDetails: VendorLocationDetails? = null, - private var price: Price? = null, - private var cancellationPolicy: CarsCancellationPolicy? = null, - private var dataTimeStamp: java.time.OffsetDateTime? = null, - private var onlineCheckIn: kotlin.Boolean? = null, - private var skipTheCounter: kotlin.Boolean? = null, - private var links: kotlin.collections.Map? = null, - private var rateDetails: RateDetails? = null, - private var referencePrice: CarsMoney? = null, - private var additionalFees: kotlin.collections.List? = null, - private var noShowPenalty: PenaltyType? = null, - private var images: kotlin.collections.List? = null, - private var rating: RatingWithoutDetails? = null - ) { - fun id(id: kotlin.String) = apply { this.id = id } - - fun vehicleDetails(vehicleDetails: VehicleDetails) = apply { this.vehicleDetails = vehicleDetails } - - fun supplier(supplier: Supplier) = apply { this.supplier = supplier } - - fun pickupDetails(pickupDetails: VendorLocationDetails) = apply { this.pickupDetails = pickupDetails } - - fun dropOffDetails(dropOffDetails: VendorLocationDetails) = apply { this.dropOffDetails = dropOffDetails } - - fun price(price: Price) = apply { this.price = price } - - fun cancellationPolicy(cancellationPolicy: CarsCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } - - fun dataTimeStamp(dataTimeStamp: java.time.OffsetDateTime?) = apply { this.dataTimeStamp = dataTimeStamp } - - fun onlineCheckIn(onlineCheckIn: kotlin.Boolean?) = apply { this.onlineCheckIn = onlineCheckIn } - - fun skipTheCounter(skipTheCounter: kotlin.Boolean?) = apply { this.skipTheCounter = skipTheCounter } - - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun rateDetails(rateDetails: RateDetails?) = apply { this.rateDetails = rateDetails } - - fun referencePrice(referencePrice: CarsMoney?) = apply { this.referencePrice = referencePrice } - - fun additionalFees(additionalFees: kotlin.collections.List?) = apply { this.additionalFees = additionalFees } - - fun noShowPenalty(noShowPenalty: PenaltyType?) = apply { this.noShowPenalty = noShowPenalty } - - fun images(images: kotlin.collections.List?) = apply { this.images = images } - - fun rating(rating: RatingWithoutDetails?) = apply { this.rating = rating } - - fun build(): Car { - val instance = - Car( - id = id!!, - vehicleDetails = vehicleDetails!!, - supplier = supplier!!, - pickupDetails = pickupDetails!!, - dropOffDetails = dropOffDetails!!, - price = price!!, - cancellationPolicy = cancellationPolicy!!, - dataTimeStamp = dataTimeStamp, - onlineCheckIn = onlineCheckIn, - skipTheCounter = skipTheCounter, - links = links, - rateDetails = rateDetails, - referencePrice = referencePrice, - additionalFees = additionalFees, - noShowPenalty = noShowPenalty, - images = images, - rating = rating - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Car) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.String? = null, + private var vehicleDetails: VehicleDetails? = null, + private var supplier: Supplier? = null, + private var pickupDetails: VendorLocationDetails? = null, + private var dropOffDetails: VendorLocationDetails? = null, + private var price: Price? = null, + private var cancellationPolicy: CarsCancellationPolicy? = null, + private var dataTimeStamp: java.time.OffsetDateTime? = null, + private var onlineCheckIn: kotlin.Boolean? = null, + private var skipTheCounter: kotlin.Boolean? = null, + private var links: kotlin.collections.Map? = null, + private var rateDetails: RateDetails? = null, + private var referencePrice: CarsMoney? = null, + private var additionalFees: kotlin.collections.List? = null, + private var noShowPenalty: PenaltyType? = null, + private var images: kotlin.collections.List? = null, + private var rating: RatingWithoutDetails? = null + ) { + fun id(id: kotlin.String) = apply { this.id = id } + fun vehicleDetails(vehicleDetails: VehicleDetails) = apply { this.vehicleDetails = vehicleDetails } + fun supplier(supplier: Supplier) = apply { this.supplier = supplier } + fun pickupDetails(pickupDetails: VendorLocationDetails) = apply { this.pickupDetails = pickupDetails } + fun dropOffDetails(dropOffDetails: VendorLocationDetails) = apply { this.dropOffDetails = dropOffDetails } + fun price(price: Price) = apply { this.price = price } + fun cancellationPolicy(cancellationPolicy: CarsCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } + fun dataTimeStamp(dataTimeStamp: java.time.OffsetDateTime?) = apply { this.dataTimeStamp = dataTimeStamp } + fun onlineCheckIn(onlineCheckIn: kotlin.Boolean?) = apply { this.onlineCheckIn = onlineCheckIn } + fun skipTheCounter(skipTheCounter: kotlin.Boolean?) = apply { this.skipTheCounter = skipTheCounter } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + fun rateDetails(rateDetails: RateDetails?) = apply { this.rateDetails = rateDetails } + fun referencePrice(referencePrice: CarsMoney?) = apply { this.referencePrice = referencePrice } + fun additionalFees(additionalFees: kotlin.collections.List?) = apply { this.additionalFees = additionalFees } + fun noShowPenalty(noShowPenalty: PenaltyType?) = apply { this.noShowPenalty = noShowPenalty } + fun images(images: kotlin.collections.List?) = apply { this.images = images } + fun rating(rating: RatingWithoutDetails?) = apply { this.rating = rating } + + fun build(): Car { + val instance = Car( + id = id!!, + vehicleDetails = vehicleDetails!!, + supplier = supplier!!, + pickupDetails = pickupDetails!!, + dropOffDetails = dropOffDetails!!, + price = price!!, + cancellationPolicy = cancellationPolicy!!, + dataTimeStamp = dataTimeStamp, + onlineCheckIn = onlineCheckIn, + skipTheCounter = skipTheCounter, + links = links, + rateDetails = rateDetails, + referencePrice = referencePrice, + additionalFees = additionalFees, + noShowPenalty = noShowPenalty, + images = images, + rating = rating + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id!!, vehicleDetails = vehicleDetails!!, supplier = supplier!!, @@ -243,5 +341,5 @@ data class Car( noShowPenalty = noShowPenalty, images = images, rating = rating - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt index b3d0b5d42..60d7a163a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Car category. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115008631767 - * @param code Car category code. - * @param `value` Car category value. + * @param code Car category code. + * @param `value` Car category value. */ data class CarCategory( - // Car category code. - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // Car category value. - @JsonProperty("Value") - @field:NotNull - @field:Valid - val `value`: kotlin.String + /* Car category code. */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* Car category value. */ +@JsonProperty("Value") +val `value`: + kotlin.String + ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(`value` != null) { "`value` must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var `value`: kotlin.String? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - - fun build(): CarCategory { - val instance = - CarCategory( - code = code!!, - `value` = `value`!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarCategory) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var `value`: kotlin.String? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + + fun build(): CarCategory { + val instance = CarCategory( + code = code!!, + `value` = `value`!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, `value` = `value`!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt index c40363aea..ab28f4332 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt @@ -15,7 +15,6 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.AdditionalFee import com.expediagroup.sdk.xap.models.CarPolicy import com.expediagroup.sdk.xap.models.CarsCancellationPolicy @@ -32,221 +31,329 @@ import com.expediagroup.sdk.xap.models.Supplier import com.expediagroup.sdk.xap.models.TaxesAndFees import com.expediagroup.sdk.xap.models.VehicleDetails import com.expediagroup.sdk.xap.models.VendorLocationDetails + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Details of requested car. - * @param vehicleDetails - * @param supplier - * @param pickupDetails - * @param dropOffDetails - * @param price - * @param cancellationPolicy - * @param onlineCheckIn Indicate whether the supplier supports online checkin - * @param skipTheCounter Indicate whether the supplier supports skip the counter - * @param rateDetails - * @param referencePrice - * @param additionalFees List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - * @param taxesAndFeesDetails List of TaxesAndFees Details - * @param extraFeesDetails List of ExtraFeesDetails - * @param specialEquipments Description and costs of any optional special equipment that may be rented with the car. - * @param rentalLimits - * @param noShowPenalty - * @param carPolicies A list of policies that apply to this car rental. - * @param images List of image resources of the car product. - * @param rating + * @param vehicleDetails + * @param supplier + * @param pickupDetails + * @param dropOffDetails + * @param price + * @param cancellationPolicy + * @param onlineCheckIn Indicate whether the supplier supports online checkin + * @param skipTheCounter Indicate whether the supplier supports skip the counter + * @param rateDetails + * @param referencePrice + * @param additionalFees List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + * @param taxesAndFeesDetails List of TaxesAndFees Details + * @param extraFeesDetails List of ExtraFeesDetails + * @param specialEquipments Description and costs of any optional special equipment that may be rented with the car. + * @param rentalLimits + * @param noShowPenalty + * @param carPolicies A list of policies that apply to this car rental. + * @param images List of image resources of the car product. + * @param rating */ data class CarDetails( - @JsonProperty("VehicleDetails") - @field:NotNull - @field:Valid - val vehicleDetails: VehicleDetails, - @JsonProperty("Supplier") - @field:NotNull - @field:Valid - val supplier: Supplier, - @JsonProperty("PickupDetails") - @field:NotNull - @field:Valid - val pickupDetails: VendorLocationDetails, - @JsonProperty("DropOffDetails") - @field:NotNull - @field:Valid - val dropOffDetails: VendorLocationDetails, - @JsonProperty("Price") - @field:NotNull - @field:Valid - val price: Price, - @JsonProperty("CancellationPolicy") - @field:NotNull - @field:Valid - val cancellationPolicy: CarsCancellationPolicy, - // Indicate whether the supplier supports online checkin - @JsonProperty("OnlineCheckIn") - @field:Valid - val onlineCheckIn: kotlin.Boolean? = null, - // Indicate whether the supplier supports skip the counter - @JsonProperty("SkipTheCounter") - @field:Valid - val skipTheCounter: kotlin.Boolean? = null, - @JsonProperty("RateDetails") - @field:Valid - val rateDetails: RateDetails? = null, - @JsonProperty("ReferencePrice") - @field:Valid - val referencePrice: CarsMoney? = null, - // List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - @JsonProperty("AdditionalFees") - @field:Valid - val additionalFees: kotlin.collections.List? = null, - // List of TaxesAndFees Details - @JsonProperty("TaxesAndFeesDetails") - @field:Valid - val taxesAndFeesDetails: kotlin.collections.List? = null, - // List of ExtraFeesDetails - @JsonProperty("ExtraFeesDetails") - @field:Valid - val extraFeesDetails: kotlin.collections.List? = null, - // Description and costs of any optional special equipment that may be rented with the car. - @JsonProperty("SpecialEquipments") - @field:Valid - val specialEquipments: kotlin.collections.List? = null, - @JsonProperty("RentalLimits") - @field:Valid - val rentalLimits: RentalLimits? = null, - @JsonProperty("NoShowPenalty") - @field:Valid - val noShowPenalty: PenaltyType? = null, - // A list of policies that apply to this car rental. - @JsonProperty("CarPolicies") - @field:Valid - val carPolicies: kotlin.collections.List? = null, - // List of image resources of the car product. - @JsonProperty("Images") - @field:Valid - val images: kotlin.collections.List? = null, - @JsonProperty("Rating") - @field:Valid - val rating: Rating? = null + @JsonProperty("VehicleDetails") +val vehicleDetails: + VehicleDetails +, + + @JsonProperty("Supplier") +val supplier: + Supplier +, + + @JsonProperty("PickupDetails") +val pickupDetails: + VendorLocationDetails +, + + @JsonProperty("DropOffDetails") +val dropOffDetails: + VendorLocationDetails +, + + @JsonProperty("Price") +val price: + Price +, + + @JsonProperty("CancellationPolicy") +val cancellationPolicy: + CarsCancellationPolicy +, + + /* Indicate whether the supplier supports online checkin */ +@JsonProperty("OnlineCheckIn") +val onlineCheckIn: kotlin.Boolean? = null, + + /* Indicate whether the supplier supports skip the counter */ +@JsonProperty("SkipTheCounter") +val skipTheCounter: kotlin.Boolean? = null, + + @JsonProperty("RateDetails") +val rateDetails: RateDetails? = null, + + @JsonProperty("ReferencePrice") +val referencePrice: CarsMoney? = null, + + /* List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver */ +@JsonProperty("AdditionalFees") +val additionalFees: kotlin.collections.List? = null, + + /* List of TaxesAndFees Details */ +@JsonProperty("TaxesAndFeesDetails") +val taxesAndFeesDetails: kotlin.collections.List? = null, + + /* List of ExtraFeesDetails */ +@JsonProperty("ExtraFeesDetails") +val extraFeesDetails: kotlin.collections.List? = null, + + /* Description and costs of any optional special equipment that may be rented with the car. */ +@JsonProperty("SpecialEquipments") +val specialEquipments: kotlin.collections.List? = null, + + @JsonProperty("RentalLimits") +val rentalLimits: RentalLimits? = null, + + @JsonProperty("NoShowPenalty") +val noShowPenalty: PenaltyType? = null, + + /* A list of policies that apply to this car rental. */ +@JsonProperty("CarPolicies") +val carPolicies: kotlin.collections.List? = null, + + /* List of image resources of the car product. */ +@JsonProperty("Images") +val images: kotlin.collections.List? = null, + + @JsonProperty("Rating") +val rating: Rating? = null ) { + + + + init { + require(vehicleDetails != null) { "vehicleDetails must not be null" } + + + + + + + + require(supplier != null) { "supplier must not be null" } + + + + + + + + require(pickupDetails != null) { "pickupDetails must not be null" } + + + + + + + + require(dropOffDetails != null) { "dropOffDetails must not be null" } + + + + + + + + require(price != null) { "price must not be null" } + + + + + + + + require(cancellationPolicy != null) { "cancellationPolicy must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var vehicleDetails: VehicleDetails? = null, - private var supplier: Supplier? = null, - private var pickupDetails: VendorLocationDetails? = null, - private var dropOffDetails: VendorLocationDetails? = null, - private var price: Price? = null, - private var cancellationPolicy: CarsCancellationPolicy? = null, - private var onlineCheckIn: kotlin.Boolean? = null, - private var skipTheCounter: kotlin.Boolean? = null, - private var rateDetails: RateDetails? = null, - private var referencePrice: CarsMoney? = null, - private var additionalFees: kotlin.collections.List? = null, - private var taxesAndFeesDetails: kotlin.collections.List? = null, - private var extraFeesDetails: kotlin.collections.List? = null, - private var specialEquipments: kotlin.collections.List? = null, - private var rentalLimits: RentalLimits? = null, - private var noShowPenalty: PenaltyType? = null, - private var carPolicies: kotlin.collections.List? = null, - private var images: kotlin.collections.List? = null, - private var rating: Rating? = null - ) { - fun vehicleDetails(vehicleDetails: VehicleDetails) = apply { this.vehicleDetails = vehicleDetails } - - fun supplier(supplier: Supplier) = apply { this.supplier = supplier } - - fun pickupDetails(pickupDetails: VendorLocationDetails) = apply { this.pickupDetails = pickupDetails } - - fun dropOffDetails(dropOffDetails: VendorLocationDetails) = apply { this.dropOffDetails = dropOffDetails } - - fun price(price: Price) = apply { this.price = price } - - fun cancellationPolicy(cancellationPolicy: CarsCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } - - fun onlineCheckIn(onlineCheckIn: kotlin.Boolean?) = apply { this.onlineCheckIn = onlineCheckIn } - - fun skipTheCounter(skipTheCounter: kotlin.Boolean?) = apply { this.skipTheCounter = skipTheCounter } - - fun rateDetails(rateDetails: RateDetails?) = apply { this.rateDetails = rateDetails } - - fun referencePrice(referencePrice: CarsMoney?) = apply { this.referencePrice = referencePrice } - - fun additionalFees(additionalFees: kotlin.collections.List?) = apply { this.additionalFees = additionalFees } - - fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - - fun extraFeesDetails(extraFeesDetails: kotlin.collections.List?) = apply { this.extraFeesDetails = extraFeesDetails } - - fun specialEquipments(specialEquipments: kotlin.collections.List?) = apply { this.specialEquipments = specialEquipments } - - fun rentalLimits(rentalLimits: RentalLimits?) = apply { this.rentalLimits = rentalLimits } - - fun noShowPenalty(noShowPenalty: PenaltyType?) = apply { this.noShowPenalty = noShowPenalty } - - fun carPolicies(carPolicies: kotlin.collections.List?) = apply { this.carPolicies = carPolicies } - - fun images(images: kotlin.collections.List?) = apply { this.images = images } - - fun rating(rating: Rating?) = apply { this.rating = rating } - - fun build(): CarDetails { - val instance = - CarDetails( - vehicleDetails = vehicleDetails!!, - supplier = supplier!!, - pickupDetails = pickupDetails!!, - dropOffDetails = dropOffDetails!!, - price = price!!, - cancellationPolicy = cancellationPolicy!!, - onlineCheckIn = onlineCheckIn, - skipTheCounter = skipTheCounter, - rateDetails = rateDetails, - referencePrice = referencePrice, - additionalFees = additionalFees, - taxesAndFeesDetails = taxesAndFeesDetails, - extraFeesDetails = extraFeesDetails, - specialEquipments = specialEquipments, - rentalLimits = rentalLimits, - noShowPenalty = noShowPenalty, - carPolicies = carPolicies, - images = images, - rating = rating - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarDetails) { - 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}" } - ) - } - } + class Builder( + private var vehicleDetails: VehicleDetails? = null, + private var supplier: Supplier? = null, + private var pickupDetails: VendorLocationDetails? = null, + private var dropOffDetails: VendorLocationDetails? = null, + private var price: Price? = null, + private var cancellationPolicy: CarsCancellationPolicy? = null, + private var onlineCheckIn: kotlin.Boolean? = null, + private var skipTheCounter: kotlin.Boolean? = null, + private var rateDetails: RateDetails? = null, + private var referencePrice: CarsMoney? = null, + private var additionalFees: kotlin.collections.List? = null, + private var taxesAndFeesDetails: kotlin.collections.List? = null, + private var extraFeesDetails: kotlin.collections.List? = null, + private var specialEquipments: kotlin.collections.List? = null, + private var rentalLimits: RentalLimits? = null, + private var noShowPenalty: PenaltyType? = null, + private var carPolicies: kotlin.collections.List? = null, + private var images: kotlin.collections.List? = null, + private var rating: Rating? = null + ) { + fun vehicleDetails(vehicleDetails: VehicleDetails) = apply { this.vehicleDetails = vehicleDetails } + fun supplier(supplier: Supplier) = apply { this.supplier = supplier } + fun pickupDetails(pickupDetails: VendorLocationDetails) = apply { this.pickupDetails = pickupDetails } + fun dropOffDetails(dropOffDetails: VendorLocationDetails) = apply { this.dropOffDetails = dropOffDetails } + fun price(price: Price) = apply { this.price = price } + fun cancellationPolicy(cancellationPolicy: CarsCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } + fun onlineCheckIn(onlineCheckIn: kotlin.Boolean?) = apply { this.onlineCheckIn = onlineCheckIn } + fun skipTheCounter(skipTheCounter: kotlin.Boolean?) = apply { this.skipTheCounter = skipTheCounter } + fun rateDetails(rateDetails: RateDetails?) = apply { this.rateDetails = rateDetails } + fun referencePrice(referencePrice: CarsMoney?) = apply { this.referencePrice = referencePrice } + fun additionalFees(additionalFees: kotlin.collections.List?) = apply { this.additionalFees = additionalFees } + fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } + fun extraFeesDetails(extraFeesDetails: kotlin.collections.List?) = apply { this.extraFeesDetails = extraFeesDetails } + fun specialEquipments(specialEquipments: kotlin.collections.List?) = apply { this.specialEquipments = specialEquipments } + fun rentalLimits(rentalLimits: RentalLimits?) = apply { this.rentalLimits = rentalLimits } + fun noShowPenalty(noShowPenalty: PenaltyType?) = apply { this.noShowPenalty = noShowPenalty } + fun carPolicies(carPolicies: kotlin.collections.List?) = apply { this.carPolicies = carPolicies } + fun images(images: kotlin.collections.List?) = apply { this.images = images } + fun rating(rating: Rating?) = apply { this.rating = rating } + + fun build(): CarDetails { + val instance = CarDetails( + vehicleDetails = vehicleDetails!!, + supplier = supplier!!, + pickupDetails = pickupDetails!!, + dropOffDetails = dropOffDetails!!, + price = price!!, + cancellationPolicy = cancellationPolicy!!, + onlineCheckIn = onlineCheckIn, + skipTheCounter = skipTheCounter, + rateDetails = rateDetails, + referencePrice = referencePrice, + additionalFees = additionalFees, + taxesAndFeesDetails = taxesAndFeesDetails, + extraFeesDetails = extraFeesDetails, + specialEquipments = specialEquipments, + rentalLimits = rentalLimits, + noShowPenalty = noShowPenalty, + carPolicies = carPolicies, + images = images, + rating = rating + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( vehicleDetails = vehicleDetails!!, supplier = supplier!!, pickupDetails = pickupDetails!!, @@ -266,5 +373,5 @@ data class CarDetails( carPolicies = carPolicies, images = images, rating = rating - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt index e7539f0dd..57348fcc0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt @@ -15,109 +15,122 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarDetails import com.expediagroup.sdk.xap.models.CarsLink import com.expediagroup.sdk.xap.models.CarsValidFormsOfPayment import com.expediagroup.sdk.xap.models.CarsWarning + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* - * @param transactionId A unique identifier for this transaction. - * @param warnings Container for warning codes - * @param carDetails - * @param validFormsOfPayment List of all the forms of payment that will be accepted for the booking of this rental transaction. - * @param links A map of links to other Car APIs. possible link name: ApiBooking +* + * @param transactionId A unique identifier for this transaction. + * @param warnings Container for warning codes + * @param carDetails + * @param validFormsOfPayment List of all the forms of payment that will be accepted for the booking of this rental transaction. + * @param links A map of links to other Car APIs. possible link name: ApiBooking */ data class CarDetailsResponse( - // A unique identifier for this transaction. - @JsonProperty("TransactionId") - @field:NotNull - @field:Valid - val transactionId: kotlin.String, - // Container for warning codes - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - @JsonProperty("CarDetails") - @field:Valid - val carDetails: CarDetails? = null, - // List of all the forms of payment that will be accepted for the booking of this rental transaction. - @JsonProperty("ValidFormsOfPayment") - @field:Valid - val validFormsOfPayment: kotlin.collections.List? = null, - // A map of links to other Car APIs. possible link name: ApiBooking - @JsonProperty("Links") - @field:Valid - val links: kotlin.collections.Map? = null + /* A unique identifier for this transaction. */ +@JsonProperty("TransactionId") +val transactionId: + kotlin.String +, + + /* Container for warning codes */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + @JsonProperty("CarDetails") +val carDetails: CarDetails? = null, + + /* List of all the forms of payment that will be accepted for the booking of this rental transaction. */ +@JsonProperty("ValidFormsOfPayment") +val validFormsOfPayment: kotlin.collections.List? = null, + + /* A map of links to other Car APIs. possible link name: ApiBooking */ +@JsonProperty("Links") +val links: kotlin.collections.Map? = null ) { + + + + init { + require(transactionId != null) { "transactionId must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var transactionId: kotlin.String? = null, - private var warnings: kotlin.collections.List? = null, - private var carDetails: CarDetails? = null, - private var validFormsOfPayment: kotlin.collections.List? = null, - private var links: kotlin.collections.Map? = null - ) { - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun carDetails(carDetails: CarDetails?) = apply { this.carDetails = carDetails } - - fun validFormsOfPayment(validFormsOfPayment: kotlin.collections.List?) = apply { this.validFormsOfPayment = validFormsOfPayment } - - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun build(): CarDetailsResponse { - val instance = - CarDetailsResponse( - transactionId = transactionId!!, - warnings = warnings, - carDetails = carDetails, - validFormsOfPayment = validFormsOfPayment, - links = links - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarDetailsResponse) { - 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}" } - ) - } - } + class Builder( + private var transactionId: kotlin.String? = null, + private var warnings: kotlin.collections.List? = null, + private var carDetails: CarDetails? = null, + private var validFormsOfPayment: kotlin.collections.List? = null, + private var links: kotlin.collections.Map? = null + ) { + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun carDetails(carDetails: CarDetails?) = apply { this.carDetails = carDetails } + fun validFormsOfPayment(validFormsOfPayment: kotlin.collections.List?) = apply { this.validFormsOfPayment = validFormsOfPayment } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + + fun build(): CarDetailsResponse { + val instance = CarDetailsResponse( + transactionId = transactionId!!, + warnings = warnings, + carDetails = carDetails, + validFormsOfPayment = validFormsOfPayment, + links = links + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( transactionId = transactionId!!, warnings = warnings, carDetails = carDetails, validFormsOfPayment = validFormsOfPayment, links = links - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt index e1b80535d..c02b25838 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt @@ -15,97 +15,108 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Car import com.expediagroup.sdk.xap.models.CarsWarning + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* - * @param transactionId A unique identifier for this transaction. - * @param carCount The number of cars offers returned in the response. - * @param warnings Container for warning codes - * @param cars List of cars matching the search criteria. +* + * @param transactionId A unique identifier for this transaction. + * @param carCount The number of cars offers returned in the response. + * @param warnings Container for warning codes + * @param cars List of cars matching the search criteria. */ data class CarListingsResponse( - // A unique identifier for this transaction. - @JsonProperty("TransactionId") - @field:NotNull - @field:Valid - val transactionId: kotlin.String, - // The number of cars offers returned in the response. - @JsonProperty("CarCount") - val carCount: kotlin.Long, - // Container for warning codes - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - // List of cars matching the search criteria. - @JsonProperty("Cars") - @field:Valid - val cars: kotlin.collections.List? = null + /* A unique identifier for this transaction. */ +@JsonProperty("TransactionId") +val transactionId: + kotlin.String +, + + /* The number of cars offers returned in the response. */ +@JsonProperty("CarCount") +val carCount: + kotlin.Long +, + + /* Container for warning codes */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + /* List of cars matching the search criteria. */ +@JsonProperty("Cars") +val cars: kotlin.collections.List? = null ) { + + + + init { + require(transactionId != null) { "transactionId must not be null" } + + + + + + + + require(carCount != null) { "carCount must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var transactionId: kotlin.String? = null, - private var carCount: kotlin.Long? = null, - private var warnings: kotlin.collections.List? = null, - private var cars: kotlin.collections.List? = null - ) { - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - - fun carCount(carCount: kotlin.Long) = apply { this.carCount = carCount } - - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun cars(cars: kotlin.collections.List?) = apply { this.cars = cars } - - fun build(): CarListingsResponse { - val instance = - CarListingsResponse( - transactionId = transactionId!!, - carCount = carCount!!, - warnings = warnings, - cars = cars - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarListingsResponse) { - 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}" } - ) - } - } + class Builder( + private var transactionId: kotlin.String? = null, + private var carCount: kotlin.Long? = null, + private var warnings: kotlin.collections.List? = null, + private var cars: kotlin.collections.List? = null + ) { + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + fun carCount(carCount: kotlin.Long) = apply { this.carCount = carCount } + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun cars(cars: kotlin.collections.List?) = apply { this.cars = cars } + + fun build(): CarListingsResponse { + val instance = CarListingsResponse( + transactionId = transactionId!!, + carCount = carCount!!, + warnings = warnings, + cars = cars + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( transactionId = transactionId!!, carCount = carCount!!, warnings = warnings, cars = cars - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt index a065ac273..608d0b3ed 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt @@ -15,76 +15,71 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * A list of policies that apply to this car rental. - * @param categoryCode The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) - * @param policyText The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. + * @param categoryCode The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) + * @param policyText The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. */ data class CarPolicy( - // The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) - @JsonProperty("CategoryCode") - @field:NotNull - @field:Valid - val categoryCode: kotlin.String, - // The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. - @JsonProperty("PolicyText") - @field:Valid - val policyText: kotlin.String? = null + /* The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) */ +@JsonProperty("CategoryCode") +val categoryCode: + kotlin.String +, + + /* The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. */ +@JsonProperty("PolicyText") +val policyText: kotlin.String? = null ) { + + + + init { + require(categoryCode != null) { "categoryCode must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var categoryCode: kotlin.String? = null, - private var policyText: kotlin.String? = null - ) { - fun categoryCode(categoryCode: kotlin.String) = apply { this.categoryCode = categoryCode } - - fun policyText(policyText: kotlin.String?) = apply { this.policyText = policyText } - - fun build(): CarPolicy { - val instance = - CarPolicy( - categoryCode = categoryCode!!, - policyText = policyText - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarPolicy) { - 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}" } - ) - } - } + class Builder( + private var categoryCode: kotlin.String? = null, + private var policyText: kotlin.String? = null + ) { + fun categoryCode(categoryCode: kotlin.String) = apply { this.categoryCode = categoryCode } + fun policyText(policyText: kotlin.String?) = apply { this.policyText = policyText } + + fun build(): CarPolicy { + val instance = CarPolicy( + categoryCode = categoryCode!!, + policyText = policyText + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( categoryCode = categoryCode!!, policyText = policyText - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt index 7c2dcda4c..37cbdf9d8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Car type. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115002516708 - * @param code Car type code. - * @param `value` Car type value. + * @param code Car type code. + * @param `value` Car type value. */ data class CarType( - // Car type code. - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // Car type value. - @JsonProperty("Value") - @field:NotNull - @field:Valid - val `value`: kotlin.String + /* Car type code. */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* Car type value. */ +@JsonProperty("Value") +val `value`: + kotlin.String + ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(`value` != null) { "`value` must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var `value`: kotlin.String? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - - fun build(): CarType { - val instance = - CarType( - code = code!!, - `value` = `value`!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarType) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var `value`: kotlin.String? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + + fun build(): CarType { + val instance = CarType( + code = code!!, + `value` = `value`!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, `value` = `value`!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt index 9eed0edb9..efc45a469 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt @@ -15,122 +15,151 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Address information - * @param address1 Street Number, Street Name, or PO Box - * @param city The city - * @param country 3-letter code for the country - * @param address2 Apartment, Floor, Suite, Bldg # or more specific information about Address1. - * @param suite Suite/apartment number - * @param province The state or province - * @param postalCode Zip/postal code + * @param address1 Street Number, Street Name, or PO Box + * @param city The city + * @param country 3-letter code for the country + * @param address2 Apartment, Floor, Suite, Bldg # or more specific information about Address1. + * @param suite Suite/apartment number + * @param province The state or province + * @param postalCode Zip/postal code */ data class CarsAddress( - // Street Number, Street Name, or PO Box - @JsonProperty("Address1") - @field:NotNull - @field:Valid - val address1: kotlin.String, - // The city - @JsonProperty("City") - @field:NotNull - @field:Valid - val city: kotlin.String, - // 3-letter code for the country - @JsonProperty("Country") - @field:NotNull - @field:Valid - val country: kotlin.String, - // Apartment, Floor, Suite, Bldg # or more specific information about Address1. - @JsonProperty("Address2") - @field:Valid - val address2: kotlin.String? = null, - // Suite/apartment number - @JsonProperty("Suite") - @field:Valid - val suite: kotlin.String? = null, - // The state or province - @JsonProperty("Province") - @field:Valid - val province: kotlin.String? = null, - // Zip/postal code - @JsonProperty("PostalCode") - @field:Valid - val postalCode: kotlin.String? = null + /* Street Number, Street Name, or PO Box */ +@JsonProperty("Address1") +val address1: + kotlin.String +, + + /* The city */ +@JsonProperty("City") +val city: + kotlin.String +, + + /* 3-letter code for the country */ +@JsonProperty("Country") +val country: + kotlin.String +, + + /* Apartment, Floor, Suite, Bldg # or more specific information about Address1. */ +@JsonProperty("Address2") +val address2: kotlin.String? = null, + + /* Suite/apartment number */ +@JsonProperty("Suite") +val suite: kotlin.String? = null, + + /* The state or province */ +@JsonProperty("Province") +val province: kotlin.String? = null, + + /* Zip/postal code */ +@JsonProperty("PostalCode") +val postalCode: kotlin.String? = null ) { + + + + init { + require(address1 != null) { "address1 must not be null" } + + + + + + + + require(city != null) { "city must not be null" } + + + + + + + + require(country != null) { "country must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var address1: kotlin.String? = null, - private var city: kotlin.String? = null, - private var country: kotlin.String? = null, - private var address2: kotlin.String? = null, - private var suite: kotlin.String? = null, - private var province: kotlin.String? = null, - private var postalCode: kotlin.String? = null - ) { - fun address1(address1: kotlin.String) = apply { this.address1 = address1 } - - fun city(city: kotlin.String) = apply { this.city = city } - - fun country(country: kotlin.String) = apply { this.country = country } - - fun address2(address2: kotlin.String?) = apply { this.address2 = address2 } - - fun suite(suite: kotlin.String?) = apply { this.suite = suite } - - fun province(province: kotlin.String?) = apply { this.province = province } - - fun postalCode(postalCode: kotlin.String?) = apply { this.postalCode = postalCode } - - fun build(): CarsAddress { - val instance = - CarsAddress( - address1 = address1!!, - city = city!!, - country = country!!, - address2 = address2, - suite = suite, - province = province, - postalCode = postalCode - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsAddress) { - 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}" } - ) - } - } + class Builder( + private var address1: kotlin.String? = null, + private var city: kotlin.String? = null, + private var country: kotlin.String? = null, + private var address2: kotlin.String? = null, + private var suite: kotlin.String? = null, + private var province: kotlin.String? = null, + private var postalCode: kotlin.String? = null + ) { + fun address1(address1: kotlin.String) = apply { this.address1 = address1 } + fun city(city: kotlin.String) = apply { this.city = city } + fun country(country: kotlin.String) = apply { this.country = country } + fun address2(address2: kotlin.String?) = apply { this.address2 = address2 } + fun suite(suite: kotlin.String?) = apply { this.suite = suite } + fun province(province: kotlin.String?) = apply { this.province = province } + fun postalCode(postalCode: kotlin.String?) = apply { this.postalCode = postalCode } + + fun build(): CarsAddress { + val instance = CarsAddress( + address1 = address1!!, + city = city!!, + country = country!!, + address2 = address2, + suite = suite, + province = province, + postalCode = postalCode + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( address1 = address1!!, city = city!!, country = country!!, @@ -138,5 +167,5 @@ data class CarsAddress( suite = suite, province = province, postalCode = postalCode - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt index 69eec7c10..e7cbec9b7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt @@ -15,104 +15,117 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.NonCancellableDateTimeRange import com.expediagroup.sdk.xap.models.PenaltyRule + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Cancellation Policy Container. - * @param cancellable Indicates if this car can be cancelled (free cancel or penalty cancel) - * @param freeCancellation Indicates if this car may be cancelled without a penalty. - * @param freeCancellationEndDateTime Indicates the latest time that the car can be cancelled for free. - * @param penaltyRules Container for penalty rules - * @param nonCancellableDateTimeRange + * @param cancellable Indicates if this car can be cancelled (free cancel or penalty cancel) + * @param freeCancellation Indicates if this car may be cancelled without a penalty. + * @param freeCancellationEndDateTime Indicates the latest time that the car can be cancelled for free. + * @param penaltyRules Container for penalty rules + * @param nonCancellableDateTimeRange */ data class CarsCancellationPolicy( - // Indicates if this car can be cancelled (free cancel or penalty cancel) - @JsonProperty("Cancellable") - @field:Valid - val cancellable: kotlin.Boolean? = null, - // Indicates if this car may be cancelled without a penalty. - @JsonProperty("FreeCancellation") - @field:Valid - val freeCancellation: kotlin.Boolean? = null, - // Indicates the latest time that the car can be cancelled for free. - @JsonProperty("FreeCancellationEndDateTime") - val freeCancellationEndDateTime: java.time.LocalDateTime? = null, - // Container for penalty rules - @JsonProperty("PenaltyRules") - @field:Valid - val penaltyRules: kotlin.collections.List? = null, - @JsonProperty("NonCancellableDateTimeRange") - @field:Valid - val nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null + /* Indicates if this car can be cancelled (free cancel or penalty cancel) */ +@JsonProperty("Cancellable") +val cancellable: kotlin.Boolean? = null, + + /* Indicates if this car may be cancelled without a penalty. */ +@JsonProperty("FreeCancellation") +val freeCancellation: kotlin.Boolean? = null, + + /* Indicates the latest time that the car can be cancelled for free. */ +@JsonProperty("FreeCancellationEndDateTime") +val freeCancellationEndDateTime: java.time.LocalDateTime? = null, + + /* Container for penalty rules */ +@JsonProperty("PenaltyRules") +val penaltyRules: kotlin.collections.List? = null, + + @JsonProperty("NonCancellableDateTimeRange") +val nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var cancellable: kotlin.Boolean? = null, - private var freeCancellation: kotlin.Boolean? = null, - private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, - private var penaltyRules: kotlin.collections.List? = null, - private var nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null - ) { - fun cancellable(cancellable: kotlin.Boolean?) = apply { this.cancellable = cancellable } - - fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - - fun penaltyRules(penaltyRules: kotlin.collections.List?) = apply { this.penaltyRules = penaltyRules } - - fun nonCancellableDateTimeRange(nonCancellableDateTimeRange: NonCancellableDateTimeRange?) = apply { this.nonCancellableDateTimeRange = nonCancellableDateTimeRange } - - fun build(): CarsCancellationPolicy { - val instance = - CarsCancellationPolicy( - cancellable = cancellable, - freeCancellation = freeCancellation, - freeCancellationEndDateTime = freeCancellationEndDateTime, - penaltyRules = penaltyRules, - nonCancellableDateTimeRange = nonCancellableDateTimeRange - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsCancellationPolicy) { - 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}" } - ) - } - } + class Builder( + private var cancellable: kotlin.Boolean? = null, + private var freeCancellation: kotlin.Boolean? = null, + private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, + private var penaltyRules: kotlin.collections.List? = null, + private var nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null + ) { + fun cancellable(cancellable: kotlin.Boolean?) = apply { this.cancellable = cancellable } + fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + fun penaltyRules(penaltyRules: kotlin.collections.List?) = apply { this.penaltyRules = penaltyRules } + fun nonCancellableDateTimeRange(nonCancellableDateTimeRange: NonCancellableDateTimeRange?) = apply { this.nonCancellableDateTimeRange = nonCancellableDateTimeRange } + + fun build(): CarsCancellationPolicy { + val instance = CarsCancellationPolicy( + cancellable = cancellable, + freeCancellation = freeCancellation, + freeCancellationEndDateTime = freeCancellationEndDateTime, + penaltyRules = penaltyRules, + nonCancellableDateTimeRange = nonCancellableDateTimeRange + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( cancellable = cancellable, freeCancellation = freeCancellation, freeCancellationEndDateTime = freeCancellationEndDateTime, penaltyRules = penaltyRules, nonCancellableDateTimeRange = nonCancellableDateTimeRange - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt index 38c99dc55..edb91ca3c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt @@ -15,98 +15,109 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for disambiguation country information - * @param name country name - * @param isoCode2 2-letter code for the country - * @param isoCode3 3-letter code for the country - * @param code 3-letter code for the country + * @param name country name + * @param isoCode2 2-letter code for the country + * @param isoCode3 3-letter code for the country + * @param code 3-letter code for the country */ data class CarsCountry( - // country name - @JsonProperty("Name") - @field:NotNull - @field:Valid - val name: kotlin.String, - // 2-letter code for the country - @JsonProperty("IsoCode2") - @field:NotNull - @field:Valid - val isoCode2: kotlin.String, - // 3-letter code for the country - @JsonProperty("IsoCode3") - @field:NotNull - @field:Valid - val isoCode3: kotlin.String, - // 3-letter code for the country - @JsonProperty("Code") - @field:Valid - val code: kotlin.String? = null + /* country name */ +@JsonProperty("Name") +val name: + kotlin.String +, + + /* 2-letter code for the country */ +@JsonProperty("IsoCode2") +val isoCode2: + kotlin.String +, + + /* 3-letter code for the country */ +@JsonProperty("IsoCode3") +val isoCode3: + kotlin.String +, + + /* 3-letter code for the country */ +@JsonProperty("Code") +val code: kotlin.String? = null ) { + + + + init { + require(name != null) { "name must not be null" } + + + + + + + + require(isoCode2 != null) { "isoCode2 must not be null" } + + + + + + + + require(isoCode3 != null) { "isoCode3 must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var isoCode2: kotlin.String? = null, - private var isoCode3: kotlin.String? = null, - private var code: kotlin.String? = null - ) { - fun name(name: kotlin.String) = apply { this.name = name } - - fun isoCode2(isoCode2: kotlin.String) = apply { this.isoCode2 = isoCode2 } - - fun isoCode3(isoCode3: kotlin.String) = apply { this.isoCode3 = isoCode3 } - - fun code(code: kotlin.String?) = apply { this.code = code } - - fun build(): CarsCountry { - val instance = - CarsCountry( - name = name!!, - isoCode2 = isoCode2!!, - isoCode3 = isoCode3!!, - code = code - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsCountry) { - 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}" } - ) - } - } + class Builder( + private var name: kotlin.String? = null, + private var isoCode2: kotlin.String? = null, + private var isoCode3: kotlin.String? = null, + private var code: kotlin.String? = null + ) { + fun name(name: kotlin.String) = apply { this.name = name } + fun isoCode2(isoCode2: kotlin.String) = apply { this.isoCode2 = isoCode2 } + fun isoCode3(isoCode3: kotlin.String) = apply { this.isoCode3 = isoCode3 } + fun code(code: kotlin.String?) = apply { this.code = code } + + fun build(): CarsCountry { + val instance = CarsCountry( + name = name!!, + isoCode2 = isoCode2!!, + isoCode3 = isoCode3!!, + code = code + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( name = name!!, isoCode2 = isoCode2!!, isoCode3 = isoCode3!!, code = code - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt index e8367a886..4c635b59b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt @@ -15,71 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** * Date range of the period. - * @param startDate Start date at pickup location of the period. - * @param endDate End date at pickup location of the period. + * @param startDate Start date at pickup location of the period. + * @param endDate End date at pickup location of the period. */ data class CarsDateRange( - // Start date at pickup location of the period. - @JsonProperty("StartDate") - val startDate: java.time.LocalDate, - // End date at pickup location of the period. - @JsonProperty("EndDate") - val endDate: java.time.LocalDate + /* Start date at pickup location of the period. */ +@JsonProperty("StartDate") +val startDate: + java.time.LocalDate +, + + /* End date at pickup location of the period. */ +@JsonProperty("EndDate") +val endDate: + java.time.LocalDate + ) { + + + + init { + require(startDate != null) { "startDate must not be null" } + + + + + + + + require(endDate != null) { "endDate must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null - ) { - fun startDate(startDate: java.time.LocalDate) = apply { this.startDate = startDate } - - fun endDate(endDate: java.time.LocalDate) = apply { this.endDate = endDate } - - fun build(): CarsDateRange { - val instance = - CarsDateRange( - startDate = startDate!!, - endDate = endDate!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsDateRange) { - 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}" } - ) - } - } + class Builder( + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null + ) { + fun startDate(startDate: java.time.LocalDate) = apply { this.startDate = startDate } + fun endDate(endDate: java.time.LocalDate) = apply { this.endDate = endDate } + + fun build(): CarsDateRange { + val instance = CarsDateRange( + startDate = startDate!!, + endDate = endDate!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( startDate = startDate!!, endDate = endDate!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt index a6e9e8fe4..bf42532aa 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt @@ -15,86 +15,87 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The extra distance information. - * @param `value` The number of miles/kilometers of the distance (specified by the Unit). - * @param unit The unit (KM or MI) for the distance. - * @param direction The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE + * @param `value` The number of miles/kilometers of the distance (specified by the Unit). + * @param unit The unit (KM or MI) for the distance. + * @param direction The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE */ data class CarsDistance( - // The number of miles/kilometers of the distance (specified by the Unit). - @JsonProperty("Value") - @field:NotNull - @field:Valid - val `value`: kotlin.String, - // The unit (KM or MI) for the distance. - @JsonProperty("Unit") - @field:Valid - val unit: kotlin.String? = null, - // The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE - @JsonProperty("Direction") - @field:Valid - val direction: kotlin.String? = null + /* The number of miles/kilometers of the distance (specified by the Unit). */ +@JsonProperty("Value") +val `value`: + kotlin.String +, + + /* The unit (KM or MI) for the distance. */ +@JsonProperty("Unit") +val unit: kotlin.String? = null, + + /* The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE */ +@JsonProperty("Direction") +val direction: kotlin.String? = null ) { + + + + init { + require(`value` != null) { "`value` must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var unit: kotlin.String? = null, - private var direction: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - - fun unit(unit: kotlin.String?) = apply { this.unit = unit } - - fun direction(direction: kotlin.String?) = apply { this.direction = direction } - - fun build(): CarsDistance { - val instance = - CarsDistance( - `value` = `value`!!, - unit = unit, - direction = direction - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsDistance) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var unit: kotlin.String? = null, + private var direction: kotlin.String? = null + ) { + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + fun unit(unit: kotlin.String?) = apply { this.unit = unit } + fun direction(direction: kotlin.String?) = apply { this.direction = direction } + + fun build(): CarsDistance { + val instance = CarsDistance( + `value` = `value`!!, + unit = unit, + direction = direction + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`!!, unit = unit, direction = direction - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt index be49f6442..5efa8c2fc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt @@ -15,108 +15,123 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsLocationOption + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for error list. - * @param code Error code describing the issue - * @param description A simple description of what the error is. - * @param detailCode Detailed error code describing the issue. - * @param locationKeyword The requested location that caused the error. - * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. + * @param code Error code describing the issue + * @param description A simple description of what the error is. + * @param detailCode Detailed error code describing the issue. + * @param locationKeyword The requested location that caused the error. + * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. */ data class CarsError( - // Error code describing the issue - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // A simple description of what the error is. - @JsonProperty("Description") - @field:NotNull - @field:Valid - val description: kotlin.String, - // Detailed error code describing the issue. - @JsonProperty("DetailCode") - @field:Valid - val detailCode: kotlin.String? = null, - // The requested location that caused the error. - @JsonProperty("LocationKeyword") - @field:Valid - val locationKeyword: kotlin.String? = null, - // List for possible locations from which the customer must choose the best one to be re-submitted in the request. - @JsonProperty("LocationOptions") - @field:Valid - val locationOptions: kotlin.collections.List? = null + /* Error code describing the issue */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* A simple description of what the error is. */ +@JsonProperty("Description") +val description: + kotlin.String +, + + /* Detailed error code describing the issue. */ +@JsonProperty("DetailCode") +val detailCode: kotlin.String? = null, + + /* The requested location that caused the error. */ +@JsonProperty("LocationKeyword") +val locationKeyword: kotlin.String? = null, + + /* List for possible locations from which the customer must choose the best one to be re-submitted in the request. */ +@JsonProperty("LocationOptions") +val locationOptions: kotlin.collections.List? = null ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(description != null) { "description must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var detailCode: kotlin.String? = null, - private var locationKeyword: kotlin.String? = null, - private var locationOptions: kotlin.collections.List? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun description(description: kotlin.String) = apply { this.description = description } - - fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } - - fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } - - fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } - - fun build(): CarsError { - val instance = - CarsError( - code = code!!, - description = description!!, - detailCode = detailCode, - locationKeyword = locationKeyword, - locationOptions = locationOptions - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsError) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var detailCode: kotlin.String? = null, + private var locationKeyword: kotlin.String? = null, + private var locationOptions: kotlin.collections.List? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun description(description: kotlin.String) = apply { this.description = description } + fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } + fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } + fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } + + fun build(): CarsError { + val instance = CarsError( + code = code!!, + description = description!!, + detailCode = detailCode, + locationKeyword = locationKeyword, + locationOptions = locationOptions + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, description = description!!, detailCode = detailCode, locationKeyword = locationKeyword, locationOptions = locationOptions - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt index db5ab1317..b17a60ab0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt @@ -15,81 +15,80 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsError + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class CarsErrors( - // Container for error list. - @JsonProperty("Errors") - @field:NotNull - @field:Valid - val errors: kotlin.collections - .List< - CarsError - >, - // A unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:NotNull - @field:Valid - val transactionId: kotlin.String + /* Container for error list. */ +@JsonProperty("Errors") +val errors: + kotlin.collections. + List +< + CarsError +> + +, + + /* A unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: + kotlin.String + ) { + + + + init { + require(errors != null) { "errors must not be null" } + + + + + + + + require(transactionId != null) { "transactionId must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - - fun build(): CarsErrors { - val instance = - CarsErrors( - errors = errors!!, - transactionId = transactionId!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsErrors) { - 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}" } - ) - } - } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null + ) { + fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + + fun build(): CarsErrors { + val instance = CarsErrors( + errors = errors!!, + transactionId = transactionId!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( errors = errors!!, transactionId = transactionId!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt index ef731156e..f2efd9feb 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt @@ -15,86 +15,89 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for Geo location. - * @param latitude Latitude of the location. - * @param longitude Longitude of the location. - * @param obfuscated + * @param latitude Latitude of the location. + * @param longitude Longitude of the location. + * @param obfuscated */ data class CarsGeoLocation( - // Latitude of the location. - @JsonProperty("Latitude") - @field:NotNull - @field:Valid - val latitude: kotlin.String, - // Longitude of the location. - @JsonProperty("Longitude") - @field:NotNull - @field:Valid - val longitude: kotlin.String, - @JsonProperty("Obfuscated") - @field:Valid - val obfuscated: kotlin.Boolean? = null + /* Latitude of the location. */ +@JsonProperty("Latitude") +val latitude: + kotlin.String +, + + /* Longitude of the location. */ +@JsonProperty("Longitude") +val longitude: + kotlin.String +, + + @JsonProperty("Obfuscated") +val obfuscated: kotlin.Boolean? = null ) { + + + + init { + require(latitude != null) { "latitude must not be null" } + + + + + + + + require(longitude != null) { "longitude must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String) = apply { this.latitude = latitude } - - fun longitude(longitude: kotlin.String) = apply { this.longitude = longitude } - - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } - - fun build(): CarsGeoLocation { - val instance = - CarsGeoLocation( - latitude = latitude!!, - longitude = longitude!!, - obfuscated = obfuscated - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsGeoLocation) { - 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}" } - ) - } - } + class Builder( + private var latitude: kotlin.String? = null, + private var longitude: kotlin.String? = null, + private var obfuscated: kotlin.Boolean? = null + ) { + fun latitude(latitude: kotlin.String) = apply { this.latitude = latitude } + fun longitude(longitude: kotlin.String) = apply { this.longitude = longitude } + fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + + fun build(): CarsGeoLocation { + val instance = CarsGeoLocation( + latitude = latitude!!, + longitude = longitude!!, + obfuscated = obfuscated + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( latitude = latitude!!, longitude = longitude!!, obfuscated = obfuscated - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt index d995ff9c5..484d1b6db 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt @@ -15,86 +15,87 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * A map of links to other Car APIs. possible link name: ApiBooking - * @param href HATEOAS URL to fetch details. - * @param accept Accept header. - * @param method HTTP method to connect. + * @param href HATEOAS URL to fetch details. + * @param accept Accept header. + * @param method HTTP method to connect. */ data class CarsLink( - // HATEOAS URL to fetch details. - @JsonProperty("Href") - @field:NotNull - @field:Valid - val href: kotlin.String, - // Accept header. - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // HTTP method to connect. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null + /* HATEOAS URL to fetch details. */ +@JsonProperty("Href") +val href: + kotlin.String +, + + /* Accept header. */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* HTTP method to connect. */ +@JsonProperty("Method") +val method: kotlin.String? = null ) { + + + + init { + require(href != null) { "href must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var href: kotlin.String? = null, - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null - ) { - fun href(href: kotlin.String) = apply { this.href = href } - - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun build(): CarsLink { - val instance = - CarsLink( - href = href!!, - accept = accept, - method = method - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsLink) { - 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}" } - ) - } - } + class Builder( + private var href: kotlin.String? = null, + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null + ) { + fun href(href: kotlin.String) = apply { this.href = href } + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + + fun build(): CarsLink { + val instance = CarsLink( + href = href!!, + accept = accept, + method = method + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( href = href!!, accept = accept, method = method - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt index 4a650f935..631b16f5d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt @@ -15,154 +15,204 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsAddress import com.expediagroup.sdk.xap.models.CarsCountry import com.expediagroup.sdk.xap.models.CarsGeoLocation import com.expediagroup.sdk.xap.models.CarsNeighborhood + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for list of possible locations that could be used to disambiguate the query. - * @param locationId Location id. - * @param type The type of location code (MULTICITY | METROCODE). - * @param id Expedia Region ID of the specified airport. - * @param name Location Name - * @param code Location Code - * @param address - * @param pointOfInterest - * @param geoLocation - * @param neighborhood - * @param regionId RegionId the location resides in. - * @param country + * @param locationId Location id. + * @param type The type of location code (MULTICITY | METROCODE). + * @param id Expedia Region ID of the specified airport. + * @param name Location Name + * @param code Location Code + * @param address + * @param pointOfInterest + * @param geoLocation + * @param neighborhood + * @param regionId RegionId the location resides in. + * @param country */ data class CarsLocation( - // Location id. - @JsonProperty("LocationId") - @field:NotNull - @field:Valid - val locationId: kotlin.String, - // The type of location code (MULTICITY | METROCODE). - @JsonProperty("Type") - @field:Valid - val type: kotlin.String? = null, - // Expedia Region ID of the specified airport. - @JsonProperty("Id") - @field:Valid - val id: kotlin.String? = null, - // Location Name - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null, - // Location Code - @JsonProperty("Code") - @field:Valid - val code: kotlin.String? = null, - @JsonProperty("Address") - @field:Valid - val address: CarsAddress? = null, - @JsonProperty("PointOfInterest") - @field:Valid - val pointOfInterest: kotlin.String? = null, - @JsonProperty("GeoLocation") - @field:Valid - val geoLocation: CarsGeoLocation? = null, - @JsonProperty("Neighborhood") - @field:Valid - val neighborhood: CarsNeighborhood? = null, - // RegionId the location resides in. - @JsonProperty("RegionId") - val regionId: kotlin.Long? = null, - @JsonProperty("Country") - @field:Valid - val country: CarsCountry? = null + /* Location id. */ +@JsonProperty("LocationId") +val locationId: + kotlin.String +, + + /* The type of location code (MULTICITY | METROCODE). */ +@JsonProperty("Type") +val type: kotlin.String? = null, + + /* Expedia Region ID of the specified airport. */ +@JsonProperty("Id") +val id: kotlin.String? = null, + + /* Location Name */ +@JsonProperty("Name") +val name: kotlin.String? = null, + + /* Location Code */ +@JsonProperty("Code") +val code: kotlin.String? = null, + + @JsonProperty("Address") +val address: CarsAddress? = null, + + @JsonProperty("PointOfInterest") +val pointOfInterest: kotlin.String? = null, + + @JsonProperty("GeoLocation") +val geoLocation: CarsGeoLocation? = null, + + @JsonProperty("Neighborhood") +val neighborhood: CarsNeighborhood? = null, + + /* RegionId the location resides in. */ +@JsonProperty("RegionId") +val regionId: kotlin.Long? = null, + + @JsonProperty("Country") +val country: CarsCountry? = null ) { + + + + init { + require(locationId != null) { "locationId must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var locationId: kotlin.String? = null, - private var type: kotlin.String? = null, - private var id: kotlin.String? = null, - private var name: kotlin.String? = null, - private var code: kotlin.String? = null, - private var address: CarsAddress? = null, - private var pointOfInterest: kotlin.String? = null, - private var geoLocation: CarsGeoLocation? = null, - private var neighborhood: CarsNeighborhood? = null, - private var regionId: kotlin.Long? = null, - private var country: CarsCountry? = null - ) { - fun locationId(locationId: kotlin.String) = apply { this.locationId = locationId } - - fun type(type: kotlin.String?) = apply { this.type = type } - - fun id(id: kotlin.String?) = apply { this.id = id } - - fun name(name: kotlin.String?) = apply { this.name = name } - - fun code(code: kotlin.String?) = apply { this.code = code } - - fun address(address: CarsAddress?) = apply { this.address = address } - - fun pointOfInterest(pointOfInterest: kotlin.String?) = apply { this.pointOfInterest = pointOfInterest } - - fun geoLocation(geoLocation: CarsGeoLocation?) = apply { this.geoLocation = geoLocation } - - fun neighborhood(neighborhood: CarsNeighborhood?) = apply { this.neighborhood = neighborhood } - - fun regionId(regionId: kotlin.Long?) = apply { this.regionId = regionId } - - fun country(country: CarsCountry?) = apply { this.country = country } - - fun build(): CarsLocation { - val instance = - CarsLocation( - locationId = locationId!!, - type = type, - id = id, - name = name, - code = code, - address = address, - pointOfInterest = pointOfInterest, - geoLocation = geoLocation, - neighborhood = neighborhood, - regionId = regionId, - country = country - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsLocation) { - 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}" } - ) - } - } + class Builder( + private var locationId: kotlin.String? = null, + private var type: kotlin.String? = null, + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + private var code: kotlin.String? = null, + private var address: CarsAddress? = null, + private var pointOfInterest: kotlin.String? = null, + private var geoLocation: CarsGeoLocation? = null, + private var neighborhood: CarsNeighborhood? = null, + private var regionId: kotlin.Long? = null, + private var country: CarsCountry? = null + ) { + fun locationId(locationId: kotlin.String) = apply { this.locationId = locationId } + fun type(type: kotlin.String?) = apply { this.type = type } + fun id(id: kotlin.String?) = apply { this.id = id } + fun name(name: kotlin.String?) = apply { this.name = name } + fun code(code: kotlin.String?) = apply { this.code = code } + fun address(address: CarsAddress?) = apply { this.address = address } + fun pointOfInterest(pointOfInterest: kotlin.String?) = apply { this.pointOfInterest = pointOfInterest } + fun geoLocation(geoLocation: CarsGeoLocation?) = apply { this.geoLocation = geoLocation } + fun neighborhood(neighborhood: CarsNeighborhood?) = apply { this.neighborhood = neighborhood } + fun regionId(regionId: kotlin.Long?) = apply { this.regionId = regionId } + fun country(country: CarsCountry?) = apply { this.country = country } + + fun build(): CarsLocation { + val instance = CarsLocation( + locationId = locationId!!, + type = type, + id = id, + name = name, + code = code, + address = address, + pointOfInterest = pointOfInterest, + geoLocation = geoLocation, + neighborhood = neighborhood, + regionId = regionId, + country = country + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( locationId = locationId!!, type = type, id = id, @@ -174,5 +224,5 @@ data class CarsLocation( neighborhood = neighborhood, regionId = regionId, country = country - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt index d0a2b672c..6d21d0c2d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt @@ -15,143 +15,184 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsCountry import com.expediagroup.sdk.xap.models.CarsGeoLocation import com.expediagroup.sdk.xap.models.CarsLocation + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* List for possible locations from which the customer must choose the best one to be re-submitted in the request. - * @param requestedLocation Location used in partner request. - * @param locations Container for list of possible locations that could be used to disambiguate the query. - * @param type Type of the location. - * @param regionId RegionId the location resides in. - * @param shortName The name of the location which matches the location keyword. - * @param airportCode Indicates the nearest major airport to the location. - * @param address The address of the location. - * @param country - * @param geoLocation +* List for possible locations from which the customer must choose the best one to be re-submitted in the request. + * @param requestedLocation Location used in partner request. + * @param locations Container for list of possible locations that could be used to disambiguate the query. + * @param type Type of the location. + * @param regionId RegionId the location resides in. + * @param shortName The name of the location which matches the location keyword. + * @param airportCode Indicates the nearest major airport to the location. + * @param address The address of the location. + * @param country + * @param geoLocation */ data class CarsLocationOption( - // Location used in partner request. - @JsonProperty("RequestedLocation") - @field:NotNull - @field:Valid - val requestedLocation: kotlin.String, - // Container for list of possible locations that could be used to disambiguate the query. - @JsonProperty("Locations") - @field:NotNull - @field:Valid - val locations: kotlin.collections - .List< - CarsLocation - >, - // Type of the location. - @JsonProperty("Type") - @field:Valid - val type: kotlin.String? = null, - // RegionId the location resides in. - @JsonProperty("RegionId") - @field:Valid - val regionId: kotlin.String? = null, - // The name of the location which matches the location keyword. - @JsonProperty("ShortName") - @field:Valid - val shortName: kotlin.String? = null, - // Indicates the nearest major airport to the location. - @JsonProperty("AirportCode") - @field:Valid - val airportCode: kotlin.String? = null, - // The address of the location. - @JsonProperty("Address") - @field:Valid - val address: kotlin.String? = null, - @JsonProperty("Country") - @field:Valid - val country: CarsCountry? = null, - @JsonProperty("GeoLocation") - @field:Valid - val geoLocation: CarsGeoLocation? = null + /* Location used in partner request. */ +@JsonProperty("RequestedLocation") +val requestedLocation: + kotlin.String +, + + /* Container for list of possible locations that could be used to disambiguate the query. */ +@JsonProperty("Locations") +val locations: + kotlin.collections. + List +< + CarsLocation +> + +, + + /* Type of the location. */ +@JsonProperty("Type") +val type: kotlin.String? = null, + + /* RegionId the location resides in. */ +@JsonProperty("RegionId") +val regionId: kotlin.String? = null, + + /* The name of the location which matches the location keyword. */ +@JsonProperty("ShortName") +val shortName: kotlin.String? = null, + + /* Indicates the nearest major airport to the location. */ +@JsonProperty("AirportCode") +val airportCode: kotlin.String? = null, + + /* The address of the location. */ +@JsonProperty("Address") +val address: kotlin.String? = null, + + @JsonProperty("Country") +val country: CarsCountry? = null, + + @JsonProperty("GeoLocation") +val geoLocation: CarsGeoLocation? = null ) { + + + + init { + require(requestedLocation != null) { "requestedLocation must not be null" } + + + + + + + + require(locations != null) { "locations must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var requestedLocation: kotlin.String? = null, - private var locations: kotlin.collections.List? = null, - private var type: kotlin.String? = null, - private var regionId: kotlin.String? = null, - private var shortName: kotlin.String? = null, - private var airportCode: kotlin.String? = null, - private var address: kotlin.String? = null, - private var country: CarsCountry? = null, - private var geoLocation: CarsGeoLocation? = null - ) { - fun requestedLocation(requestedLocation: kotlin.String) = apply { this.requestedLocation = requestedLocation } - - fun locations(locations: kotlin.collections.List) = apply { this.locations = locations } - - fun type(type: kotlin.String?) = apply { this.type = type } - - fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } - - fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } - - fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } - - fun address(address: kotlin.String?) = apply { this.address = address } - - fun country(country: CarsCountry?) = apply { this.country = country } - - fun geoLocation(geoLocation: CarsGeoLocation?) = apply { this.geoLocation = geoLocation } - - fun build(): CarsLocationOption { - val instance = - CarsLocationOption( - requestedLocation = requestedLocation!!, - locations = locations!!, - type = type, - regionId = regionId, - shortName = shortName, - airportCode = airportCode, - address = address, - country = country, - geoLocation = geoLocation - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsLocationOption) { - 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}" } - ) - } - } + class Builder( + private var requestedLocation: kotlin.String? = null, + private var locations: kotlin.collections.List? = null, + private var type: kotlin.String? = null, + private var regionId: kotlin.String? = null, + private var shortName: kotlin.String? = null, + private var airportCode: kotlin.String? = null, + private var address: kotlin.String? = null, + private var country: CarsCountry? = null, + private var geoLocation: CarsGeoLocation? = null + ) { + fun requestedLocation(requestedLocation: kotlin.String) = apply { this.requestedLocation = requestedLocation } + fun locations(locations: kotlin.collections.List) = apply { this.locations = locations } + fun type(type: kotlin.String?) = apply { this.type = type } + fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } + fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } + fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } + fun address(address: kotlin.String?) = apply { this.address = address } + fun country(country: CarsCountry?) = apply { this.country = country } + fun geoLocation(geoLocation: CarsGeoLocation?) = apply { this.geoLocation = geoLocation } + + fun build(): CarsLocationOption { + val instance = CarsLocationOption( + requestedLocation = requestedLocation!!, + locations = locations!!, + type = type, + regionId = regionId, + shortName = shortName, + airportCode = airportCode, + address = address, + country = country, + geoLocation = geoLocation + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( requestedLocation = requestedLocation!!, locations = locations!!, type = type, @@ -161,5 +202,5 @@ data class CarsLocationOption( address = address, country = country, geoLocation = geoLocation - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt index 876fa4da5..17ab21816 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt @@ -15,86 +15,89 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Price of Special equipment. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class CarsMoney( - // The value of the element being defined. - @JsonProperty("Value") - @field:NotNull - @field:Valid - val `value`: kotlin.String, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:NotNull - @field:Valid - val currency: kotlin.String, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: CarsMoney? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: + kotlin.String +, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: + kotlin.String +, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: CarsMoney? = null ) { + + + + init { + require(`value` != null) { "`value` must not be null" } + + + + + + + + require(currency != null) { "currency must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: CarsMoney? = null - ) { - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: CarsMoney?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): CarsMoney { - val instance = - CarsMoney( - `value` = `value`!!, - currency = currency!!, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsMoney) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: CarsMoney? = null + ) { + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: CarsMoney?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): CarsMoney { + val instance = CarsMoney( + `value` = `value`!!, + currency = currency!!, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`!!, currency = currency!!, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt index 2f238b959..72e6cd543 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. - * @param id Neighborhood id. - * @param name Neighborhood name. + * @param id Neighborhood id. + * @param name Neighborhood name. */ data class CarsNeighborhood( - // Neighborhood id. - @JsonProperty("Id") - @field:NotNull - @field:Valid - val id: kotlin.String, - // Neighborhood name. - @JsonProperty("Name") - @field:NotNull - @field:Valid - val name: kotlin.String + /* Neighborhood id. */ +@JsonProperty("Id") +val id: + kotlin.String +, + + /* Neighborhood name. */ +@JsonProperty("Name") +val name: + kotlin.String + ) { + + + + init { + require(id != null) { "id must not be null" } + + + + + + + + require(name != null) { "name must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.String) = apply { this.id = id } - - fun name(name: kotlin.String) = apply { this.name = name } - - fun build(): CarsNeighborhood { - val instance = - CarsNeighborhood( - id = id!!, - name = name!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsNeighborhood) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null + ) { + fun id(id: kotlin.String) = apply { this.id = id } + fun name(name: kotlin.String) = apply { this.name = name } + + fun build(): CarsNeighborhood { + val instance = CarsNeighborhood( + id = id!!, + name = name!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id!!, name = name!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt index bd915a756..5c3af3110 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt @@ -15,88 +15,93 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of all the forms of payment that will be accepted for the booking of this rental transaction. - * @param paymentMethod Method of payment - * @param paymentSubMethod Sub method of payment - * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. + * @param paymentMethod Method of payment + * @param paymentSubMethod Sub method of payment + * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. */ data class CarsValidFormsOfPayment( - // Method of payment - @JsonProperty("PaymentMethod") - @field:NotNull - @field:Valid - val paymentMethod: kotlin.String, - // Sub method of payment - @JsonProperty("PaymentSubMethod") - @field:NotNull - @field:Valid - val paymentSubMethod: kotlin.String, - // The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. - @JsonProperty("BrandName") - @field:NotNull - @field:Valid - val brandName: kotlin.String + /* Method of payment */ +@JsonProperty("PaymentMethod") +val paymentMethod: + kotlin.String +, + + /* Sub method of payment */ +@JsonProperty("PaymentSubMethod") +val paymentSubMethod: + kotlin.String +, + + /* The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. */ +@JsonProperty("BrandName") +val brandName: + kotlin.String + ) { + + + + init { + require(paymentMethod != null) { "paymentMethod must not be null" } + + + + + + + + require(paymentSubMethod != null) { "paymentSubMethod must not be null" } + + + + + + + + require(brandName != null) { "brandName must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var paymentMethod: kotlin.String? = null, - private var paymentSubMethod: kotlin.String? = null, - private var brandName: kotlin.String? = null - ) { - fun paymentMethod(paymentMethod: kotlin.String) = apply { this.paymentMethod = paymentMethod } - - fun paymentSubMethod(paymentSubMethod: kotlin.String) = apply { this.paymentSubMethod = paymentSubMethod } - - fun brandName(brandName: kotlin.String) = apply { this.brandName = brandName } - - fun build(): CarsValidFormsOfPayment { - val instance = - CarsValidFormsOfPayment( - paymentMethod = paymentMethod!!, - paymentSubMethod = paymentSubMethod!!, - brandName = brandName!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsValidFormsOfPayment) { - 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}" } - ) - } - } + class Builder( + private var paymentMethod: kotlin.String? = null, + private var paymentSubMethod: kotlin.String? = null, + private var brandName: kotlin.String? = null + ) { + fun paymentMethod(paymentMethod: kotlin.String) = apply { this.paymentMethod = paymentMethod } + fun paymentSubMethod(paymentSubMethod: kotlin.String) = apply { this.paymentSubMethod = paymentSubMethod } + fun brandName(brandName: kotlin.String) = apply { this.brandName = brandName } + + fun build(): CarsValidFormsOfPayment { + val instance = CarsValidFormsOfPayment( + paymentMethod = paymentMethod!!, + paymentSubMethod = paymentSubMethod!!, + brandName = brandName!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( paymentMethod = paymentMethod!!, paymentSubMethod = paymentSubMethod!!, brandName = brandName!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt index b75276e91..fb1ac693a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt @@ -15,119 +15,146 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsLink import com.expediagroup.sdk.xap.models.CarsMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for warning codes - * @param code Standardized warning code. - * @param description Standardized warning description message. - * @param originalPrice - * @param newPrice - * @param changedAmount - * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - * @param links + * @param code Standardized warning code. + * @param description Standardized warning description message. + * @param originalPrice + * @param newPrice + * @param changedAmount + * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. + * @param links */ data class CarsWarning( - // Standardized warning code. - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // Standardized warning description message. - @JsonProperty("Description") - @field:NotNull - @field:Valid - val description: kotlin.String, - @JsonProperty("OriginalPrice") - @field:Valid - val originalPrice: CarsMoney? = null, - @JsonProperty("NewPrice") - @field:Valid - val newPrice: CarsMoney? = null, - @JsonProperty("ChangedAmount") - @field:Valid - val changedAmount: CarsMoney? = null, - // The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - @JsonProperty("ChangedPercentage") - @field:Valid - val changedPercentage: kotlin.String? = null, - @JsonProperty("Links") - @field:Valid - val links: kotlin.collections.Map? = null + /* Standardized warning code. */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* Standardized warning description message. */ +@JsonProperty("Description") +val description: + kotlin.String +, + + @JsonProperty("OriginalPrice") +val originalPrice: CarsMoney? = null, + + @JsonProperty("NewPrice") +val newPrice: CarsMoney? = null, + + @JsonProperty("ChangedAmount") +val changedAmount: CarsMoney? = null, + + /* The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ +@JsonProperty("ChangedPercentage") +val changedPercentage: kotlin.String? = null, + + @JsonProperty("Links") +val links: kotlin.collections.Map? = null ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(description != null) { "description must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var originalPrice: CarsMoney? = null, - private var newPrice: CarsMoney? = null, - private var changedAmount: CarsMoney? = null, - private var changedPercentage: kotlin.String? = null, - private var links: kotlin.collections.Map? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun description(description: kotlin.String) = apply { this.description = description } - - fun originalPrice(originalPrice: CarsMoney?) = apply { this.originalPrice = originalPrice } - - fun newPrice(newPrice: CarsMoney?) = apply { this.newPrice = newPrice } - - fun changedAmount(changedAmount: CarsMoney?) = apply { this.changedAmount = changedAmount } - - fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } - - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun build(): CarsWarning { - val instance = - CarsWarning( - code = code!!, - description = description!!, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount, - changedPercentage = changedPercentage, - links = links - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CarsWarning) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var originalPrice: CarsMoney? = null, + private var newPrice: CarsMoney? = null, + private var changedAmount: CarsMoney? = null, + private var changedPercentage: kotlin.String? = null, + private var links: kotlin.collections.Map? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun description(description: kotlin.String) = apply { this.description = description } + fun originalPrice(originalPrice: CarsMoney?) = apply { this.originalPrice = originalPrice } + fun newPrice(newPrice: CarsMoney?) = apply { this.newPrice = newPrice } + fun changedAmount(changedAmount: CarsMoney?) = apply { this.changedAmount = changedAmount } + fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + + fun build(): CarsWarning { + val instance = CarsWarning( + code = code!!, + description = description!!, + originalPrice = originalPrice, + newPrice = newPrice, + changedAmount = changedAmount, + changedPercentage = changedPercentage, + links = links + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, description = description!!, originalPrice = originalPrice, @@ -135,5 +162,5 @@ data class CarsWarning( changedAmount = changedAmount, changedPercentage = changedPercentage, links = links - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt index 04f9edc7f..58359807b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt @@ -15,106 +15,127 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for a breakdown of how many of each type of Activity have been returned in the API response. - * @param count The count of the number of categories the returned set of activities map to. - * @param groupName The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration - * @param groupDisplayName The localized value for category name. - * @param categoryName The name of one of the categories. - * @param categoryDisplayName + * @param count The count of the number of categories the returned set of activities map to. + * @param groupName The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration + * @param groupDisplayName The localized value for category name. + * @param categoryName The name of one of the categories. + * @param categoryDisplayName */ data class CategoryGroup( - // The count of the number of categories the returned set of activities map to. - @JsonProperty("Count") - val count: kotlin.Int, - // The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration - @JsonProperty("GroupName") - @field:NotNull - @field:Valid - val groupName: kotlin.String, - // The localized value for category name. - @JsonProperty("GroupDisplayName") - @field:NotNull - @field:Valid - val groupDisplayName: kotlin.String, - // The name of one of the categories. - @JsonProperty("CategoryName") - @field:NotNull - @field:Valid - val categoryName: kotlin.String, - @JsonProperty("CategoryDisplayName") - @field:Valid - val categoryDisplayName: kotlin.String? = null + /* The count of the number of categories the returned set of activities map to. */ +@JsonProperty("Count") +val count: + kotlin.Int +, + + /* The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration */ +@JsonProperty("GroupName") +val groupName: + kotlin.String +, + + /* The localized value for category name. */ +@JsonProperty("GroupDisplayName") +val groupDisplayName: + kotlin.String +, + + /* The name of one of the categories. */ +@JsonProperty("CategoryName") +val categoryName: + kotlin.String +, + + @JsonProperty("CategoryDisplayName") +val categoryDisplayName: kotlin.String? = null ) { + + + + init { + require(count != null) { "count must not be null" } + + + + + + + + require(groupName != null) { "groupName must not be null" } + + + + + + + + require(groupDisplayName != null) { "groupDisplayName must not be null" } + + + + + + + + require(categoryName != null) { "categoryName must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var count: kotlin.Int? = null, - private var groupName: kotlin.String? = null, - private var groupDisplayName: kotlin.String? = null, - private var categoryName: kotlin.String? = null, - private var categoryDisplayName: kotlin.String? = null - ) { - fun count(count: kotlin.Int) = apply { this.count = count } - - fun groupName(groupName: kotlin.String) = apply { this.groupName = groupName } - - fun groupDisplayName(groupDisplayName: kotlin.String) = apply { this.groupDisplayName = groupDisplayName } - - fun categoryName(categoryName: kotlin.String) = apply { this.categoryName = categoryName } - - fun categoryDisplayName(categoryDisplayName: kotlin.String?) = apply { this.categoryDisplayName = categoryDisplayName } - - fun build(): CategoryGroup { - val instance = - CategoryGroup( - count = count!!, - groupName = groupName!!, - groupDisplayName = groupDisplayName!!, - categoryName = categoryName!!, - categoryDisplayName = categoryDisplayName - ) - - validate(instance) - - return instance - } - - private fun validate(instance: CategoryGroup) { - 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}" } - ) - } - } + class Builder( + private var count: kotlin.Int? = null, + private var groupName: kotlin.String? = null, + private var groupDisplayName: kotlin.String? = null, + private var categoryName: kotlin.String? = null, + private var categoryDisplayName: kotlin.String? = null + ) { + fun count(count: kotlin.Int) = apply { this.count = count } + fun groupName(groupName: kotlin.String) = apply { this.groupName = groupName } + fun groupDisplayName(groupDisplayName: kotlin.String) = apply { this.groupDisplayName = groupDisplayName } + fun categoryName(categoryName: kotlin.String) = apply { this.categoryName = categoryName } + fun categoryDisplayName(categoryDisplayName: kotlin.String?) = apply { this.categoryDisplayName = categoryDisplayName } + + fun build(): CategoryGroup { + val instance = CategoryGroup( + count = count!!, + groupName = groupName!!, + groupDisplayName = groupDisplayName!!, + categoryName = categoryName!!, + categoryDisplayName = categoryDisplayName + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( count = count!!, groupName = groupName!!, groupDisplayName = groupDisplayName!!, categoryName = categoryName!!, categoryDisplayName = categoryDisplayName - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt index a44620cc4..93a6da9a5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt @@ -15,92 +15,100 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* The chain and brand information of hotel. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param chainId The chain id. - * @param chainName The name of the chain. - * @param brandId The brand id. - * @param brandName The name of the brand. +* The chain and brand information of hotel. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + * @param chainId The chain id. + * @param chainName The name of the chain. + * @param brandId The brand id. + * @param brandName The name of the brand. */ data class ChainAndBrandInfo( - // The chain id. - @JsonProperty("ChainId") - val chainId: kotlin.Int? = null, - // The name of the chain. - @JsonProperty("ChainName") - @field:Valid - val chainName: kotlin.String? = null, - // The brand id. - @JsonProperty("BrandId") - val brandId: kotlin.Int? = null, - // The name of the brand. - @JsonProperty("BrandName") - @field:Valid - val brandName: kotlin.String? = null + /* The chain id. */ +@JsonProperty("ChainId") +val chainId: kotlin.Int? = null, + + /* The name of the chain. */ +@JsonProperty("ChainName") +val chainName: kotlin.String? = null, + + /* The brand id. */ +@JsonProperty("BrandId") +val brandId: kotlin.Int? = null, + + /* The name of the brand. */ +@JsonProperty("BrandName") +val brandName: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var chainId: kotlin.Int? = null, - private var chainName: kotlin.String? = null, - private var brandId: kotlin.Int? = null, - private var brandName: kotlin.String? = null - ) { - fun chainId(chainId: kotlin.Int?) = apply { this.chainId = chainId } - - fun chainName(chainName: kotlin.String?) = apply { this.chainName = chainName } - - fun brandId(brandId: kotlin.Int?) = apply { this.brandId = brandId } - - fun brandName(brandName: kotlin.String?) = apply { this.brandName = brandName } - - fun build(): ChainAndBrandInfo { - val instance = - ChainAndBrandInfo( - chainId = chainId, - chainName = chainName, - brandId = brandId, - brandName = brandName - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ChainAndBrandInfo) { - 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}" } - ) - } - } + class Builder( + private var chainId: kotlin.Int? = null, + private var chainName: kotlin.String? = null, + private var brandId: kotlin.Int? = null, + private var brandName: kotlin.String? = null + ) { + fun chainId(chainId: kotlin.Int?) = apply { this.chainId = chainId } + fun chainName(chainName: kotlin.String?) = apply { this.chainName = chainName } + fun brandId(brandId: kotlin.Int?) = apply { this.brandId = brandId } + fun brandName(brandName: kotlin.String?) = apply { this.brandName = brandName } + + fun build(): ChainAndBrandInfo { + val instance = ChainAndBrandInfo( + chainId = chainId, + chainName = chainName, + brandId = brandId, + brandName = brandName + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( chainId = chainId, chainName = chainName, brandId = brandId, brandName = brandName - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt index a358d2334..763ea35ed 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for disambiguation country information - * @param name country name - * @param isoCode2 2-letter code for the country - * @param isoCode3 3-letter code for the country + * @param name country name + * @param isoCode2 2-letter code for the country + * @param isoCode3 3-letter code for the country */ data class Country( - // country name - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null, - // 2-letter code for the country - @JsonProperty("IsoCode2") - @field:Valid - val isoCode2: kotlin.String? = null, - // 3-letter code for the country - @JsonProperty("IsoCode3") - @field:Valid - val isoCode3: kotlin.String? = null + /* country name */ +@JsonProperty("Name") +val name: kotlin.String? = null, + + /* 2-letter code for the country */ +@JsonProperty("IsoCode2") +val isoCode2: kotlin.String? = null, + + /* 3-letter code for the country */ +@JsonProperty("IsoCode3") +val isoCode3: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var isoCode2: kotlin.String? = null, - private var isoCode3: kotlin.String? = null - ) { - fun name(name: kotlin.String?) = apply { this.name = name } - - fun isoCode2(isoCode2: kotlin.String?) = apply { this.isoCode2 = isoCode2 } - - fun isoCode3(isoCode3: kotlin.String?) = apply { this.isoCode3 = isoCode3 } - - fun build(): Country { - val instance = - Country( - name = name, - isoCode2 = isoCode2, - isoCode3 = isoCode3 - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Country) { - 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}" } - ) - } - } + class Builder( + private var name: kotlin.String? = null, + private var isoCode2: kotlin.String? = null, + private var isoCode3: kotlin.String? = null + ) { + fun name(name: kotlin.String?) = apply { this.name = name } + fun isoCode2(isoCode2: kotlin.String?) = apply { this.isoCode2 = isoCode2 } + fun isoCode3(isoCode3: kotlin.String?) = apply { this.isoCode3 = isoCode3 } + + fun build(): Country { + val instance = Country( + name = name, + isoCode2 = isoCode2, + isoCode3 = isoCode3 + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( name = name, isoCode2 = isoCode2, isoCode3 = isoCode3 - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt index 8605a1bbc..644040188 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt @@ -15,71 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** * The actual date range for the shown availability. - * @param startDate The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. - * @param endDate The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. + * @param startDate The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. + * @param endDate The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. */ data class DateRange( - // The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. - @JsonProperty("StartDate") - val startDate: java.time.LocalDate? = null, - // The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. - @JsonProperty("EndDate") - val endDate: java.time.LocalDate? = null + /* The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. */ +@JsonProperty("StartDate") +val startDate: java.time.LocalDate? = null, + + /* The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. */ +@JsonProperty("EndDate") +val endDate: java.time.LocalDate? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null - ) { - fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - - fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } - - fun build(): DateRange { - val instance = - DateRange( - startDate = startDate, - endDate = endDate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: DateRange) { - 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}" } - ) - } - } + class Builder( + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null + ) { + fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } + fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } + + fun build(): DateRange { + val instance = DateRange( + startDate = startDate, + endDate = endDate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( startDate = startDate, endDate = endDate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt index 42113dc63..e5e19a59c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt @@ -15,77 +15,72 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsDateRange import com.expediagroup.sdk.xap.models.TimeRange + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * A List of date time periods to indicate the vendor business hours for the pickup time. - * @param dateRange - * @param timeRanges A list of time range to indicate the operation hours of the date range. + * @param dateRange + * @param timeRanges A list of time range to indicate the operation hours of the date range. */ data class DateTimePeriod( - @JsonProperty("DateRange") - @field:NotNull - @field:Valid - val dateRange: CarsDateRange, - // A list of time range to indicate the operation hours of the date range. - @JsonProperty("TimeRanges") - @field:Valid - val timeRanges: kotlin.collections.List? = null + @JsonProperty("DateRange") +val dateRange: + CarsDateRange +, + + /* A list of time range to indicate the operation hours of the date range. */ +@JsonProperty("TimeRanges") +val timeRanges: kotlin.collections.List? = null ) { + + + + init { + require(dateRange != null) { "dateRange must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var dateRange: CarsDateRange? = null, - private var timeRanges: kotlin.collections.List? = null - ) { - fun dateRange(dateRange: CarsDateRange) = apply { this.dateRange = dateRange } - - fun timeRanges(timeRanges: kotlin.collections.List?) = apply { this.timeRanges = timeRanges } - - fun build(): DateTimePeriod { - val instance = - DateTimePeriod( - dateRange = dateRange!!, - timeRanges = timeRanges - ) - - validate(instance) - - return instance - } - - private fun validate(instance: DateTimePeriod) { - 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}" } - ) - } - } + class Builder( + private var dateRange: CarsDateRange? = null, + private var timeRanges: kotlin.collections.List? = null + ) { + fun dateRange(dateRange: CarsDateRange) = apply { this.dateRange = dateRange } + fun timeRanges(timeRanges: kotlin.collections.List?) = apply { this.timeRanges = timeRanges } + + fun build(): DateTimePeriod { + val instance = DateTimePeriod( + dateRange = dateRange!!, + timeRanges = timeRanges + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( dateRange = dateRange!!, timeRanges = timeRanges - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt index f83001b5d..8b354cf60 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt @@ -15,82 +15,82 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Indicate whether it is deductible - * @param excessAmount - * @param liabilityAmount - * @param deductibleAmount + * @param excessAmount + * @param liabilityAmount + * @param deductibleAmount */ data class Deductible( - @JsonProperty("ExcessAmount") - @field:Valid - val excessAmount: CarsMoney? = null, - @JsonProperty("LiabilityAmount") - @field:Valid - val liabilityAmount: CarsMoney? = null, - @JsonProperty("DeductibleAmount") - @field:Valid - val deductibleAmount: CarsMoney? = null + @JsonProperty("ExcessAmount") +val excessAmount: CarsMoney? = null, + + @JsonProperty("LiabilityAmount") +val liabilityAmount: CarsMoney? = null, + + @JsonProperty("DeductibleAmount") +val deductibleAmount: CarsMoney? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var excessAmount: CarsMoney? = null, - private var liabilityAmount: CarsMoney? = null, - private var deductibleAmount: CarsMoney? = null - ) { - fun excessAmount(excessAmount: CarsMoney?) = apply { this.excessAmount = excessAmount } - - fun liabilityAmount(liabilityAmount: CarsMoney?) = apply { this.liabilityAmount = liabilityAmount } - - fun deductibleAmount(deductibleAmount: CarsMoney?) = apply { this.deductibleAmount = deductibleAmount } - - fun build(): Deductible { - val instance = - Deductible( - excessAmount = excessAmount, - liabilityAmount = liabilityAmount, - deductibleAmount = deductibleAmount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Deductible) { - 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}" } - ) - } - } + class Builder( + private var excessAmount: CarsMoney? = null, + private var liabilityAmount: CarsMoney? = null, + private var deductibleAmount: CarsMoney? = null + ) { + fun excessAmount(excessAmount: CarsMoney?) = apply { this.excessAmount = excessAmount } + fun liabilityAmount(liabilityAmount: CarsMoney?) = apply { this.liabilityAmount = liabilityAmount } + fun deductibleAmount(deductibleAmount: CarsMoney?) = apply { this.deductibleAmount = deductibleAmount } + + fun build(): Deductible { + val instance = Deductible( + excessAmount = excessAmount, + liabilityAmount = liabilityAmount, + deductibleAmount = deductibleAmount + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( excessAmount = excessAmount, liabilityAmount = liabilityAmount, deductibleAmount = deductibleAmount - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt index ab92bea6f..e886463f2 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt @@ -15,101 +15,102 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.When + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for deposit policy details - * @param type Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. - * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a deposit. - * @param `when` + * @param type Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. + * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a deposit. + * @param `when` */ data class DepositDetail( - // Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. - @JsonProperty("Type") - val type: DepositDetail.Type? = null, - // Value to indicate how many/much of the type listed above is going to be charged as a deposit. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - @JsonProperty("When") - @field:Valid - val `when`: When? = null + /* Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. */ +@JsonProperty("Type") +val type: DepositDetail.Type? = null, + + /* Value to indicate how many/much of the type listed above is going to be charged as a deposit. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + @JsonProperty("When") +val `when`: When? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() + + + + init { + + + + + + + + + + + + + + + + + + + + + + } - class Builder( - private var type: DepositDetail.Type? = null, - private var `value`: kotlin.String? = null, - private var `when`: When? = null - ) { - fun type(type: DepositDetail.Type?) = apply { this.type = type } - - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun `when`(`when`: When?) = apply { this.`when` = `when` } - - fun build(): DepositDetail { - val instance = - DepositDetail( - type = type, - `value` = `value`, - `when` = `when` - ) - - validate(instance) - - return instance - } - - private fun validate(instance: DepositDetail) { - 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}" } - ) - } - } + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var type: DepositDetail.Type? = null, + private var `value`: kotlin.String? = null, + private var `when`: When? = null + ) { + fun type(type: DepositDetail.Type?) = apply { this.type = type } + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun `when`(`when`: When?) = apply { this.`when` = `when` } + + fun build(): DepositDetail { + val instance = DepositDetail( type = type, `value` = `value`, `when` = `when` - ) + ) - /** - * Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. - * Values: PERCENT,NIGHT,AMOUNT,REMAINDER - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("PERCENT") - PERCENT("PERCENT"), - - @JsonProperty("NIGHT") - NIGHT("NIGHT"), - - @JsonProperty("AMOUNT") - AMOUNT("AMOUNT"), - - @JsonProperty("REMAINDER") - REMAINDER("REMAINDER") + return instance } + } + + fun toBuilder() = Builder( + type = type, + `value` = `value`, + `when` = `when` + ) + + /** + * Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. + * Values: PERCENT,NIGHT,AMOUNT,REMAINDER + */ + enum class Type(val value: kotlin.String) { + @JsonProperty("PERCENT") + PERCENT("PERCENT"), + + @JsonProperty("NIGHT") + NIGHT("NIGHT"), + + @JsonProperty("AMOUNT") + AMOUNT("AMOUNT"), + + @JsonProperty("REMAINDER") + REMAINDER("REMAINDER"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt index 20d70d2e0..ff040ff94 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.DepositDetail + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for deposit policy details - * @param description - * @param details Container for deposit policy details + * @param description + * @param details Container for deposit policy details */ data class DepositPolicy( - @JsonProperty("Description") - @field:Valid - val description: kotlin.collections.List? = null, - // Container for deposit policy details - @JsonProperty("Details") - @field:Valid - val details: kotlin.collections.List? = null + @JsonProperty("Description") +val description: kotlin.collections.List? = null, + + /* Container for deposit policy details */ +@JsonProperty("Details") +val details: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var description: kotlin.collections.List? = null, - private var details: kotlin.collections.List? = null - ) { - fun description(description: kotlin.collections.List?) = apply { this.description = description } - - fun details(details: kotlin.collections.List?) = apply { this.details = details } - - fun build(): DepositPolicy { - val instance = - DepositPolicy( - description = description, - details = details - ) - - validate(instance) - - return instance - } - - private fun validate(instance: DepositPolicy) { - 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}" } - ) - } - } + class Builder( + private var description: kotlin.collections.List? = null, + private var details: kotlin.collections.List? = null + ) { + fun description(description: kotlin.collections.List?) = apply { this.description = description } + fun details(details: kotlin.collections.List?) = apply { this.details = details } + + fun build(): DepositPolicy { + val instance = DepositPolicy( + description = description, + details = details + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( description = description, details = details - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt index a19bf1b85..9d3ca899c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for the descriptions of the property. - * @param locationTeaser A description of the property's location. - * @param hotelTeaser A description of the features and amenities of the property itself. - * @param roomTeaser The common description for all of the rooms in the property. + * @param locationTeaser A description of the property's location. + * @param hotelTeaser A description of the features and amenities of the property itself. + * @param roomTeaser The common description for all of the rooms in the property. */ data class Description( - // A description of the property's location. - @JsonProperty("LocationTeaser") - @field:Valid - val locationTeaser: kotlin.String? = null, - // A description of the features and amenities of the property itself. - @JsonProperty("HotelTeaser") - @field:Valid - val hotelTeaser: kotlin.String? = null, - // The common description for all of the rooms in the property. - @JsonProperty("RoomTeaser") - @field:Valid - val roomTeaser: kotlin.String? = null + /* A description of the property's location. */ +@JsonProperty("LocationTeaser") +val locationTeaser: kotlin.String? = null, + + /* A description of the features and amenities of the property itself. */ +@JsonProperty("HotelTeaser") +val hotelTeaser: kotlin.String? = null, + + /* The common description for all of the rooms in the property. */ +@JsonProperty("RoomTeaser") +val roomTeaser: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var locationTeaser: kotlin.String? = null, - private var hotelTeaser: kotlin.String? = null, - private var roomTeaser: kotlin.String? = null - ) { - fun locationTeaser(locationTeaser: kotlin.String?) = apply { this.locationTeaser = locationTeaser } - - fun hotelTeaser(hotelTeaser: kotlin.String?) = apply { this.hotelTeaser = hotelTeaser } - - fun roomTeaser(roomTeaser: kotlin.String?) = apply { this.roomTeaser = roomTeaser } - - fun build(): Description { - val instance = - Description( - locationTeaser = locationTeaser, - hotelTeaser = hotelTeaser, - roomTeaser = roomTeaser - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Description) { - 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}" } - ) - } - } + class Builder( + private var locationTeaser: kotlin.String? = null, + private var hotelTeaser: kotlin.String? = null, + private var roomTeaser: kotlin.String? = null + ) { + fun locationTeaser(locationTeaser: kotlin.String?) = apply { this.locationTeaser = locationTeaser } + fun hotelTeaser(hotelTeaser: kotlin.String?) = apply { this.hotelTeaser = hotelTeaser } + fun roomTeaser(roomTeaser: kotlin.String?) = apply { this.roomTeaser = roomTeaser } + + fun build(): Description { + val instance = Description( + locationTeaser = locationTeaser, + hotelTeaser = hotelTeaser, + roomTeaser = roomTeaser + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( locationTeaser = locationTeaser, hotelTeaser = hotelTeaser, roomTeaser = roomTeaser - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt index ac2742356..35295cec3 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt @@ -15,81 +15,80 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsError + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class DisambiguationResponse( - // Container for error list. - @JsonProperty("Errors") - @field:NotNull - @field:Valid - val errors: kotlin.collections - .List< - CarsError - >, - // A unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:NotNull - @field:Valid - val transactionId: kotlin.String + /* Container for error list. */ +@JsonProperty("Errors") +val errors: + kotlin.collections. + List +< + CarsError +> + +, + + /* A unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: + kotlin.String + ) { + + + + init { + require(errors != null) { "errors must not be null" } + + + + + + + + require(transactionId != null) { "transactionId must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - - fun build(): DisambiguationResponse { - val instance = - DisambiguationResponse( - errors = errors!!, - transactionId = transactionId!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: DisambiguationResponse) { - 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}" } - ) - } - } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null + ) { + fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + + fun build(): DisambiguationResponse { + val instance = DisambiguationResponse( + errors = errors!!, + transactionId = transactionId!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( errors = errors!!, transactionId = transactionId!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt index 35a636ec9..c9fdd4f52 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of discount information. - * @param type Discount type. Supported values : CorpDiscount | Coupon. - * @param code Discount code. + * @param type Discount type. Supported values : CorpDiscount | Coupon. + * @param code Discount code. */ data class Discount( - // Discount type. Supported values : CorpDiscount | Coupon. - @JsonProperty("Type") - @field:NotNull - @field:Valid - val type: kotlin.String, - // Discount code. - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String + /* Discount type. Supported values : CorpDiscount | Coupon. */ +@JsonProperty("Type") +val type: + kotlin.String +, + + /* Discount code. */ +@JsonProperty("Code") +val code: + kotlin.String + ) { + + + + init { + require(type != null) { "type must not be null" } + + + + + + + + require(code != null) { "code must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var code: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - - fun code(code: kotlin.String) = apply { this.code = code } - - fun build(): Discount { - val instance = - Discount( - type = type!!, - code = code!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Discount) { - 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}" } - ) - } - } + class Builder( + private var type: kotlin.String? = null, + private var code: kotlin.String? = null + ) { + fun type(type: kotlin.String) = apply { this.type = type } + fun code(code: kotlin.String) = apply { this.code = code } + + fun build(): Discount { + val instance = Discount( + type = type!!, + code = code!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( type = type!!, code = code!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt index f375189bf..aa2be3413 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt @@ -15,124 +15,126 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* Container for distance information. Only returned for city/address search or `geoLocation` search or single `regionId` search. - * @param `value` The distance between the center of the search and the hotel. - * @param unit The unit of distance. - * @param direction The direction to the hotel from the center point of the search. +* Container for distance information. Only returned for city/address search or `geoLocation` search or single `regionId` search. + * @param `value` The distance between the center of the search and the hotel. + * @param unit The unit of distance. + * @param direction The direction to the hotel from the center point of the search. */ data class Distance( - // The distance between the center of the search and the hotel. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The unit of distance. - @JsonProperty("Unit") - val unit: Distance.Unit? = null, - // The direction to the hotel from the center point of the search. - @JsonProperty("Direction") - val direction: Distance.Direction? = null + /* The distance between the center of the search and the hotel. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The unit of distance. */ +@JsonProperty("Unit") +val unit: Distance.Unit? = null, + + /* The direction to the hotel from the center point of the search. */ +@JsonProperty("Direction") +val direction: Distance.Direction? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() - } + + + + init { + + + + + + + + + - class Builder( - private var `value`: kotlin.String? = null, - private var unit: Distance.Unit? = null, - private var direction: Distance.Direction? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun unit(unit: Distance.Unit?) = apply { this.unit = unit } - - fun direction(direction: Distance.Direction?) = apply { this.direction = direction } - - fun build(): Distance { - val instance = - Distance( - `value` = `value`, - unit = unit, - direction = direction - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Distance) { - 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( - `value` = `value`, - unit = unit, - direction = direction - ) - - /** - * The unit of distance. - * Values: KM,MI - */ - enum class Unit(val value: kotlin.String) { - @JsonProperty("km") - KM("km"), - - @JsonProperty("mi") - MI("mi") - } - /** - * The direction to the hotel from the center point of the search. - * Values: N,S,W,E,NW,NE,SW,SE - */ - enum class Direction(val value: kotlin.String) { - @JsonProperty("N") - N("N"), - @JsonProperty("S") - S("S"), - @JsonProperty("W") - W("W"), - @JsonProperty("E") - E("E"), - @JsonProperty("NW") - NW("NW"), - @JsonProperty("NE") - NE("NE"), - @JsonProperty("SW") - SW("SW"), - @JsonProperty("SE") - SE("SE") + + + + } + + companion object { + @JvmStatic + fun builder() = Builder() + } + + class Builder( + private var `value`: kotlin.String? = null, + private var unit: Distance.Unit? = null, + private var direction: Distance.Direction? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun unit(unit: Distance.Unit?) = apply { this.unit = unit } + fun direction(direction: Distance.Direction?) = apply { this.direction = direction } + + fun build(): Distance { + val instance = Distance( + `value` = `value`, + unit = unit, + direction = direction + ) + + return instance + } } + + fun toBuilder() = Builder( + `value` = `value`, + unit = unit, + direction = direction + ) + + /** + * The unit of distance. + * Values: KM,MI + */ + enum class Unit(val value: kotlin.String) { + @JsonProperty("km") + KM("km"), + + @JsonProperty("mi") + MI("mi"); + } + + /** + * The direction to the hotel from the center point of the search. + * Values: N,S,W,E,NW,NE,SW,SE + */ + enum class Direction(val value: kotlin.String) { + @JsonProperty("N") + N("N"), + + @JsonProperty("S") + S("S"), + + @JsonProperty("W") + W("W"), + + @JsonProperty("E") + E("E"), + + @JsonProperty("NW") + NW("NW"), + + @JsonProperty("NE") + NE("NE"), + + @JsonProperty("SW") + SW("SW"), + + @JsonProperty("SE") + SE("SE"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt index 48c945f5e..e76ad2f8d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt @@ -15,75 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The maximum amount of time for a rental that still qualifies for this rate.This may or may not be the same as the current rental duration. - * @param unit The unit for minimum amount of time for a rental. - * @param count The minimum number of units that qualify for minimum amount of time for a rental. + * @param unit The unit for minimum amount of time for a rental. + * @param count The minimum number of units that qualify for minimum amount of time for a rental. */ data class Duration( - // The unit for minimum amount of time for a rental. - @JsonProperty("Unit") - @field:NotNull - @field:Valid - val unit: kotlin.String, - // The minimum number of units that qualify for minimum amount of time for a rental. - @JsonProperty("Count") - val count: kotlin.Long + /* The unit for minimum amount of time for a rental. */ +@JsonProperty("Unit") +val unit: + kotlin.String +, + + /* The minimum number of units that qualify for minimum amount of time for a rental. */ +@JsonProperty("Count") +val count: + kotlin.Long + ) { + + + + init { + require(unit != null) { "unit must not be null" } + + + + + + + + require(count != null) { "count must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var unit: kotlin.String? = null, - private var count: kotlin.Long? = null - ) { - fun unit(unit: kotlin.String) = apply { this.unit = unit } - - fun count(count: kotlin.Long) = apply { this.count = count } - - fun build(): Duration { - val instance = - Duration( - unit = unit!!, - count = count!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Duration) { - 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}" } - ) - } - } + class Builder( + private var unit: kotlin.String? = null, + private var count: kotlin.Long? = null + ) { + fun unit(unit: kotlin.String) = apply { this.unit = unit } + fun count(count: kotlin.Long) = apply { this.count = count } + + fun build(): Duration { + val instance = Duration( + unit = unit!!, + count = count!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( unit = unit!!, count = count!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt index 1d02d5049..d252b43df 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt @@ -15,97 +15,106 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Description and costs of any optional special equipment that may be rented with the car. - * @param code Special equipment code - * @param name Special equipment name - * @param ratePeriod Unit indicating the price of special equipment. Support value:Trip,Daily - * @param price + * @param code Special equipment code + * @param name Special equipment name + * @param ratePeriod Unit indicating the price of special equipment. Support value:Trip,Daily + * @param price */ data class Equipment( - // Special equipment code - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // Special equipment name - @JsonProperty("Name") - @field:NotNull - @field:Valid - val name: kotlin.String, - // Unit indicating the price of special equipment. Support value:Trip,Daily - @JsonProperty("RatePeriod") - @field:Valid - val ratePeriod: kotlin.String? = null, - @JsonProperty("Price") - @field:Valid - val price: CarsMoney? = null + /* Special equipment code */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* Special equipment name */ +@JsonProperty("Name") +val name: + kotlin.String +, + + /* Unit indicating the price of special equipment. Support value:Trip,Daily */ +@JsonProperty("RatePeriod") +val ratePeriod: kotlin.String? = null, + + @JsonProperty("Price") +val price: CarsMoney? = null ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(name != null) { "name must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var name: kotlin.String? = null, - private var ratePeriod: kotlin.String? = null, - private var price: CarsMoney? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun name(name: kotlin.String) = apply { this.name = name } - - fun ratePeriod(ratePeriod: kotlin.String?) = apply { this.ratePeriod = ratePeriod } - - fun price(price: CarsMoney?) = apply { this.price = price } - - fun build(): Equipment { - val instance = - Equipment( - code = code!!, - name = name!!, - ratePeriod = ratePeriod, - price = price - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Equipment) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var name: kotlin.String? = null, + private var ratePeriod: kotlin.String? = null, + private var price: CarsMoney? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun name(name: kotlin.String) = apply { this.name = name } + fun ratePeriod(ratePeriod: kotlin.String?) = apply { this.ratePeriod = ratePeriod } + fun price(price: CarsMoney?) = apply { this.price = price } + + fun build(): Equipment { + val instance = Equipment( + code = code!!, + name = name!!, + ratePeriod = ratePeriod, + price = price + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, name = name!!, ratePeriod = ratePeriod, price = price - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt index b44a220e0..62229af37 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt @@ -15,105 +15,117 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LocationOption + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for error list. - * @param code Error code describing the issue - * @param detailCode Detailed error code describing the issue. - * @param description A simple description of what the error is. - * @param locationKeyword The requested location that caused the error. - * @param locationOptions Container for possible matches to your ambiguous `locationKeyword` query. + * @param code Error code describing the issue + * @param detailCode Detailed error code describing the issue. + * @param description A simple description of what the error is. + * @param locationKeyword The requested location that caused the error. + * @param locationOptions Container for possible matches to your ambiguous `locationKeyword` query. */ data class Error( - // Error code describing the issue - @JsonProperty("Code") - @field:Valid - val code: kotlin.String? = null, - // Detailed error code describing the issue. - @JsonProperty("DetailCode") - @field:Valid - val detailCode: kotlin.String? = null, - // A simple description of what the error is. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null, - // The requested location that caused the error. - @JsonProperty("LocationKeyword") - @field:Valid - val locationKeyword: kotlin.String? = null, - // Container for possible matches to your ambiguous `locationKeyword` query. - @JsonProperty("LocationOptions") - @field:Valid - val locationOptions: kotlin.collections.List? = null + /* Error code describing the issue */ +@JsonProperty("Code") +val code: kotlin.String? = null, + + /* Detailed error code describing the issue. */ +@JsonProperty("DetailCode") +val detailCode: kotlin.String? = null, + + /* A simple description of what the error is. */ +@JsonProperty("Description") +val description: kotlin.String? = null, + + /* The requested location that caused the error. */ +@JsonProperty("LocationKeyword") +val locationKeyword: kotlin.String? = null, + + /* Container for possible matches to your ambiguous `locationKeyword` query. */ +@JsonProperty("LocationOptions") +val locationOptions: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var detailCode: kotlin.String? = null, - private var description: kotlin.String? = null, - private var locationKeyword: kotlin.String? = null, - private var locationOptions: kotlin.collections.List? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - - fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } - - fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } - - fun build(): Error { - val instance = - Error( - code = code, - detailCode = detailCode, - description = description, - locationKeyword = locationKeyword, - locationOptions = locationOptions - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Error) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var detailCode: kotlin.String? = null, + private var description: kotlin.String? = null, + private var locationKeyword: kotlin.String? = null, + private var locationOptions: kotlin.collections.List? = null + ) { + fun code(code: kotlin.String?) = apply { this.code = code } + fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } + fun description(description: kotlin.String?) = apply { this.description = description } + fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } + fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } + + fun build(): Error { + val instance = Error( + code = code, + detailCode = detailCode, + description = description, + locationKeyword = locationKeyword, + locationOptions = locationOptions + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code, detailCode = detailCode, description = description, locationKeyword = locationKeyword, locationOptions = locationOptions - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt index 73325b204..dedafce5b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt @@ -15,75 +15,69 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Error + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class Errors( - // Container for error list. - @JsonProperty("Errors") - @field:Valid - val errors: kotlin.collections.List? = null, - // A unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:Valid - val transactionId: kotlin.String? = null + /* Container for error list. */ +@JsonProperty("Errors") +val errors: kotlin.collections.List? = null, + + /* A unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List?) = apply { this.errors = errors } - - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - - fun build(): Errors { - val instance = - Errors( - errors = errors, - transactionId = transactionId - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Errors) { - 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}" } - ) - } - } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null + ) { + fun errors(errors: kotlin.collections.List?) = apply { this.errors = errors } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + + fun build(): Errors { + val instance = Errors( + errors = errors, + transactionId = transactionId + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( errors = errors, transactionId = transactionId - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt index 9fe48a643..600304663 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.CarsMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Extra cost for each increment of distance used. - * @param distance - * @param cost + * @param distance + * @param cost */ data class ExtraCostPerDistance( - @JsonProperty("Distance") - @field:NotNull - @field:Valid - val distance: CarsDistance, - @JsonProperty("Cost") - @field:NotNull - @field:Valid - val cost: CarsMoney + @JsonProperty("Distance") +val distance: + CarsDistance +, + + @JsonProperty("Cost") +val cost: + CarsMoney + ) { + + + + init { + require(distance != null) { "distance must not be null" } + + + + + + + + require(cost != null) { "cost must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var distance: CarsDistance? = null, - private var cost: CarsMoney? = null - ) { - fun distance(distance: CarsDistance) = apply { this.distance = distance } - - fun cost(cost: CarsMoney) = apply { this.cost = cost } - - fun build(): ExtraCostPerDistance { - val instance = - ExtraCostPerDistance( - distance = distance!!, - cost = cost!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ExtraCostPerDistance) { - 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}" } - ) - } - } + class Builder( + private var distance: CarsDistance? = null, + private var cost: CarsMoney? = null + ) { + fun distance(distance: CarsDistance) = apply { this.distance = distance } + fun cost(cost: CarsMoney) = apply { this.cost = cost } + + fun build(): ExtraCostPerDistance { + val instance = ExtraCostPerDistance( + distance = distance!!, + cost = cost!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( distance = distance!!, cost = cost!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt index 7db16c436..a992c0a01 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt @@ -15,86 +15,93 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of ExtraFeesDetails - * @param unit Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily - * @param unitCount Numbers of period - * @param amount + * @param unit Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily + * @param unitCount Numbers of period + * @param amount */ data class ExtraFees( - // Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily - @JsonProperty("Unit") - @field:NotNull - @field:Valid - val unit: kotlin.String, - // Numbers of period - @JsonProperty("UnitCount") - val unitCount: kotlin.Long, - @JsonProperty("Amount") - @field:NotNull - @field:Valid - val amount: CarsMoney + /* Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily */ +@JsonProperty("Unit") +val unit: + kotlin.String +, + + /* Numbers of period */ +@JsonProperty("UnitCount") +val unitCount: + kotlin.Long +, + + @JsonProperty("Amount") +val amount: + CarsMoney + ) { + + + + init { + require(unit != null) { "unit must not be null" } + + + + + + + + require(unitCount != null) { "unitCount must not be null" } + + + + + + + + require(amount != null) { "amount must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var unit: kotlin.String? = null, - private var unitCount: kotlin.Long? = null, - private var amount: CarsMoney? = null - ) { - fun unit(unit: kotlin.String) = apply { this.unit = unit } - - fun unitCount(unitCount: kotlin.Long) = apply { this.unitCount = unitCount } - - fun amount(amount: CarsMoney) = apply { this.amount = amount } - - fun build(): ExtraFees { - val instance = - ExtraFees( - unit = unit!!, - unitCount = unitCount!!, - amount = amount!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ExtraFees) { - 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}" } - ) - } - } + class Builder( + private var unit: kotlin.String? = null, + private var unitCount: kotlin.Long? = null, + private var amount: CarsMoney? = null + ) { + fun unit(unit: kotlin.String) = apply { this.unit = unit } + fun unitCount(unitCount: kotlin.Long) = apply { this.unitCount = unitCount } + fun amount(amount: CarsMoney) = apply { this.amount = amount } + + fun build(): ExtraFees { + val instance = ExtraFees( + unit = unit!!, + unitCount = unitCount!!, + amount = amount!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( unit = unit!!, unitCount = unitCount!!, amount = amount!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt index 3475b908a..8fb662511 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * API returned information. - * @param code Fault code. - * @param description Fault description. + * @param code Fault code. + * @param description Fault description. */ data class Fault( - // Fault code. - @JsonProperty("code") - @field:Valid - val code: kotlin.String? = null, - // Fault description. - @JsonProperty("description") - @field:Valid - val description: kotlin.String? = null + /* Fault code. */ +@JsonProperty("code") +val code: kotlin.String? = null, + + /* Fault description. */ +@JsonProperty("description") +val description: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun build(): Fault { - val instance = - Fault( - code = code, - description = description - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Fault) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null + ) { + fun code(code: kotlin.String?) = apply { this.code = code } + fun description(description: kotlin.String?) = apply { this.description = description } + + fun build(): Fault { + val instance = Fault( + code = code, + description = description + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code, description = description - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt index a6a6097b4..4790b381f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt @@ -15,154 +15,202 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.FileSize import com.expediagroup.sdk.xap.models.FilterConditions import com.expediagroup.sdk.xap.models.SdpLink + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param partner The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. - * @param brand The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. - * @param fileContentType The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` - * @param locale The locale associated with the file content. - * @param fileName File name. - * @param propertySize - * @param fileLastUpdated The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX - * @param downloadUrl Pre-signed URL is a self signed URL generated for a resource in S3 with a set expiration time. - * @param downloadUrlExpires The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX - * @param filterConditions - * @param bestMatchedLink +* + * @param partner The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. + * @param brand The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. + * @param fileContentType The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` + * @param locale The locale associated with the file content. + * @param fileName File name. + * @param propertySize + * @param fileLastUpdated The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX + * @param downloadUrl Pre-signed URL is a self signed URL generated for a resource in S3 with a set expiration time. + * @param downloadUrlExpires The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX + * @param filterConditions + * @param bestMatchedLink */ data class FileInfo( - // The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. - @JsonProperty("partner") - @field:Valid - val partner: kotlin.String? = null, - // The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. - @JsonProperty("brand") - @field:Valid - val brand: kotlin.String? = null, - // The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` - @JsonProperty("fileContentType") - @field:Valid - val fileContentType: kotlin.String? = null, - // The locale associated with the file content. - @JsonProperty("locale") - @field:Valid - val locale: kotlin.String? = null, - // File name. - @JsonProperty("fileName") - @field:Valid - val fileName: kotlin.String? = null, - @JsonProperty("size") - @field:Valid - val propertySize: FileSize? = null, - // The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX - @JsonProperty("fileLastUpdated") - @field:Valid - val fileLastUpdated: kotlin.String? = null, - // Pre-signed URL is a self signed URL generated for a resource in S3 with a set expiration time. - @JsonProperty("downloadUrl") - @field:Valid - val downloadUrl: kotlin.String? = null, - // The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX - @JsonProperty("downloadUrlExpires") - @field:Valid - val downloadUrlExpires: kotlin.String? = null, - @JsonProperty("filterConditions") - @field:Valid - val filterConditions: FilterConditions? = null, - @JsonProperty("bestMatchedLink") - @field:Valid - val bestMatchedLink: SdpLink? = null + /* The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. */ +@JsonProperty("partner") +val partner: kotlin.String? = null, + + /* The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. */ +@JsonProperty("brand") +val brand: kotlin.String? = null, + + /* The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` */ +@JsonProperty("fileContentType") +val fileContentType: kotlin.String? = null, + + /* The locale associated with the file content. */ +@JsonProperty("locale") +val locale: kotlin.String? = null, + + /* File name. */ +@JsonProperty("fileName") +val fileName: kotlin.String? = null, + + @JsonProperty("size") +val propertySize: FileSize? = null, + + /* The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX */ +@JsonProperty("fileLastUpdated") +val fileLastUpdated: kotlin.String? = null, + + /* Pre-signed URL is a self signed URL generated for a resource in S3 with a set expiration time. */ +@JsonProperty("downloadUrl") +val downloadUrl: kotlin.String? = null, + + /* The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX */ +@JsonProperty("downloadUrlExpires") +val downloadUrlExpires: kotlin.String? = null, + + @JsonProperty("filterConditions") +val filterConditions: FilterConditions? = null, + + @JsonProperty("bestMatchedLink") +val bestMatchedLink: SdpLink? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var partner: kotlin.String? = null, - private var brand: kotlin.String? = null, - private var fileContentType: kotlin.String? = null, - private var locale: kotlin.String? = null, - private var fileName: kotlin.String? = null, - private var propertySize: FileSize? = null, - private var fileLastUpdated: kotlin.String? = null, - private var downloadUrl: kotlin.String? = null, - private var downloadUrlExpires: kotlin.String? = null, - private var filterConditions: FilterConditions? = null, - private var bestMatchedLink: SdpLink? = null - ) { - fun partner(partner: kotlin.String?) = apply { this.partner = partner } - - fun brand(brand: kotlin.String?) = apply { this.brand = brand } - - fun fileContentType(fileContentType: kotlin.String?) = apply { this.fileContentType = fileContentType } - - fun locale(locale: kotlin.String?) = apply { this.locale = locale } - - fun fileName(fileName: kotlin.String?) = apply { this.fileName = fileName } - - fun propertySize(propertySize: FileSize?) = apply { this.propertySize = propertySize } - - fun fileLastUpdated(fileLastUpdated: kotlin.String?) = apply { this.fileLastUpdated = fileLastUpdated } - - fun downloadUrl(downloadUrl: kotlin.String?) = apply { this.downloadUrl = downloadUrl } - - fun downloadUrlExpires(downloadUrlExpires: kotlin.String?) = apply { this.downloadUrlExpires = downloadUrlExpires } - - fun filterConditions(filterConditions: FilterConditions?) = apply { this.filterConditions = filterConditions } - - fun bestMatchedLink(bestMatchedLink: SdpLink?) = apply { this.bestMatchedLink = bestMatchedLink } - - fun build(): FileInfo { - val instance = - FileInfo( - partner = partner, - brand = brand, - fileContentType = fileContentType, - locale = locale, - fileName = fileName, - propertySize = propertySize, - fileLastUpdated = fileLastUpdated, - downloadUrl = downloadUrl, - downloadUrlExpires = downloadUrlExpires, - filterConditions = filterConditions, - bestMatchedLink = bestMatchedLink - ) - - validate(instance) - - return instance - } - - private fun validate(instance: FileInfo) { - 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}" } - ) - } - } + class Builder( + private var partner: kotlin.String? = null, + private var brand: kotlin.String? = null, + private var fileContentType: kotlin.String? = null, + private var locale: kotlin.String? = null, + private var fileName: kotlin.String? = null, + private var propertySize: FileSize? = null, + private var fileLastUpdated: kotlin.String? = null, + private var downloadUrl: kotlin.String? = null, + private var downloadUrlExpires: kotlin.String? = null, + private var filterConditions: FilterConditions? = null, + private var bestMatchedLink: SdpLink? = null + ) { + fun partner(partner: kotlin.String?) = apply { this.partner = partner } + fun brand(brand: kotlin.String?) = apply { this.brand = brand } + fun fileContentType(fileContentType: kotlin.String?) = apply { this.fileContentType = fileContentType } + fun locale(locale: kotlin.String?) = apply { this.locale = locale } + fun fileName(fileName: kotlin.String?) = apply { this.fileName = fileName } + fun propertySize(propertySize: FileSize?) = apply { this.propertySize = propertySize } + fun fileLastUpdated(fileLastUpdated: kotlin.String?) = apply { this.fileLastUpdated = fileLastUpdated } + fun downloadUrl(downloadUrl: kotlin.String?) = apply { this.downloadUrl = downloadUrl } + fun downloadUrlExpires(downloadUrlExpires: kotlin.String?) = apply { this.downloadUrlExpires = downloadUrlExpires } + fun filterConditions(filterConditions: FilterConditions?) = apply { this.filterConditions = filterConditions } + fun bestMatchedLink(bestMatchedLink: SdpLink?) = apply { this.bestMatchedLink = bestMatchedLink } + + fun build(): FileInfo { + val instance = FileInfo( + partner = partner, + brand = brand, + fileContentType = fileContentType, + locale = locale, + fileName = fileName, + propertySize = propertySize, + fileLastUpdated = fileLastUpdated, + downloadUrl = downloadUrl, + downloadUrlExpires = downloadUrlExpires, + filterConditions = filterConditions, + bestMatchedLink = bestMatchedLink + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( partner = partner, brand = brand, fileContentType = fileContentType, @@ -174,5 +222,5 @@ data class FileInfo( downloadUrlExpires = downloadUrlExpires, filterConditions = filterConditions, bestMatchedLink = bestMatchedLink - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt index b2a9722c4..74a869240 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt @@ -15,86 +15,83 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** * The information about the file size. - * @param unit The unit about the file size. - * @param `value` The value about the file size. + * @param unit The unit about the file size. + * @param `value` The value about the file size. */ data class FileSize( - // The unit about the file size. - @JsonProperty("unit") - val unit: FileSize.Unit? = null, - // The value about the file size. - @JsonProperty("value") - val `value`: kotlin.Long? = null + /* The unit about the file size. */ +@JsonProperty("unit") +val unit: FileSize.Unit? = null, + + /* The value about the file size. */ +@JsonProperty("value") +val `value`: kotlin.Long? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() + + + + init { + + + + + + + + + + + + + + + } - class Builder( - private var unit: FileSize.Unit? = null, - private var `value`: kotlin.Long? = null - ) { - fun unit(unit: FileSize.Unit?) = apply { this.unit = unit } - - fun `value`(`value`: kotlin.Long?) = apply { this.`value` = `value` } - - fun build(): FileSize { - val instance = - FileSize( - unit = unit, - `value` = `value` - ) - - validate(instance) - - return instance - } - - private fun validate(instance: FileSize) { - 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}" } - ) - } - } + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var unit: FileSize.Unit? = null, + private var `value`: kotlin.Long? = null + ) { + fun unit(unit: FileSize.Unit?) = apply { this.unit = unit } + fun `value`(`value`: kotlin.Long?) = apply { this.`value` = `value` } + + fun build(): FileSize { + val instance = FileSize( unit = unit, `value` = `value` - ) + ) - /** - * The unit about the file size. - * Values: KB,MB,GB - */ - enum class Unit(val value: kotlin.String) { - @JsonProperty("KB") - KB("KB"), + return instance + } + } - @JsonProperty("MB") - MB("MB"), + fun toBuilder() = Builder( + unit = unit, + `value` = `value` + ) - @JsonProperty("GB") - GB("GB") - } + /** + * The unit about the file size. + * Values: KB,MB,GB + */ + enum class Unit(val value: kotlin.String) { + @JsonProperty("KB") + KB("KB"), + + @JsonProperty("MB") + MB("MB"), + + @JsonProperty("GB") + GB("GB"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt index 16e94bf22..5648790d9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container filter condition for the filtered file. [Filters](https://confluence.expedia.biz/display/EWS/Filtered+Feed+File+Generation+Schedule+and+Access#FilteredFeedFileGenerationScheduleandAccess-Filters) - * @param pointOfSupply List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. - * @param brand List of filter condition for Brands: `VRBO`. - * @param structureType List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. + * @param pointOfSupply List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. + * @param brand List of filter condition for Brands: `VRBO`. + * @param structureType List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. */ data class FilterConditions( - // List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. - @JsonProperty("pointOfSupply") - @field:Valid - val pointOfSupply: kotlin.String? = null, - // List of filter condition for Brands: `VRBO`. - @JsonProperty("brand") - @field:Valid - val brand: kotlin.String? = null, - // List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. - @JsonProperty("structureType") - @field:Valid - val structureType: kotlin.String? = null + /* List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. */ +@JsonProperty("pointOfSupply") +val pointOfSupply: kotlin.String? = null, + + /* List of filter condition for Brands: `VRBO`. */ +@JsonProperty("brand") +val brand: kotlin.String? = null, + + /* List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. */ +@JsonProperty("structureType") +val structureType: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var pointOfSupply: kotlin.String? = null, - private var brand: kotlin.String? = null, - private var structureType: kotlin.String? = null - ) { - fun pointOfSupply(pointOfSupply: kotlin.String?) = apply { this.pointOfSupply = pointOfSupply } - - fun brand(brand: kotlin.String?) = apply { this.brand = brand } - - fun structureType(structureType: kotlin.String?) = apply { this.structureType = structureType } - - fun build(): FilterConditions { - val instance = - FilterConditions( - pointOfSupply = pointOfSupply, - brand = brand, - structureType = structureType - ) - - validate(instance) - - return instance - } - - private fun validate(instance: FilterConditions) { - 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}" } - ) - } - } + class Builder( + private var pointOfSupply: kotlin.String? = null, + private var brand: kotlin.String? = null, + private var structureType: kotlin.String? = null + ) { + fun pointOfSupply(pointOfSupply: kotlin.String?) = apply { this.pointOfSupply = pointOfSupply } + fun brand(brand: kotlin.String?) = apply { this.brand = brand } + fun structureType(structureType: kotlin.String?) = apply { this.structureType = structureType } + + fun build(): FilterConditions { + val instance = FilterConditions( + pointOfSupply = pointOfSupply, + brand = brand, + structureType = structureType + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( pointOfSupply = pointOfSupply, brand = brand, structureType = structureType - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt index df6914a6a..942d994c1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Car fuel type and whether Air Conditioning is included. Please find list of Car Fuel AC Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005378328 - * @param code Car FuelAC code. - * @param `value` Car FuelAC value. + * @param code Car FuelAC code. + * @param `value` Car FuelAC value. */ data class FuelAC( - // Car FuelAC code. - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // Car FuelAC value. - @JsonProperty("Value") - @field:NotNull - @field:Valid - val `value`: kotlin.String + /* Car FuelAC code. */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* Car FuelAC value. */ +@JsonProperty("Value") +val `value`: + kotlin.String + ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(`value` != null) { "`value` must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var `value`: kotlin.String? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - - fun build(): FuelAC { - val instance = - FuelAC( - code = code!!, - `value` = `value`!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: FuelAC) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var `value`: kotlin.String? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + + fun build(): FuelAC { + val instance = FuelAC( + code = code!!, + `value` = `value`!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, `value` = `value`!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt index e29afb3f7..3283436ed 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt @@ -15,83 +15,83 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for Geo location. - * @param latitude Latitude of the location. - * @param longitude Longitude of the location. - * @param obfuscated + * @param latitude Latitude of the location. + * @param longitude Longitude of the location. + * @param obfuscated */ data class GeoLocation( - // Latitude of the location. - @JsonProperty("Latitude") - @field:Valid - val latitude: kotlin.String? = null, - // Longitude of the location. - @JsonProperty("Longitude") - @field:Valid - val longitude: kotlin.String? = null, - @JsonProperty("Obfuscated") - @field:Valid - val obfuscated: kotlin.Boolean? = null + /* Latitude of the location. */ +@JsonProperty("Latitude") +val latitude: kotlin.String? = null, + + /* Longitude of the location. */ +@JsonProperty("Longitude") +val longitude: kotlin.String? = null, + + @JsonProperty("Obfuscated") +val obfuscated: kotlin.Boolean? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } - - fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } - - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } - - fun build(): GeoLocation { - val instance = - GeoLocation( - latitude = latitude, - longitude = longitude, - obfuscated = obfuscated - ) - - validate(instance) - - return instance - } - - private fun validate(instance: GeoLocation) { - 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}" } - ) - } - } + class Builder( + private var latitude: kotlin.String? = null, + private var longitude: kotlin.String? = null, + private var obfuscated: kotlin.Boolean? = null + ) { + fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } + fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } + fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + + fun build(): GeoLocation { + val instance = GeoLocation( + latitude = latitude, + longitude = longitude, + obfuscated = obfuscated + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( latitude = latitude, longitude = longitude, obfuscated = obfuscated - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt index 99caf09b7..e2ecabd2d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt @@ -15,7 +15,6 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ChainAndBrandInfo import com.expediagroup.sdk.xap.models.Description import com.expediagroup.sdk.xap.models.Distance @@ -29,343 +28,470 @@ import com.expediagroup.sdk.xap.models.Media import com.expediagroup.sdk.xap.models.Phone import com.expediagroup.sdk.xap.models.PropertyDetails import com.expediagroup.sdk.xap.models.RoomType + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for information on each offered hotel. - * @param id The unique, Expedia-specific hotel property identifier used to designate a single hotel. - * @param hcomId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. - * @param name The common name of the hotel - * @param propertyType - * @param propertyDetails - * @param localCurrencyCode The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) - * @param location - * @param phoneInfos Container for property phone numbers. Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. - * @param distance - * @param description - * @param status Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. - * @param renovationsAndClosures The information about renovations and closures - * @param chainAndBrandInfo - * @param thumbnailUrl URL of the thumbnail image of the hotel. Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - * @param starRating Star rating value of the hotel property. - * @param guestRating Average overall guest rating of the hotel. The value is between 1.0 and 5.0 in 0.1 increments. Higher is better. - * @param guestReviewCount The total count of guest reviews used to create the average `GuestRating` above. - * @param petFriendly Indicates whether the property allows certain pets under certain circumstances. Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out whether a particular pet will be permitted to stay at the property. - * @param lgbtqiaFriendly This value is returned if the property owner has specifically designated this property as LGBTQIA-friendly. - * @param links - * @param policies - * @param cleanlinessAndSafety Container for all cleanliness and safety measures. The key is the measures category, the values are the information. The category will be: - CLEANLINESS - SOCIAL_DISTANCING - SAFETY - DISCLAIMER - * @param optionalExtras The optional extras info. - * @param importantNotices The important notices for hotel. - * @param media Container for hotel images - * @param hotelAmenities Container for all hotel amenities. - * @param hotelDescriptiveAmenities Container for all hotel amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - PARKING - FOOD_AND_DRINK - INTERNET - THINGS_TO_DO - FAMILY_FRIENDLY - CONVENIENCES - GUEST_SERVICES - BUSINESS_SERVICE - OUTDOOR - ACCESSIBILITY - SPA - ACTIVITIES_NEARBY - LANGS_SPOKEN - MORE The category for grouped amenities in hotel level for Vacation Rental hotel will be: - BEACH - SKI - POOL/SPA - INTERNET - PARKING - FAMILY_FRIENDLY - KITCHEN - DINING - BEDROOM - BATHROOMS - LIVING_SPACES - ENTERTAINMENT - OUTDOORS - LAUNDRY - WORKSPACES - CLIMATE_CONTROL - PETS - SUITABILITY/ACCESSIBILITY - SERVICES_AND_CONVENIENCES - LOCATION_HIGHLIGHTS - THINGS_TO_DO - GENERAL - SAFETY - * @param roomAmenities Container for all room amenities. - * @param roomDescriptiveAmenities Container for all common room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - BEDROOM - BATHROOM - FOOD_AND_DRINK - ENTERTAINMENT - OUTDOOR_SPACE - MORE - * @param accessibility The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage - * @param memberOnlyDealAvailable Indicates whether the property has member only deal rates available. - * @param roomTypes Container for all of available room types. + * @param id The unique, Expedia-specific hotel property identifier used to designate a single hotel. + * @param hcomId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. + * @param name The common name of the hotel + * @param propertyType + * @param propertyDetails + * @param localCurrencyCode The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) + * @param location + * @param phoneInfos Container for property phone numbers. Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. + * @param distance + * @param description + * @param status Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. + * @param renovationsAndClosures The information about renovations and closures + * @param chainAndBrandInfo + * @param thumbnailUrl URL of the thumbnail image of the hotel. Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + * @param starRating Star rating value of the hotel property. + * @param guestRating Average overall guest rating of the hotel. The value is between 1.0 and 5.0 in 0.1 increments. Higher is better. + * @param guestReviewCount The total count of guest reviews used to create the average `GuestRating` above. + * @param petFriendly Indicates whether the property allows certain pets under certain circumstances. Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out whether a particular pet will be permitted to stay at the property. + * @param lgbtqiaFriendly This value is returned if the property owner has specifically designated this property as LGBTQIA-friendly. + * @param links + * @param policies + * @param cleanlinessAndSafety Container for all cleanliness and safety measures. The key is the measures category, the values are the information. The category will be: - CLEANLINESS - SOCIAL_DISTANCING - SAFETY - DISCLAIMER + * @param optionalExtras The optional extras info. + * @param importantNotices The important notices for hotel. + * @param media Container for hotel images + * @param hotelAmenities Container for all hotel amenities. + * @param hotelDescriptiveAmenities Container for all hotel amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - PARKING - FOOD_AND_DRINK - INTERNET - THINGS_TO_DO - FAMILY_FRIENDLY - CONVENIENCES - GUEST_SERVICES - BUSINESS_SERVICE - OUTDOOR - ACCESSIBILITY - SPA - ACTIVITIES_NEARBY - LANGS_SPOKEN - MORE The category for grouped amenities in hotel level for Vacation Rental hotel will be: - BEACH - SKI - POOL/SPA - INTERNET - PARKING - FAMILY_FRIENDLY - KITCHEN - DINING - BEDROOM - BATHROOMS - LIVING_SPACES - ENTERTAINMENT - OUTDOORS - LAUNDRY - WORKSPACES - CLIMATE_CONTROL - PETS - SUITABILITY/ACCESSIBILITY - SERVICES_AND_CONVENIENCES - LOCATION_HIGHLIGHTS - THINGS_TO_DO - GENERAL - SAFETY + * @param roomAmenities Container for all room amenities. + * @param roomDescriptiveAmenities Container for all common room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - BEDROOM - BATHROOM - FOOD_AND_DRINK - ENTERTAINMENT - OUTDOOR_SPACE - MORE + * @param accessibility The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage + * @param memberOnlyDealAvailable Indicates whether the property has member only deal rates available. + * @param roomTypes Container for all of available room types. */ data class Hotel( - // The unique, Expedia-specific hotel property identifier used to designate a single hotel. - @JsonProperty("Id") - @field:Valid - val id: kotlin.String? = null, - // The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. - @JsonProperty("HcomId") - @field:Valid - val hcomId: kotlin.String? = null, - // The common name of the hotel - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null, - @JsonProperty("PropertyType") - @field:Valid - val propertyType: HotelPropertyType? = null, - @JsonProperty("PropertyDetails") - @field:Valid - val propertyDetails: PropertyDetails? = null, - // The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) - @JsonProperty("LocalCurrencyCode") - @field:Valid - val localCurrencyCode: kotlin.String? = null, - @JsonProperty("Location") - @field:Valid - val location: HotelLocation? = null, - // Container for property phone numbers. Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. - @JsonProperty("PhoneInfos") - @field:Valid - val phoneInfos: kotlin.collections.List? = null, - @JsonProperty("Distance") - @field:Valid - val distance: Distance? = null, - @JsonProperty("Description") - @field:Valid - val description: Description? = null, - // Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. - @JsonProperty("Status") - val status: Hotel.Status? = null, - // The information about renovations and closures - @JsonProperty("RenovationsAndClosures") - @field:Valid - val renovationsAndClosures: kotlin.collections.List? = null, - @JsonProperty("ChainAndBrandInfo") - @field:Valid - val chainAndBrandInfo: ChainAndBrandInfo? = null, - // URL of the thumbnail image of the hotel. Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - @JsonProperty("ThumbnailUrl") - @field:Valid - val thumbnailUrl: kotlin.String? = null, - // Star rating value of the hotel property. - @JsonProperty("StarRating") - val starRating: Hotel.StarRating? = null, - // Average overall guest rating of the hotel. The value is between 1.0 and 5.0 in 0.1 increments. Higher is better. - @JsonProperty("GuestRating") - @field:Valid - val guestRating: kotlin.String? = null, - // The total count of guest reviews used to create the average `GuestRating` above. - @JsonProperty("GuestReviewCount") - val guestReviewCount: kotlin.Int? = null, - // Indicates whether the property allows certain pets under certain circumstances. Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out whether a particular pet will be permitted to stay at the property. - @JsonProperty("PetFriendly") - @field:Valid - val petFriendly: kotlin.Boolean? = null, - // This value is returned if the property owner has specifically designated this property as LGBTQIA-friendly. - @JsonProperty("LgbtqiaFriendly") - @field:Valid - val lgbtqiaFriendly: kotlin.Boolean? = null, - @JsonProperty("Links") - @field:Valid - val links: HotelLinks? = null, - @JsonProperty("Policies") - @field:Valid - val policies: HotelPolicies? = null, - // Container for all cleanliness and safety measures. The key is the measures category, the values are the information. The category will be: - CLEANLINESS - SOCIAL_DISTANCING - SAFETY - DISCLAIMER - @JsonProperty("CleanlinessAndSafety") - @field:Valid - val cleanlinessAndSafety: kotlin.collections.Map>? = null, - // The optional extras info. - @JsonProperty("OptionalExtras") - @field:Valid - val optionalExtras: kotlin.collections.List? = null, - // The important notices for hotel. - @JsonProperty("ImportantNotices") - @field:Valid - val importantNotices: kotlin.collections.List? = null, - // Container for hotel images - @JsonProperty("Media") - @field:Valid - val media: kotlin.collections.List? = null, - // Container for all hotel amenities. - @JsonProperty("HotelAmenities") - @field:Valid - val hotelAmenities: kotlin.collections.List? = null, - // Container for all hotel amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - PARKING - FOOD_AND_DRINK - INTERNET - THINGS_TO_DO - FAMILY_FRIENDLY - CONVENIENCES - GUEST_SERVICES - BUSINESS_SERVICE - OUTDOOR - ACCESSIBILITY - SPA - ACTIVITIES_NEARBY - LANGS_SPOKEN - MORE The category for grouped amenities in hotel level for Vacation Rental hotel will be: - BEACH - SKI - POOL/SPA - INTERNET - PARKING - FAMILY_FRIENDLY - KITCHEN - DINING - BEDROOM - BATHROOMS - LIVING_SPACES - ENTERTAINMENT - OUTDOORS - LAUNDRY - WORKSPACES - CLIMATE_CONTROL - PETS - SUITABILITY/ACCESSIBILITY - SERVICES_AND_CONVENIENCES - LOCATION_HIGHLIGHTS - THINGS_TO_DO - GENERAL - SAFETY - @JsonProperty("HotelDescriptiveAmenities") - @field:Valid - val hotelDescriptiveAmenities: kotlin.collections.Map>? = null, - // Container for all room amenities. - @JsonProperty("RoomAmenities") - @field:Valid - val roomAmenities: kotlin.collections.List? = null, - // Container for all common room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - BEDROOM - BATHROOM - FOOD_AND_DRINK - ENTERTAINMENT - OUTDOOR_SPACE - MORE - @JsonProperty("RoomDescriptiveAmenities") - @field:Valid - val roomDescriptiveAmenities: kotlin.collections.Map>? = null, - // The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage - @JsonProperty("Accessibility") - @field:Valid - val accessibility: kotlin.collections.List? = null, - // Indicates whether the property has member only deal rates available. - @JsonProperty("MemberOnlyDealAvailable") - @field:Valid - val memberOnlyDealAvailable: kotlin.Boolean? = null, - // Container for all of available room types. - @JsonProperty("RoomTypes") - @field:Valid - val roomTypes: kotlin.collections.List? = null + /* The unique, Expedia-specific hotel property identifier used to designate a single hotel. */ +@JsonProperty("Id") +val id: kotlin.String? = null, + + /* The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. */ +@JsonProperty("HcomId") +val hcomId: kotlin.String? = null, + + /* The common name of the hotel */ +@JsonProperty("Name") +val name: kotlin.String? = null, + + @JsonProperty("PropertyType") +val propertyType: HotelPropertyType? = null, + + @JsonProperty("PropertyDetails") +val propertyDetails: PropertyDetails? = null, + + /* The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) */ +@JsonProperty("LocalCurrencyCode") +val localCurrencyCode: kotlin.String? = null, + + @JsonProperty("Location") +val location: HotelLocation? = null, + + /* Container for property phone numbers. Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. */ +@JsonProperty("PhoneInfos") +val phoneInfos: kotlin.collections.List? = null, + + @JsonProperty("Distance") +val distance: Distance? = null, + + @JsonProperty("Description") +val description: Description? = null, + + /* Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. */ +@JsonProperty("Status") +val status: Hotel.Status? = null, + + /* The information about renovations and closures */ +@JsonProperty("RenovationsAndClosures") +val renovationsAndClosures: kotlin.collections.List? = null, + + @JsonProperty("ChainAndBrandInfo") +val chainAndBrandInfo: ChainAndBrandInfo? = null, + + /* URL of the thumbnail image of the hotel. Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). */ +@JsonProperty("ThumbnailUrl") +val thumbnailUrl: kotlin.String? = null, + + /* Star rating value of the hotel property. */ +@JsonProperty("StarRating") +val starRating: Hotel.StarRating? = null, + + /* Average overall guest rating of the hotel. The value is between 1.0 and 5.0 in 0.1 increments. Higher is better. */ +@JsonProperty("GuestRating") +val guestRating: kotlin.String? = null, + + /* The total count of guest reviews used to create the average `GuestRating` above. */ +@JsonProperty("GuestReviewCount") +val guestReviewCount: kotlin.Int? = null, + + /* Indicates whether the property allows certain pets under certain circumstances. Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out whether a particular pet will be permitted to stay at the property. */ +@JsonProperty("PetFriendly") +val petFriendly: kotlin.Boolean? = null, + + /* This value is returned if the property owner has specifically designated this property as LGBTQIA-friendly. */ +@JsonProperty("LgbtqiaFriendly") +val lgbtqiaFriendly: kotlin.Boolean? = null, + + @JsonProperty("Links") +val links: HotelLinks? = null, + + @JsonProperty("Policies") +val policies: HotelPolicies? = null, + + /* Container for all cleanliness and safety measures. The key is the measures category, the values are the information. The category will be: - CLEANLINESS - SOCIAL_DISTANCING - SAFETY - DISCLAIMER */ +@JsonProperty("CleanlinessAndSafety") +val cleanlinessAndSafety: kotlin.collections.Map>? = null, + + /* The optional extras info. */ +@JsonProperty("OptionalExtras") +val optionalExtras: kotlin.collections.List? = null, + + /* The important notices for hotel. */ +@JsonProperty("ImportantNotices") +val importantNotices: kotlin.collections.List? = null, + + /* Container for hotel images */ +@JsonProperty("Media") +val media: kotlin.collections.List? = null, + + /* Container for all hotel amenities. */ +@JsonProperty("HotelAmenities") +val hotelAmenities: kotlin.collections.List? = null, + + /* Container for all hotel amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - PARKING - FOOD_AND_DRINK - INTERNET - THINGS_TO_DO - FAMILY_FRIENDLY - CONVENIENCES - GUEST_SERVICES - BUSINESS_SERVICE - OUTDOOR - ACCESSIBILITY - SPA - ACTIVITIES_NEARBY - LANGS_SPOKEN - MORE The category for grouped amenities in hotel level for Vacation Rental hotel will be: - BEACH - SKI - POOL/SPA - INTERNET - PARKING - FAMILY_FRIENDLY - KITCHEN - DINING - BEDROOM - BATHROOMS - LIVING_SPACES - ENTERTAINMENT - OUTDOORS - LAUNDRY - WORKSPACES - CLIMATE_CONTROL - PETS - SUITABILITY/ACCESSIBILITY - SERVICES_AND_CONVENIENCES - LOCATION_HIGHLIGHTS - THINGS_TO_DO - GENERAL - SAFETY */ +@JsonProperty("HotelDescriptiveAmenities") +val hotelDescriptiveAmenities: kotlin.collections.Map>? = null, + + /* Container for all room amenities. */ +@JsonProperty("RoomAmenities") +val roomAmenities: kotlin.collections.List? = null, + + /* Container for all common room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - BEDROOM - BATHROOM - FOOD_AND_DRINK - ENTERTAINMENT - OUTDOOR_SPACE - MORE */ +@JsonProperty("RoomDescriptiveAmenities") +val roomDescriptiveAmenities: kotlin.collections.Map>? = null, + + /* The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage */ +@JsonProperty("Accessibility") +val accessibility: kotlin.collections.List? = null, + + /* Indicates whether the property has member only deal rates available. */ +@JsonProperty("MemberOnlyDealAvailable") +val memberOnlyDealAvailable: kotlin.Boolean? = null, + + /* Container for all of available room types. */ +@JsonProperty("RoomTypes") +val roomTypes: kotlin.collections.List? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() - } + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - class Builder( - private var id: kotlin.String? = null, - private var hcomId: kotlin.String? = null, - private var name: kotlin.String? = null, - private var propertyType: HotelPropertyType? = null, - private var propertyDetails: PropertyDetails? = null, - private var localCurrencyCode: kotlin.String? = null, - private var location: HotelLocation? = null, - private var phoneInfos: kotlin.collections.List? = null, - private var distance: Distance? = null, - private var description: Description? = null, - private var status: Hotel.Status? = null, - private var renovationsAndClosures: kotlin.collections.List? = null, - private var chainAndBrandInfo: ChainAndBrandInfo? = null, - private var thumbnailUrl: kotlin.String? = null, - private var starRating: Hotel.StarRating? = null, - private var guestRating: kotlin.String? = null, - private var guestReviewCount: kotlin.Int? = null, - private var petFriendly: kotlin.Boolean? = null, - private var lgbtqiaFriendly: kotlin.Boolean? = null, - private var links: HotelLinks? = null, - private var policies: HotelPolicies? = null, - private var cleanlinessAndSafety: kotlin.collections.Map>? = null, - private var optionalExtras: kotlin.collections.List? = null, - private var importantNotices: kotlin.collections.List? = null, - private var media: kotlin.collections.List? = null, - private var hotelAmenities: kotlin.collections.List? = null, - private var hotelDescriptiveAmenities: kotlin.collections.Map>? = null, - private var roomAmenities: kotlin.collections.List? = null, - private var roomDescriptiveAmenities: kotlin.collections.Map>? = null, - private var accessibility: kotlin.collections.List? = null, - private var memberOnlyDealAvailable: kotlin.Boolean? = null, - private var roomTypes: kotlin.collections.List? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - fun hcomId(hcomId: kotlin.String?) = apply { this.hcomId = hcomId } - fun name(name: kotlin.String?) = apply { this.name = name } - fun propertyType(propertyType: HotelPropertyType?) = apply { this.propertyType = propertyType } - fun propertyDetails(propertyDetails: PropertyDetails?) = apply { this.propertyDetails = propertyDetails } - fun localCurrencyCode(localCurrencyCode: kotlin.String?) = apply { this.localCurrencyCode = localCurrencyCode } - fun location(location: HotelLocation?) = apply { this.location = location } - fun phoneInfos(phoneInfos: kotlin.collections.List?) = apply { this.phoneInfos = phoneInfos } - fun distance(distance: Distance?) = apply { this.distance = distance } - fun description(description: Description?) = apply { this.description = description } - fun status(status: Hotel.Status?) = apply { this.status = status } - fun renovationsAndClosures(renovationsAndClosures: kotlin.collections.List?) = apply { this.renovationsAndClosures = renovationsAndClosures } - fun chainAndBrandInfo(chainAndBrandInfo: ChainAndBrandInfo?) = apply { this.chainAndBrandInfo = chainAndBrandInfo } - fun thumbnailUrl(thumbnailUrl: kotlin.String?) = apply { this.thumbnailUrl = thumbnailUrl } - fun starRating(starRating: Hotel.StarRating?) = apply { this.starRating = starRating } - fun guestRating(guestRating: kotlin.String?) = apply { this.guestRating = guestRating } - fun guestReviewCount(guestReviewCount: kotlin.Int?) = apply { this.guestReviewCount = guestReviewCount } - fun petFriendly(petFriendly: kotlin.Boolean?) = apply { this.petFriendly = petFriendly } - fun lgbtqiaFriendly(lgbtqiaFriendly: kotlin.Boolean?) = apply { this.lgbtqiaFriendly = lgbtqiaFriendly } - fun links(links: HotelLinks?) = apply { this.links = links } - fun policies(policies: HotelPolicies?) = apply { this.policies = policies } - fun cleanlinessAndSafety(cleanlinessAndSafety: kotlin.collections.Map>?) = - apply { - this.cleanlinessAndSafety = - cleanlinessAndSafety - } - fun optionalExtras(optionalExtras: kotlin.collections.List?) = apply { this.optionalExtras = optionalExtras } - fun importantNotices(importantNotices: kotlin.collections.List?) = apply { this.importantNotices = importantNotices } - fun media(media: kotlin.collections.List?) = apply { this.media = media } - fun hotelAmenities(hotelAmenities: kotlin.collections.List?) = apply { this.hotelAmenities = hotelAmenities } - fun hotelDescriptiveAmenities(hotelDescriptiveAmenities: kotlin.collections.Map>?) = - apply { - this.hotelDescriptiveAmenities = - hotelDescriptiveAmenities - } - fun roomAmenities(roomAmenities: kotlin.collections.List?) = apply { this.roomAmenities = roomAmenities } - fun roomDescriptiveAmenities(roomDescriptiveAmenities: kotlin.collections.Map>?) = - apply { - this.roomDescriptiveAmenities = - roomDescriptiveAmenities - } - fun accessibility(accessibility: kotlin.collections.List?) = apply { this.accessibility = accessibility } - - fun memberOnlyDealAvailable(memberOnlyDealAvailable: kotlin.Boolean?) = apply { this.memberOnlyDealAvailable = memberOnlyDealAvailable } - - fun roomTypes(roomTypes: kotlin.collections.List?) = apply { this.roomTypes = roomTypes } - - fun build(): Hotel { - val instance = - Hotel( - id = id, - hcomId = hcomId, - name = name, - propertyType = propertyType, - propertyDetails = propertyDetails, - localCurrencyCode = localCurrencyCode, - location = location, - phoneInfos = phoneInfos, - distance = distance, - description = description, - status = status, - renovationsAndClosures = renovationsAndClosures, - chainAndBrandInfo = chainAndBrandInfo, - thumbnailUrl = thumbnailUrl, - starRating = starRating, - guestRating = guestRating, - guestReviewCount = guestReviewCount, - petFriendly = petFriendly, - lgbtqiaFriendly = lgbtqiaFriendly, - links = links, - policies = policies, - cleanlinessAndSafety = cleanlinessAndSafety, - optionalExtras = optionalExtras, - importantNotices = importantNotices, - media = media, - hotelAmenities = hotelAmenities, - hotelDescriptiveAmenities = hotelDescriptiveAmenities, - roomAmenities = roomAmenities, - roomDescriptiveAmenities = roomDescriptiveAmenities, - accessibility = accessibility, - memberOnlyDealAvailable = memberOnlyDealAvailable, - roomTypes = roomTypes - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Hotel) { - 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( + companion object { + @JvmStatic + fun builder() = Builder() + } + + class Builder( + private var id: kotlin.String? = null, + private var hcomId: kotlin.String? = null, + private var name: kotlin.String? = null, + private var propertyType: HotelPropertyType? = null, + private var propertyDetails: PropertyDetails? = null, + private var localCurrencyCode: kotlin.String? = null, + private var location: HotelLocation? = null, + private var phoneInfos: kotlin.collections.List? = null, + private var distance: Distance? = null, + private var description: Description? = null, + private var status: Hotel.Status? = null, + private var renovationsAndClosures: kotlin.collections.List? = null, + private var chainAndBrandInfo: ChainAndBrandInfo? = null, + private var thumbnailUrl: kotlin.String? = null, + private var starRating: Hotel.StarRating? = null, + private var guestRating: kotlin.String? = null, + private var guestReviewCount: kotlin.Int? = null, + private var petFriendly: kotlin.Boolean? = null, + private var lgbtqiaFriendly: kotlin.Boolean? = null, + private var links: HotelLinks? = null, + private var policies: HotelPolicies? = null, + private var cleanlinessAndSafety: kotlin.collections.Map>? = null, + private var optionalExtras: kotlin.collections.List? = null, + private var importantNotices: kotlin.collections.List? = null, + private var media: kotlin.collections.List? = null, + private var hotelAmenities: kotlin.collections.List? = null, + private var hotelDescriptiveAmenities: kotlin.collections.Map>? = null, + private var roomAmenities: kotlin.collections.List? = null, + private var roomDescriptiveAmenities: kotlin.collections.Map>? = null, + private var accessibility: kotlin.collections.List? = null, + private var memberOnlyDealAvailable: kotlin.Boolean? = null, + private var roomTypes: kotlin.collections.List? = null + ) { + fun id(id: kotlin.String?) = apply { this.id = id } + fun hcomId(hcomId: kotlin.String?) = apply { this.hcomId = hcomId } + fun name(name: kotlin.String?) = apply { this.name = name } + fun propertyType(propertyType: HotelPropertyType?) = apply { this.propertyType = propertyType } + fun propertyDetails(propertyDetails: PropertyDetails?) = apply { this.propertyDetails = propertyDetails } + fun localCurrencyCode(localCurrencyCode: kotlin.String?) = apply { this.localCurrencyCode = localCurrencyCode } + fun location(location: HotelLocation?) = apply { this.location = location } + fun phoneInfos(phoneInfos: kotlin.collections.List?) = apply { this.phoneInfos = phoneInfos } + fun distance(distance: Distance?) = apply { this.distance = distance } + fun description(description: Description?) = apply { this.description = description } + fun status(status: Hotel.Status?) = apply { this.status = status } + fun renovationsAndClosures(renovationsAndClosures: kotlin.collections.List?) = apply { this.renovationsAndClosures = renovationsAndClosures } + fun chainAndBrandInfo(chainAndBrandInfo: ChainAndBrandInfo?) = apply { this.chainAndBrandInfo = chainAndBrandInfo } + fun thumbnailUrl(thumbnailUrl: kotlin.String?) = apply { this.thumbnailUrl = thumbnailUrl } + fun starRating(starRating: Hotel.StarRating?) = apply { this.starRating = starRating } + fun guestRating(guestRating: kotlin.String?) = apply { this.guestRating = guestRating } + fun guestReviewCount(guestReviewCount: kotlin.Int?) = apply { this.guestReviewCount = guestReviewCount } + fun petFriendly(petFriendly: kotlin.Boolean?) = apply { this.petFriendly = petFriendly } + fun lgbtqiaFriendly(lgbtqiaFriendly: kotlin.Boolean?) = apply { this.lgbtqiaFriendly = lgbtqiaFriendly } + fun links(links: HotelLinks?) = apply { this.links = links } + fun policies(policies: HotelPolicies?) = apply { this.policies = policies } + fun cleanlinessAndSafety(cleanlinessAndSafety: kotlin.collections.Map>?) = apply { this.cleanlinessAndSafety = cleanlinessAndSafety } + fun optionalExtras(optionalExtras: kotlin.collections.List?) = apply { this.optionalExtras = optionalExtras } + fun importantNotices(importantNotices: kotlin.collections.List?) = apply { this.importantNotices = importantNotices } + fun media(media: kotlin.collections.List?) = apply { this.media = media } + fun hotelAmenities(hotelAmenities: kotlin.collections.List?) = apply { this.hotelAmenities = hotelAmenities } + fun hotelDescriptiveAmenities(hotelDescriptiveAmenities: kotlin.collections.Map>?) = apply { this.hotelDescriptiveAmenities = hotelDescriptiveAmenities } + fun roomAmenities(roomAmenities: kotlin.collections.List?) = apply { this.roomAmenities = roomAmenities } + fun roomDescriptiveAmenities(roomDescriptiveAmenities: kotlin.collections.Map>?) = apply { this.roomDescriptiveAmenities = roomDescriptiveAmenities } + fun accessibility(accessibility: kotlin.collections.List?) = apply { this.accessibility = accessibility } + fun memberOnlyDealAvailable(memberOnlyDealAvailable: kotlin.Boolean?) = apply { this.memberOnlyDealAvailable = memberOnlyDealAvailable } + fun roomTypes(roomTypes: kotlin.collections.List?) = apply { this.roomTypes = roomTypes } + + fun build(): Hotel { + val instance = Hotel( id = id, hcomId = hcomId, name = name, @@ -398,68 +524,107 @@ data class Hotel( accessibility = accessibility, memberOnlyDealAvailable = memberOnlyDealAvailable, roomTypes = roomTypes - ) - - /** - * Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. - * Values: AVAILABLE,NOT_AVAILABLE,ERROR,NUMBER_OF_ADULTS_NOT_ACCEPTED,NUMBER_OF_CHILDREN_NOT_ACCEPTED,NUMBER_OF_INFANTS_NOT_ACCEPTED,NUMBER_OF_PERSONS_NOT_ACCEPTED,CHECK_IN_AGE_NOT_ACCEPTED - */ - enum class Status(val value: kotlin.String) { - @JsonProperty("AVAILABLE") - AVAILABLE("AVAILABLE"), - - @JsonProperty("NOT_AVAILABLE") - NOT_AVAILABLE("NOT_AVAILABLE"), - - @JsonProperty("ERROR") - ERROR("ERROR"), - - @JsonProperty("NUMBER_OF_ADULTS_NOT_ACCEPTED") - NUMBER_OF_ADULTS_NOT_ACCEPTED("NUMBER_OF_ADULTS_NOT_ACCEPTED"), - - @JsonProperty("NUMBER_OF_CHILDREN_NOT_ACCEPTED") - NUMBER_OF_CHILDREN_NOT_ACCEPTED("NUMBER_OF_CHILDREN_NOT_ACCEPTED"), - - @JsonProperty("NUMBER_OF_INFANTS_NOT_ACCEPTED") - NUMBER_OF_INFANTS_NOT_ACCEPTED("NUMBER_OF_INFANTS_NOT_ACCEPTED"), + ) - @JsonProperty("NUMBER_OF_PERSONS_NOT_ACCEPTED") - NUMBER_OF_PERSONS_NOT_ACCEPTED("NUMBER_OF_PERSONS_NOT_ACCEPTED"), - - @JsonProperty("CHECK_IN_AGE_NOT_ACCEPTED") - CHECK_IN_AGE_NOT_ACCEPTED("CHECK_IN_AGE_NOT_ACCEPTED") + return instance + } } - /** - * Star rating value of the hotel property. - * Values: _1_PERIOD0,_1_PERIOD5,_2_PERIOD0,_2_PERIOD5,_3_PERIOD0,_3_PERIOD5,_4_PERIOD0,_4_PERIOD5,_5_PERIOD0 - */ - enum class StarRating(val value: kotlin.String) { - @JsonProperty("1.0") - _1_PERIOD0("1.0"), - - @JsonProperty("1.5") - _1_PERIOD5("1.5"), - - @JsonProperty("2.0") - _2_PERIOD0("2.0"), - - @JsonProperty("2.5") - _2_PERIOD5("2.5"), - - @JsonProperty("3.0") - _3_PERIOD0("3.0"), - - @JsonProperty("3.5") - _3_PERIOD5("3.5"), - - @JsonProperty("4.0") - _4_PERIOD0("4.0"), - - @JsonProperty("4.5") - _4_PERIOD5("4.5"), + fun toBuilder() = Builder( + id = id, + hcomId = hcomId, + name = name, + propertyType = propertyType, + propertyDetails = propertyDetails, + localCurrencyCode = localCurrencyCode, + location = location, + phoneInfos = phoneInfos, + distance = distance, + description = description, + status = status, + renovationsAndClosures = renovationsAndClosures, + chainAndBrandInfo = chainAndBrandInfo, + thumbnailUrl = thumbnailUrl, + starRating = starRating, + guestRating = guestRating, + guestReviewCount = guestReviewCount, + petFriendly = petFriendly, + lgbtqiaFriendly = lgbtqiaFriendly, + links = links, + policies = policies, + cleanlinessAndSafety = cleanlinessAndSafety, + optionalExtras = optionalExtras, + importantNotices = importantNotices, + media = media, + hotelAmenities = hotelAmenities, + hotelDescriptiveAmenities = hotelDescriptiveAmenities, + roomAmenities = roomAmenities, + roomDescriptiveAmenities = roomDescriptiveAmenities, + accessibility = accessibility, + memberOnlyDealAvailable = memberOnlyDealAvailable, + roomTypes = roomTypes + ) + + /** + * Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. + * Values: AVAILABLE,NOT_AVAILABLE,ERROR,NUMBER_OF_ADULTS_NOT_ACCEPTED,NUMBER_OF_CHILDREN_NOT_ACCEPTED,NUMBER_OF_INFANTS_NOT_ACCEPTED,NUMBER_OF_PERSONS_NOT_ACCEPTED,CHECK_IN_AGE_NOT_ACCEPTED + */ + enum class Status(val value: kotlin.String) { + @JsonProperty("AVAILABLE") + AVAILABLE("AVAILABLE"), + + @JsonProperty("NOT_AVAILABLE") + NOT_AVAILABLE("NOT_AVAILABLE"), + + @JsonProperty("ERROR") + ERROR("ERROR"), + + @JsonProperty("NUMBER_OF_ADULTS_NOT_ACCEPTED") + NUMBER_OF_ADULTS_NOT_ACCEPTED("NUMBER_OF_ADULTS_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_CHILDREN_NOT_ACCEPTED") + NUMBER_OF_CHILDREN_NOT_ACCEPTED("NUMBER_OF_CHILDREN_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_INFANTS_NOT_ACCEPTED") + NUMBER_OF_INFANTS_NOT_ACCEPTED("NUMBER_OF_INFANTS_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_PERSONS_NOT_ACCEPTED") + NUMBER_OF_PERSONS_NOT_ACCEPTED("NUMBER_OF_PERSONS_NOT_ACCEPTED"), + + @JsonProperty("CHECK_IN_AGE_NOT_ACCEPTED") + CHECK_IN_AGE_NOT_ACCEPTED("CHECK_IN_AGE_NOT_ACCEPTED"); + } - @JsonProperty("5.0") - _5_PERIOD0("5.0") - } + /** + * Star rating value of the hotel property. + * Values: _1_PERIOD0,_1_PERIOD5,_2_PERIOD0,_2_PERIOD5,_3_PERIOD0,_3_PERIOD5,_4_PERIOD0,_4_PERIOD5,_5_PERIOD0 + */ + enum class StarRating(val value: kotlin.String) { + @JsonProperty("1.0") + _1_PERIOD0("1.0"), + + @JsonProperty("1.5") + _1_PERIOD5("1.5"), + + @JsonProperty("2.0") + _2_PERIOD0("2.0"), + + @JsonProperty("2.5") + _2_PERIOD5("2.5"), + + @JsonProperty("3.0") + _3_PERIOD0("3.0"), + + @JsonProperty("3.5") + _3_PERIOD5("3.5"), + + @JsonProperty("4.0") + _4_PERIOD0("4.0"), + + @JsonProperty("4.5") + _4_PERIOD5("4.5"), + + @JsonProperty("5.0") + _5_PERIOD0("5.0"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt index 3ba30ec11..78b8bbe87 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt @@ -15,128 +15,160 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Hotel import com.expediagroup.sdk.xap.models.HotelDetailsResponseOccupantsInner import com.expediagroup.sdk.xap.models.HotelDetailsResponseStayDates import com.expediagroup.sdk.xap.models.HotelDetailsResponseWarningsInner import com.expediagroup.sdk.xap.models.ValidFormsOfPayment + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param transactionId Unique identifier for the transaction. - * @param stayDates - * @param lengthOfStay The number of stay nights. - * @param numberOfRooms Number of rooms requested. - * @param occupants Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. - * @param validFormsOfPayment Container for payment information. - * @param hotelDetails +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param transactionId Unique identifier for the transaction. + * @param stayDates + * @param lengthOfStay The number of stay nights. + * @param numberOfRooms Number of rooms requested. + * @param occupants Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. + * @param validFormsOfPayment Container for payment information. + * @param hotelDetails */ data class HotelDetailsResponse( - // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - // Unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:Valid - val transactionId: kotlin.String? = null, - @JsonProperty("StayDates") - @field:Valid - val stayDates: HotelDetailsResponseStayDates? = null, - // The number of stay nights. - @JsonProperty("LengthOfStay") - val lengthOfStay: kotlin.Int? = null, - // Number of rooms requested. - @JsonProperty("NumberOfRooms") - val numberOfRooms: kotlin.Int? = null, - // Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. - @JsonProperty("Occupants") - @field:Valid - val occupants: kotlin.collections.List? = null, - // Container for payment information. - @JsonProperty("ValidFormsOfPayment") - @field:Valid - val validFormsOfPayment: kotlin.collections.List? = null, - @JsonProperty("HotelDetails") - @field:Valid - val hotelDetails: Hotel? = null + /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + /* Unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: kotlin.String? = null, + + @JsonProperty("StayDates") +val stayDates: HotelDetailsResponseStayDates? = null, + + /* The number of stay nights. */ +@JsonProperty("LengthOfStay") +val lengthOfStay: kotlin.Int? = null, + + /* Number of rooms requested. */ +@JsonProperty("NumberOfRooms") +val numberOfRooms: kotlin.Int? = null, + + /* Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. */ +@JsonProperty("Occupants") +val occupants: kotlin.collections.List? = null, + + /* Container for payment information. */ +@JsonProperty("ValidFormsOfPayment") +val validFormsOfPayment: kotlin.collections.List? = null, + + @JsonProperty("HotelDetails") +val hotelDetails: Hotel? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null, - private var stayDates: HotelDetailsResponseStayDates? = null, - private var lengthOfStay: kotlin.Int? = null, - private var numberOfRooms: kotlin.Int? = null, - private var occupants: kotlin.collections.List? = null, - private var validFormsOfPayment: kotlin.collections.List? = null, - private var hotelDetails: Hotel? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - - fun stayDates(stayDates: HotelDetailsResponseStayDates?) = apply { this.stayDates = stayDates } - - fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } - - fun numberOfRooms(numberOfRooms: kotlin.Int?) = apply { this.numberOfRooms = numberOfRooms } - - fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - - fun validFormsOfPayment(validFormsOfPayment: kotlin.collections.List?) = apply { this.validFormsOfPayment = validFormsOfPayment } - - fun hotelDetails(hotelDetails: Hotel?) = apply { this.hotelDetails = hotelDetails } - - fun build(): HotelDetailsResponse { - val instance = - HotelDetailsResponse( - warnings = warnings, - transactionId = transactionId, - stayDates = stayDates, - lengthOfStay = lengthOfStay, - numberOfRooms = numberOfRooms, - occupants = occupants, - validFormsOfPayment = validFormsOfPayment, - hotelDetails = hotelDetails - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelDetailsResponse) { - 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}" } - ) - } - } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + private var stayDates: HotelDetailsResponseStayDates? = null, + private var lengthOfStay: kotlin.Int? = null, + private var numberOfRooms: kotlin.Int? = null, + private var occupants: kotlin.collections.List? = null, + private var validFormsOfPayment: kotlin.collections.List? = null, + private var hotelDetails: Hotel? = null + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun stayDates(stayDates: HotelDetailsResponseStayDates?) = apply { this.stayDates = stayDates } + fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } + fun numberOfRooms(numberOfRooms: kotlin.Int?) = apply { this.numberOfRooms = numberOfRooms } + fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } + fun validFormsOfPayment(validFormsOfPayment: kotlin.collections.List?) = apply { this.validFormsOfPayment = validFormsOfPayment } + fun hotelDetails(hotelDetails: Hotel?) = apply { this.hotelDetails = hotelDetails } + + fun build(): HotelDetailsResponse { + val instance = HotelDetailsResponse( + warnings = warnings, + transactionId = transactionId, + stayDates = stayDates, + lengthOfStay = lengthOfStay, + numberOfRooms = numberOfRooms, + occupants = occupants, + validFormsOfPayment = validFormsOfPayment, + hotelDetails = hotelDetails + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( warnings = warnings, transactionId = transactionId, stayDates = stayDates, @@ -145,5 +177,5 @@ data class HotelDetailsResponse( occupants = occupants, validFormsOfPayment = validFormsOfPayment, hotelDetails = hotelDetails - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt index ed360fddd..05dea6443 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param adults Specifies the number of adults staying in each room. - * @param childAges Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. +* + * @param adults Specifies the number of adults staying in each room. + * @param childAges Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. */ data class HotelDetailsResponseOccupantsInner( - // Specifies the number of adults staying in each room. - @JsonProperty("Adults") - @field:Valid - val adults: kotlin.Any? = null, - // Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. - @JsonProperty("ChildAges") - @field:Valid - val childAges: kotlin.Any? = null + /* Specifies the number of adults staying in each room. */ +@JsonProperty("Adults") +val adults: kotlin.Any? = null, + + /* Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. */ +@JsonProperty("ChildAges") +val childAges: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var adults: kotlin.Any? = null, - private var childAges: kotlin.Any? = null - ) { - fun adults(adults: kotlin.Any?) = apply { this.adults = adults } - - fun childAges(childAges: kotlin.Any?) = apply { this.childAges = childAges } - - fun build(): HotelDetailsResponseOccupantsInner { - val instance = - HotelDetailsResponseOccupantsInner( - adults = adults, - childAges = childAges - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelDetailsResponseOccupantsInner) { - 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}" } - ) - } - } + class Builder( + private var adults: kotlin.Any? = null, + private var childAges: kotlin.Any? = null + ) { + fun adults(adults: kotlin.Any?) = apply { this.adults = adults } + fun childAges(childAges: kotlin.Any?) = apply { this.childAges = childAges } + + fun build(): HotelDetailsResponseOccupantsInner { + val instance = HotelDetailsResponseOccupantsInner( + adults = adults, + childAges = childAges + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( adults = adults, childAges = childAges - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt index 929feb9f9..c787ff4b2 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param checkInDate Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - * @param checkOutDate Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. +* + * @param checkInDate Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. + * @param checkOutDate Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. */ data class HotelDetailsResponseStayDates( - // Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - @JsonProperty("CheckInDate") - @field:Valid - val checkInDate: kotlin.Any? = null, - // Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - @JsonProperty("CheckOutDate") - @field:Valid - val checkOutDate: kotlin.Any? = null + /* Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. */ +@JsonProperty("CheckInDate") +val checkInDate: kotlin.Any? = null, + + /* Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. */ +@JsonProperty("CheckOutDate") +val checkOutDate: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInDate: kotlin.Any? = null, - private var checkOutDate: kotlin.Any? = null - ) { - fun checkInDate(checkInDate: kotlin.Any?) = apply { this.checkInDate = checkInDate } - - fun checkOutDate(checkOutDate: kotlin.Any?) = apply { this.checkOutDate = checkOutDate } - - fun build(): HotelDetailsResponseStayDates { - val instance = - HotelDetailsResponseStayDates( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelDetailsResponseStayDates) { - 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}" } - ) - } - } + class Builder( + private var checkInDate: kotlin.Any? = null, + private var checkOutDate: kotlin.Any? = null + ) { + fun checkInDate(checkInDate: kotlin.Any?) = apply { this.checkInDate = checkInDate } + fun checkOutDate(checkOutDate: kotlin.Any?) = apply { this.checkOutDate = checkOutDate } + + fun build(): HotelDetailsResponseStayDates { + val instance = HotelDetailsResponseStayDates( + checkInDate = checkInDate, + checkOutDate = checkOutDate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( checkInDate = checkInDate, checkOutDate = checkOutDate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt index 890b1ac22..735ea7d6f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt @@ -15,114 +15,132 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param code The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. - * @param description A detail information of what happened. - * @param originalPrice The original price from the Lodging Search API response. - * @param newPrice The new price. - * @param changedAmount The difference between `OriginalPrice` and `NewPrice`. - * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. +* + * @param code The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. + * @param description A detail information of what happened. + * @param originalPrice The original price from the Lodging Search API response. + * @param newPrice The new price. + * @param changedAmount The difference between `OriginalPrice` and `NewPrice`. + * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ data class HotelDetailsResponseWarningsInner( - // The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. - @JsonProperty("Code") - @field:Valid - val code: kotlin.Any? = null, - // A detail information of what happened. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null, - // The original price from the Lodging Search API response. - @JsonProperty("OriginalPrice") - @field:Valid - val originalPrice: kotlin.Any? = null, - // The new price. - @JsonProperty("NewPrice") - @field:Valid - val newPrice: kotlin.Any? = null, - // The difference between `OriginalPrice` and `NewPrice`. - @JsonProperty("ChangedAmount") - @field:Valid - val changedAmount: kotlin.Any? = null, - // The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - @JsonProperty("ChangedPercentage") - @field:Valid - val changedPercentage: kotlin.String? = null + /* The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. */ +@JsonProperty("Code") +val code: kotlin.Any? = null, + + /* A detail information of what happened. */ +@JsonProperty("Description") +val description: kotlin.String? = null, + + /* The original price from the Lodging Search API response. */ +@JsonProperty("OriginalPrice") +val originalPrice: kotlin.Any? = null, + + /* The new price. */ +@JsonProperty("NewPrice") +val newPrice: kotlin.Any? = null, + + /* The difference between `OriginalPrice` and `NewPrice`. */ +@JsonProperty("ChangedAmount") +val changedAmount: kotlin.Any? = null, + + /* The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ +@JsonProperty("ChangedPercentage") +val changedPercentage: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.Any? = null, - private var description: kotlin.String? = null, - private var originalPrice: kotlin.Any? = null, - private var newPrice: kotlin.Any? = null, - private var changedAmount: kotlin.Any? = null, - private var changedPercentage: kotlin.String? = null - ) { - fun code(code: kotlin.Any?) = apply { this.code = code } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun originalPrice(originalPrice: kotlin.Any?) = apply { this.originalPrice = originalPrice } - - fun newPrice(newPrice: kotlin.Any?) = apply { this.newPrice = newPrice } - - fun changedAmount(changedAmount: kotlin.Any?) = apply { this.changedAmount = changedAmount } - - fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } - - fun build(): HotelDetailsResponseWarningsInner { - val instance = - HotelDetailsResponseWarningsInner( - code = code, - description = description, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount, - changedPercentage = changedPercentage - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelDetailsResponseWarningsInner) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.Any? = null, + private var description: kotlin.String? = null, + private var originalPrice: kotlin.Any? = null, + private var newPrice: kotlin.Any? = null, + private var changedAmount: kotlin.Any? = null, + private var changedPercentage: kotlin.String? = null + ) { + fun code(code: kotlin.Any?) = apply { this.code = code } + fun description(description: kotlin.String?) = apply { this.description = description } + fun originalPrice(originalPrice: kotlin.Any?) = apply { this.originalPrice = originalPrice } + fun newPrice(newPrice: kotlin.Any?) = apply { this.newPrice = newPrice } + fun changedAmount(changedAmount: kotlin.Any?) = apply { this.changedAmount = changedAmount } + fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } + + fun build(): HotelDetailsResponseWarningsInner { + val instance = HotelDetailsResponseWarningsInner( + code = code, + description = description, + originalPrice = originalPrice, + newPrice = newPrice, + changedAmount = changedAmount, + changedPercentage = changedPercentage + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code, description = description, originalPrice = originalPrice, newPrice = newPrice, changedAmount = changedAmount, changedPercentage = changedPercentage - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt index 9c5b875e5..47068bf91 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param id The identification number for a hotel amenity. - * @param name The description of a hotel amenity. +* + * @param id The identification number for a hotel amenity. + * @param name The description of a hotel amenity. */ data class HotelHotelAmenitiesInner( - // The identification number for a hotel amenity. - @JsonProperty("Id") - @field:Valid - val id: kotlin.Any? = null, - // The description of a hotel amenity. - @JsonProperty("Name") - @field:Valid - val name: kotlin.Any? = null + /* The identification number for a hotel amenity. */ +@JsonProperty("Id") +val id: kotlin.Any? = null, + + /* The description of a hotel amenity. */ +@JsonProperty("Name") +val name: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - - fun name(name: kotlin.Any?) = apply { this.name = name } - - fun build(): HotelHotelAmenitiesInner { - val instance = - HotelHotelAmenitiesInner( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelHotelAmenitiesInner) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.Any? = null, + private var name: kotlin.Any? = null + ) { + fun id(id: kotlin.Any?) = apply { this.id = id } + fun name(name: kotlin.Any?) = apply { this.name = name } + + fun build(): HotelHotelAmenitiesInner { + val instance = HotelHotelAmenitiesInner( + id = id, + name = name + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id, name = name - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt index 4ea686052..5568dac48 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt @@ -15,75 +15,69 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.HotelLinksApiRateCalendar import com.expediagroup.sdk.xap.models.HotelLinksWebSearchResult import com.expediagroup.sdk.xap.models.Link + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* Container for list of **HATEOAS** links to Expedia website to complete booking. This links section will only return a deeplink to the Website Search Results page by default. If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the response, as the Lodging Details API returns details at the room offer level, and not at the property level. - * @param webSearchResult - * @param apiRateCalendar +* Container for list of **HATEOAS** links to Expedia website to complete booking. This links section will only return a deeplink to the Website Search Results page by default. If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the response, as the Lodging Details API returns details at the room offer level, and not at the property level. + * @param webSearchResult + * @param apiRateCalendar */ data class HotelLinks( - @JsonProperty("WebSearchResult") - @field:Valid - val webSearchResult: HotelLinksWebSearchResult? = null, - @JsonProperty("ApiRateCalendar") - @field:Valid - val apiRateCalendar: HotelLinksApiRateCalendar? = null + @JsonProperty("WebSearchResult") +val webSearchResult: HotelLinksWebSearchResult? = null, + + @JsonProperty("ApiRateCalendar") +val apiRateCalendar: HotelLinksApiRateCalendar? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var webSearchResult: HotelLinksWebSearchResult? = null, - private var apiRateCalendar: HotelLinksApiRateCalendar? = null - ) { - fun webSearchResult(webSearchResult: HotelLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - - fun apiRateCalendar(apiRateCalendar: HotelLinksApiRateCalendar?) = apply { this.apiRateCalendar = apiRateCalendar } - - fun build(): HotelLinks { - val instance = - HotelLinks( - webSearchResult = webSearchResult, - apiRateCalendar = apiRateCalendar - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelLinks) { - 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}" } - ) - } - } + class Builder( + private var webSearchResult: HotelLinksWebSearchResult? = null, + private var apiRateCalendar: HotelLinksApiRateCalendar? = null + ) { + fun webSearchResult(webSearchResult: HotelLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } + fun apiRateCalendar(apiRateCalendar: HotelLinksApiRateCalendar?) = apply { this.apiRateCalendar = apiRateCalendar } + + fun build(): HotelLinks { + val instance = HotelLinks( + webSearchResult = webSearchResult, + apiRateCalendar = apiRateCalendar + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( webSearchResult = webSearchResult, apiRateCalendar = apiRateCalendar - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt index 10fb591f7..2862bb48e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class HotelLinksApiRateCalendar( - // The Accept request header (for API queries only - not included for page URLs). - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // Method of request. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null, - // The URL of the destination web page or API query. - @JsonProperty("Href") - @field:Valid - val href: kotlin.String? = null + /* The Accept request header (for API queries only - not included for page URLs). */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* Method of request. */ +@JsonProperty("Method") +val method: kotlin.String? = null, + + /* The URL of the destination web page or API query. */ +@JsonProperty("Href") +val href: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun href(href: kotlin.String?) = apply { this.href = href } - - fun build(): HotelLinksApiRateCalendar { - val instance = - HotelLinksApiRateCalendar( - accept = accept, - method = method, - href = href - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelLinksApiRateCalendar) { - 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}" } - ) - } - } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): HotelLinksApiRateCalendar { + val instance = HotelLinksApiRateCalendar( + accept = accept, + method = method, + href = href + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( accept = accept, method = method, href = href - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt index 69b194781..96b0e1620 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class HotelLinksWebSearchResult( - // The Accept request header (for API queries only - not included for page URLs). - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // Method of request. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null, - // The URL of the destination web page or API query. - @JsonProperty("Href") - @field:Valid - val href: kotlin.String? = null + /* The Accept request header (for API queries only - not included for page URLs). */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* Method of request. */ +@JsonProperty("Method") +val method: kotlin.String? = null, + + /* The URL of the destination web page or API query. */ +@JsonProperty("Href") +val href: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun href(href: kotlin.String?) = apply { this.href = href } - - fun build(): HotelLinksWebSearchResult { - val instance = - HotelLinksWebSearchResult( - accept = accept, - method = method, - href = href - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelLinksWebSearchResult) { - 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}" } - ) - } - } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): HotelLinksWebSearchResult { + val instance = HotelLinksWebSearchResult( + accept = accept, + method = method, + href = href + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( accept = accept, method = method, href = href - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt index bf29ad17d..b3e2d604b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt @@ -15,135 +15,175 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Hotel import com.expediagroup.sdk.xap.models.HotelListingsResponseStayDates import com.expediagroup.sdk.xap.models.Occupant import com.expediagroup.sdk.xap.models.Warning + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param count The number of hotels actually returned in the response. - * @param totalHotelCount The number of hotels present in the location. - * @param transactionId Unique identifier for the transaction. - * @param stayDates - * @param lengthOfStay The number of stay nights. - * @param numberOfRooms The number of the rooms requested on behalf of the user. - * @param occupants Container of occupants. It is an array including occupants of each room. - * @param hotels Container for all hotels. +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param count The number of hotels actually returned in the response. + * @param totalHotelCount The number of hotels present in the location. + * @param transactionId Unique identifier for the transaction. + * @param stayDates + * @param lengthOfStay The number of stay nights. + * @param numberOfRooms The number of the rooms requested on behalf of the user. + * @param occupants Container of occupants. It is an array including occupants of each room. + * @param hotels Container for all hotels. */ data class HotelListingsResponse( - // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - // The number of hotels actually returned in the response. - @JsonProperty("Count") - val count: kotlin.Int? = null, - // The number of hotels present in the location. - @JsonProperty("TotalHotelCount") - val totalHotelCount: kotlin.Int? = null, - // Unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:Valid - val transactionId: kotlin.String? = null, - @JsonProperty("StayDates") - @field:Valid - val stayDates: HotelListingsResponseStayDates? = null, - // The number of stay nights. - @JsonProperty("LengthOfStay") - val lengthOfStay: kotlin.Int? = null, - // The number of the rooms requested on behalf of the user. - @JsonProperty("NumberOfRooms") - val numberOfRooms: kotlin.Int? = null, - // Container of occupants. It is an array including occupants of each room. - @JsonProperty("Occupants") - @field:Valid - val occupants: kotlin.collections.List? = null, - // Container for all hotels. - @JsonProperty("Hotels") - @field:Valid - val hotels: kotlin.collections.List? = null + /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + /* The number of hotels actually returned in the response. */ +@JsonProperty("Count") +val count: kotlin.Int? = null, + + /* The number of hotels present in the location. */ +@JsonProperty("TotalHotelCount") +val totalHotelCount: kotlin.Int? = null, + + /* Unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: kotlin.String? = null, + + @JsonProperty("StayDates") +val stayDates: HotelListingsResponseStayDates? = null, + + /* The number of stay nights. */ +@JsonProperty("LengthOfStay") +val lengthOfStay: kotlin.Int? = null, + + /* The number of the rooms requested on behalf of the user. */ +@JsonProperty("NumberOfRooms") +val numberOfRooms: kotlin.Int? = null, + + /* Container of occupants. It is an array including occupants of each room. */ +@JsonProperty("Occupants") +val occupants: kotlin.collections.List? = null, + + /* Container for all hotels. */ +@JsonProperty("Hotels") +val hotels: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var count: kotlin.Int? = null, - private var totalHotelCount: kotlin.Int? = null, - private var transactionId: kotlin.String? = null, - private var stayDates: HotelListingsResponseStayDates? = null, - private var lengthOfStay: kotlin.Int? = null, - private var numberOfRooms: kotlin.Int? = null, - private var occupants: kotlin.collections.List? = null, - private var hotels: kotlin.collections.List? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun count(count: kotlin.Int?) = apply { this.count = count } - - fun totalHotelCount(totalHotelCount: kotlin.Int?) = apply { this.totalHotelCount = totalHotelCount } - - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - - fun stayDates(stayDates: HotelListingsResponseStayDates?) = apply { this.stayDates = stayDates } - - fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } - - fun numberOfRooms(numberOfRooms: kotlin.Int?) = apply { this.numberOfRooms = numberOfRooms } - - fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - - fun hotels(hotels: kotlin.collections.List?) = apply { this.hotels = hotels } - - fun build(): HotelListingsResponse { - val instance = - HotelListingsResponse( - warnings = warnings, - count = count, - totalHotelCount = totalHotelCount, - transactionId = transactionId, - stayDates = stayDates, - lengthOfStay = lengthOfStay, - numberOfRooms = numberOfRooms, - occupants = occupants, - hotels = hotels - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelListingsResponse) { - 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}" } - ) - } - } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var count: kotlin.Int? = null, + private var totalHotelCount: kotlin.Int? = null, + private var transactionId: kotlin.String? = null, + private var stayDates: HotelListingsResponseStayDates? = null, + private var lengthOfStay: kotlin.Int? = null, + private var numberOfRooms: kotlin.Int? = null, + private var occupants: kotlin.collections.List? = null, + private var hotels: kotlin.collections.List? = null + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun count(count: kotlin.Int?) = apply { this.count = count } + fun totalHotelCount(totalHotelCount: kotlin.Int?) = apply { this.totalHotelCount = totalHotelCount } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun stayDates(stayDates: HotelListingsResponseStayDates?) = apply { this.stayDates = stayDates } + fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } + fun numberOfRooms(numberOfRooms: kotlin.Int?) = apply { this.numberOfRooms = numberOfRooms } + fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } + fun hotels(hotels: kotlin.collections.List?) = apply { this.hotels = hotels } + + fun build(): HotelListingsResponse { + val instance = HotelListingsResponse( + warnings = warnings, + count = count, + totalHotelCount = totalHotelCount, + transactionId = transactionId, + stayDates = stayDates, + lengthOfStay = lengthOfStay, + numberOfRooms = numberOfRooms, + occupants = occupants, + hotels = hotels + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( warnings = warnings, count = count, totalHotelCount = totalHotelCount, @@ -153,5 +193,5 @@ data class HotelListingsResponse( numberOfRooms = numberOfRooms, occupants = occupants, hotels = hotels - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt index 505dc2b71..b81f0df08 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt @@ -15,71 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** -* - * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. +* + * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ data class HotelListingsResponseStayDates( - // The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - @JsonProperty("CheckInDate") - val checkInDate: java.time.LocalDate? = null, - // The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - @JsonProperty("CheckOutDate") - val checkOutDate: java.time.LocalDate? = null + /* The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ +@JsonProperty("CheckInDate") +val checkInDate: java.time.LocalDate? = null, + + /* The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ +@JsonProperty("CheckOutDate") +val checkOutDate: java.time.LocalDate? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInDate: java.time.LocalDate? = null, - private var checkOutDate: java.time.LocalDate? = null - ) { - fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - - fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } - - fun build(): HotelListingsResponseStayDates { - val instance = - HotelListingsResponseStayDates( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelListingsResponseStayDates) { - 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}" } - ) - } - } + class Builder( + private var checkInDate: java.time.LocalDate? = null, + private var checkOutDate: java.time.LocalDate? = null + ) { + fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } + fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } + + fun build(): HotelListingsResponseStayDates { + val instance = HotelListingsResponseStayDates( + checkInDate = checkInDate, + checkOutDate = checkOutDate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( checkInDate = checkInDate, checkOutDate = checkOutDate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt index 24ab521de..3b416a8e6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Address import com.expediagroup.sdk.xap.models.LocationGeoLocation import com.expediagroup.sdk.xap.models.Neighborhood + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param address - * @param geoLocation - * @param neighborhood +* + * @param address + * @param geoLocation + * @param neighborhood */ data class HotelLocation( - @JsonProperty("Address") - @field:Valid - val address: Address? = null, - @JsonProperty("GeoLocation") - @field:Valid - val geoLocation: LocationGeoLocation? = null, - @JsonProperty("Neighborhood") - @field:Valid - val neighborhood: Neighborhood? = null + @JsonProperty("Address") +val address: Address? = null, + + @JsonProperty("GeoLocation") +val geoLocation: LocationGeoLocation? = null, + + @JsonProperty("Neighborhood") +val neighborhood: Neighborhood? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var address: Address? = null, - private var geoLocation: LocationGeoLocation? = null, - private var neighborhood: Neighborhood? = null - ) { - fun address(address: Address?) = apply { this.address = address } - - fun geoLocation(geoLocation: LocationGeoLocation?) = apply { this.geoLocation = geoLocation } - - fun neighborhood(neighborhood: Neighborhood?) = apply { this.neighborhood = neighborhood } - - fun build(): HotelLocation { - val instance = - HotelLocation( - address = address, - geoLocation = geoLocation, - neighborhood = neighborhood - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelLocation) { - 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}" } - ) - } - } + class Builder( + private var address: Address? = null, + private var geoLocation: LocationGeoLocation? = null, + private var neighborhood: Neighborhood? = null + ) { + fun address(address: Address?) = apply { this.address = address } + fun geoLocation(geoLocation: LocationGeoLocation?) = apply { this.geoLocation = geoLocation } + fun neighborhood(neighborhood: Neighborhood?) = apply { this.neighborhood = neighborhood } + + fun build(): HotelLocation { + val instance = HotelLocation( + address = address, + geoLocation = geoLocation, + neighborhood = neighborhood + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( address = address, geoLocation = geoLocation, neighborhood = neighborhood - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt index 8424e5456..6c013149a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt @@ -15,114 +15,132 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for Hotel policy information. - * @param checkInStartTime Beginning of the standard check-in window on the check in date, and in the local time of the hotel. - * @param checkInEndTime End of the standard check-in window on the check in date, and in the local time of the hotel. - * @param specialCheckInInstructions Some special instructions needed care by customer when check in. - * @param checkOutTime Customers must check out before this time on the check out date, expressed in the local time of the hotel. - * @param petPolicies The policy of the property toward having pets stay with guests. - * @param childrenAndExtraBedsPolicies The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. + * @param checkInStartTime Beginning of the standard check-in window on the check in date, and in the local time of the hotel. + * @param checkInEndTime End of the standard check-in window on the check in date, and in the local time of the hotel. + * @param specialCheckInInstructions Some special instructions needed care by customer when check in. + * @param checkOutTime Customers must check out before this time on the check out date, expressed in the local time of the hotel. + * @param petPolicies The policy of the property toward having pets stay with guests. + * @param childrenAndExtraBedsPolicies The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. */ data class HotelPolicies( - // Beginning of the standard check-in window on the check in date, and in the local time of the hotel. - @JsonProperty("CheckInStartTime") - @field:Valid - val checkInStartTime: kotlin.String? = null, - // End of the standard check-in window on the check in date, and in the local time of the hotel. - @JsonProperty("CheckInEndTime") - @field:Valid - val checkInEndTime: kotlin.String? = null, - // Some special instructions needed care by customer when check in. - @JsonProperty("SpecialCheckInInstructions") - @field:Valid - val specialCheckInInstructions: kotlin.collections.List? = null, - // Customers must check out before this time on the check out date, expressed in the local time of the hotel. - @JsonProperty("CheckOutTime") - @field:Valid - val checkOutTime: kotlin.String? = null, - // The policy of the property toward having pets stay with guests. - @JsonProperty("PetPolicies") - @field:Valid - val petPolicies: kotlin.collections.List? = null, - // The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. - @JsonProperty("ChildrenAndExtraBedsPolicies") - @field:Valid - val childrenAndExtraBedsPolicies: kotlin.collections.List? = null + /* Beginning of the standard check-in window on the check in date, and in the local time of the hotel. */ +@JsonProperty("CheckInStartTime") +val checkInStartTime: kotlin.String? = null, + + /* End of the standard check-in window on the check in date, and in the local time of the hotel. */ +@JsonProperty("CheckInEndTime") +val checkInEndTime: kotlin.String? = null, + + /* Some special instructions needed care by customer when check in. */ +@JsonProperty("SpecialCheckInInstructions") +val specialCheckInInstructions: kotlin.collections.List? = null, + + /* Customers must check out before this time on the check out date, expressed in the local time of the hotel. */ +@JsonProperty("CheckOutTime") +val checkOutTime: kotlin.String? = null, + + /* The policy of the property toward having pets stay with guests. */ +@JsonProperty("PetPolicies") +val petPolicies: kotlin.collections.List? = null, + + /* The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. */ +@JsonProperty("ChildrenAndExtraBedsPolicies") +val childrenAndExtraBedsPolicies: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInStartTime: kotlin.String? = null, - private var checkInEndTime: kotlin.String? = null, - private var specialCheckInInstructions: kotlin.collections.List? = null, - private var checkOutTime: kotlin.String? = null, - private var petPolicies: kotlin.collections.List? = null, - private var childrenAndExtraBedsPolicies: kotlin.collections.List? = null - ) { - fun checkInStartTime(checkInStartTime: kotlin.String?) = apply { this.checkInStartTime = checkInStartTime } - - fun checkInEndTime(checkInEndTime: kotlin.String?) = apply { this.checkInEndTime = checkInEndTime } - - fun specialCheckInInstructions(specialCheckInInstructions: kotlin.collections.List?) = apply { this.specialCheckInInstructions = specialCheckInInstructions } - - fun checkOutTime(checkOutTime: kotlin.String?) = apply { this.checkOutTime = checkOutTime } - - fun petPolicies(petPolicies: kotlin.collections.List?) = apply { this.petPolicies = petPolicies } - - fun childrenAndExtraBedsPolicies(childrenAndExtraBedsPolicies: kotlin.collections.List?) = apply { this.childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies } - - fun build(): HotelPolicies { - val instance = - HotelPolicies( - checkInStartTime = checkInStartTime, - checkInEndTime = checkInEndTime, - specialCheckInInstructions = specialCheckInInstructions, - checkOutTime = checkOutTime, - petPolicies = petPolicies, - childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelPolicies) { - 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}" } - ) - } - } + class Builder( + private var checkInStartTime: kotlin.String? = null, + private var checkInEndTime: kotlin.String? = null, + private var specialCheckInInstructions: kotlin.collections.List? = null, + private var checkOutTime: kotlin.String? = null, + private var petPolicies: kotlin.collections.List? = null, + private var childrenAndExtraBedsPolicies: kotlin.collections.List? = null + ) { + fun checkInStartTime(checkInStartTime: kotlin.String?) = apply { this.checkInStartTime = checkInStartTime } + fun checkInEndTime(checkInEndTime: kotlin.String?) = apply { this.checkInEndTime = checkInEndTime } + fun specialCheckInInstructions(specialCheckInInstructions: kotlin.collections.List?) = apply { this.specialCheckInInstructions = specialCheckInInstructions } + fun checkOutTime(checkOutTime: kotlin.String?) = apply { this.checkOutTime = checkOutTime } + fun petPolicies(petPolicies: kotlin.collections.List?) = apply { this.petPolicies = petPolicies } + fun childrenAndExtraBedsPolicies(childrenAndExtraBedsPolicies: kotlin.collections.List?) = apply { this.childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies } + + fun build(): HotelPolicies { + val instance = HotelPolicies( + checkInStartTime = checkInStartTime, + checkInEndTime = checkInEndTime, + specialCheckInInstructions = specialCheckInInstructions, + checkOutTime = checkOutTime, + petPolicies = petPolicies, + childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( checkInStartTime = checkInStartTime, checkInEndTime = checkInEndTime, specialCheckInInstructions = specialCheckInInstructions, checkOutTime = checkOutTime, petPolicies = petPolicies, childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt index f61118fb3..2bd50f782 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt @@ -15,73 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* Container for information on hotel property type. You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - * @param id The id of hotel property type. - * @param name The name of hotel property type. +* Container for information on hotel property type. You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + * @param id The id of hotel property type. + * @param name The name of hotel property type. */ data class HotelPropertyType( - // The id of hotel property type. - @JsonProperty("Id") - val id: kotlin.Int? = null, - // The name of hotel property type. - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null + /* The id of hotel property type. */ +@JsonProperty("Id") +val id: kotlin.Int? = null, + + /* The name of hotel property type. */ +@JsonProperty("Name") +val name: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Int? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.Int?) = apply { this.id = id } - - fun name(name: kotlin.String?) = apply { this.name = name } - - fun build(): HotelPropertyType { - val instance = - HotelPropertyType( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelPropertyType) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.Int? = null, + private var name: kotlin.String? = null + ) { + fun id(id: kotlin.Int?) = apply { this.id = id } + fun name(name: kotlin.String?) = apply { this.name = name } + + fun build(): HotelPropertyType { + val instance = HotelPropertyType( + id = id, + name = name + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id, name = name - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt index 371c59c8d..9a105694d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt @@ -15,85 +15,85 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.RateCalendar + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for all hotel rate calendar data. - * @param ecomHotelId The unique, Expedia-specific hotel property identifier used to designate a single hotel. - * @param hcomHotelId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. - * @param rateCalendar Container for all rate calendar data. + * @param ecomHotelId The unique, Expedia-specific hotel property identifier used to designate a single hotel. + * @param hcomHotelId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. + * @param rateCalendar Container for all rate calendar data. */ data class HotelRateCalendar( - // The unique, Expedia-specific hotel property identifier used to designate a single hotel. - @JsonProperty("EcomHotelId") - @field:Valid - val ecomHotelId: kotlin.String? = null, - // The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. - @JsonProperty("HcomHotelId") - @field:Valid - val hcomHotelId: kotlin.String? = null, - // Container for all rate calendar data. - @JsonProperty("RateCalendar") - @field:Valid - val rateCalendar: kotlin.collections.List? = null + /* The unique, Expedia-specific hotel property identifier used to designate a single hotel. */ +@JsonProperty("EcomHotelId") +val ecomHotelId: kotlin.String? = null, + + /* The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. */ +@JsonProperty("HcomHotelId") +val hcomHotelId: kotlin.String? = null, + + /* Container for all rate calendar data. */ +@JsonProperty("RateCalendar") +val rateCalendar: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ecomHotelId: kotlin.String? = null, - private var hcomHotelId: kotlin.String? = null, - private var rateCalendar: kotlin.collections.List? = null - ) { - fun ecomHotelId(ecomHotelId: kotlin.String?) = apply { this.ecomHotelId = ecomHotelId } - - fun hcomHotelId(hcomHotelId: kotlin.String?) = apply { this.hcomHotelId = hcomHotelId } - - fun rateCalendar(rateCalendar: kotlin.collections.List?) = apply { this.rateCalendar = rateCalendar } - - fun build(): HotelRateCalendar { - val instance = - HotelRateCalendar( - ecomHotelId = ecomHotelId, - hcomHotelId = hcomHotelId, - rateCalendar = rateCalendar - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelRateCalendar) { - 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}" } - ) - } - } + class Builder( + private var ecomHotelId: kotlin.String? = null, + private var hcomHotelId: kotlin.String? = null, + private var rateCalendar: kotlin.collections.List? = null + ) { + fun ecomHotelId(ecomHotelId: kotlin.String?) = apply { this.ecomHotelId = ecomHotelId } + fun hcomHotelId(hcomHotelId: kotlin.String?) = apply { this.hcomHotelId = hcomHotelId } + fun rateCalendar(rateCalendar: kotlin.collections.List?) = apply { this.rateCalendar = rateCalendar } + + fun build(): HotelRateCalendar { + val instance = HotelRateCalendar( + ecomHotelId = ecomHotelId, + hcomHotelId = hcomHotelId, + rateCalendar = rateCalendar + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( ecomHotelId = ecomHotelId, hcomHotelId = hcomHotelId, rateCalendar = rateCalendar - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt index a9c6ba825..4fa3c2a74 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param id The identification number for a room amenity. - * @param name The description of a room amenity. +* + * @param id The identification number for a room amenity. + * @param name The description of a room amenity. */ data class HotelRoomAmenitiesInner( - // The identification number for a room amenity. - @JsonProperty("Id") - @field:Valid - val id: kotlin.Any? = null, - // The description of a room amenity. - @JsonProperty("Name") - @field:Valid - val name: kotlin.Any? = null + /* The identification number for a room amenity. */ +@JsonProperty("Id") +val id: kotlin.Any? = null, + + /* The description of a room amenity. */ +@JsonProperty("Name") +val name: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - - fun name(name: kotlin.Any?) = apply { this.name = name } - - fun build(): HotelRoomAmenitiesInner { - val instance = - HotelRoomAmenitiesInner( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: HotelRoomAmenitiesInner) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.Any? = null, + private var name: kotlin.Any? = null + ) { + fun id(id: kotlin.Any?) = apply { this.id = id } + fun name(name: kotlin.Any?) = apply { this.name = name } + + fun build(): HotelRoomAmenitiesInner { + val instance = HotelRoomAmenitiesInner( + id = id, + name = name + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id, name = name - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt index 68590facb..2c1f171a1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt @@ -15,88 +15,93 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of image resources of the car product. - * @param type Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) - * @param propertySize Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) - * @param href URL for the image. + * @param type Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) + * @param propertySize Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) + * @param href URL for the image. */ data class Image( - // Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) - @JsonProperty("Type") - @field:NotNull - @field:Valid - val type: kotlin.String, - // Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) - @JsonProperty("Size") - @field:NotNull - @field:Valid - val propertySize: kotlin.String, - // URL for the image. - @JsonProperty("Href") - @field:NotNull - @field:Valid - val href: kotlin.String + /* Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) */ +@JsonProperty("Type") +val type: + kotlin.String +, + + /* Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) */ +@JsonProperty("Size") +val propertySize: + kotlin.String +, + + /* URL for the image. */ +@JsonProperty("Href") +val href: + kotlin.String + ) { + + + + init { + require(type != null) { "type must not be null" } + + + + + + + + require(propertySize != null) { "propertySize must not be null" } + + + + + + + + require(href != null) { "href must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var propertySize: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - - fun propertySize(propertySize: kotlin.String) = apply { this.propertySize = propertySize } - - fun href(href: kotlin.String) = apply { this.href = href } - - fun build(): Image { - val instance = - Image( - type = type!!, - propertySize = propertySize!!, - href = href!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Image) { - 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}" } - ) - } - } + class Builder( + private var type: kotlin.String? = null, + private var propertySize: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun type(type: kotlin.String) = apply { this.type = type } + fun propertySize(propertySize: kotlin.String) = apply { this.propertySize = propertySize } + fun href(href: kotlin.String) = apply { this.href = href } + + fun build(): Image { + val instance = Image( + type = type!!, + propertySize = propertySize!!, + href = href!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( type = type!!, propertySize = propertySize!!, href = href!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt index a03d3bbff..e6db11ba1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class Link( - // The Accept request header (for API queries only - not included for page URLs). - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // Method of request. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null, - // The URL of the destination web page or API query. - @JsonProperty("Href") - @field:Valid - val href: kotlin.String? = null + /* The Accept request header (for API queries only - not included for page URLs). */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* Method of request. */ +@JsonProperty("Method") +val method: kotlin.String? = null, + + /* The URL of the destination web page or API query. */ +@JsonProperty("Href") +val href: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun href(href: kotlin.String?) = apply { this.href = href } - - fun build(): Link { - val instance = - Link( - accept = accept, - method = method, - href = href - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Link) { - 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}" } - ) - } - } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): Link { + val instance = Link( + accept = accept, + method = method, + href = href + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( accept = accept, method = method, href = href - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt index 8c43218d2..3bdb77c4b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Address import com.expediagroup.sdk.xap.models.LocationGeoLocation import com.expediagroup.sdk.xap.models.Neighborhood + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for list of possible locations that could be used to disambiguate the query. - * @param address - * @param geoLocation - * @param neighborhood + * @param address + * @param geoLocation + * @param neighborhood */ data class Location( - @JsonProperty("Address") - @field:Valid - val address: Address? = null, - @JsonProperty("GeoLocation") - @field:Valid - val geoLocation: LocationGeoLocation? = null, - @JsonProperty("Neighborhood") - @field:Valid - val neighborhood: Neighborhood? = null + @JsonProperty("Address") +val address: Address? = null, + + @JsonProperty("GeoLocation") +val geoLocation: LocationGeoLocation? = null, + + @JsonProperty("Neighborhood") +val neighborhood: Neighborhood? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var address: Address? = null, - private var geoLocation: LocationGeoLocation? = null, - private var neighborhood: Neighborhood? = null - ) { - fun address(address: Address?) = apply { this.address = address } - - fun geoLocation(geoLocation: LocationGeoLocation?) = apply { this.geoLocation = geoLocation } - - fun neighborhood(neighborhood: Neighborhood?) = apply { this.neighborhood = neighborhood } - - fun build(): Location { - val instance = - Location( - address = address, - geoLocation = geoLocation, - neighborhood = neighborhood - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Location) { - 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}" } - ) - } - } + class Builder( + private var address: Address? = null, + private var geoLocation: LocationGeoLocation? = null, + private var neighborhood: Neighborhood? = null + ) { + fun address(address: Address?) = apply { this.address = address } + fun geoLocation(geoLocation: LocationGeoLocation?) = apply { this.geoLocation = geoLocation } + fun neighborhood(neighborhood: Neighborhood?) = apply { this.neighborhood = neighborhood } + + fun build(): Location { + val instance = Location( + address = address, + geoLocation = geoLocation, + neighborhood = neighborhood + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( address = address, geoLocation = geoLocation, neighborhood = neighborhood - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt index 9bb933708..625aa903f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param latitude The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. - * @param longitude The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. - * @param obfuscated Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. +* + * @param latitude The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. + * @param longitude The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. + * @param obfuscated Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. */ data class LocationGeoLocation( - // The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. - @JsonProperty("Latitude") - @field:Valid - val latitude: kotlin.String? = null, - // The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. - @JsonProperty("Longitude") - @field:Valid - val longitude: kotlin.String? = null, - // Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. - @JsonProperty("Obfuscated") - @field:Valid - val obfuscated: kotlin.Boolean? = null + /* The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. */ +@JsonProperty("Latitude") +val latitude: kotlin.String? = null, + + /* The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. */ +@JsonProperty("Longitude") +val longitude: kotlin.String? = null, + + /* Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. */ +@JsonProperty("Obfuscated") +val obfuscated: kotlin.Boolean? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } - - fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } - - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } - - fun build(): LocationGeoLocation { - val instance = - LocationGeoLocation( - latitude = latitude, - longitude = longitude, - obfuscated = obfuscated - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LocationGeoLocation) { - 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}" } - ) - } - } + class Builder( + private var latitude: kotlin.String? = null, + private var longitude: kotlin.String? = null, + private var obfuscated: kotlin.Boolean? = null + ) { + fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } + fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } + fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + + fun build(): LocationGeoLocation { + val instance = LocationGeoLocation( + latitude = latitude, + longitude = longitude, + obfuscated = obfuscated + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( latitude = latitude, longitude = longitude, obfuscated = obfuscated - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt index 213477a3f..5e4e01870 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt @@ -15,118 +15,142 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Country import com.expediagroup.sdk.xap.models.GeoLocation + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for possible matches to your ambiguous `locationKeyword` query. - * @param type Type of the location. - * @param regionId RegionId the location resides in. - * @param shortName The name of the location which matches the location keyword. - * @param airportCode Indicates the nearest major airport to the location. - * @param address The address of the location. - * @param country - * @param geoLocation + * @param type Type of the location. + * @param regionId RegionId the location resides in. + * @param shortName The name of the location which matches the location keyword. + * @param airportCode Indicates the nearest major airport to the location. + * @param address The address of the location. + * @param country + * @param geoLocation */ data class LocationOption( - // Type of the location. - @JsonProperty("Type") - @field:Valid - val type: kotlin.String? = null, - // RegionId the location resides in. - @JsonProperty("RegionId") - @field:Valid - val regionId: kotlin.String? = null, - // The name of the location which matches the location keyword. - @JsonProperty("ShortName") - @field:Valid - val shortName: kotlin.String? = null, - // Indicates the nearest major airport to the location. - @JsonProperty("AirportCode") - @field:Valid - val airportCode: kotlin.String? = null, - // The address of the location. - @JsonProperty("Address") - @field:Valid - val address: kotlin.String? = null, - @JsonProperty("Country") - @field:Valid - val country: Country? = null, - @JsonProperty("GeoLocation") - @field:Valid - val geoLocation: GeoLocation? = null + /* Type of the location. */ +@JsonProperty("Type") +val type: kotlin.String? = null, + + /* RegionId the location resides in. */ +@JsonProperty("RegionId") +val regionId: kotlin.String? = null, + + /* The name of the location which matches the location keyword. */ +@JsonProperty("ShortName") +val shortName: kotlin.String? = null, + + /* Indicates the nearest major airport to the location. */ +@JsonProperty("AirportCode") +val airportCode: kotlin.String? = null, + + /* The address of the location. */ +@JsonProperty("Address") +val address: kotlin.String? = null, + + @JsonProperty("Country") +val country: Country? = null, + + @JsonProperty("GeoLocation") +val geoLocation: GeoLocation? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var regionId: kotlin.String? = null, - private var shortName: kotlin.String? = null, - private var airportCode: kotlin.String? = null, - private var address: kotlin.String? = null, - private var country: Country? = null, - private var geoLocation: GeoLocation? = null - ) { - fun type(type: kotlin.String?) = apply { this.type = type } - - fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } - - fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } - - fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } - - fun address(address: kotlin.String?) = apply { this.address = address } - - fun country(country: Country?) = apply { this.country = country } - - fun geoLocation(geoLocation: GeoLocation?) = apply { this.geoLocation = geoLocation } - - fun build(): LocationOption { - val instance = - LocationOption( - type = type, - regionId = regionId, - shortName = shortName, - airportCode = airportCode, - address = address, - country = country, - geoLocation = geoLocation - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LocationOption) { - 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}" } - ) - } - } + class Builder( + private var type: kotlin.String? = null, + private var regionId: kotlin.String? = null, + private var shortName: kotlin.String? = null, + private var airportCode: kotlin.String? = null, + private var address: kotlin.String? = null, + private var country: Country? = null, + private var geoLocation: GeoLocation? = null + ) { + fun type(type: kotlin.String?) = apply { this.type = type } + fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } + fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } + fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } + fun address(address: kotlin.String?) = apply { this.address = address } + fun country(country: Country?) = apply { this.country = country } + fun geoLocation(geoLocation: GeoLocation?) = apply { this.geoLocation = geoLocation } + + fun build(): LocationOption { + val instance = LocationOption( + type = type, + regionId = regionId, + shortName = shortName, + airportCode = airportCode, + address = address, + country = country, + geoLocation = geoLocation + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( type = type, regionId = regionId, shortName = shortName, @@ -134,5 +158,5 @@ data class LocationOption( address = address, country = country, geoLocation = geoLocation - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt index 24daef25e..dc26cc9a5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt @@ -15,72 +15,66 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param id - * @param name +* + * @param id + * @param name */ data class LodgingAmenity( - @JsonProperty("Id") - @field:Valid - val id: kotlin.String? = null, - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null + @JsonProperty("Id") +val id: kotlin.String? = null, + + @JsonProperty("Name") +val name: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - - fun name(name: kotlin.String?) = apply { this.name = name } - - fun build(): LodgingAmenity { - val instance = - LodgingAmenity( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingAmenity) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null + ) { + fun id(id: kotlin.String?) = apply { this.id = id } + fun name(name: kotlin.String?) = apply { this.name = name } + + fun build(): LodgingAmenity { + val instance = LodgingAmenity( + id = id, + name = name + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id, name = name - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt index f8a6c666d..c181ab8bc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt @@ -15,82 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for cancellation penalty details. - * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. - * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. - * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. + * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. + * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. + * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. */ data class LodgingCancellationPenaltyRule( - // Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. - @JsonProperty("PenaltyPercentOfStay") - @field:Valid - val penaltyPercentOfStay: kotlin.String? = null, - // The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. - @JsonProperty("PenaltyStartDateTime") - val penaltyStartDateTime: java.time.OffsetDateTime? = null, - // The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. - @JsonProperty("PenaltyEndDateTime") - val penaltyEndDateTime: java.time.OffsetDateTime? = null + /* Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. */ +@JsonProperty("PenaltyPercentOfStay") +val penaltyPercentOfStay: kotlin.String? = null, + + /* The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. */ +@JsonProperty("PenaltyStartDateTime") +val penaltyStartDateTime: java.time.OffsetDateTime? = null, + + /* The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. */ +@JsonProperty("PenaltyEndDateTime") +val penaltyEndDateTime: java.time.OffsetDateTime? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var penaltyPercentOfStay: kotlin.String? = null, - private var penaltyStartDateTime: java.time.OffsetDateTime? = null, - private var penaltyEndDateTime: java.time.OffsetDateTime? = null - ) { - fun penaltyPercentOfStay(penaltyPercentOfStay: kotlin.String?) = apply { this.penaltyPercentOfStay = penaltyPercentOfStay } - - fun penaltyStartDateTime(penaltyStartDateTime: java.time.OffsetDateTime?) = apply { this.penaltyStartDateTime = penaltyStartDateTime } - - fun penaltyEndDateTime(penaltyEndDateTime: java.time.OffsetDateTime?) = apply { this.penaltyEndDateTime = penaltyEndDateTime } - - fun build(): LodgingCancellationPenaltyRule { - val instance = - LodgingCancellationPenaltyRule( - penaltyPercentOfStay = penaltyPercentOfStay, - penaltyStartDateTime = penaltyStartDateTime, - penaltyEndDateTime = penaltyEndDateTime - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingCancellationPenaltyRule) { - 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}" } - ) - } - } + class Builder( + private var penaltyPercentOfStay: kotlin.String? = null, + private var penaltyStartDateTime: java.time.OffsetDateTime? = null, + private var penaltyEndDateTime: java.time.OffsetDateTime? = null + ) { + fun penaltyPercentOfStay(penaltyPercentOfStay: kotlin.String?) = apply { this.penaltyPercentOfStay = penaltyPercentOfStay } + fun penaltyStartDateTime(penaltyStartDateTime: java.time.OffsetDateTime?) = apply { this.penaltyStartDateTime = penaltyStartDateTime } + fun penaltyEndDateTime(penaltyEndDateTime: java.time.OffsetDateTime?) = apply { this.penaltyEndDateTime = penaltyEndDateTime } + + fun build(): LodgingCancellationPenaltyRule { + val instance = LodgingCancellationPenaltyRule( + penaltyPercentOfStay = penaltyPercentOfStay, + penaltyStartDateTime = penaltyStartDateTime, + penaltyEndDateTime = penaltyEndDateTime + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( penaltyPercentOfStay = penaltyPercentOfStay, penaltyStartDateTime = penaltyStartDateTime, penaltyEndDateTime = penaltyEndDateTime - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt index 8d360914e..ff1769b3b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt @@ -15,94 +15,101 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingCancellationPenaltyRule + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for Cancellation Policy information. - * @param refundable Indicate whether the rate is refundable or not. - * @param freeCancellation Indicate whether the room can be cancelled free of charge. - * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. - * @param cancellationPenaltyRules Container for Cancellation Penalty Rules information. + * @param refundable Indicate whether the rate is refundable or not. + * @param freeCancellation Indicate whether the room can be cancelled free of charge. + * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. + * @param cancellationPenaltyRules Container for Cancellation Penalty Rules information. */ data class LodgingCancellationPolicy( - // Indicate whether the rate is refundable or not. - @JsonProperty("Refundable") - @field:Valid - val refundable: kotlin.Boolean? = null, - // Indicate whether the room can be cancelled free of charge. - @JsonProperty("FreeCancellation") - @field:Valid - val freeCancellation: kotlin.Boolean? = null, - // The date and time until which the room can be cancelled free of charge. - @JsonProperty("FreeCancellationEndDateTime") - val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, - // Container for Cancellation Penalty Rules information. - @JsonProperty("CancellationPenaltyRules") - @field:Valid - val cancellationPenaltyRules: kotlin.collections.List? = null + /* Indicate whether the rate is refundable or not. */ +@JsonProperty("Refundable") +val refundable: kotlin.Boolean? = null, + + /* Indicate whether the room can be cancelled free of charge. */ +@JsonProperty("FreeCancellation") +val freeCancellation: kotlin.Boolean? = null, + + /* The date and time until which the room can be cancelled free of charge. */ +@JsonProperty("FreeCancellationEndDateTime") +val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + + /* Container for Cancellation Penalty Rules information. */ +@JsonProperty("CancellationPenaltyRules") +val cancellationPenaltyRules: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var refundable: kotlin.Boolean? = null, - private var freeCancellation: kotlin.Boolean? = null, - private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, - private var cancellationPenaltyRules: kotlin.collections.List? = null - ) { - fun refundable(refundable: kotlin.Boolean?) = apply { this.refundable = refundable } - - fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - - fun cancellationPenaltyRules(cancellationPenaltyRules: kotlin.collections.List?) = apply { this.cancellationPenaltyRules = cancellationPenaltyRules } - - fun build(): LodgingCancellationPolicy { - val instance = - LodgingCancellationPolicy( - refundable = refundable, - freeCancellation = freeCancellation, - freeCancellationEndDateTime = freeCancellationEndDateTime, - cancellationPenaltyRules = cancellationPenaltyRules - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingCancellationPolicy) { - 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}" } - ) - } - } + class Builder( + private var refundable: kotlin.Boolean? = null, + private var freeCancellation: kotlin.Boolean? = null, + private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + private var cancellationPenaltyRules: kotlin.collections.List? = null + ) { + fun refundable(refundable: kotlin.Boolean?) = apply { this.refundable = refundable } + fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + fun cancellationPenaltyRules(cancellationPenaltyRules: kotlin.collections.List?) = apply { this.cancellationPenaltyRules = cancellationPenaltyRules } + + fun build(): LodgingCancellationPolicy { + val instance = LodgingCancellationPolicy( + refundable = refundable, + freeCancellation = freeCancellation, + freeCancellationEndDateTime = freeCancellationEndDateTime, + cancellationPenaltyRules = cancellationPenaltyRules + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( refundable = refundable, freeCancellation = freeCancellation, freeCancellationEndDateTime = freeCancellationEndDateTime, cancellationPenaltyRules = cancellationPenaltyRules - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt index ab79cba9b..6596a462d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for error list. - * @param code Error code describing the issue - * @param description A simple description of what the error is. + * @param code Error code describing the issue + * @param description A simple description of what the error is. */ data class LodgingError( - // Error code describing the issue - @JsonProperty("Code") - @field:Valid - val code: kotlin.String? = null, - // A simple description of what the error is. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null + /* Error code describing the issue */ +@JsonProperty("Code") +val code: kotlin.String? = null, + + /* A simple description of what the error is. */ +@JsonProperty("Description") +val description: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun build(): LodgingError { - val instance = - LodgingError( - code = code, - description = description - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingError) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null + ) { + fun code(code: kotlin.String?) = apply { this.code = code } + fun description(description: kotlin.String?) = apply { this.description = description } + + fun build(): LodgingError { + val instance = LodgingError( + code = code, + description = description + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code, description = description - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt index e73e83cee..38eaa2b94 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt @@ -15,75 +15,69 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingError + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class LodgingErrors( - // Container for error list. - @JsonProperty("Errors") - @field:Valid - val errors: kotlin.collections.List? = null, - // A unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:Valid - val transactionId: kotlin.String? = null + /* Container for error list. */ +@JsonProperty("Errors") +val errors: kotlin.collections.List? = null, + + /* A unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List?) = apply { this.errors = errors } - - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - - fun build(): LodgingErrors { - val instance = - LodgingErrors( - errors = errors, - transactionId = transactionId - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingErrors) { - 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}" } - ) - } - } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null + ) { + fun errors(errors: kotlin.collections.List?) = apply { this.errors = errors } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + + fun build(): LodgingErrors { + val instance = LodgingErrors( + errors = errors, + transactionId = transactionId + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( errors = errors, transactionId = transactionId - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt index 2df4873ae..5fdbdab1c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class LodgingLink( - // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // Method of request. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null, - // The URL of the destination web page or API query. - @JsonProperty("Href") - @field:Valid - val href: kotlin.String? = null + /* The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* Method of request. */ +@JsonProperty("Method") +val method: kotlin.String? = null, + + /* The URL of the destination web page or API query. */ +@JsonProperty("Href") +val href: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun href(href: kotlin.String?) = apply { this.href = href } - - fun build(): LodgingLink { - val instance = - LodgingLink( - accept = accept, - method = method, - href = href - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingLink) { - 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}" } - ) - } - } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): LodgingLink { + val instance = LodgingLink( + accept = accept, + method = method, + href = href + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( accept = accept, method = method, href = href - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt index 6a1ad31c1..339ee671a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Pricing information of the stat date - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. */ data class LodgingMoney( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun build(): LodgingMoney { - val instance = - LodgingMoney( - `value` = `value`, - currency = currency - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingMoney) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + + fun build(): LodgingMoney { + val instance = LodgingMoney( + `value` = `value`, + currency = currency + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt index 4c3be5974..7fb2b7b17 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt @@ -15,73 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param adults The number of adults in a room. - * @param childAges The ages of children in a room. +* + * @param adults The number of adults in a room. + * @param childAges The ages of children in a room. */ data class LodgingOccupant( - // The number of adults in a room. - @JsonProperty("Adults") - val adults: kotlin.Int? = null, - // The ages of children in a room. - @JsonProperty("ChildAges") - @field:Valid - val childAges: kotlin.collections.List? = null + /* The number of adults in a room. */ +@JsonProperty("Adults") +val adults: kotlin.Int? = null, + + /* The ages of children in a room. */ +@JsonProperty("ChildAges") +val childAges: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var adults: kotlin.Int? = null, - private var childAges: kotlin.collections.List? = null - ) { - fun adults(adults: kotlin.Int?) = apply { this.adults = adults } - - fun childAges(childAges: kotlin.collections.List?) = apply { this.childAges = childAges } - - fun build(): LodgingOccupant { - val instance = - LodgingOccupant( - adults = adults, - childAges = childAges - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingOccupant) { - 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}" } - ) - } - } + class Builder( + private var adults: kotlin.Int? = null, + private var childAges: kotlin.collections.List? = null + ) { + fun adults(adults: kotlin.Int?) = apply { this.adults = adults } + fun childAges(childAges: kotlin.collections.List?) = apply { this.childAges = childAges } + + fun build(): LodgingOccupant { + val instance = LodgingOccupant( + adults = adults, + childAges = childAges + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( adults = adults, childAges = childAges - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt index 2a6bcf2c6..a3a886fb9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param description The description of the promotion. - * @param amount +* + * @param description The description of the promotion. + * @param amount */ data class LodgingPromotion( - // The description of the promotion. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null, - @JsonProperty("Amount") - @field:Valid - val amount: LodgingMoney? = null + /* The description of the promotion. */ +@JsonProperty("Description") +val description: kotlin.String? = null, + + @JsonProperty("Amount") +val amount: LodgingMoney? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var description: kotlin.String? = null, - private var amount: LodgingMoney? = null - ) { - fun description(description: kotlin.String?) = apply { this.description = description } - - fun amount(amount: LodgingMoney?) = apply { this.amount = amount } - - fun build(): LodgingPromotion { - val instance = - LodgingPromotion( - description = description, - amount = amount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingPromotion) { - 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}" } - ) - } - } + class Builder( + private var description: kotlin.String? = null, + private var amount: LodgingMoney? = null + ) { + fun description(description: kotlin.String?) = apply { this.description = description } + fun amount(amount: LodgingMoney?) = apply { this.amount = amount } + + fun build(): LodgingPromotion { + val instance = LodgingPromotion( + description = description, + amount = amount + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( description = description, amount = amount - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt index 40aea108f..dcd3c27fc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt @@ -15,127 +15,160 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingOccupant import com.expediagroup.sdk.xap.models.LodgingStayDates import com.expediagroup.sdk.xap.models.LodgingWarning import com.expediagroup.sdk.xap.models.Property + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param count The number of properties actually returned in the response. - * @param totalPropertyCount The number of properties requested. - * @param transactionId Unique identifier for the API transaction. - * @param stayDates - * @param lengthOfStay The number of stay nights. - * @param occupants Container for the list of room occupants. - * @param properties Container for all properties. +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param count The number of properties actually returned in the response. + * @param totalPropertyCount The number of properties requested. + * @param transactionId Unique identifier for the API transaction. + * @param stayDates + * @param lengthOfStay The number of stay nights. + * @param occupants Container for the list of room occupants. + * @param properties Container for all properties. */ data class LodgingQuotesResponse( - // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - // The number of properties actually returned in the response. - @JsonProperty("Count") - val count: kotlin.Int? = null, - // The number of properties requested. - @JsonProperty("TotalPropertyCount") - val totalPropertyCount: kotlin.Int? = null, - // Unique identifier for the API transaction. - @JsonProperty("TransactionId") - @field:Valid - val transactionId: kotlin.String? = null, - @JsonProperty("StayDates") - @field:Valid - val stayDates: LodgingStayDates? = null, - // The number of stay nights. - @JsonProperty("LengthOfStay") - val lengthOfStay: kotlin.Int? = null, - // Container for the list of room occupants. - @JsonProperty("Occupants") - @field:Valid - val occupants: kotlin.collections.List? = null, - // Container for all properties. - @JsonProperty("Properties") - @field:Valid - val properties: kotlin.collections.List? = null + /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + /* The number of properties actually returned in the response. */ +@JsonProperty("Count") +val count: kotlin.Int? = null, + + /* The number of properties requested. */ +@JsonProperty("TotalPropertyCount") +val totalPropertyCount: kotlin.Int? = null, + + /* Unique identifier for the API transaction. */ +@JsonProperty("TransactionId") +val transactionId: kotlin.String? = null, + + @JsonProperty("StayDates") +val stayDates: LodgingStayDates? = null, + + /* The number of stay nights. */ +@JsonProperty("LengthOfStay") +val lengthOfStay: kotlin.Int? = null, + + /* Container for the list of room occupants. */ +@JsonProperty("Occupants") +val occupants: kotlin.collections.List? = null, + + /* Container for all properties. */ +@JsonProperty("Properties") +val properties: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var count: kotlin.Int? = null, - private var totalPropertyCount: kotlin.Int? = null, - private var transactionId: kotlin.String? = null, - private var stayDates: LodgingStayDates? = null, - private var lengthOfStay: kotlin.Int? = null, - private var occupants: kotlin.collections.List? = null, - private var properties: kotlin.collections.List? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun count(count: kotlin.Int?) = apply { this.count = count } - - fun totalPropertyCount(totalPropertyCount: kotlin.Int?) = apply { this.totalPropertyCount = totalPropertyCount } - - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - - fun stayDates(stayDates: LodgingStayDates?) = apply { this.stayDates = stayDates } - - fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } - - fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - - fun properties(properties: kotlin.collections.List?) = apply { this.properties = properties } - - fun build(): LodgingQuotesResponse { - val instance = - LodgingQuotesResponse( - warnings = warnings, - count = count, - totalPropertyCount = totalPropertyCount, - transactionId = transactionId, - stayDates = stayDates, - lengthOfStay = lengthOfStay, - occupants = occupants, - properties = properties - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingQuotesResponse) { - 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}" } - ) - } - } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var count: kotlin.Int? = null, + private var totalPropertyCount: kotlin.Int? = null, + private var transactionId: kotlin.String? = null, + private var stayDates: LodgingStayDates? = null, + private var lengthOfStay: kotlin.Int? = null, + private var occupants: kotlin.collections.List? = null, + private var properties: kotlin.collections.List? = null + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun count(count: kotlin.Int?) = apply { this.count = count } + fun totalPropertyCount(totalPropertyCount: kotlin.Int?) = apply { this.totalPropertyCount = totalPropertyCount } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun stayDates(stayDates: LodgingStayDates?) = apply { this.stayDates = stayDates } + fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } + fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } + fun properties(properties: kotlin.collections.List?) = apply { this.properties = properties } + + fun build(): LodgingQuotesResponse { + val instance = LodgingQuotesResponse( + warnings = warnings, + count = count, + totalPropertyCount = totalPropertyCount, + transactionId = transactionId, + stayDates = stayDates, + lengthOfStay = lengthOfStay, + occupants = occupants, + properties = properties + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( warnings = warnings, count = count, totalPropertyCount = totalPropertyCount, @@ -144,5 +177,5 @@ data class LodgingQuotesResponse( lengthOfStay = lengthOfStay, occupants = occupants, properties = properties - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt index 8e7762857..6d0bd8272 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt @@ -15,75 +15,69 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingCancellationPolicy import com.expediagroup.sdk.xap.models.LodgingPromotion + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for rate plan information. - * @param cancellationPolicy - * @param promotions All promotion information of the ratePlan. + * @param cancellationPolicy + * @param promotions All promotion information of the ratePlan. */ data class LodgingRatePlan( - @JsonProperty("CancellationPolicy") - @field:Valid - val cancellationPolicy: LodgingCancellationPolicy? = null, - // All promotion information of the ratePlan. - @JsonProperty("Promotions") - @field:Valid - val promotions: kotlin.collections.List? = null + @JsonProperty("CancellationPolicy") +val cancellationPolicy: LodgingCancellationPolicy? = null, + + /* All promotion information of the ratePlan. */ +@JsonProperty("Promotions") +val promotions: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var cancellationPolicy: LodgingCancellationPolicy? = null, - private var promotions: kotlin.collections.List? = null - ) { - fun cancellationPolicy(cancellationPolicy: LodgingCancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } - - fun promotions(promotions: kotlin.collections.List?) = apply { this.promotions = promotions } - - fun build(): LodgingRatePlan { - val instance = - LodgingRatePlan( - cancellationPolicy = cancellationPolicy, - promotions = promotions - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRatePlan) { - 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}" } - ) - } - } + class Builder( + private var cancellationPolicy: LodgingCancellationPolicy? = null, + private var promotions: kotlin.collections.List? = null + ) { + fun cancellationPolicy(cancellationPolicy: LodgingCancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } + fun promotions(promotions: kotlin.collections.List?) = apply { this.promotions = promotions } + + fun build(): LodgingRatePlan { + val instance = LodgingRatePlan( + cancellationPolicy = cancellationPolicy, + promotions = promotions + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( cancellationPolicy = cancellationPolicy, promotions = promotions - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt index 54cc29559..98dbe5869 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt @@ -15,85 +15,85 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingRatePlan import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinks import com.expediagroup.sdk.xap.models.LodgingRoomTypePrice + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param ratePlans Container for rate plan information. - * @param price - * @param links +* + * @param ratePlans Container for rate plan information. + * @param price + * @param links */ data class LodgingRoomType( - // Container for rate plan information. - @JsonProperty("RatePlans") - @field:Valid - val ratePlans: kotlin.collections.List? = null, - @JsonProperty("Price") - @field:Valid - val price: LodgingRoomTypePrice? = null, - @JsonProperty("Links") - @field:Valid - val links: LodgingRoomTypeLinks? = null + /* Container for rate plan information. */ +@JsonProperty("RatePlans") +val ratePlans: kotlin.collections.List? = null, + + @JsonProperty("Price") +val price: LodgingRoomTypePrice? = null, + + @JsonProperty("Links") +val links: LodgingRoomTypeLinks? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ratePlans: kotlin.collections.List? = null, - private var price: LodgingRoomTypePrice? = null, - private var links: LodgingRoomTypeLinks? = null - ) { - fun ratePlans(ratePlans: kotlin.collections.List?) = apply { this.ratePlans = ratePlans } - - fun price(price: LodgingRoomTypePrice?) = apply { this.price = price } - - fun links(links: LodgingRoomTypeLinks?) = apply { this.links = links } - - fun build(): LodgingRoomType { - val instance = - LodgingRoomType( - ratePlans = ratePlans, - price = price, - links = links - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomType) { - 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}" } - ) - } - } + class Builder( + private var ratePlans: kotlin.collections.List? = null, + private var price: LodgingRoomTypePrice? = null, + private var links: LodgingRoomTypeLinks? = null + ) { + fun ratePlans(ratePlans: kotlin.collections.List?) = apply { this.ratePlans = ratePlans } + fun price(price: LodgingRoomTypePrice?) = apply { this.price = price } + fun links(links: LodgingRoomTypeLinks?) = apply { this.links = links } + + fun build(): LodgingRoomType { + val instance = LodgingRoomType( + ratePlans = ratePlans, + price = price, + links = links + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( ratePlans = ratePlans, price = price, links = links - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt index 52ef6bb0d..9ef79374c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt @@ -15,75 +15,69 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingLink import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinksWebDetails import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinksWebSearchResult + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the links parameter in the Search API query. Available links are: - WebDetails (link to web infosite) - WebSearchResult (link to web search result page) - * @param webSearchResult - * @param webDetails +* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the links parameter in the Search API query. Available links are: - WebDetails (link to web infosite) - WebSearchResult (link to web search result page) + * @param webSearchResult + * @param webDetails */ data class LodgingRoomTypeLinks( - @JsonProperty("WebSearchResult") - @field:Valid - val webSearchResult: LodgingRoomTypeLinksWebSearchResult? = null, - @JsonProperty("WebDetails") - @field:Valid - val webDetails: LodgingRoomTypeLinksWebDetails? = null + @JsonProperty("WebSearchResult") +val webSearchResult: LodgingRoomTypeLinksWebSearchResult? = null, + + @JsonProperty("WebDetails") +val webDetails: LodgingRoomTypeLinksWebDetails? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var webSearchResult: LodgingRoomTypeLinksWebSearchResult? = null, - private var webDetails: LodgingRoomTypeLinksWebDetails? = null - ) { - fun webSearchResult(webSearchResult: LodgingRoomTypeLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - - fun webDetails(webDetails: LodgingRoomTypeLinksWebDetails?) = apply { this.webDetails = webDetails } - - fun build(): LodgingRoomTypeLinks { - val instance = - LodgingRoomTypeLinks( - webSearchResult = webSearchResult, - webDetails = webDetails - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypeLinks) { - 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}" } - ) - } - } + class Builder( + private var webSearchResult: LodgingRoomTypeLinksWebSearchResult? = null, + private var webDetails: LodgingRoomTypeLinksWebDetails? = null + ) { + fun webSearchResult(webSearchResult: LodgingRoomTypeLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } + fun webDetails(webDetails: LodgingRoomTypeLinksWebDetails?) = apply { this.webDetails = webDetails } + + fun build(): LodgingRoomTypeLinks { + val instance = LodgingRoomTypeLinks( + webSearchResult = webSearchResult, + webDetails = webDetails + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( webSearchResult = webSearchResult, webDetails = webDetails - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt index 157ec76f1..bd95570c7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class LodgingRoomTypeLinksWebDetails( - // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // Method of request. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null, - // The URL of the destination web page or API query. - @JsonProperty("Href") - @field:Valid - val href: kotlin.String? = null + /* The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* Method of request. */ +@JsonProperty("Method") +val method: kotlin.String? = null, + + /* The URL of the destination web page or API query. */ +@JsonProperty("Href") +val href: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun href(href: kotlin.String?) = apply { this.href = href } - - fun build(): LodgingRoomTypeLinksWebDetails { - val instance = - LodgingRoomTypeLinksWebDetails( - accept = accept, - method = method, - href = href - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypeLinksWebDetails) { - 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}" } - ) - } - } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): LodgingRoomTypeLinksWebDetails { + val instance = LodgingRoomTypeLinksWebDetails( + accept = accept, + method = method, + href = href + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( accept = accept, method = method, href = href - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt index df17ce2da..1682db66c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class LodgingRoomTypeLinksWebSearchResult( - // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // Method of request. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null, - // The URL of the destination web page or API query. - @JsonProperty("Href") - @field:Valid - val href: kotlin.String? = null + /* The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* Method of request. */ +@JsonProperty("Method") +val method: kotlin.String? = null, + + /* The URL of the destination web page or API query. */ +@JsonProperty("Href") +val href: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun href(href: kotlin.String?) = apply { this.href = href } - - fun build(): LodgingRoomTypeLinksWebSearchResult { - val instance = - LodgingRoomTypeLinksWebSearchResult( - accept = accept, - method = method, - href = href - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypeLinksWebSearchResult) { - 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}" } - ) - } - } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): LodgingRoomTypeLinksWebSearchResult { + val instance = LodgingRoomTypeLinksWebSearchResult( + accept = accept, + method = method, + href = href + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( accept = accept, method = method, href = href - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt index 94c6480c8..5bd925732 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt @@ -15,128 +15,158 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for Price information. - * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. - * @param taxesAndFees The total amount of taxes and fees of the rate plan for all occupants. - * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. - * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - * @param propertyMandatoryFees The total mandatory fees which will be charged at the property for the rate plan. - * @param totalPriceWithPropertyFees The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. - * @param refundableDamageDeposit The refundable damage deposit. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total amount of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. + * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + * @param propertyMandatoryFees The total mandatory fees which will be charged at the property for the rate plan. + * @param totalPriceWithPropertyFees The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + * @param refundableDamageDeposit The refundable damage deposit. */ data class LodgingRoomTypePrice( - // The price of the rate plan for all occupants, excluding taxes and fees. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: LodgingMoney? = null, - // The total amount of taxes and fees of the rate plan for all occupants. - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: LodgingMoney? = null, - // The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: LodgingMoney? = null, - // The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: LodgingMoney? = null, - // The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - @JsonProperty("AvgNightlyRateWithFees") - @field:Valid - val avgNightlyRateWithFees: LodgingMoney? = null, - // The total mandatory fees which will be charged at the property for the rate plan. - @JsonProperty("PropertyMandatoryFees") - @field:Valid - val propertyMandatoryFees: LodgingMoney? = null, - // The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. - @JsonProperty("TotalPriceWithPropertyFees") - @field:Valid - val totalPriceWithPropertyFees: LodgingMoney? = null, - // The refundable damage deposit. - @JsonProperty("RefundableDamageDeposit") - @field:Valid - val refundableDamageDeposit: LodgingMoney? = null + /* The price of the rate plan for all occupants, excluding taxes and fees. */ +@JsonProperty("BaseRate") +val baseRate: LodgingMoney? = null, + + /* The total amount of taxes and fees of the rate plan for all occupants. */ +@JsonProperty("TaxesAndFees") +val taxesAndFees: LodgingMoney? = null, + + /* The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. */ +@JsonProperty("TotalPrice") +val totalPrice: LodgingMoney? = null, + + /* The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyRate") +val avgNightlyRate: LodgingMoney? = null, + + /* The average nightly rate per night per room of the room type, including all fees except those imposed by the government. */ +@JsonProperty("AvgNightlyRateWithFees") +val avgNightlyRateWithFees: LodgingMoney? = null, + + /* The total mandatory fees which will be charged at the property for the rate plan. */ +@JsonProperty("PropertyMandatoryFees") +val propertyMandatoryFees: LodgingMoney? = null, + + /* The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. */ +@JsonProperty("TotalPriceWithPropertyFees") +val totalPriceWithPropertyFees: LodgingMoney? = null, + + /* The refundable damage deposit. */ +@JsonProperty("RefundableDamageDeposit") +val refundableDamageDeposit: LodgingMoney? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var baseRate: LodgingMoney? = null, - private var taxesAndFees: LodgingMoney? = null, - private var totalPrice: LodgingMoney? = null, - private var avgNightlyRate: LodgingMoney? = null, - private var avgNightlyRateWithFees: LodgingMoney? = null, - private var propertyMandatoryFees: LodgingMoney? = null, - private var totalPriceWithPropertyFees: LodgingMoney? = null, - private var refundableDamageDeposit: LodgingMoney? = null - ) { - fun baseRate(baseRate: LodgingMoney?) = apply { this.baseRate = baseRate } - - fun taxesAndFees(taxesAndFees: LodgingMoney?) = apply { this.taxesAndFees = taxesAndFees } - - fun totalPrice(totalPrice: LodgingMoney?) = apply { this.totalPrice = totalPrice } - - fun avgNightlyRate(avgNightlyRate: LodgingMoney?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyRateWithFees(avgNightlyRateWithFees: LodgingMoney?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } - - fun propertyMandatoryFees(propertyMandatoryFees: LodgingMoney?) = apply { this.propertyMandatoryFees = propertyMandatoryFees } - - fun totalPriceWithPropertyFees(totalPriceWithPropertyFees: LodgingMoney?) = apply { this.totalPriceWithPropertyFees = totalPriceWithPropertyFees } - - fun refundableDamageDeposit(refundableDamageDeposit: LodgingMoney?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - - fun build(): LodgingRoomTypePrice { - val instance = - LodgingRoomTypePrice( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyRateWithFees = avgNightlyRateWithFees, - propertyMandatoryFees = propertyMandatoryFees, - totalPriceWithPropertyFees = totalPriceWithPropertyFees, - refundableDamageDeposit = refundableDamageDeposit - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingRoomTypePrice) { - 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}" } - ) - } - } + class Builder( + private var baseRate: LodgingMoney? = null, + private var taxesAndFees: LodgingMoney? = null, + private var totalPrice: LodgingMoney? = null, + private var avgNightlyRate: LodgingMoney? = null, + private var avgNightlyRateWithFees: LodgingMoney? = null, + private var propertyMandatoryFees: LodgingMoney? = null, + private var totalPriceWithPropertyFees: LodgingMoney? = null, + private var refundableDamageDeposit: LodgingMoney? = null + ) { + fun baseRate(baseRate: LodgingMoney?) = apply { this.baseRate = baseRate } + fun taxesAndFees(taxesAndFees: LodgingMoney?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPrice(totalPrice: LodgingMoney?) = apply { this.totalPrice = totalPrice } + fun avgNightlyRate(avgNightlyRate: LodgingMoney?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyRateWithFees(avgNightlyRateWithFees: LodgingMoney?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } + fun propertyMandatoryFees(propertyMandatoryFees: LodgingMoney?) = apply { this.propertyMandatoryFees = propertyMandatoryFees } + fun totalPriceWithPropertyFees(totalPriceWithPropertyFees: LodgingMoney?) = apply { this.totalPriceWithPropertyFees = totalPriceWithPropertyFees } + fun refundableDamageDeposit(refundableDamageDeposit: LodgingMoney?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } + + fun build(): LodgingRoomTypePrice { + val instance = LodgingRoomTypePrice( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyRateWithFees = avgNightlyRateWithFees, + propertyMandatoryFees = propertyMandatoryFees, + totalPriceWithPropertyFees = totalPriceWithPropertyFees, + refundableDamageDeposit = refundableDamageDeposit + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( baseRate = baseRate, taxesAndFees = taxesAndFees, totalPrice = totalPrice, @@ -145,5 +175,5 @@ data class LodgingRoomTypePrice( propertyMandatoryFees = propertyMandatoryFees, totalPriceWithPropertyFees = totalPriceWithPropertyFees, refundableDamageDeposit = refundableDamageDeposit - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt index 422ef5634..a7b1df104 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt @@ -15,71 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** -* Container for requested dates of stay. - * @param checkInDate The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. - * @param checkOutDate The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. +* Container for requested dates of stay. + * @param checkInDate The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. + * @param checkOutDate The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. */ data class LodgingStayDates( - // The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. - @JsonProperty("CheckInDate") - val checkInDate: java.time.LocalDate? = null, - // The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. - @JsonProperty("CheckOutDate") - val checkOutDate: java.time.LocalDate? = null + /* The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. */ +@JsonProperty("CheckInDate") +val checkInDate: java.time.LocalDate? = null, + + /* The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. */ +@JsonProperty("CheckOutDate") +val checkOutDate: java.time.LocalDate? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInDate: java.time.LocalDate? = null, - private var checkOutDate: java.time.LocalDate? = null - ) { - fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - - fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } - - fun build(): LodgingStayDates { - val instance = - LodgingStayDates( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingStayDates) { - 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}" } - ) - } - } + class Builder( + private var checkInDate: java.time.LocalDate? = null, + private var checkOutDate: java.time.LocalDate? = null + ) { + fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } + fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } + + fun build(): LodgingStayDates { + val instance = LodgingStayDates( + checkInDate = checkInDate, + checkOutDate = checkOutDate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( checkInDate = checkInDate, checkOutDate = checkOutDate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt index 1cc1d7b03..789621756 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param code The code of a warning. - * @param description A description of what caused the issues. +* + * @param code The code of a warning. + * @param description A description of what caused the issues. */ data class LodgingWarning( - // The code of a warning. - @JsonProperty("Code") - @field:Valid - val code: kotlin.String? = null, - // A description of what caused the issues. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null + /* The code of a warning. */ +@JsonProperty("Code") +val code: kotlin.String? = null, + + /* A description of what caused the issues. */ +@JsonProperty("Description") +val description: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun build(): LodgingWarning { - val instance = - LodgingWarning( - code = code, - description = description - ) - - validate(instance) - - return instance - } - - private fun validate(instance: LodgingWarning) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null + ) { + fun code(code: kotlin.String?) = apply { this.code = code } + fun description(description: kotlin.String?) = apply { this.description = description } + + fun build(): LodgingWarning { + val instance = LodgingWarning( + code = code, + description = description + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code, description = description - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt index d43a075f7..a6b2ca87a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt @@ -15,175 +15,170 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.MandatoryFeesDetailAmount + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * The breakdown for the taxes and fees that must be paid at the property. - * @param type Type of mandatory fee. - * @param amount + * @param type Type of mandatory fee. + * @param amount */ data class MandatoryFeesDetail( - // Type of mandatory fee. - @JsonProperty("Type") - val type: MandatoryFeesDetail.Type? = null, - @JsonProperty("Amount") - @field:Valid - val amount: MandatoryFeesDetailAmount? = null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var type: MandatoryFeesDetail.Type? = null, - private var amount: MandatoryFeesDetailAmount? = null - ) { - fun type(type: MandatoryFeesDetail.Type?) = apply { this.type = type } - - fun amount(amount: MandatoryFeesDetailAmount?) = apply { this.amount = amount } - - fun build(): MandatoryFeesDetail { - val instance = - MandatoryFeesDetail( - type = type, - amount = amount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: MandatoryFeesDetail) { - 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( - type = type, - amount = amount - ) - - /** - * Type of mandatory fee. - * Values: CITY_LOCAL_TAX_AMT,CITY_LOCAL_TAX_PCNT,CLEANING_FEE_AMT,CLEANING_FEE_PCNT,CLUB_CARD_ADULT,CLUB_CARD_CHILD,DESTINATION_FEE_AMT,DESTINATION_FEE_PCNT,GALA_DINNER_ADULT,GALA_DINNER_CHILD,GALA_DINNER_CHINESE_NY_ADULT,GALA_DINNER_CHINESE_NY_CHILD,GALA_DINNER_NY_DAY_ADULT,GALA_DINNER_NY_DAY_CHILD,GALA_DINNER_NY_EVE_ADULT,GALA_DINNER_NY_EVE_CHILD,GALA_DINNER_VALENTINES_DAY_ADULT,GALA_DINNER_VALENTINES_DAY_CHILD,GALA_DINNER_XMAS_DAY_ADULT,GALA_DINNER_XMAS_DAY_CHILD,GALA_DINNER_XMAS_EVE_ADULT,GALA_DINNER_XMAS_EVE_CHILD,RESORT_FEE_AMT,RESORT_FEE_PCNT,SANITATION_FEE,SEASONAL_HEATING_FEE,TOURISM_FEE_AMT,TOURISM_FEE_PCNT,TOWEL_SHEETS_FEE_AMT,TRANSFER_FEE_AMT_ADULT,TRANSFER_FEE_AMT_CHILD,UTILITY_SURCHARGE - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("City_LocalTax_Amt") - CITY_LOCAL_TAX_AMT("City_LocalTax_Amt"), - - @JsonProperty("City_LocalTax_Pcnt") - CITY_LOCAL_TAX_PCNT("City_LocalTax_Pcnt"), - - @JsonProperty("CleaningFee_Amt") - CLEANING_FEE_AMT("CleaningFee_Amt"), - - @JsonProperty("CleaningFee_Pcnt") - CLEANING_FEE_PCNT("CleaningFee_Pcnt"), - - @JsonProperty("ClubCardAdult") - CLUB_CARD_ADULT("ClubCardAdult"), - - @JsonProperty("ClubCardChild") - CLUB_CARD_CHILD("ClubCardChild"), + /* Type of mandatory fee. */ +@JsonProperty("Type") +val type: MandatoryFeesDetail.Type? = null, - @JsonProperty("DestinationFee_Amt") - DESTINATION_FEE_AMT("DestinationFee_Amt"), - - @JsonProperty("DestinationFee_Pcnt") - DESTINATION_FEE_PCNT("DestinationFee_Pcnt"), - - @JsonProperty("GalaDinnerAdult") - GALA_DINNER_ADULT("GalaDinnerAdult"), - - @JsonProperty("GalaDinnerChild") - GALA_DINNER_CHILD("GalaDinnerChild"), - - @JsonProperty("GalaDinnerChineseNYAdult") - GALA_DINNER_CHINESE_NY_ADULT("GalaDinnerChineseNYAdult"), - - @JsonProperty("GalaDinnerChineseNYChild") - GALA_DINNER_CHINESE_NY_CHILD("GalaDinnerChineseNYChild"), + @JsonProperty("Amount") +val amount: MandatoryFeesDetailAmount? = null +) { + - @JsonProperty("GalaDinnerNYDayAdult") - GALA_DINNER_NY_DAY_ADULT("GalaDinnerNYDayAdult"), - @JsonProperty("GalaDinnerNYDayChild") - GALA_DINNER_NY_DAY_CHILD("GalaDinnerNYDayChild"), + init { + - @JsonProperty("GalaDinnerNYEveAdult") - GALA_DINNER_NY_EVE_ADULT("GalaDinnerNYEveAdult"), - @JsonProperty("GalaDinnerNYEveChild") - GALA_DINNER_NY_EVE_CHILD("GalaDinnerNYEveChild"), - @JsonProperty("GalaDinnerValentinesDayAdult") - GALA_DINNER_VALENTINES_DAY_ADULT("GalaDinnerValentinesDayAdult"), - @JsonProperty("GalaDinnerValentinesDayChild") - GALA_DINNER_VALENTINES_DAY_CHILD("GalaDinnerValentinesDayChild"), - @JsonProperty("GalaDinnerXMASDayAdult") - GALA_DINNER_XMAS_DAY_ADULT("GalaDinnerXMASDayAdult"), - @JsonProperty("GalaDinnerXMASDayChild") - GALA_DINNER_XMAS_DAY_CHILD("GalaDinnerXMASDayChild"), - @JsonProperty("GalaDinnerXMASEveAdult") - GALA_DINNER_XMAS_EVE_ADULT("GalaDinnerXMASEveAdult"), - @JsonProperty("GalaDinnerXMASEveChild") - GALA_DINNER_XMAS_EVE_CHILD("GalaDinnerXMASEveChild"), - @JsonProperty("ResortFee_Amt") - RESORT_FEE_AMT("ResortFee_Amt"), - @JsonProperty("ResortFee_Pcnt") - RESORT_FEE_PCNT("ResortFee_Pcnt"), - @JsonProperty("SanitationFee") - SANITATION_FEE("SanitationFee"), - @JsonProperty("SeasonalHeatingFee") - SEASONAL_HEATING_FEE("SeasonalHeatingFee"), - @JsonProperty("TourismFee_Amt") - TOURISM_FEE_AMT("TourismFee_Amt"), - @JsonProperty("TourismFee_Pcnt") - TOURISM_FEE_PCNT("TourismFee_Pcnt"), + } - @JsonProperty("TowelSheetsFee_Amt") - TOWEL_SHEETS_FEE_AMT("TowelSheetsFee_Amt"), + companion object { + @JvmStatic + fun builder() = Builder() + } - @JsonProperty("TransferFee_Amt_Adult") - TRANSFER_FEE_AMT_ADULT("TransferFee_Amt_Adult"), + class Builder( + private var type: MandatoryFeesDetail.Type? = null, + private var amount: MandatoryFeesDetailAmount? = null + ) { + fun type(type: MandatoryFeesDetail.Type?) = apply { this.type = type } + fun amount(amount: MandatoryFeesDetailAmount?) = apply { this.amount = amount } - @JsonProperty("TransferFee_Amt_Child") - TRANSFER_FEE_AMT_CHILD("TransferFee_Amt_Child"), + fun build(): MandatoryFeesDetail { + val instance = MandatoryFeesDetail( + type = type, + amount = amount + ) - @JsonProperty("UtilitySurcharge") - UTILITY_SURCHARGE("UtilitySurcharge") + return instance + } } + + fun toBuilder() = Builder( + type = type, + amount = amount + ) + + /** + * Type of mandatory fee. + * Values: CITY_LOCAL_TAX_AMT,CITY_LOCAL_TAX_PCNT,CLEANING_FEE_AMT,CLEANING_FEE_PCNT,CLUB_CARD_ADULT,CLUB_CARD_CHILD,DESTINATION_FEE_AMT,DESTINATION_FEE_PCNT,GALA_DINNER_ADULT,GALA_DINNER_CHILD,GALA_DINNER_CHINESE_NY_ADULT,GALA_DINNER_CHINESE_NY_CHILD,GALA_DINNER_NY_DAY_ADULT,GALA_DINNER_NY_DAY_CHILD,GALA_DINNER_NY_EVE_ADULT,GALA_DINNER_NY_EVE_CHILD,GALA_DINNER_VALENTINES_DAY_ADULT,GALA_DINNER_VALENTINES_DAY_CHILD,GALA_DINNER_XMAS_DAY_ADULT,GALA_DINNER_XMAS_DAY_CHILD,GALA_DINNER_XMAS_EVE_ADULT,GALA_DINNER_XMAS_EVE_CHILD,RESORT_FEE_AMT,RESORT_FEE_PCNT,SANITATION_FEE,SEASONAL_HEATING_FEE,TOURISM_FEE_AMT,TOURISM_FEE_PCNT,TOWEL_SHEETS_FEE_AMT,TRANSFER_FEE_AMT_ADULT,TRANSFER_FEE_AMT_CHILD,UTILITY_SURCHARGE + */ + enum class Type(val value: kotlin.String) { + @JsonProperty("City_LocalTax_Amt") + CITY_LOCAL_TAX_AMT("City_LocalTax_Amt"), + + @JsonProperty("City_LocalTax_Pcnt") + CITY_LOCAL_TAX_PCNT("City_LocalTax_Pcnt"), + + @JsonProperty("CleaningFee_Amt") + CLEANING_FEE_AMT("CleaningFee_Amt"), + + @JsonProperty("CleaningFee_Pcnt") + CLEANING_FEE_PCNT("CleaningFee_Pcnt"), + + @JsonProperty("ClubCardAdult") + CLUB_CARD_ADULT("ClubCardAdult"), + + @JsonProperty("ClubCardChild") + CLUB_CARD_CHILD("ClubCardChild"), + + @JsonProperty("DestinationFee_Amt") + DESTINATION_FEE_AMT("DestinationFee_Amt"), + + @JsonProperty("DestinationFee_Pcnt") + DESTINATION_FEE_PCNT("DestinationFee_Pcnt"), + + @JsonProperty("GalaDinnerAdult") + GALA_DINNER_ADULT("GalaDinnerAdult"), + + @JsonProperty("GalaDinnerChild") + GALA_DINNER_CHILD("GalaDinnerChild"), + + @JsonProperty("GalaDinnerChineseNYAdult") + GALA_DINNER_CHINESE_NY_ADULT("GalaDinnerChineseNYAdult"), + + @JsonProperty("GalaDinnerChineseNYChild") + GALA_DINNER_CHINESE_NY_CHILD("GalaDinnerChineseNYChild"), + + @JsonProperty("GalaDinnerNYDayAdult") + GALA_DINNER_NY_DAY_ADULT("GalaDinnerNYDayAdult"), + + @JsonProperty("GalaDinnerNYDayChild") + GALA_DINNER_NY_DAY_CHILD("GalaDinnerNYDayChild"), + + @JsonProperty("GalaDinnerNYEveAdult") + GALA_DINNER_NY_EVE_ADULT("GalaDinnerNYEveAdult"), + + @JsonProperty("GalaDinnerNYEveChild") + GALA_DINNER_NY_EVE_CHILD("GalaDinnerNYEveChild"), + + @JsonProperty("GalaDinnerValentinesDayAdult") + GALA_DINNER_VALENTINES_DAY_ADULT("GalaDinnerValentinesDayAdult"), + + @JsonProperty("GalaDinnerValentinesDayChild") + GALA_DINNER_VALENTINES_DAY_CHILD("GalaDinnerValentinesDayChild"), + + @JsonProperty("GalaDinnerXMASDayAdult") + GALA_DINNER_XMAS_DAY_ADULT("GalaDinnerXMASDayAdult"), + + @JsonProperty("GalaDinnerXMASDayChild") + GALA_DINNER_XMAS_DAY_CHILD("GalaDinnerXMASDayChild"), + + @JsonProperty("GalaDinnerXMASEveAdult") + GALA_DINNER_XMAS_EVE_ADULT("GalaDinnerXMASEveAdult"), + + @JsonProperty("GalaDinnerXMASEveChild") + GALA_DINNER_XMAS_EVE_CHILD("GalaDinnerXMASEveChild"), + + @JsonProperty("ResortFee_Amt") + RESORT_FEE_AMT("ResortFee_Amt"), + + @JsonProperty("ResortFee_Pcnt") + RESORT_FEE_PCNT("ResortFee_Pcnt"), + + @JsonProperty("SanitationFee") + SANITATION_FEE("SanitationFee"), + + @JsonProperty("SeasonalHeatingFee") + SEASONAL_HEATING_FEE("SeasonalHeatingFee"), + + @JsonProperty("TourismFee_Amt") + TOURISM_FEE_AMT("TourismFee_Amt"), + + @JsonProperty("TourismFee_Pcnt") + TOURISM_FEE_PCNT("TourismFee_Pcnt"), + + @JsonProperty("TowelSheetsFee_Amt") + TOWEL_SHEETS_FEE_AMT("TowelSheetsFee_Amt"), + + @JsonProperty("TransferFee_Amt_Adult") + TRANSFER_FEE_AMT_ADULT("TransferFee_Amt_Adult"), + + @JsonProperty("TransferFee_Amt_Child") + TRANSFER_FEE_AMT_CHILD("TransferFee_Amt_Child"), + + @JsonProperty("UtilitySurcharge") + UTILITY_SURCHARGE("UtilitySurcharge"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt index 35a34ca46..cdc4f974b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class MandatoryFeesDetailAmount( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): MandatoryFeesDetailAmount { - val instance = - MandatoryFeesDetailAmount( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: MandatoryFeesDetailAmount) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): MandatoryFeesDetailAmount { + val instance = MandatoryFeesDetailAmount( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt index 9a0b0d119..0cc33c5ad 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt @@ -15,102 +15,109 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for hotel images - * @param type Supported type of media. 1=Image. Only 1 is supported now. - * @param title Image title - * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - * @param url Image URL + * @param type Supported type of media. 1=Image. Only 1 is supported now. + * @param title Image title + * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + * @param url Image URL */ data class Media( - // Supported type of media. 1=Image. Only 1 is supported now. - @JsonProperty("Type") - val type: Media.Type? = null, - // Image title - @JsonProperty("Title") - @field:Valid - val title: kotlin.String? = null, - // Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - @JsonProperty("Size") - @field:Valid - val propertySize: kotlin.String? = null, - // Image URL - @JsonProperty("Url") - @field:Valid - val url: kotlin.String? = null + /* Supported type of media. 1=Image. Only 1 is supported now. */ +@JsonProperty("Type") +val type: Media.Type? = null, + + /* Image title */ +@JsonProperty("Title") +val title: kotlin.String? = null, + + /* Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). */ +@JsonProperty("Size") +val propertySize: kotlin.String? = null, + + /* Image URL */ +@JsonProperty("Url") +val url: kotlin.String? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } - class Builder( - private var type: Media.Type? = null, - private var title: kotlin.String? = null, - private var propertySize: kotlin.String? = null, - private var url: kotlin.String? = null - ) { - fun type(type: Media.Type?) = apply { this.type = type } - - fun title(title: kotlin.String?) = apply { this.title = title } - - fun propertySize(propertySize: kotlin.String?) = apply { this.propertySize = propertySize } - - fun url(url: kotlin.String?) = apply { this.url = url } - - fun build(): Media { - val instance = - Media( - type = type, - title = title, - propertySize = propertySize, - url = url - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Media) { - 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}" } - ) - } - } + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var type: Media.Type? = null, + private var title: kotlin.String? = null, + private var propertySize: kotlin.String? = null, + private var url: kotlin.String? = null + ) { + fun type(type: Media.Type?) = apply { this.type = type } + fun title(title: kotlin.String?) = apply { this.title = title } + fun propertySize(propertySize: kotlin.String?) = apply { this.propertySize = propertySize } + fun url(url: kotlin.String?) = apply { this.url = url } + + fun build(): Media { + val instance = Media( type = type, title = title, propertySize = propertySize, url = url - ) - - /** - * Supported type of media. 1=Image. Only 1 is supported now. - * Values: _1 - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("1") - _1("1") + ) + + return instance } + } + + fun toBuilder() = Builder( + type = type, + title = title, + propertySize = propertySize, + url = url + ) + + /** + * Supported type of media. 1=Image. Only 1 is supported now. + * Values: _1 + */ + enum class Type(val value: kotlin.String) { + @JsonProperty("1") + _1("1"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt index 8be03c371..431270f16 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt @@ -15,87 +15,90 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.ExtraCostPerDistance + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * A list of charges to be levied based on the mileage driven. - * @param freeDistance - * @param freeDistanceRatePeriod Rate period for free distance. - * @param extraCostPerDistance + * @param freeDistance + * @param freeDistanceRatePeriod Rate period for free distance. + * @param extraCostPerDistance */ data class Mileage( - @JsonProperty("FreeDistance") - @field:NotNull - @field:Valid - val freeDistance: CarsDistance, - // Rate period for free distance. - @JsonProperty("FreeDistanceRatePeriod") - @field:NotNull - @field:Valid - val freeDistanceRatePeriod: kotlin.String, - @JsonProperty("ExtraCostPerDistance") - @field:Valid - val extraCostPerDistance: ExtraCostPerDistance? = null + @JsonProperty("FreeDistance") +val freeDistance: + CarsDistance +, + + /* Rate period for free distance. */ +@JsonProperty("FreeDistanceRatePeriod") +val freeDistanceRatePeriod: + kotlin.String +, + + @JsonProperty("ExtraCostPerDistance") +val extraCostPerDistance: ExtraCostPerDistance? = null ) { + + + + init { + require(freeDistance != null) { "freeDistance must not be null" } + + + + + + + + require(freeDistanceRatePeriod != null) { "freeDistanceRatePeriod must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var freeDistance: CarsDistance? = null, - private var freeDistanceRatePeriod: kotlin.String? = null, - private var extraCostPerDistance: ExtraCostPerDistance? = null - ) { - fun freeDistance(freeDistance: CarsDistance) = apply { this.freeDistance = freeDistance } - - fun freeDistanceRatePeriod(freeDistanceRatePeriod: kotlin.String) = apply { this.freeDistanceRatePeriod = freeDistanceRatePeriod } - - fun extraCostPerDistance(extraCostPerDistance: ExtraCostPerDistance?) = apply { this.extraCostPerDistance = extraCostPerDistance } - - fun build(): Mileage { - val instance = - Mileage( - freeDistance = freeDistance!!, - freeDistanceRatePeriod = freeDistanceRatePeriod!!, - extraCostPerDistance = extraCostPerDistance - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Mileage) { - 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}" } - ) - } - } + class Builder( + private var freeDistance: CarsDistance? = null, + private var freeDistanceRatePeriod: kotlin.String? = null, + private var extraCostPerDistance: ExtraCostPerDistance? = null + ) { + fun freeDistance(freeDistance: CarsDistance) = apply { this.freeDistance = freeDistance } + fun freeDistanceRatePeriod(freeDistanceRatePeriod: kotlin.String) = apply { this.freeDistanceRatePeriod = freeDistanceRatePeriod } + fun extraCostPerDistance(extraCostPerDistance: ExtraCostPerDistance?) = apply { this.extraCostPerDistance = extraCostPerDistance } + + fun build(): Mileage { + val instance = Mileage( + freeDistance = freeDistance!!, + freeDistanceRatePeriod = freeDistanceRatePeriod!!, + extraCostPerDistance = extraCostPerDistance + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( freeDistance = freeDistance!!, freeDistanceRatePeriod = freeDistanceRatePeriod!!, extraCostPerDistance = extraCostPerDistance - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt index 5993ace0d..b5d07eb2c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt @@ -15,83 +15,83 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Pricing information of the stat date - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class Money( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): Money { - val instance = - Money( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Money) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): Money { + val instance = Money( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt index e6188eb6f..fd16e58b6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. - * @param id Neighborhood id. - * @param name Neighborhood name. + * @param id Neighborhood id. + * @param name Neighborhood name. */ data class Neighborhood( - // Neighborhood id. - @JsonProperty("Id") - @field:Valid - val id: kotlin.String? = null, - // Neighborhood name. - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null + /* Neighborhood id. */ +@JsonProperty("Id") +val id: kotlin.String? = null, + + /* Neighborhood name. */ +@JsonProperty("Name") +val name: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - - fun name(name: kotlin.String?) = apply { this.name = name } - - fun build(): Neighborhood { - val instance = - Neighborhood( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Neighborhood) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null + ) { + fun id(id: kotlin.String?) = apply { this.id = id } + fun name(name: kotlin.String?) = apply { this.name = name } + + fun build(): Neighborhood { + val instance = Neighborhood( + id = id, + name = name + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id, name = name - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt index 8ddaf9f9e..9c88518ec 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt @@ -15,72 +15,67 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param stayDate - * @param baseRate +* + * @param stayDate + * @param baseRate */ data class NightlyRates( - @JsonProperty("StayDate") - val stayDate: java.time.LocalDate? = null, - @JsonProperty("BaseRate") - @field:Valid - val baseRate: Money? = null + @JsonProperty("StayDate") +val stayDate: java.time.LocalDate? = null, + + @JsonProperty("BaseRate") +val baseRate: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var stayDate: java.time.LocalDate? = null, - private var baseRate: Money? = null - ) { - fun stayDate(stayDate: java.time.LocalDate?) = apply { this.stayDate = stayDate } - - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - - fun build(): NightlyRates { - val instance = - NightlyRates( - stayDate = stayDate, - baseRate = baseRate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: NightlyRates) { - 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}" } - ) - } - } + class Builder( + private var stayDate: java.time.LocalDate? = null, + private var baseRate: Money? = null + ) { + fun stayDate(stayDate: java.time.LocalDate?) = apply { this.stayDate = stayDate } + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + + fun build(): NightlyRates { + val instance = NightlyRates( + stayDate = stayDate, + baseRate = baseRate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( stayDate = stayDate, baseRate = baseRate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt index 3a42d419a..ed9e42723 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt @@ -15,71 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** * Container for non-cancellable date and time range element - * @param startDateTime The time of this non-cancellable window starts - * @param endDateTime The time of this non-cancellable window ends + * @param startDateTime The time of this non-cancellable window starts + * @param endDateTime The time of this non-cancellable window ends */ data class NonCancellableDateTimeRange( - // The time of this non-cancellable window starts - @JsonProperty("StartDateTime") - val startDateTime: java.time.LocalDateTime, - // The time of this non-cancellable window ends - @JsonProperty("EndDateTime") - val endDateTime: java.time.LocalDateTime + /* The time of this non-cancellable window starts */ +@JsonProperty("StartDateTime") +val startDateTime: + java.time.LocalDateTime +, + + /* The time of this non-cancellable window ends */ +@JsonProperty("EndDateTime") +val endDateTime: + java.time.LocalDateTime + ) { + + + + init { + require(startDateTime != null) { "startDateTime must not be null" } + + + + + + + + require(endDateTime != null) { "endDateTime must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startDateTime: java.time.LocalDateTime? = null, - private var endDateTime: java.time.LocalDateTime? = null - ) { - fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } - - fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } - - fun build(): NonCancellableDateTimeRange { - val instance = - NonCancellableDateTimeRange( - startDateTime = startDateTime!!, - endDateTime = endDateTime!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: NonCancellableDateTimeRange) { - 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}" } - ) - } - } + class Builder( + private var startDateTime: java.time.LocalDateTime? = null, + private var endDateTime: java.time.LocalDateTime? = null + ) { + fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } + fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } + + fun build(): NonCancellableDateTimeRange { + val instance = NonCancellableDateTimeRange( + startDateTime = startDateTime!!, + endDateTime = endDateTime!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( startDateTime = startDateTime!!, endDateTime = endDateTime!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt index d91795002..a5ea239b8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt @@ -15,71 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** -* - * @param startDate Start date of a non-refundable date range. - * @param endDate End date of a non-refundable date range. +* + * @param startDate Start date of a non-refundable date range. + * @param endDate End date of a non-refundable date range. */ data class NonRefundableDateRange( - // Start date of a non-refundable date range. - @JsonProperty("StartDate") - val startDate: java.time.LocalDate? = null, - // End date of a non-refundable date range. - @JsonProperty("EndDate") - val endDate: java.time.LocalDate? = null + /* Start date of a non-refundable date range. */ +@JsonProperty("StartDate") +val startDate: java.time.LocalDate? = null, + + /* End date of a non-refundable date range. */ +@JsonProperty("EndDate") +val endDate: java.time.LocalDate? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null - ) { - fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - - fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } - - fun build(): NonRefundableDateRange { - val instance = - NonRefundableDateRange( - startDate = startDate, - endDate = endDate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: NonRefundableDateRange) { - 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}" } - ) - } - } + class Builder( + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null + ) { + fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } + fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } + + fun build(): NonRefundableDateRange { + val instance = NonRefundableDateRange( + startDate = startDate, + endDate = endDate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( startDate = startDate, endDate = endDate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt index b584ec378..3d2254981 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt @@ -15,73 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for the list of room occupants. - * @param adults The number of adults in a room. - * @param childAges The ages of children in a room. + * @param adults The number of adults in a room. + * @param childAges The ages of children in a room. */ data class Occupant( - // The number of adults in a room. - @JsonProperty("Adults") - val adults: kotlin.Int? = null, - // The ages of children in a room. - @JsonProperty("ChildAges") - @field:Valid - val childAges: kotlin.collections.List? = null + /* The number of adults in a room. */ +@JsonProperty("Adults") +val adults: kotlin.Int? = null, + + /* The ages of children in a room. */ +@JsonProperty("ChildAges") +val childAges: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var adults: kotlin.Int? = null, - private var childAges: kotlin.collections.List? = null - ) { - fun adults(adults: kotlin.Int?) = apply { this.adults = adults } - - fun childAges(childAges: kotlin.collections.List?) = apply { this.childAges = childAges } - - fun build(): Occupant { - val instance = - Occupant( - adults = adults, - childAges = childAges - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Occupant) { - 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}" } - ) - } - } + class Builder( + private var adults: kotlin.Int? = null, + private var childAges: kotlin.collections.List? = null + ) { + fun adults(adults: kotlin.Int?) = apply { this.adults = adults } + fun childAges(childAges: kotlin.collections.List?) = apply { this.childAges = childAges } + + fun build(): Occupant { + val instance = Occupant( + adults = adults, + childAges = childAges + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( adults = adults, childAges = childAges - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt index f93e8d44b..7cf739a83 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt @@ -15,127 +15,164 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesLink import com.expediagroup.sdk.xap.models.ActivitiesPrice import com.expediagroup.sdk.xap.models.AvailableTimeSlot + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Offers for the activity. - * @param id The numerical identifier for the offer. - * @param title A descriptive title for this offer. - * @param duration The anticipated time duration for the activity, e xpressed using Java JDK duration format. - * @param availableTimeSlots The list of available Time Slots for the activity. - * @param offerPrice - * @param description Description of this offer. - * @param links Container of HATEOAS URL's + * @param id The numerical identifier for the offer. + * @param title A descriptive title for this offer. + * @param duration The anticipated time duration for the activity, e xpressed using Java JDK duration format. + * @param availableTimeSlots The list of available Time Slots for the activity. + * @param offerPrice + * @param description Description of this offer. + * @param links Container of HATEOAS URL's */ data class Offer( - // The numerical identifier for the offer. - @JsonProperty("Id") - val id: kotlin.Int, - // A descriptive title for this offer. - @JsonProperty("Title") - @field:NotNull - @field:Valid - val title: kotlin.String, - // The anticipated time duration for the activity, e xpressed using Java JDK duration format. - @JsonProperty("Duration") - @field:NotNull - @field:Valid - val duration: kotlin.String, - // The list of available Time Slots for the activity. - @JsonProperty("AvailableTimeSlots") - @field:NotNull - @field:Valid - val availableTimeSlots: kotlin.collections - .List< - AvailableTimeSlot - >, - @JsonProperty("OfferPrice") - @field:NotNull - @field:Valid - val offerPrice: ActivitiesPrice, - // Description of this offer. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null, - // Container of HATEOAS URL's - @JsonProperty("Links") - @field:Valid - val links: kotlin.collections.Map? = null + /* The numerical identifier for the offer. */ +@JsonProperty("Id") +val id: + kotlin.Int +, + + /* A descriptive title for this offer. */ +@JsonProperty("Title") +val title: + kotlin.String +, + + /* The anticipated time duration for the activity, e xpressed using Java JDK duration format. */ +@JsonProperty("Duration") +val duration: + kotlin.String +, + + /* The list of available Time Slots for the activity. */ +@JsonProperty("AvailableTimeSlots") +val availableTimeSlots: + kotlin.collections. + List +< + AvailableTimeSlot +> + +, + + @JsonProperty("OfferPrice") +val offerPrice: + ActivitiesPrice +, + + /* Description of this offer. */ +@JsonProperty("Description") +val description: kotlin.String? = null, + + /* Container of HATEOAS URL's */ +@JsonProperty("Links") +val links: kotlin.collections.Map? = null ) { + + + + init { + require(id != null) { "id must not be null" } + + + + + + + + require(title != null) { "title must not be null" } + + + + + + + + require(duration != null) { "duration must not be null" } + + + + + + + + require(availableTimeSlots != null) { "availableTimeSlots must not be null" } + + + + + + + + require(offerPrice != null) { "offerPrice must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Int? = null, - private var title: kotlin.String? = null, - private var duration: kotlin.String? = null, - private var availableTimeSlots: kotlin.collections.List? = null, - private var offerPrice: ActivitiesPrice? = null, - private var description: kotlin.String? = null, - private var links: kotlin.collections.Map? = null - ) { - fun id(id: kotlin.Int) = apply { this.id = id } - - fun title(title: kotlin.String) = apply { this.title = title } - - fun duration(duration: kotlin.String) = apply { this.duration = duration } - - fun availableTimeSlots(availableTimeSlots: kotlin.collections.List) = apply { this.availableTimeSlots = availableTimeSlots } - - fun offerPrice(offerPrice: ActivitiesPrice) = apply { this.offerPrice = offerPrice } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun build(): Offer { - val instance = - Offer( - id = id!!, - title = title!!, - duration = duration!!, - availableTimeSlots = availableTimeSlots!!, - offerPrice = offerPrice!!, - description = description, - links = links - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Offer) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.Int? = null, + private var title: kotlin.String? = null, + private var duration: kotlin.String? = null, + private var availableTimeSlots: kotlin.collections.List? = null, + private var offerPrice: ActivitiesPrice? = null, + private var description: kotlin.String? = null, + private var links: kotlin.collections.Map? = null + ) { + fun id(id: kotlin.Int) = apply { this.id = id } + fun title(title: kotlin.String) = apply { this.title = title } + fun duration(duration: kotlin.String) = apply { this.duration = duration } + fun availableTimeSlots(availableTimeSlots: kotlin.collections.List) = apply { this.availableTimeSlots = availableTimeSlots } + fun offerPrice(offerPrice: ActivitiesPrice) = apply { this.offerPrice = offerPrice } + fun description(description: kotlin.String?) = apply { this.description = description } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + + fun build(): Offer { + val instance = Offer( + id = id!!, + title = title!!, + duration = duration!!, + availableTimeSlots = availableTimeSlots!!, + offerPrice = offerPrice!!, + description = description, + links = links + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id!!, title = title!!, duration = duration!!, @@ -143,5 +180,5 @@ data class Offer( offerPrice = offerPrice!!, description = description, links = links - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt index 1d9e08797..1024760c9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt @@ -15,73 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.PaymentSchedulePrice + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Contains information on the payment schedule. - * @param due Date/Time stamp when this installment/deposit should be paid by. - * @param price + * @param due Date/Time stamp when this installment/deposit should be paid by. + * @param price */ data class PaymentSchedule( - // Date/Time stamp when this installment/deposit should be paid by. - @JsonProperty("Due") - val due: java.time.LocalDate? = null, - @JsonProperty("Price") - @field:Valid - val price: PaymentSchedulePrice? = null + /* Date/Time stamp when this installment/deposit should be paid by. */ +@JsonProperty("Due") +val due: java.time.LocalDate? = null, + + @JsonProperty("Price") +val price: PaymentSchedulePrice? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var due: java.time.LocalDate? = null, - private var price: PaymentSchedulePrice? = null - ) { - fun due(due: java.time.LocalDate?) = apply { this.due = due } - - fun price(price: PaymentSchedulePrice?) = apply { this.price = price } - - fun build(): PaymentSchedule { - val instance = - PaymentSchedule( - due = due, - price = price - ) - - validate(instance) - - return instance - } - - private fun validate(instance: PaymentSchedule) { - 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}" } - ) - } - } + class Builder( + private var due: java.time.LocalDate? = null, + private var price: PaymentSchedulePrice? = null + ) { + fun due(due: java.time.LocalDate?) = apply { this.due = due } + fun price(price: PaymentSchedulePrice?) = apply { this.price = price } + + fun build(): PaymentSchedule { + val instance = PaymentSchedule( + due = due, + price = price + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( due = due, price = price - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt index a2fd05be0..9ad3be451 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class PaymentSchedulePrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): PaymentSchedulePrice { - val instance = - PaymentSchedulePrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: PaymentSchedulePrice) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): PaymentSchedulePrice { + val instance = PaymentSchedulePrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt index d7af587ad..181ddd9d5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt @@ -15,84 +15,93 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.PenaltyType + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for penalty rules - * @param penalty - * @param startDateTime The time when this penalty window starts - * @param endDateTime The time when this penalty window ends + * @param penalty + * @param startDateTime The time when this penalty window starts + * @param endDateTime The time when this penalty window ends */ data class PenaltyRule( - @JsonProperty("Penalty") - @field:NotNull - @field:Valid - val penalty: PenaltyType, - // The time when this penalty window starts - @JsonProperty("StartDateTime") - val startDateTime: java.time.LocalDateTime, - // The time when this penalty window ends - @JsonProperty("EndDateTime") - val endDateTime: java.time.LocalDateTime + @JsonProperty("Penalty") +val penalty: + PenaltyType +, + + /* The time when this penalty window starts */ +@JsonProperty("StartDateTime") +val startDateTime: + java.time.LocalDateTime +, + + /* The time when this penalty window ends */ +@JsonProperty("EndDateTime") +val endDateTime: + java.time.LocalDateTime + ) { + + + + init { + require(penalty != null) { "penalty must not be null" } + + + + + + + + require(startDateTime != null) { "startDateTime must not be null" } + + + + + + + + require(endDateTime != null) { "endDateTime must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var penalty: PenaltyType? = null, - private var startDateTime: java.time.LocalDateTime? = null, - private var endDateTime: java.time.LocalDateTime? = null - ) { - fun penalty(penalty: PenaltyType) = apply { this.penalty = penalty } - - fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } - - fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } - - fun build(): PenaltyRule { - val instance = - PenaltyRule( - penalty = penalty!!, - startDateTime = startDateTime!!, - endDateTime = endDateTime!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: PenaltyRule) { - 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}" } - ) - } - } + class Builder( + private var penalty: PenaltyType? = null, + private var startDateTime: java.time.LocalDateTime? = null, + private var endDateTime: java.time.LocalDateTime? = null + ) { + fun penalty(penalty: PenaltyType) = apply { this.penalty = penalty } + fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } + fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } + + fun build(): PenaltyRule { + val instance = PenaltyRule( + penalty = penalty!!, + startDateTime = startDateTime!!, + endDateTime = endDateTime!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( penalty = penalty!!, startDateTime = startDateTime!!, endDateTime = endDateTime!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt index 9e0c52065..26b07c37b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt @@ -15,88 +15,93 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for no show penalty element - * @param type What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. - * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a penalty. - * @param currency The currency of the amount, only valid when Type=AMOUNT + * @param type What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. + * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a penalty. + * @param currency The currency of the amount, only valid when Type=AMOUNT */ data class PenaltyType( - // What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. - @JsonProperty("Type") - @field:NotNull - @field:Valid - val type: kotlin.String, - // Value to indicate how many/much of the type listed above is going to be charged as a penalty. - @JsonProperty("Value") - @field:NotNull - @field:Valid - val `value`: kotlin.String, - // The currency of the amount, only valid when Type=AMOUNT - @JsonProperty("Currency") - @field:NotNull - @field:Valid - val currency: kotlin.String + /* What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. */ +@JsonProperty("Type") +val type: + kotlin.String +, + + /* Value to indicate how many/much of the type listed above is going to be charged as a penalty. */ +@JsonProperty("Value") +val `value`: + kotlin.String +, + + /* The currency of the amount, only valid when Type=AMOUNT */ +@JsonProperty("Currency") +val currency: + kotlin.String + ) { + + + + init { + require(type != null) { "type must not be null" } + + + + + + + + require(`value` != null) { "`value` must not be null" } + + + + + + + + require(currency != null) { "currency must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String) = apply { this.currency = currency } - - fun build(): PenaltyType { - val instance = - PenaltyType( - type = type!!, - `value` = `value`!!, - currency = currency!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: PenaltyType) { - 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}" } - ) - } - } + class Builder( + private var type: kotlin.String? = null, + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null + ) { + fun type(type: kotlin.String) = apply { this.type = type } + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String) = apply { this.currency = currency } + + fun build(): PenaltyType { + val instance = PenaltyType( + type = type!!, + `value` = `value`!!, + currency = currency!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( type = type!!, `value` = `value`!!, currency = currency!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt index 75ff08ed2..4e2a6da0a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt @@ -15,94 +15,100 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param countryCode The designated country calling code. - * @param areaCode The phone's area code. - * @param number The phone's local number. - * @param extensionNumber Optional extension number, if required to reach the hotel. +* + * @param countryCode The designated country calling code. + * @param areaCode The phone's area code. + * @param number The phone's local number. + * @param extensionNumber Optional extension number, if required to reach the hotel. */ data class Phone( - // The designated country calling code. - @JsonProperty("CountryCode") - @field:Valid - val countryCode: kotlin.String? = null, - // The phone's area code. - @JsonProperty("AreaCode") - @field:Valid - val areaCode: kotlin.String? = null, - // The phone's local number. - @JsonProperty("Number") - @field:Valid - val number: kotlin.String? = null, - // Optional extension number, if required to reach the hotel. - @JsonProperty("ExtensionNumber") - @field:Valid - val extensionNumber: kotlin.String? = null + /* The designated country calling code. */ +@JsonProperty("CountryCode") +val countryCode: kotlin.String? = null, + + /* The phone's area code. */ +@JsonProperty("AreaCode") +val areaCode: kotlin.String? = null, + + /* The phone's local number. */ +@JsonProperty("Number") +val number: kotlin.String? = null, + + /* Optional extension number, if required to reach the hotel. */ +@JsonProperty("ExtensionNumber") +val extensionNumber: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var countryCode: kotlin.String? = null, - private var areaCode: kotlin.String? = null, - private var number: kotlin.String? = null, - private var extensionNumber: kotlin.String? = null - ) { - fun countryCode(countryCode: kotlin.String?) = apply { this.countryCode = countryCode } - - fun areaCode(areaCode: kotlin.String?) = apply { this.areaCode = areaCode } - - fun number(number: kotlin.String?) = apply { this.number = number } - - fun extensionNumber(extensionNumber: kotlin.String?) = apply { this.extensionNumber = extensionNumber } - - fun build(): Phone { - val instance = - Phone( - countryCode = countryCode, - areaCode = areaCode, - number = number, - extensionNumber = extensionNumber - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Phone) { - 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}" } - ) - } - } + class Builder( + private var countryCode: kotlin.String? = null, + private var areaCode: kotlin.String? = null, + private var number: kotlin.String? = null, + private var extensionNumber: kotlin.String? = null + ) { + fun countryCode(countryCode: kotlin.String?) = apply { this.countryCode = countryCode } + fun areaCode(areaCode: kotlin.String?) = apply { this.areaCode = areaCode } + fun number(number: kotlin.String?) = apply { this.number = number } + fun extensionNumber(extensionNumber: kotlin.String?) = apply { this.extensionNumber = extensionNumber } + + fun build(): Phone { + val instance = Phone( + countryCode = countryCode, + areaCode = areaCode, + number = number, + extensionNumber = extensionNumber + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( countryCode = countryCode, areaCode = areaCode, number = number, extensionNumber = extensionNumber - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt index 78c6381e6..30ae8a6a9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt @@ -15,103 +15,115 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Fault import com.expediagroup.sdk.xap.models.FileInfo + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param transactionId Unique identifier for each API response. - * @param error - * @param warning - * @param bestMatchedFile - * @param otherFileOptions Container for file Pre-signed download URL and informations. +* + * @param transactionId Unique identifier for each API response. + * @param error + * @param warning + * @param bestMatchedFile + * @param otherFileOptions Container for file Pre-signed download URL and informations. */ data class PresignedUrlResponse( - // Unique identifier for each API response. - @JsonProperty("transactionId") - @field:Valid - val transactionId: kotlin.String? = null, - @JsonProperty("error") - @field:Valid - val error: Fault? = null, - @JsonProperty("warning") - @field:Valid - val warning: Fault? = null, - @JsonProperty("bestMatchedFile") - @field:Valid - val bestMatchedFile: FileInfo? = null, - // Container for file Pre-signed download URL and informations. - @JsonProperty("otherFileOptions") - @field:Valid - val otherFileOptions: kotlin.collections.List? = null + /* Unique identifier for each API response. */ +@JsonProperty("transactionId") +val transactionId: kotlin.String? = null, + + @JsonProperty("error") +val error: Fault? = null, + + @JsonProperty("warning") +val warning: Fault? = null, + + @JsonProperty("bestMatchedFile") +val bestMatchedFile: FileInfo? = null, + + /* Container for file Pre-signed download URL and informations. */ +@JsonProperty("otherFileOptions") +val otherFileOptions: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var transactionId: kotlin.String? = null, - private var error: Fault? = null, - private var warning: Fault? = null, - private var bestMatchedFile: FileInfo? = null, - private var otherFileOptions: kotlin.collections.List? = null - ) { - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - - fun error(error: Fault?) = apply { this.error = error } - - fun warning(warning: Fault?) = apply { this.warning = warning } - - fun bestMatchedFile(bestMatchedFile: FileInfo?) = apply { this.bestMatchedFile = bestMatchedFile } - - fun otherFileOptions(otherFileOptions: kotlin.collections.List?) = apply { this.otherFileOptions = otherFileOptions } - - fun build(): PresignedUrlResponse { - val instance = - PresignedUrlResponse( - transactionId = transactionId, - error = error, - warning = warning, - bestMatchedFile = bestMatchedFile, - otherFileOptions = otherFileOptions - ) - - validate(instance) - - return instance - } - - private fun validate(instance: PresignedUrlResponse) { - 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}" } - ) - } - } + class Builder( + private var transactionId: kotlin.String? = null, + private var error: Fault? = null, + private var warning: Fault? = null, + private var bestMatchedFile: FileInfo? = null, + private var otherFileOptions: kotlin.collections.List? = null + ) { + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun error(error: Fault?) = apply { this.error = error } + fun warning(warning: Fault?) = apply { this.warning = warning } + fun bestMatchedFile(bestMatchedFile: FileInfo?) = apply { this.bestMatchedFile = bestMatchedFile } + fun otherFileOptions(otherFileOptions: kotlin.collections.List?) = apply { this.otherFileOptions = otherFileOptions } + + fun build(): PresignedUrlResponse { + val instance = PresignedUrlResponse( + transactionId = transactionId, + error = error, + warning = warning, + bestMatchedFile = bestMatchedFile, + otherFileOptions = otherFileOptions + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( transactionId = transactionId, error = error, warning = warning, bestMatchedFile = bestMatchedFile, otherFileOptions = otherFileOptions - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt index 05a56aa45..79eb0c98b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt @@ -15,102 +15,115 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Pricing information for the rental. - * @param totalPrice - * @param ratePeriodUnitPrice - * @param basePrice - * @param taxesAndFees - * @param totalPriceDueAtBooking + * @param totalPrice + * @param ratePeriodUnitPrice + * @param basePrice + * @param taxesAndFees + * @param totalPriceDueAtBooking */ data class Price( - @JsonProperty("TotalPrice") - @field:NotNull - @field:Valid - val totalPrice: CarsMoney, - @JsonProperty("RatePeriodUnitPrice") - @field:Valid - val ratePeriodUnitPrice: CarsMoney? = null, - @JsonProperty("BasePrice") - @field:Valid - val basePrice: CarsMoney? = null, - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: CarsMoney? = null, - @JsonProperty("TotalPriceDueAtBooking") - @field:Valid - val totalPriceDueAtBooking: CarsMoney? = null + @JsonProperty("TotalPrice") +val totalPrice: + CarsMoney +, + + @JsonProperty("RatePeriodUnitPrice") +val ratePeriodUnitPrice: CarsMoney? = null, + + @JsonProperty("BasePrice") +val basePrice: CarsMoney? = null, + + @JsonProperty("TaxesAndFees") +val taxesAndFees: CarsMoney? = null, + + @JsonProperty("TotalPriceDueAtBooking") +val totalPriceDueAtBooking: CarsMoney? = null ) { + + + + init { + require(totalPrice != null) { "totalPrice must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var totalPrice: CarsMoney? = null, - private var ratePeriodUnitPrice: CarsMoney? = null, - private var basePrice: CarsMoney? = null, - private var taxesAndFees: CarsMoney? = null, - private var totalPriceDueAtBooking: CarsMoney? = null - ) { - fun totalPrice(totalPrice: CarsMoney) = apply { this.totalPrice = totalPrice } - - fun ratePeriodUnitPrice(ratePeriodUnitPrice: CarsMoney?) = apply { this.ratePeriodUnitPrice = ratePeriodUnitPrice } - - fun basePrice(basePrice: CarsMoney?) = apply { this.basePrice = basePrice } - - fun taxesAndFees(taxesAndFees: CarsMoney?) = apply { this.taxesAndFees = taxesAndFees } - - fun totalPriceDueAtBooking(totalPriceDueAtBooking: CarsMoney?) = apply { this.totalPriceDueAtBooking = totalPriceDueAtBooking } - - fun build(): Price { - val instance = - Price( - totalPrice = totalPrice!!, - ratePeriodUnitPrice = ratePeriodUnitPrice, - basePrice = basePrice, - taxesAndFees = taxesAndFees, - totalPriceDueAtBooking = totalPriceDueAtBooking - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Price) { - 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}" } - ) - } - } + class Builder( + private var totalPrice: CarsMoney? = null, + private var ratePeriodUnitPrice: CarsMoney? = null, + private var basePrice: CarsMoney? = null, + private var taxesAndFees: CarsMoney? = null, + private var totalPriceDueAtBooking: CarsMoney? = null + ) { + fun totalPrice(totalPrice: CarsMoney) = apply { this.totalPrice = totalPrice } + fun ratePeriodUnitPrice(ratePeriodUnitPrice: CarsMoney?) = apply { this.ratePeriodUnitPrice = ratePeriodUnitPrice } + fun basePrice(basePrice: CarsMoney?) = apply { this.basePrice = basePrice } + fun taxesAndFees(taxesAndFees: CarsMoney?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPriceDueAtBooking(totalPriceDueAtBooking: CarsMoney?) = apply { this.totalPriceDueAtBooking = totalPriceDueAtBooking } + + fun build(): Price { + val instance = Price( + totalPrice = totalPrice!!, + ratePeriodUnitPrice = ratePeriodUnitPrice, + basePrice = basePrice, + taxesAndFees = taxesAndFees, + totalPriceDueAtBooking = totalPriceDueAtBooking + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( totalPrice = totalPrice!!, ratePeriodUnitPrice = ratePeriodUnitPrice, basePrice = basePrice, taxesAndFees = taxesAndFees, totalPriceDueAtBooking = totalPriceDueAtBooking - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt index 5345758ab..0af96b75d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.PromotionAmount + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param description The description of the promotion. - * @param amount +* + * @param description The description of the promotion. + * @param amount */ data class Promotion( - // The description of the promotion. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null, - @JsonProperty("Amount") - @field:Valid - val amount: PromotionAmount? = null + /* The description of the promotion. */ +@JsonProperty("Description") +val description: kotlin.String? = null, + + @JsonProperty("Amount") +val amount: PromotionAmount? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var description: kotlin.String? = null, - private var amount: PromotionAmount? = null - ) { - fun description(description: kotlin.String?) = apply { this.description = description } - - fun amount(amount: PromotionAmount?) = apply { this.amount = amount } - - fun build(): Promotion { - val instance = - Promotion( - description = description, - amount = amount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Promotion) { - 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}" } - ) - } - } + class Builder( + private var description: kotlin.String? = null, + private var amount: PromotionAmount? = null + ) { + fun description(description: kotlin.String?) = apply { this.description = description } + fun amount(amount: PromotionAmount?) = apply { this.amount = amount } + + fun build(): Promotion { + val instance = Promotion( + description = description, + amount = amount + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( description = description, amount = amount - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt index c0b3f9d8e..5581719ca 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class PromotionAmount( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): PromotionAmount { - val instance = - PromotionAmount( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: PromotionAmount) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): PromotionAmount { + val instance = PromotionAmount( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt index f9a345a74..9c42ead46 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt @@ -15,114 +15,115 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.LodgingRoomType + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for information on each offered hotel. - * @param id The unique property identifier used to designate a single property. - * @param status Represents whether the offer is currently available. - * @param roomTypes Container for all of available room types. + * @param id The unique property identifier used to designate a single property. + * @param status Represents whether the offer is currently available. + * @param roomTypes Container for all of available room types. */ data class Property( - // The unique property identifier used to designate a single property. - @JsonProperty("Id") - @field:Valid - val id: kotlin.String? = null, - // Represents whether the offer is currently available. - @JsonProperty("Status") - val status: Property.Status? = null, - // Container for all of available room types. - @JsonProperty("RoomTypes") - @field:Valid - val roomTypes: kotlin.collections.List? = null + /* The unique property identifier used to designate a single property. */ +@JsonProperty("Id") +val id: kotlin.String? = null, + + /* Represents whether the offer is currently available. */ +@JsonProperty("Status") +val status: Property.Status? = null, + + /* Container for all of available room types. */ +@JsonProperty("RoomTypes") +val roomTypes: kotlin.collections.List? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() - } + + + + init { + + + + + + + + - class Builder( - private var id: kotlin.String? = null, - private var status: Property.Status? = null, - private var roomTypes: kotlin.collections.List? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - - fun status(status: Property.Status?) = apply { this.status = status } - - fun roomTypes(roomTypes: kotlin.collections.List?) = apply { this.roomTypes = roomTypes } - - fun build(): Property { - val instance = - Property( - id = id, - status = status, - roomTypes = roomTypes - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Property) { - 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( - id = id, - status = status, - roomTypes = roomTypes - ) - /** - * Represents whether the offer is currently available. - * Values: AVAILABLE,NOT_AVAILABLE,ERROR,NUMBER_OF_ADULTS_NOT_ACCEPTED,NUMBER_OF_CHILDREN_NOT_ACCEPTED,NUMBER_OF_INFANTS_NOT_ACCEPTED,NUMBER_OF_PERSONS_NOT_ACCEPTED,CHECK_IN_AGE_NOT_ACCEPTED - */ - enum class Status(val value: kotlin.String) { - @JsonProperty("AVAILABLE") - AVAILABLE("AVAILABLE"), - @JsonProperty("NOT_AVAILABLE") - NOT_AVAILABLE("NOT_AVAILABLE"), - @JsonProperty("ERROR") - ERROR("ERROR"), - @JsonProperty("NUMBER_OF_ADULTS_NOT_ACCEPTED") - NUMBER_OF_ADULTS_NOT_ACCEPTED("NUMBER_OF_ADULTS_NOT_ACCEPTED"), - @JsonProperty("NUMBER_OF_CHILDREN_NOT_ACCEPTED") - NUMBER_OF_CHILDREN_NOT_ACCEPTED("NUMBER_OF_CHILDREN_NOT_ACCEPTED"), - @JsonProperty("NUMBER_OF_INFANTS_NOT_ACCEPTED") - NUMBER_OF_INFANTS_NOT_ACCEPTED("NUMBER_OF_INFANTS_NOT_ACCEPTED"), - @JsonProperty("NUMBER_OF_PERSONS_NOT_ACCEPTED") - NUMBER_OF_PERSONS_NOT_ACCEPTED("NUMBER_OF_PERSONS_NOT_ACCEPTED"), - @JsonProperty("CHECK_IN_AGE_NOT_ACCEPTED") - CHECK_IN_AGE_NOT_ACCEPTED("CHECK_IN_AGE_NOT_ACCEPTED") + + + + + } + + companion object { + @JvmStatic + fun builder() = Builder() } + + class Builder( + private var id: kotlin.String? = null, + private var status: Property.Status? = null, + private var roomTypes: kotlin.collections.List? = null + ) { + fun id(id: kotlin.String?) = apply { this.id = id } + fun status(status: Property.Status?) = apply { this.status = status } + fun roomTypes(roomTypes: kotlin.collections.List?) = apply { this.roomTypes = roomTypes } + + fun build(): Property { + val instance = Property( + id = id, + status = status, + roomTypes = roomTypes + ) + + return instance + } + } + + fun toBuilder() = Builder( + id = id, + status = status, + roomTypes = roomTypes + ) + + /** + * Represents whether the offer is currently available. + * Values: AVAILABLE,NOT_AVAILABLE,ERROR,NUMBER_OF_ADULTS_NOT_ACCEPTED,NUMBER_OF_CHILDREN_NOT_ACCEPTED,NUMBER_OF_INFANTS_NOT_ACCEPTED,NUMBER_OF_PERSONS_NOT_ACCEPTED,CHECK_IN_AGE_NOT_ACCEPTED + */ + enum class Status(val value: kotlin.String) { + @JsonProperty("AVAILABLE") + AVAILABLE("AVAILABLE"), + + @JsonProperty("NOT_AVAILABLE") + NOT_AVAILABLE("NOT_AVAILABLE"), + + @JsonProperty("ERROR") + ERROR("ERROR"), + + @JsonProperty("NUMBER_OF_ADULTS_NOT_ACCEPTED") + NUMBER_OF_ADULTS_NOT_ACCEPTED("NUMBER_OF_ADULTS_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_CHILDREN_NOT_ACCEPTED") + NUMBER_OF_CHILDREN_NOT_ACCEPTED("NUMBER_OF_CHILDREN_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_INFANTS_NOT_ACCEPTED") + NUMBER_OF_INFANTS_NOT_ACCEPTED("NUMBER_OF_INFANTS_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_PERSONS_NOT_ACCEPTED") + NUMBER_OF_PERSONS_NOT_ACCEPTED("NUMBER_OF_PERSONS_NOT_ACCEPTED"), + + @JsonProperty("CHECK_IN_AGE_NOT_ACCEPTED") + CHECK_IN_AGE_NOT_ACCEPTED("CHECK_IN_AGE_NOT_ACCEPTED"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt index 4c8d75231..1429692b2 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt @@ -15,115 +15,142 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.PropertyManager + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* Container for information about the hotel property detail. It will be shown for Vacation Rental hotel only. - * @param propertyRegistryNumber The registry number of property. - * @param hostLanguages The languages the host of property will speak. - * @param maxOccupancy The maximum number of guests allowed to stay in the property. - * @param numberOfBedrooms The number of bedrooms in the property. - * @param numberOfBathrooms The number of bathrooms in the property. - * @param squareFeet Property area in square feet. - * @param propertyManager +* Container for information about the hotel property detail. It will be shown for Vacation Rental hotel only. + * @param propertyRegistryNumber The registry number of property. + * @param hostLanguages The languages the host of property will speak. + * @param maxOccupancy The maximum number of guests allowed to stay in the property. + * @param numberOfBedrooms The number of bedrooms in the property. + * @param numberOfBathrooms The number of bathrooms in the property. + * @param squareFeet Property area in square feet. + * @param propertyManager */ data class PropertyDetails( - // The registry number of property. - @JsonProperty("PropertyRegistryNumber") - @field:Valid - val propertyRegistryNumber: kotlin.String? = null, - // The languages the host of property will speak. - @JsonProperty("HostLanguages") - @field:Valid - val hostLanguages: kotlin.collections.List? = null, - // The maximum number of guests allowed to stay in the property. - @JsonProperty("MaxOccupancy") - val maxOccupancy: kotlin.Int? = null, - // The number of bedrooms in the property. - @JsonProperty("NumberOfBedrooms") - val numberOfBedrooms: kotlin.Int? = null, - // The number of bathrooms in the property. - @JsonProperty("NumberOfBathrooms") - val numberOfBathrooms: kotlin.Int? = null, - // Property area in square feet. - @JsonProperty("SquareFeet") - @field:Valid - val squareFeet: kotlin.String? = null, - @JsonProperty("PropertyManager") - @field:Valid - val propertyManager: PropertyManager? = null + /* The registry number of property. */ +@JsonProperty("PropertyRegistryNumber") +val propertyRegistryNumber: kotlin.String? = null, + + /* The languages the host of property will speak. */ +@JsonProperty("HostLanguages") +val hostLanguages: kotlin.collections.List? = null, + + /* The maximum number of guests allowed to stay in the property. */ +@JsonProperty("MaxOccupancy") +val maxOccupancy: kotlin.Int? = null, + + /* The number of bedrooms in the property. */ +@JsonProperty("NumberOfBedrooms") +val numberOfBedrooms: kotlin.Int? = null, + + /* The number of bathrooms in the property. */ +@JsonProperty("NumberOfBathrooms") +val numberOfBathrooms: kotlin.Int? = null, + + /* Property area in square feet. */ +@JsonProperty("SquareFeet") +val squareFeet: kotlin.String? = null, + + @JsonProperty("PropertyManager") +val propertyManager: PropertyManager? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var propertyRegistryNumber: kotlin.String? = null, - private var hostLanguages: kotlin.collections.List? = null, - private var maxOccupancy: kotlin.Int? = null, - private var numberOfBedrooms: kotlin.Int? = null, - private var numberOfBathrooms: kotlin.Int? = null, - private var squareFeet: kotlin.String? = null, - private var propertyManager: PropertyManager? = null - ) { - fun propertyRegistryNumber(propertyRegistryNumber: kotlin.String?) = apply { this.propertyRegistryNumber = propertyRegistryNumber } - - fun hostLanguages(hostLanguages: kotlin.collections.List?) = apply { this.hostLanguages = hostLanguages } - - fun maxOccupancy(maxOccupancy: kotlin.Int?) = apply { this.maxOccupancy = maxOccupancy } - - fun numberOfBedrooms(numberOfBedrooms: kotlin.Int?) = apply { this.numberOfBedrooms = numberOfBedrooms } - - fun numberOfBathrooms(numberOfBathrooms: kotlin.Int?) = apply { this.numberOfBathrooms = numberOfBathrooms } - - fun squareFeet(squareFeet: kotlin.String?) = apply { this.squareFeet = squareFeet } - - fun propertyManager(propertyManager: PropertyManager?) = apply { this.propertyManager = propertyManager } - - fun build(): PropertyDetails { - val instance = - PropertyDetails( - propertyRegistryNumber = propertyRegistryNumber, - hostLanguages = hostLanguages, - maxOccupancy = maxOccupancy, - numberOfBedrooms = numberOfBedrooms, - numberOfBathrooms = numberOfBathrooms, - squareFeet = squareFeet, - propertyManager = propertyManager - ) - - validate(instance) - - return instance - } - - private fun validate(instance: PropertyDetails) { - 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}" } - ) - } - } + class Builder( + private var propertyRegistryNumber: kotlin.String? = null, + private var hostLanguages: kotlin.collections.List? = null, + private var maxOccupancy: kotlin.Int? = null, + private var numberOfBedrooms: kotlin.Int? = null, + private var numberOfBathrooms: kotlin.Int? = null, + private var squareFeet: kotlin.String? = null, + private var propertyManager: PropertyManager? = null + ) { + fun propertyRegistryNumber(propertyRegistryNumber: kotlin.String?) = apply { this.propertyRegistryNumber = propertyRegistryNumber } + fun hostLanguages(hostLanguages: kotlin.collections.List?) = apply { this.hostLanguages = hostLanguages } + fun maxOccupancy(maxOccupancy: kotlin.Int?) = apply { this.maxOccupancy = maxOccupancy } + fun numberOfBedrooms(numberOfBedrooms: kotlin.Int?) = apply { this.numberOfBedrooms = numberOfBedrooms } + fun numberOfBathrooms(numberOfBathrooms: kotlin.Int?) = apply { this.numberOfBathrooms = numberOfBathrooms } + fun squareFeet(squareFeet: kotlin.String?) = apply { this.squareFeet = squareFeet } + fun propertyManager(propertyManager: PropertyManager?) = apply { this.propertyManager = propertyManager } + + fun build(): PropertyDetails { + val instance = PropertyDetails( + propertyRegistryNumber = propertyRegistryNumber, + hostLanguages = hostLanguages, + maxOccupancy = maxOccupancy, + numberOfBedrooms = numberOfBedrooms, + numberOfBathrooms = numberOfBathrooms, + squareFeet = squareFeet, + propertyManager = propertyManager + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( propertyRegistryNumber = propertyRegistryNumber, hostLanguages = hostLanguages, maxOccupancy = maxOccupancy, @@ -131,5 +158,5 @@ data class PropertyDetails( numberOfBathrooms = numberOfBathrooms, squareFeet = squareFeet, propertyManager = propertyManager - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt index 0888282ac..fde690382 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt @@ -15,83 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for information about the property manager. It will be shown for Vacation Rental hotel only. - * @param name The name of the property manager. - * @param calendarLastUpdated The latest updated date. - * @param photoUrl The URL for property manager's photo. + * @param name The name of the property manager. + * @param calendarLastUpdated The latest updated date. + * @param photoUrl The URL for property manager's photo. */ data class PropertyManager( - // The name of the property manager. - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null, - // The latest updated date. - @JsonProperty("CalendarLastUpdated") - val calendarLastUpdated: java.time.LocalDate? = null, - // The URL for property manager's photo. - @JsonProperty("PhotoUrl") - @field:Valid - val photoUrl: kotlin.String? = null + /* The name of the property manager. */ +@JsonProperty("Name") +val name: kotlin.String? = null, + + /* The latest updated date. */ +@JsonProperty("CalendarLastUpdated") +val calendarLastUpdated: java.time.LocalDate? = null, + + /* The URL for property manager's photo. */ +@JsonProperty("PhotoUrl") +val photoUrl: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var calendarLastUpdated: java.time.LocalDate? = null, - private var photoUrl: kotlin.String? = null - ) { - fun name(name: kotlin.String?) = apply { this.name = name } - - fun calendarLastUpdated(calendarLastUpdated: java.time.LocalDate?) = apply { this.calendarLastUpdated = calendarLastUpdated } - - fun photoUrl(photoUrl: kotlin.String?) = apply { this.photoUrl = photoUrl } - - fun build(): PropertyManager { - val instance = - PropertyManager( - name = name, - calendarLastUpdated = calendarLastUpdated, - photoUrl = photoUrl - ) - - validate(instance) - - return instance - } - - private fun validate(instance: PropertyManager) { - 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}" } - ) - } - } + class Builder( + private var name: kotlin.String? = null, + private var calendarLastUpdated: java.time.LocalDate? = null, + private var photoUrl: kotlin.String? = null + ) { + fun name(name: kotlin.String?) = apply { this.name = name } + fun calendarLastUpdated(calendarLastUpdated: java.time.LocalDate?) = apply { this.calendarLastUpdated = calendarLastUpdated } + fun photoUrl(photoUrl: kotlin.String?) = apply { this.photoUrl = photoUrl } + + fun build(): PropertyManager { + val instance = PropertyManager( + name = name, + calendarLastUpdated = calendarLastUpdated, + photoUrl = photoUrl + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( name = name, calendarLastUpdated = calendarLastUpdated, photoUrl = photoUrl - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt index 6257d8428..3b3e3fd31 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt @@ -15,118 +15,127 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.RateCalendarPrice + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * The lowest rate information of requested days - * @param stayDate Stay date for which the price is returned. - * @param price - * @param priceLevel Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile - * @param status Represents whether the offer is currently available. + * @param stayDate Stay date for which the price is returned. + * @param price + * @param priceLevel Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile + * @param status Represents whether the offer is currently available. */ data class RateCalendar( - // Stay date for which the price is returned. - @JsonProperty("StayDate") - val stayDate: java.time.LocalDate? = null, - @JsonProperty("Price") - @field:Valid - val price: RateCalendarPrice? = null, - // Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile - @JsonProperty("PriceLevel") - val priceLevel: RateCalendar.PriceLevel? = null, - // Represents whether the offer is currently available. - @JsonProperty("Status") - val status: RateCalendar.Status? = null + /* Stay date for which the price is returned. */ +@JsonProperty("StayDate") +val stayDate: java.time.LocalDate? = null, + + @JsonProperty("Price") +val price: RateCalendarPrice? = null, + + /* Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile */ +@JsonProperty("PriceLevel") +val priceLevel: RateCalendar.PriceLevel? = null, + + /* Represents whether the offer is currently available. */ +@JsonProperty("Status") +val status: RateCalendar.Status? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } - class Builder( - private var stayDate: java.time.LocalDate? = null, - private var price: RateCalendarPrice? = null, - private var priceLevel: RateCalendar.PriceLevel? = null, - private var status: RateCalendar.Status? = null - ) { - fun stayDate(stayDate: java.time.LocalDate?) = apply { this.stayDate = stayDate } - - fun price(price: RateCalendarPrice?) = apply { this.price = price } - - fun priceLevel(priceLevel: RateCalendar.PriceLevel?) = apply { this.priceLevel = priceLevel } - - fun status(status: RateCalendar.Status?) = apply { this.status = status } - - fun build(): RateCalendar { - val instance = - RateCalendar( - stayDate = stayDate, - price = price, - priceLevel = priceLevel, - status = status - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RateCalendar) { - 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}" } - ) - } - } + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var stayDate: java.time.LocalDate? = null, + private var price: RateCalendarPrice? = null, + private var priceLevel: RateCalendar.PriceLevel? = null, + private var status: RateCalendar.Status? = null + ) { + fun stayDate(stayDate: java.time.LocalDate?) = apply { this.stayDate = stayDate } + fun price(price: RateCalendarPrice?) = apply { this.price = price } + fun priceLevel(priceLevel: RateCalendar.PriceLevel?) = apply { this.priceLevel = priceLevel } + fun status(status: RateCalendar.Status?) = apply { this.status = status } + + fun build(): RateCalendar { + val instance = RateCalendar( stayDate = stayDate, price = price, priceLevel = priceLevel, status = status - ) - - /** - * Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile - * Values: HIGH,MEDIUM,LOW - */ - enum class PriceLevel(val value: kotlin.String) { - @JsonProperty("HIGH") - HIGH("HIGH"), - - @JsonProperty("MEDIUM") - MEDIUM("MEDIUM"), + ) - @JsonProperty("LOW") - LOW("LOW") + return instance + } } - /** - * Represents whether the offer is currently available. - * Values: AVAILABLE,NOT_AVAILABLE - */ - enum class Status(val value: kotlin.String) { - @JsonProperty("AVAILABLE") - AVAILABLE("AVAILABLE"), + fun toBuilder() = Builder( + stayDate = stayDate, + price = price, + priceLevel = priceLevel, + status = status + ) + + /** + * Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile + * Values: HIGH,MEDIUM,LOW + */ + enum class PriceLevel(val value: kotlin.String) { + @JsonProperty("HIGH") + HIGH("HIGH"), + + @JsonProperty("MEDIUM") + MEDIUM("MEDIUM"), + + @JsonProperty("LOW") + LOW("LOW"); + } - @JsonProperty("NOT_AVAILABLE") - NOT_AVAILABLE("NOT_AVAILABLE") - } + /** + * Represents whether the offer is currently available. + * Values: AVAILABLE,NOT_AVAILABLE + */ + enum class Status(val value: kotlin.String) { + @JsonProperty("AVAILABLE") + AVAILABLE("AVAILABLE"), + + @JsonProperty("NOT_AVAILABLE") + NOT_AVAILABLE("NOT_AVAILABLE"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt index 9f12f0595..84a10492e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The total price of the corresponding date. - * @param currency The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. - * @param localCurrencyPrice +* + * @param `value` The total price of the corresponding date. + * @param currency The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. + * @param localCurrencyPrice */ data class RateCalendarPrice( - // The total price of the corresponding date. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.Any? = null, - // The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.Any? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The total price of the corresponding date. */ +@JsonProperty("Value") +val `value`: kotlin.Any? = null, + + /* The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. */ +@JsonProperty("Currency") +val currency: kotlin.Any? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.Any? = null, - private var currency: kotlin.Any? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.Any?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.Any?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RateCalendarPrice { - val instance = - RateCalendarPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RateCalendarPrice) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.Any? = null, + private var currency: kotlin.Any? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.Any?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.Any?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RateCalendarPrice { + val instance = RateCalendarPrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt index 8549fc41f..59dc9b930 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt @@ -15,86 +15,86 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.HotelRateCalendar import com.expediagroup.sdk.xap.models.Warning + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param transactionId Unique identifier for the transaction. - * @param rateCalendars Container for all hotel rate calendar data. +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param transactionId Unique identifier for the transaction. + * @param rateCalendars Container for all hotel rate calendar data. */ data class RateCalendarResponse( - // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - @JsonProperty("Warnings") - @field:Valid - val warnings: kotlin.collections.List? = null, - // Unique identifier for the transaction. - @JsonProperty("TransactionId") - @field:Valid - val transactionId: kotlin.String? = null, - // Container for all hotel rate calendar data. - @JsonProperty("RateCalendars") - @field:Valid - val rateCalendars: kotlin.collections.List? = null + /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ +@JsonProperty("Warnings") +val warnings: kotlin.collections.List? = null, + + /* Unique identifier for the transaction. */ +@JsonProperty("TransactionId") +val transactionId: kotlin.String? = null, + + /* Container for all hotel rate calendar data. */ +@JsonProperty("RateCalendars") +val rateCalendars: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null, - private var rateCalendars: kotlin.collections.List? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - - fun rateCalendars(rateCalendars: kotlin.collections.List?) = apply { this.rateCalendars = rateCalendars } - - fun build(): RateCalendarResponse { - val instance = - RateCalendarResponse( - warnings = warnings, - transactionId = transactionId, - rateCalendars = rateCalendars - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RateCalendarResponse) { - 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}" } - ) - } - } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + private var rateCalendars: kotlin.collections.List? = null + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun rateCalendars(rateCalendars: kotlin.collections.List?) = apply { this.rateCalendars = rateCalendars } + + fun build(): RateCalendarResponse { + val instance = RateCalendarResponse( + warnings = warnings, + transactionId = transactionId, + rateCalendars = rateCalendars + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( warnings = warnings, transactionId = transactionId, rateCalendars = rateCalendars - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt index 9512a7fa8..ccd4eaebb 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt @@ -15,123 +15,150 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Discount import com.expediagroup.sdk.xap.models.Mileage + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The rate detail information for a car offer. - * @param ratePeriod Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend - * @param prePay Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). - * @param rateCode Rate plan identifier. - * @param creditCardRequired Indicates whether credit card is required for booking. - * @param discounts List of discount information. - * @param mileages A list of charges to be levied based on the mileage driven. - * @param mobileRate Indicates whether car offer is mobile rate. + * @param ratePeriod Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend + * @param prePay Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). + * @param rateCode Rate plan identifier. + * @param creditCardRequired Indicates whether credit card is required for booking. + * @param discounts List of discount information. + * @param mileages A list of charges to be levied based on the mileage driven. + * @param mobileRate Indicates whether car offer is mobile rate. */ data class RateDetails( - // Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend - @JsonProperty("RatePeriod") - @field:NotNull - @field:Valid - val ratePeriod: kotlin.String, - // Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). - @JsonProperty("PrePay") - @field:NotNull - @field:Valid - val prePay: kotlin.Boolean, - // Rate plan identifier. - @JsonProperty("RateCode") - @field:Valid - val rateCode: kotlin.String? = null, - // Indicates whether credit card is required for booking. - @JsonProperty("CreditCardRequired") - @field:Valid - val creditCardRequired: kotlin.Boolean? = null, - // List of discount information. - @JsonProperty("Discounts") - @field:Valid - val discounts: kotlin.collections.List? = null, - // A list of charges to be levied based on the mileage driven. - @JsonProperty("Mileages") - @field:Valid - val mileages: kotlin.collections.List? = null, - // Indicates whether car offer is mobile rate. - @JsonProperty("MobileRate") - @field:Valid - val mobileRate: kotlin.Boolean? = null + /* Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend */ +@JsonProperty("RatePeriod") +val ratePeriod: + kotlin.String +, + + /* Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). */ +@JsonProperty("PrePay") +val prePay: + kotlin.Boolean +, + + /* Rate plan identifier. */ +@JsonProperty("RateCode") +val rateCode: kotlin.String? = null, + + /* Indicates whether credit card is required for booking. */ +@JsonProperty("CreditCardRequired") +val creditCardRequired: kotlin.Boolean? = null, + + /* List of discount information. */ +@JsonProperty("Discounts") +val discounts: kotlin.collections.List? = null, + + /* A list of charges to be levied based on the mileage driven. */ +@JsonProperty("Mileages") +val mileages: kotlin.collections.List? = null, + + /* Indicates whether car offer is mobile rate. */ +@JsonProperty("MobileRate") +val mobileRate: kotlin.Boolean? = null ) { + + + + init { + require(ratePeriod != null) { "ratePeriod must not be null" } + + + + + + + + require(prePay != null) { "prePay must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ratePeriod: kotlin.String? = null, - private var prePay: kotlin.Boolean? = null, - private var rateCode: kotlin.String? = null, - private var creditCardRequired: kotlin.Boolean? = null, - private var discounts: kotlin.collections.List? = null, - private var mileages: kotlin.collections.List? = null, - private var mobileRate: kotlin.Boolean? = null - ) { - fun ratePeriod(ratePeriod: kotlin.String) = apply { this.ratePeriod = ratePeriod } - - fun prePay(prePay: kotlin.Boolean) = apply { this.prePay = prePay } - - fun rateCode(rateCode: kotlin.String?) = apply { this.rateCode = rateCode } - - fun creditCardRequired(creditCardRequired: kotlin.Boolean?) = apply { this.creditCardRequired = creditCardRequired } - - fun discounts(discounts: kotlin.collections.List?) = apply { this.discounts = discounts } - - fun mileages(mileages: kotlin.collections.List?) = apply { this.mileages = mileages } - - fun mobileRate(mobileRate: kotlin.Boolean?) = apply { this.mobileRate = mobileRate } - - fun build(): RateDetails { - val instance = - RateDetails( - ratePeriod = ratePeriod!!, - prePay = prePay!!, - rateCode = rateCode, - creditCardRequired = creditCardRequired, - discounts = discounts, - mileages = mileages, - mobileRate = mobileRate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RateDetails) { - 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}" } - ) - } - } + class Builder( + private var ratePeriod: kotlin.String? = null, + private var prePay: kotlin.Boolean? = null, + private var rateCode: kotlin.String? = null, + private var creditCardRequired: kotlin.Boolean? = null, + private var discounts: kotlin.collections.List? = null, + private var mileages: kotlin.collections.List? = null, + private var mobileRate: kotlin.Boolean? = null + ) { + fun ratePeriod(ratePeriod: kotlin.String) = apply { this.ratePeriod = ratePeriod } + fun prePay(prePay: kotlin.Boolean) = apply { this.prePay = prePay } + fun rateCode(rateCode: kotlin.String?) = apply { this.rateCode = rateCode } + fun creditCardRequired(creditCardRequired: kotlin.Boolean?) = apply { this.creditCardRequired = creditCardRequired } + fun discounts(discounts: kotlin.collections.List?) = apply { this.discounts = discounts } + fun mileages(mileages: kotlin.collections.List?) = apply { this.mileages = mileages } + fun mobileRate(mobileRate: kotlin.Boolean?) = apply { this.mobileRate = mobileRate } + + fun build(): RateDetails { + val instance = RateDetails( + ratePeriod = ratePeriod!!, + prePay = prePay!!, + rateCode = rateCode, + creditCardRequired = creditCardRequired, + discounts = discounts, + mileages = mileages, + mobileRate = mobileRate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( ratePeriod = ratePeriod!!, prePay = prePay!!, rateCode = rateCode, @@ -139,5 +166,5 @@ data class RateDetails( discounts = discounts, mileages = mileages, mobileRate = mobileRate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt index 587d90622..9c79ecf29 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt @@ -15,7 +15,6 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CancellationPolicy import com.expediagroup.sdk.xap.models.PaymentSchedule import com.expediagroup.sdk.xap.models.Promotion @@ -23,299 +22,418 @@ import com.expediagroup.sdk.xap.models.RatePlanAmenitiesInner import com.expediagroup.sdk.xap.models.RatePlanPrice import com.expediagroup.sdk.xap.models.RatePlanStandalonePrice import com.expediagroup.sdk.xap.models.StayDates + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for information on each rate plan. - * @param roomTypeId The room type identifier. - * @param ratePlanId The rate plan identifier. - * @param rateRuleId The identifier of rate rule. - * @param inventorySourceId The identification number of the source that provides the rate plan. - * @param inventorySourceCode The source name that provided the rate plan. - * @param stayDates - * @param remainingCount The number of rooms remaining through Expedia for this room type. **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are more than 100 rooms available within bookable Expedia inventory. **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. - * @param price - * @param memberOnlyDeal Indicates whether the rate is for member only. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param promotions All promotion information of the `ratePlan`. - * @param standalonePrice - * @param taxesAndFeesInclusive Indicates whether taxes and fees are included in base rate. - * @param guaranteeText Text description for any deposit information provide by the property (if applicable). - * @param paymentMethod Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` - * @param paymentTime The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion - * @param fullDepositUponBooking It will be true if PaymentSchedule has one installment and the value of \"Due\" is booking date, otherwise, it will be false. - * @param paymentSchedule Contains information on the payment schedule. - * @param reserveWithDeposit Indicates whether this rate plan need deposit to reserve. - * @param freeInternet Indicates whether the price of the room includes free Internet. (either wireless or wired) - * @param freeWiFi Indicates whether the price of the room includes free wireless Internet access. - * @param freeInternetDetails The localized details for the free internet amenity (only shown when FreeInternet = true). You can find a link to the complete list of Free Internet Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - * @param freeParking Indicates whether the price of the room includes free parking. - * @param freeBreakfast Indicates whether the price of the room includes free breakfast. - * @param freeBreakfastDetails The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). You can find a link to the complete list of Free Breakfast Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - * @param hcomRewardsEarn Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) - * @param hcomRewardsBurn Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) - * @param cancellationPolicy - * @param amenities The amenities of the `rateplan`. + * @param roomTypeId The room type identifier. + * @param ratePlanId The rate plan identifier. + * @param rateRuleId The identifier of rate rule. + * @param inventorySourceId The identification number of the source that provides the rate plan. + * @param inventorySourceCode The source name that provided the rate plan. + * @param stayDates + * @param remainingCount The number of rooms remaining through Expedia for this room type. **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are more than 100 rooms available within bookable Expedia inventory. **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. + * @param price + * @param memberOnlyDeal Indicates whether the rate is for member only. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + * @param promotions All promotion information of the `ratePlan`. + * @param standalonePrice + * @param taxesAndFeesInclusive Indicates whether taxes and fees are included in base rate. + * @param guaranteeText Text description for any deposit information provide by the property (if applicable). + * @param paymentMethod Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` + * @param paymentTime The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion + * @param fullDepositUponBooking It will be true if PaymentSchedule has one installment and the value of \"Due\" is booking date, otherwise, it will be false. + * @param paymentSchedule Contains information on the payment schedule. + * @param reserveWithDeposit Indicates whether this rate plan need deposit to reserve. + * @param freeInternet Indicates whether the price of the room includes free Internet. (either wireless or wired) + * @param freeWiFi Indicates whether the price of the room includes free wireless Internet access. + * @param freeInternetDetails The localized details for the free internet amenity (only shown when FreeInternet = true). You can find a link to the complete list of Free Internet Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + * @param freeParking Indicates whether the price of the room includes free parking. + * @param freeBreakfast Indicates whether the price of the room includes free breakfast. + * @param freeBreakfastDetails The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). You can find a link to the complete list of Free Breakfast Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + * @param hcomRewardsEarn Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) + * @param hcomRewardsBurn Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) + * @param cancellationPolicy + * @param amenities The amenities of the `rateplan`. */ data class RatePlan( - // The room type identifier. - @JsonProperty("RoomTypeId") - @field:Valid - val roomTypeId: kotlin.String? = null, - // The rate plan identifier. - @JsonProperty("RatePlanId") - @field:Valid - val ratePlanId: kotlin.String? = null, - // The identifier of rate rule. - @JsonProperty("RateRuleId") - @field:Valid - val rateRuleId: kotlin.String? = null, - // The identification number of the source that provides the rate plan. - @JsonProperty("InventorySourceId") - @field:Valid - val inventorySourceId: kotlin.String? = null, - // The source name that provided the rate plan. - @JsonProperty("InventorySourceCode") - @field:Valid - val inventorySourceCode: kotlin.String? = null, - @JsonProperty("StayDates") - @field:Valid - val stayDates: StayDates? = null, - // The number of rooms remaining through Expedia for this room type. **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are more than 100 rooms available within bookable Expedia inventory. **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. - @JsonProperty("RemainingCount") - val remainingCount: kotlin.Int? = null, - @JsonProperty("Price") - @field:Valid - val price: RatePlanPrice? = null, - // Indicates whether the rate is for member only. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - @JsonProperty("MemberOnlyDeal") - @field:Valid - val memberOnlyDeal: kotlin.Boolean? = null, - // All promotion information of the `ratePlan`. - @JsonProperty("Promotions") - @field:Valid - val promotions: kotlin.collections.List? = null, - @JsonProperty("StandalonePrice") - @field:Valid - val standalonePrice: RatePlanStandalonePrice? = null, - // Indicates whether taxes and fees are included in base rate. - @JsonProperty("TaxesAndFeesInclusive") - @field:Valid - val taxesAndFeesInclusive: kotlin.Boolean? = null, - // Text description for any deposit information provide by the property (if applicable). - @JsonProperty("GuaranteeText") - @field:Valid - val guaranteeText: kotlin.String? = null, - // Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` - @JsonProperty("PaymentMethod") - val paymentMethod: RatePlan.PaymentMethod? = null, - // The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion - @JsonProperty("PaymentTime") - val paymentTime: RatePlan.PaymentTime? = null, - // It will be true if PaymentSchedule has one installment and the value of \"Due\" is booking date, otherwise, it will be false. - @JsonProperty("FullDepositUponBooking") - @field:Valid - val fullDepositUponBooking: kotlin.Boolean? = null, - // Contains information on the payment schedule. - @JsonProperty("PaymentSchedule") - @field:Valid - val paymentSchedule: kotlin.collections.List? = null, - // Indicates whether this rate plan need deposit to reserve. - @JsonProperty("ReserveWithDeposit") - @field:Valid - val reserveWithDeposit: kotlin.Boolean? = null, - // Indicates whether the price of the room includes free Internet. (either wireless or wired) - @JsonProperty("FreeInternet") - @field:Valid - val freeInternet: kotlin.Boolean? = null, - // Indicates whether the price of the room includes free wireless Internet access. - @JsonProperty("FreeWiFi") - @field:Valid - val freeWiFi: kotlin.Boolean? = null, - // The localized details for the free internet amenity (only shown when FreeInternet = true). You can find a link to the complete list of Free Internet Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - @JsonProperty("FreeInternetDetails") - @field:Valid - val freeInternetDetails: kotlin.collections.List? = null, - // Indicates whether the price of the room includes free parking. - @JsonProperty("FreeParking") - @field:Valid - val freeParking: kotlin.Boolean? = null, - // Indicates whether the price of the room includes free breakfast. - @JsonProperty("FreeBreakfast") - @field:Valid - val freeBreakfast: kotlin.Boolean? = null, - // The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). You can find a link to the complete list of Free Breakfast Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - @JsonProperty("FreeBreakfastDetails") - @field:Valid - val freeBreakfastDetails: kotlin.collections.List? = null, - // Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) - @JsonProperty("HcomRewardsEarn") - @field:Valid - val hcomRewardsEarn: kotlin.Boolean? = null, - // Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) - @JsonProperty("HcomRewardsBurn") - @field:Valid - val hcomRewardsBurn: kotlin.Boolean? = null, - @JsonProperty("CancellationPolicy") - @field:Valid - val cancellationPolicy: CancellationPolicy? = null, - // The amenities of the `rateplan`. - @JsonProperty("Amenities") - @field:Valid - val amenities: kotlin.collections.List? = null + /* The room type identifier. */ +@JsonProperty("RoomTypeId") +val roomTypeId: kotlin.String? = null, + + /* The rate plan identifier. */ +@JsonProperty("RatePlanId") +val ratePlanId: kotlin.String? = null, + + /* The identifier of rate rule. */ +@JsonProperty("RateRuleId") +val rateRuleId: kotlin.String? = null, + + /* The identification number of the source that provides the rate plan. */ +@JsonProperty("InventorySourceId") +val inventorySourceId: kotlin.String? = null, + + /* The source name that provided the rate plan. */ +@JsonProperty("InventorySourceCode") +val inventorySourceCode: kotlin.String? = null, + + @JsonProperty("StayDates") +val stayDates: StayDates? = null, + + /* The number of rooms remaining through Expedia for this room type. **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are more than 100 rooms available within bookable Expedia inventory. **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. */ +@JsonProperty("RemainingCount") +val remainingCount: kotlin.Int? = null, + + @JsonProperty("Price") +val price: RatePlanPrice? = null, + + /* Indicates whether the rate is for member only. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. */ +@JsonProperty("MemberOnlyDeal") +val memberOnlyDeal: kotlin.Boolean? = null, + + /* All promotion information of the `ratePlan`. */ +@JsonProperty("Promotions") +val promotions: kotlin.collections.List? = null, + + @JsonProperty("StandalonePrice") +val standalonePrice: RatePlanStandalonePrice? = null, + + /* Indicates whether taxes and fees are included in base rate. */ +@JsonProperty("TaxesAndFeesInclusive") +val taxesAndFeesInclusive: kotlin.Boolean? = null, + + /* Text description for any deposit information provide by the property (if applicable). */ +@JsonProperty("GuaranteeText") +val guaranteeText: kotlin.String? = null, + + /* Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` */ +@JsonProperty("PaymentMethod") +val paymentMethod: RatePlan.PaymentMethod? = null, + + /* The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion */ +@JsonProperty("PaymentTime") +val paymentTime: RatePlan.PaymentTime? = null, + + /* It will be true if PaymentSchedule has one installment and the value of \"Due\" is booking date, otherwise, it will be false. */ +@JsonProperty("FullDepositUponBooking") +val fullDepositUponBooking: kotlin.Boolean? = null, + + /* Contains information on the payment schedule. */ +@JsonProperty("PaymentSchedule") +val paymentSchedule: kotlin.collections.List? = null, + + /* Indicates whether this rate plan need deposit to reserve. */ +@JsonProperty("ReserveWithDeposit") +val reserveWithDeposit: kotlin.Boolean? = null, + + /* Indicates whether the price of the room includes free Internet. (either wireless or wired) */ +@JsonProperty("FreeInternet") +val freeInternet: kotlin.Boolean? = null, + + /* Indicates whether the price of the room includes free wireless Internet access. */ +@JsonProperty("FreeWiFi") +val freeWiFi: kotlin.Boolean? = null, + + /* The localized details for the free internet amenity (only shown when FreeInternet = true). You can find a link to the complete list of Free Internet Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). */ +@JsonProperty("FreeInternetDetails") +val freeInternetDetails: kotlin.collections.List? = null, + + /* Indicates whether the price of the room includes free parking. */ +@JsonProperty("FreeParking") +val freeParking: kotlin.Boolean? = null, + + /* Indicates whether the price of the room includes free breakfast. */ +@JsonProperty("FreeBreakfast") +val freeBreakfast: kotlin.Boolean? = null, + + /* The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). You can find a link to the complete list of Free Breakfast Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). */ +@JsonProperty("FreeBreakfastDetails") +val freeBreakfastDetails: kotlin.collections.List? = null, + + /* Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) */ +@JsonProperty("HcomRewardsEarn") +val hcomRewardsEarn: kotlin.Boolean? = null, + + /* Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) */ +@JsonProperty("HcomRewardsBurn") +val hcomRewardsBurn: kotlin.Boolean? = null, + + @JsonProperty("CancellationPolicy") +val cancellationPolicy: CancellationPolicy? = null, + + /* The amenities of the `rateplan`. */ +@JsonProperty("Amenities") +val amenities: kotlin.collections.List? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() - } + - class Builder( - private var roomTypeId: kotlin.String? = null, - private var ratePlanId: kotlin.String? = null, - private var rateRuleId: kotlin.String? = null, - private var inventorySourceId: kotlin.String? = null, - private var inventorySourceCode: kotlin.String? = null, - private var stayDates: StayDates? = null, - private var remainingCount: kotlin.Int? = null, - private var price: RatePlanPrice? = null, - private var memberOnlyDeal: kotlin.Boolean? = null, - private var promotions: kotlin.collections.List? = null, - private var standalonePrice: RatePlanStandalonePrice? = null, - private var taxesAndFeesInclusive: kotlin.Boolean? = null, - private var guaranteeText: kotlin.String? = null, - private var paymentMethod: RatePlan.PaymentMethod? = null, - private var paymentTime: RatePlan.PaymentTime? = null, - private var fullDepositUponBooking: kotlin.Boolean? = null, - private var paymentSchedule: kotlin.collections.List? = null, - private var reserveWithDeposit: kotlin.Boolean? = null, - private var freeInternet: kotlin.Boolean? = null, - private var freeWiFi: kotlin.Boolean? = null, - private var freeInternetDetails: kotlin.collections.List? = null, - private var freeParking: kotlin.Boolean? = null, - private var freeBreakfast: kotlin.Boolean? = null, - private var freeBreakfastDetails: kotlin.collections.List? = null, - private var hcomRewardsEarn: kotlin.Boolean? = null, - private var hcomRewardsBurn: kotlin.Boolean? = null, - private var cancellationPolicy: CancellationPolicy? = null, - private var amenities: kotlin.collections.List? = null - ) { - fun roomTypeId(roomTypeId: kotlin.String?) = apply { this.roomTypeId = roomTypeId } - - fun ratePlanId(ratePlanId: kotlin.String?) = apply { this.ratePlanId = ratePlanId } - fun rateRuleId(rateRuleId: kotlin.String?) = apply { this.rateRuleId = rateRuleId } + init { + - fun inventorySourceId(inventorySourceId: kotlin.String?) = apply { this.inventorySourceId = inventorySourceId } - fun inventorySourceCode(inventorySourceCode: kotlin.String?) = apply { this.inventorySourceCode = inventorySourceCode } - - fun stayDates(stayDates: StayDates?) = apply { this.stayDates = stayDates } - - fun remainingCount(remainingCount: kotlin.Int?) = apply { this.remainingCount = remainingCount } - - fun price(price: RatePlanPrice?) = apply { this.price = price } - - fun memberOnlyDeal(memberOnlyDeal: kotlin.Boolean?) = apply { this.memberOnlyDeal = memberOnlyDeal } - - fun promotions(promotions: kotlin.collections.List?) = apply { this.promotions = promotions } - - fun standalonePrice(standalonePrice: RatePlanStandalonePrice?) = apply { this.standalonePrice = standalonePrice } - - fun taxesAndFeesInclusive(taxesAndFeesInclusive: kotlin.Boolean?) = apply { this.taxesAndFeesInclusive = taxesAndFeesInclusive } - - fun guaranteeText(guaranteeText: kotlin.String?) = apply { this.guaranteeText = guaranteeText } - - fun paymentMethod(paymentMethod: RatePlan.PaymentMethod?) = apply { this.paymentMethod = paymentMethod } - - fun paymentTime(paymentTime: RatePlan.PaymentTime?) = apply { this.paymentTime = paymentTime } - - fun fullDepositUponBooking(fullDepositUponBooking: kotlin.Boolean?) = apply { this.fullDepositUponBooking = fullDepositUponBooking } - - fun paymentSchedule(paymentSchedule: kotlin.collections.List?) = apply { this.paymentSchedule = paymentSchedule } - - fun reserveWithDeposit(reserveWithDeposit: kotlin.Boolean?) = apply { this.reserveWithDeposit = reserveWithDeposit } - - fun freeInternet(freeInternet: kotlin.Boolean?) = apply { this.freeInternet = freeInternet } - - fun freeWiFi(freeWiFi: kotlin.Boolean?) = apply { this.freeWiFi = freeWiFi } - - fun freeInternetDetails(freeInternetDetails: kotlin.collections.List?) = apply { this.freeInternetDetails = freeInternetDetails } - - fun freeParking(freeParking: kotlin.Boolean?) = apply { this.freeParking = freeParking } - - fun freeBreakfast(freeBreakfast: kotlin.Boolean?) = apply { this.freeBreakfast = freeBreakfast } - - fun freeBreakfastDetails(freeBreakfastDetails: kotlin.collections.List?) = apply { this.freeBreakfastDetails = freeBreakfastDetails } - - fun hcomRewardsEarn(hcomRewardsEarn: kotlin.Boolean?) = apply { this.hcomRewardsEarn = hcomRewardsEarn } - - fun hcomRewardsBurn(hcomRewardsBurn: kotlin.Boolean?) = apply { this.hcomRewardsBurn = hcomRewardsBurn } - - fun cancellationPolicy(cancellationPolicy: CancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } - - fun amenities(amenities: kotlin.collections.List?) = apply { this.amenities = amenities } - - fun build(): RatePlan { - val instance = - RatePlan( - roomTypeId = roomTypeId, - ratePlanId = ratePlanId, - rateRuleId = rateRuleId, - inventorySourceId = inventorySourceId, - inventorySourceCode = inventorySourceCode, - stayDates = stayDates, - remainingCount = remainingCount, - price = price, - memberOnlyDeal = memberOnlyDeal, - promotions = promotions, - standalonePrice = standalonePrice, - taxesAndFeesInclusive = taxesAndFeesInclusive, - guaranteeText = guaranteeText, - paymentMethod = paymentMethod, - paymentTime = paymentTime, - fullDepositUponBooking = fullDepositUponBooking, - paymentSchedule = paymentSchedule, - reserveWithDeposit = reserveWithDeposit, - freeInternet = freeInternet, - freeWiFi = freeWiFi, - freeInternetDetails = freeInternetDetails, - freeParking = freeParking, - freeBreakfast = freeBreakfast, - freeBreakfastDetails = freeBreakfastDetails, - hcomRewardsEarn = hcomRewardsEarn, - hcomRewardsBurn = hcomRewardsBurn, - cancellationPolicy = cancellationPolicy, - amenities = amenities - ) - validate(instance) - return instance - } - private fun validate(instance: RatePlan) { - 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}" } - ) - } - } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var roomTypeId: kotlin.String? = null, + private var ratePlanId: kotlin.String? = null, + private var rateRuleId: kotlin.String? = null, + private var inventorySourceId: kotlin.String? = null, + private var inventorySourceCode: kotlin.String? = null, + private var stayDates: StayDates? = null, + private var remainingCount: kotlin.Int? = null, + private var price: RatePlanPrice? = null, + private var memberOnlyDeal: kotlin.Boolean? = null, + private var promotions: kotlin.collections.List? = null, + private var standalonePrice: RatePlanStandalonePrice? = null, + private var taxesAndFeesInclusive: kotlin.Boolean? = null, + private var guaranteeText: kotlin.String? = null, + private var paymentMethod: RatePlan.PaymentMethod? = null, + private var paymentTime: RatePlan.PaymentTime? = null, + private var fullDepositUponBooking: kotlin.Boolean? = null, + private var paymentSchedule: kotlin.collections.List? = null, + private var reserveWithDeposit: kotlin.Boolean? = null, + private var freeInternet: kotlin.Boolean? = null, + private var freeWiFi: kotlin.Boolean? = null, + private var freeInternetDetails: kotlin.collections.List? = null, + private var freeParking: kotlin.Boolean? = null, + private var freeBreakfast: kotlin.Boolean? = null, + private var freeBreakfastDetails: kotlin.collections.List? = null, + private var hcomRewardsEarn: kotlin.Boolean? = null, + private var hcomRewardsBurn: kotlin.Boolean? = null, + private var cancellationPolicy: CancellationPolicy? = null, + private var amenities: kotlin.collections.List? = null + ) { + fun roomTypeId(roomTypeId: kotlin.String?) = apply { this.roomTypeId = roomTypeId } + fun ratePlanId(ratePlanId: kotlin.String?) = apply { this.ratePlanId = ratePlanId } + fun rateRuleId(rateRuleId: kotlin.String?) = apply { this.rateRuleId = rateRuleId } + fun inventorySourceId(inventorySourceId: kotlin.String?) = apply { this.inventorySourceId = inventorySourceId } + fun inventorySourceCode(inventorySourceCode: kotlin.String?) = apply { this.inventorySourceCode = inventorySourceCode } + fun stayDates(stayDates: StayDates?) = apply { this.stayDates = stayDates } + fun remainingCount(remainingCount: kotlin.Int?) = apply { this.remainingCount = remainingCount } + fun price(price: RatePlanPrice?) = apply { this.price = price } + fun memberOnlyDeal(memberOnlyDeal: kotlin.Boolean?) = apply { this.memberOnlyDeal = memberOnlyDeal } + fun promotions(promotions: kotlin.collections.List?) = apply { this.promotions = promotions } + fun standalonePrice(standalonePrice: RatePlanStandalonePrice?) = apply { this.standalonePrice = standalonePrice } + fun taxesAndFeesInclusive(taxesAndFeesInclusive: kotlin.Boolean?) = apply { this.taxesAndFeesInclusive = taxesAndFeesInclusive } + fun guaranteeText(guaranteeText: kotlin.String?) = apply { this.guaranteeText = guaranteeText } + fun paymentMethod(paymentMethod: RatePlan.PaymentMethod?) = apply { this.paymentMethod = paymentMethod } + fun paymentTime(paymentTime: RatePlan.PaymentTime?) = apply { this.paymentTime = paymentTime } + fun fullDepositUponBooking(fullDepositUponBooking: kotlin.Boolean?) = apply { this.fullDepositUponBooking = fullDepositUponBooking } + fun paymentSchedule(paymentSchedule: kotlin.collections.List?) = apply { this.paymentSchedule = paymentSchedule } + fun reserveWithDeposit(reserveWithDeposit: kotlin.Boolean?) = apply { this.reserveWithDeposit = reserveWithDeposit } + fun freeInternet(freeInternet: kotlin.Boolean?) = apply { this.freeInternet = freeInternet } + fun freeWiFi(freeWiFi: kotlin.Boolean?) = apply { this.freeWiFi = freeWiFi } + fun freeInternetDetails(freeInternetDetails: kotlin.collections.List?) = apply { this.freeInternetDetails = freeInternetDetails } + fun freeParking(freeParking: kotlin.Boolean?) = apply { this.freeParking = freeParking } + fun freeBreakfast(freeBreakfast: kotlin.Boolean?) = apply { this.freeBreakfast = freeBreakfast } + fun freeBreakfastDetails(freeBreakfastDetails: kotlin.collections.List?) = apply { this.freeBreakfastDetails = freeBreakfastDetails } + fun hcomRewardsEarn(hcomRewardsEarn: kotlin.Boolean?) = apply { this.hcomRewardsEarn = hcomRewardsEarn } + fun hcomRewardsBurn(hcomRewardsBurn: kotlin.Boolean?) = apply { this.hcomRewardsBurn = hcomRewardsBurn } + fun cancellationPolicy(cancellationPolicy: CancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } + fun amenities(amenities: kotlin.collections.List?) = apply { this.amenities = amenities } + + fun build(): RatePlan { + val instance = RatePlan( roomTypeId = roomTypeId, ratePlanId = ratePlanId, rateRuleId = rateRuleId, @@ -344,32 +462,67 @@ data class RatePlan( hcomRewardsBurn = hcomRewardsBurn, cancellationPolicy = cancellationPolicy, amenities = amenities - ) - - /** - * Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` - * Values: ONLINE,HOTEL - */ - enum class PaymentMethod(val value: kotlin.String) { - @JsonProperty("Online") - ONLINE("Online"), - - @JsonProperty("Hotel") - HOTEL("Hotel") - } + ) - /** - * The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion - * Values: UPON_BOOKING,PAY_LATER,SUPPLIER_DISCRETION - */ - enum class PaymentTime(val value: kotlin.String) { - @JsonProperty("UponBooking") - UPON_BOOKING("UponBooking"), + return instance + } + } - @JsonProperty("PayLater") - PAY_LATER("PayLater"), + fun toBuilder() = Builder( + roomTypeId = roomTypeId, + ratePlanId = ratePlanId, + rateRuleId = rateRuleId, + inventorySourceId = inventorySourceId, + inventorySourceCode = inventorySourceCode, + stayDates = stayDates, + remainingCount = remainingCount, + price = price, + memberOnlyDeal = memberOnlyDeal, + promotions = promotions, + standalonePrice = standalonePrice, + taxesAndFeesInclusive = taxesAndFeesInclusive, + guaranteeText = guaranteeText, + paymentMethod = paymentMethod, + paymentTime = paymentTime, + fullDepositUponBooking = fullDepositUponBooking, + paymentSchedule = paymentSchedule, + reserveWithDeposit = reserveWithDeposit, + freeInternet = freeInternet, + freeWiFi = freeWiFi, + freeInternetDetails = freeInternetDetails, + freeParking = freeParking, + freeBreakfast = freeBreakfast, + freeBreakfastDetails = freeBreakfastDetails, + hcomRewardsEarn = hcomRewardsEarn, + hcomRewardsBurn = hcomRewardsBurn, + cancellationPolicy = cancellationPolicy, + amenities = amenities + ) + + /** + * Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` + * Values: ONLINE,HOTEL + */ + enum class PaymentMethod(val value: kotlin.String) { + @JsonProperty("Online") + ONLINE("Online"), + + @JsonProperty("Hotel") + HOTEL("Hotel"); + } - @JsonProperty("SupplierDiscretion") - SUPPLIER_DISCRETION("SupplierDiscretion") - } + /** + * The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion + * Values: UPON_BOOKING,PAY_LATER,SUPPLIER_DISCRETION + */ + enum class PaymentTime(val value: kotlin.String) { + @JsonProperty("UponBooking") + UPON_BOOKING("UponBooking"), + + @JsonProperty("PayLater") + PAY_LATER("PayLater"), + + @JsonProperty("SupplierDiscretion") + SUPPLIER_DISCRETION("SupplierDiscretion"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt index ff87f2ace..426bf6e2b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param id Amenity ID. - * @param name Amenity Name. +* + * @param id Amenity ID. + * @param name Amenity Name. */ data class RatePlanAmenitiesInner( - // Amenity ID. - @JsonProperty("Id") - @field:Valid - val id: kotlin.Any? = null, - // Amenity Name. - @JsonProperty("Name") - @field:Valid - val name: kotlin.Any? = null + /* Amenity ID. */ +@JsonProperty("Id") +val id: kotlin.Any? = null, + + /* Amenity Name. */ +@JsonProperty("Name") +val name: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - - fun name(name: kotlin.Any?) = apply { this.name = name } - - fun build(): RatePlanAmenitiesInner { - val instance = - RatePlanAmenitiesInner( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanAmenitiesInner) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.Any? = null, + private var name: kotlin.Any? = null + ) { + fun id(id: kotlin.Any?) = apply { this.id = id } + fun name(name: kotlin.Any?) = apply { this.name = name } + + fun build(): RatePlanAmenitiesInner { + val instance = RatePlanAmenitiesInner( + id = id, + name = name + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id, name = name - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt index 35491b951..9ad34231b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt @@ -15,158 +15,206 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money import com.expediagroup.sdk.xap.models.RatePlanPriceNightlyRatesInner import com.expediagroup.sdk.xap.models.RatePlanPriceTaxesAndFeesDetailsInner import com.expediagroup.sdk.xap.models.RoomRates + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for all price components of the rate plan. - * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. - * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. - * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. - * @param totalStrikeOutPrice The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. - * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyStrikeOutRate The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. - * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. - * @param refundableDamageDeposit The refundable damage deposit. - * @param nightlyRates Nightly base rate of the rate plan. - * @param taxesAndFeesDetails Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param roomRates Container for the rate information of all rooms. This is only returned in Lodging Details API. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. + * @param totalStrikeOutPrice The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. + * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. + * @param refundableDamageDeposit The refundable damage deposit. + * @param nightlyRates Nightly base rate of the rate plan. + * @param taxesAndFeesDetails Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + * @param roomRates Container for the rate information of all rooms. This is only returned in Lodging Details API. */ data class RatePlanPrice( - // The price of the rate plan for all occupants, excluding taxes and fees. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: Money? = null, - // The total rate of taxes and fees of the rate plan for all occupants. - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: Money? = null, - // The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: Money? = null, - // The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: Money? = null, - // The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: Money? = null, - // The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyStrikeOutRate") - @field:Valid - val avgNightlyStrikeOutRate: Money? = null, - // The total mandatory fees which will be charged at the hotel for the rate plan. - @JsonProperty("HotelMandatoryFees") - @field:Valid - val hotelMandatoryFees: Money? = null, - // The refundable damage deposit. - @JsonProperty("RefundableDamageDeposit") - @field:Valid - val refundableDamageDeposit: Money? = null, - // Nightly base rate of the rate plan. - @JsonProperty("NightlyRates") - @field:Valid - val nightlyRates: kotlin.collections.List? = null, - // Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - @JsonProperty("TaxesAndFeesDetails") - @field:Valid - val taxesAndFeesDetails: kotlin.collections.List? = null, - // Container for the rate information of all rooms. This is only returned in Lodging Details API. - @JsonProperty("RoomRates") - @field:Valid - val roomRates: kotlin.collections.List? = null + /* The price of the rate plan for all occupants, excluding taxes and fees. */ +@JsonProperty("BaseRate") +val baseRate: Money? = null, + + /* The total rate of taxes and fees of the rate plan for all occupants. */ +@JsonProperty("TaxesAndFees") +val taxesAndFees: Money? = null, + + /* The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. */ +@JsonProperty("TotalPrice") +val totalPrice: Money? = null, + + /* The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. */ +@JsonProperty("TotalStrikeOutPrice") +val totalStrikeOutPrice: Money? = null, + + /* The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyRate") +val avgNightlyRate: Money? = null, + + /* The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyStrikeOutRate") +val avgNightlyStrikeOutRate: Money? = null, + + /* The total mandatory fees which will be charged at the hotel for the rate plan. */ +@JsonProperty("HotelMandatoryFees") +val hotelMandatoryFees: Money? = null, + + /* The refundable damage deposit. */ +@JsonProperty("RefundableDamageDeposit") +val refundableDamageDeposit: Money? = null, + + /* Nightly base rate of the rate plan. */ +@JsonProperty("NightlyRates") +val nightlyRates: kotlin.collections.List? = null, + + /* Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. */ +@JsonProperty("TaxesAndFeesDetails") +val taxesAndFeesDetails: kotlin.collections.List? = null, + + /* Container for the rate information of all rooms. This is only returned in Lodging Details API. */ +@JsonProperty("RoomRates") +val roomRates: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var baseRate: Money? = null, - private var taxesAndFees: Money? = null, - private var totalPrice: Money? = null, - private var totalStrikeOutPrice: Money? = null, - private var avgNightlyRate: Money? = null, - private var avgNightlyStrikeOutRate: Money? = null, - private var hotelMandatoryFees: Money? = null, - private var refundableDamageDeposit: Money? = null, - private var nightlyRates: kotlin.collections.List? = null, - private var taxesAndFeesDetails: kotlin.collections.List? = null, - private var roomRates: kotlin.collections.List? = null - ) { - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - - fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - - fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - - fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - - fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - - fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } - - fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - - fun roomRates(roomRates: kotlin.collections.List?) = apply { this.roomRates = roomRates } - - fun build(): RatePlanPrice { - val instance = - RatePlanPrice( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - refundableDamageDeposit = refundableDamageDeposit, - nightlyRates = nightlyRates, - taxesAndFeesDetails = taxesAndFeesDetails, - roomRates = roomRates - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPrice) { - 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}" } - ) - } - } + class Builder( + private var baseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var refundableDamageDeposit: Money? = null, + private var nightlyRates: kotlin.collections.List? = null, + private var taxesAndFeesDetails: kotlin.collections.List? = null, + private var roomRates: kotlin.collections.List? = null + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } + fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } + fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } + fun roomRates(roomRates: kotlin.collections.List?) = apply { this.roomRates = roomRates } + + fun build(): RatePlanPrice { + val instance = RatePlanPrice( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + refundableDamageDeposit = refundableDamageDeposit, + nightlyRates = nightlyRates, + taxesAndFeesDetails = taxesAndFeesDetails, + roomRates = roomRates + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( baseRate = baseRate, taxesAndFees = taxesAndFees, totalPrice = totalPrice, @@ -178,5 +226,5 @@ data class RatePlanPrice( nightlyRates = nightlyRates, taxesAndFeesDetails = taxesAndFeesDetails, roomRates = roomRates - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt index 63eeca4f8..0508a52bc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param stayDate A single night during the requested stay. - * @param baseRate Container for nightly base rate. +* + * @param stayDate A single night during the requested stay. + * @param baseRate Container for nightly base rate. */ data class RatePlanPriceNightlyRatesInner( - // A single night during the requested stay. - @JsonProperty("StayDate") - @field:Valid - val stayDate: kotlin.Any? = null, - // Container for nightly base rate. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: kotlin.Any? = null + /* A single night during the requested stay. */ +@JsonProperty("StayDate") +val stayDate: kotlin.Any? = null, + + /* Container for nightly base rate. */ +@JsonProperty("BaseRate") +val baseRate: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var stayDate: kotlin.Any? = null, - private var baseRate: kotlin.Any? = null - ) { - fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } - - fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } - - fun build(): RatePlanPriceNightlyRatesInner { - val instance = - RatePlanPriceNightlyRatesInner( - stayDate = stayDate, - baseRate = baseRate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceNightlyRatesInner) { - 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}" } - ) - } - } + class Builder( + private var stayDate: kotlin.Any? = null, + private var baseRate: kotlin.Any? = null + ) { + fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } + fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } + + fun build(): RatePlanPriceNightlyRatesInner { + val instance = RatePlanPriceNightlyRatesInner( + stayDate = stayDate, + baseRate = baseRate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( stayDate = stayDate, baseRate = baseRate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt index 5edc4be41..cf0939aa7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param categoryCode Category ID of this specific tax or fee. - * @param amount The value of this specific tax or fee. +* + * @param categoryCode Category ID of this specific tax or fee. + * @param amount The value of this specific tax or fee. */ data class RatePlanPriceTaxesAndFeesDetailsInner( - // Category ID of this specific tax or fee. - @JsonProperty("CategoryCode") - @field:Valid - val categoryCode: kotlin.Any? = null, - // The value of this specific tax or fee. - @JsonProperty("Amount") - @field:Valid - val amount: kotlin.Any? = null + /* Category ID of this specific tax or fee. */ +@JsonProperty("CategoryCode") +val categoryCode: kotlin.Any? = null, + + /* The value of this specific tax or fee. */ +@JsonProperty("Amount") +val amount: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var categoryCode: kotlin.Any? = null, - private var amount: kotlin.Any? = null - ) { - fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } - - fun amount(amount: kotlin.Any?) = apply { this.amount = amount } - - fun build(): RatePlanPriceTaxesAndFeesDetailsInner { - val instance = - RatePlanPriceTaxesAndFeesDetailsInner( - categoryCode = categoryCode, - amount = amount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanPriceTaxesAndFeesDetailsInner) { - 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}" } - ) - } - } + class Builder( + private var categoryCode: kotlin.Any? = null, + private var amount: kotlin.Any? = null + ) { + fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } + fun amount(amount: kotlin.Any?) = apply { this.amount = amount } + + fun build(): RatePlanPriceTaxesAndFeesDetailsInner { + val instance = RatePlanPriceTaxesAndFeesDetailsInner( + categoryCode = categoryCode, + amount = amount + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( categoryCode = categoryCode, amount = amount - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt index f787c3d91..d009bdbcf 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt @@ -15,146 +15,188 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when the returned `rateplan` is being used as part of a package. - * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. - * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. - * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. - * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. - * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - * @param hotelMandatoryFees The total standalone mandatory fees. - * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. +* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when the returned `rateplan` is being used as part of a package. + * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. + * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. + * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. + * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. + * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total standalone mandatory fees. + * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. */ data class RatePlanStandalonePrice( - // The standalone price of the rate plan for all occupants, excluding taxes and fees. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: Money? = null, - // The base rate strikeout in the standalone shopping path. - @JsonProperty("StrikeOutBaseRate") - @field:Valid - val strikeOutBaseRate: Money? = null, - // The total standalone rate of taxes and fees of the rate plan for all occupants. - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: Money? = null, - // The taxes and fees strikeout in the standalone shopping path. - @JsonProperty("StrikeOutTaxesAndFees") - @field:Valid - val strikeOutTaxesAndFees: Money? = null, - // The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: Money? = null, - // The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: Money? = null, - // The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: Money? = null, - // The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyStrikeOutRate") - @field:Valid - val avgNightlyStrikeOutRate: Money? = null, - // The total standalone mandatory fees. - @JsonProperty("HotelMandatoryFees") - @field:Valid - val hotelMandatoryFees: Money? = null, - // The strikeout of the mandatory fees in the standalone shopping path. - @JsonProperty("StrikeOutHotelMandatoryFees") - @field:Valid - val strikeOutHotelMandatoryFees: Money? = null + /* The standalone price of the rate plan for all occupants, excluding taxes and fees. */ +@JsonProperty("BaseRate") +val baseRate: Money? = null, + + /* The base rate strikeout in the standalone shopping path. */ +@JsonProperty("StrikeOutBaseRate") +val strikeOutBaseRate: Money? = null, + + /* The total standalone rate of taxes and fees of the rate plan for all occupants. */ +@JsonProperty("TaxesAndFees") +val taxesAndFees: Money? = null, + + /* The taxes and fees strikeout in the standalone shopping path. */ +@JsonProperty("StrikeOutTaxesAndFees") +val strikeOutTaxesAndFees: Money? = null, + + /* The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. */ +@JsonProperty("TotalPrice") +val totalPrice: Money? = null, + + /* The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. */ +@JsonProperty("TotalStrikeOutPrice") +val totalStrikeOutPrice: Money? = null, + + /* The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyRate") +val avgNightlyRate: Money? = null, + + /* The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyStrikeOutRate") +val avgNightlyStrikeOutRate: Money? = null, + + /* The total standalone mandatory fees. */ +@JsonProperty("HotelMandatoryFees") +val hotelMandatoryFees: Money? = null, + + /* The strikeout of the mandatory fees in the standalone shopping path. */ +@JsonProperty("StrikeOutHotelMandatoryFees") +val strikeOutHotelMandatoryFees: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var baseRate: Money? = null, - private var strikeOutBaseRate: Money? = null, - private var taxesAndFees: Money? = null, - private var strikeOutTaxesAndFees: Money? = null, - private var totalPrice: Money? = null, - private var totalStrikeOutPrice: Money? = null, - private var avgNightlyRate: Money? = null, - private var avgNightlyStrikeOutRate: Money? = null, - private var hotelMandatoryFees: Money? = null, - private var strikeOutHotelMandatoryFees: Money? = null - ) { - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - - fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } - - fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - - fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } - - fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - - fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - - fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } - - fun build(): RatePlanStandalonePrice { - val instance = - RatePlanStandalonePrice( - baseRate = baseRate, - strikeOutBaseRate = strikeOutBaseRate, - taxesAndFees = taxesAndFees, - strikeOutTaxesAndFees = strikeOutTaxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatePlanStandalonePrice) { - 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}" } - ) - } - } + class Builder( + private var baseRate: Money? = null, + private var strikeOutBaseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var strikeOutTaxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var strikeOutHotelMandatoryFees: Money? = null + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } + + fun build(): RatePlanStandalonePrice { + val instance = RatePlanStandalonePrice( + baseRate = baseRate, + strikeOutBaseRate = strikeOutBaseRate, + taxesAndFees = taxesAndFees, + strikeOutTaxesAndFees = strikeOutTaxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( baseRate = baseRate, strikeOutBaseRate = strikeOutBaseRate, taxesAndFees = taxesAndFees, @@ -165,5 +207,5 @@ data class RatePlanStandalonePrice( avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, hotelMandatoryFees = hotelMandatoryFees, strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt index ad33e13a4..24e57f879 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt @@ -15,88 +15,91 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.RatingDetails + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The rating of the car being offered. - * @param ratingPercentage The percentage of rating. - * @param ratingCount The total count of rating. - * @param ratingDetails List of all the details of rating. + * @param ratingPercentage The percentage of rating. + * @param ratingCount The total count of rating. + * @param ratingDetails List of all the details of rating. */ data class Rating( - // The percentage of rating. - @JsonProperty("RatingPercentage") - @field:NotNull - @field:Valid - val ratingPercentage: kotlin.String, - // The total count of rating. - @JsonProperty("RatingCount") - @field:NotNull - @field:Valid - val ratingCount: kotlin.String, - // List of all the details of rating. - @JsonProperty("RatingDetails") - @field:Valid - val ratingDetails: kotlin.collections.List? = null + /* The percentage of rating. */ +@JsonProperty("RatingPercentage") +val ratingPercentage: + kotlin.String +, + + /* The total count of rating. */ +@JsonProperty("RatingCount") +val ratingCount: + kotlin.String +, + + /* List of all the details of rating. */ +@JsonProperty("RatingDetails") +val ratingDetails: kotlin.collections.List? = null ) { + + + + init { + require(ratingPercentage != null) { "ratingPercentage must not be null" } + + + + + + + + require(ratingCount != null) { "ratingCount must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ratingPercentage: kotlin.String? = null, - private var ratingCount: kotlin.String? = null, - private var ratingDetails: kotlin.collections.List? = null - ) { - fun ratingPercentage(ratingPercentage: kotlin.String) = apply { this.ratingPercentage = ratingPercentage } - - fun ratingCount(ratingCount: kotlin.String) = apply { this.ratingCount = ratingCount } - - fun ratingDetails(ratingDetails: kotlin.collections.List?) = apply { this.ratingDetails = ratingDetails } - - fun build(): Rating { - val instance = - Rating( - ratingPercentage = ratingPercentage!!, - ratingCount = ratingCount!!, - ratingDetails = ratingDetails - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Rating) { - 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}" } - ) - } - } + class Builder( + private var ratingPercentage: kotlin.String? = null, + private var ratingCount: kotlin.String? = null, + private var ratingDetails: kotlin.collections.List? = null + ) { + fun ratingPercentage(ratingPercentage: kotlin.String) = apply { this.ratingPercentage = ratingPercentage } + fun ratingCount(ratingCount: kotlin.String) = apply { this.ratingCount = ratingCount } + fun ratingDetails(ratingDetails: kotlin.collections.List?) = apply { this.ratingDetails = ratingDetails } + + fun build(): Rating { + val instance = Rating( + ratingPercentage = ratingPercentage!!, + ratingCount = ratingCount!!, + ratingDetails = ratingDetails + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( ratingPercentage = ratingPercentage!!, ratingCount = ratingCount!!, ratingDetails = ratingDetails - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt index c163d12c6..f8e95b18c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of all the details of rating. - * @param category The category of rating detail. - * @param percentage The percentage of rating detail category. + * @param category The category of rating detail. + * @param percentage The percentage of rating detail category. */ data class RatingDetails( - // The category of rating detail. - @JsonProperty("Category") - @field:NotNull - @field:Valid - val category: kotlin.String, - // The percentage of rating detail category. - @JsonProperty("Percentage") - @field:NotNull - @field:Valid - val percentage: kotlin.String + /* The category of rating detail. */ +@JsonProperty("Category") +val category: + kotlin.String +, + + /* The percentage of rating detail category. */ +@JsonProperty("Percentage") +val percentage: + kotlin.String + ) { + + + + init { + require(category != null) { "category must not be null" } + + + + + + + + require(percentage != null) { "percentage must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var category: kotlin.String? = null, - private var percentage: kotlin.String? = null - ) { - fun category(category: kotlin.String) = apply { this.category = category } - - fun percentage(percentage: kotlin.String) = apply { this.percentage = percentage } - - fun build(): RatingDetails { - val instance = - RatingDetails( - category = category!!, - percentage = percentage!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatingDetails) { - 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}" } - ) - } - } + class Builder( + private var category: kotlin.String? = null, + private var percentage: kotlin.String? = null + ) { + fun category(category: kotlin.String) = apply { this.category = category } + fun percentage(percentage: kotlin.String) = apply { this.percentage = percentage } + + fun build(): RatingDetails { + val instance = RatingDetails( + category = category!!, + percentage = percentage!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( category = category!!, percentage = percentage!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt index db2ebf10c..604ed8e35 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The rating of the car being offered. - * @param ratingPercentage The percentage of rating. - * @param ratingCount The total count of rating. + * @param ratingPercentage The percentage of rating. + * @param ratingCount The total count of rating. */ data class RatingWithoutDetails( - // The percentage of rating. - @JsonProperty("RatingPercentage") - @field:NotNull - @field:Valid - val ratingPercentage: kotlin.String, - // The total count of rating. - @JsonProperty("RatingCount") - @field:NotNull - @field:Valid - val ratingCount: kotlin.String + /* The percentage of rating. */ +@JsonProperty("RatingPercentage") +val ratingPercentage: + kotlin.String +, + + /* The total count of rating. */ +@JsonProperty("RatingCount") +val ratingCount: + kotlin.String + ) { + + + + init { + require(ratingPercentage != null) { "ratingPercentage must not be null" } + + + + + + + + require(ratingCount != null) { "ratingCount must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ratingPercentage: kotlin.String? = null, - private var ratingCount: kotlin.String? = null - ) { - fun ratingPercentage(ratingPercentage: kotlin.String) = apply { this.ratingPercentage = ratingPercentage } - - fun ratingCount(ratingCount: kotlin.String) = apply { this.ratingCount = ratingCount } - - fun build(): RatingWithoutDetails { - val instance = - RatingWithoutDetails( - ratingPercentage = ratingPercentage!!, - ratingCount = ratingCount!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RatingWithoutDetails) { - 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}" } - ) - } - } + class Builder( + private var ratingPercentage: kotlin.String? = null, + private var ratingCount: kotlin.String? = null + ) { + fun ratingPercentage(ratingPercentage: kotlin.String) = apply { this.ratingPercentage = ratingPercentage } + fun ratingCount(ratingCount: kotlin.String) = apply { this.ratingCount = ratingCount } + + fun build(): RatingWithoutDetails { + val instance = RatingWithoutDetails( + ratingPercentage = ratingPercentage!!, + ratingCount = ratingCount!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( ratingPercentage = ratingPercentage!!, ratingCount = ratingCount!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt index 84a6dabd8..d6c9e79e4 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt @@ -15,75 +15,69 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesLocation + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container of redemption information. - * @param type The type of redemption process associated to the activity. - * @param redemptionLocations List of redemption locations where the activity will take place, please refer to Location Section below. + * @param type The type of redemption process associated to the activity. + * @param redemptionLocations List of redemption locations where the activity will take place, please refer to Location Section below. */ data class Redemption( - // The type of redemption process associated to the activity. - @JsonProperty("Type") - @field:Valid - val type: kotlin.String? = null, - // List of redemption locations where the activity will take place, please refer to Location Section below. - @JsonProperty("RedemptionLocations") - @field:Valid - val redemptionLocations: kotlin.collections.List? = null + /* The type of redemption process associated to the activity. */ +@JsonProperty("Type") +val type: kotlin.String? = null, + + /* List of redemption locations where the activity will take place, please refer to Location Section below. */ +@JsonProperty("RedemptionLocations") +val redemptionLocations: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var redemptionLocations: kotlin.collections.List? = null - ) { - fun type(type: kotlin.String?) = apply { this.type = type } - - fun redemptionLocations(redemptionLocations: kotlin.collections.List?) = apply { this.redemptionLocations = redemptionLocations } - - fun build(): Redemption { - val instance = - Redemption( - type = type, - redemptionLocations = redemptionLocations - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Redemption) { - 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}" } - ) - } - } + class Builder( + private var type: kotlin.String? = null, + private var redemptionLocations: kotlin.collections.List? = null + ) { + fun type(type: kotlin.String?) = apply { this.type = type } + fun redemptionLocations(redemptionLocations: kotlin.collections.List?) = apply { this.redemptionLocations = redemptionLocations } + + fun build(): Redemption { + val instance = Redemption( + type = type, + redemptionLocations = redemptionLocations + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( type = type, redemptionLocations = redemptionLocations - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt index a7825136c..6aa163d44 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt @@ -15,84 +15,85 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container for the reference price used for strike out display. - * @param totalRate - * @param totalFees - * @param totalTaxesAndFees + * @param totalRate + * @param totalFees + * @param totalTaxesAndFees */ data class ReferencePrice( - @JsonProperty("TotalRate") - @field:NotNull - @field:Valid - val totalRate: ActivitiesMoney, - @JsonProperty("TotalFees") - @field:Valid - val totalFees: ActivitiesMoney? = null, - @JsonProperty("TotalTaxesAndFees") - @field:Valid - val totalTaxesAndFees: ActivitiesMoney? = null + @JsonProperty("TotalRate") +val totalRate: + ActivitiesMoney +, + + @JsonProperty("TotalFees") +val totalFees: ActivitiesMoney? = null, + + @JsonProperty("TotalTaxesAndFees") +val totalTaxesAndFees: ActivitiesMoney? = null ) { + + + + init { + require(totalRate != null) { "totalRate must not be null" } + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var totalRate: ActivitiesMoney? = null, - private var totalFees: ActivitiesMoney? = null, - private var totalTaxesAndFees: ActivitiesMoney? = null - ) { - fun totalRate(totalRate: ActivitiesMoney) = apply { this.totalRate = totalRate } - - fun totalFees(totalFees: ActivitiesMoney?) = apply { this.totalFees = totalFees } - - fun totalTaxesAndFees(totalTaxesAndFees: ActivitiesMoney?) = apply { this.totalTaxesAndFees = totalTaxesAndFees } - - fun build(): ReferencePrice { - val instance = - ReferencePrice( - totalRate = totalRate!!, - totalFees = totalFees, - totalTaxesAndFees = totalTaxesAndFees - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ReferencePrice) { - 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}" } - ) - } - } + class Builder( + private var totalRate: ActivitiesMoney? = null, + private var totalFees: ActivitiesMoney? = null, + private var totalTaxesAndFees: ActivitiesMoney? = null + ) { + fun totalRate(totalRate: ActivitiesMoney) = apply { this.totalRate = totalRate } + fun totalFees(totalFees: ActivitiesMoney?) = apply { this.totalFees = totalFees } + fun totalTaxesAndFees(totalTaxesAndFees: ActivitiesMoney?) = apply { this.totalTaxesAndFees = totalTaxesAndFees } + + fun build(): ReferencePrice { + val instance = ReferencePrice( + totalRate = totalRate!!, + totalFees = totalFees, + totalTaxesAndFees = totalTaxesAndFees + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( totalRate = totalRate!!, totalFees = totalFees, totalTaxesAndFees = totalTaxesAndFees - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt index da2313dc9..1c7262aa8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt @@ -15,76 +15,73 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Duration + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Limitations that are part of this rental agreement. - * @param minDuration - * @param maxDuration + * @param minDuration + * @param maxDuration */ data class RentalLimits( - @JsonProperty("MinDuration") - @field:NotNull - @field:Valid - val minDuration: Duration, - @JsonProperty("MaxDuration") - @field:NotNull - @field:Valid - val maxDuration: Duration + @JsonProperty("MinDuration") +val minDuration: + Duration +, + + @JsonProperty("MaxDuration") +val maxDuration: + Duration + ) { + + + + init { + require(minDuration != null) { "minDuration must not be null" } + + + + + + + + require(maxDuration != null) { "maxDuration must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var minDuration: Duration? = null, - private var maxDuration: Duration? = null - ) { - fun minDuration(minDuration: Duration) = apply { this.minDuration = minDuration } - - fun maxDuration(maxDuration: Duration) = apply { this.maxDuration = maxDuration } - - fun build(): RentalLimits { - val instance = - RentalLimits( - minDuration = minDuration!!, - maxDuration = maxDuration!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RentalLimits) { - 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}" } - ) - } - } + class Builder( + private var minDuration: Duration? = null, + private var maxDuration: Duration? = null + ) { + fun minDuration(minDuration: Duration) = apply { this.minDuration = minDuration } + fun maxDuration(maxDuration: Duration) = apply { this.maxDuration = maxDuration } + + fun build(): RentalLimits { + val instance = RentalLimits( + minDuration = minDuration!!, + maxDuration = maxDuration!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( minDuration = minDuration!!, maxDuration = maxDuration!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt index 8ec6edae8..bc7d086dc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt @@ -15,98 +15,109 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container of the Restrictions associated to this ticket. - * @param type Type of the Restriction. - * @param max Maximum value allowed for the restriction type. - * @param min Minimum value allowed for the restriction type. - * @param description The text to describe the restriction. + * @param type Type of the Restriction. + * @param max Maximum value allowed for the restriction type. + * @param min Minimum value allowed for the restriction type. + * @param description The text to describe the restriction. */ data class Restrictions( - // Type of the Restriction. - @JsonProperty("Type") - @field:NotNull - @field:Valid - val type: kotlin.String, - // Maximum value allowed for the restriction type. - @JsonProperty("Max") - @field:NotNull - @field:Valid - val max: kotlin.String, - // Minimum value allowed for the restriction type. - @JsonProperty("Min") - @field:NotNull - @field:Valid - val min: kotlin.String, - // The text to describe the restriction. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null + /* Type of the Restriction. */ +@JsonProperty("Type") +val type: + kotlin.String +, + + /* Maximum value allowed for the restriction type. */ +@JsonProperty("Max") +val max: + kotlin.String +, + + /* Minimum value allowed for the restriction type. */ +@JsonProperty("Min") +val min: + kotlin.String +, + + /* The text to describe the restriction. */ +@JsonProperty("Description") +val description: kotlin.String? = null ) { + + + + init { + require(type != null) { "type must not be null" } + + + + + + + + require(max != null) { "max must not be null" } + + + + + + + + require(min != null) { "min must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var max: kotlin.String? = null, - private var min: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - - fun max(max: kotlin.String) = apply { this.max = max } - - fun min(min: kotlin.String) = apply { this.min = min } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun build(): Restrictions { - val instance = - Restrictions( - type = type!!, - max = max!!, - min = min!!, - description = description - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Restrictions) { - 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}" } - ) - } - } + class Builder( + private var type: kotlin.String? = null, + private var max: kotlin.String? = null, + private var min: kotlin.String? = null, + private var description: kotlin.String? = null + ) { + fun type(type: kotlin.String) = apply { this.type = type } + fun max(max: kotlin.String) = apply { this.max = max } + fun min(min: kotlin.String) = apply { this.min = min } + fun description(description: kotlin.String?) = apply { this.description = description } + + fun build(): Restrictions { + val instance = Restrictions( + type = type!!, + max = max!!, + min = min!!, + description = description + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( type = type!!, max = max!!, min = min!!, description = description - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt index be4540479..0f03543b1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt @@ -11,16 +11,17 @@ data class Room( class Builder( private var adults: Long? = null, - private var childAges: List? = null + private var childAges: List? = null, ) { fun adults(adults: Long?) = apply { this.adults = adults } fun childAges(childAges: List?) = apply { this.childAges = childAges } - fun build(): Room = - Room( + fun build(): Room { + return Room( adults = this.adults, childAges = this.childAges ) + } } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt index 2e35a4285..df1b658a5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt @@ -15,101 +15,117 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.AgeClassRestriction + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Room occupancy policy. - * @param maxGuestCount The maximum number of guests allowed to stay in a room. - * @param minCheckInAge The minimum age required for check-in. - * @param includedGuestCount The number of guests included in base rate. - * @param minGuestAge The minimum age required for any guest staying in the room. - * @param ageClassRestrictions Container for room occupancy rules based on the age of the guests. + * @param maxGuestCount The maximum number of guests allowed to stay in a room. + * @param minCheckInAge The minimum age required for check-in. + * @param includedGuestCount The number of guests included in base rate. + * @param minGuestAge The minimum age required for any guest staying in the room. + * @param ageClassRestrictions Container for room occupancy rules based on the age of the guests. */ data class RoomOccupancyPolicy( - // The maximum number of guests allowed to stay in a room. - @JsonProperty("MaxGuestCount") - val maxGuestCount: kotlin.Int? = null, - // The minimum age required for check-in. - @JsonProperty("MinCheckInAge") - val minCheckInAge: kotlin.Int? = null, - // The number of guests included in base rate. - @JsonProperty("IncludedGuestCount") - val includedGuestCount: kotlin.Int? = null, - // The minimum age required for any guest staying in the room. - @JsonProperty("MinGuestAge") - val minGuestAge: kotlin.Int? = null, - // Container for room occupancy rules based on the age of the guests. - @JsonProperty("AgeClassRestrictions") - @field:Valid - val ageClassRestrictions: kotlin.collections.List? = null + /* The maximum number of guests allowed to stay in a room. */ +@JsonProperty("MaxGuestCount") +val maxGuestCount: kotlin.Int? = null, + + /* The minimum age required for check-in. */ +@JsonProperty("MinCheckInAge") +val minCheckInAge: kotlin.Int? = null, + + /* The number of guests included in base rate. */ +@JsonProperty("IncludedGuestCount") +val includedGuestCount: kotlin.Int? = null, + + /* The minimum age required for any guest staying in the room. */ +@JsonProperty("MinGuestAge") +val minGuestAge: kotlin.Int? = null, + + /* Container for room occupancy rules based on the age of the guests. */ +@JsonProperty("AgeClassRestrictions") +val ageClassRestrictions: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var maxGuestCount: kotlin.Int? = null, - private var minCheckInAge: kotlin.Int? = null, - private var includedGuestCount: kotlin.Int? = null, - private var minGuestAge: kotlin.Int? = null, - private var ageClassRestrictions: kotlin.collections.List? = null - ) { - fun maxGuestCount(maxGuestCount: kotlin.Int?) = apply { this.maxGuestCount = maxGuestCount } - - fun minCheckInAge(minCheckInAge: kotlin.Int?) = apply { this.minCheckInAge = minCheckInAge } - - fun includedGuestCount(includedGuestCount: kotlin.Int?) = apply { this.includedGuestCount = includedGuestCount } - - fun minGuestAge(minGuestAge: kotlin.Int?) = apply { this.minGuestAge = minGuestAge } - - fun ageClassRestrictions(ageClassRestrictions: kotlin.collections.List?) = apply { this.ageClassRestrictions = ageClassRestrictions } - - fun build(): RoomOccupancyPolicy { - val instance = - RoomOccupancyPolicy( - maxGuestCount = maxGuestCount, - minCheckInAge = minCheckInAge, - includedGuestCount = includedGuestCount, - minGuestAge = minGuestAge, - ageClassRestrictions = ageClassRestrictions - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomOccupancyPolicy) { - 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}" } - ) - } - } + class Builder( + private var maxGuestCount: kotlin.Int? = null, + private var minCheckInAge: kotlin.Int? = null, + private var includedGuestCount: kotlin.Int? = null, + private var minGuestAge: kotlin.Int? = null, + private var ageClassRestrictions: kotlin.collections.List? = null + ) { + fun maxGuestCount(maxGuestCount: kotlin.Int?) = apply { this.maxGuestCount = maxGuestCount } + fun minCheckInAge(minCheckInAge: kotlin.Int?) = apply { this.minCheckInAge = minCheckInAge } + fun includedGuestCount(includedGuestCount: kotlin.Int?) = apply { this.includedGuestCount = includedGuestCount } + fun minGuestAge(minGuestAge: kotlin.Int?) = apply { this.minGuestAge = minGuestAge } + fun ageClassRestrictions(ageClassRestrictions: kotlin.collections.List?) = apply { this.ageClassRestrictions = ageClassRestrictions } + + fun build(): RoomOccupancyPolicy { + val instance = RoomOccupancyPolicy( + maxGuestCount = maxGuestCount, + minCheckInAge = minCheckInAge, + includedGuestCount = includedGuestCount, + minGuestAge = minGuestAge, + ageClassRestrictions = ageClassRestrictions + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( maxGuestCount = maxGuestCount, minCheckInAge = minCheckInAge, includedGuestCount = includedGuestCount, minGuestAge = minGuestAge, ageClassRestrictions = ageClassRestrictions - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt index e7a8ade3b..8805c36a3 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt @@ -15,85 +15,80 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for room preferences. - * @param type The type of preference. Options are: SmokingPreference Bed - * @param `value` The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. + * @param type The type of preference. Options are: SmokingPreference Bed + * @param `value` The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. */ data class RoomPreference( - // The type of preference. Options are: SmokingPreference Bed - @JsonProperty("Type") - val type: RoomPreference.Type? = null, - // The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null + /* The type of preference. Options are: SmokingPreference Bed */ +@JsonProperty("Type") +val type: RoomPreference.Type? = null, + + /* The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() + + + + init { + + + + + + + + + + + + + + + } - class Builder( - private var type: RoomPreference.Type? = null, - private var `value`: kotlin.String? = null - ) { - fun type(type: RoomPreference.Type?) = apply { this.type = type } - - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun build(): RoomPreference { - val instance = - RoomPreference( - type = type, - `value` = `value` - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomPreference) { - 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}" } - ) - } - } + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var type: RoomPreference.Type? = null, + private var `value`: kotlin.String? = null + ) { + fun type(type: RoomPreference.Type?) = apply { this.type = type } + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + + fun build(): RoomPreference { + val instance = RoomPreference( type = type, `value` = `value` - ) - - /** - * The type of preference. Options are: SmokingPreference Bed - * Values: SMOKING_PREFERENCE,BED - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("SmokingPreference") - SMOKING_PREFERENCE("SmokingPreference"), - - @JsonProperty("Bed") - BED("Bed") + ) + + return instance + } } + + fun toBuilder() = Builder( + type = type, + `value` = `value` + ) + + /** + * The type of preference. Options are: SmokingPreference Bed + * Values: SMOKING_PREFERENCE,BED + */ + enum class Type(val value: kotlin.String) { + @JsonProperty("SmokingPreference") + SMOKING_PREFERENCE("SmokingPreference"), + + @JsonProperty("Bed") + BED("Bed"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt index ec630e9a4..c9d58fb8b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt @@ -15,7 +15,6 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.MandatoryFeesDetail import com.expediagroup.sdk.xap.models.RoomRatesBaseRate import com.expediagroup.sdk.xap.models.RoomRatesNightlyRatesInner @@ -23,121 +22,153 @@ import com.expediagroup.sdk.xap.models.RoomRatesTaxesAndFees import com.expediagroup.sdk.xap.models.RoomRatesTaxesAndFeesDetailsInner import com.expediagroup.sdk.xap.models.RoomRatesTotalPrice import com.expediagroup.sdk.xap.models.RoomRatesTotalStrikeOutPrice + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param roomIndex Index of which of the requested rooms this entry refers to. - * @param baseRate - * @param taxesAndFees - * @param totalPrice - * @param totalStrikeOutPrice - * @param taxesAndFeesDetails The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param mandatoryFeesDetails The breakdown for the taxes and fees that must be paid at the property. - * @param nightlyRates Container for the nightly rate of current room. +* + * @param roomIndex Index of which of the requested rooms this entry refers to. + * @param baseRate + * @param taxesAndFees + * @param totalPrice + * @param totalStrikeOutPrice + * @param taxesAndFeesDetails The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + * @param mandatoryFeesDetails The breakdown for the taxes and fees that must be paid at the property. + * @param nightlyRates Container for the nightly rate of current room. */ data class RoomRates( - // Index of which of the requested rooms this entry refers to. - @JsonProperty("RoomIndex") - val roomIndex: kotlin.Int? = null, - @JsonProperty("BaseRate") - @field:Valid - val baseRate: RoomRatesBaseRate? = null, - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: RoomRatesTaxesAndFees? = null, - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: RoomRatesTotalPrice? = null, - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, - // The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - @JsonProperty("TaxesAndFeesDetails") - @field:Valid - val taxesAndFeesDetails: kotlin.collections.List? = null, - // The breakdown for the taxes and fees that must be paid at the property. - @JsonProperty("MandatoryFeesDetails") - @field:Valid - val mandatoryFeesDetails: kotlin.collections.List? = null, - // Container for the nightly rate of current room. - @JsonProperty("NightlyRates") - @field:Valid - val nightlyRates: kotlin.collections.List? = null + /* Index of which of the requested rooms this entry refers to. */ +@JsonProperty("RoomIndex") +val roomIndex: kotlin.Int? = null, + + @JsonProperty("BaseRate") +val baseRate: RoomRatesBaseRate? = null, + + @JsonProperty("TaxesAndFees") +val taxesAndFees: RoomRatesTaxesAndFees? = null, + + @JsonProperty("TotalPrice") +val totalPrice: RoomRatesTotalPrice? = null, + + @JsonProperty("TotalStrikeOutPrice") +val totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, + + /* The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. */ +@JsonProperty("TaxesAndFeesDetails") +val taxesAndFeesDetails: kotlin.collections.List? = null, + + /* The breakdown for the taxes and fees that must be paid at the property. */ +@JsonProperty("MandatoryFeesDetails") +val mandatoryFeesDetails: kotlin.collections.List? = null, + + /* Container for the nightly rate of current room. */ +@JsonProperty("NightlyRates") +val nightlyRates: kotlin.collections.List? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var roomIndex: kotlin.Int? = null, - private var baseRate: RoomRatesBaseRate? = null, - private var taxesAndFees: RoomRatesTaxesAndFees? = null, - private var totalPrice: RoomRatesTotalPrice? = null, - private var totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, - private var taxesAndFeesDetails: kotlin.collections.List? = null, - private var mandatoryFeesDetails: kotlin.collections.List? = null, - private var nightlyRates: kotlin.collections.List? = null - ) { - fun roomIndex(roomIndex: kotlin.Int?) = apply { this.roomIndex = roomIndex } - - fun baseRate(baseRate: RoomRatesBaseRate?) = apply { this.baseRate = baseRate } - - fun taxesAndFees(taxesAndFees: RoomRatesTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } - - fun totalPrice(totalPrice: RoomRatesTotalPrice?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - - fun mandatoryFeesDetails(mandatoryFeesDetails: kotlin.collections.List?) = apply { this.mandatoryFeesDetails = mandatoryFeesDetails } - - fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } - - fun build(): RoomRates { - val instance = - RoomRates( - roomIndex = roomIndex, - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - taxesAndFeesDetails = taxesAndFeesDetails, - mandatoryFeesDetails = mandatoryFeesDetails, - nightlyRates = nightlyRates - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRates) { - 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}" } - ) - } - } + class Builder( + private var roomIndex: kotlin.Int? = null, + private var baseRate: RoomRatesBaseRate? = null, + private var taxesAndFees: RoomRatesTaxesAndFees? = null, + private var totalPrice: RoomRatesTotalPrice? = null, + private var totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, + private var taxesAndFeesDetails: kotlin.collections.List? = null, + private var mandatoryFeesDetails: kotlin.collections.List? = null, + private var nightlyRates: kotlin.collections.List? = null + ) { + fun roomIndex(roomIndex: kotlin.Int?) = apply { this.roomIndex = roomIndex } + fun baseRate(baseRate: RoomRatesBaseRate?) = apply { this.baseRate = baseRate } + fun taxesAndFees(taxesAndFees: RoomRatesTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPrice(totalPrice: RoomRatesTotalPrice?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } + fun mandatoryFeesDetails(mandatoryFeesDetails: kotlin.collections.List?) = apply { this.mandatoryFeesDetails = mandatoryFeesDetails } + fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } + + fun build(): RoomRates { + val instance = RoomRates( + roomIndex = roomIndex, + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + taxesAndFeesDetails = taxesAndFeesDetails, + mandatoryFeesDetails = mandatoryFeesDetails, + nightlyRates = nightlyRates + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( roomIndex = roomIndex, baseRate = baseRate, taxesAndFees = taxesAndFees, @@ -146,5 +177,5 @@ data class RoomRates( taxesAndFeesDetails = taxesAndFeesDetails, mandatoryFeesDetails = mandatoryFeesDetails, nightlyRates = nightlyRates - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt index f25a57b66..476d48e30 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class RoomRatesBaseRate( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomRatesBaseRate { - val instance = - RoomRatesBaseRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRatesBaseRate) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RoomRatesBaseRate { + val instance = RoomRatesBaseRate( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt index 1a8c5d714..9f8feb7a8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param stayDate One date of the property stay - * @param baseRate Nightly Base Rate for the selected date of stay. +* + * @param stayDate One date of the property stay + * @param baseRate Nightly Base Rate for the selected date of stay. */ data class RoomRatesNightlyRatesInner( - // One date of the property stay - @JsonProperty("StayDate") - @field:Valid - val stayDate: kotlin.Any? = null, - // Nightly Base Rate for the selected date of stay. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: kotlin.Any? = null + /* One date of the property stay */ +@JsonProperty("StayDate") +val stayDate: kotlin.Any? = null, + + /* Nightly Base Rate for the selected date of stay. */ +@JsonProperty("BaseRate") +val baseRate: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var stayDate: kotlin.Any? = null, - private var baseRate: kotlin.Any? = null - ) { - fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } - - fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } - - fun build(): RoomRatesNightlyRatesInner { - val instance = - RoomRatesNightlyRatesInner( - stayDate = stayDate, - baseRate = baseRate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRatesNightlyRatesInner) { - 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}" } - ) - } - } + class Builder( + private var stayDate: kotlin.Any? = null, + private var baseRate: kotlin.Any? = null + ) { + fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } + fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } + + fun build(): RoomRatesNightlyRatesInner { + val instance = RoomRatesNightlyRatesInner( + stayDate = stayDate, + baseRate = baseRate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( stayDate = stayDate, baseRate = baseRate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt index 56b1fe471..bcf2950c5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class RoomRatesTaxesAndFees( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomRatesTaxesAndFees { - val instance = - RoomRatesTaxesAndFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRatesTaxesAndFees) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RoomRatesTaxesAndFees { + val instance = RoomRatesTaxesAndFees( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt index c2ad40fae..d7c739098 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param categoryCode Tax or fee category code. - * @param amount Tax or fee value. +* + * @param categoryCode Tax or fee category code. + * @param amount Tax or fee value. */ data class RoomRatesTaxesAndFeesDetailsInner( - // Tax or fee category code. - @JsonProperty("CategoryCode") - @field:Valid - val categoryCode: kotlin.Any? = null, - // Tax or fee value. - @JsonProperty("Amount") - @field:Valid - val amount: kotlin.Any? = null + /* Tax or fee category code. */ +@JsonProperty("CategoryCode") +val categoryCode: kotlin.Any? = null, + + /* Tax or fee value. */ +@JsonProperty("Amount") +val amount: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var categoryCode: kotlin.Any? = null, - private var amount: kotlin.Any? = null - ) { - fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } - - fun amount(amount: kotlin.Any?) = apply { this.amount = amount } - - fun build(): RoomRatesTaxesAndFeesDetailsInner { - val instance = - RoomRatesTaxesAndFeesDetailsInner( - categoryCode = categoryCode, - amount = amount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRatesTaxesAndFeesDetailsInner) { - 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}" } - ) - } - } + class Builder( + private var categoryCode: kotlin.Any? = null, + private var amount: kotlin.Any? = null + ) { + fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } + fun amount(amount: kotlin.Any?) = apply { this.amount = amount } + + fun build(): RoomRatesTaxesAndFeesDetailsInner { + val instance = RoomRatesTaxesAndFeesDetailsInner( + categoryCode = categoryCode, + amount = amount + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( categoryCode = categoryCode, amount = amount - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt index 43dd2d2c4..33da788b4 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class RoomRatesTotalPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomRatesTotalPrice { - val instance = - RoomRatesTotalPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRatesTotalPrice) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RoomRatesTotalPrice { + val instance = RoomRatesTotalPrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt index 6e58135da..8af397a92 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class RoomRatesTotalStrikeOutPrice( - // The value of the element being defined. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null, - // The ISO 4217 Currency Code that the value is expressed in. - @JsonProperty("Currency") - @field:Valid - val currency: kotlin.String? = null, - @JsonProperty("LocalCurrencyPrice") - @field:Valid - val localCurrencyPrice: Money? = null + /* The value of the element being defined. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null, + + /* The ISO 4217 Currency Code that the value is expressed in. */ +@JsonProperty("Currency") +val currency: kotlin.String? = null, + + @JsonProperty("LocalCurrencyPrice") +val localCurrencyPrice: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } - - fun build(): RoomRatesTotalStrikeOutPrice { - val instance = - RoomRatesTotalStrikeOutPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomRatesTotalStrikeOutPrice) { - 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}" } - ) - } - } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun currency(currency: kotlin.String?) = apply { this.currency = currency } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RoomRatesTotalStrikeOutPrice { + val instance = RoomRatesTotalStrikeOutPrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( `value` = `value`, currency = currency, localCurrencyPrice = localCurrencyPrice - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt index bd48bf7e3..1891c8371 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt @@ -15,7 +15,6 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.BedType import com.expediagroup.sdk.xap.models.Promotion import com.expediagroup.sdk.xap.models.RatePlan @@ -25,198 +24,252 @@ import com.expediagroup.sdk.xap.models.RoomTypeLinks import com.expediagroup.sdk.xap.models.RoomTypeMediaInner import com.expediagroup.sdk.xap.models.RoomTypePrice import com.expediagroup.sdk.xap.models.RoomTypeStandalonePrice + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param description Text description of the room type. - * @param roomKey An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. - * @param offerId An encrypted string which includes the information that could be used to address the current room type. - * @param merchantName Name of Merchant that did the initial Authentication. - * @param ratePlanType Indicate the room type is sold as package or standalone. - * @param ratePlans Container for rate plan information. - * @param price - * @param standalonePrice - * @param promotionsDeprecated All promotion information of the room. **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. - * @param links - * @param smokingOption The smoking options available for the room type. - * @param bedTypeOptions Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - * @param roomOccupancyPolicy - * @param amenities Container for all room amenities. - * @param descriptiveAmenities Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY - * @param media Container for Media elements. +* + * @param description Text description of the room type. + * @param roomKey An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. + * @param offerId An encrypted string which includes the information that could be used to address the current room type. + * @param merchantName Name of Merchant that did the initial Authentication. + * @param ratePlanType Indicate the room type is sold as package or standalone. + * @param ratePlans Container for rate plan information. + * @param price + * @param standalonePrice + * @param promotionsDeprecated All promotion information of the room. **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. + * @param links + * @param smokingOption The smoking options available for the room type. + * @param bedTypeOptions Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + * @param roomOccupancyPolicy + * @param amenities Container for all room amenities. + * @param descriptiveAmenities Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY + * @param media Container for Media elements. */ data class RoomType( - // Text description of the room type. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null, - // An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. + /* Text description of the room type. */ +@JsonProperty("Description") +val description: kotlin.String? = null, + + /* An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. */ @Deprecated(message = "This property is deprecated.") - @JsonProperty("RoomKey") - @field:Valid - val roomKey: kotlin.String? = null, - // An encrypted string which includes the information that could be used to address the current room type. - @JsonProperty("OfferId") - @field:Valid - val offerId: kotlin.String? = null, - // Name of Merchant that did the initial Authentication. - @JsonProperty("MerchantName") - @field:Valid - val merchantName: kotlin.String? = null, - // Indicate the room type is sold as package or standalone. - @JsonProperty("RatePlanType") - val ratePlanType: RoomType.RatePlanType? = null, - // Container for rate plan information. - @JsonProperty("RatePlans") - @field:Valid - val ratePlans: kotlin.collections.List? = null, - @JsonProperty("Price") - @field:Valid - val price: RoomTypePrice? = null, - @JsonProperty("StandalonePrice") - @field:Valid - val standalonePrice: RoomTypeStandalonePrice? = null, - // All promotion information of the room. **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. +@JsonProperty("RoomKey") +val roomKey: kotlin.String? = null, + + /* An encrypted string which includes the information that could be used to address the current room type. */ +@JsonProperty("OfferId") +val offerId: kotlin.String? = null, + + /* Name of Merchant that did the initial Authentication. */ +@JsonProperty("MerchantName") +val merchantName: kotlin.String? = null, + + /* Indicate the room type is sold as package or standalone. */ +@JsonProperty("RatePlanType") +val ratePlanType: RoomType.RatePlanType? = null, + + /* Container for rate plan information. */ +@JsonProperty("RatePlans") +val ratePlans: kotlin.collections.List? = null, + + @JsonProperty("Price") +val price: RoomTypePrice? = null, + + @JsonProperty("StandalonePrice") +val standalonePrice: RoomTypeStandalonePrice? = null, + + /* All promotion information of the room. **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. */ @Deprecated(message = "This property is deprecated.") - @JsonProperty("Promotions [deprecated]") - @field:Valid - val promotionsDeprecated: kotlin.collections.List? = null, - @JsonProperty("Links") - @field:Valid - val links: RoomTypeLinks? = null, - // The smoking options available for the room type. - @JsonProperty("SmokingOption") - val smokingOption: RoomType.SmokingOption? = null, - // Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - @JsonProperty("BedTypeOptions") - @field:Valid - val bedTypeOptions: kotlin.collections.List? = null, - @JsonProperty("RoomOccupancyPolicy") - @field:Valid - val roomOccupancyPolicy: RoomOccupancyPolicy? = null, - // Container for all room amenities. - @JsonProperty("Amenities") - @field:Valid - val amenities: kotlin.collections.List? = null, - // Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY - @JsonProperty("DescriptiveAmenities") - @field:Valid - val descriptiveAmenities: kotlin.collections.Map>? = null, - // Container for Media elements. - @JsonProperty("Media") - @field:Valid - val media: kotlin.collections.List? = null +@JsonProperty("Promotions [deprecated]") +val promotionsDeprecated: kotlin.collections.List? = null, + + @JsonProperty("Links") +val links: RoomTypeLinks? = null, + + /* The smoking options available for the room type. */ +@JsonProperty("SmokingOption") +val smokingOption: RoomType.SmokingOption? = null, + + /* Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). */ +@JsonProperty("BedTypeOptions") +val bedTypeOptions: kotlin.collections.List? = null, + + @JsonProperty("RoomOccupancyPolicy") +val roomOccupancyPolicy: RoomOccupancyPolicy? = null, + + /* Container for all room amenities. */ +@JsonProperty("Amenities") +val amenities: kotlin.collections.List? = null, + + /* Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY */ +@JsonProperty("DescriptiveAmenities") +val descriptiveAmenities: kotlin.collections.Map>? = null, + + /* Container for Media elements. */ +@JsonProperty("Media") +val media: kotlin.collections.List? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() - } + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - class Builder( - private var description: kotlin.String? = null, - private var roomKey: kotlin.String? = null, - private var offerId: kotlin.String? = null, - private var merchantName: kotlin.String? = null, - private var ratePlanType: RoomType.RatePlanType? = null, - private var ratePlans: kotlin.collections.List? = null, - private var price: RoomTypePrice? = null, - private var standalonePrice: RoomTypeStandalonePrice? = null, - private var promotionsDeprecated: kotlin.collections.List? = null, - private var links: RoomTypeLinks? = null, - private var smokingOption: RoomType.SmokingOption? = null, - private var bedTypeOptions: kotlin.collections.List? = null, - private var roomOccupancyPolicy: RoomOccupancyPolicy? = null, - private var amenities: kotlin.collections.List? = null, - private var descriptiveAmenities: kotlin.collections.Map>? = null, - private var media: kotlin.collections.List? = null - ) { - fun description(description: kotlin.String?) = apply { this.description = description } - fun roomKey(roomKey: kotlin.String?) = apply { this.roomKey = roomKey } - fun offerId(offerId: kotlin.String?) = apply { this.offerId = offerId } - fun merchantName(merchantName: kotlin.String?) = apply { this.merchantName = merchantName } - fun ratePlanType(ratePlanType: RoomType.RatePlanType?) = apply { this.ratePlanType = ratePlanType } - fun ratePlans(ratePlans: kotlin.collections.List?) = apply { this.ratePlans = ratePlans } - fun price(price: RoomTypePrice?) = apply { this.price = price } - fun standalonePrice(standalonePrice: RoomTypeStandalonePrice?) = apply { this.standalonePrice = standalonePrice } - fun promotionsDeprecated(promotionsDeprecated: kotlin.collections.List?) = apply { this.promotionsDeprecated = promotionsDeprecated } - fun links(links: RoomTypeLinks?) = apply { this.links = links } - fun smokingOption(smokingOption: RoomType.SmokingOption?) = apply { this.smokingOption = smokingOption } - fun bedTypeOptions(bedTypeOptions: kotlin.collections.List?) = apply { this.bedTypeOptions = bedTypeOptions } - fun roomOccupancyPolicy(roomOccupancyPolicy: RoomOccupancyPolicy?) = apply { this.roomOccupancyPolicy = roomOccupancyPolicy } - fun amenities(amenities: kotlin.collections.List?) = apply { this.amenities = amenities } - fun descriptiveAmenities(descriptiveAmenities: kotlin.collections.Map>?) = - apply { - this.descriptiveAmenities = - descriptiveAmenities - } - fun media(media: kotlin.collections.List?) = apply { this.media = media } - - fun build(): RoomType { - val instance = - RoomType( - description = description, - roomKey = roomKey, - offerId = offerId, - merchantName = merchantName, - ratePlanType = ratePlanType, - ratePlans = ratePlans, - price = price, - standalonePrice = standalonePrice, - promotionsDeprecated = promotionsDeprecated, - links = links, - smokingOption = smokingOption, - bedTypeOptions = bedTypeOptions, - roomOccupancyPolicy = roomOccupancyPolicy, - amenities = amenities, - descriptiveAmenities = descriptiveAmenities, - media = media - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomType) { - 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( + companion object { + @JvmStatic + fun builder() = Builder() + } + + class Builder( + private var description: kotlin.String? = null, + private var roomKey: kotlin.String? = null, + private var offerId: kotlin.String? = null, + private var merchantName: kotlin.String? = null, + private var ratePlanType: RoomType.RatePlanType? = null, + private var ratePlans: kotlin.collections.List? = null, + private var price: RoomTypePrice? = null, + private var standalonePrice: RoomTypeStandalonePrice? = null, + private var promotionsDeprecated: kotlin.collections.List? = null, + private var links: RoomTypeLinks? = null, + private var smokingOption: RoomType.SmokingOption? = null, + private var bedTypeOptions: kotlin.collections.List? = null, + private var roomOccupancyPolicy: RoomOccupancyPolicy? = null, + private var amenities: kotlin.collections.List? = null, + private var descriptiveAmenities: kotlin.collections.Map>? = null, + private var media: kotlin.collections.List? = null + ) { + fun description(description: kotlin.String?) = apply { this.description = description } + fun roomKey(roomKey: kotlin.String?) = apply { this.roomKey = roomKey } + fun offerId(offerId: kotlin.String?) = apply { this.offerId = offerId } + fun merchantName(merchantName: kotlin.String?) = apply { this.merchantName = merchantName } + fun ratePlanType(ratePlanType: RoomType.RatePlanType?) = apply { this.ratePlanType = ratePlanType } + fun ratePlans(ratePlans: kotlin.collections.List?) = apply { this.ratePlans = ratePlans } + fun price(price: RoomTypePrice?) = apply { this.price = price } + fun standalonePrice(standalonePrice: RoomTypeStandalonePrice?) = apply { this.standalonePrice = standalonePrice } + fun promotionsDeprecated(promotionsDeprecated: kotlin.collections.List?) = apply { this.promotionsDeprecated = promotionsDeprecated } + fun links(links: RoomTypeLinks?) = apply { this.links = links } + fun smokingOption(smokingOption: RoomType.SmokingOption?) = apply { this.smokingOption = smokingOption } + fun bedTypeOptions(bedTypeOptions: kotlin.collections.List?) = apply { this.bedTypeOptions = bedTypeOptions } + fun roomOccupancyPolicy(roomOccupancyPolicy: RoomOccupancyPolicy?) = apply { this.roomOccupancyPolicy = roomOccupancyPolicy } + fun amenities(amenities: kotlin.collections.List?) = apply { this.amenities = amenities } + fun descriptiveAmenities(descriptiveAmenities: kotlin.collections.Map>?) = apply { this.descriptiveAmenities = descriptiveAmenities } + fun media(media: kotlin.collections.List?) = apply { this.media = media } + + fun build(): RoomType { + val instance = RoomType( description = description, roomKey = roomKey, offerId = offerId, @@ -233,35 +286,58 @@ data class RoomType( amenities = amenities, descriptiveAmenities = descriptiveAmenities, media = media - ) + ) - /** - * Indicate the room type is sold as package or standalone. - * Values: STANDALONE,PACKAGE,WHOLESALE - */ - enum class RatePlanType(val value: kotlin.String) { - @JsonProperty("standalone") - STANDALONE("standalone"), - - @JsonProperty("package") - PACKAGE("package"), - - @JsonProperty("wholesale") - WHOLESALE("wholesale") + return instance + } } - /** - * The smoking options available for the room type. - * Values: SMOKING_OR_NON_SMOKING,SMOKING,NON_SMOKING - */ - enum class SmokingOption(val value: kotlin.String) { - @JsonProperty("SmokingOrNonSmoking") - SMOKING_OR_NON_SMOKING("SmokingOrNonSmoking"), + fun toBuilder() = Builder( + description = description, + roomKey = roomKey, + offerId = offerId, + merchantName = merchantName, + ratePlanType = ratePlanType, + ratePlans = ratePlans, + price = price, + standalonePrice = standalonePrice, + promotionsDeprecated = promotionsDeprecated, + links = links, + smokingOption = smokingOption, + bedTypeOptions = bedTypeOptions, + roomOccupancyPolicy = roomOccupancyPolicy, + amenities = amenities, + descriptiveAmenities = descriptiveAmenities, + media = media + ) - @JsonProperty("Smoking") - SMOKING("Smoking"), + /** + * Indicate the room type is sold as package or standalone. + * Values: STANDALONE,PACKAGE,WHOLESALE + */ + enum class RatePlanType(val value: kotlin.String) { + @JsonProperty("standalone") + STANDALONE("standalone"), + + @JsonProperty("package") + PACKAGE("package"), + + @JsonProperty("wholesale") + WHOLESALE("wholesale"); + } - @JsonProperty("NonSmoking") - NON_SMOKING("NonSmoking") - } + /** + * The smoking options available for the room type. + * Values: SMOKING_OR_NON_SMOKING,SMOKING,NON_SMOKING + */ + enum class SmokingOption(val value: kotlin.String) { + @JsonProperty("SmokingOrNonSmoking") + SMOKING_OR_NON_SMOKING("SmokingOrNonSmoking"), + + @JsonProperty("Smoking") + SMOKING("Smoking"), + + @JsonProperty("NonSmoking") + NON_SMOKING("NonSmoking"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt index 3579dfb8f..a091af609 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param id Amenity id - * @param name Amenity name +* + * @param id Amenity id + * @param name Amenity name */ data class RoomTypeAmenitiesInner( - // Amenity id - @JsonProperty("Id") - @field:Valid - val id: kotlin.Any? = null, - // Amenity name - @JsonProperty("Name") - @field:Valid - val name: kotlin.Any? = null + /* Amenity id */ +@JsonProperty("Id") +val id: kotlin.Any? = null, + + /* Amenity name */ +@JsonProperty("Name") +val name: kotlin.Any? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - - fun name(name: kotlin.Any?) = apply { this.name = name } - - fun build(): RoomTypeAmenitiesInner { - val instance = - RoomTypeAmenitiesInner( - id = id, - name = name - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypeAmenitiesInner) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.Any? = null, + private var name: kotlin.Any? = null + ) { + fun id(id: kotlin.Any?) = apply { this.id = id } + fun name(name: kotlin.Any?) = apply { this.name = name } + + fun build(): RoomTypeAmenitiesInner { + val instance = RoomTypeAmenitiesInner( + id = id, + name = name + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id, name = name - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt index b42480f0c..995e16f14 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt @@ -15,85 +15,85 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.HotelLinksWebSearchResult import com.expediagroup.sdk.xap.models.Link import com.expediagroup.sdk.xap.models.RoomTypeLinksApiDetails import com.expediagroup.sdk.xap.models.RoomTypeLinksWebDetails + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the `links` parameter in the Search API query. Available links are: - WebSearchResult (link to web search result page) - WebDetails (link to web infosite) - ApiDetails (link for details API) - * @param webSearchResult - * @param webDetails - * @param apiDetails +* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the `links` parameter in the Search API query. Available links are: - WebSearchResult (link to web search result page) - WebDetails (link to web infosite) - ApiDetails (link for details API) + * @param webSearchResult + * @param webDetails + * @param apiDetails */ data class RoomTypeLinks( - @JsonProperty("WebSearchResult") - @field:Valid - val webSearchResult: HotelLinksWebSearchResult? = null, - @JsonProperty("WebDetails") - @field:Valid - val webDetails: RoomTypeLinksWebDetails? = null, - @JsonProperty("ApiDetails") - @field:Valid - val apiDetails: RoomTypeLinksApiDetails? = null + @JsonProperty("WebSearchResult") +val webSearchResult: HotelLinksWebSearchResult? = null, + + @JsonProperty("WebDetails") +val webDetails: RoomTypeLinksWebDetails? = null, + + @JsonProperty("ApiDetails") +val apiDetails: RoomTypeLinksApiDetails? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var webSearchResult: HotelLinksWebSearchResult? = null, - private var webDetails: RoomTypeLinksWebDetails? = null, - private var apiDetails: RoomTypeLinksApiDetails? = null - ) { - fun webSearchResult(webSearchResult: HotelLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - - fun webDetails(webDetails: RoomTypeLinksWebDetails?) = apply { this.webDetails = webDetails } - - fun apiDetails(apiDetails: RoomTypeLinksApiDetails?) = apply { this.apiDetails = apiDetails } - - fun build(): RoomTypeLinks { - val instance = - RoomTypeLinks( - webSearchResult = webSearchResult, - webDetails = webDetails, - apiDetails = apiDetails - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypeLinks) { - 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}" } - ) - } - } + class Builder( + private var webSearchResult: HotelLinksWebSearchResult? = null, + private var webDetails: RoomTypeLinksWebDetails? = null, + private var apiDetails: RoomTypeLinksApiDetails? = null + ) { + fun webSearchResult(webSearchResult: HotelLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } + fun webDetails(webDetails: RoomTypeLinksWebDetails?) = apply { this.webDetails = webDetails } + fun apiDetails(apiDetails: RoomTypeLinksApiDetails?) = apply { this.apiDetails = apiDetails } + + fun build(): RoomTypeLinks { + val instance = RoomTypeLinks( + webSearchResult = webSearchResult, + webDetails = webDetails, + apiDetails = apiDetails + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( webSearchResult = webSearchResult, webDetails = webDetails, apiDetails = apiDetails - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt index 8b9bcc69b..14d9683be 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class RoomTypeLinksApiDetails( - // The Accept request header (for API queries only - not included for page URLs). - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // Method of request. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null, - // The URL of the destination web page or API query. - @JsonProperty("Href") - @field:Valid - val href: kotlin.String? = null + /* The Accept request header (for API queries only - not included for page URLs). */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* Method of request. */ +@JsonProperty("Method") +val method: kotlin.String? = null, + + /* The URL of the destination web page or API query. */ +@JsonProperty("Href") +val href: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun href(href: kotlin.String?) = apply { this.href = href } - - fun build(): RoomTypeLinksApiDetails { - val instance = - RoomTypeLinksApiDetails( - accept = accept, - method = method, - href = href - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypeLinksApiDetails) { - 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}" } - ) - } - } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): RoomTypeLinksApiDetails { + val instance = RoomTypeLinksApiDetails( + accept = accept, + method = method, + href = href + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( accept = accept, method = method, href = href - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt index 54893b7a0..8edd68695 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt @@ -15,84 +15,84 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class RoomTypeLinksWebDetails( - // The Accept request header (for API queries only - not included for page URLs). - @JsonProperty("Accept") - @field:Valid - val accept: kotlin.String? = null, - // Method of request. - @JsonProperty("Method") - @field:Valid - val method: kotlin.String? = null, - // The URL of the destination web page or API query. - @JsonProperty("Href") - @field:Valid - val href: kotlin.String? = null + /* The Accept request header (for API queries only - not included for page URLs). */ +@JsonProperty("Accept") +val accept: kotlin.String? = null, + + /* Method of request. */ +@JsonProperty("Method") +val method: kotlin.String? = null, + + /* The URL of the destination web page or API query. */ +@JsonProperty("Href") +val href: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun href(href: kotlin.String?) = apply { this.href = href } - - fun build(): RoomTypeLinksWebDetails { - val instance = - RoomTypeLinksWebDetails( - accept = accept, - method = method, - href = href - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypeLinksWebDetails) { - 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}" } - ) - } - } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } + fun method(method: kotlin.String?) = apply { this.method = method } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): RoomTypeLinksWebDetails { + val instance = RoomTypeLinksWebDetails( + accept = accept, + method = method, + href = href + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( accept = accept, method = method, href = href - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt index 9bf539f98..40d355c09 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt @@ -15,102 +15,109 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param type Supported type of media. 1=Image. Only 1 is supported now. - * @param title Image title - * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - * @param url Image URL +* + * @param type Supported type of media. 1=Image. Only 1 is supported now. + * @param title Image title + * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + * @param url Image URL */ data class RoomTypeMediaInner( - // Supported type of media. 1=Image. Only 1 is supported now. - @JsonProperty("Type") - val type: RoomTypeMediaInner.Type? = null, - // Image title - @JsonProperty("Title") - @field:Valid - val title: kotlin.String? = null, - // Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - @JsonProperty("Size") - @field:Valid - val propertySize: kotlin.String? = null, - // Image URL - @JsonProperty("Url") - @field:Valid - val url: kotlin.String? = null + /* Supported type of media. 1=Image. Only 1 is supported now. */ +@JsonProperty("Type") +val type: RoomTypeMediaInner.Type? = null, + + /* Image title */ +@JsonProperty("Title") +val title: kotlin.String? = null, + + /* Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). */ +@JsonProperty("Size") +val propertySize: kotlin.String? = null, + + /* Image URL */ +@JsonProperty("Url") +val url: kotlin.String? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } - class Builder( - private var type: RoomTypeMediaInner.Type? = null, - private var title: kotlin.String? = null, - private var propertySize: kotlin.String? = null, - private var url: kotlin.String? = null - ) { - fun type(type: RoomTypeMediaInner.Type?) = apply { this.type = type } - - fun title(title: kotlin.String?) = apply { this.title = title } - - fun propertySize(propertySize: kotlin.String?) = apply { this.propertySize = propertySize } - - fun url(url: kotlin.String?) = apply { this.url = url } - - fun build(): RoomTypeMediaInner { - val instance = - RoomTypeMediaInner( - type = type, - title = title, - propertySize = propertySize, - url = url - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypeMediaInner) { - 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}" } - ) - } - } + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var type: RoomTypeMediaInner.Type? = null, + private var title: kotlin.String? = null, + private var propertySize: kotlin.String? = null, + private var url: kotlin.String? = null + ) { + fun type(type: RoomTypeMediaInner.Type?) = apply { this.type = type } + fun title(title: kotlin.String?) = apply { this.title = title } + fun propertySize(propertySize: kotlin.String?) = apply { this.propertySize = propertySize } + fun url(url: kotlin.String?) = apply { this.url = url } + + fun build(): RoomTypeMediaInner { + val instance = RoomTypeMediaInner( type = type, title = title, propertySize = propertySize, url = url - ) - - /** - * Supported type of media. 1=Image. Only 1 is supported now. - * Values: _1 - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("1") - _1("1") + ) + + return instance } + } + + fun toBuilder() = Builder( + type = type, + title = title, + propertySize = propertySize, + url = url + ) + + /** + * Supported type of media. 1=Image. Only 1 is supported now. + * Values: _1 + */ + enum class Type(val value: kotlin.String) { + @JsonProperty("1") + _1("1"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt index a7326d9cd..afb5436a9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt @@ -15,155 +15,203 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container of all price components of the room. - * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. - * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. - * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - * @param totalStrikeOutPrice The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. - * @param avgNightlyRate The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyStrikeOutRate The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - * @param avgNightlyStrikeoutRateWithFees The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. - * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. - * @param totalPriceWithHotelFees The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. - * @param refundableDamageDeposit The refundable damage deposit for the rate plan. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. + * @param avgNightlyRate The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + * @param avgNightlyStrikeoutRateWithFees The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. + * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. + * @param totalPriceWithHotelFees The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + * @param refundableDamageDeposit The refundable damage deposit for the rate plan. */ data class RoomTypePrice( - // The price of the rate plan for all occupants, excluding taxes and fees. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: Money? = null, - // The total rate of taxes and fees of the rate plan for all occupants. - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: Money? = null, - // The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: Money? = null, - // The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: Money? = null, - // The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: Money? = null, - // The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyStrikeOutRate") - @field:Valid - val avgNightlyStrikeOutRate: Money? = null, - // The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - @JsonProperty("AvgNightlyRateWithFees") - @field:Valid - val avgNightlyRateWithFees: Money? = null, - // The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. - @JsonProperty("AvgNightlyStrikeoutRateWithFees") - @field:Valid - val avgNightlyStrikeoutRateWithFees: Money? = null, - // The total mandatory fees which will be charged at the hotel for the rate plan. - @JsonProperty("HotelMandatoryFees") - @field:Valid - val hotelMandatoryFees: Money? = null, - // The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. - @JsonProperty("TotalPriceWithHotelFees") - @field:Valid - val totalPriceWithHotelFees: Money? = null, - // The refundable damage deposit for the rate plan. - @JsonProperty("RefundableDamageDeposit") - @field:Valid - val refundableDamageDeposit: Money? = null + /* The price of the rate plan for all occupants, excluding taxes and fees. */ +@JsonProperty("BaseRate") +val baseRate: Money? = null, + + /* The total rate of taxes and fees of the rate plan for all occupants. */ +@JsonProperty("TaxesAndFees") +val taxesAndFees: Money? = null, + + /* The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. */ +@JsonProperty("TotalPrice") +val totalPrice: Money? = null, + + /* The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. */ +@JsonProperty("TotalStrikeOutPrice") +val totalStrikeOutPrice: Money? = null, + + /* The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyRate") +val avgNightlyRate: Money? = null, + + /* The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyStrikeOutRate") +val avgNightlyStrikeOutRate: Money? = null, + + /* The average nightly rate per night per room of the room type, including all fees except those imposed by the government. */ +@JsonProperty("AvgNightlyRateWithFees") +val avgNightlyRateWithFees: Money? = null, + + /* The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. */ +@JsonProperty("AvgNightlyStrikeoutRateWithFees") +val avgNightlyStrikeoutRateWithFees: Money? = null, + + /* The total mandatory fees which will be charged at the hotel for the rate plan. */ +@JsonProperty("HotelMandatoryFees") +val hotelMandatoryFees: Money? = null, + + /* The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. */ +@JsonProperty("TotalPriceWithHotelFees") +val totalPriceWithHotelFees: Money? = null, + + /* The refundable damage deposit for the rate plan. */ +@JsonProperty("RefundableDamageDeposit") +val refundableDamageDeposit: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var baseRate: Money? = null, - private var taxesAndFees: Money? = null, - private var totalPrice: Money? = null, - private var totalStrikeOutPrice: Money? = null, - private var avgNightlyRate: Money? = null, - private var avgNightlyStrikeOutRate: Money? = null, - private var avgNightlyRateWithFees: Money? = null, - private var avgNightlyStrikeoutRateWithFees: Money? = null, - private var hotelMandatoryFees: Money? = null, - private var totalPriceWithHotelFees: Money? = null, - private var refundableDamageDeposit: Money? = null - ) { - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - - fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - - fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - - fun avgNightlyRateWithFees(avgNightlyRateWithFees: Money?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } - - fun avgNightlyStrikeoutRateWithFees(avgNightlyStrikeoutRateWithFees: Money?) = apply { this.avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees } - - fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - - fun totalPriceWithHotelFees(totalPriceWithHotelFees: Money?) = apply { this.totalPriceWithHotelFees = totalPriceWithHotelFees } - - fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - - fun build(): RoomTypePrice { - val instance = - RoomTypePrice( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - avgNightlyRateWithFees = avgNightlyRateWithFees, - avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, - hotelMandatoryFees = hotelMandatoryFees, - totalPriceWithHotelFees = totalPriceWithHotelFees, - refundableDamageDeposit = refundableDamageDeposit - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypePrice) { - 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}" } - ) - } - } + class Builder( + private var baseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var avgNightlyRateWithFees: Money? = null, + private var avgNightlyStrikeoutRateWithFees: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var totalPriceWithHotelFees: Money? = null, + private var refundableDamageDeposit: Money? = null + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + fun avgNightlyRateWithFees(avgNightlyRateWithFees: Money?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } + fun avgNightlyStrikeoutRateWithFees(avgNightlyStrikeoutRateWithFees: Money?) = apply { this.avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + fun totalPriceWithHotelFees(totalPriceWithHotelFees: Money?) = apply { this.totalPriceWithHotelFees = totalPriceWithHotelFees } + fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } + + fun build(): RoomTypePrice { + val instance = RoomTypePrice( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + avgNightlyRateWithFees = avgNightlyRateWithFees, + avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, + hotelMandatoryFees = hotelMandatoryFees, + totalPriceWithHotelFees = totalPriceWithHotelFees, + refundableDamageDeposit = refundableDamageDeposit + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( baseRate = baseRate, taxesAndFees = taxesAndFees, totalPrice = totalPrice, @@ -175,5 +223,5 @@ data class RoomTypePrice( hotelMandatoryFees = hotelMandatoryFees, totalPriceWithHotelFees = totalPriceWithHotelFees, refundableDamageDeposit = refundableDamageDeposit - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt index a23ee2774..e9c1002a0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt @@ -15,146 +15,188 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when this is a package rate plan. - * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. - * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. - * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. - * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. - * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - * @param hotelMandatoryFees The total standalone mandatory fees. - * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. +* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when this is a package rate plan. + * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. + * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. + * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. + * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. + * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total standalone mandatory fees. + * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. */ data class RoomTypeStandalonePrice( - // The standalone price of the rate plan for all occupants, excluding taxes and fees. - @JsonProperty("BaseRate") - @field:Valid - val baseRate: Money? = null, - // The base rate strikeout in the standalone shopping path. - @JsonProperty("StrikeOutBaseRate") - @field:Valid - val strikeOutBaseRate: Money? = null, - // The total standalone rate of taxes and fees of the rate plan for all occupants. - @JsonProperty("TaxesAndFees") - @field:Valid - val taxesAndFees: Money? = null, - // The taxes and fees strikeout in the standalone shopping path. - @JsonProperty("StrikeOutTaxesAndFees") - @field:Valid - val strikeOutTaxesAndFees: Money? = null, - // The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - @JsonProperty("TotalPrice") - @field:Valid - val totalPrice: Money? = null, - // The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - @JsonProperty("TotalStrikeOutPrice") - @field:Valid - val totalStrikeOutPrice: Money? = null, - // The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyRate") - @field:Valid - val avgNightlyRate: Money? = null, - // The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - @JsonProperty("AvgNightlyStrikeOutRate") - @field:Valid - val avgNightlyStrikeOutRate: Money? = null, - // The total standalone mandatory fees. - @JsonProperty("HotelMandatoryFees") - @field:Valid - val hotelMandatoryFees: Money? = null, - // The strikeout of the mandatory fees in the standalone shopping path. - @JsonProperty("StrikeOutHotelMandatoryFees") - @field:Valid - val strikeOutHotelMandatoryFees: Money? = null + /* The standalone price of the rate plan for all occupants, excluding taxes and fees. */ +@JsonProperty("BaseRate") +val baseRate: Money? = null, + + /* The base rate strikeout in the standalone shopping path. */ +@JsonProperty("StrikeOutBaseRate") +val strikeOutBaseRate: Money? = null, + + /* The total standalone rate of taxes and fees of the rate plan for all occupants. */ +@JsonProperty("TaxesAndFees") +val taxesAndFees: Money? = null, + + /* The taxes and fees strikeout in the standalone shopping path. */ +@JsonProperty("StrikeOutTaxesAndFees") +val strikeOutTaxesAndFees: Money? = null, + + /* The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. */ +@JsonProperty("TotalPrice") +val totalPrice: Money? = null, + + /* The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. */ +@JsonProperty("TotalStrikeOutPrice") +val totalStrikeOutPrice: Money? = null, + + /* The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyRate") +val avgNightlyRate: Money? = null, + + /* The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. */ +@JsonProperty("AvgNightlyStrikeOutRate") +val avgNightlyStrikeOutRate: Money? = null, + + /* The total standalone mandatory fees. */ +@JsonProperty("HotelMandatoryFees") +val hotelMandatoryFees: Money? = null, + + /* The strikeout of the mandatory fees in the standalone shopping path. */ +@JsonProperty("StrikeOutHotelMandatoryFees") +val strikeOutHotelMandatoryFees: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var baseRate: Money? = null, - private var strikeOutBaseRate: Money? = null, - private var taxesAndFees: Money? = null, - private var strikeOutTaxesAndFees: Money? = null, - private var totalPrice: Money? = null, - private var totalStrikeOutPrice: Money? = null, - private var avgNightlyRate: Money? = null, - private var avgNightlyStrikeOutRate: Money? = null, - private var hotelMandatoryFees: Money? = null, - private var strikeOutHotelMandatoryFees: Money? = null - ) { - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - - fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } - - fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - - fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } - - fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - - fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - - fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - - fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - - fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } - - fun build(): RoomTypeStandalonePrice { - val instance = - RoomTypeStandalonePrice( - baseRate = baseRate, - strikeOutBaseRate = strikeOutBaseRate, - taxesAndFees = taxesAndFees, - strikeOutTaxesAndFees = strikeOutTaxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) - - validate(instance) - - return instance - } - - private fun validate(instance: RoomTypeStandalonePrice) { - 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}" } - ) - } - } + class Builder( + private var baseRate: Money? = null, + private var strikeOutBaseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var strikeOutTaxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var strikeOutHotelMandatoryFees: Money? = null + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } + + fun build(): RoomTypeStandalonePrice { + val instance = RoomTypeStandalonePrice( + baseRate = baseRate, + strikeOutBaseRate = strikeOutBaseRate, + taxesAndFees = taxesAndFees, + strikeOutTaxesAndFees = strikeOutTaxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( baseRate = baseRate, strikeOutBaseRate = strikeOutBaseRate, taxesAndFees = taxesAndFees, @@ -165,5 +207,5 @@ data class RoomTypeStandalonePrice( avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, hotelMandatoryFees = hotelMandatoryFees, strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt index 5b8a21c73..a8727d42d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt @@ -15,75 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Container of savings information. - * @param percentage The percentage of the price that has been discounted off the regular price for the current activity. - * @param amount + * @param percentage The percentage of the price that has been discounted off the regular price for the current activity. + * @param amount */ data class Savings( - // The percentage of the price that has been discounted off the regular price for the current activity. - @JsonProperty("Percentage") - val percentage: kotlin.Int, - @JsonProperty("Amount") - @field:NotNull - @field:Valid - val amount: ActivitiesMoney + /* The percentage of the price that has been discounted off the regular price for the current activity. */ +@JsonProperty("Percentage") +val percentage: + kotlin.Int +, + + @JsonProperty("Amount") +val amount: + ActivitiesMoney + ) { + + + + init { + require(percentage != null) { "percentage must not be null" } + + + + + + + + require(amount != null) { "amount must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var percentage: kotlin.Int? = null, - private var amount: ActivitiesMoney? = null - ) { - fun percentage(percentage: kotlin.Int) = apply { this.percentage = percentage } - - fun amount(amount: ActivitiesMoney) = apply { this.amount = amount } - - fun build(): Savings { - val instance = - Savings( - percentage = percentage!!, - amount = amount!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Savings) { - 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}" } - ) - } - } + class Builder( + private var percentage: kotlin.Int? = null, + private var amount: ActivitiesMoney? = null + ) { + fun percentage(percentage: kotlin.Int) = apply { this.percentage = percentage } + fun amount(amount: ActivitiesMoney) = apply { this.amount = amount } + + fun build(): Savings { + val instance = Savings( + percentage = percentage!!, + amount = amount!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( percentage = percentage!!, amount = amount!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt index b131ccf96..69de47a20 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt @@ -15,64 +15,52 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Error from the APIM. - * @param message Error from the APIM. + * @param message Error from the APIM. */ data class SdpAPIMError( - // Error from the APIM. - @JsonProperty("message") - @field:Valid - val message: kotlin.String? = null + /* Error from the APIM. */ +@JsonProperty("message") +val message: kotlin.String? = null ) { + + + + init { + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var message: kotlin.String? = null - ) { - fun message(message: kotlin.String?) = apply { this.message = message } - - fun build(): SdpAPIMError { - val instance = - SdpAPIMError( - message = message - ) - - validate(instance) - - return instance - } - - private fun validate(instance: SdpAPIMError) { - 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}" } - ) - } - } + class Builder( + private var message: kotlin.String? = null + ) { + fun message(message: kotlin.String?) = apply { this.message = message } + + fun build(): SdpAPIMError { + val instance = SdpAPIMError( + message = message + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( message = message - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt index d9888ede5..04adeae73 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt @@ -15,74 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Contains link information, including link address, request method. Only provided if FileInfo is in OtherFileOptions. - * @param href a link address. - * @param method Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... + * @param href a link address. + * @param method Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... */ data class SdpLink( - // a link address. - @JsonProperty("href") - @field:Valid - val href: kotlin.String? = null, - // Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... - @JsonProperty("method") - @field:Valid - val method: kotlin.String? = null + /* a link address. */ +@JsonProperty("href") +val href: kotlin.String? = null, + + /* Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... */ +@JsonProperty("method") +val method: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var href: kotlin.String? = null, - private var method: kotlin.String? = null - ) { - fun href(href: kotlin.String?) = apply { this.href = href } - - fun method(method: kotlin.String?) = apply { this.method = method } - - fun build(): SdpLink { - val instance = - SdpLink( - href = href, - method = method - ) - - validate(instance) - - return instance - } - - private fun validate(instance: SdpLink) { - 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}" } - ) - } - } + class Builder( + private var href: kotlin.String? = null, + private var method: kotlin.String? = null + ) { + fun href(href: kotlin.String?) = apply { this.href = href } + fun method(method: kotlin.String?) = apply { this.method = method } + + fun build(): SdpLink { + val instance = SdpLink( + href = href, + method = method + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( href = href, method = method - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt index a700c35a4..d5f35a5af 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt @@ -15,71 +15,68 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Validation /** * Container for information for the stay dates of the rate plan. - * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ data class StayDates( - // The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - @JsonProperty("CheckInDate") - val checkInDate: java.time.LocalDate? = null, - // The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - @JsonProperty("CheckOutDate") - val checkOutDate: java.time.LocalDate? = null + /* The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ +@JsonProperty("CheckInDate") +val checkInDate: java.time.LocalDate? = null, + + /* The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ +@JsonProperty("CheckOutDate") +val checkOutDate: java.time.LocalDate? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInDate: java.time.LocalDate? = null, - private var checkOutDate: java.time.LocalDate? = null - ) { - fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - - fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } - - fun build(): StayDates { - val instance = - StayDates( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) - - validate(instance) - - return instance - } - - private fun validate(instance: StayDates) { - 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}" } - ) - } - } + class Builder( + private var checkInDate: java.time.LocalDate? = null, + private var checkOutDate: java.time.LocalDate? = null + ) { + fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } + fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } + + fun build(): StayDates { + val instance = StayDates( + checkInDate = checkInDate, + checkOutDate = checkOutDate + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( checkInDate = checkInDate, checkOutDate = checkOutDate - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt index e1de3af7c..5b49222d3 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt @@ -15,98 +15,109 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The supplier of the car being offered. - * @param id Supplier ID. - * @param name Supplier Name. - * @param code Supplier Code. - * @param logoImageUrl Supplier Logo Image Url. + * @param id Supplier ID. + * @param name Supplier Name. + * @param code Supplier Code. + * @param logoImageUrl Supplier Logo Image Url. */ data class Supplier( - // Supplier ID. - @JsonProperty("Id") - @field:NotNull - @field:Valid - val id: kotlin.String, - // Supplier Name. - @JsonProperty("Name") - @field:NotNull - @field:Valid - val name: kotlin.String, - // Supplier Code. - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // Supplier Logo Image Url. - @JsonProperty("LogoImageUrl") - @field:Valid - val logoImageUrl: kotlin.String? = null + /* Supplier ID. */ +@JsonProperty("Id") +val id: + kotlin.String +, + + /* Supplier Name. */ +@JsonProperty("Name") +val name: + kotlin.String +, + + /* Supplier Code. */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* Supplier Logo Image Url. */ +@JsonProperty("LogoImageUrl") +val logoImageUrl: kotlin.String? = null ) { + + + + init { + require(id != null) { "id must not be null" } + + + + + + + + require(name != null) { "name must not be null" } + + + + + + + + require(code != null) { "code must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null, - private var code: kotlin.String? = null, - private var logoImageUrl: kotlin.String? = null - ) { - fun id(id: kotlin.String) = apply { this.id = id } - - fun name(name: kotlin.String) = apply { this.name = name } - - fun code(code: kotlin.String) = apply { this.code = code } - - fun logoImageUrl(logoImageUrl: kotlin.String?) = apply { this.logoImageUrl = logoImageUrl } - - fun build(): Supplier { - val instance = - Supplier( - id = id!!, - name = name!!, - code = code!!, - logoImageUrl = logoImageUrl - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Supplier) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + private var code: kotlin.String? = null, + private var logoImageUrl: kotlin.String? = null + ) { + fun id(id: kotlin.String) = apply { this.id = id } + fun name(name: kotlin.String) = apply { this.name = name } + fun code(code: kotlin.String) = apply { this.code = code } + fun logoImageUrl(logoImageUrl: kotlin.String?) = apply { this.logoImageUrl = logoImageUrl } + + fun build(): Supplier { + val instance = Supplier( + id = id!!, + name = name!!, + code = code!!, + logoImageUrl = logoImageUrl + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id!!, name = name!!, code = code!!, logoImageUrl = logoImageUrl - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt index 78376f621..ccb4baf38 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsMoney + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * List of TaxesAndFees Details - * @param description TaxesAndFees description - * @param amount + * @param description TaxesAndFees description + * @param amount */ data class TaxesAndFees( - // TaxesAndFees description - @JsonProperty("Description") - @field:NotNull - @field:Valid - val description: kotlin.String, - @JsonProperty("Amount") - @field:NotNull - @field:Valid - val amount: CarsMoney + /* TaxesAndFees description */ +@JsonProperty("Description") +val description: + kotlin.String +, + + @JsonProperty("Amount") +val amount: + CarsMoney + ) { + + + + init { + require(description != null) { "description must not be null" } + + + + + + + + require(amount != null) { "amount must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var description: kotlin.String? = null, - private var amount: CarsMoney? = null - ) { - fun description(description: kotlin.String) = apply { this.description = description } - - fun amount(amount: CarsMoney) = apply { this.amount = amount } - - fun build(): TaxesAndFees { - val instance = - TaxesAndFees( - description = description!!, - amount = amount!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: TaxesAndFees) { - 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}" } - ) - } - } + class Builder( + private var description: kotlin.String? = null, + private var amount: CarsMoney? = null + ) { + fun description(description: kotlin.String) = apply { this.description = description } + fun amount(amount: CarsMoney) = apply { this.amount = amount } + + fun build(): TaxesAndFees { + val instance = TaxesAndFees( + description = description!!, + amount = amount!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( description = description!!, amount = amount!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt index 53b17bd9c..db8741ca8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt @@ -15,73 +15,67 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param categoryCode - * @param amount +* + * @param categoryCode + * @param amount */ data class TaxesAndFeesDetail( - @JsonProperty("CategoryCode") - @field:Valid - val categoryCode: kotlin.String? = null, - @JsonProperty("Amount") - @field:Valid - val amount: Money? = null + @JsonProperty("CategoryCode") +val categoryCode: kotlin.String? = null, + + @JsonProperty("Amount") +val amount: Money? = null ) { + + + + init { + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var categoryCode: kotlin.String? = null, - private var amount: Money? = null - ) { - fun categoryCode(categoryCode: kotlin.String?) = apply { this.categoryCode = categoryCode } - - fun amount(amount: Money?) = apply { this.amount = amount } - - fun build(): TaxesAndFeesDetail { - val instance = - TaxesAndFeesDetail( - categoryCode = categoryCode, - amount = amount - ) - - validate(instance) - - return instance - } - - private fun validate(instance: TaxesAndFeesDetail) { - 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}" } - ) - } - } + class Builder( + private var categoryCode: kotlin.String? = null, + private var amount: Money? = null + ) { + fun categoryCode(categoryCode: kotlin.String?) = apply { this.categoryCode = categoryCode } + fun amount(amount: Money?) = apply { this.amount = amount } + + fun build(): TaxesAndFeesDetail { + val instance = TaxesAndFeesDetail( + categoryCode = categoryCode, + amount = amount + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( categoryCode = categoryCode, amount = amount - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt index 7f42222ca..20a435871 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt @@ -15,105 +15,128 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.ActivitiesPrice import com.expediagroup.sdk.xap.models.Restrictions + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * The list of Ticket information. - * @param id The numerical identifier for the ticket. - * @param code The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student - * @param count The number of each ticket type to be booked. - * @param ticketPrice - * @param restrictions + * @param id The numerical identifier for the ticket. + * @param code The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student + * @param count The number of each ticket type to be booked. + * @param ticketPrice + * @param restrictions */ data class Ticket( - // The numerical identifier for the ticket. - @JsonProperty("Id") - val id: kotlin.Int, - // The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // The number of each ticket type to be booked. - @JsonProperty("Count") - val count: kotlin.Int, - @JsonProperty("TicketPrice") - @field:NotNull - @field:Valid - val ticketPrice: ActivitiesPrice, - @JsonProperty("Restrictions") - @field:Valid - val restrictions: Restrictions? = null + /* The numerical identifier for the ticket. */ +@JsonProperty("Id") +val id: + kotlin.Int +, + + /* The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* The number of each ticket type to be booked. */ +@JsonProperty("Count") +val count: + kotlin.Int +, + + @JsonProperty("TicketPrice") +val ticketPrice: + ActivitiesPrice +, + + @JsonProperty("Restrictions") +val restrictions: Restrictions? = null ) { + + + + init { + require(id != null) { "id must not be null" } + + + + + + + + require(code != null) { "code must not be null" } + + + + + + + + require(count != null) { "count must not be null" } + + + + + + + + require(ticketPrice != null) { "ticketPrice must not be null" } + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Int? = null, - private var code: kotlin.String? = null, - private var count: kotlin.Int? = null, - private var ticketPrice: ActivitiesPrice? = null, - private var restrictions: Restrictions? = null - ) { - fun id(id: kotlin.Int) = apply { this.id = id } - - fun code(code: kotlin.String) = apply { this.code = code } - - fun count(count: kotlin.Int) = apply { this.count = count } - - fun ticketPrice(ticketPrice: ActivitiesPrice) = apply { this.ticketPrice = ticketPrice } - - fun restrictions(restrictions: Restrictions?) = apply { this.restrictions = restrictions } - - fun build(): Ticket { - val instance = - Ticket( - id = id!!, - code = code!!, - count = count!!, - ticketPrice = ticketPrice!!, - restrictions = restrictions - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Ticket) { - 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}" } - ) - } - } + class Builder( + private var id: kotlin.Int? = null, + private var code: kotlin.String? = null, + private var count: kotlin.Int? = null, + private var ticketPrice: ActivitiesPrice? = null, + private var restrictions: Restrictions? = null + ) { + fun id(id: kotlin.Int) = apply { this.id = id } + fun code(code: kotlin.String) = apply { this.code = code } + fun count(count: kotlin.Int) = apply { this.count = count } + fun ticketPrice(ticketPrice: ActivitiesPrice) = apply { this.ticketPrice = ticketPrice } + fun restrictions(restrictions: Restrictions?) = apply { this.restrictions = restrictions } + + fun build(): Ticket { + val instance = Ticket( + id = id!!, + code = code!!, + count = count!!, + ticketPrice = ticketPrice!!, + restrictions = restrictions + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( id = id!!, code = code!!, count = count!!, ticketPrice = ticketPrice!!, restrictions = restrictions - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt index 72864d263..5c2ef15d6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * A list of time range to indicate the operation hours of the date range. - * @param startTime Start time at pickup location of the date range. - * @param endTime End time at pickup location of the date range. + * @param startTime Start time at pickup location of the date range. + * @param endTime End time at pickup location of the date range. */ data class TimeRange( - // Start time at pickup location of the date range. - @JsonProperty("StartTime") - @field:NotNull - @field:Valid - val startTime: kotlin.String, - // End time at pickup location of the date range. - @JsonProperty("EndTime") - @field:NotNull - @field:Valid - val endTime: kotlin.String + /* Start time at pickup location of the date range. */ +@JsonProperty("StartTime") +val startTime: + kotlin.String +, + + /* End time at pickup location of the date range. */ +@JsonProperty("EndTime") +val endTime: + kotlin.String + ) { + + + + init { + require(startTime != null) { "startTime must not be null" } + + + + + + + + require(endTime != null) { "endTime must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startTime: kotlin.String? = null, - private var endTime: kotlin.String? = null - ) { - fun startTime(startTime: kotlin.String) = apply { this.startTime = startTime } - - fun endTime(endTime: kotlin.String) = apply { this.endTime = endTime } - - fun build(): TimeRange { - val instance = - TimeRange( - startTime = startTime!!, - endTime = endTime!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: TimeRange) { - 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}" } - ) - } - } + class Builder( + private var startTime: kotlin.String? = null, + private var endTime: kotlin.String? = null + ) { + fun startTime(startTime: kotlin.String) = apply { this.startTime = startTime } + fun endTime(endTime: kotlin.String) = apply { this.endTime = endTime } + + fun build(): TimeRange { + val instance = TimeRange( + startTime = startTime!!, + endTime = endTime!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( startTime = startTime!!, endTime = endTime!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt index ac63f192e..0cccd4100 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt @@ -15,77 +15,74 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Car transmission and drive. Please find list of Car Transmission Drive Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005380028 - * @param code Car transmission and drive code. - * @param `value` Car transmission and drive value. + * @param code Car transmission and drive code. + * @param `value` Car transmission and drive value. */ data class TransmissionDrive( - // Car transmission and drive code. - @JsonProperty("Code") - @field:NotNull - @field:Valid - val code: kotlin.String, - // Car transmission and drive value. - @JsonProperty("Value") - @field:NotNull - @field:Valid - val `value`: kotlin.String + /* Car transmission and drive code. */ +@JsonProperty("Code") +val code: + kotlin.String +, + + /* Car transmission and drive value. */ +@JsonProperty("Value") +val `value`: + kotlin.String + ) { + + + + init { + require(code != null) { "code must not be null" } + + + + + + + + require(`value` != null) { "`value` must not be null" } + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var `value`: kotlin.String? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - - fun build(): TransmissionDrive { - val instance = - TransmissionDrive( - code = code!!, - `value` = `value`!! - ) - - validate(instance) - - return instance - } - - private fun validate(instance: TransmissionDrive) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var `value`: kotlin.String? = null + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + + fun build(): TransmissionDrive { + val instance = TransmissionDrive( + code = code!!, + `value` = `value`!! + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code!!, `value` = `value`!! - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt index 5329b80d4..395f18644 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt @@ -15,96 +15,102 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Container for hotel supported payment information. - * @param paymentMethod The payment method. - * @param name The brand name of the payment sub-method to be displayed to the customer. - * @param paymentSubMethod The payment sub-method. - * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. + * @param paymentMethod The payment method. + * @param name The brand name of the payment sub-method to be displayed to the customer. + * @param paymentSubMethod The payment sub-method. + * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. */ data class ValidFormsOfPayment( - // The payment method. - @JsonProperty("PaymentMethod") - @field:Valid - val paymentMethod: kotlin.String? = null, - // The brand name of the payment sub-method to be displayed to the customer. - @JsonProperty("Name") - @field:Valid - val name: kotlin.String? = null, - // The payment sub-method. + /* The payment method. */ +@JsonProperty("PaymentMethod") +val paymentMethod: kotlin.String? = null, + + /* The brand name of the payment sub-method to be displayed to the customer. */ +@JsonProperty("Name") +val name: kotlin.String? = null, + + /* The payment sub-method. */ @Deprecated(message = "This property is deprecated.") - @JsonProperty("PaymentSubMethod") - @field:Valid - val paymentSubMethod: kotlin.String? = null, - // The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. +@JsonProperty("PaymentSubMethod") +val paymentSubMethod: kotlin.String? = null, + + /* The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. */ @Deprecated(message = "This property is deprecated.") - @JsonProperty("BrandName") - @field:Valid - val brandName: kotlin.String? = null +@JsonProperty("BrandName") +val brandName: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var paymentMethod: kotlin.String? = null, - private var name: kotlin.String? = null, - private var paymentSubMethod: kotlin.String? = null, - private var brandName: kotlin.String? = null - ) { - fun paymentMethod(paymentMethod: kotlin.String?) = apply { this.paymentMethod = paymentMethod } - - fun name(name: kotlin.String?) = apply { this.name = name } - - fun paymentSubMethod(paymentSubMethod: kotlin.String?) = apply { this.paymentSubMethod = paymentSubMethod } - - fun brandName(brandName: kotlin.String?) = apply { this.brandName = brandName } - - fun build(): ValidFormsOfPayment { - val instance = - ValidFormsOfPayment( - paymentMethod = paymentMethod, - name = name, - paymentSubMethod = paymentSubMethod, - brandName = brandName - ) - - validate(instance) - - return instance - } - - private fun validate(instance: ValidFormsOfPayment) { - 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}" } - ) - } - } + class Builder( + private var paymentMethod: kotlin.String? = null, + private var name: kotlin.String? = null, + private var paymentSubMethod: kotlin.String? = null, + private var brandName: kotlin.String? = null + ) { + fun paymentMethod(paymentMethod: kotlin.String?) = apply { this.paymentMethod = paymentMethod } + fun name(name: kotlin.String?) = apply { this.name = name } + fun paymentSubMethod(paymentSubMethod: kotlin.String?) = apply { this.paymentSubMethod = paymentSubMethod } + fun brandName(brandName: kotlin.String?) = apply { this.brandName = brandName } + + fun build(): ValidFormsOfPayment { + val instance = ValidFormsOfPayment( + paymentMethod = paymentMethod, + name = name, + paymentSubMethod = paymentSubMethod, + brandName = brandName + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( paymentMethod = paymentMethod, name = name, paymentSubMethod = paymentSubMethod, brandName = brandName - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt index fbd93a030..6021e0a6d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt @@ -15,149 +15,202 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Capacity import com.expediagroup.sdk.xap.models.CarCategory import com.expediagroup.sdk.xap.models.CarType import com.expediagroup.sdk.xap.models.FuelAC import com.expediagroup.sdk.xap.models.TransmissionDrive + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Specific information for a car. - * @param carClass Car category and type. - * @param carCategory - * @param carType - * @param transmissionDrive - * @param fuelAC - * @param make Car manufacturer and model. - * @param minDoors Minimal car door count. - * @param maxDoors Maximal car door count. - * @param fuelLevel Car fuel information. - * @param capacity + * @param carClass Car category and type. + * @param carCategory + * @param carType + * @param transmissionDrive + * @param fuelAC + * @param make Car manufacturer and model. + * @param minDoors Minimal car door count. + * @param maxDoors Maximal car door count. + * @param fuelLevel Car fuel information. + * @param capacity */ data class VehicleDetails( - // Car category and type. - @JsonProperty("CarClass") - @field:NotNull - @field:Valid - val carClass: kotlin.String, - @JsonProperty("CarCategory") - @field:NotNull - @field:Valid - val carCategory: CarCategory, - @JsonProperty("CarType") - @field:NotNull - @field:Valid - val carType: CarType, - @JsonProperty("TransmissionDrive") - @field:NotNull - @field:Valid - val transmissionDrive: TransmissionDrive, - @JsonProperty("FuelAC") - @field:NotNull - @field:Valid - val fuelAC: FuelAC, - // Car manufacturer and model. - @JsonProperty("Make") - @field:Valid - val make: kotlin.String? = null, - // Minimal car door count. - @JsonProperty("MinDoors") - val minDoors: kotlin.Int? = null, - // Maximal car door count. - @JsonProperty("MaxDoors") - val maxDoors: kotlin.Int? = null, - // Car fuel information. - @JsonProperty("FuelLevel") - @field:Valid - val fuelLevel: kotlin.String? = null, - @JsonProperty("Capacity") - @field:Valid - val capacity: Capacity? = null + /* Car category and type. */ +@JsonProperty("CarClass") +val carClass: + kotlin.String +, + + @JsonProperty("CarCategory") +val carCategory: + CarCategory +, + + @JsonProperty("CarType") +val carType: + CarType +, + + @JsonProperty("TransmissionDrive") +val transmissionDrive: + TransmissionDrive +, + + @JsonProperty("FuelAC") +val fuelAC: + FuelAC +, + + /* Car manufacturer and model. */ +@JsonProperty("Make") +val make: kotlin.String? = null, + + /* Minimal car door count. */ +@JsonProperty("MinDoors") +val minDoors: kotlin.Int? = null, + + /* Maximal car door count. */ +@JsonProperty("MaxDoors") +val maxDoors: kotlin.Int? = null, + + /* Car fuel information. */ +@JsonProperty("FuelLevel") +val fuelLevel: kotlin.String? = null, + + @JsonProperty("Capacity") +val capacity: Capacity? = null ) { + + + + init { + require(carClass != null) { "carClass must not be null" } + + + + + + + + require(carCategory != null) { "carCategory must not be null" } + + + + + + + + require(carType != null) { "carType must not be null" } + + + + + + + + require(transmissionDrive != null) { "transmissionDrive must not be null" } + + + + + + + + require(fuelAC != null) { "fuelAC must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var carClass: kotlin.String? = null, - private var carCategory: CarCategory? = null, - private var carType: CarType? = null, - private var transmissionDrive: TransmissionDrive? = null, - private var fuelAC: FuelAC? = null, - private var make: kotlin.String? = null, - private var minDoors: kotlin.Int? = null, - private var maxDoors: kotlin.Int? = null, - private var fuelLevel: kotlin.String? = null, - private var capacity: Capacity? = null - ) { - fun carClass(carClass: kotlin.String) = apply { this.carClass = carClass } - - fun carCategory(carCategory: CarCategory) = apply { this.carCategory = carCategory } - - fun carType(carType: CarType) = apply { this.carType = carType } - - fun transmissionDrive(transmissionDrive: TransmissionDrive) = apply { this.transmissionDrive = transmissionDrive } - - fun fuelAC(fuelAC: FuelAC) = apply { this.fuelAC = fuelAC } - - fun make(make: kotlin.String?) = apply { this.make = make } - - fun minDoors(minDoors: kotlin.Int?) = apply { this.minDoors = minDoors } - - fun maxDoors(maxDoors: kotlin.Int?) = apply { this.maxDoors = maxDoors } - - fun fuelLevel(fuelLevel: kotlin.String?) = apply { this.fuelLevel = fuelLevel } - - fun capacity(capacity: Capacity?) = apply { this.capacity = capacity } - - fun build(): VehicleDetails { - val instance = - VehicleDetails( - carClass = carClass!!, - carCategory = carCategory!!, - carType = carType!!, - transmissionDrive = transmissionDrive!!, - fuelAC = fuelAC!!, - make = make, - minDoors = minDoors, - maxDoors = maxDoors, - fuelLevel = fuelLevel, - capacity = capacity - ) - - validate(instance) - - return instance - } - - private fun validate(instance: VehicleDetails) { - 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}" } - ) - } - } + class Builder( + private var carClass: kotlin.String? = null, + private var carCategory: CarCategory? = null, + private var carType: CarType? = null, + private var transmissionDrive: TransmissionDrive? = null, + private var fuelAC: FuelAC? = null, + private var make: kotlin.String? = null, + private var minDoors: kotlin.Int? = null, + private var maxDoors: kotlin.Int? = null, + private var fuelLevel: kotlin.String? = null, + private var capacity: Capacity? = null + ) { + fun carClass(carClass: kotlin.String) = apply { this.carClass = carClass } + fun carCategory(carCategory: CarCategory) = apply { this.carCategory = carCategory } + fun carType(carType: CarType) = apply { this.carType = carType } + fun transmissionDrive(transmissionDrive: TransmissionDrive) = apply { this.transmissionDrive = transmissionDrive } + fun fuelAC(fuelAC: FuelAC) = apply { this.fuelAC = fuelAC } + fun make(make: kotlin.String?) = apply { this.make = make } + fun minDoors(minDoors: kotlin.Int?) = apply { this.minDoors = minDoors } + fun maxDoors(maxDoors: kotlin.Int?) = apply { this.maxDoors = maxDoors } + fun fuelLevel(fuelLevel: kotlin.String?) = apply { this.fuelLevel = fuelLevel } + fun capacity(capacity: Capacity?) = apply { this.capacity = capacity } + + fun build(): VehicleDetails { + val instance = VehicleDetails( + carClass = carClass!!, + carCategory = carCategory!!, + carType = carType!!, + transmissionDrive = transmissionDrive!!, + fuelAC = fuelAC!!, + make = make, + minDoors = minDoors, + maxDoors = maxDoors, + fuelLevel = fuelLevel, + capacity = capacity + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( carClass = carClass!!, carCategory = carCategory!!, carType = carType!!, @@ -168,5 +221,5 @@ data class VehicleDetails( maxDoors = maxDoors, fuelLevel = fuelLevel, capacity = capacity - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt index 97f76144f..8fd87aa66 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt @@ -15,106 +15,123 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.CarsLocation import com.expediagroup.sdk.xap.models.DateTimePeriod + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * Drop off information - * @param dateTime Pickup date and time. - * @param location - * @param shuttleCategory The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. - * @param distance - * @param openSchedule A List of date time periods to indicate the vendor business hours for the pickup time. + * @param dateTime Pickup date and time. + * @param location + * @param shuttleCategory The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. + * @param distance + * @param openSchedule A List of date time periods to indicate the vendor business hours for the pickup time. */ data class VendorLocationDetails( - // Pickup date and time. - @JsonProperty("DateTime") - val dateTime: java.time.LocalDateTime, - @JsonProperty("Location") - @field:NotNull - @field:Valid - val location: CarsLocation, - // The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. - @JsonProperty("ShuttleCategory") - @field:Valid - val shuttleCategory: kotlin.String? = null, - @JsonProperty("Distance") - @field:Valid - val distance: CarsDistance? = null, - // A List of date time periods to indicate the vendor business hours for the pickup time. - @JsonProperty("OpenSchedule") - @field:Valid - val openSchedule: kotlin.collections.List? = null + /* Pickup date and time. */ +@JsonProperty("DateTime") +val dateTime: + java.time.LocalDateTime +, + + @JsonProperty("Location") +val location: + CarsLocation +, + + /* The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. */ +@JsonProperty("ShuttleCategory") +val shuttleCategory: kotlin.String? = null, + + @JsonProperty("Distance") +val distance: CarsDistance? = null, + + /* A List of date time periods to indicate the vendor business hours for the pickup time. */ +@JsonProperty("OpenSchedule") +val openSchedule: kotlin.collections.List? = null ) { + + + + init { + require(dateTime != null) { "dateTime must not be null" } + + + + + + + + require(location != null) { "location must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var dateTime: java.time.LocalDateTime? = null, - private var location: CarsLocation? = null, - private var shuttleCategory: kotlin.String? = null, - private var distance: CarsDistance? = null, - private var openSchedule: kotlin.collections.List? = null - ) { - fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } - - fun location(location: CarsLocation) = apply { this.location = location } - - fun shuttleCategory(shuttleCategory: kotlin.String?) = apply { this.shuttleCategory = shuttleCategory } - - fun distance(distance: CarsDistance?) = apply { this.distance = distance } - - fun openSchedule(openSchedule: kotlin.collections.List?) = apply { this.openSchedule = openSchedule } - - fun build(): VendorLocationDetails { - val instance = - VendorLocationDetails( - dateTime = dateTime!!, - location = location!!, - shuttleCategory = shuttleCategory, - distance = distance, - openSchedule = openSchedule - ) - - validate(instance) - - return instance - } - - private fun validate(instance: VendorLocationDetails) { - 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}" } - ) - } - } + class Builder( + private var dateTime: java.time.LocalDateTime? = null, + private var location: CarsLocation? = null, + private var shuttleCategory: kotlin.String? = null, + private var distance: CarsDistance? = null, + private var openSchedule: kotlin.collections.List? = null + ) { + fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } + fun location(location: CarsLocation) = apply { this.location = location } + fun shuttleCategory(shuttleCategory: kotlin.String?) = apply { this.shuttleCategory = shuttleCategory } + fun distance(distance: CarsDistance?) = apply { this.distance = distance } + fun openSchedule(openSchedule: kotlin.collections.List?) = apply { this.openSchedule = openSchedule } + + fun build(): VendorLocationDetails { + val instance = VendorLocationDetails( + dateTime = dateTime!!, + location = location!!, + shuttleCategory = shuttleCategory, + distance = distance, + openSchedule = openSchedule + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( dateTime = dateTime!!, location = location!!, shuttleCategory = shuttleCategory, distance = distance, openSchedule = openSchedule - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt index 611c894d8..37b63f1d3 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt @@ -15,64 +15,52 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* - * @param waiverPolicyDescription The localized waiver policy description, which could be put in front of cancellation policy description. +* + * @param waiverPolicyDescription The localized waiver policy description, which could be put in front of cancellation policy description. */ data class WaiverPolicy( - // The localized waiver policy description, which could be put in front of cancellation policy description. - @JsonProperty("WaiverPolicyDescription") - @field:Valid - val waiverPolicyDescription: kotlin.String? = null + /* The localized waiver policy description, which could be put in front of cancellation policy description. */ +@JsonProperty("WaiverPolicyDescription") +val waiverPolicyDescription: kotlin.String? = null ) { + + + + init { + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var waiverPolicyDescription: kotlin.String? = null - ) { - fun waiverPolicyDescription(waiverPolicyDescription: kotlin.String?) = apply { this.waiverPolicyDescription = waiverPolicyDescription } - - fun build(): WaiverPolicy { - val instance = - WaiverPolicy( - waiverPolicyDescription = waiverPolicyDescription - ) - - validate(instance) - - return instance - } - - private fun validate(instance: WaiverPolicy) { - 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}" } - ) - } - } + class Builder( + private var waiverPolicyDescription: kotlin.String? = null + ) { + fun waiverPolicyDescription(waiverPolicyDescription: kotlin.String?) = apply { this.waiverPolicyDescription = waiverPolicyDescription } + + fun build(): WaiverPolicy { + val instance = WaiverPolicy( + waiverPolicyDescription = waiverPolicyDescription + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( waiverPolicyDescription = waiverPolicyDescription - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt index 859ce42ed..e36f1569f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt @@ -15,112 +15,130 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.xap.models.Money + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** -* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param code The code of a warning. - * @param description A detail information of what happened. - * @param originalPrice - * @param newPrice - * @param changedAmount - * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. +* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param code The code of a warning. + * @param description A detail information of what happened. + * @param originalPrice + * @param newPrice + * @param changedAmount + * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ data class Warning( - // The code of a warning. - @JsonProperty("Code") - @field:Valid - val code: kotlin.String? = null, - // A detail information of what happened. - @JsonProperty("Description") - @field:Valid - val description: kotlin.String? = null, - @JsonProperty("OriginalPrice") - @field:Valid - val originalPrice: Money? = null, - @JsonProperty("NewPrice") - @field:Valid - val newPrice: Money? = null, - @JsonProperty("ChangedAmount") - @field:Valid - val changedAmount: Money? = null, - // The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - @JsonProperty("ChangedPercentage") - @field:Valid - val changedPercentage: kotlin.String? = null + /* The code of a warning. */ +@JsonProperty("Code") +val code: kotlin.String? = null, + + /* A detail information of what happened. */ +@JsonProperty("Description") +val description: kotlin.String? = null, + + @JsonProperty("OriginalPrice") +val originalPrice: Money? = null, + + @JsonProperty("NewPrice") +val newPrice: Money? = null, + + @JsonProperty("ChangedAmount") +val changedAmount: Money? = null, + + /* The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ +@JsonProperty("ChangedPercentage") +val changedPercentage: kotlin.String? = null ) { + + + + init { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var originalPrice: Money? = null, - private var newPrice: Money? = null, - private var changedAmount: Money? = null, - private var changedPercentage: kotlin.String? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - - fun description(description: kotlin.String?) = apply { this.description = description } - - fun originalPrice(originalPrice: Money?) = apply { this.originalPrice = originalPrice } - - fun newPrice(newPrice: Money?) = apply { this.newPrice = newPrice } - - fun changedAmount(changedAmount: Money?) = apply { this.changedAmount = changedAmount } - - fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } - - fun build(): Warning { - val instance = - Warning( - code = code, - description = description, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount, - changedPercentage = changedPercentage - ) - - validate(instance) - - return instance - } - - private fun validate(instance: Warning) { - 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}" } - ) - } - } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var originalPrice: Money? = null, + private var newPrice: Money? = null, + private var changedAmount: Money? = null, + private var changedPercentage: kotlin.String? = null + ) { + fun code(code: kotlin.String?) = apply { this.code = code } + fun description(description: kotlin.String?) = apply { this.description = description } + fun originalPrice(originalPrice: Money?) = apply { this.originalPrice = originalPrice } + fun newPrice(newPrice: Money?) = apply { this.newPrice = newPrice } + fun changedAmount(changedAmount: Money?) = apply { this.changedAmount = changedAmount } + fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } + + fun build(): Warning { + val instance = Warning( + code = code, + description = description, + originalPrice = originalPrice, + newPrice = newPrice, + changedAmount = changedAmount, + changedPercentage = changedPercentage + ) + + return instance + } } - fun toBuilder() = - Builder( + fun toBuilder() = Builder( code = code, description = description, originalPrice = originalPrice, newPrice = newPrice, changedAmount = changedAmount, changedPercentage = changedPercentage - ) + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt index 59112e4f9..e891a80d8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt @@ -15,88 +15,83 @@ */ package com.expediagroup.sdk.xap.models -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException + import com.fasterxml.jackson.annotation.JsonProperty -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation /** * Indicate when to pay. - * @param type Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. - * @param `value` This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. + * @param type Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. + * @param `value` This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. */ data class When( - // Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. - @JsonProperty("Type") - val type: When.Type? = null, - // This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. - @JsonProperty("Value") - @field:Valid - val `value`: kotlin.String? = null + /* Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. */ +@JsonProperty("Type") +val type: When.Type? = null, + + /* This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. */ +@JsonProperty("Value") +val `value`: kotlin.String? = null ) { - companion object { - @JvmStatic - fun builder() = Builder() + + + + init { + + + + + + + + + + + + + + + } - class Builder( - private var type: When.Type? = null, - private var `value`: kotlin.String? = null - ) { - fun type(type: When.Type?) = apply { this.type = type } - - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - - fun build(): When { - val instance = - When( - type = type, - `value` = `value` - ) - - validate(instance) - - return instance - } - - private fun validate(instance: When) { - 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}" } - ) - } - } + companion object { + @JvmStatic + fun builder() = Builder() } - fun toBuilder() = - Builder( + class Builder( + private var type: When.Type? = null, + private var `value`: kotlin.String? = null + ) { + fun type(type: When.Type?) = apply { this.type = type } + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + + fun build(): When { + val instance = When( type = type, `value` = `value` - ) + ) - /** - * Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. - * Values: UPON_BOOKING,DAYS_PRIOR,UPON_ARRIVAL - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("UPON_BOOKING") - UPON_BOOKING("UPON_BOOKING"), + return instance + } + } - @JsonProperty("DAYS_PRIOR") - DAYS_PRIOR("DAYS_PRIOR"), + fun toBuilder() = Builder( + type = type, + `value` = `value` + ) - @JsonProperty("UPON_ARRIVAL") - UPON_ARRIVAL("UPON_ARRIVAL") - } + /** + * Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. + * Values: UPON_BOOKING,DAYS_PRIOR,UPON_ARRIVAL + */ + enum class Type(val value: kotlin.String) { + @JsonProperty("UPON_BOOKING") + UPON_BOOKING("UPON_BOOKING"), + + @JsonProperty("DAYS_PRIOR") + DAYS_PRIOR("DAYS_PRIOR"), + + @JsonProperty("UPON_ARRIVAL") + UPON_ARRIVAL("UPON_ARRIVAL"); + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt index 4441276e3..9115017ea 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt @@ -1,46 +1,64 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.ActivityDetailsResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * - * @property params [GetActivityDetailsOperationParams] - */ -class GetActivityDetailsOperation( - val params: GetActivityDetailsOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/activities/details/{offerToken}" - - url = - url.replace( - oldValue = "{" + "offerToken" + "}", - newValue = this.params.offerToken, - ignoreCase = true - ) - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIMError + import com.expediagroup.sdk.xap.models.ActivitiesErrors + import com.expediagroup.sdk.xap.models.ActivityDetailsResponse + + /** + * + * @property params [GetActivityDetailsOperationParams] + */ + class GetActivityDetailsOperation( + private val params: GetActivityDetailsOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/activities/details/{offerToken}" + + + url = url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true + ) + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt index 4d28dac63..b328783fe 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt @@ -1,129 +1,171 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property offerToken the offerToken of a activity - * @property partnerTransactionId Partner-generated identifier. - * @property locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. - */ -@JsonDeserialize(builder = GetActivityDetailsOperationParams.Builder::class) -data class GetActivityDetailsOperationParams( - @field:NotNull - @field:Valid - val offerToken: kotlin.String, - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:Valid - val locale: kotlin.String? = - null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - class Builder( - @JsonProperty("offerToken") private var offerToken: kotlin.String? = null, - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("locale") private var locale: kotlin.String? = null - ) { - /** - * @param offerToken the offerToken of a activity - */ - fun offerToken(offerToken: kotlin.String) = apply { this.offerToken = offerToken } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + +import com.expediagroup.sdk.xap.models.APIMError +import com.expediagroup.sdk.xap.models.ActivitiesErrors +import com.expediagroup.sdk.xap.models.ActivityDetailsResponse + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property offerToken the offerToken of a activity + * @property partnerTransactionId Partner-generated identifier. + * @property locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. + */ + @JsonDeserialize(builder = GetActivityDetailsOperationParams.Builder::class) + data class GetActivityDetailsOperationParams( + val offerToken: + kotlin.String + + , + val partnerTransactionId: + kotlin.String + + , + val locale: + kotlin.String + +? + = null + + ) { + + init { + require(offerToken != null) { "offerToken must not be null" } + + + + + + + + + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + + + + + + + + + + + - /** - * @param partnerTransactionId Partner-generated identifier. - */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. - */ - fun locale(locale: kotlin.String) = apply { this.locale = locale } - fun build(): GetActivityDetailsOperationParams { - val params = - GetActivityDetailsOperationParams( - offerToken = offerToken!!, - partnerTransactionId = partnerTransactionId!!, - locale = locale - ) - validate(params) - return params - } - private fun validate(params: GetActivityDetailsOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) } - } - } - fun toBuilder() = - Builder( - offerToken = offerToken, - partnerTransactionId = partnerTransactionId, - locale = locale + companion object { + @JvmStatic + fun builder() = Builder() + } + + + + class Builder( + @JsonProperty("offerToken") private var offerToken: + kotlin.String +? = null + , + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String +? = null + , + @JsonProperty("locale") private var locale: + kotlin.String +? = null + +) { + /** + * @param offerToken the offerToken of a activity + */ + fun offerToken(offerToken: + kotlin.String +) = apply { this.offerToken = offerToken } + /** + * @param partnerTransactionId Partner-generated identifier. + */ + fun partnerTransactionId(partnerTransactionId: + kotlin.String +) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. + */ + fun locale(locale: + kotlin.String +) = apply { this.locale = locale } + + fun build(): GetActivityDetailsOperationParams { + val params = GetActivityDetailsOperationParams( + offerToken = offerToken!!, + partnerTransactionId = partnerTransactionId!!, + locale = locale ) - fun getHeaders(): Headers = - Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } + return params + } +} + +fun toBuilder() = Builder( + offerToken = offerToken, + partnerTransactionId = partnerTransactionId, + locale = locale +) + + + fun getHeaders(): Headers { +return Headers.builder().apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } add("Accept", "application/vnd.exp-activity.v3+json") - }.build() - - fun getQueryParams(): List = - buildList { - locale?.let { - val key = "locale" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } +}.build() +} + + fun getQueryParams(): List = + buildList { + locale?.let { + val key = "locale" + val value = buildList { + add(it) } - fun getPathParams(): Map = - buildMap { - offerToken?.also { - put("offerToken", offerToken) - } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) } } + + fun getPathParams() : Map { +return buildMap { + offerToken?.also { + put("offerToken", offerToken) + } + } +} + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt index bf76b5b37..ddec5b672 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt @@ -1,39 +1,58 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.ActivityListingsResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * - * @property params [GetActivityListingsOperationParams] - */ -class GetActivityListingsOperation( - val params: GetActivityListingsOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/activities/listings" - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIMError + import com.expediagroup.sdk.xap.models.ActivitiesErrors + import com.expediagroup.sdk.xap.models.ActivityListingsResponse + + /** + * + * @property params [GetActivityListingsOperationParams] + */ + class GetActivityListingsOperation( + private val params: GetActivityListingsOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/activities/listings" + + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt index 3f80ecac3..0795511bd 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt @@ -1,259 +1,353 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property partnerTransactionId Partner-generated identifier. - * @property location Can be a city name, street address, three-letter IATA Airport Code or a landmark name. (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) - * @property geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. - * @property startDate Start date for the activity window in YYY-MM-DD format. If an endDate value is supplied there must also be a startDate. default: currentDate - * @property endDate End date for the activity window in YYY-MM-DD format. default: \"startDate+14\" - * @property locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. - * @property links Comma-separated list to specify the types of HATEAOS links returned in the API Response. WD (deep link URL to web infosite) AD (details API query) - */ -@JsonDeserialize(builder = GetActivityListingsOperationParams.Builder::class) -data class GetActivityListingsOperationParams( - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:Valid - val location: kotlin.String? = - null, - @field:Valid - val geoLocation: kotlin.String? = - null, - @field:Valid - val startDate: java.time.LocalDate? = - null, - @field:Valid - val endDate: java.time.LocalDate? = - null, - @field:Valid - val locale: kotlin.String? = - null, - val links: kotlin.collections.List< + + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + +import com.expediagroup.sdk.xap.models.APIMError +import com.expediagroup.sdk.xap.models.ActivitiesErrors +import com.expediagroup.sdk.xap.models.ActivityListingsResponse + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property partnerTransactionId Partner-generated identifier. + * @property location Can be a city name, street address, three-letter IATA Airport Code or a landmark name. (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) + * @property geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. + * @property startDate Start date for the activity window in YYY-MM-DD format. If an endDate value is supplied there must also be a startDate. default: currentDate + * @property endDate End date for the activity window in YYY-MM-DD format. default: \"startDate+14\" + * @property locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. + * @property links Comma-separated list to specify the types of HATEAOS links returned in the API Response. WD (deep link URL to web infosite) AD (details API query) + */ + @JsonDeserialize(builder = GetActivityListingsOperationParams.Builder::class) + data class GetActivityListingsOperationParams( + val partnerTransactionId: + kotlin.String + + , + val location: + kotlin.String + +? + = null +, + val geoLocation: + kotlin.String + +? + = null +, + val startDate: + java.time.LocalDate + +? + = null +, + val endDate: + java.time.LocalDate + +? + = null +, + val locale: + kotlin.String + +? + = null +, + val links: kotlin.collections.List + < + GetActivityListingsOperationParams.Links + + > + +? + = null + + ) { + + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + + companion object { + @JvmStatic + fun builder() = Builder() + } + + enum class Links( + val value: + kotlin.String + + ) { + WD("WD") + , + AD("AD") + + } + + + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String +? = null + , + @JsonProperty("location") private var location: + kotlin.String +? = null + , + @JsonProperty("geoLocation") private var geoLocation: + kotlin.String +? = null + , + @JsonProperty("startDate") private var startDate: + java.time.LocalDate +? = null + , + @JsonProperty("endDate") private var endDate: + java.time.LocalDate +? = null + , + @JsonProperty("locale") private var locale: + kotlin.String +? = null + , + @JsonProperty("links") private var links: kotlin.collections.List + < GetActivityListingsOperationParams.Links - >? = - null + + > +? = null + ) { - companion object { - @JvmStatic - fun builder() = Builder() - } + /** + * @param partnerTransactionId Partner-generated identifier. + */ + fun partnerTransactionId(partnerTransactionId: + kotlin.String +) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param location Can be a city name, street address, three-letter IATA Airport Code or a landmark name. (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) + */ + fun location(location: + kotlin.String +) = apply { this.location = location } + /** + * @param geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. + */ + fun geoLocation(geoLocation: + kotlin.String +) = apply { this.geoLocation = geoLocation } + /** + * @param startDate Start date for the activity window in YYY-MM-DD format. If an endDate value is supplied there must also be a startDate. default: currentDate + */ + fun startDate(startDate: + java.time.LocalDate +) = apply { this.startDate = startDate } + /** + * @param endDate End date for the activity window in YYY-MM-DD format. default: \"startDate+14\" + */ + fun endDate(endDate: + java.time.LocalDate +) = apply { this.endDate = endDate } + /** + * @param locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. + */ + fun locale(locale: + kotlin.String +) = apply { this.locale = locale } + /** + * @param links Comma-separated list to specify the types of HATEAOS links returned in the API Response. WD (deep link URL to web infosite) AD (details API query) + */ + fun links(links: kotlin.collections.List + < + GetActivityListingsOperationParams.Links + + > +) = apply { this.links = links } - enum class Links( - val value: kotlin.String - ) { - WD("WD"), - AD("AD") + fun build(): GetActivityListingsOperationParams { + val params = GetActivityListingsOperationParams( + partnerTransactionId = partnerTransactionId!!, + location = location, + geoLocation = geoLocation, + startDate = startDate, + endDate = endDate, + locale = locale, + links = links + ) + + return params } +} - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("location") private var location: kotlin.String? = null, - @JsonProperty("geoLocation") private var geoLocation: kotlin.String? = null, - @JsonProperty("startDate") private var startDate: java.time.LocalDate? = null, - @JsonProperty("endDate") private var endDate: java.time.LocalDate? = null, - @JsonProperty("locale") private var locale: kotlin.String? = null, - @JsonProperty("links") private var links: kotlin.collections.List< - GetActivityListingsOperationParams.Links - >? = null - ) { - /** - * @param partnerTransactionId Partner-generated identifier. - */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } +fun toBuilder() = Builder( + partnerTransactionId = partnerTransactionId, + location = location, + geoLocation = geoLocation, + startDate = startDate, + endDate = endDate, + locale = locale, + links = links +) - /** - * @param location Can be a city name, street address, three-letter IATA Airport Code or a landmark name. (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) - */ - fun location(location: kotlin.String) = apply { this.location = location } - /** - * @param geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. - */ - fun geoLocation(geoLocation: kotlin.String) = apply { this.geoLocation = geoLocation } + fun getHeaders(): Headers { +return Headers.builder().apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-activity.v3+json") +}.build() +} - /** - * @param startDate Start date for the activity window in YYY-MM-DD format. If an endDate value is supplied there must also be a startDate. default: currentDate - */ - fun startDate(startDate: java.time.LocalDate) = apply { this.startDate = startDate } + fun getQueryParams(): List = + buildList { + location?.let { + val key = "location" + val value = buildList { + add(it) + } - /** - * @param endDate End date for the activity window in YYY-MM-DD format. default: \"startDate+14\" - */ - fun endDate(endDate: java.time.LocalDate) = apply { this.endDate = endDate } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + geoLocation?.let { + val key = "geoLocation" + val value = buildList { + add(it) + } - /** - * @param locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. - */ - fun locale(locale: kotlin.String) = apply { this.locale = locale } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + startDate?.let { + val key = "startDate" + val value = buildList { + add(it.toString()) + } - /** - * @param links Comma-separated list to specify the types of HATEAOS links returned in the API Response. WD (deep link URL to web infosite) AD (details API query) - */ - fun links( - links: kotlin.collections.List< - GetActivityListingsOperationParams.Links - > - ) = apply { this.links = links } - - fun build(): GetActivityListingsOperationParams { - val params = - GetActivityListingsOperationParams( - partnerTransactionId = partnerTransactionId!!, - location = location, - geoLocation = geoLocation, - startDate = startDate, - endDate = endDate, - locale = locale, - links = links - ) - - validate(params) - - return params + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + endDate?.let { + val key = "endDate" + val value = buildList { + add(it.toString()) } - private fun validate(params: GetActivityListingsOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + locale?.let { + val key = "locale" + val value = buildList { + add(it) } - } - fun toBuilder() = - Builder( - partnerTransactionId = partnerTransactionId, - location = location, - geoLocation = geoLocation, - startDate = startDate, - endDate = endDate, - locale = locale, - links = links - ) + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + links?.let { + val key = "links" + val value = buildList { + addAll(it.map { it.value }) + } - fun getHeaders(): Headers = - Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-activity.v3+json") - }.build() - - fun getQueryParams(): List = - buildList { - location?.let { - val key = "location" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - geoLocation?.let { - val key = "geoLocation" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - startDate?.let { - val key = "startDate" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - endDate?.let { - val key = "endDate" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - locale?.let { - val key = "locale" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - links?.let { - val key = "links" - val value = - buildList { - addAll(it.map { it.value }) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) } } + + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt index 3abaae8a8..e80b7038f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt @@ -1,46 +1,64 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.CarDetailsResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * Get Extended information with a single car offer - * @property params [GetCarDetailsOperationParams] - */ -class GetCarDetailsOperation( - val params: GetCarDetailsOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/cars/details/{offerToken}" - - url = - url.replace( - oldValue = "{" + "offerToken" + "}", - newValue = this.params.offerToken, - ignoreCase = true - ) - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIMError + import com.expediagroup.sdk.xap.models.CarDetailsResponse + import com.expediagroup.sdk.xap.models.CarsErrors + + /** + * Get Extended information with a single car offer + * @property params [GetCarDetailsOperationParams] + */ + class GetCarDetailsOperation( + private val params: GetCarDetailsOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/cars/details/{offerToken}" + + + url = url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true + ) + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt index 4aa71e9e2..c2ada49b0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt @@ -1,183 +1,247 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property offerToken car offer token - * @property partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. - * @property price The total price for the product. - * @property currency Price currency code - * @property source source mobile - The value mobile represents that the client is mobile. - */ -@JsonDeserialize(builder = GetCarDetailsOperationParams.Builder::class) -data class GetCarDetailsOperationParams( - @field:NotNull - @field:Valid - val offerToken: kotlin.String, - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:NotNull - @field:Valid - val price: kotlin.String, - @field:NotNull - @field:Valid - val currency: kotlin.String, - @field:Valid - val source: kotlin.String? = - null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - class Builder( - @JsonProperty("offerToken") private var offerToken: kotlin.String? = null, - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("price") private var price: kotlin.String? = null, - @JsonProperty("currency") private var currency: kotlin.String? = null, - @JsonProperty("source") private var source: kotlin.String? = null - ) { - /** - * @param offerToken car offer token - */ - fun offerToken(offerToken: kotlin.String) = apply { this.offerToken = offerToken } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + +import com.expediagroup.sdk.xap.models.APIMError +import com.expediagroup.sdk.xap.models.CarDetailsResponse +import com.expediagroup.sdk.xap.models.CarsErrors + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property offerToken car offer token + * @property partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. + * @property price The total price for the product. + * @property currency Price currency code + * @property source source mobile - The value mobile represents that the client is mobile. + */ + @JsonDeserialize(builder = GetCarDetailsOperationParams.Builder::class) + data class GetCarDetailsOperationParams( + val offerToken: + kotlin.String + + , + val partnerTransactionId: + kotlin.String + + , + val price: + kotlin.String + + , + val currency: + kotlin.String + + , + val source: + kotlin.String + +? + = null + + ) { + + init { + require(offerToken != null) { "offerToken must not be null" } + + + + + + + + + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + + + + + + + + + require(price != null) { "price must not be null" } + + + + + + + + + require(currency != null) { "currency must not be null" } + + + + + + + + + + + + - /** - * @param partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. - */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param price The total price for the product. - */ - fun price(price: kotlin.String) = apply { this.price = price } - /** - * @param currency Price currency code - */ - fun currency(currency: kotlin.String) = apply { this.currency = currency } - /** - * @param source source mobile - The value mobile represents that the client is mobile. - */ - fun source(source: kotlin.String) = apply { this.source = source } - - fun build(): GetCarDetailsOperationParams { - val params = - GetCarDetailsOperationParams( - offerToken = offerToken!!, - partnerTransactionId = partnerTransactionId!!, - price = price!!, - currency = currency!!, - source = source - ) - - validate(params) - - return params - } - private fun validate(params: GetCarDetailsOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) } - } - } - fun toBuilder() = - Builder( - offerToken = offerToken, - partnerTransactionId = partnerTransactionId, - price = price, - currency = currency, - source = source + companion object { + @JvmStatic + fun builder() = Builder() + } + + + + class Builder( + @JsonProperty("offerToken") private var offerToken: + kotlin.String +? = null + , + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String +? = null + , + @JsonProperty("price") private var price: + kotlin.String +? = null + , + @JsonProperty("currency") private var currency: + kotlin.String +? = null + , + @JsonProperty("source") private var source: + kotlin.String +? = null + +) { + /** + * @param offerToken car offer token + */ + fun offerToken(offerToken: + kotlin.String +) = apply { this.offerToken = offerToken } + /** + * @param partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. + */ + fun partnerTransactionId(partnerTransactionId: + kotlin.String +) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param price The total price for the product. + */ + fun price(price: + kotlin.String +) = apply { this.price = price } + /** + * @param currency Price currency code + */ + fun currency(currency: + kotlin.String +) = apply { this.currency = currency } + /** + * @param source source mobile - The value mobile represents that the client is mobile. + */ + fun source(source: + kotlin.String +) = apply { this.source = source } + + fun build(): GetCarDetailsOperationParams { + val params = GetCarDetailsOperationParams( + offerToken = offerToken!!, + partnerTransactionId = partnerTransactionId!!, + price = price!!, + currency = currency!!, + source = source ) - fun getHeaders(): Headers = - Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } + return params + } +} + +fun toBuilder() = Builder( + offerToken = offerToken, + partnerTransactionId = partnerTransactionId, + price = price, + currency = currency, + source = source +) + + + fun getHeaders(): Headers { +return Headers.builder().apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } add("Accept", "application/vnd.exp-car.v3+json") - }.build() - - fun getQueryParams(): List = - buildList { - price?.let { - val key = "price" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - currency?.let { - val key = "currency" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - source?.let { - val key = "source" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } +}.build() +} + + fun getQueryParams(): List = + buildList { + price?.let { + val key = "price" + val value = buildList { + add(it) } - fun getPathParams(): Map = - buildMap { - offerToken?.also { - put("offerToken", offerToken) - } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + currency?.let { + val key = "currency" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + source?.let { + val key = "source" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) } } + + fun getPathParams() : Map { +return buildMap { + offerToken?.also { + put("offerToken", offerToken) + } + } +} + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt index 39238b3cf..9e16907e1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt @@ -1,39 +1,59 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.CarListingsResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * Search Expedia car inventory - * @property params [GetCarsListingsOperationParams] - */ -class GetCarsListingsOperation( - val params: GetCarsListingsOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/cars/listings" - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIMError + import com.expediagroup.sdk.xap.models.CarListingsResponse + import com.expediagroup.sdk.xap.models.CarsErrors + import com.expediagroup.sdk.xap.models.DisambiguationResponse + + /** + * Search Expedia car inventory + * @property params [GetCarsListingsOperationParams] + */ + class GetCarsListingsOperation( + private val params: GetCarsListingsOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/cars/listings" + + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt index e43c0e4aa..fc1fc6602 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt @@ -1,889 +1,1259 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. - * @property pickupAirport Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - * @property pickupCity The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - * @property pickupAddress The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - * @property pickupGeoLocation The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - * @property pickupRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed. - * @property dropOffAirport Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - * @property dropOffCity City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - * @property dropOffAddress Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - * @property dropOffGeoLocation Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - * @property dropOffRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same. - * @property pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) - * @property dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. - * @property sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. - * @property sortOrder Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of 'ascending' will be assumed. - * @property limit The maximum number of search results that will be returned by the query. - * @property suppliers A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier. - * @property carClasses A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. - * @property discount1Supplier Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below. - * @property discount1Type The type of discount to be applied.Supported values: CorpDiscount | Coupon. - * @property discount1Code The code of the discount to be applied. - * @property transmissions A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. - * @property airConditioning Specify whether to filter for cars that include or exclude air conditioning. - * @property carTypes A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. - * @property unit The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM. - * @property driverAge The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. - * @property links WS = WebSearch, AD = ApiDetails, WD = WebDetails - * @property source Indicates the source where the request is coming from.The available values for the source as below:browser - The value \"browser\" represents that the client is traditional website.mobile - The value \"mobile\" represents that the client is mobile.all - The value \"all\" indicates that the client includes both browser and mobile.Only one source value may be used at a time. - */ -@JsonDeserialize(builder = GetCarsListingsOperationParams.Builder::class) -data class GetCarsListingsOperationParams( - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:Valid - val pickupAirport: kotlin.String? = - null, - @field:Valid - val pickupCity: kotlin.String? = - null, - @field:Valid - val pickupAddress: kotlin.String? = - null, - @field:Valid - val pickupGeoLocation: kotlin.String? = - null, - @field:Valid - val pickupRadius: kotlin.Int? = - null, - @field:Valid - val dropOffAirport: kotlin.String? = - null, - @field:Valid - val dropOffCity: kotlin.String? = - null, - @field:Valid - val dropOffAddress: kotlin.String? = - null, - @field:Valid - val dropOffGeoLocation: kotlin.String? = - null, - @field:Valid - val dropOffRadius: kotlin.Int? = - null, - @field:NotNull - @field:Valid - val pickupTime: java.time.LocalDateTime, - @field:NotNull - @field:Valid - val dropOffTime: java.time.LocalDateTime, - val sortType: GetCarsListingsOperationParams.SortType? = - null, - val sortOrder: GetCarsListingsOperationParams.SortOrder? = - null, - @field:Valid - val limit: kotlin.Int? = - null, - @field:Valid - val suppliers: kotlin.collections.Set< + + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + +import com.expediagroup.sdk.xap.models.APIMError +import com.expediagroup.sdk.xap.models.CarListingsResponse +import com.expediagroup.sdk.xap.models.CarsErrors +import com.expediagroup.sdk.xap.models.DisambiguationResponse + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. + * @property pickupAirport Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + * @property pickupCity The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + * @property pickupAddress The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + * @property pickupGeoLocation The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + * @property pickupRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed. + * @property dropOffAirport Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + * @property dropOffCity City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + * @property dropOffAddress Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + * @property dropOffGeoLocation Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + * @property dropOffRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same. + * @property pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) + * @property dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. + * @property sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. + * @property sortOrder Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of 'ascending' will be assumed. + * @property limit The maximum number of search results that will be returned by the query. + * @property suppliers A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier. + * @property carClasses A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. + * @property discount1Supplier Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below. + * @property discount1Type The type of discount to be applied.Supported values: CorpDiscount | Coupon. + * @property discount1Code The code of the discount to be applied. + * @property transmissions A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. + * @property airConditioning Specify whether to filter for cars that include or exclude air conditioning. + * @property carTypes A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. + * @property unit The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM. + * @property driverAge The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. + * @property links WS = WebSearch, AD = ApiDetails, WD = WebDetails + * @property source Indicates the source where the request is coming from.The available values for the source as below:browser - The value \"browser\" represents that the client is traditional website.mobile - The value \"mobile\" represents that the client is mobile.all - The value \"all\" indicates that the client includes both browser and mobile.Only one source value may be used at a time. + */ + @JsonDeserialize(builder = GetCarsListingsOperationParams.Builder::class) + data class GetCarsListingsOperationParams( + val partnerTransactionId: + kotlin.String + + , + val pickupAirport: + kotlin.String + +? + = null +, + val pickupCity: + kotlin.String + +? + = null +, + val pickupAddress: + kotlin.String + +? + = null +, + val pickupGeoLocation: + kotlin.String + +? + = null +, + val pickupRadius: + kotlin.Int + +? + = null +, + val dropOffAirport: + kotlin.String + +? + = null +, + val dropOffCity: + kotlin.String + +? + = null +, + val dropOffAddress: + kotlin.String + +? + = null +, + val dropOffGeoLocation: + kotlin.String + +? + = null +, + val dropOffRadius: + kotlin.Int + +? + = null +, + val pickupTime: + java.time.LocalDateTime + + , + val dropOffTime: + java.time.LocalDateTime + + , + val sortType: GetCarsListingsOperationParams.SortType + + +? + = null +, + val sortOrder: GetCarsListingsOperationParams.SortOrder + + +? + = null +, + val limit: + kotlin.Int + +? + = null +, + val suppliers: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val carClasses: kotlin.collections.Set< + > + +? + = null +, + val carClasses: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val discount1Supplier: kotlin.String? = - null, - val discount1Type: GetCarsListingsOperationParams.Discount1Type? = - null, - @field:Valid - val discount1Code: kotlin.String? = - null, - @field:Valid - val transmissions: kotlin.collections.Set< + > + +? + = null +, + val discount1Supplier: + kotlin.String + +? + = null +, + val discount1Type: GetCarsListingsOperationParams.Discount1Type + + +? + = null +, + val discount1Code: + kotlin.String + +? + = null +, + val transmissions: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val airConditioning: kotlin.Boolean? = - null, - @field:Valid - val carTypes: kotlin.collections.Set< + > + +? + = null +, + val airConditioning: + kotlin.Boolean + +? + = null +, + val carTypes: kotlin.collections.Set + < + kotlin.String - >? = - null, - val unit: GetCarsListingsOperationParams.Unit? = - null, - @field:Valid - val driverAge: kotlin.Int? = - null, - val links: kotlin.collections.List< + > + +? + = null +, + val unit: GetCarsListingsOperationParams.Unit + + +? + = null +, + val driverAge: + kotlin.Int + +? + = null +, + val links: kotlin.collections.List + < GetCarsListingsOperationParams.Links - >? = - null, - val source: GetCarsListingsOperationParams.Source? = - null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } + + > + +? + = null +, + val source: GetCarsListingsOperationParams.Source + + +? + = null + + ) { + + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + require(pickupTime != null) { "pickupTime must not be null" } + + + + + + + + + require(dropOffTime != null) { "dropOffTime must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - enum class SortType( - val value: kotlin.String - ) { - PRICE("Price") - } - enum class SortOrder( - val value: kotlin.String - ) { - ASC("ASC"), - DESC("DESC") - } - enum class Discount1Type( - val value: kotlin.String - ) { - CORP_DISCOUNT("CorpDiscount"), - COUPON("Coupon") - } - enum class Unit( - val value: kotlin.String - ) { - KM("KM"), - MI("MI") - } - enum class Links( - val value: kotlin.String - ) { - WS("WS"), - AD("AD"), - WD("WD") - } - enum class Source( - val value: kotlin.String - ) { - BROWSER("browser"), - MOBILE("mobile"), - ALL("all") - } - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("pickup.airport") private var pickupAirport: kotlin.String? = null, - @JsonProperty("pickup.city") private var pickupCity: kotlin.String? = null, - @JsonProperty("pickup.address") private var pickupAddress: kotlin.String? = null, - @JsonProperty("pickup.geoLocation") private var pickupGeoLocation: kotlin.String? = null, - @JsonProperty("pickup.radius") private var pickupRadius: kotlin.Int? = null, - @JsonProperty("dropOff.airport") private var dropOffAirport: kotlin.String? = null, - @JsonProperty("dropOff.city") private var dropOffCity: kotlin.String? = null, - @JsonProperty("dropOff.address") private var dropOffAddress: kotlin.String? = null, - @JsonProperty("dropOff.geoLocation") private var dropOffGeoLocation: kotlin.String? = null, - @JsonProperty("dropOff.radius") private var dropOffRadius: kotlin.Int? = null, - @JsonProperty("pickupTime") private var pickupTime: java.time.LocalDateTime? = null, - @JsonProperty("dropOffTime") private var dropOffTime: java.time.LocalDateTime? = null, - @JsonProperty("sortType") private var sortType: GetCarsListingsOperationParams.SortType? = null, - @JsonProperty("sortOrder") private var sortOrder: GetCarsListingsOperationParams.SortOrder? = null, - @JsonProperty("limit") private var limit: kotlin.Int? = null, - @JsonProperty("suppliers") private var suppliers: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("carClasses") private var carClasses: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("discount1.supplier") private var discount1Supplier: kotlin.String? = null, - @JsonProperty("discount1.type") private var discount1Type: GetCarsListingsOperationParams.Discount1Type? = null, - @JsonProperty("discount1.code") private var discount1Code: kotlin.String? = null, - @JsonProperty("transmissions") private var transmissions: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("airConditioning") private var airConditioning: kotlin.Boolean? = null, - @JsonProperty("carTypes") private var carTypes: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("unit") private var unit: GetCarsListingsOperationParams.Unit? = null, - @JsonProperty("driverAge") private var driverAge: kotlin.Int? = null, - @JsonProperty("links") private var links: kotlin.collections.List< - GetCarsListingsOperationParams.Links - >? = null, - @JsonProperty("source") private var source: GetCarsListingsOperationParams.Source? = null - ) { - /** - * @param partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. - */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param pickupAirport Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - */ - fun pickupAirport(pickupAirport: kotlin.String) = apply { this.pickupAirport = pickupAirport } - /** - * @param pickupCity The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - */ - fun pickupCity(pickupCity: kotlin.String) = apply { this.pickupCity = pickupCity } - /** - * @param pickupAddress The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - */ - fun pickupAddress(pickupAddress: kotlin.String) = apply { this.pickupAddress = pickupAddress } - /** - * @param pickupGeoLocation The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - */ - fun pickupGeoLocation(pickupGeoLocation: kotlin.String) = apply { this.pickupGeoLocation = pickupGeoLocation } - /** - * @param pickupRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed. - */ - fun pickupRadius(pickupRadius: kotlin.Int) = apply { this.pickupRadius = pickupRadius } - /** - * @param dropOffAirport Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - */ - fun dropOffAirport(dropOffAirport: kotlin.String) = apply { this.dropOffAirport = dropOffAirport } - /** - * @param dropOffCity City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - */ - fun dropOffCity(dropOffCity: kotlin.String) = apply { this.dropOffCity = dropOffCity } - /** - * @param dropOffAddress Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - */ - fun dropOffAddress(dropOffAddress: kotlin.String) = apply { this.dropOffAddress = dropOffAddress } - /** - * @param dropOffGeoLocation Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - */ - fun dropOffGeoLocation(dropOffGeoLocation: kotlin.String) = apply { this.dropOffGeoLocation = dropOffGeoLocation } - /** - * @param dropOffRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same. - */ - fun dropOffRadius(dropOffRadius: kotlin.Int) = apply { this.dropOffRadius = dropOffRadius } - /** - * @param pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) - */ - fun pickupTime(pickupTime: java.time.LocalDateTime) = apply { this.pickupTime = pickupTime } - /** - * @param dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. - */ - fun dropOffTime(dropOffTime: java.time.LocalDateTime) = apply { this.dropOffTime = dropOffTime } - /** - * @param sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. - */ - fun sortType(sortType: GetCarsListingsOperationParams.SortType) = apply { this.sortType = sortType } - /** - * @param sortOrder Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of 'ascending' will be assumed. - */ - fun sortOrder(sortOrder: GetCarsListingsOperationParams.SortOrder) = apply { this.sortOrder = sortOrder } - /** - * @param limit The maximum number of search results that will be returned by the query. - */ - fun limit(limit: kotlin.Int) = apply { this.limit = limit } - /** - * @param suppliers A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier. - */ - fun suppliers( - suppliers: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.suppliers = suppliers } - /** - * @param carClasses A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. - */ - fun carClasses( - carClasses: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.carClasses = carClasses } - /** - * @param discount1Supplier Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below. - */ - fun discount1Supplier(discount1Supplier: kotlin.String) = apply { this.discount1Supplier = discount1Supplier } - /** - * @param discount1Type The type of discount to be applied.Supported values: CorpDiscount | Coupon. - */ - fun discount1Type(discount1Type: GetCarsListingsOperationParams.Discount1Type) = apply { this.discount1Type = discount1Type } - /** - * @param discount1Code The code of the discount to be applied. - */ - fun discount1Code(discount1Code: kotlin.String) = apply { this.discount1Code = discount1Code } - /** - * @param transmissions A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. - */ - fun transmissions( - transmissions: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.transmissions = transmissions } - /** - * @param airConditioning Specify whether to filter for cars that include or exclude air conditioning. - */ - fun airConditioning(airConditioning: kotlin.Boolean) = apply { this.airConditioning = airConditioning } - /** - * @param carTypes A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. - */ - fun carTypes( - carTypes: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.carTypes = carTypes } - /** - * @param unit The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM. - */ - fun unit(unit: GetCarsListingsOperationParams.Unit) = apply { this.unit = unit } - /** - * @param driverAge The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. - */ - fun driverAge(driverAge: kotlin.Int) = apply { this.driverAge = driverAge } - /** - * @param links WS = WebSearch, AD = ApiDetails, WD = WebDetails - */ - fun links( - links: kotlin.collections.List< - GetCarsListingsOperationParams.Links - > - ) = apply { this.links = links } - /** - * @param source Indicates the source where the request is coming from.The available values for the source as below:browser - The value \"browser\" represents that the client is traditional website.mobile - The value \"mobile\" represents that the client is mobile.all - The value \"all\" indicates that the client includes both browser and mobile.Only one source value may be used at a time. - */ - fun source(source: GetCarsListingsOperationParams.Source) = apply { this.source = source } - - fun build(): GetCarsListingsOperationParams { - val params = - GetCarsListingsOperationParams( - partnerTransactionId = partnerTransactionId!!, - pickupAirport = pickupAirport, - pickupCity = pickupCity, - pickupAddress = pickupAddress, - pickupGeoLocation = pickupGeoLocation, - pickupRadius = pickupRadius, - dropOffAirport = dropOffAirport, - dropOffCity = dropOffCity, - dropOffAddress = dropOffAddress, - dropOffGeoLocation = dropOffGeoLocation, - dropOffRadius = dropOffRadius, - pickupTime = pickupTime!!, - dropOffTime = dropOffTime!!, - sortType = sortType, - sortOrder = sortOrder, - limit = limit, - suppliers = suppliers, - carClasses = carClasses, - discount1Supplier = discount1Supplier, - discount1Type = discount1Type, - discount1Code = discount1Code, - transmissions = transmissions, - airConditioning = airConditioning, - carTypes = carTypes, - unit = unit, - driverAge = driverAge, - links = links, - source = source - ) - - validate(params) - - return params - } - - private fun validate(params: GetCarsListingsOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } - } - } - fun toBuilder() = - Builder( - partnerTransactionId = partnerTransactionId, - pickupAirport = pickupAirport, - pickupCity = pickupCity, - pickupAddress = pickupAddress, - pickupGeoLocation = pickupGeoLocation, - pickupRadius = pickupRadius, - dropOffAirport = dropOffAirport, - dropOffCity = dropOffCity, - dropOffAddress = dropOffAddress, - dropOffGeoLocation = dropOffGeoLocation, - dropOffRadius = dropOffRadius, - pickupTime = pickupTime, - dropOffTime = dropOffTime, - sortType = sortType, - sortOrder = sortOrder, - limit = limit, - suppliers = suppliers, - carClasses = carClasses, - discount1Supplier = discount1Supplier, - discount1Type = discount1Type, - discount1Code = discount1Code, - transmissions = transmissions, - airConditioning = airConditioning, - carTypes = carTypes, - unit = unit, - driverAge = driverAge, - links = links, - source = source - ) - fun getHeaders(): Headers = - Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-car.v3+json") - }.build() - - fun getQueryParams(): List = - buildList { - pickupAirport?.let { - val key = "pickup.airport" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - pickupCity?.let { - val key = "pickup.city" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - pickupAddress?.let { - val key = "pickup.address" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - pickupGeoLocation?.let { - val key = "pickup.geoLocation" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - pickupRadius?.let { - val key = "pickup.radius" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - dropOffAirport?.let { - val key = "dropOff.airport" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - dropOffCity?.let { - val key = "dropOff.city" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - dropOffAddress?.let { - val key = "dropOff.address" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - dropOffGeoLocation?.let { - val key = "dropOff.geoLocation" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - dropOffRadius?.let { - val key = "dropOff.radius" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - pickupTime?.let { - val key = "pickupTime" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - dropOffTime?.let { - val key = "dropOffTime" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - sortType?.let { - val key = "sortType" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - sortOrder?.let { - val key = "sortOrder" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - limit?.let { - val key = "limit" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - suppliers?.let { - val key = "suppliers" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - carClasses?.let { - val key = "carClasses" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - discount1Supplier?.let { - val key = "discount1.supplier" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - discount1Type?.let { - val key = "discount1.type" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - discount1Code?.let { - val key = "discount1.code" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) } - transmissions?.let { - val key = "transmissions" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) + + companion object { + @JvmStatic + fun builder() = Builder() } - airConditioning?.let { - val key = "airConditioning" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + + enum class SortType( + val value: + + kotlin.String + ) { + PRICE("Price") + } - carTypes?.let { - val key = "carTypes" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) + enum class SortOrder( + val value: + + kotlin.String + ) { + ASC("ASC") + , + DESC("DESC") + } - unit?.let { - val key = "unit" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + enum class Discount1Type( + val value: + + kotlin.String + ) { + CORP_DISCOUNT("CorpDiscount") + , + COUPON("Coupon") + } - driverAge?.let { - val key = "driverAge" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + enum class Unit( + val value: + + kotlin.String + ) { + KM("KM") + , + MI("MI") + } - links?.let { - val key = "links" - val value = - buildList { - addAll(it.map { it.value }) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) + enum class Links( + val value: + kotlin.String + + ) { + WS("WS") + , + AD("AD") + , + WD("WD") + } - source?.let { - val key = "source" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + enum class Source( + val value: + + kotlin.String + ) { + BROWSER("browser") + , + MOBILE("mobile") + , + ALL("all") + } + + + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String +? = null + , + @JsonProperty("pickup.airport") private var pickupAirport: + kotlin.String +? = null + , + @JsonProperty("pickup.city") private var pickupCity: + kotlin.String +? = null + , + @JsonProperty("pickup.address") private var pickupAddress: + kotlin.String +? = null + , + @JsonProperty("pickup.geoLocation") private var pickupGeoLocation: + kotlin.String +? = null + , + @JsonProperty("pickup.radius") private var pickupRadius: + kotlin.Int +? = null + , + @JsonProperty("dropOff.airport") private var dropOffAirport: + kotlin.String +? = null + , + @JsonProperty("dropOff.city") private var dropOffCity: + kotlin.String +? = null + , + @JsonProperty("dropOff.address") private var dropOffAddress: + kotlin.String +? = null + , + @JsonProperty("dropOff.geoLocation") private var dropOffGeoLocation: + kotlin.String +? = null + , + @JsonProperty("dropOff.radius") private var dropOffRadius: + kotlin.Int +? = null + , + @JsonProperty("pickupTime") private var pickupTime: + java.time.LocalDateTime +? = null + , + @JsonProperty("dropOffTime") private var dropOffTime: + java.time.LocalDateTime +? = null + , + @JsonProperty("sortType") private var sortType: GetCarsListingsOperationParams.SortType + +? = null + , + @JsonProperty("sortOrder") private var sortOrder: GetCarsListingsOperationParams.SortOrder + +? = null + , + @JsonProperty("limit") private var limit: + kotlin.Int +? = null + , + @JsonProperty("suppliers") private var suppliers: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("carClasses") private var carClasses: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("discount1.supplier") private var discount1Supplier: + kotlin.String +? = null + , + @JsonProperty("discount1.type") private var discount1Type: GetCarsListingsOperationParams.Discount1Type + +? = null + , + @JsonProperty("discount1.code") private var discount1Code: + kotlin.String +? = null + , + @JsonProperty("transmissions") private var transmissions: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("airConditioning") private var airConditioning: + kotlin.Boolean +? = null + , + @JsonProperty("carTypes") private var carTypes: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("unit") private var unit: GetCarsListingsOperationParams.Unit + +? = null + , + @JsonProperty("driverAge") private var driverAge: + kotlin.Int +? = null + , + @JsonProperty("links") private var links: kotlin.collections.List + < + GetCarsListingsOperationParams.Links + + > +? = null + , + @JsonProperty("source") private var source: GetCarsListingsOperationParams.Source + +? = null + +) { + /** + * @param partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. + */ + fun partnerTransactionId(partnerTransactionId: + kotlin.String +) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param pickupAirport Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + */ + fun pickupAirport(pickupAirport: + kotlin.String +) = apply { this.pickupAirport = pickupAirport } + /** + * @param pickupCity The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + */ + fun pickupCity(pickupCity: + kotlin.String +) = apply { this.pickupCity = pickupCity } + /** + * @param pickupAddress The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + */ + fun pickupAddress(pickupAddress: + kotlin.String +) = apply { this.pickupAddress = pickupAddress } + /** + * @param pickupGeoLocation The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + */ + fun pickupGeoLocation(pickupGeoLocation: + kotlin.String +) = apply { this.pickupGeoLocation = pickupGeoLocation } + /** + * @param pickupRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed. + */ + fun pickupRadius(pickupRadius: + kotlin.Int +) = apply { this.pickupRadius = pickupRadius } + /** + * @param dropOffAirport Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + */ + fun dropOffAirport(dropOffAirport: + kotlin.String +) = apply { this.dropOffAirport = dropOffAirport } + /** + * @param dropOffCity City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + */ + fun dropOffCity(dropOffCity: + kotlin.String +) = apply { this.dropOffCity = dropOffCity } + /** + * @param dropOffAddress Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + */ + fun dropOffAddress(dropOffAddress: + kotlin.String +) = apply { this.dropOffAddress = dropOffAddress } + /** + * @param dropOffGeoLocation Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + */ + fun dropOffGeoLocation(dropOffGeoLocation: + kotlin.String +) = apply { this.dropOffGeoLocation = dropOffGeoLocation } + /** + * @param dropOffRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same. + */ + fun dropOffRadius(dropOffRadius: + kotlin.Int +) = apply { this.dropOffRadius = dropOffRadius } + /** + * @param pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) + */ + fun pickupTime(pickupTime: + java.time.LocalDateTime +) = apply { this.pickupTime = pickupTime } + /** + * @param dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. + */ + fun dropOffTime(dropOffTime: + java.time.LocalDateTime +) = apply { this.dropOffTime = dropOffTime } + /** + * @param sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. + */ + fun sortType(sortType: GetCarsListingsOperationParams.SortType + +) = apply { this.sortType = sortType } + /** + * @param sortOrder Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of 'ascending' will be assumed. + */ + fun sortOrder(sortOrder: GetCarsListingsOperationParams.SortOrder + +) = apply { this.sortOrder = sortOrder } + /** + * @param limit The maximum number of search results that will be returned by the query. + */ + fun limit(limit: + kotlin.Int +) = apply { this.limit = limit } + /** + * @param suppliers A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier. + */ + fun suppliers(suppliers: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.suppliers = suppliers } + /** + * @param carClasses A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. + */ + fun carClasses(carClasses: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.carClasses = carClasses } + /** + * @param discount1Supplier Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below. + */ + fun discount1Supplier(discount1Supplier: + kotlin.String +) = apply { this.discount1Supplier = discount1Supplier } + /** + * @param discount1Type The type of discount to be applied.Supported values: CorpDiscount | Coupon. + */ + fun discount1Type(discount1Type: GetCarsListingsOperationParams.Discount1Type + +) = apply { this.discount1Type = discount1Type } + /** + * @param discount1Code The code of the discount to be applied. + */ + fun discount1Code(discount1Code: + kotlin.String +) = apply { this.discount1Code = discount1Code } + /** + * @param transmissions A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. + */ + fun transmissions(transmissions: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.transmissions = transmissions } + /** + * @param airConditioning Specify whether to filter for cars that include or exclude air conditioning. + */ + fun airConditioning(airConditioning: + kotlin.Boolean +) = apply { this.airConditioning = airConditioning } + /** + * @param carTypes A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. + */ + fun carTypes(carTypes: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.carTypes = carTypes } + /** + * @param unit The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM. + */ + fun unit(unit: GetCarsListingsOperationParams.Unit + +) = apply { this.unit = unit } + /** + * @param driverAge The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. + */ + fun driverAge(driverAge: + kotlin.Int +) = apply { this.driverAge = driverAge } + /** + * @param links WS = WebSearch, AD = ApiDetails, WD = WebDetails + */ + fun links(links: kotlin.collections.List + < + GetCarsListingsOperationParams.Links + + > +) = apply { this.links = links } + /** + * @param source Indicates the source where the request is coming from.The available values for the source as below:browser - The value \"browser\" represents that the client is traditional website.mobile - The value \"mobile\" represents that the client is mobile.all - The value \"all\" indicates that the client includes both browser and mobile.Only one source value may be used at a time. + */ + fun source(source: GetCarsListingsOperationParams.Source + +) = apply { this.source = source } + + fun build(): GetCarsListingsOperationParams { + val params = GetCarsListingsOperationParams( + partnerTransactionId = partnerTransactionId!!, + pickupAirport = pickupAirport, + pickupCity = pickupCity, + pickupAddress = pickupAddress, + pickupGeoLocation = pickupGeoLocation, + pickupRadius = pickupRadius, + dropOffAirport = dropOffAirport, + dropOffCity = dropOffCity, + dropOffAddress = dropOffAddress, + dropOffGeoLocation = dropOffGeoLocation, + dropOffRadius = dropOffRadius, + pickupTime = pickupTime!!, + dropOffTime = dropOffTime!!, + sortType = sortType, + sortOrder = sortOrder, + limit = limit, + suppliers = suppliers, + carClasses = carClasses, + discount1Supplier = discount1Supplier, + discount1Type = discount1Type, + discount1Code = discount1Code, + transmissions = transmissions, + airConditioning = airConditioning, + carTypes = carTypes, + unit = unit, + driverAge = driverAge, + links = links, + source = source + ) + + return params + } +} + +fun toBuilder() = Builder( + partnerTransactionId = partnerTransactionId, + pickupAirport = pickupAirport, + pickupCity = pickupCity, + pickupAddress = pickupAddress, + pickupGeoLocation = pickupGeoLocation, + pickupRadius = pickupRadius, + dropOffAirport = dropOffAirport, + dropOffCity = dropOffCity, + dropOffAddress = dropOffAddress, + dropOffGeoLocation = dropOffGeoLocation, + dropOffRadius = dropOffRadius, + pickupTime = pickupTime, + dropOffTime = dropOffTime, + sortType = sortType, + sortOrder = sortOrder, + limit = limit, + suppliers = suppliers, + carClasses = carClasses, + discount1Supplier = discount1Supplier, + discount1Type = discount1Type, + discount1Code = discount1Code, + transmissions = transmissions, + airConditioning = airConditioning, + carTypes = carTypes, + unit = unit, + driverAge = driverAge, + links = links, + source = source +) + + + fun getHeaders(): Headers { +return Headers.builder().apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-car.v3+json") +}.build() +} + + fun getQueryParams(): List = + buildList { + pickupAirport?.let { + val key = "pickup.airport" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + pickupCity?.let { + val key = "pickup.city" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + pickupAddress?.let { + val key = "pickup.address" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + pickupGeoLocation?.let { + val key = "pickup.geoLocation" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + pickupRadius?.let { + val key = "pickup.radius" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + dropOffAirport?.let { + val key = "dropOff.airport" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + dropOffCity?.let { + val key = "dropOff.city" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + dropOffAddress?.let { + val key = "dropOff.address" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + dropOffGeoLocation?.let { + val key = "dropOff.geoLocation" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + dropOffRadius?.let { + val key = "dropOff.radius" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + pickupTime?.let { + val key = "pickupTime" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + dropOffTime?.let { + val key = "dropOffTime" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + sortType?.let { + val key = "sortType" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + sortOrder?.let { + val key = "sortOrder" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + limit?.let { + val key = "limit" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + suppliers?.let { + val key = "suppliers" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + carClasses?.let { + val key = "carClasses" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + discount1Supplier?.let { + val key = "discount1.supplier" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + discount1Type?.let { + val key = "discount1.type" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + discount1Code?.let { + val key = "discount1.code" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + transmissions?.let { + val key = "transmissions" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + airConditioning?.let { + val key = "airConditioning" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + carTypes?.let { + val key = "carTypes" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + unit?.let { + val key = "unit" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + driverAge?.let { + val key = "driverAge" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + links?.let { + val key = "links" + val value = buildList { + addAll(it.map { it.value }) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + source?.let { + val key = "source" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) } } + + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt index 7819855b7..d75b052b5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt @@ -1,34 +1,54 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.PresignedUrlResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * - * @property params [GetFeedDownloadUrlOperationParams] - */ -class GetFeedDownloadUrlOperation( - val params: GetFeedDownloadUrlOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/feed/v1/download-url" - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + + + import com.expediagroup.sdk.xap.models.PresignedUrlResponse + import com.expediagroup.sdk.xap.models.SdpAPIMError + + /** + * + * @property params [GetFeedDownloadUrlOperationParams] + */ + class GetFeedDownloadUrlOperation( + private val params: GetFeedDownloadUrlOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait + { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/feed/v1/download-url" + + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() + + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt index dc7d7e4c6..991324319 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt @@ -1,247 +1,350 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property type The type of file, used to get files by type. - * @property locale Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: \"{LanguageCode}-{CountryCode}\".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. - * @property pointOfSupply The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. - * @property lodgingType The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. - * @property brand The downloadable files provided after specifying will only contain property information for that brand. - */ -@JsonDeserialize(builder = GetFeedDownloadUrlOperationParams.Builder::class) -data class GetFeedDownloadUrlOperationParams( - @field:NotNull - val type: GetFeedDownloadUrlOperationParams.Type, - @field:Valid - val locale: kotlin.String? = - null, - val pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply? = - null, - val lodgingType: GetFeedDownloadUrlOperationParams.LodgingType? = - null, - val brand: GetFeedDownloadUrlOperationParams.Brand? = - null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - enum class Type( - val value: kotlin.String - ) { - DESTINATION("DESTINATION"), - VENDORLOGO("VENDORLOGO"), - SUMMARY("SUMMARY"), - LISTINGS("LISTINGS"), - IMAGES("IMAGES"), - AMENITIES("AMENITIES"), - LOCATIONS("LOCATIONS"), - DESCRIPTIONS("DESCRIPTIONS"), - POLICIES("POLICIES"), - GUEST_REVIEW("GUEST_REVIEW"), - VACATION_RENTAL("VACATION_RENTAL"), - ALL_REGIONS("ALL_REGIONS"), - BOUNDING_POLYGON("BOUNDING_POLYGON"), - HOTEL_TO_REGION_HIERARCHY("HOTEL_TO_REGION_HIERARCHY"), - ROOM_DETAILS("ROOM_DETAILS") - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + + +import com.expediagroup.sdk.xap.models.PresignedUrlResponse +import com.expediagroup.sdk.xap.models.SdpAPIMError + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property type The type of file, used to get files by type. + * @property locale Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: \"{LanguageCode}-{CountryCode}\".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. + * @property pointOfSupply The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. + * @property lodgingType The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. + * @property brand The downloadable files provided after specifying will only contain property information for that brand. + */ + @JsonDeserialize(builder = GetFeedDownloadUrlOperationParams.Builder::class) + data class GetFeedDownloadUrlOperationParams( + val type: GetFeedDownloadUrlOperationParams.Type + + + , + val locale: + kotlin.String + +? + = null +, + val pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply + + +? + = null +, + val lodgingType: GetFeedDownloadUrlOperationParams.LodgingType + + +? + = null +, + val brand: GetFeedDownloadUrlOperationParams.Brand + + +? + = null + + ) { + + init { + require(type != null) { "type must not be null" } + + + + + + + + + + + + + + + + + + + - enum class PointOfSupply( - val value: kotlin.String - ) { - US("US"), - AT("AT"), - BR("BR"), - CA("CA"), - FR("FR"), - DE("DE"), - GR("GR"), - IT("IT"), - JA("JA"), - KR("KR"), - MX("MX"), - PT("PT"), - ES("ES"), - TR("TR"), - AE("AE"), - GB("GB") - } - enum class LodgingType( - val value: kotlin.String - ) { - CL("CL"), - VR("VR") - } - enum class Brand( - val value: kotlin.String - ) { - VRBO("VRBO") - } - class Builder( - @JsonProperty("type") private var type: GetFeedDownloadUrlOperationParams.Type? = null, - @JsonProperty("locale") private var locale: kotlin.String? = null, - @JsonProperty("pointOfSupply") private var pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply? = null, - @JsonProperty("lodgingType") private var lodgingType: GetFeedDownloadUrlOperationParams.LodgingType? = null, - @JsonProperty("brand") private var brand: GetFeedDownloadUrlOperationParams.Brand? = null - ) { - /** - * @param type The type of file, used to get files by type. - */ - fun type(type: GetFeedDownloadUrlOperationParams.Type) = apply { this.type = type } - /** - * @param locale Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: \"{LanguageCode}-{CountryCode}\".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. - */ - fun locale(locale: kotlin.String) = apply { this.locale = locale } - /** - * @param pointOfSupply The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. - */ - fun pointOfSupply(pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply) = apply { this.pointOfSupply = pointOfSupply } - /** - * @param lodgingType The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. - */ - fun lodgingType(lodgingType: GetFeedDownloadUrlOperationParams.LodgingType) = apply { this.lodgingType = lodgingType } - /** - * @param brand The downloadable files provided after specifying will only contain property information for that brand. - */ - fun brand(brand: GetFeedDownloadUrlOperationParams.Brand) = apply { this.brand = brand } - - fun build(): GetFeedDownloadUrlOperationParams { - val params = - GetFeedDownloadUrlOperationParams( - type = type!!, - locale = locale, - pointOfSupply = pointOfSupply, - lodgingType = lodgingType, - brand = brand - ) - - validate(params) - - return params - } - private fun validate(params: GetFeedDownloadUrlOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } - } - } - fun toBuilder() = - Builder( - type = type, - locale = locale, - pointOfSupply = pointOfSupply, - lodgingType = lodgingType, - brand = brand - ) - fun getQueryParams(): List = - buildList { - type?.let { - val key = "type" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + + + + + + + + + + + + } + + companion object { + @JvmStatic + fun builder() = Builder() } - locale?.let { - val key = "locale" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + + enum class Type( + val value: + + kotlin.String + ) { + DESTINATION("DESTINATION") + , + VENDORLOGO("VENDORLOGO") + , + SUMMARY("SUMMARY") + , + LISTINGS("LISTINGS") + , + IMAGES("IMAGES") + , + AMENITIES("AMENITIES") + , + LOCATIONS("LOCATIONS") + , + DESCRIPTIONS("DESCRIPTIONS") + , + POLICIES("POLICIES") + , + GUEST_REVIEW("GUEST_REVIEW") + , + VACATION_RENTAL("VACATION_RENTAL") + , + ALL_REGIONS("ALL_REGIONS") + , + BOUNDING_POLYGON("BOUNDING_POLYGON") + , + HOTEL_TO_REGION_HIERARCHY("HOTEL_TO_REGION_HIERARCHY") + , + ROOM_DETAILS("ROOM_DETAILS") + } - pointOfSupply?.let { - val key = "pointOfSupply" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + enum class PointOfSupply( + val value: + + kotlin.String + ) { + US("US") + , + AT("AT") + , + BR("BR") + , + CA("CA") + , + FR("FR") + , + DE("DE") + , + GR("GR") + , + IT("IT") + , + JA("JA") + , + KR("KR") + , + MX("MX") + , + PT("PT") + , + ES("ES") + , + TR("TR") + , + AE("AE") + , + GB("GB") + } - lodgingType?.let { - val key = "lodgingType" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + enum class LodgingType( + val value: + + kotlin.String + ) { + CL("CL") + , + VR("VR") + } - brand?.let { - val key = "brand" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + enum class Brand( + val value: + + kotlin.String + ) { + VRBO("VRBO") + } + + + class Builder( + @JsonProperty("type") private var type: GetFeedDownloadUrlOperationParams.Type + +? = null + , + @JsonProperty("locale") private var locale: + kotlin.String +? = null + , + @JsonProperty("pointOfSupply") private var pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply + +? = null + , + @JsonProperty("lodgingType") private var lodgingType: GetFeedDownloadUrlOperationParams.LodgingType + +? = null + , + @JsonProperty("brand") private var brand: GetFeedDownloadUrlOperationParams.Brand + +? = null + +) { + /** + * @param type The type of file, used to get files by type. + */ + fun type(type: GetFeedDownloadUrlOperationParams.Type + +) = apply { this.type = type } + /** + * @param locale Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: \"{LanguageCode}-{CountryCode}\".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. + */ + fun locale(locale: + kotlin.String +) = apply { this.locale = locale } + /** + * @param pointOfSupply The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. + */ + fun pointOfSupply(pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply + +) = apply { this.pointOfSupply = pointOfSupply } + /** + * @param lodgingType The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. + */ + fun lodgingType(lodgingType: GetFeedDownloadUrlOperationParams.LodgingType + +) = apply { this.lodgingType = lodgingType } + /** + * @param brand The downloadable files provided after specifying will only contain property information for that brand. + */ + fun brand(brand: GetFeedDownloadUrlOperationParams.Brand + +) = apply { this.brand = brand } + + fun build(): GetFeedDownloadUrlOperationParams { + val params = GetFeedDownloadUrlOperationParams( + type = type!!, + locale = locale, + pointOfSupply = pointOfSupply, + lodgingType = lodgingType, + brand = brand + ) + + return params + } +} + +fun toBuilder() = Builder( + type = type, + locale = locale, + pointOfSupply = pointOfSupply, + lodgingType = lodgingType, + brand = brand +) + + + + + fun getQueryParams(): List = + buildList { + type?.let { + val key = "type" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + locale?.let { + val key = "locale" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + pointOfSupply?.let { + val key = "pointOfSupply" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + lodgingType?.let { + val key = "lodgingType" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + brand?.let { + val key = "brand" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) } } + + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt index f81075bd0..dc5c60c82 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt @@ -1,39 +1,58 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * Get availability calendars of properties - * @property params [GetLodgingAvailabilityCalendarsOperationParams] - */ -class GetLodgingAvailabilityCalendarsOperation( - val params: GetLodgingAvailabilityCalendarsOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/lodging/availabilityCalendars" - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIGatewayError + import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse + import com.expediagroup.sdk.xap.models.LodgingErrors + + /** + * Get availability calendars of properties + * @property params [GetLodgingAvailabilityCalendarsOperationParams] + */ + class GetLodgingAvailabilityCalendarsOperation( + private val params: GetLodgingAvailabilityCalendarsOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/lodging/availabilityCalendars" + + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt index 8a6b25d3a..53bfed045 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt @@ -1,118 +1,148 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - * @property propertyIds Comma-separated list of Expedia Property IDs. The API request supports a maximum of 50 Property IDs in a single request. - */ -@JsonDeserialize(builder = GetLodgingAvailabilityCalendarsOperationParams.Builder::class) -data class GetLodgingAvailabilityCalendarsOperationParams( - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:Valid - val propertyIds: kotlin.collections.Set< + + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + +import com.expediagroup.sdk.xap.models.APIGatewayError +import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse +import com.expediagroup.sdk.xap.models.LodgingErrors + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + * @property propertyIds Comma-separated list of Expedia Property IDs. The API request supports a maximum of 50 Property IDs in a single request. + */ + @JsonDeserialize(builder = GetLodgingAvailabilityCalendarsOperationParams.Builder::class) + data class GetLodgingAvailabilityCalendarsOperationParams( + val partnerTransactionId: + kotlin.String + + , + val propertyIds: kotlin.collections.Set + < + kotlin.String - >? = - null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } + > + +? + = null + + ) { + + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + + + + + + + + + + + + + + - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("propertyIds") private var propertyIds: kotlin.collections.Set< - kotlin.String - >? = null - ) { - /** - * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param propertyIds Comma-separated list of Expedia Property IDs. The API request supports a maximum of 50 Property IDs in a single request. - */ - fun propertyIds( - propertyIds: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.propertyIds = propertyIds } - - fun build(): GetLodgingAvailabilityCalendarsOperationParams { - val params = - GetLodgingAvailabilityCalendarsOperationParams( - partnerTransactionId = partnerTransactionId!!, - propertyIds = propertyIds - ) - - validate(params) - - return params - } - private fun validate(params: GetLodgingAvailabilityCalendarsOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) } - } - } - fun toBuilder() = - Builder( - partnerTransactionId = partnerTransactionId, - propertyIds = propertyIds + companion object { + @JvmStatic + fun builder() = Builder() + } + + + + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String +? = null + , + @JsonProperty("propertyIds") private var propertyIds: kotlin.collections.Set + < + + kotlin.String + > +? = null + +) { + /** + * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + */ + fun partnerTransactionId(partnerTransactionId: + kotlin.String +) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param propertyIds Comma-separated list of Expedia Property IDs. The API request supports a maximum of 50 Property IDs in a single request. + */ + fun propertyIds(propertyIds: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.propertyIds = propertyIds } + + fun build(): GetLodgingAvailabilityCalendarsOperationParams { + val params = GetLodgingAvailabilityCalendarsOperationParams( + partnerTransactionId = partnerTransactionId!!, + propertyIds = propertyIds ) - fun getHeaders(): Headers = - Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } + return params + } +} + +fun toBuilder() = Builder( + partnerTransactionId = partnerTransactionId, + propertyIds = propertyIds +) + + + fun getHeaders(): Headers { +return Headers.builder().apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } add("Accept", "application/vnd.exp-lodging.v3+json") - }.build() - - fun getQueryParams(): List = - buildList { - propertyIds?.let { - val key = "propertyIds" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } +}.build() +} + + fun getQueryParams(): List = + buildList { + propertyIds?.let { + val key = "propertyIds" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) } } + + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt index 48bad9536..e69d6177c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt @@ -1,46 +1,64 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.HotelDetailsResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * Get Extended information with a single property offer - * @property params [GetLodgingDetailsOperationParams] - */ -class GetLodgingDetailsOperation( - val params: GetLodgingDetailsOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/hotels/details/{offerToken}" - - url = - url.replace( - oldValue = "{" + "offerToken" + "}", - newValue = this.params.offerToken, - ignoreCase = true - ) - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIGatewayError + import com.expediagroup.sdk.xap.models.Errors + import com.expediagroup.sdk.xap.models.HotelDetailsResponse + + /** + * Get Extended information with a single property offer + * @property params [GetLodgingDetailsOperationParams] + */ + class GetLodgingDetailsOperation( + private val params: GetLodgingDetailsOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/hotels/details/{offerToken}" + + + url = url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true + ) + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt index 028776e69..6c399d9d7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt @@ -1,246 +1,344 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property offerToken A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated string of multiple values that defines a hotel offer. - * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - * @property price The total price of the selected property. This value will be used to determine if there is a price change between the details and booking request. The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details API response. - * @property currency Value should be a standard ISO 3 letter currency code. The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from the Lodging Listing API response. The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details response. - * @property locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. The `locale` value used in the Lodging Details API query should match the `locale` value that was used in the Lodging Search API query. - * @property imageSizes Indicate what size of image will be returned. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. - * @property groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. - */ -@JsonDeserialize(builder = GetLodgingDetailsOperationParams.Builder::class) -data class GetLodgingDetailsOperationParams( - @field:NotNull - @field:Valid - val offerToken: kotlin.String, - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:Valid - val price: kotlin.String? = - null, - @field:Valid - val currency: kotlin.String? = - null, - @field:Valid - val locale: kotlin.String? = - null, - val imageSizes: GetLodgingDetailsOperationParams.ImageSizes? = - ImageSizes.T, - @field:Valid - val groupedAmenities: kotlin.Boolean? = - null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } - enum class ImageSizes( - val value: kotlin.String - ) { - T("t"), - S("s"), - B("b"), - Y("y"), - Z("z") - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + +import com.expediagroup.sdk.xap.models.APIGatewayError +import com.expediagroup.sdk.xap.models.Errors +import com.expediagroup.sdk.xap.models.HotelDetailsResponse + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property offerToken A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated string of multiple values that defines a hotel offer. + * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + * @property price The total price of the selected property. This value will be used to determine if there is a price change between the details and booking request. The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details API response. + * @property currency Value should be a standard ISO 3 letter currency code. The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from the Lodging Listing API response. The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details response. + * @property locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. The `locale` value used in the Lodging Details API query should match the `locale` value that was used in the Lodging Search API query. + * @property imageSizes Indicate what size of image will be returned. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. + * @property groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. + */ + @JsonDeserialize(builder = GetLodgingDetailsOperationParams.Builder::class) + data class GetLodgingDetailsOperationParams( + val offerToken: + kotlin.String + + , + val partnerTransactionId: + kotlin.String + + , + val price: + kotlin.String + +? + = null +, + val currency: + kotlin.String + +? + = null +, + val locale: + kotlin.String + +? + = null +, + val imageSizes: GetLodgingDetailsOperationParams.ImageSizes + + +? + = + ImageSizes.T +, + val groupedAmenities: + kotlin.Boolean + +? + = null + + ) { + + init { + require(offerToken != null) { "offerToken must not be null" } + + + + + + + + + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - class Builder( - @JsonProperty("offerToken") private var offerToken: kotlin.String? = null, - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("price") private var price: kotlin.String? = null, - @JsonProperty("currency") private var currency: kotlin.String? = null, - @JsonProperty("locale") private var locale: kotlin.String? = null, - @JsonProperty("imageSizes") private var imageSizes: GetLodgingDetailsOperationParams.ImageSizes? = null, - @JsonProperty("groupedAmenities") private var groupedAmenities: kotlin.Boolean? = null - ) { - /** - * @param offerToken A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated string of multiple values that defines a hotel offer. - */ - fun offerToken(offerToken: kotlin.String) = apply { this.offerToken = offerToken } - /** - * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param price The total price of the selected property. This value will be used to determine if there is a price change between the details and booking request. The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details API response. - */ - fun price(price: kotlin.String) = apply { this.price = price } - /** - * @param currency Value should be a standard ISO 3 letter currency code. The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from the Lodging Listing API response. The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details response. - */ - fun currency(currency: kotlin.String) = apply { this.currency = currency } - /** - * @param locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. The `locale` value used in the Lodging Details API query should match the `locale` value that was used in the Lodging Search API query. - */ - fun locale(locale: kotlin.String) = apply { this.locale = locale } - /** - * @param imageSizes Indicate what size of image will be returned. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. - */ - fun imageSizes(imageSizes: GetLodgingDetailsOperationParams.ImageSizes) = apply { this.imageSizes = imageSizes } - /** - * @param groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. - */ - fun groupedAmenities(groupedAmenities: kotlin.Boolean) = apply { this.groupedAmenities = groupedAmenities } - - fun build(): GetLodgingDetailsOperationParams { - val params = - GetLodgingDetailsOperationParams( - offerToken = offerToken!!, - partnerTransactionId = partnerTransactionId!!, - price = price, - currency = currency, - locale = locale, - imageSizes = imageSizes, - groupedAmenities = groupedAmenities - ) - - validate(params) - - return params - } - private fun validate(params: GetLodgingDetailsOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } - } - } - fun toBuilder() = - Builder( - offerToken = offerToken, - partnerTransactionId = partnerTransactionId, - price = price, - currency = currency, - locale = locale, - imageSizes = imageSizes, - groupedAmenities = groupedAmenities - ) - fun getHeaders(): Headers = - Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-hotel.v3+json") - }.build() - - fun getQueryParams(): List = - buildList { - price?.let { - val key = "price" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - currency?.let { - val key = "currency" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - locale?.let { - val key = "locale" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) } - imageSizes?.let { - val key = "imageSizes" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + + companion object { + @JvmStatic + fun builder() = Builder() } - groupedAmenities?.let { - val key = "groupedAmenities" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) + + enum class ImageSizes( + val value: + + kotlin.String + ) { + T("t") + , + S("s") + , + B("b") + , + Y("y") + , + Z("z") + } + + + class Builder( + @JsonProperty("offerToken") private var offerToken: + kotlin.String +? = null + , + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String +? = null + , + @JsonProperty("price") private var price: + kotlin.String +? = null + , + @JsonProperty("currency") private var currency: + kotlin.String +? = null + , + @JsonProperty("locale") private var locale: + kotlin.String +? = null + , + @JsonProperty("imageSizes") private var imageSizes: GetLodgingDetailsOperationParams.ImageSizes + +? = null + , + @JsonProperty("groupedAmenities") private var groupedAmenities: + kotlin.Boolean +? = null + +) { + /** + * @param offerToken A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated string of multiple values that defines a hotel offer. + */ + fun offerToken(offerToken: + kotlin.String +) = apply { this.offerToken = offerToken } + /** + * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + */ + fun partnerTransactionId(partnerTransactionId: + kotlin.String +) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param price The total price of the selected property. This value will be used to determine if there is a price change between the details and booking request. The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details API response. + */ + fun price(price: + kotlin.String +) = apply { this.price = price } + /** + * @param currency Value should be a standard ISO 3 letter currency code. The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from the Lodging Listing API response. The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details response. + */ + fun currency(currency: + kotlin.String +) = apply { this.currency = currency } + /** + * @param locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. The `locale` value used in the Lodging Details API query should match the `locale` value that was used in the Lodging Search API query. + */ + fun locale(locale: + kotlin.String +) = apply { this.locale = locale } + /** + * @param imageSizes Indicate what size of image will be returned. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. + */ + fun imageSizes(imageSizes: GetLodgingDetailsOperationParams.ImageSizes + +) = apply { this.imageSizes = imageSizes } + /** + * @param groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. + */ + fun groupedAmenities(groupedAmenities: + kotlin.Boolean +) = apply { this.groupedAmenities = groupedAmenities } + + fun build(): GetLodgingDetailsOperationParams { + val params = GetLodgingDetailsOperationParams( + offerToken = offerToken!!, + partnerTransactionId = partnerTransactionId!!, + price = price, + currency = currency, + locale = locale, + imageSizes = imageSizes, + groupedAmenities = groupedAmenities + ) + + return params + } +} + +fun toBuilder() = Builder( + offerToken = offerToken, + partnerTransactionId = partnerTransactionId, + price = price, + currency = currency, + locale = locale, + imageSizes = imageSizes, + groupedAmenities = groupedAmenities +) + + + fun getHeaders(): Headers { +return Headers.builder().apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-hotel.v3+json") +}.build() +} + + fun getQueryParams(): List = + buildList { + price?.let { + val key = "price" + val value = buildList { + add(it) } - fun getPathParams(): Map = - buildMap { - offerToken?.also { - put("offerToken", offerToken) - } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + currency?.let { + val key = "currency" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + locale?.let { + val key = "locale" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + imageSizes?.let { + val key = "imageSizes" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + groupedAmenities?.let { + val key = "groupedAmenities" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) } } + + fun getPathParams() : Map { +return buildMap { + offerToken?.also { + put("offerToken", offerToken) + } + } +} + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt index 5422f6c7b..cad8c329d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt @@ -1,39 +1,58 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.HotelListingsResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * Search lodging inventory - * @property params [GetLodgingListingsOperationParams] - */ -class GetLodgingListingsOperation( - val params: GetLodgingListingsOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/hotels/listings" - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIGatewayError + import com.expediagroup.sdk.xap.models.Errors + import com.expediagroup.sdk.xap.models.HotelListingsResponse + + /** + * Search lodging inventory + * @property params [GetLodgingListingsOperationParams] + */ + class GetLodgingListingsOperation( + private val params: GetLodgingListingsOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/hotels/listings" + + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt index 89938d9fb..deb042889 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt @@ -1,1603 +1,2352 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.expediagroup.sdk.xap.models.Room -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - * @property ecomHotelIds Comma-separated list of Expedia hotel IDs. There can be no spaces between parameters. - * @property hcomHotelIds Comma-separated list of Hotels.com hotel IDs. There can be no spaces between parameters. - * @property geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. There can be no spaces between parameters. This parameter should be used in combination with the radius and unit parameters below. - * @property radius The size of the search radius around a specified point when searching by `geoLocation`, `locationKeyword`, or `regionids`. `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` if not specified. `radius` must be less than 200 km or 124 mi. This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, or `regionids` parameters.\" - * @property unit The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. Valid units are `km` and `mi`. This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, or `regionids`. - * @property locationKeyword A keyword search for a location. The keyword can be a city, address, airport or a landmark. This parameter should be used in combination with the `radius` and `unit` parameters above to define a circle around the landmark. The default radius value is 25 if not specified. Combined search is not supported, if more than one search method is included in the request, an error will be returned. - * @property regionIds Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. Search returns set of all hotels in the combined regions. You may search using a string of 1 - 10 Region ID's. More than 10 Region ID's are not supported and will generate and error. You can get the complete list of Expedia Region IDs from [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). This parameter could be used in combination with the `radius` and `unit` parameters above to define a circle around the `regionIds`. The default radius value is 0 if not specified. - * @property checkIn Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - * @property checkOut Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - * @property locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. If not specified in the query, the native language for that POS will be returned. And if more than one language is supported, the response will be returned in the first language depending on the language setting of the POS. - * @property currency Value should be a standard ISO 3 letter currency code. - * @property source Indicate the source where the request is coming from. - * @property travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. - * @property contentDetails This parameter is optional and can be specified as the following values. - lowest - low (default) - medium - high ### *lowest* Returns the absolute minimum response for up to 1,000 hotels: - Count(Count of hotels that are actually returned) - TotalHotelCount(Count of hotels that are requested) - TransactionId - StayDates - LengthOfStay - NumberOfRooms - Occupants - ***Hotels*** - Id - Status - Links - ***RoomTypes*** - RoomKey [Deprecated] - OfferId - RatePlanType - ***RatePlans*** - RoomTypeId - RatePlanId - RateRuleId - InventorySourceId - RemainingCount - Price - MemberOnlyDeal - Promotions - PaymentMethod - FullDepositUponBooking - PaymentSchedule - CancellationPolicy - Price - BaseRate - TaxesAndFees - TotalPrice - TotalStrikeOutPrice - AvgNightlyRate - AvgNightlyStrikeOutRate - AvgNightlyRateWithFees - AvgNightlyStrikeOutRateWithFees - HotelMandatoryFees - TotalPriceWithHotelFees - NightlyRates - TaxesAndFeesDetails - RefundableDamageDeposit This minimal response is the best for partners that store static hotel location data locally, and who would like to have the smallest and fastest API response. ### *low* Returns basic hotel information in response for up to 1,000 hotels. Includes all elements returned when `contentDetails=lowest` plus: - ***Hotels*** - Name - PropertyType - PropertyDetails - LocalCurrencyCode - Location - Distance - Description(may not be localized) - ChainAndBrandInfo - ThumbnailUrl - StarRating - GuestRating - GuestReviewCount - PetFriendly - LgbtqiaFriendly - ImportantNotices - ***RoomTypes*** - Description - ***RatePlans*** - InventorySourceCode - PaymentTime - ReserveWithDeposit - FreeInternet - FreeWiFi - FreeParking - FreeBreakfast ### *medium* Returns more complete hotel information in response for up to 200 hotels. Includes all elements returned when `contentDetails=low` plus: - ***Hotels*** - HotelAmenities - RoomAmenities - ***RoomTypes*** - ***RatePlans*** - FreeInternetDetails - FreeBreakfastDetails - Amenities - Amenities **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. ### *high* Returns extended hotel information in response for up to 5 hotels. Includes all elements returned when `contentDetails=medium` plus: - ***Hotels*** - RenovationsAndClosures - Policies - OptionalExtras - Media - Accessibility - ***RoomTypes*** - SmokingOption - BedTypeOptions - RoomOccupancyPolicy - Media **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. - * @property allRoomTypes Returns all available rate plans for the selected hotels. This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. - * @property links Comma-separated list to specify the types of deep links. - WD (link to Web Details site) - WS (link to Web Search Result page) - AD (link for Details API) - RC (link for RateCalendar API) - WEB (include all website links) - API (links for Details and RateCalendar API) There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. When requesting API deeplinks you will receive both a RateCalendar API link at the property level, and Details API links at the room level, since the Lodging Details API only displays information on rate plan offers. When requesting AD deeplinks, you will only receive Details API links at the room level. `Links` node in property-level will be omitted. If you are looking for more complete details on a single property via the API, you should do another search in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only return details on a specific room offer for specific dates. - * @property minStarRating The minimum star rating for hotels returned in the response. - * @property maxStarRating The maximum star rating for hotels returned in the response. - * @property limit The maximum number of hotels returned in the response. Must be an integer greater than 0. If the value is greater than 1000, only the first 1000 hotels are returned. Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden and a lower number of hotels to be returned. The `limit` parameter is intended to be used to control the response size, but partners should be careful about combining it with other filter parameters, as each parameter that you add will shrink the response, even to the point where you may even get a \"no hotel found\" error if none of the hotels in the base response meet the combined filter requirements. Filters are cumulative in effect, and results must meet all filter requirements to be displayed. - * @property queryText Query text is used for a full text search of hotel data. Text search based on hotel name, description, address, promotion description, amenities description. - * @property availOnly Specifies whether to return only available hotels in the search results. If the value of this parameter is true, the search results will only return hotels that have availability during the requested dates. If there are no hotels with availability in your search then an empty record set will be returned. This parameter is ignored for dateless searches. - * @property smokingPreference Specifies smoking preference. - * @property rateType Indicate which type of `paymentMethod` for each room will be returned. - * @property imageSizes Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when `contentDetails=high`. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. - * @property thumbnailImageSize Indicate what size of image will be used for the single `thumbnail` image that is returned when `contentDetails` is set to `low`, `medium` or `high`. The available thumbnail image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `thumbnailImageSize` is specified, the t size images will be returned. if no thumbnail image found, it would not return thumbnail image. Only one thumbnail image size is allowed. - * @property includedPropertyTypeIds Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - * @property excludedPropertyTypeIds Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - * @property includedInventorySourceIds Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory sources. Query with the `includedInventorySourceIds` parameter included will only return listings from the requested inventory sources. All others will be left out. `includedInventorySourceId=24` will return only Expedia lodging inventory. `includedInventorySourceId=83` will return only Vrbo lodging inventory. `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. - * @property freeCancellation Specifies whether to return only free cancelable room rates in the search results. If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. This parameter is ignored for dateless searches. - * @property groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. - * @property blockFullDepositRateplan Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. This parameter is ignored for dateless search. - * @property ratePlanType **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account Manager if you need this parameter. To specify the desired rate plan types. The options are: - standalone : Ask for standalone rates - package : Ask for package rates, but standalone rate also may be returned if available. Otherwise only standalone rate plans will be returned. `WebSearchResult` and `WebDetails` links won't be returned for package rate. - * @property sortType Specifies the field that the search results will be ordered by. To be used in conjunction with sortOrder parameter below. **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. - * @property sortOrder Specifies the sort order of search results. If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. To be used in conjunction with the `sortType` parameter above. - * @property room1Adults Specifies the number of adults staying in a specific room. Default value is one room with 2 adults. Example: `room1.adults` is used to specify the number of adults in the first room. - * @property room1ChildAges Comma-separated list that specifies the age(s) for each of the children in each of the rooms. Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. Children must be accompanied by an adult. - * @property room2Adults Specifies the number of adults staying in second room. - * @property room2ChildAges Comma-separated list that specifies the age(s) for each of the children in second room. - * @property room3Adults Specifies the number of adults staying in third room. - * @property room3ChildAges Comma-separated list that specifies the age(s) for each of the children in third room. - * @property room4Adults Specifies the number of adults staying in fourth room. - * @property room4ChildAges Comma-separated list that specifies the age(s) for each of the children in fourth room. - * @property room5Adults Specifies the number of adults staying in fifth room. - * @property room5ChildAges Comma-separated list that specifies the age(s) for each of the children in fifth room. - * @property room6Adults Specifies the number of adults staying in sixth room. - * @property room6ChildAges Comma-separated list that specifies the age(s) for each of the children in sixth room. - * @property room7Adults Specifies the number of adults staying in seventh room. - * @property room7ChildAges Comma-separated list that specifies the age(s) for each of the children in seventh room. - * @property room8Adults Specifies the number of adults staying in eighth room. - * @property room8ChildAges Comma-separated list that specifies the age(s) for each of the children in eighth room. - */ -@JsonDeserialize(builder = GetLodgingListingsOperationParams.Builder::class) -data class GetLodgingListingsOperationParams( - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:Valid - val ecomHotelIds: kotlin.collections.Set< + + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + +import com.expediagroup.sdk.xap.models.APIGatewayError +import com.expediagroup.sdk.xap.models.Errors +import com.expediagroup.sdk.xap.models.HotelListingsResponse + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + * @property ecomHotelIds Comma-separated list of Expedia hotel IDs. There can be no spaces between parameters. + * @property hcomHotelIds Comma-separated list of Hotels.com hotel IDs. There can be no spaces between parameters. + * @property geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. There can be no spaces between parameters. This parameter should be used in combination with the radius and unit parameters below. + * @property radius The size of the search radius around a specified point when searching by `geoLocation`, `locationKeyword`, or `regionids`. `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` if not specified. `radius` must be less than 200 km or 124 mi. This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, or `regionids` parameters.\" + * @property unit The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. Valid units are `km` and `mi`. This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, or `regionids`. + * @property locationKeyword A keyword search for a location. The keyword can be a city, address, airport or a landmark. This parameter should be used in combination with the `radius` and `unit` parameters above to define a circle around the landmark. The default radius value is 25 if not specified. Combined search is not supported, if more than one search method is included in the request, an error will be returned. + * @property regionIds Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. Search returns set of all hotels in the combined regions. You may search using a string of 1 - 10 Region ID's. More than 10 Region ID's are not supported and will generate and error. You can get the complete list of Expedia Region IDs from [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). This parameter could be used in combination with the `radius` and `unit` parameters above to define a circle around the `regionIds`. The default radius value is 0 if not specified. + * @property checkIn Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + * @property checkOut Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + * @property locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. If not specified in the query, the native language for that POS will be returned. And if more than one language is supported, the response will be returned in the first language depending on the language setting of the POS. + * @property currency Value should be a standard ISO 3 letter currency code. + * @property source Indicate the source where the request is coming from. + * @property travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. + * @property contentDetails This parameter is optional and can be specified as the following values. - lowest - low (default) - medium - high ### *lowest* Returns the absolute minimum response for up to 1,000 hotels: - Count(Count of hotels that are actually returned) - TotalHotelCount(Count of hotels that are requested) - TransactionId - StayDates - LengthOfStay - NumberOfRooms - Occupants - ***Hotels*** - Id - Status - Links - ***RoomTypes*** - RoomKey [Deprecated] - OfferId - RatePlanType - ***RatePlans*** - RoomTypeId - RatePlanId - RateRuleId - InventorySourceId - RemainingCount - Price - MemberOnlyDeal - Promotions - PaymentMethod - FullDepositUponBooking - PaymentSchedule - CancellationPolicy - Price - BaseRate - TaxesAndFees - TotalPrice - TotalStrikeOutPrice - AvgNightlyRate - AvgNightlyStrikeOutRate - AvgNightlyRateWithFees - AvgNightlyStrikeOutRateWithFees - HotelMandatoryFees - TotalPriceWithHotelFees - NightlyRates - TaxesAndFeesDetails - RefundableDamageDeposit This minimal response is the best for partners that store static hotel location data locally, and who would like to have the smallest and fastest API response. ### *low* Returns basic hotel information in response for up to 1,000 hotels. Includes all elements returned when `contentDetails=lowest` plus: - ***Hotels*** - Name - PropertyType - PropertyDetails - LocalCurrencyCode - Location - Distance - Description(may not be localized) - ChainAndBrandInfo - ThumbnailUrl - StarRating - GuestRating - GuestReviewCount - PetFriendly - LgbtqiaFriendly - ImportantNotices - ***RoomTypes*** - Description - ***RatePlans*** - InventorySourceCode - PaymentTime - ReserveWithDeposit - FreeInternet - FreeWiFi - FreeParking - FreeBreakfast ### *medium* Returns more complete hotel information in response for up to 200 hotels. Includes all elements returned when `contentDetails=low` plus: - ***Hotels*** - HotelAmenities - RoomAmenities - ***RoomTypes*** - ***RatePlans*** - FreeInternetDetails - FreeBreakfastDetails - Amenities - Amenities **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. ### *high* Returns extended hotel information in response for up to 5 hotels. Includes all elements returned when `contentDetails=medium` plus: - ***Hotels*** - RenovationsAndClosures - Policies - OptionalExtras - Media - Accessibility - ***RoomTypes*** - SmokingOption - BedTypeOptions - RoomOccupancyPolicy - Media **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. + * @property allRoomTypes Returns all available rate plans for the selected hotels. This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. + * @property links Comma-separated list to specify the types of deep links. - WD (link to Web Details site) - WS (link to Web Search Result page) - AD (link for Details API) - RC (link for RateCalendar API) - WEB (include all website links) - API (links for Details and RateCalendar API) There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. When requesting API deeplinks you will receive both a RateCalendar API link at the property level, and Details API links at the room level, since the Lodging Details API only displays information on rate plan offers. When requesting AD deeplinks, you will only receive Details API links at the room level. `Links` node in property-level will be omitted. If you are looking for more complete details on a single property via the API, you should do another search in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only return details on a specific room offer for specific dates. + * @property minStarRating The minimum star rating for hotels returned in the response. + * @property maxStarRating The maximum star rating for hotels returned in the response. + * @property limit The maximum number of hotels returned in the response. Must be an integer greater than 0. If the value is greater than 1000, only the first 1000 hotels are returned. Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden and a lower number of hotels to be returned. The `limit` parameter is intended to be used to control the response size, but partners should be careful about combining it with other filter parameters, as each parameter that you add will shrink the response, even to the point where you may even get a \"no hotel found\" error if none of the hotels in the base response meet the combined filter requirements. Filters are cumulative in effect, and results must meet all filter requirements to be displayed. + * @property queryText Query text is used for a full text search of hotel data. Text search based on hotel name, description, address, promotion description, amenities description. + * @property availOnly Specifies whether to return only available hotels in the search results. If the value of this parameter is true, the search results will only return hotels that have availability during the requested dates. If there are no hotels with availability in your search then an empty record set will be returned. This parameter is ignored for dateless searches. + * @property smokingPreference Specifies smoking preference. + * @property rateType Indicate which type of `paymentMethod` for each room will be returned. + * @property imageSizes Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when `contentDetails=high`. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. + * @property thumbnailImageSize Indicate what size of image will be used for the single `thumbnail` image that is returned when `contentDetails` is set to `low`, `medium` or `high`. The available thumbnail image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `thumbnailImageSize` is specified, the t size images will be returned. if no thumbnail image found, it would not return thumbnail image. Only one thumbnail image size is allowed. + * @property includedPropertyTypeIds Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + * @property excludedPropertyTypeIds Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + * @property includedInventorySourceIds Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory sources. Query with the `includedInventorySourceIds` parameter included will only return listings from the requested inventory sources. All others will be left out. `includedInventorySourceId=24` will return only Expedia lodging inventory. `includedInventorySourceId=83` will return only Vrbo lodging inventory. `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. + * @property freeCancellation Specifies whether to return only free cancelable room rates in the search results. If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. This parameter is ignored for dateless searches. + * @property groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. + * @property blockFullDepositRateplan Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. This parameter is ignored for dateless search. + * @property ratePlanType **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account Manager if you need this parameter. To specify the desired rate plan types. The options are: - standalone : Ask for standalone rates - package : Ask for package rates, but standalone rate also may be returned if available. Otherwise only standalone rate plans will be returned. `WebSearchResult` and `WebDetails` links won't be returned for package rate. + * @property sortType Specifies the field that the search results will be ordered by. To be used in conjunction with sortOrder parameter below. **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. + * @property sortOrder Specifies the sort order of search results. If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. To be used in conjunction with the `sortType` parameter above. + * @property room1Adults Specifies the number of adults staying in a specific room. Default value is one room with 2 adults. Example: `room1.adults` is used to specify the number of adults in the first room. + * @property room1ChildAges Comma-separated list that specifies the age(s) for each of the children in each of the rooms. Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. Children must be accompanied by an adult. + * @property room2Adults Specifies the number of adults staying in second room. + * @property room2ChildAges Comma-separated list that specifies the age(s) for each of the children in second room. + * @property room3Adults Specifies the number of adults staying in third room. + * @property room3ChildAges Comma-separated list that specifies the age(s) for each of the children in third room. + * @property room4Adults Specifies the number of adults staying in fourth room. + * @property room4ChildAges Comma-separated list that specifies the age(s) for each of the children in fourth room. + * @property room5Adults Specifies the number of adults staying in fifth room. + * @property room5ChildAges Comma-separated list that specifies the age(s) for each of the children in fifth room. + * @property room6Adults Specifies the number of adults staying in sixth room. + * @property room6ChildAges Comma-separated list that specifies the age(s) for each of the children in sixth room. + * @property room7Adults Specifies the number of adults staying in seventh room. + * @property room7ChildAges Comma-separated list that specifies the age(s) for each of the children in seventh room. + * @property room8Adults Specifies the number of adults staying in eighth room. + * @property room8ChildAges Comma-separated list that specifies the age(s) for each of the children in eighth room. + */ + @JsonDeserialize(builder = GetLodgingListingsOperationParams.Builder::class) + data class GetLodgingListingsOperationParams( + val partnerTransactionId: + kotlin.String + + , + val ecomHotelIds: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val hcomHotelIds: kotlin.collections.Set< + > + +? + = null +, + val hcomHotelIds: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val geoLocation: kotlin.String? = - null, - @field:Valid - val radius: kotlin.Long? = - 25L, - val unit: GetLodgingListingsOperationParams.Unit? = - Unit.KM, - @field:Valid - val locationKeyword: kotlin.String? = - null, - @field:Valid - val regionIds: kotlin.collections.Set< + > + +? + = null +, + val geoLocation: + kotlin.String + +? + = null +, + val radius: + kotlin.Long + +? + = + 25L +, + val unit: GetLodgingListingsOperationParams.Unit + + +? + = + Unit.KM +, + val locationKeyword: + kotlin.String + +? + = null +, + val regionIds: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val checkIn: java.time.LocalDate? = - null, - @field:Valid - val checkOut: java.time.LocalDate? = - null, - @field:Valid - val locale: kotlin.String? = - null, - @field:Valid - val currency: kotlin.String? = - null, - val source: GetLodgingListingsOperationParams.Source? = - Source.BROWSER, - @field:Valid - val travelWithPets: kotlin.Boolean? = - false, - val contentDetails: GetLodgingListingsOperationParams.ContentDetails? = - ContentDetails.LOW, - @field:Valid - val allRoomTypes: kotlin.Boolean? = - false, - val links: kotlin.collections.List< + > + +? + = null +, + val checkIn: + java.time.LocalDate + +? + = null +, + val checkOut: + java.time.LocalDate + +? + = null +, + val locale: + kotlin.String + +? + = null +, + val currency: + kotlin.String + +? + = null +, + val source: GetLodgingListingsOperationParams.Source + + +? + = + Source.BROWSER +, + val travelWithPets: + kotlin.Boolean + +? + = + false +, + val contentDetails: GetLodgingListingsOperationParams.ContentDetails + + +? + = + ContentDetails.LOW +, + val allRoomTypes: + kotlin.Boolean + +? + = + false +, + val links: kotlin.collections.List + < GetLodgingListingsOperationParams.Links - >? = - null, - val minStarRating: GetLodgingListingsOperationParams.MinStarRating? = - null, - val maxStarRating: GetLodgingListingsOperationParams.MaxStarRating? = - null, - @field:Valid - val limit: kotlin.Long? = - null, - @field:Valid - val queryText: kotlin.String? = - null, - @field:Valid - val availOnly: kotlin.Boolean? = - null, - val smokingPreference: GetLodgingListingsOperationParams.SmokingPreference? = - null, - val rateType: GetLodgingListingsOperationParams.RateType? = - null, - val imageSizes: GetLodgingListingsOperationParams.ImageSizes? = - null, - val thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize? = - null, - @field:Valid - val includedPropertyTypeIds: kotlin.collections.Set< + + > + +? + = null +, + val minStarRating: GetLodgingListingsOperationParams.MinStarRating + + +? + = null +, + val maxStarRating: GetLodgingListingsOperationParams.MaxStarRating + + +? + = null +, + val limit: + kotlin.Long + +? + = null +, + val queryText: + kotlin.String + +? + = null +, + val availOnly: + kotlin.Boolean + +? + = null +, + val smokingPreference: GetLodgingListingsOperationParams.SmokingPreference + + +? + = null +, + val rateType: GetLodgingListingsOperationParams.RateType + + +? + = null +, + val imageSizes: GetLodgingListingsOperationParams.ImageSizes + + +? + = null +, + val thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize + + +? + = null +, + val includedPropertyTypeIds: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val excludedPropertyTypeIds: kotlin.collections.Set< + > + +? + = null +, + val excludedPropertyTypeIds: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val includedInventorySourceIds: kotlin.collections.Set< + > + +? + = null +, + val includedInventorySourceIds: kotlin.collections.Set + < + kotlin.String - >? = - null, - @field:Valid - val freeCancellation: kotlin.Boolean? = - null, - @field:Valid - val groupedAmenities: kotlin.Boolean? = - null, - @field:Valid - val blockFullDepositRateplan: kotlin.Boolean? = - false, - val ratePlanType: GetLodgingListingsOperationParams.RatePlanType? = - null, - val sortType: GetLodgingListingsOperationParams.SortType? = - null, - val sortOrder: GetLodgingListingsOperationParams.SortOrder? = - SortOrder.ASC, - @field:Valid - val room1Adults: kotlin.Long? = - null, - @field:Valid - val room1ChildAges: kotlin.collections.List< + > + +? + = null +, + val freeCancellation: + kotlin.Boolean + +? + = null +, + val groupedAmenities: + kotlin.Boolean + +? + = null +, + val blockFullDepositRateplan: + kotlin.Boolean + +? + = + false +, + val ratePlanType: GetLodgingListingsOperationParams.RatePlanType + + +? + = null +, + val sortType: GetLodgingListingsOperationParams.SortType + + +? + = null +, + val sortOrder: GetLodgingListingsOperationParams.SortOrder + + +? + = + SortOrder.ASC +, + val room1Adults: + kotlin.Long + +? + = null +, + val room1ChildAges: kotlin.collections.List + < + kotlin.String - >? = - null, - @field:Valid - val room2Adults: kotlin.Long? = - null, - @field:Valid - val room2ChildAges: kotlin.collections.List< + > + +? + = null +, + val room2Adults: + kotlin.Long + +? + = null +, + val room2ChildAges: kotlin.collections.List + < + kotlin.String - >? = - null, - @field:Valid - val room3Adults: kotlin.Long? = - null, - @field:Valid - val room3ChildAges: kotlin.collections.List< + > + +? + = null +, + val room3Adults: + kotlin.Long + +? + = null +, + val room3ChildAges: kotlin.collections.List + < + kotlin.String - >? = - null, - @field:Valid - val room4Adults: kotlin.Long? = - null, - @field:Valid - val room4ChildAges: kotlin.collections.List< + > + +? + = null +, + val room4Adults: + kotlin.Long + +? + = null +, + val room4ChildAges: kotlin.collections.List + < + kotlin.String - >? = - null, - @field:Valid - val room5Adults: kotlin.Long? = - null, - @field:Valid - val room5ChildAges: kotlin.collections.List< + > + +? + = null +, + val room5Adults: + kotlin.Long + +? + = null +, + val room5ChildAges: kotlin.collections.List + < + kotlin.String - >? = - null, - @field:Valid - val room6Adults: kotlin.Long? = - null, - @field:Valid - val room6ChildAges: kotlin.collections.List< + > + +? + = null +, + val room6Adults: + kotlin.Long + +? + = null +, + val room6ChildAges: kotlin.collections.List + < + kotlin.String - >? = - null, - @field:Valid - val room7Adults: kotlin.Long? = - null, - @field:Valid - val room7ChildAges: kotlin.collections.List< + > + +? + = null +, + val room7Adults: + kotlin.Long + +? + = null +, + val room7ChildAges: kotlin.collections.List + < + kotlin.String - >? = - null, - @field:Valid - val room8Adults: kotlin.Long? = - null, - @field:Valid - val room8ChildAges: kotlin.collections.List< + > + +? + = null +, + val room8Adults: + kotlin.Long + +? + = null +, + val room8ChildAges: kotlin.collections.List + < + kotlin.String - >? = - null -) { - companion object { - @JvmStatic - fun builder() = Builder() - } + > - enum class Unit( - val value: kotlin.String - ) { - KM("km"), - MI("mi") - } +? + = null - enum class Source( - val value: kotlin.String - ) { - BROWSER("browser"), - MOBILEAPP("mobileapp") - } + ) { - enum class ContentDetails( - val value: kotlin.String - ) { - LOWEST("lowest"), - LOW("low"), - MEDIUM("medium"), - HIGH("high") - } + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - enum class Links( - val value: kotlin.String - ) { - WD("WD"), - WS("WS"), - AD("AD"), - RC("RC"), - WEB("WEB"), - API("API") - } - enum class MinStarRating( - val value: kotlin.String - ) { - _1_PERIOD0("1.0"), - _1_PERIOD5("1.5"), - _2_PERIOD0("2.0"), - _2_PERIOD5("2.5"), - _3_PERIOD0("3.0"), - _3_PERIOD5("3.5"), - _4_PERIOD0("4.0"), - _4_PERIOD5("4.5"), - _5_PERIOD0("5.0") - } - enum class MaxStarRating( - val value: kotlin.String - ) { - _1_PERIOD0("1.0"), - _1_PERIOD5("1.5"), - _2_PERIOD0("2.0"), - _2_PERIOD5("2.5"), - _3_PERIOD0("3.0"), - _3_PERIOD5("3.5"), - _4_PERIOD0("4.0"), - _4_PERIOD5("4.5"), - _5_PERIOD0("5.0") - } - enum class SmokingPreference( - val value: kotlin.String - ) { - SMOKING("smoking"), - NONSMOKING("nonsmoking"), - BOTH("both") - } - enum class RateType( - val value: kotlin.String - ) { - PAYONLINE("payonline"), - PAYHOTEL("payhotel"), - ALL("all") - } - enum class ImageSizes( - val value: kotlin.String - ) { - T("t"), - S("s"), - B("b"), - Y("y"), - Z("z") - } - enum class ThumbnailImageSize( - val value: kotlin.String - ) { - T("t"), - S("s"), - B("b"), - Y("y"), - Z("z") - } - enum class RatePlanType( - val value: kotlin.String - ) { - STANDALONE("standalone"), - PACKAGE("package") - } - enum class SortType( - val value: kotlin.String - ) { - PRICE("price"), - STARRATING("starrating"), - AVGRATE("avgrate"), - DEALS("deals"), - GUESTRATING("guestrating"), - HOTELNAME("hotelname"), - DISTANCE("distance"), - TOTALPRICEWITHFEES("totalpricewithfees") - } - enum class SortOrder( - val value: kotlin.String - ) { - ASC("asc"), - DESC("desc") - } - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("ecomHotelIds") private var ecomHotelIds: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("hcomHotelIds") private var hcomHotelIds: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("geoLocation") private var geoLocation: kotlin.String? = null, - @JsonProperty("radius") private var radius: kotlin.Long? = null, - @JsonProperty("unit") private var unit: GetLodgingListingsOperationParams.Unit? = null, - @JsonProperty("locationKeyword") private var locationKeyword: kotlin.String? = null, - @JsonProperty("regionIds") private var regionIds: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("checkIn") private var checkIn: java.time.LocalDate? = null, - @JsonProperty("checkOut") private var checkOut: java.time.LocalDate? = null, - @JsonProperty("locale") private var locale: kotlin.String? = null, - @JsonProperty("currency") private var currency: kotlin.String? = null, - @JsonProperty("source") private var source: GetLodgingListingsOperationParams.Source? = null, - @JsonProperty("travelWithPets") private var travelWithPets: kotlin.Boolean? = null, - @JsonProperty("contentDetails") private var contentDetails: GetLodgingListingsOperationParams.ContentDetails? = null, - @JsonProperty("allRoomTypes") private var allRoomTypes: kotlin.Boolean? = null, - @JsonProperty("links") private var links: kotlin.collections.List< - GetLodgingListingsOperationParams.Links - >? = null, - @JsonProperty("minStarRating") private var minStarRating: GetLodgingListingsOperationParams.MinStarRating? = null, - @JsonProperty("maxStarRating") private var maxStarRating: GetLodgingListingsOperationParams.MaxStarRating? = null, - @JsonProperty("limit") private var limit: kotlin.Long? = null, - @JsonProperty("queryText") private var queryText: kotlin.String? = null, - @JsonProperty("availOnly") private var availOnly: kotlin.Boolean? = null, - @JsonProperty("smokingPreference") private var smokingPreference: GetLodgingListingsOperationParams.SmokingPreference? = null, - @JsonProperty("rateType") private var rateType: GetLodgingListingsOperationParams.RateType? = null, - @JsonProperty("imageSizes") private var imageSizes: GetLodgingListingsOperationParams.ImageSizes? = null, - @JsonProperty("thumbnailImageSize") private var thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize? = null, - @JsonProperty("includedPropertyTypeIds") private var includedPropertyTypeIds: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("excludedPropertyTypeIds") private var excludedPropertyTypeIds: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("includedInventorySourceIds") private var includedInventorySourceIds: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("freeCancellation") private var freeCancellation: kotlin.Boolean? = null, - @JsonProperty("groupedAmenities") private var groupedAmenities: kotlin.Boolean? = null, - @JsonProperty("blockFullDepositRateplan") private var blockFullDepositRateplan: kotlin.Boolean? = null, - @JsonProperty("ratePlanType") private var ratePlanType: GetLodgingListingsOperationParams.RatePlanType? = null, - @JsonProperty("sortType") private var sortType: GetLodgingListingsOperationParams.SortType? = null, - @JsonProperty("sortOrder") private var sortOrder: GetLodgingListingsOperationParams.SortOrder? = null, - @JsonProperty("room1.adults") private var room1Adults: kotlin.Long? = null, - @JsonProperty("room1.childAges") private var room1ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room2.adults") private var room2Adults: kotlin.Long? = null, - @JsonProperty("room2.childAges") private var room2ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room3.adults") private var room3Adults: kotlin.Long? = null, - @JsonProperty("room3.childAges") private var room3ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room4.adults") private var room4Adults: kotlin.Long? = null, - @JsonProperty("room4.childAges") private var room4ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room5.adults") private var room5Adults: kotlin.Long? = null, - @JsonProperty("room5.childAges") private var room5ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room6.adults") private var room6Adults: kotlin.Long? = null, - @JsonProperty("room6.childAges") private var room6ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room7.adults") private var room7Adults: kotlin.Long? = null, - @JsonProperty("room7.childAges") private var room7ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room8.adults") private var room8Adults: kotlin.Long? = null, - @JsonProperty("room8.childAges") private var room8ChildAges: kotlin.collections.List< - kotlin.String - >? = null - ) { - /** - * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param ecomHotelIds Comma-separated list of Expedia hotel IDs. There can be no spaces between parameters. - */ - fun ecomHotelIds( - ecomHotelIds: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.ecomHotelIds = ecomHotelIds } - /** - * @param hcomHotelIds Comma-separated list of Hotels.com hotel IDs. There can be no spaces between parameters. - */ - fun hcomHotelIds( - hcomHotelIds: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.hcomHotelIds = hcomHotelIds } - /** - * @param geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. There can be no spaces between parameters. This parameter should be used in combination with the radius and unit parameters below. - */ - fun geoLocation(geoLocation: kotlin.String) = apply { this.geoLocation = geoLocation } - /** - * @param radius The size of the search radius around a specified point when searching by `geoLocation`, `locationKeyword`, or `regionids`. `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` if not specified. `radius` must be less than 200 km or 124 mi. This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, or `regionids` parameters.\" - */ - fun radius(radius: kotlin.Long) = apply { this.radius = radius } - /** - * @param unit The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. Valid units are `km` and `mi`. This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, or `regionids`. - */ - fun unit(unit: GetLodgingListingsOperationParams.Unit) = apply { this.unit = unit } - /** - * @param locationKeyword A keyword search for a location. The keyword can be a city, address, airport or a landmark. This parameter should be used in combination with the `radius` and `unit` parameters above to define a circle around the landmark. The default radius value is 25 if not specified. Combined search is not supported, if more than one search method is included in the request, an error will be returned. - */ - fun locationKeyword(locationKeyword: kotlin.String) = apply { this.locationKeyword = locationKeyword } - /** - * @param regionIds Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. Search returns set of all hotels in the combined regions. You may search using a string of 1 - 10 Region ID's. More than 10 Region ID's are not supported and will generate and error. You can get the complete list of Expedia Region IDs from [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). This parameter could be used in combination with the `radius` and `unit` parameters above to define a circle around the `regionIds`. The default radius value is 0 if not specified. - */ - fun regionIds( - regionIds: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.regionIds = regionIds } - /** - * @param checkIn Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - */ - fun checkIn(checkIn: java.time.LocalDate) = apply { this.checkIn = checkIn } - /** - * @param checkOut Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - */ - fun checkOut(checkOut: java.time.LocalDate) = apply { this.checkOut = checkOut } - /** - * @param locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. If not specified in the query, the native language for that POS will be returned. And if more than one language is supported, the response will be returned in the first language depending on the language setting of the POS. - */ - fun locale(locale: kotlin.String) = apply { this.locale = locale } - /** - * @param currency Value should be a standard ISO 3 letter currency code. - */ - fun currency(currency: kotlin.String) = apply { this.currency = currency } - /** - * @param source Indicate the source where the request is coming from. - */ - fun source(source: GetLodgingListingsOperationParams.Source) = apply { this.source = source } - /** - * @param travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. - */ - fun travelWithPets(travelWithPets: kotlin.Boolean) = apply { this.travelWithPets = travelWithPets } - /** - * @param contentDetails This parameter is optional and can be specified as the following values. - lowest - low (default) - medium - high ### *lowest* Returns the absolute minimum response for up to 1,000 hotels: - Count(Count of hotels that are actually returned) - TotalHotelCount(Count of hotels that are requested) - TransactionId - StayDates - LengthOfStay - NumberOfRooms - Occupants - ***Hotels*** - Id - Status - Links - ***RoomTypes*** - RoomKey [Deprecated] - OfferId - RatePlanType - ***RatePlans*** - RoomTypeId - RatePlanId - RateRuleId - InventorySourceId - RemainingCount - Price - MemberOnlyDeal - Promotions - PaymentMethod - FullDepositUponBooking - PaymentSchedule - CancellationPolicy - Price - BaseRate - TaxesAndFees - TotalPrice - TotalStrikeOutPrice - AvgNightlyRate - AvgNightlyStrikeOutRate - AvgNightlyRateWithFees - AvgNightlyStrikeOutRateWithFees - HotelMandatoryFees - TotalPriceWithHotelFees - NightlyRates - TaxesAndFeesDetails - RefundableDamageDeposit This minimal response is the best for partners that store static hotel location data locally, and who would like to have the smallest and fastest API response. ### *low* Returns basic hotel information in response for up to 1,000 hotels. Includes all elements returned when `contentDetails=lowest` plus: - ***Hotels*** - Name - PropertyType - PropertyDetails - LocalCurrencyCode - Location - Distance - Description(may not be localized) - ChainAndBrandInfo - ThumbnailUrl - StarRating - GuestRating - GuestReviewCount - PetFriendly - LgbtqiaFriendly - ImportantNotices - ***RoomTypes*** - Description - ***RatePlans*** - InventorySourceCode - PaymentTime - ReserveWithDeposit - FreeInternet - FreeWiFi - FreeParking - FreeBreakfast ### *medium* Returns more complete hotel information in response for up to 200 hotels. Includes all elements returned when `contentDetails=low` plus: - ***Hotels*** - HotelAmenities - RoomAmenities - ***RoomTypes*** - ***RatePlans*** - FreeInternetDetails - FreeBreakfastDetails - Amenities - Amenities **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. ### *high* Returns extended hotel information in response for up to 5 hotels. Includes all elements returned when `contentDetails=medium` plus: - ***Hotels*** - RenovationsAndClosures - Policies - OptionalExtras - Media - Accessibility - ***RoomTypes*** - SmokingOption - BedTypeOptions - RoomOccupancyPolicy - Media **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. - */ - fun contentDetails(contentDetails: GetLodgingListingsOperationParams.ContentDetails) = apply { this.contentDetails = contentDetails } - /** - * @param allRoomTypes Returns all available rate plans for the selected hotels. This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. - */ - fun allRoomTypes(allRoomTypes: kotlin.Boolean) = apply { this.allRoomTypes = allRoomTypes } - /** - * @param links Comma-separated list to specify the types of deep links. - WD (link to Web Details site) - WS (link to Web Search Result page) - AD (link for Details API) - RC (link for RateCalendar API) - WEB (include all website links) - API (links for Details and RateCalendar API) There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. When requesting API deeplinks you will receive both a RateCalendar API link at the property level, and Details API links at the room level, since the Lodging Details API only displays information on rate plan offers. When requesting AD deeplinks, you will only receive Details API links at the room level. `Links` node in property-level will be omitted. If you are looking for more complete details on a single property via the API, you should do another search in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only return details on a specific room offer for specific dates. - */ - fun links( - links: kotlin.collections.List< - GetLodgingListingsOperationParams.Links - > - ) = apply { this.links = links } - /** - * @param minStarRating The minimum star rating for hotels returned in the response. - */ - fun minStarRating(minStarRating: GetLodgingListingsOperationParams.MinStarRating) = apply { this.minStarRating = minStarRating } - /** - * @param maxStarRating The maximum star rating for hotels returned in the response. - */ - fun maxStarRating(maxStarRating: GetLodgingListingsOperationParams.MaxStarRating) = apply { this.maxStarRating = maxStarRating } - /** - * @param limit The maximum number of hotels returned in the response. Must be an integer greater than 0. If the value is greater than 1000, only the first 1000 hotels are returned. Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden and a lower number of hotels to be returned. The `limit` parameter is intended to be used to control the response size, but partners should be careful about combining it with other filter parameters, as each parameter that you add will shrink the response, even to the point where you may even get a \"no hotel found\" error if none of the hotels in the base response meet the combined filter requirements. Filters are cumulative in effect, and results must meet all filter requirements to be displayed. - */ - fun limit(limit: kotlin.Long) = apply { this.limit = limit } - /** - * @param queryText Query text is used for a full text search of hotel data. Text search based on hotel name, description, address, promotion description, amenities description. - */ - fun queryText(queryText: kotlin.String) = apply { this.queryText = queryText } - /** - * @param availOnly Specifies whether to return only available hotels in the search results. If the value of this parameter is true, the search results will only return hotels that have availability during the requested dates. If there are no hotels with availability in your search then an empty record set will be returned. This parameter is ignored for dateless searches. - */ - fun availOnly(availOnly: kotlin.Boolean) = apply { this.availOnly = availOnly } - /** - * @param smokingPreference Specifies smoking preference. - */ - fun smokingPreference(smokingPreference: GetLodgingListingsOperationParams.SmokingPreference) = apply { this.smokingPreference = smokingPreference } - /** - * @param rateType Indicate which type of `paymentMethod` for each room will be returned. - */ - fun rateType(rateType: GetLodgingListingsOperationParams.RateType) = apply { this.rateType = rateType } - /** - * @param imageSizes Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when `contentDetails=high`. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. - */ - fun imageSizes(imageSizes: GetLodgingListingsOperationParams.ImageSizes) = apply { this.imageSizes = imageSizes } - /** - * @param thumbnailImageSize Indicate what size of image will be used for the single `thumbnail` image that is returned when `contentDetails` is set to `low`, `medium` or `high`. The available thumbnail image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `thumbnailImageSize` is specified, the t size images will be returned. if no thumbnail image found, it would not return thumbnail image. Only one thumbnail image size is allowed. - */ - fun thumbnailImageSize(thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize) = apply { this.thumbnailImageSize = thumbnailImageSize } - /** - * @param includedPropertyTypeIds Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - */ - fun includedPropertyTypeIds( - includedPropertyTypeIds: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.includedPropertyTypeIds = includedPropertyTypeIds } - /** - * @param excludedPropertyTypeIds Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - */ - fun excludedPropertyTypeIds( - excludedPropertyTypeIds: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.excludedPropertyTypeIds = excludedPropertyTypeIds } - /** - * @param includedInventorySourceIds Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory sources. Query with the `includedInventorySourceIds` parameter included will only return listings from the requested inventory sources. All others will be left out. `includedInventorySourceId=24` will return only Expedia lodging inventory. `includedInventorySourceId=83` will return only Vrbo lodging inventory. `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. - */ - fun includedInventorySourceIds( - includedInventorySourceIds: kotlin.collections.Set< - kotlin.String - > - ) = apply { this.includedInventorySourceIds = includedInventorySourceIds } - /** - * @param freeCancellation Specifies whether to return only free cancelable room rates in the search results. If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. This parameter is ignored for dateless searches. - */ - fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } - /** - * @param groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. - */ - fun groupedAmenities(groupedAmenities: kotlin.Boolean) = apply { this.groupedAmenities = groupedAmenities } - /** - * @param blockFullDepositRateplan Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. This parameter is ignored for dateless search. - */ - fun blockFullDepositRateplan(blockFullDepositRateplan: kotlin.Boolean) = apply { this.blockFullDepositRateplan = blockFullDepositRateplan } - /** - * @param ratePlanType **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account Manager if you need this parameter. To specify the desired rate plan types. The options are: - standalone : Ask for standalone rates - package : Ask for package rates, but standalone rate also may be returned if available. Otherwise only standalone rate plans will be returned. `WebSearchResult` and `WebDetails` links won't be returned for package rate. - */ - fun ratePlanType(ratePlanType: GetLodgingListingsOperationParams.RatePlanType) = apply { this.ratePlanType = ratePlanType } - /** - * @param sortType Specifies the field that the search results will be ordered by. To be used in conjunction with sortOrder parameter below. **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. - */ - fun sortType(sortType: GetLodgingListingsOperationParams.SortType) = apply { this.sortType = sortType } - /** - * @param sortOrder Specifies the sort order of search results. If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. To be used in conjunction with the `sortType` parameter above. - */ - fun sortOrder(sortOrder: GetLodgingListingsOperationParams.SortOrder) = apply { this.sortOrder = sortOrder } - - fun rooms(rooms: List) = - apply { - if (rooms.size > 8) { - throw PropertyConstraintViolationException( - constraintViolations = listOf("rooms: size must be between 0 and 8") - ) - } - - rooms.elementAtOrNull(0)?.let { - this.room1Adults = it.adults - this.room1ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(1)?.let { - this.room2Adults = it.adults - this.room2ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(2)?.let { - this.room3Adults = it.adults - this.room3ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(3)?.let { - this.room4Adults = it.adults - this.room4ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(4)?.let { - this.room5Adults = it.adults - this.room5ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(5)?.let { - this.room6Adults = it.adults - this.room6ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(6)?.let { - this.room7Adults = it.adults - this.room7ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(7)?.let { - this.room8Adults = it.adults - this.room8ChildAges = it.childAges?.map { item -> item.toString() } - } - } - fun build(): GetLodgingListingsOperationParams { - val params = - GetLodgingListingsOperationParams( - partnerTransactionId = partnerTransactionId!!, - ecomHotelIds = ecomHotelIds, - hcomHotelIds = hcomHotelIds, - geoLocation = geoLocation, - radius = radius, - unit = unit, - locationKeyword = locationKeyword, - regionIds = regionIds, - checkIn = checkIn, - checkOut = checkOut, - locale = locale, - currency = currency, - source = source, - travelWithPets = travelWithPets, - contentDetails = contentDetails, - allRoomTypes = allRoomTypes, - links = links, - minStarRating = minStarRating, - maxStarRating = maxStarRating, - limit = limit, - queryText = queryText, - availOnly = availOnly, - smokingPreference = smokingPreference, - rateType = rateType, - imageSizes = imageSizes, - thumbnailImageSize = thumbnailImageSize, - includedPropertyTypeIds = includedPropertyTypeIds, - excludedPropertyTypeIds = excludedPropertyTypeIds, - includedInventorySourceIds = includedInventorySourceIds, - freeCancellation = freeCancellation, - groupedAmenities = groupedAmenities, - blockFullDepositRateplan = blockFullDepositRateplan, - ratePlanType = ratePlanType, - sortType = sortType, - sortOrder = sortOrder, - room1Adults = room1Adults, - room1ChildAges = room1ChildAges, - room2Adults = room2Adults, - room2ChildAges = room2ChildAges, - room3Adults = room3Adults, - room3ChildAges = room3ChildAges, - room4Adults = room4Adults, - room4ChildAges = room4ChildAges, - room5Adults = room5Adults, - room5ChildAges = room5ChildAges, - room6Adults = room6Adults, - room6ChildAges = room6ChildAges, - room7Adults = room7Adults, - room7ChildAges = room7ChildAges, - room8Adults = room8Adults, - room8ChildAges = room8ChildAges - ) - - validate(params) - - return params - } - - private fun validate(params: GetLodgingListingsOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } - } - } - fun toBuilder() = - Builder( - partnerTransactionId = partnerTransactionId, - ecomHotelIds = ecomHotelIds, - hcomHotelIds = hcomHotelIds, - geoLocation = geoLocation, - radius = radius, - unit = unit, - locationKeyword = locationKeyword, - regionIds = regionIds, - checkIn = checkIn, - checkOut = checkOut, - locale = locale, - currency = currency, - source = source, - travelWithPets = travelWithPets, - contentDetails = contentDetails, - allRoomTypes = allRoomTypes, - links = links, - minStarRating = minStarRating, - maxStarRating = maxStarRating, - limit = limit, - queryText = queryText, - availOnly = availOnly, - smokingPreference = smokingPreference, - rateType = rateType, - imageSizes = imageSizes, - thumbnailImageSize = thumbnailImageSize, - includedPropertyTypeIds = includedPropertyTypeIds, - excludedPropertyTypeIds = excludedPropertyTypeIds, - includedInventorySourceIds = includedInventorySourceIds, - freeCancellation = freeCancellation, - groupedAmenities = groupedAmenities, - blockFullDepositRateplan = blockFullDepositRateplan, - ratePlanType = ratePlanType, - sortType = sortType, - sortOrder = sortOrder, - room1Adults = room1Adults, - room1ChildAges = room1ChildAges, - room2Adults = room2Adults, - room2ChildAges = room2ChildAges, - room3Adults = room3Adults, - room3ChildAges = room3ChildAges, - room4Adults = room4Adults, - room4ChildAges = room4ChildAges, - room5Adults = room5Adults, - room5ChildAges = room5ChildAges, - room6Adults = room6Adults, - room6ChildAges = room6ChildAges, - room7Adults = room7Adults, - room7ChildAges = room7ChildAges, - room8Adults = room8Adults, - room8ChildAges = room8ChildAges - ) - fun getHeaders(): Headers = - Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-hotel.v3+json") - }.build() - - fun getQueryParams(): List = - buildList { - ecomHotelIds?.let { - val key = "ecomHotelIds" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - hcomHotelIds?.let { - val key = "hcomHotelIds" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - geoLocation?.let { - val key = "geoLocation" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - radius?.let { - val key = "radius" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - unit?.let { - val key = "unit" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - locationKeyword?.let { - val key = "locationKeyword" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - regionIds?.let { - val key = "regionIds" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - checkIn?.let { - val key = "checkIn" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - checkOut?.let { - val key = "checkOut" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - locale?.let { - val key = "locale" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - currency?.let { - val key = "currency" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - source?.let { - val key = "source" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - travelWithPets?.let { - val key = "travelWithPets" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - contentDetails?.let { - val key = "contentDetails" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - allRoomTypes?.let { - val key = "allRoomTypes" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - links?.let { - val key = "links" - val value = - buildList { - addAll(it.map { it.value }) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - minStarRating?.let { - val key = "minStarRating" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - maxStarRating?.let { - val key = "maxStarRating" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - limit?.let { - val key = "limit" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - queryText?.let { - val key = "queryText" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - availOnly?.let { - val key = "availOnly" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - smokingPreference?.let { - val key = "smokingPreference" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - rateType?.let { - val key = "rateType" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - imageSizes?.let { - val key = "imageSizes" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - thumbnailImageSize?.let { - val key = "thumbnailImageSize" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - includedPropertyTypeIds?.let { - val key = "includedPropertyTypeIds" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - excludedPropertyTypeIds?.let { - val key = "excludedPropertyTypeIds" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - includedInventorySourceIds?.let { - val key = "includedInventorySourceIds" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - freeCancellation?.let { - val key = "freeCancellation" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - groupedAmenities?.let { - val key = "groupedAmenities" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - blockFullDepositRateplan?.let { - val key = "blockFullDepositRateplan" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - ratePlanType?.let { - val key = "ratePlanType" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - sortType?.let { - val key = "sortType" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - sortOrder?.let { - val key = "sortOrder" - val value = - buildList { - add(it.value) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room1Adults?.let { - val key = "room1.adults" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room1ChildAges?.let { - val key = "room1.childAges" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - room2Adults?.let { - val key = "room2.adults" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room2ChildAges?.let { - val key = "room2.childAges" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - room3Adults?.let { - val key = "room3.adults" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room3ChildAges?.let { - val key = "room3.childAges" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - room4Adults?.let { - val key = "room4.adults" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room4ChildAges?.let { - val key = "room4.childAges" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - room5Adults?.let { - val key = "room5.adults" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room5ChildAges?.let { - val key = "room5.childAges" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - room6Adults?.let { - val key = "room6.adults" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room6ChildAges?.let { - val key = "room6.childAges" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - room7Adults?.let { - val key = "room7.adults" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room7ChildAges?.let { - val key = "room7.childAges" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - room8Adults?.let { - val key = "room8.adults" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - room8ChildAges?.let { - val key = "room8.childAges" - val value = - buildList { - addAll(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) - ) - } - } -} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + + companion object { + @JvmStatic + fun builder() = Builder() + } + + enum class Unit( + val value: + + kotlin.String + ) { + KM("km") + , + MI("mi") + + } + enum class Source( + val value: + + kotlin.String + ) { + BROWSER("browser") + , + MOBILEAPP("mobileapp") + + } + enum class ContentDetails( + val value: + + kotlin.String + ) { + LOWEST("lowest") + , + LOW("low") + , + MEDIUM("medium") + , + HIGH("high") + + } + enum class Links( + val value: + kotlin.String + + ) { + WD("WD") + , + WS("WS") + , + AD("AD") + , + RC("RC") + , + WEB("WEB") + , + API("API") + + } + enum class MinStarRating( + val value: + + kotlin.String + ) { + _1_PERIOD0("1.0") + , + _1_PERIOD5("1.5") + , + _2_PERIOD0("2.0") + , + _2_PERIOD5("2.5") + , + _3_PERIOD0("3.0") + , + _3_PERIOD5("3.5") + , + _4_PERIOD0("4.0") + , + _4_PERIOD5("4.5") + , + _5_PERIOD0("5.0") + + } + enum class MaxStarRating( + val value: + + kotlin.String + ) { + _1_PERIOD0("1.0") + , + _1_PERIOD5("1.5") + , + _2_PERIOD0("2.0") + , + _2_PERIOD5("2.5") + , + _3_PERIOD0("3.0") + , + _3_PERIOD5("3.5") + , + _4_PERIOD0("4.0") + , + _4_PERIOD5("4.5") + , + _5_PERIOD0("5.0") + + } + enum class SmokingPreference( + val value: + + kotlin.String + ) { + SMOKING("smoking") + , + NONSMOKING("nonsmoking") + , + BOTH("both") + + } + enum class RateType( + val value: + + kotlin.String + ) { + PAYONLINE("payonline") + , + PAYHOTEL("payhotel") + , + ALL("all") + + } + enum class ImageSizes( + val value: + + kotlin.String + ) { + T("t") + , + S("s") + , + B("b") + , + Y("y") + , + Z("z") + + } + enum class ThumbnailImageSize( + val value: + + kotlin.String + ) { + T("t") + , + S("s") + , + B("b") + , + Y("y") + , + Z("z") + + } + enum class RatePlanType( + val value: + + kotlin.String + ) { + STANDALONE("standalone") + , + PACKAGE("package") + + } + enum class SortType( + val value: + + kotlin.String + ) { + PRICE("price") + , + STARRATING("starrating") + , + AVGRATE("avgrate") + , + DEALS("deals") + , + GUESTRATING("guestrating") + , + HOTELNAME("hotelname") + , + DISTANCE("distance") + , + TOTALPRICEWITHFEES("totalpricewithfees") + + } + enum class SortOrder( + val value: + + kotlin.String + ) { + ASC("asc") + , + DESC("desc") + + } + + + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String +? = null + , + @JsonProperty("ecomHotelIds") private var ecomHotelIds: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("hcomHotelIds") private var hcomHotelIds: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("geoLocation") private var geoLocation: + kotlin.String +? = null + , + @JsonProperty("radius") private var radius: + kotlin.Long +? = null + , + @JsonProperty("unit") private var unit: GetLodgingListingsOperationParams.Unit + +? = null + , + @JsonProperty("locationKeyword") private var locationKeyword: + kotlin.String +? = null + , + @JsonProperty("regionIds") private var regionIds: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("checkIn") private var checkIn: + java.time.LocalDate +? = null + , + @JsonProperty("checkOut") private var checkOut: + java.time.LocalDate +? = null + , + @JsonProperty("locale") private var locale: + kotlin.String +? = null + , + @JsonProperty("currency") private var currency: + kotlin.String +? = null + , + @JsonProperty("source") private var source: GetLodgingListingsOperationParams.Source + +? = null + , + @JsonProperty("travelWithPets") private var travelWithPets: + kotlin.Boolean +? = null + , + @JsonProperty("contentDetails") private var contentDetails: GetLodgingListingsOperationParams.ContentDetails + +? = null + , + @JsonProperty("allRoomTypes") private var allRoomTypes: + kotlin.Boolean +? = null + , + @JsonProperty("links") private var links: kotlin.collections.List + < + GetLodgingListingsOperationParams.Links + + > +? = null + , + @JsonProperty("minStarRating") private var minStarRating: GetLodgingListingsOperationParams.MinStarRating + +? = null + , + @JsonProperty("maxStarRating") private var maxStarRating: GetLodgingListingsOperationParams.MaxStarRating + +? = null + , + @JsonProperty("limit") private var limit: + kotlin.Long +? = null + , + @JsonProperty("queryText") private var queryText: + kotlin.String +? = null + , + @JsonProperty("availOnly") private var availOnly: + kotlin.Boolean +? = null + , + @JsonProperty("smokingPreference") private var smokingPreference: GetLodgingListingsOperationParams.SmokingPreference + +? = null + , + @JsonProperty("rateType") private var rateType: GetLodgingListingsOperationParams.RateType + +? = null + , + @JsonProperty("imageSizes") private var imageSizes: GetLodgingListingsOperationParams.ImageSizes + +? = null + , + @JsonProperty("thumbnailImageSize") private var thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize + +? = null + , + @JsonProperty("includedPropertyTypeIds") private var includedPropertyTypeIds: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("excludedPropertyTypeIds") private var excludedPropertyTypeIds: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("includedInventorySourceIds") private var includedInventorySourceIds: kotlin.collections.Set + < + + kotlin.String + > +? = null + , + @JsonProperty("freeCancellation") private var freeCancellation: + kotlin.Boolean +? = null + , + @JsonProperty("groupedAmenities") private var groupedAmenities: + kotlin.Boolean +? = null + , + @JsonProperty("blockFullDepositRateplan") private var blockFullDepositRateplan: + kotlin.Boolean +? = null + , + @JsonProperty("ratePlanType") private var ratePlanType: GetLodgingListingsOperationParams.RatePlanType + +? = null + , + @JsonProperty("sortType") private var sortType: GetLodgingListingsOperationParams.SortType + +? = null + , + @JsonProperty("sortOrder") private var sortOrder: GetLodgingListingsOperationParams.SortOrder + +? = null + , + @JsonProperty("room1.adults") private var room1Adults: + kotlin.Long +? = null + , + @JsonProperty("room1.childAges") private var room1ChildAges: kotlin.collections.List + < + + kotlin.String + > +? = null + , + @JsonProperty("room2.adults") private var room2Adults: + kotlin.Long +? = null + , + @JsonProperty("room2.childAges") private var room2ChildAges: kotlin.collections.List + < + + kotlin.String + > +? = null + , + @JsonProperty("room3.adults") private var room3Adults: + kotlin.Long +? = null + , + @JsonProperty("room3.childAges") private var room3ChildAges: kotlin.collections.List + < + + kotlin.String + > +? = null + , + @JsonProperty("room4.adults") private var room4Adults: + kotlin.Long +? = null + , + @JsonProperty("room4.childAges") private var room4ChildAges: kotlin.collections.List + < + + kotlin.String + > +? = null + , + @JsonProperty("room5.adults") private var room5Adults: + kotlin.Long +? = null + , + @JsonProperty("room5.childAges") private var room5ChildAges: kotlin.collections.List + < + + kotlin.String + > +? = null + , + @JsonProperty("room6.adults") private var room6Adults: + kotlin.Long +? = null + , + @JsonProperty("room6.childAges") private var room6ChildAges: kotlin.collections.List + < + + kotlin.String + > +? = null + , + @JsonProperty("room7.adults") private var room7Adults: + kotlin.Long +? = null + , + @JsonProperty("room7.childAges") private var room7ChildAges: kotlin.collections.List + < + + kotlin.String + > +? = null + , + @JsonProperty("room8.adults") private var room8Adults: + kotlin.Long +? = null + , + @JsonProperty("room8.childAges") private var room8ChildAges: kotlin.collections.List + < + + kotlin.String + > +? = null + +) { + /** + * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + */ + fun partnerTransactionId(partnerTransactionId: + kotlin.String +) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param ecomHotelIds Comma-separated list of Expedia hotel IDs. There can be no spaces between parameters. + */ + fun ecomHotelIds(ecomHotelIds: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.ecomHotelIds = ecomHotelIds } + /** + * @param hcomHotelIds Comma-separated list of Hotels.com hotel IDs. There can be no spaces between parameters. + */ + fun hcomHotelIds(hcomHotelIds: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.hcomHotelIds = hcomHotelIds } + /** + * @param geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. There can be no spaces between parameters. This parameter should be used in combination with the radius and unit parameters below. + */ + fun geoLocation(geoLocation: + kotlin.String +) = apply { this.geoLocation = geoLocation } + /** + * @param radius The size of the search radius around a specified point when searching by `geoLocation`, `locationKeyword`, or `regionids`. `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` if not specified. `radius` must be less than 200 km or 124 mi. This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, or `regionids` parameters.\" + */ + fun radius(radius: + kotlin.Long +) = apply { this.radius = radius } + /** + * @param unit The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. Valid units are `km` and `mi`. This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, or `regionids`. + */ + fun unit(unit: GetLodgingListingsOperationParams.Unit + +) = apply { this.unit = unit } + /** + * @param locationKeyword A keyword search for a location. The keyword can be a city, address, airport or a landmark. This parameter should be used in combination with the `radius` and `unit` parameters above to define a circle around the landmark. The default radius value is 25 if not specified. Combined search is not supported, if more than one search method is included in the request, an error will be returned. + */ + fun locationKeyword(locationKeyword: + kotlin.String +) = apply { this.locationKeyword = locationKeyword } + /** + * @param regionIds Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. Search returns set of all hotels in the combined regions. You may search using a string of 1 - 10 Region ID's. More than 10 Region ID's are not supported and will generate and error. You can get the complete list of Expedia Region IDs from [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). This parameter could be used in combination with the `radius` and `unit` parameters above to define a circle around the `regionIds`. The default radius value is 0 if not specified. + */ + fun regionIds(regionIds: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.regionIds = regionIds } + /** + * @param checkIn Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + */ + fun checkIn(checkIn: + java.time.LocalDate +) = apply { this.checkIn = checkIn } + /** + * @param checkOut Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + */ + fun checkOut(checkOut: + java.time.LocalDate +) = apply { this.checkOut = checkOut } + /** + * @param locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. If not specified in the query, the native language for that POS will be returned. And if more than one language is supported, the response will be returned in the first language depending on the language setting of the POS. + */ + fun locale(locale: + kotlin.String +) = apply { this.locale = locale } + /** + * @param currency Value should be a standard ISO 3 letter currency code. + */ + fun currency(currency: + kotlin.String +) = apply { this.currency = currency } + /** + * @param source Indicate the source where the request is coming from. + */ + fun source(source: GetLodgingListingsOperationParams.Source + +) = apply { this.source = source } + /** + * @param travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. + */ + fun travelWithPets(travelWithPets: + kotlin.Boolean +) = apply { this.travelWithPets = travelWithPets } + /** + * @param contentDetails This parameter is optional and can be specified as the following values. - lowest - low (default) - medium - high ### *lowest* Returns the absolute minimum response for up to 1,000 hotels: - Count(Count of hotels that are actually returned) - TotalHotelCount(Count of hotels that are requested) - TransactionId - StayDates - LengthOfStay - NumberOfRooms - Occupants - ***Hotels*** - Id - Status - Links - ***RoomTypes*** - RoomKey [Deprecated] - OfferId - RatePlanType - ***RatePlans*** - RoomTypeId - RatePlanId - RateRuleId - InventorySourceId - RemainingCount - Price - MemberOnlyDeal - Promotions - PaymentMethod - FullDepositUponBooking - PaymentSchedule - CancellationPolicy - Price - BaseRate - TaxesAndFees - TotalPrice - TotalStrikeOutPrice - AvgNightlyRate - AvgNightlyStrikeOutRate - AvgNightlyRateWithFees - AvgNightlyStrikeOutRateWithFees - HotelMandatoryFees - TotalPriceWithHotelFees - NightlyRates - TaxesAndFeesDetails - RefundableDamageDeposit This minimal response is the best for partners that store static hotel location data locally, and who would like to have the smallest and fastest API response. ### *low* Returns basic hotel information in response for up to 1,000 hotels. Includes all elements returned when `contentDetails=lowest` plus: - ***Hotels*** - Name - PropertyType - PropertyDetails - LocalCurrencyCode - Location - Distance - Description(may not be localized) - ChainAndBrandInfo - ThumbnailUrl - StarRating - GuestRating - GuestReviewCount - PetFriendly - LgbtqiaFriendly - ImportantNotices - ***RoomTypes*** - Description - ***RatePlans*** - InventorySourceCode - PaymentTime - ReserveWithDeposit - FreeInternet - FreeWiFi - FreeParking - FreeBreakfast ### *medium* Returns more complete hotel information in response for up to 200 hotels. Includes all elements returned when `contentDetails=low` plus: - ***Hotels*** - HotelAmenities - RoomAmenities - ***RoomTypes*** - ***RatePlans*** - FreeInternetDetails - FreeBreakfastDetails - Amenities - Amenities **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. ### *high* Returns extended hotel information in response for up to 5 hotels. Includes all elements returned when `contentDetails=medium` plus: - ***Hotels*** - RenovationsAndClosures - Policies - OptionalExtras - Media - Accessibility - ***RoomTypes*** - SmokingOption - BedTypeOptions - RoomOccupancyPolicy - Media **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. + */ + fun contentDetails(contentDetails: GetLodgingListingsOperationParams.ContentDetails + +) = apply { this.contentDetails = contentDetails } + /** + * @param allRoomTypes Returns all available rate plans for the selected hotels. This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. + */ + fun allRoomTypes(allRoomTypes: + kotlin.Boolean +) = apply { this.allRoomTypes = allRoomTypes } + /** + * @param links Comma-separated list to specify the types of deep links. - WD (link to Web Details site) - WS (link to Web Search Result page) - AD (link for Details API) - RC (link for RateCalendar API) - WEB (include all website links) - API (links for Details and RateCalendar API) There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. When requesting API deeplinks you will receive both a RateCalendar API link at the property level, and Details API links at the room level, since the Lodging Details API only displays information on rate plan offers. When requesting AD deeplinks, you will only receive Details API links at the room level. `Links` node in property-level will be omitted. If you are looking for more complete details on a single property via the API, you should do another search in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only return details on a specific room offer for specific dates. + */ + fun links(links: kotlin.collections.List + < + GetLodgingListingsOperationParams.Links + + > +) = apply { this.links = links } + /** + * @param minStarRating The minimum star rating for hotels returned in the response. + */ + fun minStarRating(minStarRating: GetLodgingListingsOperationParams.MinStarRating + +) = apply { this.minStarRating = minStarRating } + /** + * @param maxStarRating The maximum star rating for hotels returned in the response. + */ + fun maxStarRating(maxStarRating: GetLodgingListingsOperationParams.MaxStarRating + +) = apply { this.maxStarRating = maxStarRating } + /** + * @param limit The maximum number of hotels returned in the response. Must be an integer greater than 0. If the value is greater than 1000, only the first 1000 hotels are returned. Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden and a lower number of hotels to be returned. The `limit` parameter is intended to be used to control the response size, but partners should be careful about combining it with other filter parameters, as each parameter that you add will shrink the response, even to the point where you may even get a \"no hotel found\" error if none of the hotels in the base response meet the combined filter requirements. Filters are cumulative in effect, and results must meet all filter requirements to be displayed. + */ + fun limit(limit: + kotlin.Long +) = apply { this.limit = limit } + /** + * @param queryText Query text is used for a full text search of hotel data. Text search based on hotel name, description, address, promotion description, amenities description. + */ + fun queryText(queryText: + kotlin.String +) = apply { this.queryText = queryText } + /** + * @param availOnly Specifies whether to return only available hotels in the search results. If the value of this parameter is true, the search results will only return hotels that have availability during the requested dates. If there are no hotels with availability in your search then an empty record set will be returned. This parameter is ignored for dateless searches. + */ + fun availOnly(availOnly: + kotlin.Boolean +) = apply { this.availOnly = availOnly } + /** + * @param smokingPreference Specifies smoking preference. + */ + fun smokingPreference(smokingPreference: GetLodgingListingsOperationParams.SmokingPreference + +) = apply { this.smokingPreference = smokingPreference } + /** + * @param rateType Indicate which type of `paymentMethod` for each room will be returned. + */ + fun rateType(rateType: GetLodgingListingsOperationParams.RateType + +) = apply { this.rateType = rateType } + /** + * @param imageSizes Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when `contentDetails=high`. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. + */ + fun imageSizes(imageSizes: GetLodgingListingsOperationParams.ImageSizes + +) = apply { this.imageSizes = imageSizes } + /** + * @param thumbnailImageSize Indicate what size of image will be used for the single `thumbnail` image that is returned when `contentDetails` is set to `low`, `medium` or `high`. The available thumbnail image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `thumbnailImageSize` is specified, the t size images will be returned. if no thumbnail image found, it would not return thumbnail image. Only one thumbnail image size is allowed. + */ + fun thumbnailImageSize(thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize + +) = apply { this.thumbnailImageSize = thumbnailImageSize } + /** + * @param includedPropertyTypeIds Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + */ + fun includedPropertyTypeIds(includedPropertyTypeIds: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.includedPropertyTypeIds = includedPropertyTypeIds } + /** + * @param excludedPropertyTypeIds Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + */ + fun excludedPropertyTypeIds(excludedPropertyTypeIds: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.excludedPropertyTypeIds = excludedPropertyTypeIds } + /** + * @param includedInventorySourceIds Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory sources. Query with the `includedInventorySourceIds` parameter included will only return listings from the requested inventory sources. All others will be left out. `includedInventorySourceId=24` will return only Expedia lodging inventory. `includedInventorySourceId=83` will return only Vrbo lodging inventory. `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. + */ + fun includedInventorySourceIds(includedInventorySourceIds: kotlin.collections.Set + < + + kotlin.String + > +) = apply { this.includedInventorySourceIds = includedInventorySourceIds } + /** + * @param freeCancellation Specifies whether to return only free cancelable room rates in the search results. If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. This parameter is ignored for dateless searches. + */ + fun freeCancellation(freeCancellation: + kotlin.Boolean +) = apply { this.freeCancellation = freeCancellation } + /** + * @param groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. + */ + fun groupedAmenities(groupedAmenities: + kotlin.Boolean +) = apply { this.groupedAmenities = groupedAmenities } + /** + * @param blockFullDepositRateplan Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. This parameter is ignored for dateless search. + */ + fun blockFullDepositRateplan(blockFullDepositRateplan: + kotlin.Boolean +) = apply { this.blockFullDepositRateplan = blockFullDepositRateplan } + /** + * @param ratePlanType **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account Manager if you need this parameter. To specify the desired rate plan types. The options are: - standalone : Ask for standalone rates - package : Ask for package rates, but standalone rate also may be returned if available. Otherwise only standalone rate plans will be returned. `WebSearchResult` and `WebDetails` links won't be returned for package rate. + */ + fun ratePlanType(ratePlanType: GetLodgingListingsOperationParams.RatePlanType + +) = apply { this.ratePlanType = ratePlanType } + /** + * @param sortType Specifies the field that the search results will be ordered by. To be used in conjunction with sortOrder parameter below. **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. + */ + fun sortType(sortType: GetLodgingListingsOperationParams.SortType + +) = apply { this.sortType = sortType } + /** + * @param sortOrder Specifies the sort order of search results. If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. To be used in conjunction with the `sortType` parameter above. + */ + fun sortOrder(sortOrder: GetLodgingListingsOperationParams.SortOrder + +) = apply { this.sortOrder = sortOrder } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fun rooms(rooms: List) = + apply { + if (rooms.size > 8) { + throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( + constraintViolations = listOf("rooms: size must be between 0 and 8") + ) + } + + rooms.elementAtOrNull(0)?.let { + this.room1Adults = it.adults + this.room1ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(1)?.let { + this.room2Adults = it.adults + this.room2ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(2)?.let { + this.room3Adults = it.adults + this.room3ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(3)?.let { + this.room4Adults = it.adults + this.room4ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(4)?.let { + this.room5Adults = it.adults + this.room5ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(5)?.let { + this.room6Adults = it.adults + this.room6ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(6)?.let { + this.room7Adults = it.adults + this.room7ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(7)?.let { + this.room8Adults = it.adults + this.room8ChildAges = it.childAges?.map { item -> item.toString() } + } + } + +fun build(): GetLodgingListingsOperationParams { + val params = GetLodgingListingsOperationParams( + partnerTransactionId = partnerTransactionId!!, + ecomHotelIds = ecomHotelIds, + hcomHotelIds = hcomHotelIds, + geoLocation = geoLocation, + radius = radius, + unit = unit, + locationKeyword = locationKeyword, + regionIds = regionIds, + checkIn = checkIn, + checkOut = checkOut, + locale = locale, + currency = currency, + source = source, + travelWithPets = travelWithPets, + contentDetails = contentDetails, + allRoomTypes = allRoomTypes, + links = links, + minStarRating = minStarRating, + maxStarRating = maxStarRating, + limit = limit, + queryText = queryText, + availOnly = availOnly, + smokingPreference = smokingPreference, + rateType = rateType, + imageSizes = imageSizes, + thumbnailImageSize = thumbnailImageSize, + includedPropertyTypeIds = includedPropertyTypeIds, + excludedPropertyTypeIds = excludedPropertyTypeIds, + includedInventorySourceIds = includedInventorySourceIds, + freeCancellation = freeCancellation, + groupedAmenities = groupedAmenities, + blockFullDepositRateplan = blockFullDepositRateplan, + ratePlanType = ratePlanType, + sortType = sortType, + sortOrder = sortOrder, + room1Adults = room1Adults, + room1ChildAges = room1ChildAges, + room2Adults = room2Adults, + room2ChildAges = room2ChildAges, + room3Adults = room3Adults, + room3ChildAges = room3ChildAges, + room4Adults = room4Adults, + room4ChildAges = room4ChildAges, + room5Adults = room5Adults, + room5ChildAges = room5ChildAges, + room6Adults = room6Adults, + room6ChildAges = room6ChildAges, + room7Adults = room7Adults, + room7ChildAges = room7ChildAges, + room8Adults = room8Adults, + room8ChildAges = room8ChildAges + ) + + return params + } +} + +fun toBuilder() = Builder( + partnerTransactionId = partnerTransactionId, + ecomHotelIds = ecomHotelIds, + hcomHotelIds = hcomHotelIds, + geoLocation = geoLocation, + radius = radius, + unit = unit, + locationKeyword = locationKeyword, + regionIds = regionIds, + checkIn = checkIn, + checkOut = checkOut, + locale = locale, + currency = currency, + source = source, + travelWithPets = travelWithPets, + contentDetails = contentDetails, + allRoomTypes = allRoomTypes, + links = links, + minStarRating = minStarRating, + maxStarRating = maxStarRating, + limit = limit, + queryText = queryText, + availOnly = availOnly, + smokingPreference = smokingPreference, + rateType = rateType, + imageSizes = imageSizes, + thumbnailImageSize = thumbnailImageSize, + includedPropertyTypeIds = includedPropertyTypeIds, + excludedPropertyTypeIds = excludedPropertyTypeIds, + includedInventorySourceIds = includedInventorySourceIds, + freeCancellation = freeCancellation, + groupedAmenities = groupedAmenities, + blockFullDepositRateplan = blockFullDepositRateplan, + ratePlanType = ratePlanType, + sortType = sortType, + sortOrder = sortOrder, + room1Adults = room1Adults, + room1ChildAges = room1ChildAges, + room2Adults = room2Adults, + room2ChildAges = room2ChildAges, + room3Adults = room3Adults, + room3ChildAges = room3ChildAges, + room4Adults = room4Adults, + room4ChildAges = room4ChildAges, + room5Adults = room5Adults, + room5ChildAges = room5ChildAges, + room6Adults = room6Adults, + room6ChildAges = room6ChildAges, + room7Adults = room7Adults, + room7ChildAges = room7ChildAges, + room8Adults = room8Adults, + room8ChildAges = room8ChildAges +) + + + fun getHeaders(): Headers { +return Headers.builder().apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-hotel.v3+json") +}.build() +} + + fun getQueryParams(): List = + buildList { + ecomHotelIds?.let { + val key = "ecomHotelIds" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + hcomHotelIds?.let { + val key = "hcomHotelIds" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + geoLocation?.let { + val key = "geoLocation" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + radius?.let { + val key = "radius" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + unit?.let { + val key = "unit" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + locationKeyword?.let { + val key = "locationKeyword" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + regionIds?.let { + val key = "regionIds" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + checkIn?.let { + val key = "checkIn" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + checkOut?.let { + val key = "checkOut" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + locale?.let { + val key = "locale" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + currency?.let { + val key = "currency" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + source?.let { + val key = "source" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + travelWithPets?.let { + val key = "travelWithPets" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + contentDetails?.let { + val key = "contentDetails" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + allRoomTypes?.let { + val key = "allRoomTypes" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + links?.let { + val key = "links" + val value = buildList { + addAll(it.map { it.value }) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + minStarRating?.let { + val key = "minStarRating" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + maxStarRating?.let { + val key = "maxStarRating" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + limit?.let { + val key = "limit" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + queryText?.let { + val key = "queryText" + val value = buildList { + add(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + availOnly?.let { + val key = "availOnly" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + smokingPreference?.let { + val key = "smokingPreference" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + rateType?.let { + val key = "rateType" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + imageSizes?.let { + val key = "imageSizes" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + thumbnailImageSize?.let { + val key = "thumbnailImageSize" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + includedPropertyTypeIds?.let { + val key = "includedPropertyTypeIds" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + excludedPropertyTypeIds?.let { + val key = "excludedPropertyTypeIds" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + includedInventorySourceIds?.let { + val key = "includedInventorySourceIds" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + freeCancellation?.let { + val key = "freeCancellation" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + groupedAmenities?.let { + val key = "groupedAmenities" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + blockFullDepositRateplan?.let { + val key = "blockFullDepositRateplan" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + ratePlanType?.let { + val key = "ratePlanType" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + sortType?.let { + val key = "sortType" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + sortOrder?.let { + val key = "sortOrder" + val value = buildList { + add(it.value) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room1Adults?.let { + val key = "room1.adults" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room1ChildAges?.let { + val key = "room1.childAges" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + room2Adults?.let { + val key = "room2.adults" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room2ChildAges?.let { + val key = "room2.childAges" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + room3Adults?.let { + val key = "room3.adults" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room3ChildAges?.let { + val key = "room3.childAges" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + room4Adults?.let { + val key = "room4.adults" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room4ChildAges?.let { + val key = "room4.childAges" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + room5Adults?.let { + val key = "room5.adults" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room5ChildAges?.let { + val key = "room5.childAges" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + room6Adults?.let { + val key = "room6.adults" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room6ChildAges?.let { + val key = "room6.childAges" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + room7Adults?.let { + val key = "room7.adults" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room7ChildAges?.let { + val key = "room7.childAges" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } + room8Adults?.let { + val key = "room8.adults" + val value = buildList { + add(it.toString()) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + room8ChildAges?.let { + val key = "room8.childAges" + val value = buildList { + addAll(it) + } + + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) + )) + } +} + + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt index ee92f9f39..24b94801c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt @@ -1,39 +1,58 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.LodgingQuotesResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * Get properties price and availability information - * @property params [GetLodgingQuotesOperationParams] - */ -class GetLodgingQuotesOperation( - val params: GetLodgingQuotesOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/lodging/quotes" - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIGatewayError + import com.expediagroup.sdk.xap.models.LodgingErrors + import com.expediagroup.sdk.xap.models.LodgingQuotesResponse + + /** + * Get properties price and availability information + * @property params [GetLodgingQuotesOperationParams] + */ + class GetLodgingQuotesOperation( + private val params: GetLodgingQuotesOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/lodging/quotes" + + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt index e32527f32..3938f38e0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt @@ -1,17 +1,12 @@ package com.expediagroup.sdk.xap.operations + import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException import com.expediagroup.sdk.rest.model.UrlQueryParam import com.expediagroup.sdk.rest.util.stringifyExplode import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.expediagroup.sdk.xap.models.Room import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull /** * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. @@ -40,200 +35,344 @@ import javax.validation.constraints.NotNull */ @JsonDeserialize(builder = GetLodgingQuotesOperationParams.Builder::class) data class GetLodgingQuotesOperationParams( - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:Valid - val propertyIds: kotlin.collections.Set< - kotlin.String - >? = - null, - @field:Valid - val checkIn: java.time.LocalDate? = - null, - @field:Valid - val checkOut: java.time.LocalDate? = - null, - @field:Valid - val currency: kotlin.String? = - null, - val links: kotlin.collections.List< - GetLodgingQuotesOperationParams.Links - >? = - null, - @field:Valid - val travelWithPets: kotlin.Boolean? = + val partnerTransactionId: + kotlin.String, + val propertyIds: kotlin.collections.Set + < + + kotlin.String + > + + ? + = null, + val checkIn: + java.time.LocalDate + + ? + = null, + val checkOut: + java.time.LocalDate + + ? + = null, + val currency: + kotlin.String + + ? + = null, + val links: kotlin.collections.List + < + GetLodgingQuotesOperationParams.Links + + > + + ? + = null, + val travelWithPets: + kotlin.Boolean + + ? + = false, - @field:Valid - val room1Adults: kotlin.Long? = - null, - @field:Valid - val room1ChildAges: kotlin.collections.List< - kotlin.String - >? = - null, - @field:Valid - val room2Adults: kotlin.Long? = - null, - @field:Valid - val room2ChildAges: kotlin.collections.List< - kotlin.String - >? = - null, - @field:Valid - val room3Adults: kotlin.Long? = - null, - @field:Valid - val room3ChildAges: kotlin.collections.List< - kotlin.String - >? = - null, - @field:Valid - val room4Adults: kotlin.Long? = - null, - @field:Valid - val room4ChildAges: kotlin.collections.List< - kotlin.String - >? = - null, - @field:Valid - val room5Adults: kotlin.Long? = - null, - @field:Valid - val room5ChildAges: kotlin.collections.List< - kotlin.String - >? = - null, - @field:Valid - val room6Adults: kotlin.Long? = - null, - @field:Valid - val room6ChildAges: kotlin.collections.List< - kotlin.String - >? = - null, - @field:Valid - val room7Adults: kotlin.Long? = - null, - @field:Valid - val room7ChildAges: kotlin.collections.List< - kotlin.String - >? = - null, - @field:Valid - val room8Adults: kotlin.Long? = - null, - @field:Valid - val room8ChildAges: kotlin.collections.List< - kotlin.String - >? = - null + val room1Adults: + kotlin.Long + + ? + = null, + val room1ChildAges: kotlin.collections.List + < + + kotlin.String + > + + ? + = null, + val room2Adults: + kotlin.Long + + ? + = null, + val room2ChildAges: kotlin.collections.List + < + + kotlin.String + > + + ? + = null, + val room3Adults: + kotlin.Long + + ? + = null, + val room3ChildAges: kotlin.collections.List + < + + kotlin.String + > + + ? + = null, + val room4Adults: + kotlin.Long + + ? + = null, + val room4ChildAges: kotlin.collections.List + < + + kotlin.String + > + + ? + = null, + val room5Adults: + kotlin.Long + + ? + = null, + val room5ChildAges: kotlin.collections.List + < + + kotlin.String + > + + ? + = null, + val room6Adults: + kotlin.Long + + ? + = null, + val room6ChildAges: kotlin.collections.List + < + + kotlin.String + > + + ? + = null, + val room7Adults: + kotlin.Long + + ? + = null, + val room7ChildAges: kotlin.collections.List + < + + kotlin.String + > + + ? + = null, + val room8Adults: + kotlin.Long + + ? + = null, + val room8ChildAges: kotlin.collections.List + < + + kotlin.String + > + + ? + = null + ) { + + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + + + } + companion object { @JvmStatic fun builder() = Builder() } enum class Links( - val value: kotlin.String + val value: + kotlin.String + ) { WD("WD"), WS("WS"), WEB("WEB") + } + class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("propertyIds") private var propertyIds: kotlin.collections.Set< - kotlin.String - >? = null, - @JsonProperty("checkIn") private var checkIn: java.time.LocalDate? = null, - @JsonProperty("checkOut") private var checkOut: java.time.LocalDate? = null, - @JsonProperty("currency") private var currency: kotlin.String? = null, - @JsonProperty("links") private var links: kotlin.collections.List< - GetLodgingQuotesOperationParams.Links - >? = null, - @JsonProperty("travelWithPets") private var travelWithPets: kotlin.Boolean? = null, - @JsonProperty("room1.adults") private var room1Adults: kotlin.Long? = null, - @JsonProperty("room1.childAges") private var room1ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room2.adults") private var room2Adults: kotlin.Long? = null, - @JsonProperty("room2.childAges") private var room2ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room3.adults") private var room3Adults: kotlin.Long? = null, - @JsonProperty("room3.childAges") private var room3ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room4.adults") private var room4Adults: kotlin.Long? = null, - @JsonProperty("room4.childAges") private var room4ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room5.adults") private var room5Adults: kotlin.Long? = null, - @JsonProperty("room5.childAges") private var room5ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room6.adults") private var room6Adults: kotlin.Long? = null, - @JsonProperty("room6.childAges") private var room6ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room7.adults") private var room7Adults: kotlin.Long? = null, - @JsonProperty("room7.childAges") private var room7ChildAges: kotlin.collections.List< - kotlin.String - >? = null, - @JsonProperty("room8.adults") private var room8Adults: kotlin.Long? = null, - @JsonProperty("room8.childAges") private var room8ChildAges: kotlin.collections.List< - kotlin.String - >? = null + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String + ? = null, + @JsonProperty("propertyIds") private var propertyIds: kotlin.collections.Set + < + + kotlin.String + > + ? = null, + @JsonProperty("checkIn") private var checkIn: + java.time.LocalDate + ? = null, + @JsonProperty("checkOut") private var checkOut: + java.time.LocalDate + ? = null, + @JsonProperty("currency") private var currency: + kotlin.String + ? = null, + @JsonProperty("links") private var links: kotlin.collections.List + < + GetLodgingQuotesOperationParams.Links + + > + ? = null, + @JsonProperty("travelWithPets") private var travelWithPets: + kotlin.Boolean + ? = null, + @JsonProperty("room1.adults") private var room1Adults: + kotlin.Long + ? = null, + @JsonProperty("room1.childAges") private var room1ChildAges: kotlin.collections.List + < + + kotlin.String + > + ? = null, + @JsonProperty("room2.adults") private var room2Adults: + kotlin.Long + ? = null, + @JsonProperty("room2.childAges") private var room2ChildAges: kotlin.collections.List + < + + kotlin.String + > + ? = null, + @JsonProperty("room3.adults") private var room3Adults: + kotlin.Long + ? = null, + @JsonProperty("room3.childAges") private var room3ChildAges: kotlin.collections.List + < + + kotlin.String + > + ? = null, + @JsonProperty("room4.adults") private var room4Adults: + kotlin.Long + ? = null, + @JsonProperty("room4.childAges") private var room4ChildAges: kotlin.collections.List + < + + kotlin.String + > + ? = null, + @JsonProperty("room5.adults") private var room5Adults: + kotlin.Long + ? = null, + @JsonProperty("room5.childAges") private var room5ChildAges: kotlin.collections.List + < + + kotlin.String + > + ? = null, + @JsonProperty("room6.adults") private var room6Adults: + kotlin.Long + ? = null, + @JsonProperty("room6.childAges") private var room6ChildAges: kotlin.collections.List + < + + kotlin.String + > + ? = null, + @JsonProperty("room7.adults") private var room7Adults: + kotlin.Long + ? = null, + @JsonProperty("room7.childAges") private var room7ChildAges: kotlin.collections.List + < + + kotlin.String + > + ? = null, + @JsonProperty("room8.adults") private var room8Adults: + kotlin.Long + ? = null, + @JsonProperty("room8.childAges") private var room8ChildAges: kotlin.collections.List + < + + kotlin.String + > + ? = null + ) { /** * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } + fun partnerTransactionId( + partnerTransactionId: + kotlin.String + ) = apply { this.partnerTransactionId = partnerTransactionId } /** * @param propertyIds Comma-separated list of Expedia Property IDs. ***NOTE**: This API supports Expedia property IDs only by design – HCOM and Vrbo property IDs are not supported.* *For optimal performance, limiting your request to a maximum of 200 properties is recommended.* */ fun propertyIds( - propertyIds: kotlin.collections.Set< - kotlin.String - > + propertyIds: kotlin.collections.Set + < + + kotlin.String + > ) = apply { this.propertyIds = propertyIds } /** * @param checkIn Check-in date for property stay in an ISO 8601 Date format. This parameter should be used in combination with the checkOut parameter. The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. */ - fun checkIn(checkIn: java.time.LocalDate) = apply { this.checkIn = checkIn } + fun checkIn( + checkIn: + java.time.LocalDate + ) = apply { this.checkIn = checkIn } /** * @param checkOut Check-out date for property stay in an ISO 8601 Date format This parameter should be used in combination with the checkIn parameter. The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. */ - fun checkOut(checkOut: java.time.LocalDate) = apply { this.checkOut = checkOut } + fun checkOut( + checkOut: + java.time.LocalDate + ) = apply { this.checkOut = checkOut } /** * @param currency The requested currency expressed according to ISO 4217. PoS default currency will be passed if another currency is not specified in the request. */ - fun currency(currency: kotlin.String) = apply { this.currency = currency } + fun currency( + currency: + kotlin.String + ) = apply { this.currency = currency } /** * @param links Comma-separated list to specify the types of deep links. - WD (link to web infosite) - WS (link to web search result page) - WEB (include all website links) */ fun links( - links: kotlin.collections.List< - GetLodgingQuotesOperationParams.Links - > + links: kotlin.collections.List + < + GetLodgingQuotesOperationParams.Links + + > ) = apply { this.links = links } /** * @param travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. */ - fun travelWithPets(travelWithPets: kotlin.Boolean) = apply { this.travelWithPets = travelWithPets } + fun travelWithPets( + travelWithPets: + kotlin.Boolean + ) = apply { this.travelWithPets = travelWithPets } + - fun rooms(rooms: List) = + fun rooms(rooms: List) = apply { if (rooms.size > 8) { - throw PropertyConstraintViolationException( + throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( constraintViolations = listOf("rooms: size must be between 0 and 8") ) } @@ -280,100 +419,79 @@ data class GetLodgingQuotesOperationParams( } fun build(): GetLodgingQuotesOperationParams { - val params = - GetLodgingQuotesOperationParams( - partnerTransactionId = partnerTransactionId!!, - propertyIds = propertyIds, - checkIn = checkIn, - checkOut = checkOut, - currency = currency, - links = links, - travelWithPets = travelWithPets, - room1Adults = room1Adults, - room1ChildAges = room1ChildAges, - room2Adults = room2Adults, - room2ChildAges = room2ChildAges, - room3Adults = room3Adults, - room3ChildAges = room3ChildAges, - room4Adults = room4Adults, - room4ChildAges = room4ChildAges, - room5Adults = room5Adults, - room5ChildAges = room5ChildAges, - room6Adults = room6Adults, - room6ChildAges = room6ChildAges, - room7Adults = room7Adults, - room7ChildAges = room7ChildAges, - room8Adults = room8Adults, - room8ChildAges = room8ChildAges - ) - - validate(params) + val params = GetLodgingQuotesOperationParams( + partnerTransactionId = partnerTransactionId!!, + propertyIds = propertyIds, + checkIn = checkIn, + checkOut = checkOut, + currency = currency, + links = links, + travelWithPets = travelWithPets, + room1Adults = room1Adults, + room1ChildAges = room1ChildAges, + room2Adults = room2Adults, + room2ChildAges = room2ChildAges, + room3Adults = room3Adults, + room3ChildAges = room3ChildAges, + room4Adults = room4Adults, + room4ChildAges = room4ChildAges, + room5Adults = room5Adults, + room5ChildAges = room5ChildAges, + room6Adults = room6Adults, + room6ChildAges = room6ChildAges, + room7Adults = room7Adults, + room7ChildAges = room7ChildAges, + room8Adults = room8Adults, + room8ChildAges = room8ChildAges + ) return params } - - private fun validate(params: GetLodgingQuotesOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } - } } - fun toBuilder() = - Builder( - partnerTransactionId = partnerTransactionId, - propertyIds = propertyIds, - checkIn = checkIn, - checkOut = checkOut, - currency = currency, - links = links, - travelWithPets = travelWithPets, - room1Adults = room1Adults, - room1ChildAges = room1ChildAges, - room2Adults = room2Adults, - room2ChildAges = room2ChildAges, - room3Adults = room3Adults, - room3ChildAges = room3ChildAges, - room4Adults = room4Adults, - room4ChildAges = room4ChildAges, - room5Adults = room5Adults, - room5ChildAges = room5ChildAges, - room6Adults = room6Adults, - room6ChildAges = room6ChildAges, - room7Adults = room7Adults, - room7ChildAges = room7ChildAges, - room8Adults = room8Adults, - room8ChildAges = room8ChildAges - ) - - fun getHeaders(): Headers = - Headers.builder().apply { + fun toBuilder() = Builder( + partnerTransactionId = partnerTransactionId, + propertyIds = propertyIds, + checkIn = checkIn, + checkOut = checkOut, + currency = currency, + links = links, + travelWithPets = travelWithPets, + room1Adults = room1Adults, + room1ChildAges = room1ChildAges, + room2Adults = room2Adults, + room2ChildAges = room2ChildAges, + room3Adults = room3Adults, + room3ChildAges = room3ChildAges, + room4Adults = room4Adults, + room4ChildAges = room4ChildAges, + room5Adults = room5Adults, + room5ChildAges = room5ChildAges, + room6Adults = room6Adults, + room6ChildAges = room6ChildAges, + room7Adults = room7Adults, + room7ChildAges = room7ChildAges, + room8Adults = room8Adults, + room8ChildAges = room8ChildAges + ) + + + fun getHeaders(): Headers { + return Headers.builder().apply { partnerTransactionId?.let { add("Partner-Transaction-Id", it) } add("Accept", "application/vnd.exp-lodging.v3+json") }.build() + } fun getQueryParams(): List = buildList { propertyIds?.let { val key = "propertyIds" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -385,10 +503,9 @@ data class GetLodgingQuotesOperationParams( } checkIn?.let { val key = "checkIn" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -400,10 +517,9 @@ data class GetLodgingQuotesOperationParams( } checkOut?.let { val key = "checkOut" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -415,10 +531,9 @@ data class GetLodgingQuotesOperationParams( } currency?.let { val key = "currency" - val value = - buildList { - add(it) - } + val value = buildList { + add(it) + } add( UrlQueryParam( @@ -430,10 +545,9 @@ data class GetLodgingQuotesOperationParams( } links?.let { val key = "links" - val value = - buildList { - addAll(it.map { it.value }) - } + val value = buildList { + addAll(it.map { it.value }) + } add( UrlQueryParam( @@ -445,10 +559,9 @@ data class GetLodgingQuotesOperationParams( } travelWithPets?.let { val key = "travelWithPets" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -460,10 +573,9 @@ data class GetLodgingQuotesOperationParams( } room1Adults?.let { val key = "room1.adults" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -475,10 +587,9 @@ data class GetLodgingQuotesOperationParams( } room1ChildAges?.let { val key = "room1.childAges" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -490,10 +601,9 @@ data class GetLodgingQuotesOperationParams( } room2Adults?.let { val key = "room2.adults" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -505,10 +615,9 @@ data class GetLodgingQuotesOperationParams( } room2ChildAges?.let { val key = "room2.childAges" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -520,10 +629,9 @@ data class GetLodgingQuotesOperationParams( } room3Adults?.let { val key = "room3.adults" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -535,10 +643,9 @@ data class GetLodgingQuotesOperationParams( } room3ChildAges?.let { val key = "room3.childAges" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -550,10 +657,9 @@ data class GetLodgingQuotesOperationParams( } room4Adults?.let { val key = "room4.adults" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -565,10 +671,9 @@ data class GetLodgingQuotesOperationParams( } room4ChildAges?.let { val key = "room4.childAges" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -580,10 +685,9 @@ data class GetLodgingQuotesOperationParams( } room5Adults?.let { val key = "room5.adults" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -595,10 +699,9 @@ data class GetLodgingQuotesOperationParams( } room5ChildAges?.let { val key = "room5.childAges" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -610,10 +713,9 @@ data class GetLodgingQuotesOperationParams( } room6Adults?.let { val key = "room6.adults" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -625,10 +727,9 @@ data class GetLodgingQuotesOperationParams( } room6ChildAges?.let { val key = "room6.childAges" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -640,10 +741,9 @@ data class GetLodgingQuotesOperationParams( } room7Adults?.let { val key = "room7.adults" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -655,10 +755,9 @@ data class GetLodgingQuotesOperationParams( } room7ChildAges?.let { val key = "room7.childAges" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -670,10 +769,9 @@ data class GetLodgingQuotesOperationParams( } room8Adults?.let { val key = "room8.adults" - val value = - buildList { - add(it.toString()) - } + val value = buildList { + add(it.toString()) + } add( UrlQueryParam( @@ -685,10 +783,9 @@ data class GetLodgingQuotesOperationParams( } room8ChildAges?.let { val key = "room8.childAges" - val value = - buildList { - addAll(it) - } + val value = buildList { + addAll(it) + } add( UrlQueryParam( @@ -699,4 +796,6 @@ data class GetLodgingQuotesOperationParams( ) } } + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt index 112c487f6..264561ee0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt @@ -1,39 +1,58 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.trait.operation.HeadersTrait -import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait -import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait -import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait -import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait -import com.expediagroup.sdk.xap.models.RateCalendarResponse -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - -/** - * Get rate calendar of a property - * @property params [GetLodgingRateCalendarOperationParams] - */ -class GetLodgingRateCalendarOperation( - val params: GetLodgingRateCalendarOperationParams -) : OperationRequestTrait, - UrlPathTrait, - JacksonModelOperationResponseBodyTrait, - UrlQueryParamsTrait, - HeadersTrait { - override fun getHttpMethod(): String = "GET" - - override fun getRequestInfo(): OperationRequestTrait = this - - override fun getUrlPath(): String { - var url = "/hotels/rateCalendar" - - return url - } + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + + import com.expediagroup.sdk.xap.models.APIGatewayError + import com.expediagroup.sdk.xap.models.Errors + import com.expediagroup.sdk.xap.models.RateCalendarResponse + + /** + * Get rate calendar of a property + * @property params [GetLodgingRateCalendarOperationParams] + */ + class GetLodgingRateCalendarOperation( + private val params: GetLodgingRateCalendarOperationParams, + ) : OperationRequestTrait, +UrlPathTrait + +, JacksonModelOperationResponseBodyTrait + + +, UrlQueryParamsTrait +, HeadersTrait { + override fun getHttpMethod(): String = "GET" + +override fun getRequestInfo(): OperationRequestTrait = this + +override fun getUrlPath(): String { +var url = "/hotels/rateCalendar" + + + +return url +} + + override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() + override fun getUrlQueryParams() = this.params.getQueryParams() -} + + } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt index b8e6d45e5..66f01f7c9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt @@ -1,245 +1,333 @@ package com.expediagroup.sdk.xap.operations -import com.expediagroup.sdk.core.http.Headers -import com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException -import com.expediagroup.sdk.rest.model.UrlQueryParam -import com.expediagroup.sdk.rest.util.stringifyExplode -import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator -import javax.validation.Valid -import javax.validation.Validation -import javax.validation.constraints.NotNull - -/** - * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - * @property ecomHotelId The Expedia hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. - * @property hcomHotelId The Hotel.com hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. - * @property startDate Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The start date may not be in the past. - * @property endDate End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The end date must be after the start date. The maximum supported search range is 180 days. - * @property lengthOfStay The length of stay to retrieve the lowest price for. - * @property currency The requested currency expressed according to ISO 4217. - */ -@JsonDeserialize(builder = GetLodgingRateCalendarOperationParams.Builder::class) -data class GetLodgingRateCalendarOperationParams( - @field:NotNull - @field:Valid - val partnerTransactionId: kotlin.String, - @field:Valid - val ecomHotelId: kotlin.String? = - null, - @field:Valid - val hcomHotelId: kotlin.String? = - null, - @field:NotNull - @field:Valid - val startDate: java.time.LocalDate, - @field:NotNull - @field:Valid - val endDate: java.time.LocalDate, - @field:Valid - val lengthOfStay: kotlin.Int? = - 1, - @field:Valid - val currency: kotlin.String? = - null + + import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait + import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait + + import com.fasterxml.jackson.core.type.TypeReference + import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait + + + import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait + import com.expediagroup.sdk.rest.model.UrlQueryParam + import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier + import com.expediagroup.sdk.rest.util.stringifyExplode + import com.expediagroup.sdk.rest.trait.operation.HeadersTrait + import com.expediagroup.sdk.core.http.Headers + + +import com.expediagroup.sdk.xap.models.APIGatewayError +import com.expediagroup.sdk.xap.models.Errors +import com.expediagroup.sdk.xap.models.RateCalendarResponse + + + import com.fasterxml.jackson.annotation.JsonProperty + import com.fasterxml.jackson.databind.annotation.JsonDeserialize + + /** + * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + * @property ecomHotelId The Expedia hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. + * @property hcomHotelId The Hotel.com hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. + * @property startDate Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The start date may not be in the past. + * @property endDate End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The end date must be after the start date. The maximum supported search range is 180 days. + * @property lengthOfStay The length of stay to retrieve the lowest price for. + * @property currency The requested currency expressed according to ISO 4217. + */ + @JsonDeserialize(builder = GetLodgingRateCalendarOperationParams.Builder::class) + data class GetLodgingRateCalendarOperationParams( + val partnerTransactionId: + kotlin.String + + , + val ecomHotelId: + kotlin.String + +? + = null +, + val hcomHotelId: + kotlin.String + +? + = null +, + val startDate: + java.time.LocalDate + + , + val endDate: + java.time.LocalDate + + , + val lengthOfStay: + kotlin.Int + +? + = + 1 +, + val currency: + kotlin.String + +? + = null + + ) { + + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + require(startDate != null) { "startDate must not be null" } + + + + + + + + + require(endDate != null) { "endDate must not be null" } + + + + + + + + + + + + + + + + + + + + + + + + + + } + + companion object { + @JvmStatic + fun builder() = Builder() + } + + + + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: + kotlin.String +? = null + , + @JsonProperty("ecomHotelId") private var ecomHotelId: + kotlin.String +? = null + , + @JsonProperty("hcomHotelId") private var hcomHotelId: + kotlin.String +? = null + , + @JsonProperty("startDate") private var startDate: + java.time.LocalDate +? = null + , + @JsonProperty("endDate") private var endDate: + java.time.LocalDate +? = null + , + @JsonProperty("lengthOfStay") private var lengthOfStay: + kotlin.Int +? = null + , + @JsonProperty("currency") private var currency: + kotlin.String +? = null + ) { - companion object { - @JvmStatic - fun builder() = Builder() + /** + * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + */ + fun partnerTransactionId(partnerTransactionId: + kotlin.String +) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param ecomHotelId The Expedia hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. + */ + fun ecomHotelId(ecomHotelId: + kotlin.String +) = apply { this.ecomHotelId = ecomHotelId } + /** + * @param hcomHotelId The Hotel.com hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. + */ + fun hcomHotelId(hcomHotelId: + kotlin.String +) = apply { this.hcomHotelId = hcomHotelId } + /** + * @param startDate Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The start date may not be in the past. + */ + fun startDate(startDate: + java.time.LocalDate +) = apply { this.startDate = startDate } + /** + * @param endDate End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The end date must be after the start date. The maximum supported search range is 180 days. + */ + fun endDate(endDate: + java.time.LocalDate +) = apply { this.endDate = endDate } + /** + * @param lengthOfStay The length of stay to retrieve the lowest price for. + */ + fun lengthOfStay(lengthOfStay: + kotlin.Int +) = apply { this.lengthOfStay = lengthOfStay } + /** + * @param currency The requested currency expressed according to ISO 4217. + */ + fun currency(currency: + kotlin.String +) = apply { this.currency = currency } + + fun build(): GetLodgingRateCalendarOperationParams { + val params = GetLodgingRateCalendarOperationParams( + partnerTransactionId = partnerTransactionId!!, + ecomHotelId = ecomHotelId, + hcomHotelId = hcomHotelId, + startDate = startDate!!, + endDate = endDate!!, + lengthOfStay = lengthOfStay, + currency = currency + ) + + return params } +} - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, - @JsonProperty("ecomHotelId") private var ecomHotelId: kotlin.String? = null, - @JsonProperty("hcomHotelId") private var hcomHotelId: kotlin.String? = null, - @JsonProperty("startDate") private var startDate: java.time.LocalDate? = null, - @JsonProperty("endDate") private var endDate: java.time.LocalDate? = null, - @JsonProperty("lengthOfStay") private var lengthOfStay: kotlin.Int? = null, - @JsonProperty("currency") private var currency: kotlin.String? = null - ) { - /** - * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - */ - fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } +fun toBuilder() = Builder( + partnerTransactionId = partnerTransactionId, + ecomHotelId = ecomHotelId, + hcomHotelId = hcomHotelId, + startDate = startDate, + endDate = endDate, + lengthOfStay = lengthOfStay, + currency = currency +) - /** - * @param ecomHotelId The Expedia hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. - */ - fun ecomHotelId(ecomHotelId: kotlin.String) = apply { this.ecomHotelId = ecomHotelId } - /** - * @param hcomHotelId The Hotel.com hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. - */ - fun hcomHotelId(hcomHotelId: kotlin.String) = apply { this.hcomHotelId = hcomHotelId } + fun getHeaders(): Headers { +return Headers.builder().apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-hotel.v3+json") +}.build() +} - /** - * @param startDate Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The start date may not be in the past. - */ - fun startDate(startDate: java.time.LocalDate) = apply { this.startDate = startDate } + fun getQueryParams(): List = + buildList { + ecomHotelId?.let { + val key = "ecomHotelId" + val value = buildList { + add(it) + } - /** - * @param endDate End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The end date must be after the start date. The maximum supported search range is 180 days. - */ - fun endDate(endDate: java.time.LocalDate) = apply { this.endDate = endDate } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + hcomHotelId?.let { + val key = "hcomHotelId" + val value = buildList { + add(it) + } - /** - * @param lengthOfStay The length of stay to retrieve the lowest price for. - */ - fun lengthOfStay(lengthOfStay: kotlin.Int) = apply { this.lengthOfStay = lengthOfStay } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + startDate?.let { + val key = "startDate" + val value = buildList { + add(it.toString()) + } - /** - * @param currency The requested currency expressed according to ISO 4217. - */ - fun currency(currency: kotlin.String) = apply { this.currency = currency } - - fun build(): GetLodgingRateCalendarOperationParams { - val params = - GetLodgingRateCalendarOperationParams( - partnerTransactionId = partnerTransactionId!!, - ecomHotelId = ecomHotelId, - hcomHotelId = hcomHotelId, - startDate = startDate!!, - endDate = endDate!!, - lengthOfStay = lengthOfStay, - currency = currency - ) - - validate(params) - - return params + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + endDate?.let { + val key = "endDate" + val value = buildList { + add(it.toString()) } - private fun validate(params: GetLodgingRateCalendarOperationParams) { - val validator = - Validation - .byDefaultProvider() - .configure() - .messageInterpolator(ParameterMessageInterpolator()) - .buildValidatorFactory() - .validator - - val violations = validator.validate(params) - - if (violations.isNotEmpty()) { - throw PropertyConstraintViolationException( - constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" } - ) - } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + lengthOfStay?.let { + val key = "lengthOfStay" + val value = buildList { + add(it.toString()) } - } - fun toBuilder() = - Builder( - partnerTransactionId = partnerTransactionId, - ecomHotelId = ecomHotelId, - hcomHotelId = hcomHotelId, - startDate = startDate, - endDate = endDate, - lengthOfStay = lengthOfStay, - currency = currency - ) + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) + } + currency?.let { + val key = "currency" + val value = buildList { + add(it) + } - fun getHeaders(): Headers = - Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-hotel.v3+json") - }.build() - - fun getQueryParams(): List = - buildList { - ecomHotelId?.let { - val key = "ecomHotelId" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - hcomHotelId?.let { - val key = "hcomHotelId" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - startDate?.let { - val key = "startDate" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - endDate?.let { - val key = "endDate" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - lengthOfStay?.let { - val key = "lengthOfStay" - val value = - buildList { - add(it.toString()) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } - currency?.let { - val key = "currency" - val value = - buildList { - add(it) - } - - add( - UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) - ) - } + add(UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) + )) } } + + + } From 98b47600713f43bba271333526f9357805545962 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 17 Mar 2025 05:23:48 +0300 Subject: [PATCH 03/40] lint code --- xap-sdk/build.gradle.kts | 11 +- .../sdk/xap/client/AsyncXapClient.kt | 4 +- .../expediagroup/sdk/xap/client/XapClient.kt | 8 +- .../sdk/xap/configuration/ApiEndpoint.kt | 2 +- .../xap/configuration/ClientEnvironment.kt | 2 +- .../sdk/xap/configuration/EndpointProvider.kt | 4 +- .../sdk/xap/configuration/XapApiEndpoint.kt | 4 +- .../configuration/XapClientConfiguration.kt | 8 +- .../sdk/xap/core/ApiKeyHeaderStep.kt | 5 +- .../sdk/xap/core/AsyncRequestExecutor.kt | 10 +- .../sdk/xap/core/RequestExecutor.kt | 10 +- .../sdk/xap/models/APIGatewayError.kt | 52 +- .../expediagroup/sdk/xap/models/APIMError.kt | 52 +- .../sdk/xap/models/ActivitiesAddress.kt | 184 +- .../models/ActivitiesCancellationPolicy.kt | 125 +- .../sdk/xap/models/ActivitiesCountry.kt | 127 +- .../sdk/xap/models/ActivitiesError.kt | 147 +- .../sdk/xap/models/ActivitiesErrors.kt | 90 +- .../sdk/xap/models/ActivitiesGeoLocation.kt | 101 +- .../sdk/xap/models/ActivitiesLink.kt | 102 +- .../sdk/xap/models/ActivitiesLocation.kt | 258 +- .../xap/models/ActivitiesLocationOption.kt | 237 +- .../sdk/xap/models/ActivitiesMedia.kt | 127 +- .../sdk/xap/models/ActivitiesMoney.kt | 101 +- .../sdk/xap/models/ActivitiesNeighborhood.kt | 80 +- .../sdk/xap/models/ActivitiesPhone.kt | 124 +- .../sdk/xap/models/ActivitiesPrice.kt | 157 +- .../sdk/xap/models/ActivitiesSupplier.kt | 77 +- .../sdk/xap/models/ActivitiesWarning.kt | 181 +- .../expediagroup/sdk/xap/models/Activity.kt | 519 +-- .../sdk/xap/models/ActivityDetailsResponse.kt | 168 +- .../xap/models/ActivityListingsResponse.kt | 213 +- .../sdk/xap/models/AdditionalFee.kt | 166 +- .../expediagroup/sdk/xap/models/Address.kt | 163 +- .../sdk/xap/models/AgeClassRestriction.kt | 165 +- .../sdk/xap/models/AvailabilityCalendar.kt | 184 +- .../models/AvailabilityCalendarResponse.kt | 100 +- .../sdk/xap/models/AvailableTimeSlot.kt | 134 +- .../expediagroup/sdk/xap/models/BedType.kt | 77 +- .../sdk/xap/models/CancellationPenaltyRule.kt | 142 +- .../CancellationPenaltyRulePenaltyPrice.kt | 98 +- .../sdk/xap/models/CancellationPolicy.kt | 203 +- .../expediagroup/sdk/xap/models/Capacity.kt | 125 +- .../com/expediagroup/sdk/xap/models/Car.kt | 384 +- .../sdk/xap/models/CarCategory.kt | 80 +- .../expediagroup/sdk/xap/models/CarDetails.kt | 423 +- .../sdk/xap/models/CarDetailsResponse.kt | 146 +- .../sdk/xap/models/CarListingsResponse.kt | 128 +- .../expediagroup/sdk/xap/models/CarPolicy.kt | 79 +- .../expediagroup/sdk/xap/models/CarType.kt | 80 +- .../sdk/xap/models/CarsAddress.kt | 190 +- .../sdk/xap/models/CarsCancellationPolicy.kt | 140 +- .../sdk/xap/models/CarsCountry.kt | 127 +- .../sdk/xap/models/CarsDateRange.kt | 80 +- .../sdk/xap/models/CarsDistance.kt | 102 +- .../expediagroup/sdk/xap/models/CarsError.kt | 147 +- .../expediagroup/sdk/xap/models/CarsErrors.kt | 90 +- .../sdk/xap/models/CarsGeoLocation.kt | 101 +- .../expediagroup/sdk/xap/models/CarsLink.kt | 102 +- .../sdk/xap/models/CarsLocation.kt | 262 +- .../sdk/xap/models/CarsLocationOption.kt | 237 +- .../expediagroup/sdk/xap/models/CarsMoney.kt | 101 +- .../sdk/xap/models/CarsNeighborhood.kt | 80 +- .../sdk/xap/models/CarsValidFormsOfPayment.kt | 104 +- .../sdk/xap/models/CarsWarning.kt | 181 +- .../sdk/xap/models/CategoryGroup.kt | 147 +- .../sdk/xap/models/ChainAndBrandInfo.kt | 123 +- .../expediagroup/sdk/xap/models/Country.kt | 98 +- .../expediagroup/sdk/xap/models/DateRange.kt | 75 +- .../sdk/xap/models/DateTimePeriod.kt | 77 +- .../expediagroup/sdk/xap/models/Deductible.kt | 92 +- .../sdk/xap/models/DepositDetail.kt | 134 +- .../sdk/xap/models/DepositPolicy.kt | 73 +- .../sdk/xap/models/Description.kt | 98 +- .../sdk/xap/models/DisambiguationResponse.kt | 90 +- .../expediagroup/sdk/xap/models/Discount.kt | 80 +- .../expediagroup/sdk/xap/models/Distance.kt | 178 +- .../expediagroup/sdk/xap/models/Duration.kt | 80 +- .../expediagroup/sdk/xap/models/Equipment.kt | 124 +- .../com/expediagroup/sdk/xap/models/Error.kt | 142 +- .../com/expediagroup/sdk/xap/models/Errors.kt | 77 +- .../sdk/xap/models/ExtraCostPerDistance.kt | 76 +- .../expediagroup/sdk/xap/models/ExtraFees.kt | 102 +- .../com/expediagroup/sdk/xap/models/Fault.kt | 75 +- .../expediagroup/sdk/xap/models/FileInfo.kt | 264 +- .../expediagroup/sdk/xap/models/FileSize.kt | 107 +- .../sdk/xap/models/FilterConditions.kt | 98 +- .../com/expediagroup/sdk/xap/models/FuelAC.kt | 80 +- .../sdk/xap/models/GeoLocation.kt | 96 +- .../com/expediagroup/sdk/xap/models/Hotel.kt | 835 ++-- .../sdk/xap/models/HotelDetailsResponse.kt | 203 +- .../HotelDetailsResponseOccupantsInner.kt | 77 +- .../models/HotelDetailsResponseStayDates.kt | 77 +- .../HotelDetailsResponseWarningsInner.kt | 165 +- .../xap/models/HotelHotelAmenitiesInner.kt | 77 +- .../expediagroup/sdk/xap/models/HotelLinks.kt | 73 +- .../xap/models/HotelLinksApiRateCalendar.kt | 100 +- .../xap/models/HotelLinksWebSearchResult.kt | 100 +- .../sdk/xap/models/HotelListingsResponse.kt | 226 +- .../models/HotelListingsResponseStayDates.kt | 77 +- .../sdk/xap/models/HotelLocation.kt | 94 +- .../sdk/xap/models/HotelPolicies.kt | 163 +- .../sdk/xap/models/HotelPropertyType.kt | 77 +- .../sdk/xap/models/HotelRateCalendar.kt | 98 +- .../sdk/xap/models/HotelRoomAmenitiesInner.kt | 77 +- .../com/expediagroup/sdk/xap/models/Image.kt | 104 +- .../com/expediagroup/sdk/xap/models/Link.kt | 100 +- .../expediagroup/sdk/xap/models/Location.kt | 92 +- .../sdk/xap/models/LocationGeoLocation.kt | 100 +- .../sdk/xap/models/LocationOption.kt | 180 +- .../sdk/xap/models/LodgingAmenity.kt | 73 +- .../models/LodgingCancellationPenaltyRule.kt | 98 +- .../xap/models/LodgingCancellationPolicy.kt | 121 +- .../sdk/xap/models/LodgingError.kt | 75 +- .../sdk/xap/models/LodgingErrors.kt | 77 +- .../sdk/xap/models/LodgingLink.kt | 100 +- .../sdk/xap/models/LodgingMoney.kt | 75 +- .../sdk/xap/models/LodgingOccupant.kt | 77 +- .../sdk/xap/models/LodgingPromotion.kt | 75 +- .../sdk/xap/models/LodgingQuotesResponse.kt | 205 +- .../sdk/xap/models/LodgingRatePlan.kt | 73 +- .../sdk/xap/models/LodgingRoomType.kt | 96 +- .../sdk/xap/models/LodgingRoomTypeLinks.kt | 73 +- .../models/LodgingRoomTypeLinksWebDetails.kt | 100 +- .../LodgingRoomTypeLinksWebSearchResult.kt | 100 +- .../sdk/xap/models/LodgingRoomTypePrice.kt | 205 +- .../sdk/xap/models/LodgingStayDates.kt | 77 +- .../sdk/xap/models/LodgingWarning.kt | 77 +- .../sdk/xap/models/MandatoryFeesDetail.kt | 259 +- .../xap/models/MandatoryFeesDetailAmount.kt | 98 +- .../com/expediagroup/sdk/xap/models/Media.kt | 139 +- .../expediagroup/sdk/xap/models/Mileage.kt | 99 +- .../com/expediagroup/sdk/xap/models/Money.kt | 96 +- .../sdk/xap/models/Neighborhood.kt | 75 +- .../sdk/xap/models/NightlyRates.kt | 73 +- .../xap/models/NonCancellableDateTimeRange.kt | 80 +- .../sdk/xap/models/NonRefundableDateRange.kt | 77 +- .../expediagroup/sdk/xap/models/Occupant.kt | 75 +- .../com/expediagroup/sdk/xap/models/Offer.kt | 198 +- .../sdk/xap/models/PaymentSchedule.kt | 73 +- .../sdk/xap/models/PaymentSchedulePrice.kt | 98 +- .../sdk/xap/models/PenaltyRule.kt | 102 +- .../sdk/xap/models/PenaltyType.kt | 104 +- .../com/expediagroup/sdk/xap/models/Phone.kt | 123 +- .../sdk/xap/models/PresignedUrlResponse.kt | 138 +- .../com/expediagroup/sdk/xap/models/Price.kt | 136 +- .../expediagroup/sdk/xap/models/Promotion.kt | 75 +- .../sdk/xap/models/PromotionAmount.kt | 98 +- .../expediagroup/sdk/xap/models/Property.kt | 150 +- .../sdk/xap/models/PropertyDetails.kt | 184 +- .../sdk/xap/models/PropertyManager.kt | 98 +- .../sdk/xap/models/RateCalendar.kt | 173 +- .../sdk/xap/models/RateCalendarPrice.kt | 98 +- .../sdk/xap/models/RateCalendarResponse.kt | 100 +- .../sdk/xap/models/RateDetails.kt | 189 +- .../expediagroup/sdk/xap/models/RatePlan.kt | 671 ++- .../sdk/xap/models/RatePlanAmenitiesInner.kt | 77 +- .../sdk/xap/models/RatePlanPrice.kt | 268 +- .../models/RatePlanPriceNightlyRatesInner.kt | 77 +- .../RatePlanPriceTaxesAndFeesDetailsInner.kt | 77 +- .../sdk/xap/models/RatePlanStandalonePrice.kt | 249 +- .../com/expediagroup/sdk/xap/models/Rating.kt | 103 +- .../sdk/xap/models/RatingDetails.kt | 80 +- .../sdk/xap/models/RatingWithoutDetails.kt | 80 +- .../expediagroup/sdk/xap/models/Redemption.kt | 75 +- .../sdk/xap/models/ReferencePrice.kt | 96 +- .../sdk/xap/models/RentalLimits.kt | 76 +- .../sdk/xap/models/Restrictions.kt | 127 +- .../com/expediagroup/sdk/xap/models/Room.kt | 9 +- .../sdk/xap/models/RoomOccupancyPolicy.kt | 142 +- .../sdk/xap/models/RoomPreference.kt | 101 +- .../expediagroup/sdk/xap/models/RoomRates.kt | 199 +- .../sdk/xap/models/RoomRatesBaseRate.kt | 98 +- .../xap/models/RoomRatesNightlyRatesInner.kt | 77 +- .../sdk/xap/models/RoomRatesTaxesAndFees.kt | 98 +- .../RoomRatesTaxesAndFeesDetailsInner.kt | 77 +- .../sdk/xap/models/RoomRatesTotalPrice.kt | 98 +- .../models/RoomRatesTotalStrikeOutPrice.kt | 98 +- .../expediagroup/sdk/xap/models/RoomType.kt | 435 +- .../sdk/xap/models/RoomTypeAmenitiesInner.kt | 77 +- .../sdk/xap/models/RoomTypeLinks.kt | 94 +- .../sdk/xap/models/RoomTypeLinksApiDetails.kt | 100 +- .../sdk/xap/models/RoomTypeLinksWebDetails.kt | 100 +- .../sdk/xap/models/RoomTypeMediaInner.kt | 141 +- .../sdk/xap/models/RoomTypePrice.kt | 268 +- .../sdk/xap/models/RoomTypeStandalonePrice.kt | 249 +- .../expediagroup/sdk/xap/models/Savings.kt | 78 +- .../sdk/xap/models/SdpAPIMError.kt | 52 +- .../expediagroup/sdk/xap/models/SdpLink.kt | 75 +- .../expediagroup/sdk/xap/models/StayDates.kt | 75 +- .../expediagroup/sdk/xap/models/Supplier.kt | 127 +- .../sdk/xap/models/TaxesAndFees.kt | 78 +- .../sdk/xap/models/TaxesAndFeesDetail.kt | 73 +- .../com/expediagroup/sdk/xap/models/Ticket.kt | 145 +- .../expediagroup/sdk/xap/models/TimeRange.kt | 80 +- .../sdk/xap/models/TransmissionDrive.kt | 80 +- .../sdk/xap/models/ValidFormsOfPayment.kt | 121 +- .../sdk/xap/models/VehicleDetails.kt | 245 +- .../sdk/xap/models/VendorLocationDetails.kt | 143 +- .../sdk/xap/models/WaiverPolicy.kt | 54 +- .../expediagroup/sdk/xap/models/Warning.kt | 159 +- .../com/expediagroup/sdk/xap/models/When.kt | 107 +- .../operations/GetActivityDetailsOperation.kt | 94 +- .../GetActivityDetailsOperationParams.kt | 246 +- .../GetActivityListingsOperation.kt | 81 +- .../GetActivityListingsOperationParams.kt | 550 +-- .../xap/operations/GetCarDetailsOperation.kt | 94 +- .../GetCarDetailsOperationParams.kt | 370 +- .../operations/GetCarsListingsOperation.kt | 82 +- .../GetCarsListingsOperationParams.kt | 2006 ++++----- .../operations/GetFeedDownloadUrlOperation.kt | 76 +- .../GetFeedDownloadUrlOperationParams.kt | 532 +-- ...etLodgingAvailabilityCalendarsOperation.kt | 81 +- ...ingAvailabilityCalendarsOperationParams.kt | 220 +- .../operations/GetLodgingDetailsOperation.kt | 94 +- .../GetLodgingDetailsOperationParams.kt | 523 +-- .../operations/GetLodgingListingsOperation.kt | 81 +- .../GetLodgingListingsOperationParams.kt | 3776 +++++++---------- .../operations/GetLodgingQuotesOperation.kt | 81 +- .../GetLodgingQuotesOperationParams.kt | 772 ++-- .../GetLodgingRateCalendarOperation.kt | 81 +- .../GetLodgingRateCalendarOperationParams.kt | 515 +-- 222 files changed, 13338 insertions(+), 22103 deletions(-) diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index 4b18a11d2..9701c1483 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -64,11 +64,12 @@ publishing { from(components["java"]) artifactId = project.property("ARTIFACT_NAME").toString() groupId = project.property("GROUP_ID").toString() - version = if (project.hasProperty("SNAPSHOT_VERSION")) { - project.property("SNAPSHOT_VERSION").toString() - } else { - project.property("VERSION").toString() - } + version = + if (project.hasProperty("SNAPSHOT_VERSION")) { + project.property("SNAPSHOT_VERSION").toString() + } else { + project.property("VERSION").toString() + } description = project.findProperty("DESCRIPTION")?.toString() pom { diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt index c0eea61b5..448cd7044 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt @@ -14,7 +14,7 @@ import com.expediagroup.sdk.xap.core.AsyncRequestExecutor import java.util.concurrent.CompletableFuture class AsyncXapClient private constructor( - config: AsyncXapClientConfiguration + config: AsyncXapClientConfiguration, ) : AsyncRestClient() { private val apiEndpoint: ApiEndpoint = EndpointProvider.getXapApiEndpoint(config.environment) @@ -22,7 +22,7 @@ class AsyncXapClient private constructor( AsyncRestExecutor( mapper = XAP_OBJECT_MAPPER, serverUrl = apiEndpoint.endpoint, - requestExecutor = AsyncRequestExecutor(configuration = config) + requestExecutor = AsyncRequestExecutor(configuration = config), ) fun execute(operation: OperationNoResponseBodyTrait): CompletableFuture> = restExecutor.execute(operation) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt index ed6f42251..e4c9d83b4 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt @@ -14,7 +14,7 @@ import com.expediagroup.sdk.xap.configuration.XapClientConfiguration import com.expediagroup.sdk.xap.core.RequestExecutor class XapClient private constructor( - config: XapClientConfiguration + config: XapClientConfiguration, ) : RestClient() { private val apiEndpoint: ApiEndpoint = EndpointProvider.getXapApiEndpoint(config.environment) @@ -29,9 +29,9 @@ class XapClient private constructor( key = config.key, secret = config.secret, environment = ClientEnvironment.PROD, - transport = config.transport - ) - ) + transport = config.transport, + ), + ), ) fun execute(operation: OperationNoResponseBodyTrait): Response = restExecutor.execute(operation) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt index d83825abd..6c732d207 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt @@ -1,5 +1,5 @@ package com.expediagroup.sdk.xap.configuration data class ApiEndpoint( - val endpoint: String + val endpoint: String, ) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt index 17ca34f47..8b19ace85 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt @@ -1,5 +1,5 @@ package com.expediagroup.sdk.xap.configuration enum class ClientEnvironment { - PROD + PROD, } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt index 19ab69339..371bd8498 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt @@ -8,14 +8,14 @@ internal object EndpointProvider { return try { ApiEndpoint( - XapApiEndpoint.valueOf(env.name).url + XapApiEndpoint.valueOf(env.name).url, ) } catch (e: IllegalArgumentException) { throw ExpediaGroupConfigurationException( """ Unsupported environment [$environment] for Supply API. Supported environments are [${XapApiEndpoint.entries.joinToString(", ")}] - """ + """, ) } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt index 038a889dc..b26a35c0a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt @@ -1,7 +1,7 @@ package com.expediagroup.sdk.xap.configuration enum class XapApiEndpoint( - val url: String + val url: String, ) { - PROD("https://apim.expedia.com") + PROD("https://apim.expedia.com"), } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt index 7252df743..17a98ff5a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt @@ -9,14 +9,14 @@ data class XapClientConfiguration( val key: String, val secret: String, val environment: ClientEnvironment? = null, - val transport: Transport? = null + val transport: Transport? = null, ) data class AsyncXapClientConfiguration( val key: String, val secret: String, val environment: ClientEnvironment? = null, - val asyncTransport: AsyncTransport? = null + val asyncTransport: AsyncTransport? = null, ) abstract class ClientBuilder { @@ -48,7 +48,7 @@ abstract class ClientBuilder { key = key!!, secret = secret!!, environment = environment, - transport = transport + transport = transport, ) } } @@ -82,7 +82,7 @@ abstract class AsyncClientBuilder { key = key!!, secret = secret!!, environment = environment, - asyncTransport = asyncTransport + asyncTransport = asyncTransport, ) } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt index cdb0717d0..e7d30fa9b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt @@ -4,10 +4,11 @@ import com.expediagroup.sdk.core.http.Request import com.expediagroup.sdk.core.pipeline.RequestPipelineStep class ApiKeyHeaderStep( - private val apiKey: String + private val apiKey: String, ) : RequestPipelineStep { override fun invoke(request: Request): Request = - request.newBuilder() + request + .newBuilder() .addHeader("key", apiKey) .build() } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt index 3bd6651db..e9541d93e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt @@ -13,11 +13,11 @@ import com.expediagroup.sdk.xap.configuration.AsyncXapClientConfiguration import org.slf4j.LoggerFactory class AsyncRequestExecutor( - configuration: AsyncXapClientConfiguration + configuration: AsyncXapClientConfiguration, ) : AbstractAsyncRequestExecutor(configuration.asyncTransport) { private val authManager = BasicAuthenticationManager( - credentials = Credentials(configuration.key, configuration.secret) + credentials = Credentials(configuration.key, configuration.secret), ) override val executionPipeline = @@ -26,12 +26,12 @@ class AsyncRequestExecutor( listOf( RequestHeadersStep(), BasicAuthenticationStep(authManager), - RequestLoggingStep(logger) + RequestLoggingStep(logger), ), responsePipeline = listOf( - ResponseLoggingStep(logger) - ) + ResponseLoggingStep(logger), + ), ) companion object { diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt index 7656813f3..600008909 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt @@ -13,11 +13,11 @@ import com.expediagroup.sdk.xap.configuration.XapClientConfiguration import org.slf4j.LoggerFactory class RequestExecutor( - configuration: XapClientConfiguration + configuration: XapClientConfiguration, ) : AbstractRequestExecutor(configuration.transport) { private val authManager = BasicAuthenticationManager( - credentials = Credentials(configuration.key, configuration.secret) + credentials = Credentials(configuration.key, configuration.secret), ) override val executionPipeline = @@ -27,12 +27,12 @@ class RequestExecutor( RequestHeadersStep(), ApiKeyHeaderStep(configuration.key), BasicAuthenticationStep(authManager), - RequestLoggingStep(logger) + RequestLoggingStep(logger), ), responsePipeline = listOf( - ResponseLoggingStep(logger) - ) + ResponseLoggingStep(logger), + ), ) companion object { diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt index 920c0a576..b630c862a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt @@ -15,51 +15,41 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param message +* + * @param message */ data class APIGatewayError( - @JsonProperty("message") -val message: kotlin.String? = null + @JsonProperty("message") + val message: kotlin.String? = null, ) { - - - init { - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var message: kotlin.String? = null - ) { - fun message(message: kotlin.String?) = apply { this.message = message } + class Builder( + private var message: kotlin.String? = null, + ) { + fun message(message: kotlin.String?) = apply { this.message = message } - fun build(): APIGatewayError { - val instance = APIGatewayError( - message = message - ) + fun build(): APIGatewayError { + val instance = + APIGatewayError( + message = message, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( - message = message - ) + fun toBuilder() = + Builder( + message = message, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt index 6780847ab..3892da8ce 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt @@ -15,51 +15,41 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param message +* + * @param message */ data class APIMError( - @JsonProperty("message") -val message: kotlin.String? = null + @JsonProperty("message") + val message: kotlin.String? = null, ) { - - - init { - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var message: kotlin.String? = null - ) { - fun message(message: kotlin.String?) = apply { this.message = message } + class Builder( + private var message: kotlin.String? = null, + ) { + fun message(message: kotlin.String?) = apply { this.message = message } - fun build(): APIMError { - val instance = APIMError( - message = message - ) + fun build(): APIMError { + val instance = + APIMError( + message = message, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( - message = message - ) + fun toBuilder() = + Builder( + message = message, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt index 6ce6f9299..388d70e35 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt @@ -15,148 +15,96 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * 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. + * @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") -val address1: kotlin.String? = null, - - /* Apartment, Floor, Suite, Bldg */ -@JsonProperty("Address2") -val address2: kotlin.String? = null, - - /* Suite/apartment number */ -@JsonProperty("Suite") -val suite: kotlin.String? = null, - - /* The city */ -@JsonProperty("City") -val city: kotlin.String? = null, - - /* The state or province. */ -@JsonProperty("Province") -val province: kotlin.String? = null, - - /* 3-letter code for the country. */ -@JsonProperty("Country") -val country: kotlin.String? = null, - - /* Zip/postal code. */ -@JsonProperty("PostalCode") -val postalCode: kotlin.String? = null + // Street Number, Street Name, or PO Box. + @JsonProperty("Address1") + val address1: kotlin.String? = null, + // Apartment, Floor, Suite, Bldg + @JsonProperty("Address2") + val address2: kotlin.String? = null, + // Suite/apartment number + @JsonProperty("Suite") + val suite: kotlin.String? = null, + // The city + @JsonProperty("City") + val city: kotlin.String? = null, + // The state or province. + @JsonProperty("Province") + val province: kotlin.String? = null, + // 3-letter code for the country. + @JsonProperty("Country") + val country: kotlin.String? = null, + // Zip/postal code. + @JsonProperty("PostalCode") + val postalCode: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + 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 } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun country(country: kotlin.String?) = apply { this.country = country } - 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 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 - ) + fun build(): ActivitiesAddress { + val instance = + ActivitiesAddress( + address1 = address1, + address2 = address2, + suite = suite, + city = city, + province = province, + country = country, + postalCode = postalCode, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( address1 = address1, address2 = address2, suite = suite, city = city, province = province, country = country, - postalCode = postalCode - ) + postalCode = postalCode, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt index 57eb51f81..6871c127b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt @@ -15,103 +15,70 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for the Cancellation Policy information. - * @param freeCancellation Indicates whether the activity can be canceled free of charge within the cancellation window or not. - * @param cancelPolicyDescription The description of Cancellation Policy. - * @param freeCancellationMinHours The minimum number of hours before activity when the activity can still be cancelled for free. - * @param freeCancellationEndDateTime The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. + * @param freeCancellation Indicates whether the activity can be canceled free of charge within the cancellation window or not. + * @param cancelPolicyDescription The description of Cancellation Policy. + * @param freeCancellationMinHours The minimum number of hours before activity when the activity can still be cancelled for free. + * @param freeCancellationEndDateTime The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. */ data class ActivitiesCancellationPolicy( - /* Indicates whether the activity can be canceled free of charge within the cancellation window or not. */ -@JsonProperty("FreeCancellation") -val freeCancellation: - kotlin.Boolean -, - - /* The description of Cancellation Policy. */ -@JsonProperty("CancelPolicyDescription") -val cancelPolicyDescription: kotlin.String? = null, - - /* The minimum number of hours before activity when the activity can still be cancelled for free. */ -@JsonProperty("FreeCancellationMinHours") -val freeCancellationMinHours: kotlin.Int? = null, - - /* The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. */ -@JsonProperty("FreeCancellationEndDateTime") -val freeCancellationEndDateTime: java.time.LocalDateTime? = null + // Indicates whether the activity can be canceled free of charge within the cancellation window or not. + @JsonProperty("FreeCancellation") + val freeCancellation: kotlin.Boolean, + // The description of Cancellation Policy. + @JsonProperty("CancelPolicyDescription") + val cancelPolicyDescription: kotlin.String? = null, + // The minimum number of hours before activity when the activity can still be cancelled for free. + @JsonProperty("FreeCancellationMinHours") + val freeCancellationMinHours: kotlin.Int? = null, + // The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. + @JsonProperty("FreeCancellationEndDateTime") + val freeCancellationEndDateTime: java.time.LocalDateTime? = null, ) { - - - init { - require(freeCancellation != null) { "freeCancellation must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + require(freeCancellation != null) { "freeCancellation must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var freeCancellation: kotlin.Boolean? = null, - private var cancelPolicyDescription: kotlin.String? = null, - private var freeCancellationMinHours: kotlin.Int? = null, - private var freeCancellationEndDateTime: java.time.LocalDateTime? = null - ) { - fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } - fun cancelPolicyDescription(cancelPolicyDescription: kotlin.String?) = apply { this.cancelPolicyDescription = cancelPolicyDescription } - fun freeCancellationMinHours(freeCancellationMinHours: kotlin.Int?) = apply { this.freeCancellationMinHours = freeCancellationMinHours } - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + class Builder( + private var freeCancellation: kotlin.Boolean? = null, + private var cancelPolicyDescription: kotlin.String? = null, + private var freeCancellationMinHours: kotlin.Int? = null, + private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, + ) { + fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } - fun build(): ActivitiesCancellationPolicy { - val instance = ActivitiesCancellationPolicy( - freeCancellation = freeCancellation!!, - cancelPolicyDescription = cancelPolicyDescription, - freeCancellationMinHours = freeCancellationMinHours, - freeCancellationEndDateTime = freeCancellationEndDateTime - ) + fun cancelPolicyDescription(cancelPolicyDescription: kotlin.String?) = apply { this.cancelPolicyDescription = cancelPolicyDescription } - return instance - } + fun freeCancellationMinHours(freeCancellationMinHours: kotlin.Int?) = apply { this.freeCancellationMinHours = freeCancellationMinHours } + + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + + fun build(): ActivitiesCancellationPolicy { + val instance = + ActivitiesCancellationPolicy( + freeCancellation = freeCancellation!!, + cancelPolicyDescription = cancelPolicyDescription, + freeCancellationMinHours = freeCancellationMinHours, + freeCancellationEndDateTime = freeCancellationEndDateTime, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( freeCancellation = freeCancellation!!, cancelPolicyDescription = cancelPolicyDescription, freeCancellationMinHours = freeCancellationMinHours, - freeCancellationEndDateTime = freeCancellationEndDateTime - ) + freeCancellationEndDateTime = freeCancellationEndDateTime, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt index 236e4816b..a06a0a08b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCountry.kt @@ -15,109 +15,74 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for disambiguation country information - * @param name country name - * @param isoCode2 2-letter code for the country - * @param isoCode3 3-letter code for the country - * @param code 3-letter code for the country + * @param name country name + * @param isoCode2 2-letter code for the country + * @param isoCode3 3-letter code for the country + * @param code 3-letter code for the country */ data class ActivitiesCountry( - /* country name */ -@JsonProperty("Name") -val name: - kotlin.String -, - - /* 2-letter code for the country */ -@JsonProperty("IsoCode2") -val isoCode2: - kotlin.String -, - - /* 3-letter code for the country */ -@JsonProperty("IsoCode3") -val isoCode3: - kotlin.String -, - - /* 3-letter code for the country */ -@JsonProperty("Code") -val code: kotlin.String? = null + // country name + @JsonProperty("Name") + val name: kotlin.String, + // 2-letter code for the country + @JsonProperty("IsoCode2") + val isoCode2: kotlin.String, + // 3-letter code for the country + @JsonProperty("IsoCode3") + val isoCode3: kotlin.String, + // 3-letter code for the country + @JsonProperty("Code") + val code: kotlin.String? = null, ) { - - - init { - require(name != null) { "name must not be null" } - - - - - - + require(name != null) { "name must not be null" } require(isoCode2 != null) { "isoCode2 must not be null" } - - - - - - require(isoCode3 != null) { "isoCode3 must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var isoCode2: kotlin.String? = null, - private var isoCode3: kotlin.String? = null, - private var code: kotlin.String? = null - ) { - fun name(name: kotlin.String) = apply { this.name = name } - fun isoCode2(isoCode2: kotlin.String) = apply { this.isoCode2 = isoCode2 } - fun isoCode3(isoCode3: kotlin.String) = apply { this.isoCode3 = isoCode3 } - fun code(code: kotlin.String?) = apply { this.code = code } + class Builder( + private var name: kotlin.String? = null, + private var isoCode2: kotlin.String? = null, + private var isoCode3: kotlin.String? = null, + private var code: kotlin.String? = null, + ) { + fun name(name: kotlin.String) = apply { this.name = name } - fun build(): ActivitiesCountry { - val instance = ActivitiesCountry( - name = name!!, - isoCode2 = isoCode2!!, - isoCode3 = isoCode3!!, - code = code - ) + fun isoCode2(isoCode2: kotlin.String) = apply { this.isoCode2 = isoCode2 } - return instance - } + fun isoCode3(isoCode3: kotlin.String) = apply { this.isoCode3 = isoCode3 } + + fun code(code: kotlin.String?) = apply { this.code = code } + + fun build(): ActivitiesCountry { + val instance = + ActivitiesCountry( + name = name!!, + isoCode2 = isoCode2!!, + isoCode3 = isoCode3!!, + code = code, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( name = name!!, isoCode2 = isoCode2!!, isoCode3 = isoCode3!!, - code = code - ) + code = code, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt index 904d6ff7f..057077a20 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesError.kt @@ -16,122 +16,81 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesLocationOption - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for error list. - * @param code Error code describing the issue - * @param description A simple description of what the error is. - * @param detailCode Detailed error code describing the issue. - * @param locationKeyword The requested location that caused the error. - * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. + * @param code Error code describing the issue + * @param description A simple description of what the error is. + * @param detailCode Detailed error code describing the issue. + * @param locationKeyword The requested location that caused the error. + * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. */ data class ActivitiesError( - /* Error code describing the issue */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* A simple description of what the error is. */ -@JsonProperty("Description") -val description: - kotlin.String -, - - /* Detailed error code describing the issue. */ -@JsonProperty("DetailCode") -val detailCode: kotlin.String? = null, - - /* The requested location that caused the error. */ -@JsonProperty("LocationKeyword") -val locationKeyword: kotlin.String? = null, - - /* List for possible locations from which the customer must choose the best one to be re-submitted in the request. */ -@JsonProperty("LocationOptions") -val locationOptions: kotlin.collections.List? = null + // Error code describing the issue + @JsonProperty("Code") + val code: kotlin.String, + // A simple description of what the error is. + @JsonProperty("Description") + val description: kotlin.String, + // Detailed error code describing the issue. + @JsonProperty("DetailCode") + val detailCode: kotlin.String? = null, + // The requested location that caused the error. + @JsonProperty("LocationKeyword") + val locationKeyword: kotlin.String? = null, + // List for possible locations from which the customer must choose the best one to be re-submitted in the request. + @JsonProperty("LocationOptions") + val locationOptions: kotlin.collections.List? = null, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(description != null) { "description must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var detailCode: kotlin.String? = null, + private var locationKeyword: kotlin.String? = null, + private var locationOptions: kotlin.collections.List? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun description(description: kotlin.String) = apply { this.description = description } + fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } + fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } + fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } + fun build(): ActivitiesError { + val instance = + ActivitiesError( + code = code!!, + description = description!!, + detailCode = detailCode, + locationKeyword = locationKeyword, + locationOptions = locationOptions, + ) - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var detailCode: kotlin.String? = null, - private var locationKeyword: kotlin.String? = null, - private var locationOptions: kotlin.collections.List? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun description(description: kotlin.String) = apply { this.description = description } - fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } - fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } - fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } - - fun build(): ActivitiesError { - val instance = ActivitiesError( - code = code!!, - description = description!!, - detailCode = detailCode, - locationKeyword = locationKeyword, - locationOptions = locationOptions - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, description = description!!, detailCode = detailCode, locationKeyword = locationKeyword, - locationOptions = locationOptions - ) + locationOptions = locationOptions, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt index 293d429c2..5a91094f5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesErrors.kt @@ -16,79 +16,57 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesError - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class ActivitiesErrors( - /* Container for error list. */ -@JsonProperty("Errors") -val errors: - kotlin.collections. - List -< - ActivitiesError -> - -, - - /* A unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: - kotlin.String - + // Container for error list. + @JsonProperty("Errors") + val errors: kotlin.collections + .List< + ActivitiesError, + >, + // A unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String, ) { - - - init { - require(errors != null) { "errors must not be null" } - - - - - - + require(errors != null) { "errors must not be null" } require(transactionId != null) { "transactionId must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + ) { + fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - fun build(): ActivitiesErrors { - val instance = ActivitiesErrors( - errors = errors!!, - transactionId = transactionId!! - ) + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - return instance - } + fun build(): ActivitiesErrors { + val instance = + ActivitiesErrors( + errors = errors!!, + transactionId = transactionId!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( errors = errors!!, - transactionId = transactionId!! - ) + transactionId = transactionId!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt index 59530789c..66a7ed867 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesGeoLocation.kt @@ -15,89 +15,62 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Geographic information - * @param latitude Latitude of the location. - * @param longitude Longitude of the location. - * @param obfuscated + * @param latitude Latitude of the location. + * @param longitude Longitude of the location. + * @param obfuscated */ data class ActivitiesGeoLocation( - /* Latitude of the location. */ -@JsonProperty("Latitude") -val latitude: - kotlin.String -, - - /* Longitude of the location. */ -@JsonProperty("Longitude") -val longitude: - kotlin.String -, - - @JsonProperty("Obfuscated") -val obfuscated: kotlin.Boolean? = null + // Latitude of the location. + @JsonProperty("Latitude") + val latitude: kotlin.String, + // Longitude of the location. + @JsonProperty("Longitude") + val longitude: kotlin.String, + @JsonProperty("Obfuscated") + val obfuscated: kotlin.Boolean? = null, ) { - - - init { - require(latitude != null) { "latitude must not be null" } - - - - - - + require(latitude != null) { "latitude must not be null" } require(longitude != null) { "longitude must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String) = apply { this.latitude = latitude } - fun longitude(longitude: kotlin.String) = apply { this.longitude = longitude } - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + class Builder( + private var latitude: kotlin.String? = null, + private var longitude: kotlin.String? = null, + private var obfuscated: kotlin.Boolean? = null, + ) { + fun latitude(latitude: kotlin.String) = apply { this.latitude = latitude } - fun build(): ActivitiesGeoLocation { - val instance = ActivitiesGeoLocation( - latitude = latitude!!, - longitude = longitude!!, - obfuscated = obfuscated - ) + fun longitude(longitude: kotlin.String) = apply { this.longitude = longitude } - return instance - } + fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + + fun build(): ActivitiesGeoLocation { + val instance = + ActivitiesGeoLocation( + latitude = latitude!!, + longitude = longitude!!, + obfuscated = obfuscated, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( latitude = latitude!!, longitude = longitude!!, - obfuscated = obfuscated - ) + obfuscated = obfuscated, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt index 9cd6a7471..46d50af49 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLink.kt @@ -15,87 +15,61 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container of HATEOAS URL's - * @param href HATEOAS URL to fetch details. - * @param accept Accept header. - * @param method HTTP method to connect. + * @param href HATEOAS URL to fetch details. + * @param accept Accept header. + * @param method HTTP method to connect. */ data class ActivitiesLink( - /* HATEOAS URL to fetch details. */ -@JsonProperty("Href") -val href: - kotlin.String -, - - /* Accept header. */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* HTTP method to connect. */ -@JsonProperty("Method") -val method: kotlin.String? = null + // HATEOAS URL to fetch details. + @JsonProperty("Href") + val href: kotlin.String, + // Accept header. + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // HTTP method to connect. + @JsonProperty("Method") + val method: kotlin.String? = null, ) { - - - init { - require(href != null) { "href must not be null" } - - - - - - - - - - - - - - - - - - - - - - + require(href != null) { "href must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var href: kotlin.String? = null, - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null - ) { - fun href(href: kotlin.String) = apply { this.href = href } - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } + class Builder( + private var href: kotlin.String? = null, + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + ) { + fun href(href: kotlin.String) = apply { this.href = href } - fun build(): ActivitiesLink { - val instance = ActivitiesLink( - href = href!!, - accept = accept, - method = method - ) + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - return instance - } + fun method(method: kotlin.String?) = apply { this.method = method } + + fun build(): ActivitiesLink { + val instance = + ActivitiesLink( + href = href!!, + accept = accept, + method = method, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( href = href!!, accept = accept, - method = method - ) + method = method, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt index 87cd7ba62..a70802764 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocation.kt @@ -19,197 +19,117 @@ import com.expediagroup.sdk.xap.models.ActivitiesAddress import com.expediagroup.sdk.xap.models.ActivitiesCountry import com.expediagroup.sdk.xap.models.ActivitiesGeoLocation import com.expediagroup.sdk.xap.models.ActivitiesNeighborhood - import com.fasterxml.jackson.annotation.JsonProperty /** * List of location(s) where the activity will happen. - * @param type The type of location code (MULTICITY | METROCODE). - * @param id Expedia Region ID of the specified airport. - * @param name Location Name - * @param code Location Code - * @param locationId Location id. - * @param address - * @param pointOfInterest - * @param geoLocation - * @param neighborhood - * @param regionId RegionId the location resides in. - * @param country + * @param type The type of location code (MULTICITY | METROCODE). + * @param id Expedia Region ID of the specified airport. + * @param name Location Name + * @param code Location Code + * @param locationId Location id. + * @param address + * @param pointOfInterest + * @param geoLocation + * @param neighborhood + * @param regionId RegionId the location resides in. + * @param country */ data class ActivitiesLocation( - /* The type of location code (MULTICITY | METROCODE). */ -@JsonProperty("Type") -val type: kotlin.String? = null, - - /* Expedia Region ID of the specified airport. */ -@JsonProperty("Id") -val id: kotlin.String? = null, - - /* Location Name */ -@JsonProperty("Name") -val name: kotlin.String? = null, - - /* Location Code */ -@JsonProperty("Code") -val code: kotlin.String? = null, - - /* Location id. */ -@JsonProperty("LocationId") -val locationId: kotlin.String? = null, - - @JsonProperty("Address") -val address: ActivitiesAddress? = null, - - @JsonProperty("PointOfInterest") -val pointOfInterest: kotlin.String? = null, - - @JsonProperty("GeoLocation") -val geoLocation: ActivitiesGeoLocation? = null, - - @JsonProperty("Neighborhood") -val neighborhood: ActivitiesNeighborhood? = null, - - /* RegionId the location resides in. */ -@JsonProperty("RegionId") -val regionId: kotlin.Long? = null, - - @JsonProperty("Country") -val country: ActivitiesCountry? = null + // The type of location code (MULTICITY | METROCODE). + @JsonProperty("Type") + val type: kotlin.String? = null, + // Expedia Region ID of the specified airport. + @JsonProperty("Id") + val id: kotlin.String? = null, + // Location Name + @JsonProperty("Name") + val name: kotlin.String? = null, + // Location Code + @JsonProperty("Code") + val code: kotlin.String? = null, + // Location id. + @JsonProperty("LocationId") + val locationId: kotlin.String? = null, + @JsonProperty("Address") + val address: ActivitiesAddress? = null, + @JsonProperty("PointOfInterest") + val pointOfInterest: kotlin.String? = null, + @JsonProperty("GeoLocation") + val geoLocation: ActivitiesGeoLocation? = null, + @JsonProperty("Neighborhood") + val neighborhood: ActivitiesNeighborhood? = null, + // RegionId the location resides in. + @JsonProperty("RegionId") + val regionId: kotlin.Long? = null, + @JsonProperty("Country") + val country: ActivitiesCountry? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var type: kotlin.String? = null, + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + private var code: kotlin.String? = null, + private var locationId: kotlin.String? = null, + private var address: ActivitiesAddress? = null, + private var pointOfInterest: kotlin.String? = null, + private var geoLocation: ActivitiesGeoLocation? = null, + private var neighborhood: ActivitiesNeighborhood? = null, + private var regionId: kotlin.Long? = null, + private var country: ActivitiesCountry? = null, + ) { + fun type(type: kotlin.String?) = apply { this.type = type } + fun id(id: kotlin.String?) = apply { this.id = id } + fun name(name: kotlin.String?) = apply { this.name = name } + fun code(code: kotlin.String?) = apply { this.code = code } + fun locationId(locationId: kotlin.String?) = apply { this.locationId = locationId } + fun address(address: ActivitiesAddress?) = apply { this.address = address } + fun pointOfInterest(pointOfInterest: kotlin.String?) = apply { this.pointOfInterest = pointOfInterest } + fun geoLocation(geoLocation: ActivitiesGeoLocation?) = apply { this.geoLocation = geoLocation } + fun neighborhood(neighborhood: ActivitiesNeighborhood?) = apply { this.neighborhood = neighborhood } - } + fun regionId(regionId: kotlin.Long?) = apply { this.regionId = regionId } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun country(country: ActivitiesCountry?) = apply { this.country = country } - class Builder( - private var type: kotlin.String? = null, - private var id: kotlin.String? = null, - private var name: kotlin.String? = null, - private var code: kotlin.String? = null, - private var locationId: kotlin.String? = null, - private var address: ActivitiesAddress? = null, - private var pointOfInterest: kotlin.String? = null, - private var geoLocation: ActivitiesGeoLocation? = null, - private var neighborhood: ActivitiesNeighborhood? = null, - private var regionId: kotlin.Long? = null, - private var country: ActivitiesCountry? = null - ) { - fun type(type: kotlin.String?) = apply { this.type = type } - fun id(id: kotlin.String?) = apply { this.id = id } - fun name(name: kotlin.String?) = apply { this.name = name } - fun code(code: kotlin.String?) = apply { this.code = code } - fun locationId(locationId: kotlin.String?) = apply { this.locationId = locationId } - fun address(address: ActivitiesAddress?) = apply { this.address = address } - fun pointOfInterest(pointOfInterest: kotlin.String?) = apply { this.pointOfInterest = pointOfInterest } - fun geoLocation(geoLocation: ActivitiesGeoLocation?) = apply { this.geoLocation = geoLocation } - fun neighborhood(neighborhood: ActivitiesNeighborhood?) = apply { this.neighborhood = neighborhood } - fun regionId(regionId: kotlin.Long?) = apply { this.regionId = regionId } - fun country(country: ActivitiesCountry?) = apply { this.country = country } - - fun build(): ActivitiesLocation { - val instance = ActivitiesLocation( - type = type, - id = id, - name = name, - code = code, - locationId = locationId, - address = address, - pointOfInterest = pointOfInterest, - geoLocation = geoLocation, - neighborhood = neighborhood, - regionId = regionId, - country = country - ) + fun build(): ActivitiesLocation { + val instance = + ActivitiesLocation( + type = type, + id = id, + name = name, + code = code, + locationId = locationId, + address = address, + pointOfInterest = pointOfInterest, + geoLocation = geoLocation, + neighborhood = neighborhood, + regionId = regionId, + country = country, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type, id = id, name = name, @@ -220,6 +140,6 @@ val country: ActivitiesCountry? = null geoLocation = geoLocation, neighborhood = neighborhood, regionId = regionId, - country = country - ) + country = country, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt index 846702107..b3783b542 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesLocationOption.kt @@ -18,181 +18,110 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesCountry import com.expediagroup.sdk.xap.models.ActivitiesGeoLocation import com.expediagroup.sdk.xap.models.ActivitiesLocation - import com.fasterxml.jackson.annotation.JsonProperty /** -* List for possible locations from which the customer must choose the best one to be re-submitted in the request. - * @param requestedLocation Location used in partner request. - * @param locations Container for list of possible locations that could be used to disambiguate the query. - * @param type Type of the location. - * @param regionId RegionId the location resides in. - * @param shortName The name of the location which matches the location keyword. - * @param airportCode Indicates the nearest major airport to the location. - * @param address The address of the location. - * @param country - * @param geoLocation +* List for possible locations from which the customer must choose the best one to be re-submitted in the request. + * @param requestedLocation Location used in partner request. + * @param locations Container for list of possible locations that could be used to disambiguate the query. + * @param type Type of the location. + * @param regionId RegionId the location resides in. + * @param shortName The name of the location which matches the location keyword. + * @param airportCode Indicates the nearest major airport to the location. + * @param address The address of the location. + * @param country + * @param geoLocation */ data class ActivitiesLocationOption( - /* Location used in partner request. */ -@JsonProperty("RequestedLocation") -val requestedLocation: - kotlin.String -, - - /* Container for list of possible locations that could be used to disambiguate the query. */ -@JsonProperty("Locations") -val locations: - kotlin.collections. - List -< - ActivitiesLocation -> - -, - - /* Type of the location. */ -@JsonProperty("Type") -val type: kotlin.String? = null, - - /* RegionId the location resides in. */ -@JsonProperty("RegionId") -val regionId: kotlin.String? = null, - - /* The name of the location which matches the location keyword. */ -@JsonProperty("ShortName") -val shortName: kotlin.String? = null, - - /* Indicates the nearest major airport to the location. */ -@JsonProperty("AirportCode") -val airportCode: kotlin.String? = null, - - /* The address of the location. */ -@JsonProperty("Address") -val address: kotlin.String? = null, - - @JsonProperty("Country") -val country: ActivitiesCountry? = null, - - @JsonProperty("GeoLocation") -val geoLocation: ActivitiesGeoLocation? = null + // Location used in partner request. + @JsonProperty("RequestedLocation") + val requestedLocation: kotlin.String, + // Container for list of possible locations that could be used to disambiguate the query. + @JsonProperty("Locations") + val locations: kotlin.collections + .List< + ActivitiesLocation, + >, + // Type of the location. + @JsonProperty("Type") + val type: kotlin.String? = null, + // RegionId the location resides in. + @JsonProperty("RegionId") + val regionId: kotlin.String? = null, + // The name of the location which matches the location keyword. + @JsonProperty("ShortName") + val shortName: kotlin.String? = null, + // Indicates the nearest major airport to the location. + @JsonProperty("AirportCode") + val airportCode: kotlin.String? = null, + // The address of the location. + @JsonProperty("Address") + val address: kotlin.String? = null, + @JsonProperty("Country") + val country: ActivitiesCountry? = null, + @JsonProperty("GeoLocation") + val geoLocation: ActivitiesGeoLocation? = null, ) { - - - init { - require(requestedLocation != null) { "requestedLocation must not be null" } - - - - - - + require(requestedLocation != null) { "requestedLocation must not be null" } require(locations != null) { "locations must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var requestedLocation: kotlin.String? = null, + private var locations: kotlin.collections.List? = null, + private var type: kotlin.String? = null, + private var regionId: kotlin.String? = null, + private var shortName: kotlin.String? = null, + private var airportCode: kotlin.String? = null, + private var address: kotlin.String? = null, + private var country: ActivitiesCountry? = null, + private var geoLocation: ActivitiesGeoLocation? = null, + ) { + fun requestedLocation(requestedLocation: kotlin.String) = apply { this.requestedLocation = requestedLocation } + fun locations(locations: kotlin.collections.List) = apply { this.locations = locations } + fun type(type: kotlin.String?) = apply { this.type = type } + fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } + fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } + fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } + fun address(address: kotlin.String?) = apply { this.address = address } + fun country(country: ActivitiesCountry?) = apply { this.country = country } + fun geoLocation(geoLocation: ActivitiesGeoLocation?) = apply { this.geoLocation = geoLocation } + fun build(): ActivitiesLocationOption { + val instance = + ActivitiesLocationOption( + requestedLocation = requestedLocation!!, + locations = locations!!, + type = type, + regionId = regionId, + shortName = shortName, + airportCode = airportCode, + address = address, + country = country, + geoLocation = geoLocation, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var requestedLocation: kotlin.String? = null, - private var locations: kotlin.collections.List? = null, - private var type: kotlin.String? = null, - private var regionId: kotlin.String? = null, - private var shortName: kotlin.String? = null, - private var airportCode: kotlin.String? = null, - private var address: kotlin.String? = null, - private var country: ActivitiesCountry? = null, - private var geoLocation: ActivitiesGeoLocation? = null - ) { - fun requestedLocation(requestedLocation: kotlin.String) = apply { this.requestedLocation = requestedLocation } - fun locations(locations: kotlin.collections.List) = apply { this.locations = locations } - fun type(type: kotlin.String?) = apply { this.type = type } - fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } - fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } - fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } - fun address(address: kotlin.String?) = apply { this.address = address } - fun country(country: ActivitiesCountry?) = apply { this.country = country } - fun geoLocation(geoLocation: ActivitiesGeoLocation?) = apply { this.geoLocation = geoLocation } - - fun build(): ActivitiesLocationOption { - val instance = ActivitiesLocationOption( - requestedLocation = requestedLocation!!, - locations = locations!!, - type = type, - regionId = regionId, - shortName = shortName, - airportCode = airportCode, - address = address, - country = country, - geoLocation = geoLocation - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( requestedLocation = requestedLocation!!, locations = locations!!, type = type, @@ -201,6 +130,6 @@ val geoLocation: ActivitiesGeoLocation? = null airportCode = airportCode, address = address, country = country, - geoLocation = geoLocation - ) + geoLocation = geoLocation, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt index 23128af0d..3e8ca71b1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMedia.kt @@ -15,109 +15,74 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * List of activity Media. - * @param type type of the media. So far there is only one option: 1: Image - * @param propertySize Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. - * @param url Image URL - * @param title Image title + * @param type type of the media. So far there is only one option: 1: Image + * @param propertySize Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. + * @param url Image URL + * @param title Image title */ data class ActivitiesMedia( - /* type of the media. So far there is only one option: 1: Image */ -@JsonProperty("Type") -val type: - kotlin.String -, - - /* Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. */ -@JsonProperty("Size") -val propertySize: - kotlin.String -, - - /* Image URL */ -@JsonProperty("Url") -val url: - kotlin.String -, - - /* Image title */ -@JsonProperty("Title") -val title: kotlin.String? = null + // type of the media. So far there is only one option: 1: Image + @JsonProperty("Type") + val type: kotlin.String, + // Image size You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. + @JsonProperty("Size") + val propertySize: kotlin.String, + // Image URL + @JsonProperty("Url") + val url: kotlin.String, + // Image title + @JsonProperty("Title") + val title: kotlin.String? = null, ) { - - - init { - require(type != null) { "type must not be null" } - - - - - - + require(type != null) { "type must not be null" } require(propertySize != null) { "propertySize must not be null" } - - - - - - require(url != null) { "url must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var propertySize: kotlin.String? = null, - private var url: kotlin.String? = null, - private var title: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - fun propertySize(propertySize: kotlin.String) = apply { this.propertySize = propertySize } - fun url(url: kotlin.String) = apply { this.url = url } - fun title(title: kotlin.String?) = apply { this.title = title } + class Builder( + private var type: kotlin.String? = null, + private var propertySize: kotlin.String? = null, + private var url: kotlin.String? = null, + private var title: kotlin.String? = null, + ) { + fun type(type: kotlin.String) = apply { this.type = type } - fun build(): ActivitiesMedia { - val instance = ActivitiesMedia( - type = type!!, - propertySize = propertySize!!, - url = url!!, - title = title - ) + fun propertySize(propertySize: kotlin.String) = apply { this.propertySize = propertySize } - return instance - } + fun url(url: kotlin.String) = apply { this.url = url } + + fun title(title: kotlin.String?) = apply { this.title = title } + + fun build(): ActivitiesMedia { + val instance = + ActivitiesMedia( + type = type!!, + propertySize = propertySize!!, + url = url!!, + title = title, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type!!, propertySize = propertySize!!, url = url!!, - title = title - ) + title = title, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt index af756daba..d612641a1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesMoney.kt @@ -15,89 +15,62 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for the discount amount. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class ActivitiesMoney( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: - kotlin.String -, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: - kotlin.String -, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: ActivitiesMoney? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: ActivitiesMoney? = null, ) { - - - init { - require(`value` != null) { "`value` must not be null" } - - - - - - + require(`value` != null) { "`value` must not be null" } require(currency != null) { "currency must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: ActivitiesMoney? = null - ) { - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: ActivitiesMoney?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: ActivitiesMoney? = null, + ) { + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - fun build(): ActivitiesMoney { - val instance = ActivitiesMoney( - `value` = `value`!!, - currency = currency!!, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: ActivitiesMoney?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): ActivitiesMoney { + val instance = + ActivitiesMoney( + `value` = `value`!!, + currency = currency!!, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`!!, currency = currency!!, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt index 52b2c4ba9..a6fefde69 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesNeighborhood.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. - * @param id Neighborhood id. - * @param name Neighborhood name. + * @param id Neighborhood id. + * @param name Neighborhood name. */ data class ActivitiesNeighborhood( - /* Neighborhood id. */ -@JsonProperty("Id") -val id: - kotlin.String -, - - /* Neighborhood name. */ -@JsonProperty("Name") -val name: - kotlin.String - + // Neighborhood id. + @JsonProperty("Id") + val id: kotlin.String, + // Neighborhood name. + @JsonProperty("Name") + val name: kotlin.String, ) { - - - init { - require(id != null) { "id must not be null" } - - - - - - + require(id != null) { "id must not be null" } require(name != null) { "name must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.String) = apply { this.id = id } - fun name(name: kotlin.String) = apply { this.name = name } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + ) { + fun id(id: kotlin.String) = apply { this.id = id } - fun build(): ActivitiesNeighborhood { - val instance = ActivitiesNeighborhood( - id = id!!, - name = name!! - ) + fun name(name: kotlin.String) = apply { this.name = name } - return instance - } + fun build(): ActivitiesNeighborhood { + val instance = + ActivitiesNeighborhood( + id = id!!, + name = name!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id!!, - name = name!! - ) + name = name!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt index 1f7f6c836..dab6fe50b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPhone.kt @@ -15,105 +15,71 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * The phone of the company providing the activity. - * @param countryCode Country code of traveler's phone number; only digits allowed. - * @param number Traveler's phone number; only digits allowed. - * @param areaCode Area code of traveler's phone number; only digits allowed. - * @param extensionNumber + * @param countryCode Country code of traveler's phone number; only digits allowed. + * @param number Traveler's phone number; only digits allowed. + * @param areaCode Area code of traveler's phone number; only digits allowed. + * @param extensionNumber */ data class ActivitiesPhone( - /* Country code of traveler's phone number; only digits allowed. */ -@JsonProperty("CountryCode") -val countryCode: - kotlin.String -, - - /* Traveler's phone number; only digits allowed. */ -@JsonProperty("Number") -val number: - kotlin.String -, - - /* Area code of traveler's phone number; only digits allowed. */ -@JsonProperty("AreaCode") -val areaCode: kotlin.String? = null, - - @JsonProperty("ExtensionNumber") -val extensionNumber: kotlin.String? = null + // Country code of traveler's phone number; only digits allowed. + @JsonProperty("CountryCode") + val countryCode: kotlin.String, + // Traveler's phone number; only digits allowed. + @JsonProperty("Number") + val number: kotlin.String, + // Area code of traveler's phone number; only digits allowed. + @JsonProperty("AreaCode") + val areaCode: kotlin.String? = null, + @JsonProperty("ExtensionNumber") + val extensionNumber: kotlin.String? = null, ) { - - - init { - require(countryCode != null) { "countryCode must not be null" } - - - - - - + require(countryCode != null) { "countryCode must not be null" } require(number != null) { "number must not be null" } - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var countryCode: kotlin.String? = null, - private var number: kotlin.String? = null, - private var areaCode: kotlin.String? = null, - private var extensionNumber: kotlin.String? = null - ) { - fun countryCode(countryCode: kotlin.String) = apply { this.countryCode = countryCode } - fun number(number: kotlin.String) = apply { this.number = number } - fun areaCode(areaCode: kotlin.String?) = apply { this.areaCode = areaCode } - fun extensionNumber(extensionNumber: kotlin.String?) = apply { this.extensionNumber = extensionNumber } + class Builder( + private var countryCode: kotlin.String? = null, + private var number: kotlin.String? = null, + private var areaCode: kotlin.String? = null, + private var extensionNumber: kotlin.String? = null, + ) { + fun countryCode(countryCode: kotlin.String) = apply { this.countryCode = countryCode } - fun build(): ActivitiesPhone { - val instance = ActivitiesPhone( - countryCode = countryCode!!, - number = number!!, - areaCode = areaCode, - extensionNumber = extensionNumber - ) + fun number(number: kotlin.String) = apply { this.number = number } - return instance - } + fun areaCode(areaCode: kotlin.String?) = apply { this.areaCode = areaCode } + + fun extensionNumber(extensionNumber: kotlin.String?) = apply { this.extensionNumber = extensionNumber } + + fun build(): ActivitiesPhone { + val instance = + ActivitiesPhone( + countryCode = countryCode!!, + number = number!!, + areaCode = areaCode, + extensionNumber = extensionNumber, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( countryCode = countryCode!!, number = number!!, areaCode = areaCode, - extensionNumber = extensionNumber - ) + extensionNumber = extensionNumber, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt index b460b02fd..88a0cde5c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesPrice.kt @@ -18,130 +18,83 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesMoney import com.expediagroup.sdk.xap.models.ReferencePrice import com.expediagroup.sdk.xap.models.Savings - import com.fasterxml.jackson.annotation.JsonProperty /** * The price of the offer - * @param totalRate - * @param category Type of passenger. Values supported are: ADULT | SENIOR | CHILD - * @param totalFees - * @param totalTaxesAndFees - * @param referencePrice - * @param savings + * @param totalRate + * @param category Type of passenger. Values supported are: ADULT | SENIOR | CHILD + * @param totalFees + * @param totalTaxesAndFees + * @param referencePrice + * @param savings */ data class ActivitiesPrice( - @JsonProperty("TotalRate") -val totalRate: - ActivitiesMoney -, - - /* Type of passenger. Values supported are: ADULT | SENIOR | CHILD */ -@JsonProperty("Category") -val category: kotlin.String? = null, - - @JsonProperty("TotalFees") -val totalFees: ActivitiesMoney? = null, - - @JsonProperty("TotalTaxesAndFees") -val totalTaxesAndFees: ActivitiesMoney? = null, - - @JsonProperty("ReferencePrice") -val referencePrice: ReferencePrice? = null, - - @JsonProperty("Savings") -val savings: Savings? = null + @JsonProperty("TotalRate") + val totalRate: ActivitiesMoney, + // Type of passenger. Values supported are: ADULT | SENIOR | CHILD + @JsonProperty("Category") + val category: kotlin.String? = null, + @JsonProperty("TotalFees") + val totalFees: ActivitiesMoney? = null, + @JsonProperty("TotalTaxesAndFees") + val totalTaxesAndFees: ActivitiesMoney? = null, + @JsonProperty("ReferencePrice") + val referencePrice: ReferencePrice? = null, + @JsonProperty("Savings") + val savings: Savings? = null, ) { - - - init { - require(totalRate != null) { "totalRate must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + require(totalRate != null) { "totalRate must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var totalRate: ActivitiesMoney? = null, + private var category: kotlin.String? = null, + private var totalFees: ActivitiesMoney? = null, + private var totalTaxesAndFees: ActivitiesMoney? = null, + private var referencePrice: ReferencePrice? = null, + private var savings: Savings? = null, + ) { + fun totalRate(totalRate: ActivitiesMoney) = apply { this.totalRate = totalRate } + fun category(category: kotlin.String?) = apply { this.category = category } + fun totalFees(totalFees: ActivitiesMoney?) = apply { this.totalFees = totalFees } - } + fun totalTaxesAndFees(totalTaxesAndFees: ActivitiesMoney?) = apply { this.totalTaxesAndFees = totalTaxesAndFees } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun referencePrice(referencePrice: ReferencePrice?) = apply { this.referencePrice = referencePrice } - class Builder( - private var totalRate: ActivitiesMoney? = null, - private var category: kotlin.String? = null, - private var totalFees: ActivitiesMoney? = null, - private var totalTaxesAndFees: ActivitiesMoney? = null, - private var referencePrice: ReferencePrice? = null, - private var savings: Savings? = null - ) { - fun totalRate(totalRate: ActivitiesMoney) = apply { this.totalRate = totalRate } - fun category(category: kotlin.String?) = apply { this.category = category } - fun totalFees(totalFees: ActivitiesMoney?) = apply { this.totalFees = totalFees } - fun totalTaxesAndFees(totalTaxesAndFees: ActivitiesMoney?) = apply { this.totalTaxesAndFees = totalTaxesAndFees } - fun referencePrice(referencePrice: ReferencePrice?) = apply { this.referencePrice = referencePrice } - fun savings(savings: Savings?) = apply { this.savings = savings } + fun savings(savings: Savings?) = apply { this.savings = savings } - fun build(): ActivitiesPrice { - val instance = ActivitiesPrice( - totalRate = totalRate!!, - category = category, - totalFees = totalFees, - totalTaxesAndFees = totalTaxesAndFees, - referencePrice = referencePrice, - savings = savings - ) + fun build(): ActivitiesPrice { + val instance = + ActivitiesPrice( + totalRate = totalRate!!, + category = category, + totalFees = totalFees, + totalTaxesAndFees = totalTaxesAndFees, + referencePrice = referencePrice, + savings = savings, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( totalRate = totalRate!!, category = category, totalFees = totalFees, totalTaxesAndFees = totalTaxesAndFees, referencePrice = referencePrice, - savings = savings - ) + savings = savings, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt index 784e7ad23..c0ce2c3c8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesSupplier.kt @@ -16,70 +16,51 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesPhone - import com.fasterxml.jackson.annotation.JsonProperty /** * The details information of company providing the activity. - * @param name The name of the company providing the activity. - * @param phone + * @param name The name of the company providing the activity. + * @param phone */ data class ActivitiesSupplier( - /* The name of the company providing the activity. */ -@JsonProperty("Name") -val name: - kotlin.String -, - - @JsonProperty("Phone") -val phone: ActivitiesPhone? = null + // The name of the company providing the activity. + @JsonProperty("Name") + val name: kotlin.String, + @JsonProperty("Phone") + val phone: ActivitiesPhone? = null, ) { - - - init { - require(name != null) { "name must not be null" } - - - - - - - - - - - - - - - + require(name != null) { "name must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var phone: ActivitiesPhone? = null - ) { - fun name(name: kotlin.String) = apply { this.name = name } - fun phone(phone: ActivitiesPhone?) = apply { this.phone = phone } + class Builder( + private var name: kotlin.String? = null, + private var phone: ActivitiesPhone? = null, + ) { + fun name(name: kotlin.String) = apply { this.name = name } - fun build(): ActivitiesSupplier { - val instance = ActivitiesSupplier( - name = name!!, - phone = phone - ) + fun phone(phone: ActivitiesPhone?) = apply { this.phone = phone } - return instance - } + fun build(): ActivitiesSupplier { + val instance = + ActivitiesSupplier( + name = name!!, + phone = phone, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( name = name!!, - phone = phone - ) + phone = phone, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt index 9963373fa..9d35ecfc9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesWarning.kt @@ -17,150 +17,95 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesLink import com.expediagroup.sdk.xap.models.ActivitiesMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for all warnings generated during the transaction. - * @param code Standardized warning code. - * @param description Standardized warning description message. - * @param originalPrice - * @param newPrice - * @param changedAmount - * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - * @param links + * @param code Standardized warning code. + * @param description Standardized warning description message. + * @param originalPrice + * @param newPrice + * @param changedAmount + * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. + * @param links */ data class ActivitiesWarning( - /* Standardized warning code. */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* Standardized warning description message. */ -@JsonProperty("Description") -val description: - kotlin.String -, - - @JsonProperty("OriginalPrice") -val originalPrice: ActivitiesMoney? = null, - - @JsonProperty("NewPrice") -val newPrice: ActivitiesMoney? = null, - - @JsonProperty("ChangedAmount") -val changedAmount: ActivitiesMoney? = null, - - /* The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ -@JsonProperty("ChangedPercentage") -val changedPercentage: kotlin.String? = null, - - @JsonProperty("Links") -val links: kotlin.collections.Map? = null + // Standardized warning code. + @JsonProperty("Code") + val code: kotlin.String, + // Standardized warning description message. + @JsonProperty("Description") + val description: kotlin.String, + @JsonProperty("OriginalPrice") + val originalPrice: ActivitiesMoney? = null, + @JsonProperty("NewPrice") + val newPrice: ActivitiesMoney? = null, + @JsonProperty("ChangedAmount") + val changedAmount: ActivitiesMoney? = null, + // The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. + @JsonProperty("ChangedPercentage") + val changedPercentage: kotlin.String? = null, + @JsonProperty("Links") + val links: kotlin.collections.Map? = null, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(description != null) { "description must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var originalPrice: ActivitiesMoney? = null, + private var newPrice: ActivitiesMoney? = null, + private var changedAmount: ActivitiesMoney? = null, + private var changedPercentage: kotlin.String? = null, + private var links: kotlin.collections.Map? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun description(description: kotlin.String) = apply { this.description = description } + fun originalPrice(originalPrice: ActivitiesMoney?) = apply { this.originalPrice = originalPrice } + fun newPrice(newPrice: ActivitiesMoney?) = apply { this.newPrice = newPrice } + fun changedAmount(changedAmount: ActivitiesMoney?) = apply { this.changedAmount = changedAmount } + fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + fun build(): ActivitiesWarning { + val instance = + ActivitiesWarning( + code = code!!, + description = description!!, + originalPrice = originalPrice, + newPrice = newPrice, + changedAmount = changedAmount, + changedPercentage = changedPercentage, + links = links, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var originalPrice: ActivitiesMoney? = null, - private var newPrice: ActivitiesMoney? = null, - private var changedAmount: ActivitiesMoney? = null, - private var changedPercentage: kotlin.String? = null, - private var links: kotlin.collections.Map? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun description(description: kotlin.String) = apply { this.description = description } - fun originalPrice(originalPrice: ActivitiesMoney?) = apply { this.originalPrice = originalPrice } - fun newPrice(newPrice: ActivitiesMoney?) = apply { this.newPrice = newPrice } - fun changedAmount(changedAmount: ActivitiesMoney?) = apply { this.changedAmount = changedAmount } - fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun build(): ActivitiesWarning { - val instance = ActivitiesWarning( - code = code!!, - description = description!!, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount, - changedPercentage = changedPercentage, - links = links - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, description = description!!, originalPrice = originalPrice, newPrice = newPrice, changedAmount = changedAmount, changedPercentage = changedPercentage, - links = links - ) + links = links, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt index f10bffad6..80f22080a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Activity.kt @@ -23,400 +23,229 @@ import com.expediagroup.sdk.xap.models.ActivitiesPrice import com.expediagroup.sdk.xap.models.ActivitiesSupplier import com.expediagroup.sdk.xap.models.Offer import com.expediagroup.sdk.xap.models.Redemption - import com.fasterxml.jackson.annotation.JsonProperty /** * Detailed information on the Activity. - * @param id The numerical identifier for this particular activity - * @param title The display title for this activity. - * @param description The description of the Activity. - * @param media List of activity Media. - * @param categories A list of the Activity categories to which this particular activity belongs. Possible values are: Adventures Air, Balloon & Helicopter Tours Attractions Cruises & Water Tours Day Trips & Excursions Food & Drink Hop-on Hop-off Multi-Day & Extended Tours Nightlife Private Tours Private Transfers Shared Transfers Show & Sport Tickets Sightseeing Passes Theme Parks Tours & Sightseeing Walking & Bike Tours Water Activities Wedding Ceremonies Winter Activities - * @param duration The anticipated time duration for the activity. Using java jdk Duration parsing. - * @param freeCancellation A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. - * @param price - * @param supplier - * @param redemption - * @param activityLocations Container of location information where activity happens. - * @param reviewScore The overall Expedia score for the activity. - * @param reviewCount The number of Expedia reviews that went into the calculation of the ReviewScore. - * @param links HATEOAS links included in this response. - * @param cancellationPolicy - * @param highlights Web formatted statement of the Highlight(s) for the activity. - * @param termsAndConditions Terms and Conditions for the Activity. - * @param inclusions Web formatted statement of what is included in the activity - * @param exclusions Web formatted statement of what is NOT included in the activity - * @param knowBeforeYouBook Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. - * @param knowBeforeYouGo Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. - * @param offers Offers for the activity. + * @param id The numerical identifier for this particular activity + * @param title The display title for this activity. + * @param description The description of the Activity. + * @param media List of activity Media. + * @param categories A list of the Activity categories to which this particular activity belongs. Possible values are: Adventures Air, Balloon & Helicopter Tours Attractions Cruises & Water Tours Day Trips & Excursions Food & Drink Hop-on Hop-off Multi-Day & Extended Tours Nightlife Private Tours Private Transfers Shared Transfers Show & Sport Tickets Sightseeing Passes Theme Parks Tours & Sightseeing Walking & Bike Tours Water Activities Wedding Ceremonies Winter Activities + * @param duration The anticipated time duration for the activity. Using java jdk Duration parsing. + * @param freeCancellation A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. + * @param price + * @param supplier + * @param redemption + * @param activityLocations Container of location information where activity happens. + * @param reviewScore The overall Expedia score for the activity. + * @param reviewCount The number of Expedia reviews that went into the calculation of the ReviewScore. + * @param links HATEOAS links included in this response. + * @param cancellationPolicy + * @param highlights Web formatted statement of the Highlight(s) for the activity. + * @param termsAndConditions Terms and Conditions for the Activity. + * @param inclusions Web formatted statement of what is included in the activity + * @param exclusions Web formatted statement of what is NOT included in the activity + * @param knowBeforeYouBook Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. + * @param knowBeforeYouGo Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. + * @param offers Offers for the activity. */ data class Activity( - /* The numerical identifier for this particular activity */ -@JsonProperty("Id") -val id: - kotlin.Int -, - - /* The display title for this activity. */ -@JsonProperty("Title") -val title: - kotlin.String -, - - /* The description of the Activity. */ -@JsonProperty("Description") -val description: - kotlin.String -, - - /* List of activity Media. */ -@JsonProperty("Media") -val media: - kotlin.collections. - List -< - ActivitiesMedia -> - -, - - /* A list of the Activity categories to which this particular activity belongs. Possible values are: Adventures Air, Balloon & Helicopter Tours Attractions Cruises & Water Tours Day Trips & Excursions Food & Drink Hop-on Hop-off Multi-Day & Extended Tours Nightlife Private Tours Private Transfers Shared Transfers Show & Sport Tickets Sightseeing Passes Theme Parks Tours & Sightseeing Walking & Bike Tours Water Activities Wedding Ceremonies Winter Activities */ -@JsonProperty("Categories") -val categories: - kotlin.collections. - List -< - kotlin.String -> - -, - - /* The anticipated time duration for the activity. Using java jdk Duration parsing. */ -@JsonProperty("Duration") -val duration: - kotlin.String -, - - /* A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. */ -@JsonProperty("FreeCancellation") -val freeCancellation: - kotlin.Boolean -, - - @JsonProperty("Price") -val price: - ActivitiesPrice -, - - @JsonProperty("Supplier") -val supplier: - ActivitiesSupplier -, - - @JsonProperty("Redemption") -val redemption: Redemption? = null, - - /* Container of location information where activity happens. */ -@JsonProperty("ActivityLocations") -val activityLocations: kotlin.collections.List? = null, - - /* The overall Expedia score for the activity. */ -@JsonProperty("ReviewScore") -val reviewScore: kotlin.Int? = null, - - /* The number of Expedia reviews that went into the calculation of the ReviewScore. */ -@JsonProperty("ReviewCount") -val reviewCount: kotlin.Int? = null, - - /* HATEOAS links included in this response. */ -@JsonProperty("Links") -val links: kotlin.collections.Map? = null, - - @JsonProperty("CancellationPolicy") -val cancellationPolicy: ActivitiesCancellationPolicy? = null, - - /* Web formatted statement of the Highlight(s) for the activity. */ -@JsonProperty("Highlights") -val highlights: kotlin.collections.List? = null, - - /* Terms and Conditions for the Activity. */ -@JsonProperty("TermsAndConditions") -val termsAndConditions: kotlin.collections.List? = null, - - /* Web formatted statement of what is included in the activity */ -@JsonProperty("Inclusions") -val inclusions: kotlin.collections.List? = null, - - /* Web formatted statement of what is NOT included in the activity */ -@JsonProperty("Exclusions") -val exclusions: kotlin.collections.List? = null, - - /* Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. */ -@JsonProperty("KnowBeforeYouBook") -val knowBeforeYouBook: kotlin.collections.List? = null, - - /* Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. */ -@JsonProperty("KnowBeforeYouGo") -val knowBeforeYouGo: kotlin.collections.List? = null, - - /* Offers for the activity. */ -@JsonProperty("Offers") -val offers: kotlin.collections.List? = null + // The numerical identifier for this particular activity + @JsonProperty("Id") + val id: kotlin.Int, + // The display title for this activity. + @JsonProperty("Title") + val title: kotlin.String, + // The description of the Activity. + @JsonProperty("Description") + val description: kotlin.String, + // List of activity Media. + @JsonProperty("Media") + val media: kotlin.collections + .List< + ActivitiesMedia, + >, + // A list of the Activity categories to which this particular activity belongs. Possible values are: Adventures Air, Balloon & Helicopter Tours Attractions Cruises & Water Tours Day Trips & Excursions Food & Drink Hop-on Hop-off Multi-Day & Extended Tours Nightlife Private Tours Private Transfers Shared Transfers Show & Sport Tickets Sightseeing Passes Theme Parks Tours & Sightseeing Walking & Bike Tours Water Activities Wedding Ceremonies Winter Activities + @JsonProperty("Categories") + val categories: kotlin.collections + .List< + kotlin.String, + >, + // The anticipated time duration for the activity. Using java jdk Duration parsing. + @JsonProperty("Duration") + val duration: kotlin.String, + // A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. + @JsonProperty("FreeCancellation") + val freeCancellation: kotlin.Boolean, + @JsonProperty("Price") + val price: ActivitiesPrice, + @JsonProperty("Supplier") + val supplier: ActivitiesSupplier, + @JsonProperty("Redemption") + val redemption: Redemption? = null, + // Container of location information where activity happens. + @JsonProperty("ActivityLocations") + val activityLocations: kotlin.collections.List? = null, + // The overall Expedia score for the activity. + @JsonProperty("ReviewScore") + val reviewScore: kotlin.Int? = null, + // The number of Expedia reviews that went into the calculation of the ReviewScore. + @JsonProperty("ReviewCount") + val reviewCount: kotlin.Int? = null, + // HATEOAS links included in this response. + @JsonProperty("Links") + val links: kotlin.collections.Map? = null, + @JsonProperty("CancellationPolicy") + val cancellationPolicy: ActivitiesCancellationPolicy? = null, + // Web formatted statement of the Highlight(s) for the activity. + @JsonProperty("Highlights") + val highlights: kotlin.collections.List? = null, + // Terms and Conditions for the Activity. + @JsonProperty("TermsAndConditions") + val termsAndConditions: kotlin.collections.List? = null, + // Web formatted statement of what is included in the activity + @JsonProperty("Inclusions") + val inclusions: kotlin.collections.List? = null, + // Web formatted statement of what is NOT included in the activity + @JsonProperty("Exclusions") + val exclusions: kotlin.collections.List? = null, + // Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. + @JsonProperty("KnowBeforeYouBook") + val knowBeforeYouBook: kotlin.collections.List? = null, + // Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. + @JsonProperty("KnowBeforeYouGo") + val knowBeforeYouGo: kotlin.collections.List? = null, + // Offers for the activity. + @JsonProperty("Offers") + val offers: kotlin.collections.List? = null, ) { - - - init { - require(id != null) { "id must not be null" } - - - - - - + require(id != null) { "id must not be null" } require(title != null) { "title must not be null" } - - - - - - require(description != null) { "description must not be null" } - - - - - - require(media != null) { "media must not be null" } - - - - - - require(categories != null) { "categories must not be null" } - - - - - - require(duration != null) { "duration must not be null" } - - - - - - require(freeCancellation != null) { "freeCancellation must not be null" } - - - - - - require(price != null) { "price must not be null" } - - - - - - require(supplier != null) { "supplier must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var id: kotlin.Int? = null, + private var title: kotlin.String? = null, + private var description: kotlin.String? = null, + private var media: kotlin.collections.List? = null, + private var categories: kotlin.collections.List? = null, + private var duration: kotlin.String? = null, + private var freeCancellation: kotlin.Boolean? = null, + private var price: ActivitiesPrice? = null, + private var supplier: ActivitiesSupplier? = null, + private var redemption: Redemption? = null, + private var activityLocations: kotlin.collections.List? = null, + private var reviewScore: kotlin.Int? = null, + private var reviewCount: kotlin.Int? = null, + private var links: kotlin.collections.Map? = null, + private var cancellationPolicy: ActivitiesCancellationPolicy? = null, + private var highlights: kotlin.collections.List? = null, + private var termsAndConditions: kotlin.collections.List? = null, + private var inclusions: kotlin.collections.List? = null, + private var exclusions: kotlin.collections.List? = null, + private var knowBeforeYouBook: kotlin.collections.List? = null, + private var knowBeforeYouGo: kotlin.collections.List? = null, + private var offers: kotlin.collections.List? = null, + ) { + fun id(id: kotlin.Int) = apply { this.id = id } + fun title(title: kotlin.String) = apply { this.title = title } + fun description(description: kotlin.String) = apply { this.description = description } + fun media(media: kotlin.collections.List) = apply { this.media = media } + fun categories(categories: kotlin.collections.List) = apply { this.categories = categories } + fun duration(duration: kotlin.String) = apply { this.duration = duration } + fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } + fun price(price: ActivitiesPrice) = apply { this.price = price } + fun supplier(supplier: ActivitiesSupplier) = apply { this.supplier = supplier } + fun redemption(redemption: Redemption?) = apply { this.redemption = redemption } + fun activityLocations(activityLocations: kotlin.collections.List?) = apply { this.activityLocations = activityLocations } + fun reviewScore(reviewScore: kotlin.Int?) = apply { this.reviewScore = reviewScore } + fun reviewCount(reviewCount: kotlin.Int?) = apply { this.reviewCount = reviewCount } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + fun cancellationPolicy(cancellationPolicy: ActivitiesCancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } + fun highlights(highlights: kotlin.collections.List?) = apply { this.highlights = highlights } + fun termsAndConditions(termsAndConditions: kotlin.collections.List?) = apply { this.termsAndConditions = termsAndConditions } + fun inclusions(inclusions: kotlin.collections.List?) = apply { this.inclusions = inclusions } + fun exclusions(exclusions: kotlin.collections.List?) = apply { this.exclusions = exclusions } + fun knowBeforeYouBook(knowBeforeYouBook: kotlin.collections.List?) = apply { this.knowBeforeYouBook = knowBeforeYouBook } + fun knowBeforeYouGo(knowBeforeYouGo: kotlin.collections.List?) = apply { this.knowBeforeYouGo = knowBeforeYouGo } + fun offers(offers: kotlin.collections.List?) = apply { this.offers = offers } + fun build(): Activity { + val instance = + Activity( + id = id!!, + title = title!!, + description = description!!, + media = media!!, + categories = categories!!, + duration = duration!!, + freeCancellation = freeCancellation!!, + price = price!!, + supplier = supplier!!, + redemption = redemption, + activityLocations = activityLocations, + reviewScore = reviewScore, + reviewCount = reviewCount, + links = links, + cancellationPolicy = cancellationPolicy, + highlights = highlights, + termsAndConditions = termsAndConditions, + inclusions = inclusions, + exclusions = exclusions, + knowBeforeYouBook = knowBeforeYouBook, + knowBeforeYouGo = knowBeforeYouGo, + offers = offers, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var id: kotlin.Int? = null, - private var title: kotlin.String? = null, - private var description: kotlin.String? = null, - private var media: kotlin.collections.List? = null, - private var categories: kotlin.collections.List? = null, - private var duration: kotlin.String? = null, - private var freeCancellation: kotlin.Boolean? = null, - private var price: ActivitiesPrice? = null, - private var supplier: ActivitiesSupplier? = null, - private var redemption: Redemption? = null, - private var activityLocations: kotlin.collections.List? = null, - private var reviewScore: kotlin.Int? = null, - private var reviewCount: kotlin.Int? = null, - private var links: kotlin.collections.Map? = null, - private var cancellationPolicy: ActivitiesCancellationPolicy? = null, - private var highlights: kotlin.collections.List? = null, - private var termsAndConditions: kotlin.collections.List? = null, - private var inclusions: kotlin.collections.List? = null, - private var exclusions: kotlin.collections.List? = null, - private var knowBeforeYouBook: kotlin.collections.List? = null, - private var knowBeforeYouGo: kotlin.collections.List? = null, - private var offers: kotlin.collections.List? = null - ) { - fun id(id: kotlin.Int) = apply { this.id = id } - fun title(title: kotlin.String) = apply { this.title = title } - fun description(description: kotlin.String) = apply { this.description = description } - fun media(media: kotlin.collections.List) = apply { this.media = media } - fun categories(categories: kotlin.collections.List) = apply { this.categories = categories } - fun duration(duration: kotlin.String) = apply { this.duration = duration } - fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } - fun price(price: ActivitiesPrice) = apply { this.price = price } - fun supplier(supplier: ActivitiesSupplier) = apply { this.supplier = supplier } - fun redemption(redemption: Redemption?) = apply { this.redemption = redemption } - fun activityLocations(activityLocations: kotlin.collections.List?) = apply { this.activityLocations = activityLocations } - fun reviewScore(reviewScore: kotlin.Int?) = apply { this.reviewScore = reviewScore } - fun reviewCount(reviewCount: kotlin.Int?) = apply { this.reviewCount = reviewCount } - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - fun cancellationPolicy(cancellationPolicy: ActivitiesCancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } - fun highlights(highlights: kotlin.collections.List?) = apply { this.highlights = highlights } - fun termsAndConditions(termsAndConditions: kotlin.collections.List?) = apply { this.termsAndConditions = termsAndConditions } - fun inclusions(inclusions: kotlin.collections.List?) = apply { this.inclusions = inclusions } - fun exclusions(exclusions: kotlin.collections.List?) = apply { this.exclusions = exclusions } - fun knowBeforeYouBook(knowBeforeYouBook: kotlin.collections.List?) = apply { this.knowBeforeYouBook = knowBeforeYouBook } - fun knowBeforeYouGo(knowBeforeYouGo: kotlin.collections.List?) = apply { this.knowBeforeYouGo = knowBeforeYouGo } - fun offers(offers: kotlin.collections.List?) = apply { this.offers = offers } - - fun build(): Activity { - val instance = Activity( - id = id!!, - title = title!!, - description = description!!, - media = media!!, - categories = categories!!, - duration = duration!!, - freeCancellation = freeCancellation!!, - price = price!!, - supplier = supplier!!, - redemption = redemption, - activityLocations = activityLocations, - reviewScore = reviewScore, - reviewCount = reviewCount, - links = links, - cancellationPolicy = cancellationPolicy, - highlights = highlights, - termsAndConditions = termsAndConditions, - inclusions = inclusions, - exclusions = exclusions, - knowBeforeYouBook = knowBeforeYouBook, - knowBeforeYouGo = knowBeforeYouGo, - offers = offers - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id!!, title = title!!, description = description!!, @@ -438,6 +267,6 @@ val offers: kotlin.collections.List? = null exclusions = exclusions, knowBeforeYouBook = knowBeforeYouBook, knowBeforeYouGo = knowBeforeYouGo, - offers = offers - ) + offers = offers, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt index 09800b209..8397d0405 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityDetailsResponse.kt @@ -17,137 +17,89 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesWarning import com.expediagroup.sdk.xap.models.Activity - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param transactionId A unique identifier for this transaction. - * @param location The location user searched, translated into the full, unambiguous format. - * @param warnings Container for all warnings generated during the transaction. - * @param startDate The startDate of activities in YYY-MM-DD format. - * @param endDate The endDate of activities in YYY-MM-DD format. - * @param activityDetails +* + * @param transactionId A unique identifier for this transaction. + * @param location The location user searched, translated into the full, unambiguous format. + * @param warnings Container for all warnings generated during the transaction. + * @param startDate The startDate of activities in YYY-MM-DD format. + * @param endDate The endDate of activities in YYY-MM-DD format. + * @param activityDetails */ data class ActivityDetailsResponse( - /* A unique identifier for this transaction. */ -@JsonProperty("TransactionId") -val transactionId: - kotlin.String -, - - /* The location user searched, translated into the full, unambiguous format. */ -@JsonProperty("Location") -val location: - kotlin.String -, - - /* Container for all warnings generated during the transaction. */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - /* The startDate of activities in YYY-MM-DD format. */ -@JsonProperty("StartDate") -val startDate: java.time.LocalDate? = null, - - /* The endDate of activities in YYY-MM-DD format. */ -@JsonProperty("EndDate") -val endDate: java.time.LocalDate? = null, - - @JsonProperty("ActivityDetails") -val activityDetails: Activity? = null + // A unique identifier for this transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String, + // The location user searched, translated into the full, unambiguous format. + @JsonProperty("Location") + val location: kotlin.String, + // Container for all warnings generated during the transaction. + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + // The startDate of activities in YYY-MM-DD format. + @JsonProperty("StartDate") + val startDate: java.time.LocalDate? = null, + // The endDate of activities in YYY-MM-DD format. + @JsonProperty("EndDate") + val endDate: java.time.LocalDate? = null, + @JsonProperty("ActivityDetails") + val activityDetails: Activity? = null, ) { - - - init { - require(transactionId != null) { "transactionId must not be null" } - - - - - - + require(transactionId != null) { "transactionId must not be null" } require(location != null) { "location must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var transactionId: kotlin.String? = null, + private var location: kotlin.String? = null, + private var warnings: kotlin.collections.List? = null, + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null, + private var activityDetails: Activity? = null, + ) { + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + fun location(location: kotlin.String) = apply { this.location = location } + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } + fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } + fun activityDetails(activityDetails: Activity?) = apply { this.activityDetails = activityDetails } + fun build(): ActivityDetailsResponse { + val instance = + ActivityDetailsResponse( + transactionId = transactionId!!, + location = location!!, + warnings = warnings, + startDate = startDate, + endDate = endDate, + activityDetails = activityDetails, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var transactionId: kotlin.String? = null, - private var location: kotlin.String? = null, - private var warnings: kotlin.collections.List? = null, - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null, - private var activityDetails: Activity? = null - ) { - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - fun location(location: kotlin.String) = apply { this.location = location } - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } - fun activityDetails(activityDetails: Activity?) = apply { this.activityDetails = activityDetails } - - fun build(): ActivityDetailsResponse { - val instance = ActivityDetailsResponse( - transactionId = transactionId!!, - location = location!!, - warnings = warnings, - startDate = startDate, - endDate = endDate, - activityDetails = activityDetails - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( transactionId = transactionId!!, location = location!!, warnings = warnings, startDate = startDate, endDate = endDate, - activityDetails = activityDetails - ) + activityDetails = activityDetails, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt index f71a09898..ed8d5b8a5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivityListingsResponse.kt @@ -18,166 +18,103 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesWarning import com.expediagroup.sdk.xap.models.Activity import com.expediagroup.sdk.xap.models.CategoryGroup - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param transactionId A unique identifier for this transaction. - * @param count The number of activities returned in the response. - * @param location The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. - * @param warnings Container for all warnings generated during the transaction. - * @param startDate The startDate of the returned group of activities in YYYY-MM-DD format. - * @param endDate The endDate of returned group of activities in YYYY-MM-DD format. - * @param activities List of activities matching the search criteria. - * @param categories Container for a breakdown of how many of each type of Activity have been returned in the API response. +* + * @param transactionId A unique identifier for this transaction. + * @param count The number of activities returned in the response. + * @param location The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. + * @param warnings Container for all warnings generated during the transaction. + * @param startDate The startDate of the returned group of activities in YYYY-MM-DD format. + * @param endDate The endDate of returned group of activities in YYYY-MM-DD format. + * @param activities List of activities matching the search criteria. + * @param categories Container for a breakdown of how many of each type of Activity have been returned in the API response. */ data class ActivityListingsResponse( - /* A unique identifier for this transaction. */ -@JsonProperty("TransactionId") -val transactionId: - kotlin.String -, - - /* The number of activities returned in the response. */ -@JsonProperty("Count") -val count: - kotlin.Long -, - - /* The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. */ -@JsonProperty("Location") -val location: - kotlin.String -, - - /* Container for all warnings generated during the transaction. */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - /* The startDate of the returned group of activities in YYYY-MM-DD format. */ -@JsonProperty("StartDate") -val startDate: java.time.LocalDate? = null, - - /* The endDate of returned group of activities in YYYY-MM-DD format. */ -@JsonProperty("EndDate") -val endDate: java.time.LocalDate? = null, - - /* List of activities matching the search criteria. */ -@JsonProperty("Activities") -val activities: kotlin.collections.List? = null, - - /* Container for a breakdown of how many of each type of Activity have been returned in the API response. */ -@JsonProperty("Categories") -val categories: kotlin.collections.List? = null + // A unique identifier for this transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String, + // The number of activities returned in the response. + @JsonProperty("Count") + val count: kotlin.Long, + // The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. + @JsonProperty("Location") + val location: kotlin.String, + // Container for all warnings generated during the transaction. + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + // The startDate of the returned group of activities in YYYY-MM-DD format. + @JsonProperty("StartDate") + val startDate: java.time.LocalDate? = null, + // The endDate of returned group of activities in YYYY-MM-DD format. + @JsonProperty("EndDate") + val endDate: java.time.LocalDate? = null, + // List of activities matching the search criteria. + @JsonProperty("Activities") + val activities: kotlin.collections.List? = null, + // Container for a breakdown of how many of each type of Activity have been returned in the API response. + @JsonProperty("Categories") + val categories: kotlin.collections.List? = null, ) { - - - init { - require(transactionId != null) { "transactionId must not be null" } - - - - - - + require(transactionId != null) { "transactionId must not be null" } require(count != null) { "count must not be null" } - - - - - - require(location != null) { "location must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var transactionId: kotlin.String? = null, + private var count: kotlin.Long? = null, + private var location: kotlin.String? = null, + private var warnings: kotlin.collections.List? = null, + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null, + private var activities: kotlin.collections.List? = null, + private var categories: kotlin.collections.List? = null, + ) { + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + fun count(count: kotlin.Long) = apply { this.count = count } + fun location(location: kotlin.String) = apply { this.location = location } + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } + fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } + fun activities(activities: kotlin.collections.List?) = apply { this.activities = activities } + fun categories(categories: kotlin.collections.List?) = apply { this.categories = categories } + fun build(): ActivityListingsResponse { + val instance = + ActivityListingsResponse( + transactionId = transactionId!!, + count = count!!, + location = location!!, + warnings = warnings, + startDate = startDate, + endDate = endDate, + activities = activities, + categories = categories, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var transactionId: kotlin.String? = null, - private var count: kotlin.Long? = null, - private var location: kotlin.String? = null, - private var warnings: kotlin.collections.List? = null, - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null, - private var activities: kotlin.collections.List? = null, - private var categories: kotlin.collections.List? = null - ) { - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - fun count(count: kotlin.Long) = apply { this.count = count } - fun location(location: kotlin.String) = apply { this.location = location } - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } - fun activities(activities: kotlin.collections.List?) = apply { this.activities = activities } - fun categories(categories: kotlin.collections.List?) = apply { this.categories = categories } - - fun build(): ActivityListingsResponse { - val instance = ActivityListingsResponse( - transactionId = transactionId!!, - count = count!!, - location = location!!, - warnings = warnings, - startDate = startDate, - endDate = endDate, - activities = activities, - categories = categories - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( transactionId = transactionId!!, count = count!!, location = location!!, @@ -185,6 +122,6 @@ val categories: kotlin.collections.List? = null startDate = startDate, endDate = endDate, activities = activities, - categories = categories - ) + categories = categories, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt index 7c3aff8fc..68cdc2732 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AdditionalFee.kt @@ -17,142 +17,92 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsMoney import com.expediagroup.sdk.xap.models.Deductible - import com.fasterxml.jackson.annotation.JsonProperty /** * List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - * @param isRequired Indicates whether this additional fee is mandatory. - * @param financeCategory Category of the fee / Coverages - * @param financeSubCategory Sub category of the fee / Coverages . - * @param amount - * @param description Description of the fee. - * @param deductible + * @param isRequired Indicates whether this additional fee is mandatory. + * @param financeCategory Category of the fee / Coverages + * @param financeSubCategory Sub category of the fee / Coverages . + * @param amount + * @param description Description of the fee. + * @param deductible */ data class AdditionalFee( - /* Indicates whether this additional fee is mandatory. */ -@JsonProperty("IsRequired") -val isRequired: - kotlin.Boolean -, - - /* Category of the fee / Coverages */ -@JsonProperty("FinanceCategory") -val financeCategory: - kotlin.String -, - - /* Sub category of the fee / Coverages . */ -@JsonProperty("FinanceSubCategory") -val financeSubCategory: - kotlin.String -, - - @JsonProperty("Amount") -val amount: - CarsMoney -, - - /* Description of the fee. */ -@JsonProperty("Description") -val description: kotlin.String? = null, - - @JsonProperty("Deductible") -val deductible: Deductible? = null + // Indicates whether this additional fee is mandatory. + @JsonProperty("IsRequired") + val isRequired: kotlin.Boolean, + // Category of the fee / Coverages + @JsonProperty("FinanceCategory") + val financeCategory: kotlin.String, + // Sub category of the fee / Coverages . + @JsonProperty("FinanceSubCategory") + val financeSubCategory: kotlin.String, + @JsonProperty("Amount") + val amount: CarsMoney, + // Description of the fee. + @JsonProperty("Description") + val description: kotlin.String? = null, + @JsonProperty("Deductible") + val deductible: Deductible? = null, ) { - - - init { - require(isRequired != null) { "isRequired must not be null" } - - - - - - + require(isRequired != null) { "isRequired must not be null" } require(financeCategory != null) { "financeCategory must not be null" } - - - - - - require(financeSubCategory != null) { "financeSubCategory must not be null" } - - - - - - require(amount != null) { "amount must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var isRequired: kotlin.Boolean? = null, + private var financeCategory: kotlin.String? = null, + private var financeSubCategory: kotlin.String? = null, + private var amount: CarsMoney? = null, + private var description: kotlin.String? = null, + private var deductible: Deductible? = null, + ) { + fun isRequired(isRequired: kotlin.Boolean) = apply { this.isRequired = isRequired } + fun financeCategory(financeCategory: kotlin.String) = apply { this.financeCategory = financeCategory } + fun financeSubCategory(financeSubCategory: kotlin.String) = apply { this.financeSubCategory = financeSubCategory } + fun amount(amount: CarsMoney) = apply { this.amount = amount } + fun description(description: kotlin.String?) = apply { this.description = description } + fun deductible(deductible: Deductible?) = apply { this.deductible = deductible } + fun build(): AdditionalFee { + val instance = + AdditionalFee( + isRequired = isRequired!!, + financeCategory = financeCategory!!, + financeSubCategory = financeSubCategory!!, + amount = amount!!, + description = description, + deductible = deductible, + ) - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var isRequired: kotlin.Boolean? = null, - private var financeCategory: kotlin.String? = null, - private var financeSubCategory: kotlin.String? = null, - private var amount: CarsMoney? = null, - private var description: kotlin.String? = null, - private var deductible: Deductible? = null - ) { - fun isRequired(isRequired: kotlin.Boolean) = apply { this.isRequired = isRequired } - fun financeCategory(financeCategory: kotlin.String) = apply { this.financeCategory = financeCategory } - fun financeSubCategory(financeSubCategory: kotlin.String) = apply { this.financeSubCategory = financeSubCategory } - fun amount(amount: CarsMoney) = apply { this.amount = amount } - fun description(description: kotlin.String?) = apply { this.description = description } - fun deductible(deductible: Deductible?) = apply { this.deductible = deductible } - - fun build(): AdditionalFee { - val instance = AdditionalFee( - isRequired = isRequired!!, - financeCategory = financeCategory!!, - financeSubCategory = financeSubCategory!!, - amount = amount!!, - description = description, - deductible = deductible - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( isRequired = isRequired!!, financeCategory = financeCategory!!, financeSubCategory = financeSubCategory!!, amount = amount!!, description = description, - deductible = deductible - ) + deductible = deductible, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt index bb76b3a58..84feff4d6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Address.kt @@ -15,132 +15,87 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * The address information of the location. - * @param address1 Street Number, Street Name, or PO Box - * @param address2 Apartment, Floor, Suite, Bldg or more specific information about Address1. - * @param city The city - * @param province The state or province - * @param country 3-letter code for the country - * @param postalCode Zip/postal code + * @param address1 Street Number, Street Name, or PO Box + * @param address2 Apartment, Floor, Suite, Bldg or more specific information about Address1. + * @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 Address( - /* Street Number, Street Name, or PO Box */ -@JsonProperty("Address1") -val address1: kotlin.String? = null, - - /* Apartment, Floor, Suite, Bldg or more specific information about Address1. */ -@JsonProperty("Address2") -val address2: kotlin.String? = null, - - /* The city */ -@JsonProperty("City") -val city: kotlin.String? = null, - - /* The state or province */ -@JsonProperty("Province") -val province: kotlin.String? = null, - - /* 3-letter code for the country */ -@JsonProperty("Country") -val country: kotlin.String? = null, - - /* Zip/postal code */ -@JsonProperty("PostalCode") -val postalCode: kotlin.String? = null + // Street Number, Street Name, or PO Box + @JsonProperty("Address1") + val address1: kotlin.String? = null, + // Apartment, Floor, Suite, Bldg or more specific information about Address1. + @JsonProperty("Address2") + val address2: kotlin.String? = null, + // The city + @JsonProperty("City") + val city: kotlin.String? = null, + // The state or province + @JsonProperty("Province") + val province: kotlin.String? = null, + // 3-letter code for the country + @JsonProperty("Country") + val country: kotlin.String? = null, + // Zip/postal code + @JsonProperty("PostalCode") + val postalCode: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var address1: kotlin.String? = null, + private var address2: 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 city(city: kotlin.String?) = apply { this.city = city } - } + fun province(province: kotlin.String?) = apply { this.province = province } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun country(country: kotlin.String?) = apply { this.country = country } - class Builder( - private var address1: kotlin.String? = null, - private var address2: 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 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 postalCode(postalCode: kotlin.String?) = apply { this.postalCode = postalCode } - fun build(): Address { - val instance = Address( - address1 = address1, - address2 = address2, - city = city, - province = province, - country = country, - postalCode = postalCode - ) + fun build(): Address { + val instance = + Address( + address1 = address1, + address2 = address2, + city = city, + province = province, + country = country, + postalCode = postalCode, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( address1 = address1, address2 = address2, city = city, province = province, country = country, - postalCode = postalCode - ) + postalCode = postalCode, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt index 66cea9d59..4f20e32f6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AgeClassRestriction.kt @@ -15,124 +15,95 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for room occupancy rules based on the age of the guests. - * @param ageClass Categories for hotel guests, based on age. - * @param ageMinimum The minimum age defined in a particular `AgeClass`. - * @param ageMaximum The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. - * @param maxGuestCount The max guest count allowed in a particular `AgeClass`. + * @param ageClass Categories for hotel guests, based on age. + * @param ageMinimum The minimum age defined in a particular `AgeClass`. + * @param ageMaximum The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. + * @param maxGuestCount The max guest count allowed in a particular `AgeClass`. */ data class AgeClassRestriction( - /* Categories for hotel guests, based on age. */ -@JsonProperty("AgeClass") -val ageClass: AgeClassRestriction.AgeClass? = null, - - /* The minimum age defined in a particular `AgeClass`. */ -@JsonProperty("AgeMinimum") -val ageMinimum: kotlin.Int? = null, - - /* The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. */ -@JsonProperty("AgeMaximum") -val ageMaximum: kotlin.Int? = null, - - /* The max guest count allowed in a particular `AgeClass`. */ -@JsonProperty("MaxGuestCount") -val maxGuestCount: kotlin.Int? = null + // Categories for hotel guests, based on age. + @JsonProperty("AgeClass") + val ageClass: AgeClassRestriction.AgeClass? = null, + // The minimum age defined in a particular `AgeClass`. + @JsonProperty("AgeMinimum") + val ageMinimum: kotlin.Int? = null, + // The maximum age defined in a particular `AgeClass`. If not specified, the `AgeClass` has no upper bound. + @JsonProperty("AgeMaximum") + val ageMaximum: kotlin.Int? = null, + // The max guest count allowed in a particular `AgeClass`. + @JsonProperty("MaxGuestCount") + val maxGuestCount: kotlin.Int? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var ageClass: AgeClassRestriction.AgeClass? = null, + private var ageMinimum: kotlin.Int? = null, + private var ageMaximum: kotlin.Int? = null, + private var maxGuestCount: kotlin.Int? = null, + ) { + fun ageClass(ageClass: AgeClassRestriction.AgeClass?) = apply { this.ageClass = ageClass } + fun ageMinimum(ageMinimum: kotlin.Int?) = apply { this.ageMinimum = ageMinimum } + fun ageMaximum(ageMaximum: kotlin.Int?) = apply { this.ageMaximum = ageMaximum } + fun maxGuestCount(maxGuestCount: kotlin.Int?) = apply { this.maxGuestCount = maxGuestCount } + fun build(): AgeClassRestriction { + val instance = + AgeClassRestriction( + ageClass = ageClass, + ageMinimum = ageMinimum, + ageMaximum = ageMaximum, + maxGuestCount = maxGuestCount, + ) + return instance + } + } + fun toBuilder() = + Builder( + ageClass = ageClass, + ageMinimum = ageMinimum, + ageMaximum = ageMaximum, + maxGuestCount = maxGuestCount, + ) + /** + * Categories for hotel guests, based on age. + * Values: ALL_AGES,SENIOR,ADULT,CHILD,INFANT,OTHER + */ + enum class AgeClass( + val value: kotlin.String, + ) { + @JsonProperty("All Ages") + ALL_AGES("All Ages"), + @JsonProperty("Senior") + SENIOR("Senior"), - } + @JsonProperty("Adult") + ADULT("Adult"), - companion object { - @JvmStatic - fun builder() = Builder() - } + @JsonProperty("Child") + CHILD("Child"), - class Builder( - private var ageClass: AgeClassRestriction.AgeClass? = null, - private var ageMinimum: kotlin.Int? = null, - private var ageMaximum: kotlin.Int? = null, - private var maxGuestCount: kotlin.Int? = null - ) { - fun ageClass(ageClass: AgeClassRestriction.AgeClass?) = apply { this.ageClass = ageClass } - fun ageMinimum(ageMinimum: kotlin.Int?) = apply { this.ageMinimum = ageMinimum } - fun ageMaximum(ageMaximum: kotlin.Int?) = apply { this.ageMaximum = ageMaximum } - fun maxGuestCount(maxGuestCount: kotlin.Int?) = apply { this.maxGuestCount = maxGuestCount } - - fun build(): AgeClassRestriction { - val instance = AgeClassRestriction( - ageClass = ageClass, - ageMinimum = ageMinimum, - ageMaximum = ageMaximum, - maxGuestCount = maxGuestCount - ) + @JsonProperty("Infant") + INFANT("Infant"), - return instance + @JsonProperty("Other") + OTHER("Other"), } - } - - fun toBuilder() = Builder( - ageClass = ageClass, - ageMinimum = ageMinimum, - ageMaximum = ageMaximum, - maxGuestCount = maxGuestCount - ) - - /** - * Categories for hotel guests, based on age. - * Values: ALL_AGES,SENIOR,ADULT,CHILD,INFANT,OTHER - */ - enum class AgeClass(val value: kotlin.String) { - @JsonProperty("All Ages") - ALL_AGES("All Ages"), - - @JsonProperty("Senior") - SENIOR("Senior"), - - @JsonProperty("Adult") - ADULT("Adult"), - - @JsonProperty("Child") - CHILD("Child"), - - @JsonProperty("Infant") - INFANT("Infant"), - - @JsonProperty("Other") - OTHER("Other"); - } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt index 391ccea75..9cbda940c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendar.kt @@ -16,147 +16,95 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.DateRange - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param propertyId The unique property identifier that designates a single property. - * @param dateRange - * @param availability A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* - * @param changeOver A string of codes that shows changeover action, one for every day in the specified date range. Valid values include - X (no action possible) - C (check-in, checkout) - O (checkout only) - I (check-in only) ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. All actions are possible if not returned.* - * @param minPriorNotify A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* - * @param minStay A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* - * @param maxStay A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. +* + * @param propertyId The unique property identifier that designates a single property. + * @param dateRange + * @param availability A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* + * @param changeOver A string of codes that shows changeover action, one for every day in the specified date range. Valid values include - X (no action possible) - C (check-in, checkout) - O (checkout only) - I (check-in only) ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. All actions are possible if not returned.* + * @param minPriorNotify A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* + * @param minStay A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* + * @param maxStay A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. */ data class AvailabilityCalendar( - /* The unique property identifier that designates a single property. */ -@JsonProperty("PropertyId") -val propertyId: kotlin.String? = null, - - @JsonProperty("DateRange") -val dateRange: DateRange? = null, - - /* A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* */ -@JsonProperty("Availability") -val availability: kotlin.String? = null, - - /* A string of codes that shows changeover action, one for every day in the specified date range. Valid values include - X (no action possible) - C (check-in, checkout) - O (checkout only) - I (check-in only) ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. All actions are possible if not returned.* */ -@JsonProperty("ChangeOver") -val changeOver: kotlin.String? = null, - - /* A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* */ -@JsonProperty("MinPriorNotify") -val minPriorNotify: kotlin.String? = null, - - /* A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* */ -@JsonProperty("MinStay") -val minStay: kotlin.String? = null, - - /* A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. */ -@JsonProperty("MaxStay") -val maxStay: kotlin.String? = null + // The unique property identifier that designates a single property. + @JsonProperty("PropertyId") + val propertyId: kotlin.String? = null, + @JsonProperty("DateRange") + val dateRange: DateRange? = null, + // A string of codes that shows property availability, one for every day in the specified date range. Valid values include Y (available) and N (unavailable). ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`.* + @JsonProperty("Availability") + val availability: kotlin.String? = null, + // A string of codes that shows changeover action, one for every day in the specified date range. Valid values include - X (no action possible) - C (check-in, checkout) - O (checkout only) - I (check-in only) ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. All actions are possible if not returned.* + @JsonProperty("ChangeOver") + val changeOver: kotlin.String? = null, + // A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification required for a given day. The unit is always day. ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* + @JsonProperty("MinPriorNotify") + val minPriorNotify: kotlin.String? = null, + // A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned.* + @JsonProperty("MinStay") + val minStay: kotlin.String? = null, + // A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every day in the specified date range. Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the last one stands for the `EndDate`. No limitation if not returned. + @JsonProperty("MaxStay") + val maxStay: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var propertyId: kotlin.String? = null, + private var dateRange: DateRange? = null, + private var availability: kotlin.String? = null, + private var changeOver: kotlin.String? = null, + private var minPriorNotify: kotlin.String? = null, + private var minStay: kotlin.String? = null, + private var maxStay: kotlin.String? = null, + ) { + fun propertyId(propertyId: kotlin.String?) = apply { this.propertyId = propertyId } + fun dateRange(dateRange: DateRange?) = apply { this.dateRange = dateRange } + fun availability(availability: kotlin.String?) = apply { this.availability = availability } + fun changeOver(changeOver: kotlin.String?) = apply { this.changeOver = changeOver } - } + fun minPriorNotify(minPriorNotify: kotlin.String?) = apply { this.minPriorNotify = minPriorNotify } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun minStay(minStay: kotlin.String?) = apply { this.minStay = minStay } - class Builder( - private var propertyId: kotlin.String? = null, - private var dateRange: DateRange? = null, - private var availability: kotlin.String? = null, - private var changeOver: kotlin.String? = null, - private var minPriorNotify: kotlin.String? = null, - private var minStay: kotlin.String? = null, - private var maxStay: kotlin.String? = null - ) { - fun propertyId(propertyId: kotlin.String?) = apply { this.propertyId = propertyId } - fun dateRange(dateRange: DateRange?) = apply { this.dateRange = dateRange } - fun availability(availability: kotlin.String?) = apply { this.availability = availability } - fun changeOver(changeOver: kotlin.String?) = apply { this.changeOver = changeOver } - fun minPriorNotify(minPriorNotify: kotlin.String?) = apply { this.minPriorNotify = minPriorNotify } - fun minStay(minStay: kotlin.String?) = apply { this.minStay = minStay } - fun maxStay(maxStay: kotlin.String?) = apply { this.maxStay = maxStay } + fun maxStay(maxStay: kotlin.String?) = apply { this.maxStay = maxStay } - fun build(): AvailabilityCalendar { - val instance = AvailabilityCalendar( - propertyId = propertyId, - dateRange = dateRange, - availability = availability, - changeOver = changeOver, - minPriorNotify = minPriorNotify, - minStay = minStay, - maxStay = maxStay - ) + fun build(): AvailabilityCalendar { + val instance = + AvailabilityCalendar( + propertyId = propertyId, + dateRange = dateRange, + availability = availability, + changeOver = changeOver, + minPriorNotify = minPriorNotify, + minStay = minStay, + maxStay = maxStay, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( propertyId = propertyId, dateRange = dateRange, availability = availability, changeOver = changeOver, minPriorNotify = minPriorNotify, minStay = minStay, - maxStay = maxStay - ) + maxStay = maxStay, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt index d0b74bcd7..5d105f2ea 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailabilityCalendarResponse.kt @@ -17,84 +17,60 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.AvailabilityCalendar import com.expediagroup.sdk.xap.models.LodgingWarning - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param transactionId Unique identifier for the transaction. - * @param availabilityCalendars A list of the calendar entities. +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param transactionId Unique identifier for the transaction. + * @param availabilityCalendars A list of the calendar entities. */ data class AvailabilityCalendarResponse( - /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - /* Unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: kotlin.String? = null, - - /* A list of the calendar entities. */ -@JsonProperty("AvailabilityCalendars") -val availabilityCalendars: kotlin.collections.List? = null + // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + // Unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String? = null, + // A list of the calendar entities. + @JsonProperty("AvailabilityCalendars") + val availabilityCalendars: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null, - private var availabilityCalendars: kotlin.collections.List? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - fun availabilityCalendars(availabilityCalendars: kotlin.collections.List?) = apply { this.availabilityCalendars = availabilityCalendars } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + private var availabilityCalendars: kotlin.collections.List? = null, + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun build(): AvailabilityCalendarResponse { - val instance = AvailabilityCalendarResponse( - warnings = warnings, - transactionId = transactionId, - availabilityCalendars = availabilityCalendars - ) + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - return instance - } + fun availabilityCalendars(availabilityCalendars: kotlin.collections.List?) = apply { this.availabilityCalendars = availabilityCalendars } + + fun build(): AvailabilityCalendarResponse { + val instance = + AvailabilityCalendarResponse( + warnings = warnings, + transactionId = transactionId, + availabilityCalendars = availabilityCalendars, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( warnings = warnings, transactionId = transactionId, - availabilityCalendars = availabilityCalendars - ) + availabilityCalendars = availabilityCalendars, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt index b86ef5b40..70a55cf16 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt @@ -17,116 +17,78 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesCancellationPolicy import com.expediagroup.sdk.xap.models.Ticket - import com.fasterxml.jackson.annotation.JsonProperty /** * The list of available Time Slots for the activity. - * @param dateTime The date and time when the activity happens. - * @param allDayActivity Indicates whether the activity is an all-day activity. - * @param cancellationPolicy - * @param tickets Container for ticket information. + * @param dateTime The date and time when the activity happens. + * @param allDayActivity Indicates whether the activity is an all-day activity. + * @param cancellationPolicy + * @param tickets Container for ticket information. */ data class AvailableTimeSlot( - /* The date and time when the activity happens. */ -@JsonProperty("DateTime") -val dateTime: - java.time.LocalDateTime -, - - /* Indicates whether the activity is an all-day activity. */ -@JsonProperty("AllDayActivity") -val allDayActivity: - kotlin.Boolean -, - - @JsonProperty("CancellationPolicy") -val cancellationPolicy: - ActivitiesCancellationPolicy -, - - /* Container for ticket information. */ -@JsonProperty("Tickets") -val tickets: - kotlin.collections. - List -< - Ticket -> - - + // The date and time when the activity happens. + @JsonProperty("DateTime") + val dateTime: java.time.LocalDateTime, + // Indicates whether the activity is an all-day activity. + @JsonProperty("AllDayActivity") + val allDayActivity: kotlin.Boolean, + @JsonProperty("CancellationPolicy") + val cancellationPolicy: ActivitiesCancellationPolicy, + // Container for ticket information. + @JsonProperty("Tickets") + val tickets: kotlin.collections + .List< + Ticket, + >, ) { - - - init { - require(dateTime != null) { "dateTime must not be null" } - - - - - - + require(dateTime != null) { "dateTime must not be null" } require(allDayActivity != null) { "allDayActivity must not be null" } - - - - - - require(cancellationPolicy != null) { "cancellationPolicy must not be null" } - - - - - - require(tickets != null) { "tickets must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var dateTime: java.time.LocalDateTime? = null, - private var allDayActivity: kotlin.Boolean? = null, - private var cancellationPolicy: ActivitiesCancellationPolicy? = null, - private var tickets: kotlin.collections.List? = null - ) { - fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } - fun allDayActivity(allDayActivity: kotlin.Boolean) = apply { this.allDayActivity = allDayActivity } - fun cancellationPolicy(cancellationPolicy: ActivitiesCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } - fun tickets(tickets: kotlin.collections.List) = apply { this.tickets = tickets } + class Builder( + private var dateTime: java.time.LocalDateTime? = null, + private var allDayActivity: kotlin.Boolean? = null, + private var cancellationPolicy: ActivitiesCancellationPolicy? = null, + private var tickets: kotlin.collections.List? = null, + ) { + fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } - fun build(): AvailableTimeSlot { - val instance = AvailableTimeSlot( - dateTime = dateTime!!, - allDayActivity = allDayActivity!!, - cancellationPolicy = cancellationPolicy!!, - tickets = tickets!! - ) + fun allDayActivity(allDayActivity: kotlin.Boolean) = apply { this.allDayActivity = allDayActivity } - return instance - } + fun cancellationPolicy(cancellationPolicy: ActivitiesCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } + + fun tickets(tickets: kotlin.collections.List) = apply { this.tickets = tickets } + + fun build(): AvailableTimeSlot { + val instance = + AvailableTimeSlot( + dateTime = dateTime!!, + allDayActivity = allDayActivity!!, + cancellationPolicy = cancellationPolicy!!, + tickets = tickets!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( dateTime = dateTime!!, allDayActivity = allDayActivity!!, cancellationPolicy = cancellationPolicy!!, - tickets = tickets!! - ) + tickets = tickets!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt index be9f29768..576476d3c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/BedType.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - * @param id The bed type ID - * @param description The bed type description. +* Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + * @param id The bed type ID + * @param description The bed type description. */ data class BedType( - /* The bed type ID */ -@JsonProperty("Id") -val id: kotlin.String? = null, - - /* The bed type description. */ -@JsonProperty("Description") -val description: kotlin.String? = null + // The bed type ID + @JsonProperty("Id") + val id: kotlin.String? = null, + // The bed type description. + @JsonProperty("Description") + val description: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - fun description(description: kotlin.String?) = apply { this.description = description } + class Builder( + private var id: kotlin.String? = null, + private var description: kotlin.String? = null, + ) { + fun id(id: kotlin.String?) = apply { this.id = id } - fun build(): BedType { - val instance = BedType( - id = id, - description = description - ) + fun description(description: kotlin.String?) = apply { this.description = description } - return instance - } + fun build(): BedType { + val instance = + BedType( + id = id, + description = description, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id, - description = description - ) + description = description, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt index b0358376d..2ff18c011 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRule.kt @@ -16,115 +16,77 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CancellationPenaltyRulePenaltyPrice - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param penaltyNightCount Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. - * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. - * @param penaltyPrice - * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. - * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. +* + * @param penaltyNightCount Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. + * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. + * @param penaltyPrice + * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. + * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. */ data class CancellationPenaltyRule( - /* Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. */ -@JsonProperty("PenaltyNightCount") -val penaltyNightCount: kotlin.Int? = null, - - /* Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. */ -@JsonProperty("PenaltyPercentOfStay") -val penaltyPercentOfStay: kotlin.String? = null, - - @JsonProperty("PenaltyPrice") -val penaltyPrice: CancellationPenaltyRulePenaltyPrice? = null, - - /* The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. */ -@JsonProperty("PenaltyStartDateTime") -val penaltyStartDateTime: java.time.OffsetDateTime? = null, - - /* The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. */ -@JsonProperty("PenaltyEndDateTime") -val penaltyEndDateTime: java.time.OffsetDateTime? = null + // Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. + @JsonProperty("PenaltyNightCount") + val penaltyNightCount: kotlin.Int? = null, + // Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. + @JsonProperty("PenaltyPercentOfStay") + val penaltyPercentOfStay: kotlin.String? = null, + @JsonProperty("PenaltyPrice") + val penaltyPrice: CancellationPenaltyRulePenaltyPrice? = null, + // The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. + @JsonProperty("PenaltyStartDateTime") + val penaltyStartDateTime: java.time.OffsetDateTime? = null, + // The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the hotel. + @JsonProperty("PenaltyEndDateTime") + val penaltyEndDateTime: java.time.OffsetDateTime? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var penaltyNightCount: kotlin.Int? = null, + private var penaltyPercentOfStay: kotlin.String? = null, + private var penaltyPrice: CancellationPenaltyRulePenaltyPrice? = null, + private var penaltyStartDateTime: java.time.OffsetDateTime? = null, + private var penaltyEndDateTime: java.time.OffsetDateTime? = null, + ) { + fun penaltyNightCount(penaltyNightCount: kotlin.Int?) = apply { this.penaltyNightCount = penaltyNightCount } + fun penaltyPercentOfStay(penaltyPercentOfStay: kotlin.String?) = apply { this.penaltyPercentOfStay = penaltyPercentOfStay } - } + fun penaltyPrice(penaltyPrice: CancellationPenaltyRulePenaltyPrice?) = apply { this.penaltyPrice = penaltyPrice } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun penaltyStartDateTime(penaltyStartDateTime: java.time.OffsetDateTime?) = apply { this.penaltyStartDateTime = penaltyStartDateTime } - class Builder( - private var penaltyNightCount: kotlin.Int? = null, - private var penaltyPercentOfStay: kotlin.String? = null, - private var penaltyPrice: CancellationPenaltyRulePenaltyPrice? = null, - private var penaltyStartDateTime: java.time.OffsetDateTime? = null, - private var penaltyEndDateTime: java.time.OffsetDateTime? = null - ) { - fun penaltyNightCount(penaltyNightCount: kotlin.Int?) = apply { this.penaltyNightCount = penaltyNightCount } - fun penaltyPercentOfStay(penaltyPercentOfStay: kotlin.String?) = apply { this.penaltyPercentOfStay = penaltyPercentOfStay } - fun penaltyPrice(penaltyPrice: CancellationPenaltyRulePenaltyPrice?) = apply { this.penaltyPrice = penaltyPrice } - fun penaltyStartDateTime(penaltyStartDateTime: java.time.OffsetDateTime?) = apply { this.penaltyStartDateTime = penaltyStartDateTime } - fun penaltyEndDateTime(penaltyEndDateTime: java.time.OffsetDateTime?) = apply { this.penaltyEndDateTime = penaltyEndDateTime } + fun penaltyEndDateTime(penaltyEndDateTime: java.time.OffsetDateTime?) = apply { this.penaltyEndDateTime = penaltyEndDateTime } - fun build(): CancellationPenaltyRule { - val instance = CancellationPenaltyRule( - penaltyNightCount = penaltyNightCount, - penaltyPercentOfStay = penaltyPercentOfStay, - penaltyPrice = penaltyPrice, - penaltyStartDateTime = penaltyStartDateTime, - penaltyEndDateTime = penaltyEndDateTime - ) + fun build(): CancellationPenaltyRule { + val instance = + CancellationPenaltyRule( + penaltyNightCount = penaltyNightCount, + penaltyPercentOfStay = penaltyPercentOfStay, + penaltyPrice = penaltyPrice, + penaltyStartDateTime = penaltyStartDateTime, + penaltyEndDateTime = penaltyEndDateTime, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( penaltyNightCount = penaltyNightCount, penaltyPercentOfStay = penaltyPercentOfStay, penaltyPrice = penaltyPrice, penaltyStartDateTime = penaltyStartDateTime, - penaltyEndDateTime = penaltyEndDateTime - ) + penaltyEndDateTime = penaltyEndDateTime, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt index b496986ac..b4c7cd623 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPenaltyRulePenaltyPrice.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class CancellationPenaltyRulePenaltyPrice( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): CancellationPenaltyRulePenaltyPrice { - val instance = CancellationPenaltyRulePenaltyPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): CancellationPenaltyRulePenaltyPrice { + val instance = + CancellationPenaltyRulePenaltyPrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt index c07f39e5e..e1d667006 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CancellationPolicy.kt @@ -18,156 +18,97 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CancellationPenaltyRule import com.expediagroup.sdk.xap.models.NonRefundableDateRange import com.expediagroup.sdk.xap.models.WaiverPolicy - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for room cancellation policy. - * @param waiverPolicy - * @param cancellableOnline Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. - * @param refundable Indicate whether the rate is refundable or not. - * @param freeCancellation Indicate whether the room can be cancelled free of charge. - * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. This is expressed in the local time of the Hotel. - * @param cancellationPenaltyRules Container for cancellation penalty details. - * @param cancelPolicyDescription Additional cancellation policy information available as static text. - * @param nonRefundableDateRanges A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. + * @param waiverPolicy + * @param cancellableOnline Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. + * @param refundable Indicate whether the rate is refundable or not. + * @param freeCancellation Indicate whether the room can be cancelled free of charge. + * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. This is expressed in the local time of the Hotel. + * @param cancellationPenaltyRules Container for cancellation penalty details. + * @param cancelPolicyDescription Additional cancellation policy information available as static text. + * @param nonRefundableDateRanges A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. */ data class CancellationPolicy( - @JsonProperty("WaiverPolicy") -val waiverPolicy: WaiverPolicy? = null, - - /* Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. */ -@JsonProperty("CancellableOnline") -val cancellableOnline: kotlin.Boolean? = null, - - /* Indicate whether the rate is refundable or not. */ -@JsonProperty("Refundable") -val refundable: kotlin.Boolean? = null, - - /* Indicate whether the room can be cancelled free of charge. */ -@JsonProperty("FreeCancellation") -val freeCancellation: kotlin.Boolean? = null, - - /* The date and time until which the room can be cancelled free of charge. This is expressed in the local time of the Hotel. */ -@JsonProperty("FreeCancellationEndDateTime") -val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, - - /* Container for cancellation penalty details. */ -@JsonProperty("CancellationPenaltyRules") -val cancellationPenaltyRules: kotlin.collections.List? = null, - - /* Additional cancellation policy information available as static text. */ -@JsonProperty("CancelPolicyDescription") -val cancelPolicyDescription: kotlin.String? = null, - - /* A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. */ -@JsonProperty("NonRefundableDateRanges") -val nonRefundableDateRanges: kotlin.collections.List? = null + @JsonProperty("WaiverPolicy") + val waiverPolicy: WaiverPolicy? = null, + // Boolean value to identify if the reservation can be cancelled online. If false, the customer will only be able to cancel a refundable room by calling Expedia Customer Service. + @JsonProperty("CancellableOnline") + val cancellableOnline: kotlin.Boolean? = null, + // Indicate whether the rate is refundable or not. + @JsonProperty("Refundable") + val refundable: kotlin.Boolean? = null, + // Indicate whether the room can be cancelled free of charge. + @JsonProperty("FreeCancellation") + val freeCancellation: kotlin.Boolean? = null, + // The date and time until which the room can be cancelled free of charge. This is expressed in the local time of the Hotel. + @JsonProperty("FreeCancellationEndDateTime") + val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + // Container for cancellation penalty details. + @JsonProperty("CancellationPenaltyRules") + val cancellationPenaltyRules: kotlin.collections.List? = null, + // Additional cancellation policy information available as static text. + @JsonProperty("CancelPolicyDescription") + val cancelPolicyDescription: kotlin.String? = null, + // A list of dates ranges that are non-refundable. **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation penalty rule. + @JsonProperty("NonRefundableDateRanges") + val nonRefundableDateRanges: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var waiverPolicy: WaiverPolicy? = null, + private var cancellableOnline: kotlin.Boolean? = null, + private var refundable: kotlin.Boolean? = null, + private var freeCancellation: kotlin.Boolean? = null, + private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + private var cancellationPenaltyRules: kotlin.collections.List? = null, + private var cancelPolicyDescription: kotlin.String? = null, + private var nonRefundableDateRanges: kotlin.collections.List? = null, + ) { + fun waiverPolicy(waiverPolicy: WaiverPolicy?) = apply { this.waiverPolicy = waiverPolicy } + fun cancellableOnline(cancellableOnline: kotlin.Boolean?) = apply { this.cancellableOnline = cancellableOnline } + fun refundable(refundable: kotlin.Boolean?) = apply { this.refundable = refundable } + fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - } + fun cancellationPenaltyRules(cancellationPenaltyRules: kotlin.collections.List?) = apply { this.cancellationPenaltyRules = cancellationPenaltyRules } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun cancelPolicyDescription(cancelPolicyDescription: kotlin.String?) = apply { this.cancelPolicyDescription = cancelPolicyDescription } - class Builder( - private var waiverPolicy: WaiverPolicy? = null, - private var cancellableOnline: kotlin.Boolean? = null, - private var refundable: kotlin.Boolean? = null, - private var freeCancellation: kotlin.Boolean? = null, - private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, - private var cancellationPenaltyRules: kotlin.collections.List? = null, - private var cancelPolicyDescription: kotlin.String? = null, - private var nonRefundableDateRanges: kotlin.collections.List? = null - ) { - fun waiverPolicy(waiverPolicy: WaiverPolicy?) = apply { this.waiverPolicy = waiverPolicy } - fun cancellableOnline(cancellableOnline: kotlin.Boolean?) = apply { this.cancellableOnline = cancellableOnline } - fun refundable(refundable: kotlin.Boolean?) = apply { this.refundable = refundable } - fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - fun cancellationPenaltyRules(cancellationPenaltyRules: kotlin.collections.List?) = apply { this.cancellationPenaltyRules = cancellationPenaltyRules } - fun cancelPolicyDescription(cancelPolicyDescription: kotlin.String?) = apply { this.cancelPolicyDescription = cancelPolicyDescription } - fun nonRefundableDateRanges(nonRefundableDateRanges: kotlin.collections.List?) = apply { this.nonRefundableDateRanges = nonRefundableDateRanges } + fun nonRefundableDateRanges(nonRefundableDateRanges: kotlin.collections.List?) = apply { this.nonRefundableDateRanges = nonRefundableDateRanges } - fun build(): CancellationPolicy { - val instance = CancellationPolicy( - waiverPolicy = waiverPolicy, - cancellableOnline = cancellableOnline, - refundable = refundable, - freeCancellation = freeCancellation, - freeCancellationEndDateTime = freeCancellationEndDateTime, - cancellationPenaltyRules = cancellationPenaltyRules, - cancelPolicyDescription = cancelPolicyDescription, - nonRefundableDateRanges = nonRefundableDateRanges - ) + fun build(): CancellationPolicy { + val instance = + CancellationPolicy( + waiverPolicy = waiverPolicy, + cancellableOnline = cancellableOnline, + refundable = refundable, + freeCancellation = freeCancellation, + freeCancellationEndDateTime = freeCancellationEndDateTime, + cancellationPenaltyRules = cancellationPenaltyRules, + cancelPolicyDescription = cancelPolicyDescription, + nonRefundableDateRanges = nonRefundableDateRanges, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( waiverPolicy = waiverPolicy, cancellableOnline = cancellableOnline, refundable = refundable, @@ -175,6 +116,6 @@ val nonRefundableDateRanges: kotlin.collections.List? = freeCancellationEndDateTime = freeCancellationEndDateTime, cancellationPenaltyRules = cancellationPenaltyRules, cancelPolicyDescription = cancelPolicyDescription, - nonRefundableDateRanges = nonRefundableDateRanges - ) + nonRefundableDateRanges = nonRefundableDateRanges, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt index 3f99f467d..9b7489776 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Capacity.kt @@ -15,103 +15,70 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Capacity for car's properties. - * @param adultCount The typical number of adults that can fit comfortably in the car. - * @param childCount The typical number of children that can fit comfortably in the car. - * @param smallLuggageCount The typical number of small pieces of luggage that fit in the cargo space. - * @param largeLuggageCount The typical number of large pieces of luggage that fit in the cargo space. + * @param adultCount The typical number of adults that can fit comfortably in the car. + * @param childCount The typical number of children that can fit comfortably in the car. + * @param smallLuggageCount The typical number of small pieces of luggage that fit in the cargo space. + * @param largeLuggageCount The typical number of large pieces of luggage that fit in the cargo space. */ data class Capacity( - /* The typical number of adults that can fit comfortably in the car. */ -@JsonProperty("AdultCount") -val adultCount: - kotlin.Long -, - - /* The typical number of children that can fit comfortably in the car. */ -@JsonProperty("ChildCount") -val childCount: kotlin.Long? = null, - - /* The typical number of small pieces of luggage that fit in the cargo space. */ -@JsonProperty("SmallLuggageCount") -val smallLuggageCount: kotlin.Long? = null, - - /* The typical number of large pieces of luggage that fit in the cargo space. */ -@JsonProperty("LargeLuggageCount") -val largeLuggageCount: kotlin.Long? = null + // The typical number of adults that can fit comfortably in the car. + @JsonProperty("AdultCount") + val adultCount: kotlin.Long, + // The typical number of children that can fit comfortably in the car. + @JsonProperty("ChildCount") + val childCount: kotlin.Long? = null, + // The typical number of small pieces of luggage that fit in the cargo space. + @JsonProperty("SmallLuggageCount") + val smallLuggageCount: kotlin.Long? = null, + // The typical number of large pieces of luggage that fit in the cargo space. + @JsonProperty("LargeLuggageCount") + val largeLuggageCount: kotlin.Long? = null, ) { - - - init { - require(adultCount != null) { "adultCount must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + require(adultCount != null) { "adultCount must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var adultCount: kotlin.Long? = null, - private var childCount: kotlin.Long? = null, - private var smallLuggageCount: kotlin.Long? = null, - private var largeLuggageCount: kotlin.Long? = null - ) { - fun adultCount(adultCount: kotlin.Long) = apply { this.adultCount = adultCount } - fun childCount(childCount: kotlin.Long?) = apply { this.childCount = childCount } - fun smallLuggageCount(smallLuggageCount: kotlin.Long?) = apply { this.smallLuggageCount = smallLuggageCount } - fun largeLuggageCount(largeLuggageCount: kotlin.Long?) = apply { this.largeLuggageCount = largeLuggageCount } + class Builder( + private var adultCount: kotlin.Long? = null, + private var childCount: kotlin.Long? = null, + private var smallLuggageCount: kotlin.Long? = null, + private var largeLuggageCount: kotlin.Long? = null, + ) { + fun adultCount(adultCount: kotlin.Long) = apply { this.adultCount = adultCount } - fun build(): Capacity { - val instance = Capacity( - adultCount = adultCount!!, - childCount = childCount, - smallLuggageCount = smallLuggageCount, - largeLuggageCount = largeLuggageCount - ) + fun childCount(childCount: kotlin.Long?) = apply { this.childCount = childCount } - return instance - } + fun smallLuggageCount(smallLuggageCount: kotlin.Long?) = apply { this.smallLuggageCount = smallLuggageCount } + + fun largeLuggageCount(largeLuggageCount: kotlin.Long?) = apply { this.largeLuggageCount = largeLuggageCount } + + fun build(): Capacity { + val instance = + Capacity( + adultCount = adultCount!!, + childCount = childCount, + smallLuggageCount = smallLuggageCount, + largeLuggageCount = largeLuggageCount, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( adultCount = adultCount!!, childCount = childCount, smallLuggageCount = smallLuggageCount, - largeLuggageCount = largeLuggageCount - ) + largeLuggageCount = largeLuggageCount, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt index 04fb1e557..94b1d693e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Car.kt @@ -27,303 +27,173 @@ import com.expediagroup.sdk.xap.models.RatingWithoutDetails import com.expediagroup.sdk.xap.models.Supplier import com.expediagroup.sdk.xap.models.VehicleDetails import com.expediagroup.sdk.xap.models.VendorLocationDetails - import com.fasterxml.jackson.annotation.JsonProperty /** * List of cars matching the search criteria. - * @param id Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. - * @param vehicleDetails - * @param supplier - * @param pickupDetails - * @param dropOffDetails - * @param price - * @param cancellationPolicy - * @param dataTimeStamp DataTimeStamp - * @param onlineCheckIn Indicate whether the supplier supports online checkin - * @param skipTheCounter Indicate whether the supplier supports skip the counter - * @param links A map of links to other Car APIs or Expedia websites. - * @param rateDetails - * @param referencePrice - * @param additionalFees List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - * @param noShowPenalty - * @param images List of image resources of the car product. - * @param rating + * @param id Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. + * @param vehicleDetails + * @param supplier + * @param pickupDetails + * @param dropOffDetails + * @param price + * @param cancellationPolicy + * @param dataTimeStamp DataTimeStamp + * @param onlineCheckIn Indicate whether the supplier supports online checkin + * @param skipTheCounter Indicate whether the supplier supports skip the counter + * @param links A map of links to other Car APIs or Expedia websites. + * @param rateDetails + * @param referencePrice + * @param additionalFees List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + * @param noShowPenalty + * @param images List of image resources of the car product. + * @param rating */ data class Car( - /* Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. */ -@JsonProperty("Id") -val id: - kotlin.String -, - - @JsonProperty("VehicleDetails") -val vehicleDetails: - VehicleDetails -, - - @JsonProperty("Supplier") -val supplier: - Supplier -, - - @JsonProperty("PickupDetails") -val pickupDetails: - VendorLocationDetails -, - - @JsonProperty("DropOffDetails") -val dropOffDetails: - VendorLocationDetails -, - - @JsonProperty("Price") -val price: - Price -, - - @JsonProperty("CancellationPolicy") -val cancellationPolicy: - CarsCancellationPolicy -, - - /* DataTimeStamp */ -@JsonProperty("DataTimeStamp") -val dataTimeStamp: java.time.OffsetDateTime? = null, - - /* Indicate whether the supplier supports online checkin */ -@JsonProperty("OnlineCheckIn") -val onlineCheckIn: kotlin.Boolean? = null, - - /* Indicate whether the supplier supports skip the counter */ -@JsonProperty("SkipTheCounter") -val skipTheCounter: kotlin.Boolean? = null, - - /* A map of links to other Car APIs or Expedia websites. */ -@JsonProperty("Links") -val links: kotlin.collections.Map? = null, - - @JsonProperty("RateDetails") -val rateDetails: RateDetails? = null, - - @JsonProperty("ReferencePrice") -val referencePrice: CarsMoney? = null, - - /* List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver */ -@JsonProperty("AdditionalFees") -val additionalFees: kotlin.collections.List? = null, - - @JsonProperty("NoShowPenalty") -val noShowPenalty: PenaltyType? = null, - - /* List of image resources of the car product. */ -@JsonProperty("Images") -val images: kotlin.collections.List? = null, - - @JsonProperty("Rating") -val rating: RatingWithoutDetails? = null + // Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking. + @JsonProperty("Id") + val id: kotlin.String, + @JsonProperty("VehicleDetails") + val vehicleDetails: VehicleDetails, + @JsonProperty("Supplier") + val supplier: Supplier, + @JsonProperty("PickupDetails") + val pickupDetails: VendorLocationDetails, + @JsonProperty("DropOffDetails") + val dropOffDetails: VendorLocationDetails, + @JsonProperty("Price") + val price: Price, + @JsonProperty("CancellationPolicy") + val cancellationPolicy: CarsCancellationPolicy, + // DataTimeStamp + @JsonProperty("DataTimeStamp") + val dataTimeStamp: java.time.OffsetDateTime? = null, + // Indicate whether the supplier supports online checkin + @JsonProperty("OnlineCheckIn") + val onlineCheckIn: kotlin.Boolean? = null, + // Indicate whether the supplier supports skip the counter + @JsonProperty("SkipTheCounter") + val skipTheCounter: kotlin.Boolean? = null, + // A map of links to other Car APIs or Expedia websites. + @JsonProperty("Links") + val links: kotlin.collections.Map? = null, + @JsonProperty("RateDetails") + val rateDetails: RateDetails? = null, + @JsonProperty("ReferencePrice") + val referencePrice: CarsMoney? = null, + // List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + @JsonProperty("AdditionalFees") + val additionalFees: kotlin.collections.List? = null, + @JsonProperty("NoShowPenalty") + val noShowPenalty: PenaltyType? = null, + // List of image resources of the car product. + @JsonProperty("Images") + val images: kotlin.collections.List? = null, + @JsonProperty("Rating") + val rating: RatingWithoutDetails? = null, ) { - - - init { - require(id != null) { "id must not be null" } - - - - - - + require(id != null) { "id must not be null" } require(vehicleDetails != null) { "vehicleDetails must not be null" } - - - - - - require(supplier != null) { "supplier must not be null" } - - - - - - require(pickupDetails != null) { "pickupDetails must not be null" } - - - - - - require(dropOffDetails != null) { "dropOffDetails must not be null" } - - - - - - require(price != null) { "price must not be null" } - - - - - - require(cancellationPolicy != null) { "cancellationPolicy must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var id: kotlin.String? = null, + private var vehicleDetails: VehicleDetails? = null, + private var supplier: Supplier? = null, + private var pickupDetails: VendorLocationDetails? = null, + private var dropOffDetails: VendorLocationDetails? = null, + private var price: Price? = null, + private var cancellationPolicy: CarsCancellationPolicy? = null, + private var dataTimeStamp: java.time.OffsetDateTime? = null, + private var onlineCheckIn: kotlin.Boolean? = null, + private var skipTheCounter: kotlin.Boolean? = null, + private var links: kotlin.collections.Map? = null, + private var rateDetails: RateDetails? = null, + private var referencePrice: CarsMoney? = null, + private var additionalFees: kotlin.collections.List? = null, + private var noShowPenalty: PenaltyType? = null, + private var images: kotlin.collections.List? = null, + private var rating: RatingWithoutDetails? = null, + ) { + fun id(id: kotlin.String) = apply { this.id = id } + fun vehicleDetails(vehicleDetails: VehicleDetails) = apply { this.vehicleDetails = vehicleDetails } + fun supplier(supplier: Supplier) = apply { this.supplier = supplier } + fun pickupDetails(pickupDetails: VendorLocationDetails) = apply { this.pickupDetails = pickupDetails } + fun dropOffDetails(dropOffDetails: VendorLocationDetails) = apply { this.dropOffDetails = dropOffDetails } + fun price(price: Price) = apply { this.price = price } + fun cancellationPolicy(cancellationPolicy: CarsCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } + fun dataTimeStamp(dataTimeStamp: java.time.OffsetDateTime?) = apply { this.dataTimeStamp = dataTimeStamp } + fun onlineCheckIn(onlineCheckIn: kotlin.Boolean?) = apply { this.onlineCheckIn = onlineCheckIn } + fun skipTheCounter(skipTheCounter: kotlin.Boolean?) = apply { this.skipTheCounter = skipTheCounter } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + fun rateDetails(rateDetails: RateDetails?) = apply { this.rateDetails = rateDetails } + fun referencePrice(referencePrice: CarsMoney?) = apply { this.referencePrice = referencePrice } + fun additionalFees(additionalFees: kotlin.collections.List?) = apply { this.additionalFees = additionalFees } + fun noShowPenalty(noShowPenalty: PenaltyType?) = apply { this.noShowPenalty = noShowPenalty } + fun images(images: kotlin.collections.List?) = apply { this.images = images } + fun rating(rating: RatingWithoutDetails?) = apply { this.rating = rating } + fun build(): Car { + val instance = + Car( + id = id!!, + vehicleDetails = vehicleDetails!!, + supplier = supplier!!, + pickupDetails = pickupDetails!!, + dropOffDetails = dropOffDetails!!, + price = price!!, + cancellationPolicy = cancellationPolicy!!, + dataTimeStamp = dataTimeStamp, + onlineCheckIn = onlineCheckIn, + skipTheCounter = skipTheCounter, + links = links, + rateDetails = rateDetails, + referencePrice = referencePrice, + additionalFees = additionalFees, + noShowPenalty = noShowPenalty, + images = images, + rating = rating, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var id: kotlin.String? = null, - private var vehicleDetails: VehicleDetails? = null, - private var supplier: Supplier? = null, - private var pickupDetails: VendorLocationDetails? = null, - private var dropOffDetails: VendorLocationDetails? = null, - private var price: Price? = null, - private var cancellationPolicy: CarsCancellationPolicy? = null, - private var dataTimeStamp: java.time.OffsetDateTime? = null, - private var onlineCheckIn: kotlin.Boolean? = null, - private var skipTheCounter: kotlin.Boolean? = null, - private var links: kotlin.collections.Map? = null, - private var rateDetails: RateDetails? = null, - private var referencePrice: CarsMoney? = null, - private var additionalFees: kotlin.collections.List? = null, - private var noShowPenalty: PenaltyType? = null, - private var images: kotlin.collections.List? = null, - private var rating: RatingWithoutDetails? = null - ) { - fun id(id: kotlin.String) = apply { this.id = id } - fun vehicleDetails(vehicleDetails: VehicleDetails) = apply { this.vehicleDetails = vehicleDetails } - fun supplier(supplier: Supplier) = apply { this.supplier = supplier } - fun pickupDetails(pickupDetails: VendorLocationDetails) = apply { this.pickupDetails = pickupDetails } - fun dropOffDetails(dropOffDetails: VendorLocationDetails) = apply { this.dropOffDetails = dropOffDetails } - fun price(price: Price) = apply { this.price = price } - fun cancellationPolicy(cancellationPolicy: CarsCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } - fun dataTimeStamp(dataTimeStamp: java.time.OffsetDateTime?) = apply { this.dataTimeStamp = dataTimeStamp } - fun onlineCheckIn(onlineCheckIn: kotlin.Boolean?) = apply { this.onlineCheckIn = onlineCheckIn } - fun skipTheCounter(skipTheCounter: kotlin.Boolean?) = apply { this.skipTheCounter = skipTheCounter } - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - fun rateDetails(rateDetails: RateDetails?) = apply { this.rateDetails = rateDetails } - fun referencePrice(referencePrice: CarsMoney?) = apply { this.referencePrice = referencePrice } - fun additionalFees(additionalFees: kotlin.collections.List?) = apply { this.additionalFees = additionalFees } - fun noShowPenalty(noShowPenalty: PenaltyType?) = apply { this.noShowPenalty = noShowPenalty } - fun images(images: kotlin.collections.List?) = apply { this.images = images } - fun rating(rating: RatingWithoutDetails?) = apply { this.rating = rating } - - fun build(): Car { - val instance = Car( - id = id!!, - vehicleDetails = vehicleDetails!!, - supplier = supplier!!, - pickupDetails = pickupDetails!!, - dropOffDetails = dropOffDetails!!, - price = price!!, - cancellationPolicy = cancellationPolicy!!, - dataTimeStamp = dataTimeStamp, - onlineCheckIn = onlineCheckIn, - skipTheCounter = skipTheCounter, - links = links, - rateDetails = rateDetails, - referencePrice = referencePrice, - additionalFees = additionalFees, - noShowPenalty = noShowPenalty, - images = images, - rating = rating - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id!!, vehicleDetails = vehicleDetails!!, supplier = supplier!!, @@ -340,6 +210,6 @@ val rating: RatingWithoutDetails? = null additionalFees = additionalFees, noShowPenalty = noShowPenalty, images = images, - rating = rating - ) + rating = rating, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt index 60d7a163a..d57f96356 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarCategory.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Car category. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115008631767 - * @param code Car category code. - * @param `value` Car category value. + * @param code Car category code. + * @param `value` Car category value. */ data class CarCategory( - /* Car category code. */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* Car category value. */ -@JsonProperty("Value") -val `value`: - kotlin.String - + // Car category code. + @JsonProperty("Code") + val code: kotlin.String, + // Car category value. + @JsonProperty("Value") + val `value`: kotlin.String, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(`value` != null) { "`value` must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var `value`: kotlin.String? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + class Builder( + private var code: kotlin.String? = null, + private var `value`: kotlin.String? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } - fun build(): CarCategory { - val instance = CarCategory( - code = code!!, - `value` = `value`!! - ) + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - return instance - } + fun build(): CarCategory { + val instance = + CarCategory( + code = code!!, + `value` = `value`!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, - `value` = `value`!! - ) + `value` = `value`!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt index ab28f4332..32fc904d1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetails.kt @@ -31,329 +31,186 @@ import com.expediagroup.sdk.xap.models.Supplier import com.expediagroup.sdk.xap.models.TaxesAndFees import com.expediagroup.sdk.xap.models.VehicleDetails import com.expediagroup.sdk.xap.models.VendorLocationDetails - import com.fasterxml.jackson.annotation.JsonProperty /** * Details of requested car. - * @param vehicleDetails - * @param supplier - * @param pickupDetails - * @param dropOffDetails - * @param price - * @param cancellationPolicy - * @param onlineCheckIn Indicate whether the supplier supports online checkin - * @param skipTheCounter Indicate whether the supplier supports skip the counter - * @param rateDetails - * @param referencePrice - * @param additionalFees List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver - * @param taxesAndFeesDetails List of TaxesAndFees Details - * @param extraFeesDetails List of ExtraFeesDetails - * @param specialEquipments Description and costs of any optional special equipment that may be rented with the car. - * @param rentalLimits - * @param noShowPenalty - * @param carPolicies A list of policies that apply to this car rental. - * @param images List of image resources of the car product. - * @param rating + * @param vehicleDetails + * @param supplier + * @param pickupDetails + * @param dropOffDetails + * @param price + * @param cancellationPolicy + * @param onlineCheckIn Indicate whether the supplier supports online checkin + * @param skipTheCounter Indicate whether the supplier supports skip the counter + * @param rateDetails + * @param referencePrice + * @param additionalFees List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + * @param taxesAndFeesDetails List of TaxesAndFees Details + * @param extraFeesDetails List of ExtraFeesDetails + * @param specialEquipments Description and costs of any optional special equipment that may be rented with the car. + * @param rentalLimits + * @param noShowPenalty + * @param carPolicies A list of policies that apply to this car rental. + * @param images List of image resources of the car product. + * @param rating */ data class CarDetails( - @JsonProperty("VehicleDetails") -val vehicleDetails: - VehicleDetails -, - - @JsonProperty("Supplier") -val supplier: - Supplier -, - - @JsonProperty("PickupDetails") -val pickupDetails: - VendorLocationDetails -, - - @JsonProperty("DropOffDetails") -val dropOffDetails: - VendorLocationDetails -, - - @JsonProperty("Price") -val price: - Price -, - - @JsonProperty("CancellationPolicy") -val cancellationPolicy: - CarsCancellationPolicy -, - - /* Indicate whether the supplier supports online checkin */ -@JsonProperty("OnlineCheckIn") -val onlineCheckIn: kotlin.Boolean? = null, - - /* Indicate whether the supplier supports skip the counter */ -@JsonProperty("SkipTheCounter") -val skipTheCounter: kotlin.Boolean? = null, - - @JsonProperty("RateDetails") -val rateDetails: RateDetails? = null, - - @JsonProperty("ReferencePrice") -val referencePrice: CarsMoney? = null, - - /* List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver */ -@JsonProperty("AdditionalFees") -val additionalFees: kotlin.collections.List? = null, - - /* List of TaxesAndFees Details */ -@JsonProperty("TaxesAndFeesDetails") -val taxesAndFeesDetails: kotlin.collections.List? = null, - - /* List of ExtraFeesDetails */ -@JsonProperty("ExtraFeesDetails") -val extraFeesDetails: kotlin.collections.List? = null, - - /* Description and costs of any optional special equipment that may be rented with the car. */ -@JsonProperty("SpecialEquipments") -val specialEquipments: kotlin.collections.List? = null, - - @JsonProperty("RentalLimits") -val rentalLimits: RentalLimits? = null, - - @JsonProperty("NoShowPenalty") -val noShowPenalty: PenaltyType? = null, - - /* A list of policies that apply to this car rental. */ -@JsonProperty("CarPolicies") -val carPolicies: kotlin.collections.List? = null, - - /* List of image resources of the car product. */ -@JsonProperty("Images") -val images: kotlin.collections.List? = null, - - @JsonProperty("Rating") -val rating: Rating? = null + @JsonProperty("VehicleDetails") + val vehicleDetails: VehicleDetails, + @JsonProperty("Supplier") + val supplier: Supplier, + @JsonProperty("PickupDetails") + val pickupDetails: VendorLocationDetails, + @JsonProperty("DropOffDetails") + val dropOffDetails: VendorLocationDetails, + @JsonProperty("Price") + val price: Price, + @JsonProperty("CancellationPolicy") + val cancellationPolicy: CarsCancellationPolicy, + // Indicate whether the supplier supports online checkin + @JsonProperty("OnlineCheckIn") + val onlineCheckIn: kotlin.Boolean? = null, + // Indicate whether the supplier supports skip the counter + @JsonProperty("SkipTheCounter") + val skipTheCounter: kotlin.Boolean? = null, + @JsonProperty("RateDetails") + val rateDetails: RateDetails? = null, + @JsonProperty("ReferencePrice") + val referencePrice: CarsMoney? = null, + // List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + @JsonProperty("AdditionalFees") + val additionalFees: kotlin.collections.List? = null, + // List of TaxesAndFees Details + @JsonProperty("TaxesAndFeesDetails") + val taxesAndFeesDetails: kotlin.collections.List? = null, + // List of ExtraFeesDetails + @JsonProperty("ExtraFeesDetails") + val extraFeesDetails: kotlin.collections.List? = null, + // Description and costs of any optional special equipment that may be rented with the car. + @JsonProperty("SpecialEquipments") + val specialEquipments: kotlin.collections.List? = null, + @JsonProperty("RentalLimits") + val rentalLimits: RentalLimits? = null, + @JsonProperty("NoShowPenalty") + val noShowPenalty: PenaltyType? = null, + // A list of policies that apply to this car rental. + @JsonProperty("CarPolicies") + val carPolicies: kotlin.collections.List? = null, + // List of image resources of the car product. + @JsonProperty("Images") + val images: kotlin.collections.List? = null, + @JsonProperty("Rating") + val rating: Rating? = null, ) { - - - init { - require(vehicleDetails != null) { "vehicleDetails must not be null" } - - - - - - + require(vehicleDetails != null) { "vehicleDetails must not be null" } require(supplier != null) { "supplier must not be null" } - - - - - - require(pickupDetails != null) { "pickupDetails must not be null" } - - - - - - require(dropOffDetails != null) { "dropOffDetails must not be null" } - - - - - - require(price != null) { "price must not be null" } - - - - - - require(cancellationPolicy != null) { "cancellationPolicy must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var vehicleDetails: VehicleDetails? = null, + private var supplier: Supplier? = null, + private var pickupDetails: VendorLocationDetails? = null, + private var dropOffDetails: VendorLocationDetails? = null, + private var price: Price? = null, + private var cancellationPolicy: CarsCancellationPolicy? = null, + private var onlineCheckIn: kotlin.Boolean? = null, + private var skipTheCounter: kotlin.Boolean? = null, + private var rateDetails: RateDetails? = null, + private var referencePrice: CarsMoney? = null, + private var additionalFees: kotlin.collections.List? = null, + private var taxesAndFeesDetails: kotlin.collections.List? = null, + private var extraFeesDetails: kotlin.collections.List? = null, + private var specialEquipments: kotlin.collections.List? = null, + private var rentalLimits: RentalLimits? = null, + private var noShowPenalty: PenaltyType? = null, + private var carPolicies: kotlin.collections.List? = null, + private var images: kotlin.collections.List? = null, + private var rating: Rating? = null, + ) { + fun vehicleDetails(vehicleDetails: VehicleDetails) = apply { this.vehicleDetails = vehicleDetails } + fun supplier(supplier: Supplier) = apply { this.supplier = supplier } + fun pickupDetails(pickupDetails: VendorLocationDetails) = apply { this.pickupDetails = pickupDetails } + fun dropOffDetails(dropOffDetails: VendorLocationDetails) = apply { this.dropOffDetails = dropOffDetails } + fun price(price: Price) = apply { this.price = price } + fun cancellationPolicy(cancellationPolicy: CarsCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } + fun onlineCheckIn(onlineCheckIn: kotlin.Boolean?) = apply { this.onlineCheckIn = onlineCheckIn } + fun skipTheCounter(skipTheCounter: kotlin.Boolean?) = apply { this.skipTheCounter = skipTheCounter } + fun rateDetails(rateDetails: RateDetails?) = apply { this.rateDetails = rateDetails } + fun referencePrice(referencePrice: CarsMoney?) = apply { this.referencePrice = referencePrice } + fun additionalFees(additionalFees: kotlin.collections.List?) = apply { this.additionalFees = additionalFees } + fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } + fun extraFeesDetails(extraFeesDetails: kotlin.collections.List?) = apply { this.extraFeesDetails = extraFeesDetails } + fun specialEquipments(specialEquipments: kotlin.collections.List?) = apply { this.specialEquipments = specialEquipments } + fun rentalLimits(rentalLimits: RentalLimits?) = apply { this.rentalLimits = rentalLimits } + fun noShowPenalty(noShowPenalty: PenaltyType?) = apply { this.noShowPenalty = noShowPenalty } + fun carPolicies(carPolicies: kotlin.collections.List?) = apply { this.carPolicies = carPolicies } + fun images(images: kotlin.collections.List?) = apply { this.images = images } + fun rating(rating: Rating?) = apply { this.rating = rating } + fun build(): CarDetails { + val instance = + CarDetails( + vehicleDetails = vehicleDetails!!, + supplier = supplier!!, + pickupDetails = pickupDetails!!, + dropOffDetails = dropOffDetails!!, + price = price!!, + cancellationPolicy = cancellationPolicy!!, + onlineCheckIn = onlineCheckIn, + skipTheCounter = skipTheCounter, + rateDetails = rateDetails, + referencePrice = referencePrice, + additionalFees = additionalFees, + taxesAndFeesDetails = taxesAndFeesDetails, + extraFeesDetails = extraFeesDetails, + specialEquipments = specialEquipments, + rentalLimits = rentalLimits, + noShowPenalty = noShowPenalty, + carPolicies = carPolicies, + images = images, + rating = rating, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var vehicleDetails: VehicleDetails? = null, - private var supplier: Supplier? = null, - private var pickupDetails: VendorLocationDetails? = null, - private var dropOffDetails: VendorLocationDetails? = null, - private var price: Price? = null, - private var cancellationPolicy: CarsCancellationPolicy? = null, - private var onlineCheckIn: kotlin.Boolean? = null, - private var skipTheCounter: kotlin.Boolean? = null, - private var rateDetails: RateDetails? = null, - private var referencePrice: CarsMoney? = null, - private var additionalFees: kotlin.collections.List? = null, - private var taxesAndFeesDetails: kotlin.collections.List? = null, - private var extraFeesDetails: kotlin.collections.List? = null, - private var specialEquipments: kotlin.collections.List? = null, - private var rentalLimits: RentalLimits? = null, - private var noShowPenalty: PenaltyType? = null, - private var carPolicies: kotlin.collections.List? = null, - private var images: kotlin.collections.List? = null, - private var rating: Rating? = null - ) { - fun vehicleDetails(vehicleDetails: VehicleDetails) = apply { this.vehicleDetails = vehicleDetails } - fun supplier(supplier: Supplier) = apply { this.supplier = supplier } - fun pickupDetails(pickupDetails: VendorLocationDetails) = apply { this.pickupDetails = pickupDetails } - fun dropOffDetails(dropOffDetails: VendorLocationDetails) = apply { this.dropOffDetails = dropOffDetails } - fun price(price: Price) = apply { this.price = price } - fun cancellationPolicy(cancellationPolicy: CarsCancellationPolicy) = apply { this.cancellationPolicy = cancellationPolicy } - fun onlineCheckIn(onlineCheckIn: kotlin.Boolean?) = apply { this.onlineCheckIn = onlineCheckIn } - fun skipTheCounter(skipTheCounter: kotlin.Boolean?) = apply { this.skipTheCounter = skipTheCounter } - fun rateDetails(rateDetails: RateDetails?) = apply { this.rateDetails = rateDetails } - fun referencePrice(referencePrice: CarsMoney?) = apply { this.referencePrice = referencePrice } - fun additionalFees(additionalFees: kotlin.collections.List?) = apply { this.additionalFees = additionalFees } - fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - fun extraFeesDetails(extraFeesDetails: kotlin.collections.List?) = apply { this.extraFeesDetails = extraFeesDetails } - fun specialEquipments(specialEquipments: kotlin.collections.List?) = apply { this.specialEquipments = specialEquipments } - fun rentalLimits(rentalLimits: RentalLimits?) = apply { this.rentalLimits = rentalLimits } - fun noShowPenalty(noShowPenalty: PenaltyType?) = apply { this.noShowPenalty = noShowPenalty } - fun carPolicies(carPolicies: kotlin.collections.List?) = apply { this.carPolicies = carPolicies } - fun images(images: kotlin.collections.List?) = apply { this.images = images } - fun rating(rating: Rating?) = apply { this.rating = rating } - - fun build(): CarDetails { - val instance = CarDetails( - vehicleDetails = vehicleDetails!!, - supplier = supplier!!, - pickupDetails = pickupDetails!!, - dropOffDetails = dropOffDetails!!, - price = price!!, - cancellationPolicy = cancellationPolicy!!, - onlineCheckIn = onlineCheckIn, - skipTheCounter = skipTheCounter, - rateDetails = rateDetails, - referencePrice = referencePrice, - additionalFees = additionalFees, - taxesAndFeesDetails = taxesAndFeesDetails, - extraFeesDetails = extraFeesDetails, - specialEquipments = specialEquipments, - rentalLimits = rentalLimits, - noShowPenalty = noShowPenalty, - carPolicies = carPolicies, - images = images, - rating = rating - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( vehicleDetails = vehicleDetails!!, supplier = supplier!!, pickupDetails = pickupDetails!!, @@ -372,6 +229,6 @@ val rating: Rating? = null noShowPenalty = noShowPenalty, carPolicies = carPolicies, images = images, - rating = rating - ) + rating = rating, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt index 57348fcc0..bb2837c94 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarDetailsResponse.kt @@ -19,118 +19,78 @@ import com.expediagroup.sdk.xap.models.CarDetails import com.expediagroup.sdk.xap.models.CarsLink import com.expediagroup.sdk.xap.models.CarsValidFormsOfPayment import com.expediagroup.sdk.xap.models.CarsWarning - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param transactionId A unique identifier for this transaction. - * @param warnings Container for warning codes - * @param carDetails - * @param validFormsOfPayment List of all the forms of payment that will be accepted for the booking of this rental transaction. - * @param links A map of links to other Car APIs. possible link name: ApiBooking +* + * @param transactionId A unique identifier for this transaction. + * @param warnings Container for warning codes + * @param carDetails + * @param validFormsOfPayment List of all the forms of payment that will be accepted for the booking of this rental transaction. + * @param links A map of links to other Car APIs. possible link name: ApiBooking */ data class CarDetailsResponse( - /* A unique identifier for this transaction. */ -@JsonProperty("TransactionId") -val transactionId: - kotlin.String -, - - /* Container for warning codes */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - @JsonProperty("CarDetails") -val carDetails: CarDetails? = null, - - /* List of all the forms of payment that will be accepted for the booking of this rental transaction. */ -@JsonProperty("ValidFormsOfPayment") -val validFormsOfPayment: kotlin.collections.List? = null, - - /* A map of links to other Car APIs. possible link name: ApiBooking */ -@JsonProperty("Links") -val links: kotlin.collections.Map? = null + // A unique identifier for this transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String, + // Container for warning codes + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + @JsonProperty("CarDetails") + val carDetails: CarDetails? = null, + // List of all the forms of payment that will be accepted for the booking of this rental transaction. + @JsonProperty("ValidFormsOfPayment") + val validFormsOfPayment: kotlin.collections.List? = null, + // A map of links to other Car APIs. possible link name: ApiBooking + @JsonProperty("Links") + val links: kotlin.collections.Map? = null, ) { - - - init { - require(transactionId != null) { "transactionId must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + require(transactionId != null) { "transactionId must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var transactionId: kotlin.String? = null, + private var warnings: kotlin.collections.List? = null, + private var carDetails: CarDetails? = null, + private var validFormsOfPayment: kotlin.collections.List? = null, + private var links: kotlin.collections.Map? = null, + ) { + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - } + fun carDetails(carDetails: CarDetails?) = apply { this.carDetails = carDetails } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun validFormsOfPayment(validFormsOfPayment: kotlin.collections.List?) = apply { this.validFormsOfPayment = validFormsOfPayment } - class Builder( - private var transactionId: kotlin.String? = null, - private var warnings: kotlin.collections.List? = null, - private var carDetails: CarDetails? = null, - private var validFormsOfPayment: kotlin.collections.List? = null, - private var links: kotlin.collections.Map? = null - ) { - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun carDetails(carDetails: CarDetails?) = apply { this.carDetails = carDetails } - fun validFormsOfPayment(validFormsOfPayment: kotlin.collections.List?) = apply { this.validFormsOfPayment = validFormsOfPayment } - fun links(links: kotlin.collections.Map?) = apply { this.links = links } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } - fun build(): CarDetailsResponse { - val instance = CarDetailsResponse( - transactionId = transactionId!!, - warnings = warnings, - carDetails = carDetails, - validFormsOfPayment = validFormsOfPayment, - links = links - ) + fun build(): CarDetailsResponse { + val instance = + CarDetailsResponse( + transactionId = transactionId!!, + warnings = warnings, + carDetails = carDetails, + validFormsOfPayment = validFormsOfPayment, + links = links, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( transactionId = transactionId!!, warnings = warnings, carDetails = carDetails, validFormsOfPayment = validFormsOfPayment, - links = links - ) + links = links, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt index c02b25838..a86f1a5d4 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarListingsResponse.kt @@ -17,106 +17,72 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Car import com.expediagroup.sdk.xap.models.CarsWarning - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param transactionId A unique identifier for this transaction. - * @param carCount The number of cars offers returned in the response. - * @param warnings Container for warning codes - * @param cars List of cars matching the search criteria. +* + * @param transactionId A unique identifier for this transaction. + * @param carCount The number of cars offers returned in the response. + * @param warnings Container for warning codes + * @param cars List of cars matching the search criteria. */ data class CarListingsResponse( - /* A unique identifier for this transaction. */ -@JsonProperty("TransactionId") -val transactionId: - kotlin.String -, - - /* The number of cars offers returned in the response. */ -@JsonProperty("CarCount") -val carCount: - kotlin.Long -, - - /* Container for warning codes */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - /* List of cars matching the search criteria. */ -@JsonProperty("Cars") -val cars: kotlin.collections.List? = null + // A unique identifier for this transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String, + // The number of cars offers returned in the response. + @JsonProperty("CarCount") + val carCount: kotlin.Long, + // Container for warning codes + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + // List of cars matching the search criteria. + @JsonProperty("Cars") + val cars: kotlin.collections.List? = null, ) { - - - init { - require(transactionId != null) { "transactionId must not be null" } - - - - - - + require(transactionId != null) { "transactionId must not be null" } require(carCount != null) { "carCount must not be null" } - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var transactionId: kotlin.String? = null, - private var carCount: kotlin.Long? = null, - private var warnings: kotlin.collections.List? = null, - private var cars: kotlin.collections.List? = null - ) { - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - fun carCount(carCount: kotlin.Long) = apply { this.carCount = carCount } - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun cars(cars: kotlin.collections.List?) = apply { this.cars = cars } + class Builder( + private var transactionId: kotlin.String? = null, + private var carCount: kotlin.Long? = null, + private var warnings: kotlin.collections.List? = null, + private var cars: kotlin.collections.List? = null, + ) { + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - fun build(): CarListingsResponse { - val instance = CarListingsResponse( - transactionId = transactionId!!, - carCount = carCount!!, - warnings = warnings, - cars = cars - ) + fun carCount(carCount: kotlin.Long) = apply { this.carCount = carCount } - return instance - } + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + + fun cars(cars: kotlin.collections.List?) = apply { this.cars = cars } + + fun build(): CarListingsResponse { + val instance = + CarListingsResponse( + transactionId = transactionId!!, + carCount = carCount!!, + warnings = warnings, + cars = cars, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( transactionId = transactionId!!, carCount = carCount!!, warnings = warnings, - cars = cars - ) + cars = cars, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt index 608d0b3ed..f46c53f83 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarPolicy.kt @@ -15,71 +15,52 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * A list of policies that apply to this car rental. - * @param categoryCode The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) - * @param policyText The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. + * @param categoryCode The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) + * @param policyText The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. */ data class CarPolicy( - /* The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) */ -@JsonProperty("CategoryCode") -val categoryCode: - kotlin.String -, - - /* The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. */ -@JsonProperty("PolicyText") -val policyText: kotlin.String? = null + // The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) + @JsonProperty("CategoryCode") + val categoryCode: kotlin.String, + // The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available. + @JsonProperty("PolicyText") + val policyText: kotlin.String? = null, ) { - - - init { - require(categoryCode != null) { "categoryCode must not be null" } - - - - - - - - - - - - - - - + require(categoryCode != null) { "categoryCode must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var categoryCode: kotlin.String? = null, - private var policyText: kotlin.String? = null - ) { - fun categoryCode(categoryCode: kotlin.String) = apply { this.categoryCode = categoryCode } - fun policyText(policyText: kotlin.String?) = apply { this.policyText = policyText } + class Builder( + private var categoryCode: kotlin.String? = null, + private var policyText: kotlin.String? = null, + ) { + fun categoryCode(categoryCode: kotlin.String) = apply { this.categoryCode = categoryCode } - fun build(): CarPolicy { - val instance = CarPolicy( - categoryCode = categoryCode!!, - policyText = policyText - ) + fun policyText(policyText: kotlin.String?) = apply { this.policyText = policyText } - return instance - } + fun build(): CarPolicy { + val instance = + CarPolicy( + categoryCode = categoryCode!!, + policyText = policyText, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( categoryCode = categoryCode!!, - policyText = policyText - ) + policyText = policyText, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt index 37cbdf9d8..cf1e9d517 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarType.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Car type. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115002516708 - * @param code Car type code. - * @param `value` Car type value. + * @param code Car type code. + * @param `value` Car type value. */ data class CarType( - /* Car type code. */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* Car type value. */ -@JsonProperty("Value") -val `value`: - kotlin.String - + // Car type code. + @JsonProperty("Code") + val code: kotlin.String, + // Car type value. + @JsonProperty("Value") + val `value`: kotlin.String, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(`value` != null) { "`value` must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var `value`: kotlin.String? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + class Builder( + private var code: kotlin.String? = null, + private var `value`: kotlin.String? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } - fun build(): CarType { - val instance = CarType( - code = code!!, - `value` = `value`!! - ) + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - return instance - } + fun build(): CarType { + val instance = + CarType( + code = code!!, + `value` = `value`!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, - `value` = `value`!! - ) + `value` = `value`!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt index efc45a469..ceafb96fd 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsAddress.kt @@ -15,157 +15,101 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Address information - * @param address1 Street Number, Street Name, or PO Box - * @param city The city - * @param country 3-letter code for the country - * @param address2 Apartment, Floor, Suite, Bldg # or more specific information about Address1. - * @param suite Suite/apartment number - * @param province The state or province - * @param postalCode Zip/postal code + * @param address1 Street Number, Street Name, or PO Box + * @param city The city + * @param country 3-letter code for the country + * @param address2 Apartment, Floor, Suite, Bldg # or more specific information about Address1. + * @param suite Suite/apartment number + * @param province The state or province + * @param postalCode Zip/postal code */ data class CarsAddress( - /* Street Number, Street Name, or PO Box */ -@JsonProperty("Address1") -val address1: - kotlin.String -, - - /* The city */ -@JsonProperty("City") -val city: - kotlin.String -, - - /* 3-letter code for the country */ -@JsonProperty("Country") -val country: - kotlin.String -, - - /* Apartment, Floor, Suite, Bldg # or more specific information about Address1. */ -@JsonProperty("Address2") -val address2: kotlin.String? = null, - - /* Suite/apartment number */ -@JsonProperty("Suite") -val suite: kotlin.String? = null, - - /* The state or province */ -@JsonProperty("Province") -val province: kotlin.String? = null, - - /* Zip/postal code */ -@JsonProperty("PostalCode") -val postalCode: kotlin.String? = null + // Street Number, Street Name, or PO Box + @JsonProperty("Address1") + val address1: kotlin.String, + // The city + @JsonProperty("City") + val city: kotlin.String, + // 3-letter code for the country + @JsonProperty("Country") + val country: kotlin.String, + // Apartment, Floor, Suite, Bldg # or more specific information about Address1. + @JsonProperty("Address2") + val address2: kotlin.String? = null, + // Suite/apartment number + @JsonProperty("Suite") + val suite: kotlin.String? = null, + // The state or province + @JsonProperty("Province") + val province: kotlin.String? = null, + // Zip/postal code + @JsonProperty("PostalCode") + val postalCode: kotlin.String? = null, ) { - - - init { - require(address1 != null) { "address1 must not be null" } - - - - - - + require(address1 != null) { "address1 must not be null" } require(city != null) { "city must not be null" } - - - - - - require(country != null) { "country must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var address1: kotlin.String? = null, + private var city: kotlin.String? = null, + private var country: kotlin.String? = null, + private var address2: kotlin.String? = null, + private var suite: kotlin.String? = null, + private var province: kotlin.String? = null, + private var postalCode: kotlin.String? = null, + ) { + fun address1(address1: kotlin.String) = apply { this.address1 = address1 } + fun city(city: kotlin.String) = apply { this.city = city } + fun country(country: kotlin.String) = apply { this.country = country } + fun address2(address2: kotlin.String?) = apply { this.address2 = address2 } + fun suite(suite: kotlin.String?) = apply { this.suite = suite } + fun province(province: kotlin.String?) = apply { this.province = province } + fun postalCode(postalCode: kotlin.String?) = apply { this.postalCode = postalCode } + fun build(): CarsAddress { + val instance = + CarsAddress( + address1 = address1!!, + city = city!!, + country = country!!, + address2 = address2, + suite = suite, + province = province, + postalCode = postalCode, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var address1: kotlin.String? = null, - private var city: kotlin.String? = null, - private var country: kotlin.String? = null, - private var address2: kotlin.String? = null, - private var suite: kotlin.String? = null, - private var province: kotlin.String? = null, - private var postalCode: kotlin.String? = null - ) { - fun address1(address1: kotlin.String) = apply { this.address1 = address1 } - fun city(city: kotlin.String) = apply { this.city = city } - fun country(country: kotlin.String) = apply { this.country = country } - fun address2(address2: kotlin.String?) = apply { this.address2 = address2 } - fun suite(suite: kotlin.String?) = apply { this.suite = suite } - fun province(province: kotlin.String?) = apply { this.province = province } - fun postalCode(postalCode: kotlin.String?) = apply { this.postalCode = postalCode } - - fun build(): CarsAddress { - val instance = CarsAddress( - address1 = address1!!, - city = city!!, - country = country!!, - address2 = address2, - suite = suite, - province = province, - postalCode = postalCode - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( address1 = address1!!, city = city!!, country = country!!, address2 = address2, suite = suite, province = province, - postalCode = postalCode - ) + postalCode = postalCode, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt index e7cbec9b7..8612c6a72 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt @@ -17,115 +17,77 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.NonCancellableDateTimeRange import com.expediagroup.sdk.xap.models.PenaltyRule - import com.fasterxml.jackson.annotation.JsonProperty /** * Cancellation Policy Container. - * @param cancellable Indicates if this car can be cancelled (free cancel or penalty cancel) - * @param freeCancellation Indicates if this car may be cancelled without a penalty. - * @param freeCancellationEndDateTime Indicates the latest time that the car can be cancelled for free. - * @param penaltyRules Container for penalty rules - * @param nonCancellableDateTimeRange + * @param cancellable Indicates if this car can be cancelled (free cancel or penalty cancel) + * @param freeCancellation Indicates if this car may be cancelled without a penalty. + * @param freeCancellationEndDateTime Indicates the latest time that the car can be cancelled for free. + * @param penaltyRules Container for penalty rules + * @param nonCancellableDateTimeRange */ data class CarsCancellationPolicy( - /* Indicates if this car can be cancelled (free cancel or penalty cancel) */ -@JsonProperty("Cancellable") -val cancellable: kotlin.Boolean? = null, - - /* Indicates if this car may be cancelled without a penalty. */ -@JsonProperty("FreeCancellation") -val freeCancellation: kotlin.Boolean? = null, - - /* Indicates the latest time that the car can be cancelled for free. */ -@JsonProperty("FreeCancellationEndDateTime") -val freeCancellationEndDateTime: java.time.LocalDateTime? = null, - - /* Container for penalty rules */ -@JsonProperty("PenaltyRules") -val penaltyRules: kotlin.collections.List? = null, - - @JsonProperty("NonCancellableDateTimeRange") -val nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null + // Indicates if this car can be cancelled (free cancel or penalty cancel) + @JsonProperty("Cancellable") + val cancellable: kotlin.Boolean? = null, + // Indicates if this car may be cancelled without a penalty. + @JsonProperty("FreeCancellation") + val freeCancellation: kotlin.Boolean? = null, + // Indicates the latest time that the car can be cancelled for free. + @JsonProperty("FreeCancellationEndDateTime") + val freeCancellationEndDateTime: java.time.LocalDateTime? = null, + // Container for penalty rules + @JsonProperty("PenaltyRules") + val penaltyRules: kotlin.collections.List? = null, + @JsonProperty("NonCancellableDateTimeRange") + val nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var cancellable: kotlin.Boolean? = null, + private var freeCancellation: kotlin.Boolean? = null, + private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, + private var penaltyRules: kotlin.collections.List? = null, + private var nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null, + ) { + fun cancellable(cancellable: kotlin.Boolean?) = apply { this.cancellable = cancellable } + fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun penaltyRules(penaltyRules: kotlin.collections.List?) = apply { this.penaltyRules = penaltyRules } - class Builder( - private var cancellable: kotlin.Boolean? = null, - private var freeCancellation: kotlin.Boolean? = null, - private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, - private var penaltyRules: kotlin.collections.List? = null, - private var nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null - ) { - fun cancellable(cancellable: kotlin.Boolean?) = apply { this.cancellable = cancellable } - fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - fun penaltyRules(penaltyRules: kotlin.collections.List?) = apply { this.penaltyRules = penaltyRules } - fun nonCancellableDateTimeRange(nonCancellableDateTimeRange: NonCancellableDateTimeRange?) = apply { this.nonCancellableDateTimeRange = nonCancellableDateTimeRange } + fun nonCancellableDateTimeRange(nonCancellableDateTimeRange: NonCancellableDateTimeRange?) = apply { this.nonCancellableDateTimeRange = nonCancellableDateTimeRange } - fun build(): CarsCancellationPolicy { - val instance = CarsCancellationPolicy( - cancellable = cancellable, - freeCancellation = freeCancellation, - freeCancellationEndDateTime = freeCancellationEndDateTime, - penaltyRules = penaltyRules, - nonCancellableDateTimeRange = nonCancellableDateTimeRange - ) + fun build(): CarsCancellationPolicy { + val instance = + CarsCancellationPolicy( + cancellable = cancellable, + freeCancellation = freeCancellation, + freeCancellationEndDateTime = freeCancellationEndDateTime, + penaltyRules = penaltyRules, + nonCancellableDateTimeRange = nonCancellableDateTimeRange, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( cancellable = cancellable, freeCancellation = freeCancellation, freeCancellationEndDateTime = freeCancellationEndDateTime, penaltyRules = penaltyRules, - nonCancellableDateTimeRange = nonCancellableDateTimeRange - ) + nonCancellableDateTimeRange = nonCancellableDateTimeRange, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt index edb91ca3c..598296bca 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCountry.kt @@ -15,109 +15,74 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for disambiguation country information - * @param name country name - * @param isoCode2 2-letter code for the country - * @param isoCode3 3-letter code for the country - * @param code 3-letter code for the country + * @param name country name + * @param isoCode2 2-letter code for the country + * @param isoCode3 3-letter code for the country + * @param code 3-letter code for the country */ data class CarsCountry( - /* country name */ -@JsonProperty("Name") -val name: - kotlin.String -, - - /* 2-letter code for the country */ -@JsonProperty("IsoCode2") -val isoCode2: - kotlin.String -, - - /* 3-letter code for the country */ -@JsonProperty("IsoCode3") -val isoCode3: - kotlin.String -, - - /* 3-letter code for the country */ -@JsonProperty("Code") -val code: kotlin.String? = null + // country name + @JsonProperty("Name") + val name: kotlin.String, + // 2-letter code for the country + @JsonProperty("IsoCode2") + val isoCode2: kotlin.String, + // 3-letter code for the country + @JsonProperty("IsoCode3") + val isoCode3: kotlin.String, + // 3-letter code for the country + @JsonProperty("Code") + val code: kotlin.String? = null, ) { - - - init { - require(name != null) { "name must not be null" } - - - - - - + require(name != null) { "name must not be null" } require(isoCode2 != null) { "isoCode2 must not be null" } - - - - - - require(isoCode3 != null) { "isoCode3 must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var isoCode2: kotlin.String? = null, - private var isoCode3: kotlin.String? = null, - private var code: kotlin.String? = null - ) { - fun name(name: kotlin.String) = apply { this.name = name } - fun isoCode2(isoCode2: kotlin.String) = apply { this.isoCode2 = isoCode2 } - fun isoCode3(isoCode3: kotlin.String) = apply { this.isoCode3 = isoCode3 } - fun code(code: kotlin.String?) = apply { this.code = code } + class Builder( + private var name: kotlin.String? = null, + private var isoCode2: kotlin.String? = null, + private var isoCode3: kotlin.String? = null, + private var code: kotlin.String? = null, + ) { + fun name(name: kotlin.String) = apply { this.name = name } - fun build(): CarsCountry { - val instance = CarsCountry( - name = name!!, - isoCode2 = isoCode2!!, - isoCode3 = isoCode3!!, - code = code - ) + fun isoCode2(isoCode2: kotlin.String) = apply { this.isoCode2 = isoCode2 } - return instance - } + fun isoCode3(isoCode3: kotlin.String) = apply { this.isoCode3 = isoCode3 } + + fun code(code: kotlin.String?) = apply { this.code = code } + + fun build(): CarsCountry { + val instance = + CarsCountry( + name = name!!, + isoCode2 = isoCode2!!, + isoCode3 = isoCode3!!, + code = code, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( name = name!!, isoCode2 = isoCode2!!, isoCode3 = isoCode3!!, - code = code - ) + code = code, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt index 4c635b59b..6c5e42c47 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDateRange.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Date range of the period. - * @param startDate Start date at pickup location of the period. - * @param endDate End date at pickup location of the period. + * @param startDate Start date at pickup location of the period. + * @param endDate End date at pickup location of the period. */ data class CarsDateRange( - /* Start date at pickup location of the period. */ -@JsonProperty("StartDate") -val startDate: - java.time.LocalDate -, - - /* End date at pickup location of the period. */ -@JsonProperty("EndDate") -val endDate: - java.time.LocalDate - + // Start date at pickup location of the period. + @JsonProperty("StartDate") + val startDate: java.time.LocalDate, + // End date at pickup location of the period. + @JsonProperty("EndDate") + val endDate: java.time.LocalDate, ) { - - - init { - require(startDate != null) { "startDate must not be null" } - - - - - - + require(startDate != null) { "startDate must not be null" } require(endDate != null) { "endDate must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null - ) { - fun startDate(startDate: java.time.LocalDate) = apply { this.startDate = startDate } - fun endDate(endDate: java.time.LocalDate) = apply { this.endDate = endDate } + class Builder( + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null, + ) { + fun startDate(startDate: java.time.LocalDate) = apply { this.startDate = startDate } - fun build(): CarsDateRange { - val instance = CarsDateRange( - startDate = startDate!!, - endDate = endDate!! - ) + fun endDate(endDate: java.time.LocalDate) = apply { this.endDate = endDate } - return instance - } + fun build(): CarsDateRange { + val instance = + CarsDateRange( + startDate = startDate!!, + endDate = endDate!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( startDate = startDate!!, - endDate = endDate!! - ) + endDate = endDate!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt index bf42532aa..922af4f58 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsDistance.kt @@ -15,87 +15,61 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * The extra distance information. - * @param `value` The number of miles/kilometers of the distance (specified by the Unit). - * @param unit The unit (KM or MI) for the distance. - * @param direction The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE + * @param `value` The number of miles/kilometers of the distance (specified by the Unit). + * @param unit The unit (KM or MI) for the distance. + * @param direction The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE */ data class CarsDistance( - /* The number of miles/kilometers of the distance (specified by the Unit). */ -@JsonProperty("Value") -val `value`: - kotlin.String -, - - /* The unit (KM or MI) for the distance. */ -@JsonProperty("Unit") -val unit: kotlin.String? = null, - - /* The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE */ -@JsonProperty("Direction") -val direction: kotlin.String? = null + // The number of miles/kilometers of the distance (specified by the Unit). + @JsonProperty("Value") + val `value`: kotlin.String, + // The unit (KM or MI) for the distance. + @JsonProperty("Unit") + val unit: kotlin.String? = null, + // The direction of the location from the search 'center'.Possible values are: N,S,W,E,NW,NE,SW,SE + @JsonProperty("Direction") + val direction: kotlin.String? = null, ) { - - - init { - require(`value` != null) { "`value` must not be null" } - - - - - - - - - - - - - - - - - - - - - - + require(`value` != null) { "`value` must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var unit: kotlin.String? = null, - private var direction: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - fun unit(unit: kotlin.String?) = apply { this.unit = unit } - fun direction(direction: kotlin.String?) = apply { this.direction = direction } + class Builder( + private var `value`: kotlin.String? = null, + private var unit: kotlin.String? = null, + private var direction: kotlin.String? = null, + ) { + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - fun build(): CarsDistance { - val instance = CarsDistance( - `value` = `value`!!, - unit = unit, - direction = direction - ) + fun unit(unit: kotlin.String?) = apply { this.unit = unit } - return instance - } + fun direction(direction: kotlin.String?) = apply { this.direction = direction } + + fun build(): CarsDistance { + val instance = + CarsDistance( + `value` = `value`!!, + unit = unit, + direction = direction, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`!!, unit = unit, - direction = direction - ) + direction = direction, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt index 5efa8c2fc..56b829f75 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsError.kt @@ -16,122 +16,81 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsLocationOption - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for error list. - * @param code Error code describing the issue - * @param description A simple description of what the error is. - * @param detailCode Detailed error code describing the issue. - * @param locationKeyword The requested location that caused the error. - * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. + * @param code Error code describing the issue + * @param description A simple description of what the error is. + * @param detailCode Detailed error code describing the issue. + * @param locationKeyword The requested location that caused the error. + * @param locationOptions List for possible locations from which the customer must choose the best one to be re-submitted in the request. */ data class CarsError( - /* Error code describing the issue */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* A simple description of what the error is. */ -@JsonProperty("Description") -val description: - kotlin.String -, - - /* Detailed error code describing the issue. */ -@JsonProperty("DetailCode") -val detailCode: kotlin.String? = null, - - /* The requested location that caused the error. */ -@JsonProperty("LocationKeyword") -val locationKeyword: kotlin.String? = null, - - /* List for possible locations from which the customer must choose the best one to be re-submitted in the request. */ -@JsonProperty("LocationOptions") -val locationOptions: kotlin.collections.List? = null + // Error code describing the issue + @JsonProperty("Code") + val code: kotlin.String, + // A simple description of what the error is. + @JsonProperty("Description") + val description: kotlin.String, + // Detailed error code describing the issue. + @JsonProperty("DetailCode") + val detailCode: kotlin.String? = null, + // The requested location that caused the error. + @JsonProperty("LocationKeyword") + val locationKeyword: kotlin.String? = null, + // List for possible locations from which the customer must choose the best one to be re-submitted in the request. + @JsonProperty("LocationOptions") + val locationOptions: kotlin.collections.List? = null, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(description != null) { "description must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var detailCode: kotlin.String? = null, + private var locationKeyword: kotlin.String? = null, + private var locationOptions: kotlin.collections.List? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun description(description: kotlin.String) = apply { this.description = description } + fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } + fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } + fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } + fun build(): CarsError { + val instance = + CarsError( + code = code!!, + description = description!!, + detailCode = detailCode, + locationKeyword = locationKeyword, + locationOptions = locationOptions, + ) - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var detailCode: kotlin.String? = null, - private var locationKeyword: kotlin.String? = null, - private var locationOptions: kotlin.collections.List? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun description(description: kotlin.String) = apply { this.description = description } - fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } - fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } - fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } - - fun build(): CarsError { - val instance = CarsError( - code = code!!, - description = description!!, - detailCode = detailCode, - locationKeyword = locationKeyword, - locationOptions = locationOptions - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, description = description!!, detailCode = detailCode, locationKeyword = locationKeyword, - locationOptions = locationOptions - ) + locationOptions = locationOptions, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt index b17a60ab0..0f52c4f60 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsErrors.kt @@ -16,79 +16,57 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsError - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class CarsErrors( - /* Container for error list. */ -@JsonProperty("Errors") -val errors: - kotlin.collections. - List -< - CarsError -> - -, - - /* A unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: - kotlin.String - + // Container for error list. + @JsonProperty("Errors") + val errors: kotlin.collections + .List< + CarsError, + >, + // A unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String, ) { - - - init { - require(errors != null) { "errors must not be null" } - - - - - - + require(errors != null) { "errors must not be null" } require(transactionId != null) { "transactionId must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + ) { + fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - fun build(): CarsErrors { - val instance = CarsErrors( - errors = errors!!, - transactionId = transactionId!! - ) + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - return instance - } + fun build(): CarsErrors { + val instance = + CarsErrors( + errors = errors!!, + transactionId = transactionId!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( errors = errors!!, - transactionId = transactionId!! - ) + transactionId = transactionId!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt index f2efd9feb..d0890edd6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsGeoLocation.kt @@ -15,89 +15,62 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for Geo location. - * @param latitude Latitude of the location. - * @param longitude Longitude of the location. - * @param obfuscated + * @param latitude Latitude of the location. + * @param longitude Longitude of the location. + * @param obfuscated */ data class CarsGeoLocation( - /* Latitude of the location. */ -@JsonProperty("Latitude") -val latitude: - kotlin.String -, - - /* Longitude of the location. */ -@JsonProperty("Longitude") -val longitude: - kotlin.String -, - - @JsonProperty("Obfuscated") -val obfuscated: kotlin.Boolean? = null + // Latitude of the location. + @JsonProperty("Latitude") + val latitude: kotlin.String, + // Longitude of the location. + @JsonProperty("Longitude") + val longitude: kotlin.String, + @JsonProperty("Obfuscated") + val obfuscated: kotlin.Boolean? = null, ) { - - - init { - require(latitude != null) { "latitude must not be null" } - - - - - - + require(latitude != null) { "latitude must not be null" } require(longitude != null) { "longitude must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String) = apply { this.latitude = latitude } - fun longitude(longitude: kotlin.String) = apply { this.longitude = longitude } - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + class Builder( + private var latitude: kotlin.String? = null, + private var longitude: kotlin.String? = null, + private var obfuscated: kotlin.Boolean? = null, + ) { + fun latitude(latitude: kotlin.String) = apply { this.latitude = latitude } - fun build(): CarsGeoLocation { - val instance = CarsGeoLocation( - latitude = latitude!!, - longitude = longitude!!, - obfuscated = obfuscated - ) + fun longitude(longitude: kotlin.String) = apply { this.longitude = longitude } - return instance - } + fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + + fun build(): CarsGeoLocation { + val instance = + CarsGeoLocation( + latitude = latitude!!, + longitude = longitude!!, + obfuscated = obfuscated, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( latitude = latitude!!, longitude = longitude!!, - obfuscated = obfuscated - ) + obfuscated = obfuscated, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt index 484d1b6db..7919e90d1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLink.kt @@ -15,87 +15,61 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * A map of links to other Car APIs. possible link name: ApiBooking - * @param href HATEOAS URL to fetch details. - * @param accept Accept header. - * @param method HTTP method to connect. + * @param href HATEOAS URL to fetch details. + * @param accept Accept header. + * @param method HTTP method to connect. */ data class CarsLink( - /* HATEOAS URL to fetch details. */ -@JsonProperty("Href") -val href: - kotlin.String -, - - /* Accept header. */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* HTTP method to connect. */ -@JsonProperty("Method") -val method: kotlin.String? = null + // HATEOAS URL to fetch details. + @JsonProperty("Href") + val href: kotlin.String, + // Accept header. + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // HTTP method to connect. + @JsonProperty("Method") + val method: kotlin.String? = null, ) { - - - init { - require(href != null) { "href must not be null" } - - - - - - - - - - - - - - - - - - - - - - + require(href != null) { "href must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var href: kotlin.String? = null, - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null - ) { - fun href(href: kotlin.String) = apply { this.href = href } - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } + class Builder( + private var href: kotlin.String? = null, + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + ) { + fun href(href: kotlin.String) = apply { this.href = href } - fun build(): CarsLink { - val instance = CarsLink( - href = href!!, - accept = accept, - method = method - ) + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - return instance - } + fun method(method: kotlin.String?) = apply { this.method = method } + + fun build(): CarsLink { + val instance = + CarsLink( + href = href!!, + accept = accept, + method = method, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( href = href!!, accept = accept, - method = method - ) + method = method, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt index 631b16f5d..f8a7bc1dd 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocation.kt @@ -19,200 +19,118 @@ import com.expediagroup.sdk.xap.models.CarsAddress import com.expediagroup.sdk.xap.models.CarsCountry import com.expediagroup.sdk.xap.models.CarsGeoLocation import com.expediagroup.sdk.xap.models.CarsNeighborhood - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for list of possible locations that could be used to disambiguate the query. - * @param locationId Location id. - * @param type The type of location code (MULTICITY | METROCODE). - * @param id Expedia Region ID of the specified airport. - * @param name Location Name - * @param code Location Code - * @param address - * @param pointOfInterest - * @param geoLocation - * @param neighborhood - * @param regionId RegionId the location resides in. - * @param country + * @param locationId Location id. + * @param type The type of location code (MULTICITY | METROCODE). + * @param id Expedia Region ID of the specified airport. + * @param name Location Name + * @param code Location Code + * @param address + * @param pointOfInterest + * @param geoLocation + * @param neighborhood + * @param regionId RegionId the location resides in. + * @param country */ data class CarsLocation( - /* Location id. */ -@JsonProperty("LocationId") -val locationId: - kotlin.String -, - - /* The type of location code (MULTICITY | METROCODE). */ -@JsonProperty("Type") -val type: kotlin.String? = null, - - /* Expedia Region ID of the specified airport. */ -@JsonProperty("Id") -val id: kotlin.String? = null, - - /* Location Name */ -@JsonProperty("Name") -val name: kotlin.String? = null, - - /* Location Code */ -@JsonProperty("Code") -val code: kotlin.String? = null, - - @JsonProperty("Address") -val address: CarsAddress? = null, - - @JsonProperty("PointOfInterest") -val pointOfInterest: kotlin.String? = null, - - @JsonProperty("GeoLocation") -val geoLocation: CarsGeoLocation? = null, - - @JsonProperty("Neighborhood") -val neighborhood: CarsNeighborhood? = null, - - /* RegionId the location resides in. */ -@JsonProperty("RegionId") -val regionId: kotlin.Long? = null, - - @JsonProperty("Country") -val country: CarsCountry? = null + // Location id. + @JsonProperty("LocationId") + val locationId: kotlin.String, + // The type of location code (MULTICITY | METROCODE). + @JsonProperty("Type") + val type: kotlin.String? = null, + // Expedia Region ID of the specified airport. + @JsonProperty("Id") + val id: kotlin.String? = null, + // Location Name + @JsonProperty("Name") + val name: kotlin.String? = null, + // Location Code + @JsonProperty("Code") + val code: kotlin.String? = null, + @JsonProperty("Address") + val address: CarsAddress? = null, + @JsonProperty("PointOfInterest") + val pointOfInterest: kotlin.String? = null, + @JsonProperty("GeoLocation") + val geoLocation: CarsGeoLocation? = null, + @JsonProperty("Neighborhood") + val neighborhood: CarsNeighborhood? = null, + // RegionId the location resides in. + @JsonProperty("RegionId") + val regionId: kotlin.Long? = null, + @JsonProperty("Country") + val country: CarsCountry? = null, ) { - - - init { - require(locationId != null) { "locationId must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + require(locationId != null) { "locationId must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var locationId: kotlin.String? = null, + private var type: kotlin.String? = null, + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + private var code: kotlin.String? = null, + private var address: CarsAddress? = null, + private var pointOfInterest: kotlin.String? = null, + private var geoLocation: CarsGeoLocation? = null, + private var neighborhood: CarsNeighborhood? = null, + private var regionId: kotlin.Long? = null, + private var country: CarsCountry? = null, + ) { + fun locationId(locationId: kotlin.String) = apply { this.locationId = locationId } + fun type(type: kotlin.String?) = apply { this.type = type } + fun id(id: kotlin.String?) = apply { this.id = id } + fun name(name: kotlin.String?) = apply { this.name = name } + fun code(code: kotlin.String?) = apply { this.code = code } + fun address(address: CarsAddress?) = apply { this.address = address } + fun pointOfInterest(pointOfInterest: kotlin.String?) = apply { this.pointOfInterest = pointOfInterest } + fun geoLocation(geoLocation: CarsGeoLocation?) = apply { this.geoLocation = geoLocation } + fun neighborhood(neighborhood: CarsNeighborhood?) = apply { this.neighborhood = neighborhood } - } + fun regionId(regionId: kotlin.Long?) = apply { this.regionId = regionId } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun country(country: CarsCountry?) = apply { this.country = country } - class Builder( - private var locationId: kotlin.String? = null, - private var type: kotlin.String? = null, - private var id: kotlin.String? = null, - private var name: kotlin.String? = null, - private var code: kotlin.String? = null, - private var address: CarsAddress? = null, - private var pointOfInterest: kotlin.String? = null, - private var geoLocation: CarsGeoLocation? = null, - private var neighborhood: CarsNeighborhood? = null, - private var regionId: kotlin.Long? = null, - private var country: CarsCountry? = null - ) { - fun locationId(locationId: kotlin.String) = apply { this.locationId = locationId } - fun type(type: kotlin.String?) = apply { this.type = type } - fun id(id: kotlin.String?) = apply { this.id = id } - fun name(name: kotlin.String?) = apply { this.name = name } - fun code(code: kotlin.String?) = apply { this.code = code } - fun address(address: CarsAddress?) = apply { this.address = address } - fun pointOfInterest(pointOfInterest: kotlin.String?) = apply { this.pointOfInterest = pointOfInterest } - fun geoLocation(geoLocation: CarsGeoLocation?) = apply { this.geoLocation = geoLocation } - fun neighborhood(neighborhood: CarsNeighborhood?) = apply { this.neighborhood = neighborhood } - fun regionId(regionId: kotlin.Long?) = apply { this.regionId = regionId } - fun country(country: CarsCountry?) = apply { this.country = country } - - fun build(): CarsLocation { - val instance = CarsLocation( - locationId = locationId!!, - type = type, - id = id, - name = name, - code = code, - address = address, - pointOfInterest = pointOfInterest, - geoLocation = geoLocation, - neighborhood = neighborhood, - regionId = regionId, - country = country - ) + fun build(): CarsLocation { + val instance = + CarsLocation( + locationId = locationId!!, + type = type, + id = id, + name = name, + code = code, + address = address, + pointOfInterest = pointOfInterest, + geoLocation = geoLocation, + neighborhood = neighborhood, + regionId = regionId, + country = country, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( locationId = locationId!!, type = type, id = id, @@ -223,6 +141,6 @@ val country: CarsCountry? = null geoLocation = geoLocation, neighborhood = neighborhood, regionId = regionId, - country = country - ) + country = country, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt index 6d21d0c2d..6a0a20e62 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsLocationOption.kt @@ -18,181 +18,110 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsCountry import com.expediagroup.sdk.xap.models.CarsGeoLocation import com.expediagroup.sdk.xap.models.CarsLocation - import com.fasterxml.jackson.annotation.JsonProperty /** -* List for possible locations from which the customer must choose the best one to be re-submitted in the request. - * @param requestedLocation Location used in partner request. - * @param locations Container for list of possible locations that could be used to disambiguate the query. - * @param type Type of the location. - * @param regionId RegionId the location resides in. - * @param shortName The name of the location which matches the location keyword. - * @param airportCode Indicates the nearest major airport to the location. - * @param address The address of the location. - * @param country - * @param geoLocation +* List for possible locations from which the customer must choose the best one to be re-submitted in the request. + * @param requestedLocation Location used in partner request. + * @param locations Container for list of possible locations that could be used to disambiguate the query. + * @param type Type of the location. + * @param regionId RegionId the location resides in. + * @param shortName The name of the location which matches the location keyword. + * @param airportCode Indicates the nearest major airport to the location. + * @param address The address of the location. + * @param country + * @param geoLocation */ data class CarsLocationOption( - /* Location used in partner request. */ -@JsonProperty("RequestedLocation") -val requestedLocation: - kotlin.String -, - - /* Container for list of possible locations that could be used to disambiguate the query. */ -@JsonProperty("Locations") -val locations: - kotlin.collections. - List -< - CarsLocation -> - -, - - /* Type of the location. */ -@JsonProperty("Type") -val type: kotlin.String? = null, - - /* RegionId the location resides in. */ -@JsonProperty("RegionId") -val regionId: kotlin.String? = null, - - /* The name of the location which matches the location keyword. */ -@JsonProperty("ShortName") -val shortName: kotlin.String? = null, - - /* Indicates the nearest major airport to the location. */ -@JsonProperty("AirportCode") -val airportCode: kotlin.String? = null, - - /* The address of the location. */ -@JsonProperty("Address") -val address: kotlin.String? = null, - - @JsonProperty("Country") -val country: CarsCountry? = null, - - @JsonProperty("GeoLocation") -val geoLocation: CarsGeoLocation? = null + // Location used in partner request. + @JsonProperty("RequestedLocation") + val requestedLocation: kotlin.String, + // Container for list of possible locations that could be used to disambiguate the query. + @JsonProperty("Locations") + val locations: kotlin.collections + .List< + CarsLocation, + >, + // Type of the location. + @JsonProperty("Type") + val type: kotlin.String? = null, + // RegionId the location resides in. + @JsonProperty("RegionId") + val regionId: kotlin.String? = null, + // The name of the location which matches the location keyword. + @JsonProperty("ShortName") + val shortName: kotlin.String? = null, + // Indicates the nearest major airport to the location. + @JsonProperty("AirportCode") + val airportCode: kotlin.String? = null, + // The address of the location. + @JsonProperty("Address") + val address: kotlin.String? = null, + @JsonProperty("Country") + val country: CarsCountry? = null, + @JsonProperty("GeoLocation") + val geoLocation: CarsGeoLocation? = null, ) { - - - init { - require(requestedLocation != null) { "requestedLocation must not be null" } - - - - - - + require(requestedLocation != null) { "requestedLocation must not be null" } require(locations != null) { "locations must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var requestedLocation: kotlin.String? = null, + private var locations: kotlin.collections.List? = null, + private var type: kotlin.String? = null, + private var regionId: kotlin.String? = null, + private var shortName: kotlin.String? = null, + private var airportCode: kotlin.String? = null, + private var address: kotlin.String? = null, + private var country: CarsCountry? = null, + private var geoLocation: CarsGeoLocation? = null, + ) { + fun requestedLocation(requestedLocation: kotlin.String) = apply { this.requestedLocation = requestedLocation } + fun locations(locations: kotlin.collections.List) = apply { this.locations = locations } + fun type(type: kotlin.String?) = apply { this.type = type } + fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } + fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } + fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } + fun address(address: kotlin.String?) = apply { this.address = address } + fun country(country: CarsCountry?) = apply { this.country = country } + fun geoLocation(geoLocation: CarsGeoLocation?) = apply { this.geoLocation = geoLocation } + fun build(): CarsLocationOption { + val instance = + CarsLocationOption( + requestedLocation = requestedLocation!!, + locations = locations!!, + type = type, + regionId = regionId, + shortName = shortName, + airportCode = airportCode, + address = address, + country = country, + geoLocation = geoLocation, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var requestedLocation: kotlin.String? = null, - private var locations: kotlin.collections.List? = null, - private var type: kotlin.String? = null, - private var regionId: kotlin.String? = null, - private var shortName: kotlin.String? = null, - private var airportCode: kotlin.String? = null, - private var address: kotlin.String? = null, - private var country: CarsCountry? = null, - private var geoLocation: CarsGeoLocation? = null - ) { - fun requestedLocation(requestedLocation: kotlin.String) = apply { this.requestedLocation = requestedLocation } - fun locations(locations: kotlin.collections.List) = apply { this.locations = locations } - fun type(type: kotlin.String?) = apply { this.type = type } - fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } - fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } - fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } - fun address(address: kotlin.String?) = apply { this.address = address } - fun country(country: CarsCountry?) = apply { this.country = country } - fun geoLocation(geoLocation: CarsGeoLocation?) = apply { this.geoLocation = geoLocation } - - fun build(): CarsLocationOption { - val instance = CarsLocationOption( - requestedLocation = requestedLocation!!, - locations = locations!!, - type = type, - regionId = regionId, - shortName = shortName, - airportCode = airportCode, - address = address, - country = country, - geoLocation = geoLocation - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( requestedLocation = requestedLocation!!, locations = locations!!, type = type, @@ -201,6 +130,6 @@ val geoLocation: CarsGeoLocation? = null airportCode = airportCode, address = address, country = country, - geoLocation = geoLocation - ) + geoLocation = geoLocation, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt index 17ab21816..e7d364809 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsMoney.kt @@ -15,89 +15,62 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Price of Special equipment. - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class CarsMoney( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: - kotlin.String -, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: - kotlin.String -, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: CarsMoney? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: CarsMoney? = null, ) { - - - init { - require(`value` != null) { "`value` must not be null" } - - - - - - + require(`value` != null) { "`value` must not be null" } require(currency != null) { "currency must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: CarsMoney? = null - ) { - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: CarsMoney?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: CarsMoney? = null, + ) { + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - fun build(): CarsMoney { - val instance = CarsMoney( - `value` = `value`!!, - currency = currency!!, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: CarsMoney?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): CarsMoney { + val instance = + CarsMoney( + `value` = `value`!!, + currency = currency!!, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`!!, currency = currency!!, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt index 72e6cd543..a88577f29 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsNeighborhood.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. - * @param id Neighborhood id. - * @param name Neighborhood name. + * @param id Neighborhood id. + * @param name Neighborhood name. */ data class CarsNeighborhood( - /* Neighborhood id. */ -@JsonProperty("Id") -val id: - kotlin.String -, - - /* Neighborhood name. */ -@JsonProperty("Name") -val name: - kotlin.String - + // Neighborhood id. + @JsonProperty("Id") + val id: kotlin.String, + // Neighborhood name. + @JsonProperty("Name") + val name: kotlin.String, ) { - - - init { - require(id != null) { "id must not be null" } - - - - - - + require(id != null) { "id must not be null" } require(name != null) { "name must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.String) = apply { this.id = id } - fun name(name: kotlin.String) = apply { this.name = name } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + ) { + fun id(id: kotlin.String) = apply { this.id = id } - fun build(): CarsNeighborhood { - val instance = CarsNeighborhood( - id = id!!, - name = name!! - ) + fun name(name: kotlin.String) = apply { this.name = name } - return instance - } + fun build(): CarsNeighborhood { + val instance = + CarsNeighborhood( + id = id!!, + name = name!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id!!, - name = name!! - ) + name = name!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt index 5c3af3110..fbf75a987 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsValidFormsOfPayment.kt @@ -15,93 +15,65 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * List of all the forms of payment that will be accepted for the booking of this rental transaction. - * @param paymentMethod Method of payment - * @param paymentSubMethod Sub method of payment - * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. + * @param paymentMethod Method of payment + * @param paymentSubMethod Sub method of payment + * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. */ data class CarsValidFormsOfPayment( - /* Method of payment */ -@JsonProperty("PaymentMethod") -val paymentMethod: - kotlin.String -, - - /* Sub method of payment */ -@JsonProperty("PaymentSubMethod") -val paymentSubMethod: - kotlin.String -, - - /* The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. */ -@JsonProperty("BrandName") -val brandName: - kotlin.String - + // Method of payment + @JsonProperty("PaymentMethod") + val paymentMethod: kotlin.String, + // Sub method of payment + @JsonProperty("PaymentSubMethod") + val paymentSubMethod: kotlin.String, + // The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Bleue\" and \"Visa/Delta are some of the exceptions. + @JsonProperty("BrandName") + val brandName: kotlin.String, ) { - - - init { - require(paymentMethod != null) { "paymentMethod must not be null" } - - - - - - + require(paymentMethod != null) { "paymentMethod must not be null" } require(paymentSubMethod != null) { "paymentSubMethod must not be null" } - - - - - - require(brandName != null) { "brandName must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var paymentMethod: kotlin.String? = null, - private var paymentSubMethod: kotlin.String? = null, - private var brandName: kotlin.String? = null - ) { - fun paymentMethod(paymentMethod: kotlin.String) = apply { this.paymentMethod = paymentMethod } - fun paymentSubMethod(paymentSubMethod: kotlin.String) = apply { this.paymentSubMethod = paymentSubMethod } - fun brandName(brandName: kotlin.String) = apply { this.brandName = brandName } + class Builder( + private var paymentMethod: kotlin.String? = null, + private var paymentSubMethod: kotlin.String? = null, + private var brandName: kotlin.String? = null, + ) { + fun paymentMethod(paymentMethod: kotlin.String) = apply { this.paymentMethod = paymentMethod } - fun build(): CarsValidFormsOfPayment { - val instance = CarsValidFormsOfPayment( - paymentMethod = paymentMethod!!, - paymentSubMethod = paymentSubMethod!!, - brandName = brandName!! - ) + fun paymentSubMethod(paymentSubMethod: kotlin.String) = apply { this.paymentSubMethod = paymentSubMethod } - return instance - } + fun brandName(brandName: kotlin.String) = apply { this.brandName = brandName } + + fun build(): CarsValidFormsOfPayment { + val instance = + CarsValidFormsOfPayment( + paymentMethod = paymentMethod!!, + paymentSubMethod = paymentSubMethod!!, + brandName = brandName!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( paymentMethod = paymentMethod!!, paymentSubMethod = paymentSubMethod!!, - brandName = brandName!! - ) + brandName = brandName!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt index fb1ac693a..2e2f01e48 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsWarning.kt @@ -17,150 +17,95 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsLink import com.expediagroup.sdk.xap.models.CarsMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for warning codes - * @param code Standardized warning code. - * @param description Standardized warning description message. - * @param originalPrice - * @param newPrice - * @param changedAmount - * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. - * @param links + * @param code Standardized warning code. + * @param description Standardized warning description message. + * @param originalPrice + * @param newPrice + * @param changedAmount + * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. + * @param links */ data class CarsWarning( - /* Standardized warning code. */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* Standardized warning description message. */ -@JsonProperty("Description") -val description: - kotlin.String -, - - @JsonProperty("OriginalPrice") -val originalPrice: CarsMoney? = null, - - @JsonProperty("NewPrice") -val newPrice: CarsMoney? = null, - - @JsonProperty("ChangedAmount") -val changedAmount: CarsMoney? = null, - - /* The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ -@JsonProperty("ChangedPercentage") -val changedPercentage: kotlin.String? = null, - - @JsonProperty("Links") -val links: kotlin.collections.Map? = null + // Standardized warning code. + @JsonProperty("Code") + val code: kotlin.String, + // Standardized warning description message. + @JsonProperty("Description") + val description: kotlin.String, + @JsonProperty("OriginalPrice") + val originalPrice: CarsMoney? = null, + @JsonProperty("NewPrice") + val newPrice: CarsMoney? = null, + @JsonProperty("ChangedAmount") + val changedAmount: CarsMoney? = null, + // The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. + @JsonProperty("ChangedPercentage") + val changedPercentage: kotlin.String? = null, + @JsonProperty("Links") + val links: kotlin.collections.Map? = null, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(description != null) { "description must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var originalPrice: CarsMoney? = null, + private var newPrice: CarsMoney? = null, + private var changedAmount: CarsMoney? = null, + private var changedPercentage: kotlin.String? = null, + private var links: kotlin.collections.Map? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } + fun description(description: kotlin.String) = apply { this.description = description } + fun originalPrice(originalPrice: CarsMoney?) = apply { this.originalPrice = originalPrice } + fun newPrice(newPrice: CarsMoney?) = apply { this.newPrice = newPrice } + fun changedAmount(changedAmount: CarsMoney?) = apply { this.changedAmount = changedAmount } + fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + fun build(): CarsWarning { + val instance = + CarsWarning( + code = code!!, + description = description!!, + originalPrice = originalPrice, + newPrice = newPrice, + changedAmount = changedAmount, + changedPercentage = changedPercentage, + links = links, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var originalPrice: CarsMoney? = null, - private var newPrice: CarsMoney? = null, - private var changedAmount: CarsMoney? = null, - private var changedPercentage: kotlin.String? = null, - private var links: kotlin.collections.Map? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun description(description: kotlin.String) = apply { this.description = description } - fun originalPrice(originalPrice: CarsMoney?) = apply { this.originalPrice = originalPrice } - fun newPrice(newPrice: CarsMoney?) = apply { this.newPrice = newPrice } - fun changedAmount(changedAmount: CarsMoney?) = apply { this.changedAmount = changedAmount } - fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun build(): CarsWarning { - val instance = CarsWarning( - code = code!!, - description = description!!, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount, - changedPercentage = changedPercentage, - links = links - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, description = description!!, originalPrice = originalPrice, newPrice = newPrice, changedAmount = changedAmount, changedPercentage = changedPercentage, - links = links - ) + links = links, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt index 58359807b..d208f112a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CategoryGroup.kt @@ -15,127 +15,84 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for a breakdown of how many of each type of Activity have been returned in the API response. - * @param count The count of the number of categories the returned set of activities map to. - * @param groupName The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration - * @param groupDisplayName The localized value for category name. - * @param categoryName The name of one of the categories. - * @param categoryDisplayName + * @param count The count of the number of categories the returned set of activities map to. + * @param groupName The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration + * @param groupDisplayName The localized value for category name. + * @param categoryName The name of one of the categories. + * @param categoryDisplayName */ data class CategoryGroup( - /* The count of the number of categories the returned set of activities map to. */ -@JsonProperty("Count") -val count: - kotlin.Int -, - - /* The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration */ -@JsonProperty("GroupName") -val groupName: - kotlin.String -, - - /* The localized value for category name. */ -@JsonProperty("GroupDisplayName") -val groupDisplayName: - kotlin.String -, - - /* The name of one of the categories. */ -@JsonProperty("CategoryName") -val categoryName: - kotlin.String -, - - @JsonProperty("CategoryDisplayName") -val categoryDisplayName: kotlin.String? = null + // The count of the number of categories the returned set of activities map to. + @JsonProperty("Count") + val count: kotlin.Int, + // The group which the category belongs Possible value is: Recommendations Tours Activities Transportation Promotions Duration + @JsonProperty("GroupName") + val groupName: kotlin.String, + // The localized value for category name. + @JsonProperty("GroupDisplayName") + val groupDisplayName: kotlin.String, + // The name of one of the categories. + @JsonProperty("CategoryName") + val categoryName: kotlin.String, + @JsonProperty("CategoryDisplayName") + val categoryDisplayName: kotlin.String? = null, ) { - - - init { - require(count != null) { "count must not be null" } - - - - - - + require(count != null) { "count must not be null" } require(groupName != null) { "groupName must not be null" } - - - - - - require(groupDisplayName != null) { "groupDisplayName must not be null" } - - - - - - require(categoryName != null) { "categoryName must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var count: kotlin.Int? = null, + private var groupName: kotlin.String? = null, + private var groupDisplayName: kotlin.String? = null, + private var categoryName: kotlin.String? = null, + private var categoryDisplayName: kotlin.String? = null, + ) { + fun count(count: kotlin.Int) = apply { this.count = count } + fun groupName(groupName: kotlin.String) = apply { this.groupName = groupName } + fun groupDisplayName(groupDisplayName: kotlin.String) = apply { this.groupDisplayName = groupDisplayName } + fun categoryName(categoryName: kotlin.String) = apply { this.categoryName = categoryName } + fun categoryDisplayName(categoryDisplayName: kotlin.String?) = apply { this.categoryDisplayName = categoryDisplayName } + fun build(): CategoryGroup { + val instance = + CategoryGroup( + count = count!!, + groupName = groupName!!, + groupDisplayName = groupDisplayName!!, + categoryName = categoryName!!, + categoryDisplayName = categoryDisplayName, + ) - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var count: kotlin.Int? = null, - private var groupName: kotlin.String? = null, - private var groupDisplayName: kotlin.String? = null, - private var categoryName: kotlin.String? = null, - private var categoryDisplayName: kotlin.String? = null - ) { - fun count(count: kotlin.Int) = apply { this.count = count } - fun groupName(groupName: kotlin.String) = apply { this.groupName = groupName } - fun groupDisplayName(groupDisplayName: kotlin.String) = apply { this.groupDisplayName = groupDisplayName } - fun categoryName(categoryName: kotlin.String) = apply { this.categoryName = categoryName } - fun categoryDisplayName(categoryDisplayName: kotlin.String?) = apply { this.categoryDisplayName = categoryDisplayName } - - fun build(): CategoryGroup { - val instance = CategoryGroup( - count = count!!, - groupName = groupName!!, - groupDisplayName = groupDisplayName!!, - categoryName = categoryName!!, - categoryDisplayName = categoryDisplayName - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( count = count!!, groupName = groupName!!, groupDisplayName = groupDisplayName!!, categoryName = categoryName!!, - categoryDisplayName = categoryDisplayName - ) + categoryDisplayName = categoryDisplayName, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt index 93a6da9a5..496a4755b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ChainAndBrandInfo.kt @@ -15,100 +15,69 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* The chain and brand information of hotel. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param chainId The chain id. - * @param chainName The name of the chain. - * @param brandId The brand id. - * @param brandName The name of the brand. +* The chain and brand information of hotel. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + * @param chainId The chain id. + * @param chainName The name of the chain. + * @param brandId The brand id. + * @param brandName The name of the brand. */ data class ChainAndBrandInfo( - /* The chain id. */ -@JsonProperty("ChainId") -val chainId: kotlin.Int? = null, - - /* The name of the chain. */ -@JsonProperty("ChainName") -val chainName: kotlin.String? = null, - - /* The brand id. */ -@JsonProperty("BrandId") -val brandId: kotlin.Int? = null, - - /* The name of the brand. */ -@JsonProperty("BrandName") -val brandName: kotlin.String? = null + // The chain id. + @JsonProperty("ChainId") + val chainId: kotlin.Int? = null, + // The name of the chain. + @JsonProperty("ChainName") + val chainName: kotlin.String? = null, + // The brand id. + @JsonProperty("BrandId") + val brandId: kotlin.Int? = null, + // The name of the brand. + @JsonProperty("BrandName") + val brandName: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var chainId: kotlin.Int? = null, - private var chainName: kotlin.String? = null, - private var brandId: kotlin.Int? = null, - private var brandName: kotlin.String? = null - ) { - fun chainId(chainId: kotlin.Int?) = apply { this.chainId = chainId } - fun chainName(chainName: kotlin.String?) = apply { this.chainName = chainName } - fun brandId(brandId: kotlin.Int?) = apply { this.brandId = brandId } - fun brandName(brandName: kotlin.String?) = apply { this.brandName = brandName } + class Builder( + private var chainId: kotlin.Int? = null, + private var chainName: kotlin.String? = null, + private var brandId: kotlin.Int? = null, + private var brandName: kotlin.String? = null, + ) { + fun chainId(chainId: kotlin.Int?) = apply { this.chainId = chainId } - fun build(): ChainAndBrandInfo { - val instance = ChainAndBrandInfo( - chainId = chainId, - chainName = chainName, - brandId = brandId, - brandName = brandName - ) + fun chainName(chainName: kotlin.String?) = apply { this.chainName = chainName } - return instance - } + fun brandId(brandId: kotlin.Int?) = apply { this.brandId = brandId } + + fun brandName(brandName: kotlin.String?) = apply { this.brandName = brandName } + + fun build(): ChainAndBrandInfo { + val instance = + ChainAndBrandInfo( + chainId = chainId, + chainName = chainName, + brandId = brandId, + brandName = brandName, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( chainId = chainId, chainName = chainName, brandId = brandId, - brandName = brandName - ) + brandName = brandName, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt index 763ea35ed..d6aa82193 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Country.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for disambiguation country information - * @param name country name - * @param isoCode2 2-letter code for the country - * @param isoCode3 3-letter code for the country + * @param name country name + * @param isoCode2 2-letter code for the country + * @param isoCode3 3-letter code for the country */ data class Country( - /* country name */ -@JsonProperty("Name") -val name: kotlin.String? = null, - - /* 2-letter code for the country */ -@JsonProperty("IsoCode2") -val isoCode2: kotlin.String? = null, - - /* 3-letter code for the country */ -@JsonProperty("IsoCode3") -val isoCode3: kotlin.String? = null + // country name + @JsonProperty("Name") + val name: kotlin.String? = null, + // 2-letter code for the country + @JsonProperty("IsoCode2") + val isoCode2: kotlin.String? = null, + // 3-letter code for the country + @JsonProperty("IsoCode3") + val isoCode3: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var isoCode2: kotlin.String? = null, - private var isoCode3: kotlin.String? = null - ) { - fun name(name: kotlin.String?) = apply { this.name = name } - fun isoCode2(isoCode2: kotlin.String?) = apply { this.isoCode2 = isoCode2 } - fun isoCode3(isoCode3: kotlin.String?) = apply { this.isoCode3 = isoCode3 } + class Builder( + private var name: kotlin.String? = null, + private var isoCode2: kotlin.String? = null, + private var isoCode3: kotlin.String? = null, + ) { + fun name(name: kotlin.String?) = apply { this.name = name } - fun build(): Country { - val instance = Country( - name = name, - isoCode2 = isoCode2, - isoCode3 = isoCode3 - ) + fun isoCode2(isoCode2: kotlin.String?) = apply { this.isoCode2 = isoCode2 } - return instance - } + fun isoCode3(isoCode3: kotlin.String?) = apply { this.isoCode3 = isoCode3 } + + fun build(): Country { + val instance = + Country( + name = name, + isoCode2 = isoCode2, + isoCode3 = isoCode3, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( name = name, isoCode2 = isoCode2, - isoCode3 = isoCode3 - ) + isoCode3 = isoCode3, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt index 644040188..9eb4866b8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateRange.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * The actual date range for the shown availability. - * @param startDate The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. - * @param endDate The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. + * @param startDate The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. + * @param endDate The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. */ data class DateRange( - /* The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. */ -@JsonProperty("StartDate") -val startDate: java.time.LocalDate? = null, - - /* The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. */ -@JsonProperty("EndDate") -val endDate: java.time.LocalDate? = null + // The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. + @JsonProperty("StartDate") + val startDate: java.time.LocalDate? = null, + // The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. + @JsonProperty("EndDate") + val endDate: java.time.LocalDate? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null - ) { - fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } + class Builder( + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null, + ) { + fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - fun build(): DateRange { - val instance = DateRange( - startDate = startDate, - endDate = endDate - ) + fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } - return instance - } + fun build(): DateRange { + val instance = + DateRange( + startDate = startDate, + endDate = endDate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( startDate = startDate, - endDate = endDate - ) + endDate = endDate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt index e5e19a59c..a05b12db1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DateTimePeriod.kt @@ -17,70 +17,51 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsDateRange import com.expediagroup.sdk.xap.models.TimeRange - import com.fasterxml.jackson.annotation.JsonProperty /** * A List of date time periods to indicate the vendor business hours for the pickup time. - * @param dateRange - * @param timeRanges A list of time range to indicate the operation hours of the date range. + * @param dateRange + * @param timeRanges A list of time range to indicate the operation hours of the date range. */ data class DateTimePeriod( - @JsonProperty("DateRange") -val dateRange: - CarsDateRange -, - - /* A list of time range to indicate the operation hours of the date range. */ -@JsonProperty("TimeRanges") -val timeRanges: kotlin.collections.List? = null + @JsonProperty("DateRange") + val dateRange: CarsDateRange, + // A list of time range to indicate the operation hours of the date range. + @JsonProperty("TimeRanges") + val timeRanges: kotlin.collections.List? = null, ) { - - - init { - require(dateRange != null) { "dateRange must not be null" } - - - - - - - - - - - - - - - + require(dateRange != null) { "dateRange must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var dateRange: CarsDateRange? = null, - private var timeRanges: kotlin.collections.List? = null - ) { - fun dateRange(dateRange: CarsDateRange) = apply { this.dateRange = dateRange } - fun timeRanges(timeRanges: kotlin.collections.List?) = apply { this.timeRanges = timeRanges } + class Builder( + private var dateRange: CarsDateRange? = null, + private var timeRanges: kotlin.collections.List? = null, + ) { + fun dateRange(dateRange: CarsDateRange) = apply { this.dateRange = dateRange } - fun build(): DateTimePeriod { - val instance = DateTimePeriod( - dateRange = dateRange!!, - timeRanges = timeRanges - ) + fun timeRanges(timeRanges: kotlin.collections.List?) = apply { this.timeRanges = timeRanges } - return instance - } + fun build(): DateTimePeriod { + val instance = + DateTimePeriod( + dateRange = dateRange!!, + timeRanges = timeRanges, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( dateRange = dateRange!!, - timeRanges = timeRanges - ) + timeRanges = timeRanges, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt index 8b354cf60..0e616c9de 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Deductible.kt @@ -16,81 +16,57 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Indicate whether it is deductible - * @param excessAmount - * @param liabilityAmount - * @param deductibleAmount + * @param excessAmount + * @param liabilityAmount + * @param deductibleAmount */ data class Deductible( - @JsonProperty("ExcessAmount") -val excessAmount: CarsMoney? = null, - - @JsonProperty("LiabilityAmount") -val liabilityAmount: CarsMoney? = null, - - @JsonProperty("DeductibleAmount") -val deductibleAmount: CarsMoney? = null + @JsonProperty("ExcessAmount") + val excessAmount: CarsMoney? = null, + @JsonProperty("LiabilityAmount") + val liabilityAmount: CarsMoney? = null, + @JsonProperty("DeductibleAmount") + val deductibleAmount: CarsMoney? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var excessAmount: CarsMoney? = null, - private var liabilityAmount: CarsMoney? = null, - private var deductibleAmount: CarsMoney? = null - ) { - fun excessAmount(excessAmount: CarsMoney?) = apply { this.excessAmount = excessAmount } - fun liabilityAmount(liabilityAmount: CarsMoney?) = apply { this.liabilityAmount = liabilityAmount } - fun deductibleAmount(deductibleAmount: CarsMoney?) = apply { this.deductibleAmount = deductibleAmount } + class Builder( + private var excessAmount: CarsMoney? = null, + private var liabilityAmount: CarsMoney? = null, + private var deductibleAmount: CarsMoney? = null, + ) { + fun excessAmount(excessAmount: CarsMoney?) = apply { this.excessAmount = excessAmount } - fun build(): Deductible { - val instance = Deductible( - excessAmount = excessAmount, - liabilityAmount = liabilityAmount, - deductibleAmount = deductibleAmount - ) + fun liabilityAmount(liabilityAmount: CarsMoney?) = apply { this.liabilityAmount = liabilityAmount } - return instance - } + fun deductibleAmount(deductibleAmount: CarsMoney?) = apply { this.deductibleAmount = deductibleAmount } + + fun build(): Deductible { + val instance = + Deductible( + excessAmount = excessAmount, + liabilityAmount = liabilityAmount, + deductibleAmount = deductibleAmount, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( excessAmount = excessAmount, liabilityAmount = liabilityAmount, - deductibleAmount = deductibleAmount - ) + deductibleAmount = deductibleAmount, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt index e886463f2..9908fe4bc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositDetail.kt @@ -16,101 +16,79 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.When - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for deposit policy details - * @param type Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. - * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a deposit. - * @param `when` + * @param type Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. + * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a deposit. + * @param `when` */ data class DepositDetail( - /* Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. */ -@JsonProperty("Type") -val type: DepositDetail.Type? = null, - - /* Value to indicate how many/much of the type listed above is going to be charged as a deposit. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - @JsonProperty("When") -val `when`: When? = null + // Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. + @JsonProperty("Type") + val type: DepositDetail.Type? = null, + // Value to indicate how many/much of the type listed above is going to be charged as a deposit. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + @JsonProperty("When") + val `when`: When? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: DepositDetail.Type? = null, - private var `value`: kotlin.String? = null, - private var `when`: When? = null - ) { - fun type(type: DepositDetail.Type?) = apply { this.type = type } - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun `when`(`when`: When?) = apply { this.`when` = `when` } + class Builder( + private var type: DepositDetail.Type? = null, + private var `value`: kotlin.String? = null, + private var `when`: When? = null, + ) { + fun type(type: DepositDetail.Type?) = apply { this.type = type } - fun build(): DepositDetail { - val instance = DepositDetail( - type = type, - `value` = `value`, - `when` = `when` - ) + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - return instance - } + fun `when`(`when`: When?) = apply { this.`when` = `when` } + + fun build(): DepositDetail { + val instance = + DepositDetail( + type = type, + `value` = `value`, + `when` = `when`, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type, `value` = `value`, - `when` = `when` - ) - - /** - * Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. - * Values: PERCENT,NIGHT,AMOUNT,REMAINDER - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("PERCENT") - PERCENT("PERCENT"), - - @JsonProperty("NIGHT") - NIGHT("NIGHT"), - - @JsonProperty("AMOUNT") - AMOUNT("AMOUNT"), - - @JsonProperty("REMAINDER") - REMAINDER("REMAINDER"); - } + `when` = `when`, + ) + + /** + * Should be one of the following values: PERCENT The deposit amount is calculated as a percentage of the total booking cost. NIGHT The deposit amount is calculated in terms of nights plus tax. AMOUNT The deposit amount in USD. REMAINDER The deposit amount is equal to the booking cost minus any deposits that have been made before this point. + * Values: PERCENT,NIGHT,AMOUNT,REMAINDER + */ + enum class Type( + val value: kotlin.String, + ) { + @JsonProperty("PERCENT") + PERCENT("PERCENT"), + + @JsonProperty("NIGHT") + NIGHT("NIGHT"), + + @JsonProperty("AMOUNT") + AMOUNT("AMOUNT"), + + @JsonProperty("REMAINDER") + REMAINDER("REMAINDER"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt index ff040ff94..7bcd4b10a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DepositPolicy.kt @@ -16,67 +16,50 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.DepositDetail - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for deposit policy details - * @param description - * @param details Container for deposit policy details + * @param description + * @param details Container for deposit policy details */ data class DepositPolicy( - @JsonProperty("Description") -val description: kotlin.collections.List? = null, - - /* Container for deposit policy details */ -@JsonProperty("Details") -val details: kotlin.collections.List? = null + @JsonProperty("Description") + val description: kotlin.collections.List? = null, + // Container for deposit policy details + @JsonProperty("Details") + val details: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var description: kotlin.collections.List? = null, - private var details: kotlin.collections.List? = null - ) { - fun description(description: kotlin.collections.List?) = apply { this.description = description } - fun details(details: kotlin.collections.List?) = apply { this.details = details } + class Builder( + private var description: kotlin.collections.List? = null, + private var details: kotlin.collections.List? = null, + ) { + fun description(description: kotlin.collections.List?) = apply { this.description = description } - fun build(): DepositPolicy { - val instance = DepositPolicy( - description = description, - details = details - ) + fun details(details: kotlin.collections.List?) = apply { this.details = details } - return instance - } + fun build(): DepositPolicy { + val instance = + DepositPolicy( + description = description, + details = details, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( description = description, - details = details - ) + details = details, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt index 9d3ca899c..c9741d227 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Description.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for the descriptions of the property. - * @param locationTeaser A description of the property's location. - * @param hotelTeaser A description of the features and amenities of the property itself. - * @param roomTeaser The common description for all of the rooms in the property. + * @param locationTeaser A description of the property's location. + * @param hotelTeaser A description of the features and amenities of the property itself. + * @param roomTeaser The common description for all of the rooms in the property. */ data class Description( - /* A description of the property's location. */ -@JsonProperty("LocationTeaser") -val locationTeaser: kotlin.String? = null, - - /* A description of the features and amenities of the property itself. */ -@JsonProperty("HotelTeaser") -val hotelTeaser: kotlin.String? = null, - - /* The common description for all of the rooms in the property. */ -@JsonProperty("RoomTeaser") -val roomTeaser: kotlin.String? = null + // A description of the property's location. + @JsonProperty("LocationTeaser") + val locationTeaser: kotlin.String? = null, + // A description of the features and amenities of the property itself. + @JsonProperty("HotelTeaser") + val hotelTeaser: kotlin.String? = null, + // The common description for all of the rooms in the property. + @JsonProperty("RoomTeaser") + val roomTeaser: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var locationTeaser: kotlin.String? = null, - private var hotelTeaser: kotlin.String? = null, - private var roomTeaser: kotlin.String? = null - ) { - fun locationTeaser(locationTeaser: kotlin.String?) = apply { this.locationTeaser = locationTeaser } - fun hotelTeaser(hotelTeaser: kotlin.String?) = apply { this.hotelTeaser = hotelTeaser } - fun roomTeaser(roomTeaser: kotlin.String?) = apply { this.roomTeaser = roomTeaser } + class Builder( + private var locationTeaser: kotlin.String? = null, + private var hotelTeaser: kotlin.String? = null, + private var roomTeaser: kotlin.String? = null, + ) { + fun locationTeaser(locationTeaser: kotlin.String?) = apply { this.locationTeaser = locationTeaser } - fun build(): Description { - val instance = Description( - locationTeaser = locationTeaser, - hotelTeaser = hotelTeaser, - roomTeaser = roomTeaser - ) + fun hotelTeaser(hotelTeaser: kotlin.String?) = apply { this.hotelTeaser = hotelTeaser } - return instance - } + fun roomTeaser(roomTeaser: kotlin.String?) = apply { this.roomTeaser = roomTeaser } + + fun build(): Description { + val instance = + Description( + locationTeaser = locationTeaser, + hotelTeaser = hotelTeaser, + roomTeaser = roomTeaser, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( locationTeaser = locationTeaser, hotelTeaser = hotelTeaser, - roomTeaser = roomTeaser - ) + roomTeaser = roomTeaser, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt index 35295cec3..34d0e2c68 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/DisambiguationResponse.kt @@ -16,79 +16,57 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsError - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class DisambiguationResponse( - /* Container for error list. */ -@JsonProperty("Errors") -val errors: - kotlin.collections. - List -< - CarsError -> - -, - - /* A unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: - kotlin.String - + // Container for error list. + @JsonProperty("Errors") + val errors: kotlin.collections + .List< + CarsError, + >, + // A unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String, ) { - - - init { - require(errors != null) { "errors must not be null" } - - - - - - + require(errors != null) { "errors must not be null" } require(transactionId != null) { "transactionId must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + ) { + fun errors(errors: kotlin.collections.List) = apply { this.errors = errors } - fun build(): DisambiguationResponse { - val instance = DisambiguationResponse( - errors = errors!!, - transactionId = transactionId!! - ) + fun transactionId(transactionId: kotlin.String) = apply { this.transactionId = transactionId } - return instance - } + fun build(): DisambiguationResponse { + val instance = + DisambiguationResponse( + errors = errors!!, + transactionId = transactionId!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( errors = errors!!, - transactionId = transactionId!! - ) + transactionId = transactionId!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt index c9fdd4f52..3755cfa75 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Discount.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * List of discount information. - * @param type Discount type. Supported values : CorpDiscount | Coupon. - * @param code Discount code. + * @param type Discount type. Supported values : CorpDiscount | Coupon. + * @param code Discount code. */ data class Discount( - /* Discount type. Supported values : CorpDiscount | Coupon. */ -@JsonProperty("Type") -val type: - kotlin.String -, - - /* Discount code. */ -@JsonProperty("Code") -val code: - kotlin.String - + // Discount type. Supported values : CorpDiscount | Coupon. + @JsonProperty("Type") + val type: kotlin.String, + // Discount code. + @JsonProperty("Code") + val code: kotlin.String, ) { - - - init { - require(type != null) { "type must not be null" } - - - - - - + require(type != null) { "type must not be null" } require(code != null) { "code must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var code: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - fun code(code: kotlin.String) = apply { this.code = code } + class Builder( + private var type: kotlin.String? = null, + private var code: kotlin.String? = null, + ) { + fun type(type: kotlin.String) = apply { this.type = type } - fun build(): Discount { - val instance = Discount( - type = type!!, - code = code!! - ) + fun code(code: kotlin.String) = apply { this.code = code } - return instance - } + fun build(): Discount { + val instance = + Discount( + type = type!!, + code = code!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type!!, - code = code!! - ) + code = code!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt index aa2be3413..d60450471 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Distance.kt @@ -15,126 +15,106 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* Container for distance information. Only returned for city/address search or `geoLocation` search or single `regionId` search. - * @param `value` The distance between the center of the search and the hotel. - * @param unit The unit of distance. - * @param direction The direction to the hotel from the center point of the search. +* Container for distance information. Only returned for city/address search or `geoLocation` search or single `regionId` search. + * @param `value` The distance between the center of the search and the hotel. + * @param unit The unit of distance. + * @param direction The direction to the hotel from the center point of the search. */ data class Distance( - /* The distance between the center of the search and the hotel. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The unit of distance. */ -@JsonProperty("Unit") -val unit: Distance.Unit? = null, - - /* The direction to the hotel from the center point of the search. */ -@JsonProperty("Direction") -val direction: Distance.Direction? = null + // The distance between the center of the search and the hotel. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The unit of distance. + @JsonProperty("Unit") + val unit: Distance.Unit? = null, + // The direction to the hotel from the center point of the search. + @JsonProperty("Direction") + val direction: Distance.Direction? = null, ) { - - - init { - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var `value`: kotlin.String? = null, + private var unit: Distance.Unit? = null, + private var direction: Distance.Direction? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + fun unit(unit: Distance.Unit?) = apply { this.unit = unit } + fun direction(direction: Distance.Direction?) = apply { this.direction = direction } + fun build(): Distance { + val instance = + Distance( + `value` = `value`, + unit = unit, + direction = direction, + ) + return instance + } + } + fun toBuilder() = + Builder( + `value` = `value`, + unit = unit, + direction = direction, + ) + + /** + * The unit of distance. + * Values: KM,MI + */ + enum class Unit( + val value: kotlin.String, + ) { + @JsonProperty("km") + KM("km"), + + @JsonProperty("mi") + MI("mi"), + } + /** + * The direction to the hotel from the center point of the search. + * Values: N,S,W,E,NW,NE,SW,SE + */ + enum class Direction( + val value: kotlin.String, + ) { + @JsonProperty("N") + N("N"), + @JsonProperty("S") + S("S"), + @JsonProperty("W") + W("W"), + @JsonProperty("E") + E("E"), - } + @JsonProperty("NW") + NW("NW"), - companion object { - @JvmStatic - fun builder() = Builder() - } + @JsonProperty("NE") + NE("NE"), - class Builder( - private var `value`: kotlin.String? = null, - private var unit: Distance.Unit? = null, - private var direction: Distance.Direction? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun unit(unit: Distance.Unit?) = apply { this.unit = unit } - fun direction(direction: Distance.Direction?) = apply { this.direction = direction } - - fun build(): Distance { - val instance = Distance( - `value` = `value`, - unit = unit, - direction = direction - ) + @JsonProperty("SW") + SW("SW"), - return instance - } + @JsonProperty("SE") + SE("SE"), } - - fun toBuilder() = Builder( - `value` = `value`, - unit = unit, - direction = direction - ) - - /** - * The unit of distance. - * Values: KM,MI - */ - enum class Unit(val value: kotlin.String) { - @JsonProperty("km") - KM("km"), - - @JsonProperty("mi") - MI("mi"); - } - - /** - * The direction to the hotel from the center point of the search. - * Values: N,S,W,E,NW,NE,SW,SE - */ - enum class Direction(val value: kotlin.String) { - @JsonProperty("N") - N("N"), - - @JsonProperty("S") - S("S"), - - @JsonProperty("W") - W("W"), - - @JsonProperty("E") - E("E"), - - @JsonProperty("NW") - NW("NW"), - - @JsonProperty("NE") - NE("NE"), - - @JsonProperty("SW") - SW("SW"), - - @JsonProperty("SE") - SE("SE"); - } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt index e76ad2f8d..a4d0aca8f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Duration.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * The maximum amount of time for a rental that still qualifies for this rate.This may or may not be the same as the current rental duration. - * @param unit The unit for minimum amount of time for a rental. - * @param count The minimum number of units that qualify for minimum amount of time for a rental. + * @param unit The unit for minimum amount of time for a rental. + * @param count The minimum number of units that qualify for minimum amount of time for a rental. */ data class Duration( - /* The unit for minimum amount of time for a rental. */ -@JsonProperty("Unit") -val unit: - kotlin.String -, - - /* The minimum number of units that qualify for minimum amount of time for a rental. */ -@JsonProperty("Count") -val count: - kotlin.Long - + // The unit for minimum amount of time for a rental. + @JsonProperty("Unit") + val unit: kotlin.String, + // The minimum number of units that qualify for minimum amount of time for a rental. + @JsonProperty("Count") + val count: kotlin.Long, ) { - - - init { - require(unit != null) { "unit must not be null" } - - - - - - + require(unit != null) { "unit must not be null" } require(count != null) { "count must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var unit: kotlin.String? = null, - private var count: kotlin.Long? = null - ) { - fun unit(unit: kotlin.String) = apply { this.unit = unit } - fun count(count: kotlin.Long) = apply { this.count = count } + class Builder( + private var unit: kotlin.String? = null, + private var count: kotlin.Long? = null, + ) { + fun unit(unit: kotlin.String) = apply { this.unit = unit } - fun build(): Duration { - val instance = Duration( - unit = unit!!, - count = count!! - ) + fun count(count: kotlin.Long) = apply { this.count = count } - return instance - } + fun build(): Duration { + val instance = + Duration( + unit = unit!!, + count = count!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( unit = unit!!, - count = count!! - ) + count = count!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt index d252b43df..ce7a573b6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Equipment.kt @@ -16,105 +16,71 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Description and costs of any optional special equipment that may be rented with the car. - * @param code Special equipment code - * @param name Special equipment name - * @param ratePeriod Unit indicating the price of special equipment. Support value:Trip,Daily - * @param price + * @param code Special equipment code + * @param name Special equipment name + * @param ratePeriod Unit indicating the price of special equipment. Support value:Trip,Daily + * @param price */ data class Equipment( - /* Special equipment code */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* Special equipment name */ -@JsonProperty("Name") -val name: - kotlin.String -, - - /* Unit indicating the price of special equipment. Support value:Trip,Daily */ -@JsonProperty("RatePeriod") -val ratePeriod: kotlin.String? = null, - - @JsonProperty("Price") -val price: CarsMoney? = null + // Special equipment code + @JsonProperty("Code") + val code: kotlin.String, + // Special equipment name + @JsonProperty("Name") + val name: kotlin.String, + // Unit indicating the price of special equipment. Support value:Trip,Daily + @JsonProperty("RatePeriod") + val ratePeriod: kotlin.String? = null, + @JsonProperty("Price") + val price: CarsMoney? = null, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(name != null) { "name must not be null" } - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var name: kotlin.String? = null, - private var ratePeriod: kotlin.String? = null, - private var price: CarsMoney? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun name(name: kotlin.String) = apply { this.name = name } - fun ratePeriod(ratePeriod: kotlin.String?) = apply { this.ratePeriod = ratePeriod } - fun price(price: CarsMoney?) = apply { this.price = price } + class Builder( + private var code: kotlin.String? = null, + private var name: kotlin.String? = null, + private var ratePeriod: kotlin.String? = null, + private var price: CarsMoney? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } - fun build(): Equipment { - val instance = Equipment( - code = code!!, - name = name!!, - ratePeriod = ratePeriod, - price = price - ) + fun name(name: kotlin.String) = apply { this.name = name } - return instance - } + fun ratePeriod(ratePeriod: kotlin.String?) = apply { this.ratePeriod = ratePeriod } + + fun price(price: CarsMoney?) = apply { this.price = price } + + fun build(): Equipment { + val instance = + Equipment( + code = code!!, + name = name!!, + ratePeriod = ratePeriod, + price = price, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, name = name!!, ratePeriod = ratePeriod, - price = price - ) + price = price, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt index 62229af37..7f0a68a32 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Error.kt @@ -16,116 +16,78 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LocationOption - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for error list. - * @param code Error code describing the issue - * @param detailCode Detailed error code describing the issue. - * @param description A simple description of what the error is. - * @param locationKeyword The requested location that caused the error. - * @param locationOptions Container for possible matches to your ambiguous `locationKeyword` query. + * @param code Error code describing the issue + * @param detailCode Detailed error code describing the issue. + * @param description A simple description of what the error is. + * @param locationKeyword The requested location that caused the error. + * @param locationOptions Container for possible matches to your ambiguous `locationKeyword` query. */ data class Error( - /* Error code describing the issue */ -@JsonProperty("Code") -val code: kotlin.String? = null, - - /* Detailed error code describing the issue. */ -@JsonProperty("DetailCode") -val detailCode: kotlin.String? = null, - - /* A simple description of what the error is. */ -@JsonProperty("Description") -val description: kotlin.String? = null, - - /* The requested location that caused the error. */ -@JsonProperty("LocationKeyword") -val locationKeyword: kotlin.String? = null, - - /* Container for possible matches to your ambiguous `locationKeyword` query. */ -@JsonProperty("LocationOptions") -val locationOptions: kotlin.collections.List? = null + // Error code describing the issue + @JsonProperty("Code") + val code: kotlin.String? = null, + // Detailed error code describing the issue. + @JsonProperty("DetailCode") + val detailCode: kotlin.String? = null, + // A simple description of what the error is. + @JsonProperty("Description") + val description: kotlin.String? = null, + // The requested location that caused the error. + @JsonProperty("LocationKeyword") + val locationKeyword: kotlin.String? = null, + // Container for possible matches to your ambiguous `locationKeyword` query. + @JsonProperty("LocationOptions") + val locationOptions: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var code: kotlin.String? = null, + private var detailCode: kotlin.String? = null, + private var description: kotlin.String? = null, + private var locationKeyword: kotlin.String? = null, + private var locationOptions: kotlin.collections.List? = null, + ) { + fun code(code: kotlin.String?) = apply { this.code = code } + fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } - } + fun description(description: kotlin.String?) = apply { this.description = description } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } - class Builder( - private var code: kotlin.String? = null, - private var detailCode: kotlin.String? = null, - private var description: kotlin.String? = null, - private var locationKeyword: kotlin.String? = null, - private var locationOptions: kotlin.collections.List? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - fun detailCode(detailCode: kotlin.String?) = apply { this.detailCode = detailCode } - fun description(description: kotlin.String?) = apply { this.description = description } - fun locationKeyword(locationKeyword: kotlin.String?) = apply { this.locationKeyword = locationKeyword } - fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } + fun locationOptions(locationOptions: kotlin.collections.List?) = apply { this.locationOptions = locationOptions } - fun build(): Error { - val instance = Error( - code = code, - detailCode = detailCode, - description = description, - locationKeyword = locationKeyword, - locationOptions = locationOptions - ) + fun build(): Error { + val instance = + Error( + code = code, + detailCode = detailCode, + description = description, + locationKeyword = locationKeyword, + locationOptions = locationOptions, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code, detailCode = detailCode, description = description, locationKeyword = locationKeyword, - locationOptions = locationOptions - ) + locationOptions = locationOptions, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt index dedafce5b..49b2fcb5d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Errors.kt @@ -16,68 +16,51 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Error - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class Errors( - /* Container for error list. */ -@JsonProperty("Errors") -val errors: kotlin.collections.List? = null, - - /* A unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: kotlin.String? = null + // Container for error list. + @JsonProperty("Errors") + val errors: kotlin.collections.List? = null, + // A unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List?) = apply { this.errors = errors } - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + ) { + fun errors(errors: kotlin.collections.List?) = apply { this.errors = errors } - fun build(): Errors { - val instance = Errors( - errors = errors, - transactionId = transactionId - ) + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - return instance - } + fun build(): Errors { + val instance = + Errors( + errors = errors, + transactionId = transactionId, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( errors = errors, - transactionId = transactionId - ) + transactionId = transactionId, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt index 600304663..d398e97a8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraCostPerDistance.kt @@ -17,72 +17,52 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.CarsMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Extra cost for each increment of distance used. - * @param distance - * @param cost + * @param distance + * @param cost */ data class ExtraCostPerDistance( - @JsonProperty("Distance") -val distance: - CarsDistance -, - - @JsonProperty("Cost") -val cost: - CarsMoney - + @JsonProperty("Distance") + val distance: CarsDistance, + @JsonProperty("Cost") + val cost: CarsMoney, ) { - - - init { - require(distance != null) { "distance must not be null" } - - - - - - + require(distance != null) { "distance must not be null" } require(cost != null) { "cost must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var distance: CarsDistance? = null, - private var cost: CarsMoney? = null - ) { - fun distance(distance: CarsDistance) = apply { this.distance = distance } - fun cost(cost: CarsMoney) = apply { this.cost = cost } + class Builder( + private var distance: CarsDistance? = null, + private var cost: CarsMoney? = null, + ) { + fun distance(distance: CarsDistance) = apply { this.distance = distance } - fun build(): ExtraCostPerDistance { - val instance = ExtraCostPerDistance( - distance = distance!!, - cost = cost!! - ) + fun cost(cost: CarsMoney) = apply { this.cost = cost } - return instance - } + fun build(): ExtraCostPerDistance { + val instance = + ExtraCostPerDistance( + distance = distance!!, + cost = cost!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( distance = distance!!, - cost = cost!! - ) + cost = cost!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt index a992c0a01..5b0c0cb1a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ExtraFees.kt @@ -16,92 +16,64 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * List of ExtraFeesDetails - * @param unit Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily - * @param unitCount Numbers of period - * @param amount + * @param unit Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily + * @param unitCount Numbers of period + * @param amount */ data class ExtraFees( - /* Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily */ -@JsonProperty("Unit") -val unit: - kotlin.String -, - - /* Numbers of period */ -@JsonProperty("UnitCount") -val unitCount: - kotlin.Long -, - - @JsonProperty("Amount") -val amount: - CarsMoney - + // Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily + @JsonProperty("Unit") + val unit: kotlin.String, + // Numbers of period + @JsonProperty("UnitCount") + val unitCount: kotlin.Long, + @JsonProperty("Amount") + val amount: CarsMoney, ) { - - - init { - require(unit != null) { "unit must not be null" } - - - - - - + require(unit != null) { "unit must not be null" } require(unitCount != null) { "unitCount must not be null" } - - - - - - require(amount != null) { "amount must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var unit: kotlin.String? = null, - private var unitCount: kotlin.Long? = null, - private var amount: CarsMoney? = null - ) { - fun unit(unit: kotlin.String) = apply { this.unit = unit } - fun unitCount(unitCount: kotlin.Long) = apply { this.unitCount = unitCount } - fun amount(amount: CarsMoney) = apply { this.amount = amount } + class Builder( + private var unit: kotlin.String? = null, + private var unitCount: kotlin.Long? = null, + private var amount: CarsMoney? = null, + ) { + fun unit(unit: kotlin.String) = apply { this.unit = unit } - fun build(): ExtraFees { - val instance = ExtraFees( - unit = unit!!, - unitCount = unitCount!!, - amount = amount!! - ) + fun unitCount(unitCount: kotlin.Long) = apply { this.unitCount = unitCount } - return instance - } + fun amount(amount: CarsMoney) = apply { this.amount = amount } + + fun build(): ExtraFees { + val instance = + ExtraFees( + unit = unit!!, + unitCount = unitCount!!, + amount = amount!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( unit = unit!!, unitCount = unitCount!!, - amount = amount!! - ) + amount = amount!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt index 8fb662511..95ad9958f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Fault.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * API returned information. - * @param code Fault code. - * @param description Fault description. + * @param code Fault code. + * @param description Fault description. */ data class Fault( - /* Fault code. */ -@JsonProperty("code") -val code: kotlin.String? = null, - - /* Fault description. */ -@JsonProperty("description") -val description: kotlin.String? = null + // Fault code. + @JsonProperty("code") + val code: kotlin.String? = null, + // Fault description. + @JsonProperty("description") + val description: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - fun description(description: kotlin.String?) = apply { this.description = description } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + ) { + fun code(code: kotlin.String?) = apply { this.code = code } - fun build(): Fault { - val instance = Fault( - code = code, - description = description - ) + fun description(description: kotlin.String?) = apply { this.description = description } - return instance - } + fun build(): Fault { + val instance = + Fault( + code = code, + description = description, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code, - description = description - ) + description = description, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt index 4790b381f..1acfaf25f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileInfo.kt @@ -18,199 +18,119 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.FileSize import com.expediagroup.sdk.xap.models.FilterConditions import com.expediagroup.sdk.xap.models.SdpLink - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param partner The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. - * @param brand The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. - * @param fileContentType The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` - * @param locale The locale associated with the file content. - * @param fileName File name. - * @param propertySize - * @param fileLastUpdated The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX - * @param downloadUrl Pre-signed URL is a self signed URL generated for a resource in S3 with a set expiration time. - * @param downloadUrlExpires The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX - * @param filterConditions - * @param bestMatchedLink +* + * @param partner The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. + * @param brand The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. + * @param fileContentType The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` + * @param locale The locale associated with the file content. + * @param fileName File name. + * @param propertySize + * @param fileLastUpdated The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX + * @param downloadUrl Pre-signed URL is a self signed URL generated for a resource in S3 with a set expiration time. + * @param downloadUrlExpires The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX + * @param filterConditions + * @param bestMatchedLink */ data class FileInfo( - /* The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. */ -@JsonProperty("partner") -val partner: kotlin.String? = null, - - /* The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. */ -@JsonProperty("brand") -val brand: kotlin.String? = null, - - /* The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` */ -@JsonProperty("fileContentType") -val fileContentType: kotlin.String? = null, - - /* The locale associated with the file content. */ -@JsonProperty("locale") -val locale: kotlin.String? = null, - - /* File name. */ -@JsonProperty("fileName") -val fileName: kotlin.String? = null, - - @JsonProperty("size") -val propertySize: FileSize? = null, - - /* The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX */ -@JsonProperty("fileLastUpdated") -val fileLastUpdated: kotlin.String? = null, - - /* Pre-signed URL is a self signed URL generated for a resource in S3 with a set expiration time. */ -@JsonProperty("downloadUrl") -val downloadUrl: kotlin.String? = null, - - /* The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX */ -@JsonProperty("downloadUrlExpires") -val downloadUrlExpires: kotlin.String? = null, - - @JsonProperty("filterConditions") -val filterConditions: FilterConditions? = null, - - @JsonProperty("bestMatchedLink") -val bestMatchedLink: SdpLink? = null + // The partner associated with the file. List of partners: `Bing`, `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. + @JsonProperty("partner") + val partner: kotlin.String? = null, + // The brand associated with the file content. List of brand: `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. + @JsonProperty("brand") + val brand: kotlin.String? = null, + // The type associated with the file content. List of types: `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` + @JsonProperty("fileContentType") + val fileContentType: kotlin.String? = null, + // The locale associated with the file content. + @JsonProperty("locale") + val locale: kotlin.String? = null, + // File name. + @JsonProperty("fileName") + val fileName: kotlin.String? = null, + @JsonProperty("size") + val propertySize: FileSize? = null, + // The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX + @JsonProperty("fileLastUpdated") + val fileLastUpdated: kotlin.String? = null, + // Pre-signed URL is a self signed URL generated for a resource in S3 with a set expiration time. + @JsonProperty("downloadUrl") + val downloadUrl: kotlin.String? = null, + // The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX + @JsonProperty("downloadUrlExpires") + val downloadUrlExpires: kotlin.String? = null, + @JsonProperty("filterConditions") + val filterConditions: FilterConditions? = null, + @JsonProperty("bestMatchedLink") + val bestMatchedLink: SdpLink? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var partner: kotlin.String? = null, + private var brand: kotlin.String? = null, + private var fileContentType: kotlin.String? = null, + private var locale: kotlin.String? = null, + private var fileName: kotlin.String? = null, + private var propertySize: FileSize? = null, + private var fileLastUpdated: kotlin.String? = null, + private var downloadUrl: kotlin.String? = null, + private var downloadUrlExpires: kotlin.String? = null, + private var filterConditions: FilterConditions? = null, + private var bestMatchedLink: SdpLink? = null, + ) { + fun partner(partner: kotlin.String?) = apply { this.partner = partner } + fun brand(brand: kotlin.String?) = apply { this.brand = brand } + fun fileContentType(fileContentType: kotlin.String?) = apply { this.fileContentType = fileContentType } + fun locale(locale: kotlin.String?) = apply { this.locale = locale } + fun fileName(fileName: kotlin.String?) = apply { this.fileName = fileName } + fun propertySize(propertySize: FileSize?) = apply { this.propertySize = propertySize } + fun fileLastUpdated(fileLastUpdated: kotlin.String?) = apply { this.fileLastUpdated = fileLastUpdated } + fun downloadUrl(downloadUrl: kotlin.String?) = apply { this.downloadUrl = downloadUrl } + fun downloadUrlExpires(downloadUrlExpires: kotlin.String?) = apply { this.downloadUrlExpires = downloadUrlExpires } - } + fun filterConditions(filterConditions: FilterConditions?) = apply { this.filterConditions = filterConditions } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun bestMatchedLink(bestMatchedLink: SdpLink?) = apply { this.bestMatchedLink = bestMatchedLink } - class Builder( - private var partner: kotlin.String? = null, - private var brand: kotlin.String? = null, - private var fileContentType: kotlin.String? = null, - private var locale: kotlin.String? = null, - private var fileName: kotlin.String? = null, - private var propertySize: FileSize? = null, - private var fileLastUpdated: kotlin.String? = null, - private var downloadUrl: kotlin.String? = null, - private var downloadUrlExpires: kotlin.String? = null, - private var filterConditions: FilterConditions? = null, - private var bestMatchedLink: SdpLink? = null - ) { - fun partner(partner: kotlin.String?) = apply { this.partner = partner } - fun brand(brand: kotlin.String?) = apply { this.brand = brand } - fun fileContentType(fileContentType: kotlin.String?) = apply { this.fileContentType = fileContentType } - fun locale(locale: kotlin.String?) = apply { this.locale = locale } - fun fileName(fileName: kotlin.String?) = apply { this.fileName = fileName } - fun propertySize(propertySize: FileSize?) = apply { this.propertySize = propertySize } - fun fileLastUpdated(fileLastUpdated: kotlin.String?) = apply { this.fileLastUpdated = fileLastUpdated } - fun downloadUrl(downloadUrl: kotlin.String?) = apply { this.downloadUrl = downloadUrl } - fun downloadUrlExpires(downloadUrlExpires: kotlin.String?) = apply { this.downloadUrlExpires = downloadUrlExpires } - fun filterConditions(filterConditions: FilterConditions?) = apply { this.filterConditions = filterConditions } - fun bestMatchedLink(bestMatchedLink: SdpLink?) = apply { this.bestMatchedLink = bestMatchedLink } - - fun build(): FileInfo { - val instance = FileInfo( - partner = partner, - brand = brand, - fileContentType = fileContentType, - locale = locale, - fileName = fileName, - propertySize = propertySize, - fileLastUpdated = fileLastUpdated, - downloadUrl = downloadUrl, - downloadUrlExpires = downloadUrlExpires, - filterConditions = filterConditions, - bestMatchedLink = bestMatchedLink - ) + fun build(): FileInfo { + val instance = + FileInfo( + partner = partner, + brand = brand, + fileContentType = fileContentType, + locale = locale, + fileName = fileName, + propertySize = propertySize, + fileLastUpdated = fileLastUpdated, + downloadUrl = downloadUrl, + downloadUrlExpires = downloadUrlExpires, + filterConditions = filterConditions, + bestMatchedLink = bestMatchedLink, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( partner = partner, brand = brand, fileContentType = fileContentType, @@ -221,6 +141,6 @@ val bestMatchedLink: SdpLink? = null downloadUrl = downloadUrl, downloadUrlExpires = downloadUrlExpires, filterConditions = filterConditions, - bestMatchedLink = bestMatchedLink - ) + bestMatchedLink = bestMatchedLink, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt index 74a869240..f26268d99 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FileSize.kt @@ -15,83 +15,68 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * The information about the file size. - * @param unit The unit about the file size. - * @param `value` The value about the file size. + * @param unit The unit about the file size. + * @param `value` The value about the file size. */ data class FileSize( - /* The unit about the file size. */ -@JsonProperty("unit") -val unit: FileSize.Unit? = null, - - /* The value about the file size. */ -@JsonProperty("value") -val `value`: kotlin.Long? = null + // The unit about the file size. + @JsonProperty("unit") + val unit: FileSize.Unit? = null, + // The value about the file size. + @JsonProperty("value") + val `value`: kotlin.Long? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var unit: FileSize.Unit? = null, - private var `value`: kotlin.Long? = null - ) { - fun unit(unit: FileSize.Unit?) = apply { this.unit = unit } - fun `value`(`value`: kotlin.Long?) = apply { this.`value` = `value` } + class Builder( + private var unit: FileSize.Unit? = null, + private var `value`: kotlin.Long? = null, + ) { + fun unit(unit: FileSize.Unit?) = apply { this.unit = unit } - fun build(): FileSize { - val instance = FileSize( - unit = unit, - `value` = `value` - ) + fun `value`(`value`: kotlin.Long?) = apply { this.`value` = `value` } - return instance - } + fun build(): FileSize { + val instance = + FileSize( + unit = unit, + `value` = `value`, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( unit = unit, - `value` = `value` - ) - - /** - * The unit about the file size. - * Values: KB,MB,GB - */ - enum class Unit(val value: kotlin.String) { - @JsonProperty("KB") - KB("KB"), - - @JsonProperty("MB") - MB("MB"), - - @JsonProperty("GB") - GB("GB"); - } + `value` = `value`, + ) + + /** + * The unit about the file size. + * Values: KB,MB,GB + */ + enum class Unit( + val value: kotlin.String, + ) { + @JsonProperty("KB") + KB("KB"), + + @JsonProperty("MB") + MB("MB"), + + @JsonProperty("GB") + GB("GB"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt index 5648790d9..d5171fc34 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FilterConditions.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container filter condition for the filtered file. [Filters](https://confluence.expedia.biz/display/EWS/Filtered+Feed+File+Generation+Schedule+and+Access#FilteredFeedFileGenerationScheduleandAccess-Filters) - * @param pointOfSupply List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. - * @param brand List of filter condition for Brands: `VRBO`. - * @param structureType List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. + * @param pointOfSupply List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. + * @param brand List of filter condition for Brands: `VRBO`. + * @param structureType List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. */ data class FilterConditions( - /* List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. */ -@JsonProperty("pointOfSupply") -val pointOfSupply: kotlin.String? = null, - - /* List of filter condition for Brands: `VRBO`. */ -@JsonProperty("brand") -val brand: kotlin.String? = null, - - /* List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. */ -@JsonProperty("structureType") -val structureType: kotlin.String? = null + // List of filter condition for PointOfSupplies: `US`, `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, `AE`,`GB`. + @JsonProperty("pointOfSupply") + val pointOfSupply: kotlin.String? = null, + // List of filter condition for Brands: `VRBO`. + @JsonProperty("brand") + val brand: kotlin.String? = null, + // List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. + @JsonProperty("structureType") + val structureType: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var pointOfSupply: kotlin.String? = null, - private var brand: kotlin.String? = null, - private var structureType: kotlin.String? = null - ) { - fun pointOfSupply(pointOfSupply: kotlin.String?) = apply { this.pointOfSupply = pointOfSupply } - fun brand(brand: kotlin.String?) = apply { this.brand = brand } - fun structureType(structureType: kotlin.String?) = apply { this.structureType = structureType } + class Builder( + private var pointOfSupply: kotlin.String? = null, + private var brand: kotlin.String? = null, + private var structureType: kotlin.String? = null, + ) { + fun pointOfSupply(pointOfSupply: kotlin.String?) = apply { this.pointOfSupply = pointOfSupply } - fun build(): FilterConditions { - val instance = FilterConditions( - pointOfSupply = pointOfSupply, - brand = brand, - structureType = structureType - ) + fun brand(brand: kotlin.String?) = apply { this.brand = brand } - return instance - } + fun structureType(structureType: kotlin.String?) = apply { this.structureType = structureType } + + fun build(): FilterConditions { + val instance = + FilterConditions( + pointOfSupply = pointOfSupply, + brand = brand, + structureType = structureType, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( pointOfSupply = pointOfSupply, brand = brand, - structureType = structureType - ) + structureType = structureType, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt index 942d994c1..48ae5d7b1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/FuelAC.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Car fuel type and whether Air Conditioning is included. Please find list of Car Fuel AC Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005378328 - * @param code Car FuelAC code. - * @param `value` Car FuelAC value. + * @param code Car FuelAC code. + * @param `value` Car FuelAC value. */ data class FuelAC( - /* Car FuelAC code. */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* Car FuelAC value. */ -@JsonProperty("Value") -val `value`: - kotlin.String - + // Car FuelAC code. + @JsonProperty("Code") + val code: kotlin.String, + // Car FuelAC value. + @JsonProperty("Value") + val `value`: kotlin.String, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(`value` != null) { "`value` must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var `value`: kotlin.String? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + class Builder( + private var code: kotlin.String? = null, + private var `value`: kotlin.String? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } - fun build(): FuelAC { - val instance = FuelAC( - code = code!!, - `value` = `value`!! - ) + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - return instance - } + fun build(): FuelAC { + val instance = + FuelAC( + code = code!!, + `value` = `value`!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, - `value` = `value`!! - ) + `value` = `value`!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt index 3283436ed..745ec5e72 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/GeoLocation.kt @@ -15,83 +15,59 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for Geo location. - * @param latitude Latitude of the location. - * @param longitude Longitude of the location. - * @param obfuscated + * @param latitude Latitude of the location. + * @param longitude Longitude of the location. + * @param obfuscated */ data class GeoLocation( - /* Latitude of the location. */ -@JsonProperty("Latitude") -val latitude: kotlin.String? = null, - - /* Longitude of the location. */ -@JsonProperty("Longitude") -val longitude: kotlin.String? = null, - - @JsonProperty("Obfuscated") -val obfuscated: kotlin.Boolean? = null + // Latitude of the location. + @JsonProperty("Latitude") + val latitude: kotlin.String? = null, + // Longitude of the location. + @JsonProperty("Longitude") + val longitude: kotlin.String? = null, + @JsonProperty("Obfuscated") + val obfuscated: kotlin.Boolean? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } - fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + class Builder( + private var latitude: kotlin.String? = null, + private var longitude: kotlin.String? = null, + private var obfuscated: kotlin.Boolean? = null, + ) { + fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } - fun build(): GeoLocation { - val instance = GeoLocation( - latitude = latitude, - longitude = longitude, - obfuscated = obfuscated - ) + fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } - return instance - } + fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + + fun build(): GeoLocation { + val instance = + GeoLocation( + latitude = latitude, + longitude = longitude, + obfuscated = obfuscated, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( latitude = latitude, longitude = longitude, - obfuscated = obfuscated - ) + obfuscated = obfuscated, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt index e2ecabd2d..412f9acf8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Hotel.kt @@ -28,470 +28,294 @@ import com.expediagroup.sdk.xap.models.Media import com.expediagroup.sdk.xap.models.Phone import com.expediagroup.sdk.xap.models.PropertyDetails import com.expediagroup.sdk.xap.models.RoomType - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for information on each offered hotel. - * @param id The unique, Expedia-specific hotel property identifier used to designate a single hotel. - * @param hcomId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. - * @param name The common name of the hotel - * @param propertyType - * @param propertyDetails - * @param localCurrencyCode The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) - * @param location - * @param phoneInfos Container for property phone numbers. Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. - * @param distance - * @param description - * @param status Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. - * @param renovationsAndClosures The information about renovations and closures - * @param chainAndBrandInfo - * @param thumbnailUrl URL of the thumbnail image of the hotel. Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - * @param starRating Star rating value of the hotel property. - * @param guestRating Average overall guest rating of the hotel. The value is between 1.0 and 5.0 in 0.1 increments. Higher is better. - * @param guestReviewCount The total count of guest reviews used to create the average `GuestRating` above. - * @param petFriendly Indicates whether the property allows certain pets under certain circumstances. Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out whether a particular pet will be permitted to stay at the property. - * @param lgbtqiaFriendly This value is returned if the property owner has specifically designated this property as LGBTQIA-friendly. - * @param links - * @param policies - * @param cleanlinessAndSafety Container for all cleanliness and safety measures. The key is the measures category, the values are the information. The category will be: - CLEANLINESS - SOCIAL_DISTANCING - SAFETY - DISCLAIMER - * @param optionalExtras The optional extras info. - * @param importantNotices The important notices for hotel. - * @param media Container for hotel images - * @param hotelAmenities Container for all hotel amenities. - * @param hotelDescriptiveAmenities Container for all hotel amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - PARKING - FOOD_AND_DRINK - INTERNET - THINGS_TO_DO - FAMILY_FRIENDLY - CONVENIENCES - GUEST_SERVICES - BUSINESS_SERVICE - OUTDOOR - ACCESSIBILITY - SPA - ACTIVITIES_NEARBY - LANGS_SPOKEN - MORE The category for grouped amenities in hotel level for Vacation Rental hotel will be: - BEACH - SKI - POOL/SPA - INTERNET - PARKING - FAMILY_FRIENDLY - KITCHEN - DINING - BEDROOM - BATHROOMS - LIVING_SPACES - ENTERTAINMENT - OUTDOORS - LAUNDRY - WORKSPACES - CLIMATE_CONTROL - PETS - SUITABILITY/ACCESSIBILITY - SERVICES_AND_CONVENIENCES - LOCATION_HIGHLIGHTS - THINGS_TO_DO - GENERAL - SAFETY - * @param roomAmenities Container for all room amenities. - * @param roomDescriptiveAmenities Container for all common room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - BEDROOM - BATHROOM - FOOD_AND_DRINK - ENTERTAINMENT - OUTDOOR_SPACE - MORE - * @param accessibility The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage - * @param memberOnlyDealAvailable Indicates whether the property has member only deal rates available. - * @param roomTypes Container for all of available room types. + * @param id The unique, Expedia-specific hotel property identifier used to designate a single hotel. + * @param hcomId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. + * @param name The common name of the hotel + * @param propertyType + * @param propertyDetails + * @param localCurrencyCode The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) + * @param location + * @param phoneInfos Container for property phone numbers. Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. + * @param distance + * @param description + * @param status Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. + * @param renovationsAndClosures The information about renovations and closures + * @param chainAndBrandInfo + * @param thumbnailUrl URL of the thumbnail image of the hotel. Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + * @param starRating Star rating value of the hotel property. + * @param guestRating Average overall guest rating of the hotel. The value is between 1.0 and 5.0 in 0.1 increments. Higher is better. + * @param guestReviewCount The total count of guest reviews used to create the average `GuestRating` above. + * @param petFriendly Indicates whether the property allows certain pets under certain circumstances. Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out whether a particular pet will be permitted to stay at the property. + * @param lgbtqiaFriendly This value is returned if the property owner has specifically designated this property as LGBTQIA-friendly. + * @param links + * @param policies + * @param cleanlinessAndSafety Container for all cleanliness and safety measures. The key is the measures category, the values are the information. The category will be: - CLEANLINESS - SOCIAL_DISTANCING - SAFETY - DISCLAIMER + * @param optionalExtras The optional extras info. + * @param importantNotices The important notices for hotel. + * @param media Container for hotel images + * @param hotelAmenities Container for all hotel amenities. + * @param hotelDescriptiveAmenities Container for all hotel amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - PARKING - FOOD_AND_DRINK - INTERNET - THINGS_TO_DO - FAMILY_FRIENDLY - CONVENIENCES - GUEST_SERVICES - BUSINESS_SERVICE - OUTDOOR - ACCESSIBILITY - SPA - ACTIVITIES_NEARBY - LANGS_SPOKEN - MORE The category for grouped amenities in hotel level for Vacation Rental hotel will be: - BEACH - SKI - POOL/SPA - INTERNET - PARKING - FAMILY_FRIENDLY - KITCHEN - DINING - BEDROOM - BATHROOMS - LIVING_SPACES - ENTERTAINMENT - OUTDOORS - LAUNDRY - WORKSPACES - CLIMATE_CONTROL - PETS - SUITABILITY/ACCESSIBILITY - SERVICES_AND_CONVENIENCES - LOCATION_HIGHLIGHTS - THINGS_TO_DO - GENERAL - SAFETY + * @param roomAmenities Container for all room amenities. + * @param roomDescriptiveAmenities Container for all common room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - BEDROOM - BATHROOM - FOOD_AND_DRINK - ENTERTAINMENT - OUTDOOR_SPACE - MORE + * @param accessibility The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage + * @param memberOnlyDealAvailable Indicates whether the property has member only deal rates available. + * @param roomTypes Container for all of available room types. */ data class Hotel( - /* The unique, Expedia-specific hotel property identifier used to designate a single hotel. */ -@JsonProperty("Id") -val id: kotlin.String? = null, - - /* The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. */ -@JsonProperty("HcomId") -val hcomId: kotlin.String? = null, - - /* The common name of the hotel */ -@JsonProperty("Name") -val name: kotlin.String? = null, - - @JsonProperty("PropertyType") -val propertyType: HotelPropertyType? = null, - - @JsonProperty("PropertyDetails") -val propertyDetails: PropertyDetails? = null, - - /* The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) */ -@JsonProperty("LocalCurrencyCode") -val localCurrencyCode: kotlin.String? = null, - - @JsonProperty("Location") -val location: HotelLocation? = null, - - /* Container for property phone numbers. Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. */ -@JsonProperty("PhoneInfos") -val phoneInfos: kotlin.collections.List? = null, - - @JsonProperty("Distance") -val distance: Distance? = null, - - @JsonProperty("Description") -val description: Description? = null, - - /* Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. */ -@JsonProperty("Status") -val status: Hotel.Status? = null, - - /* The information about renovations and closures */ -@JsonProperty("RenovationsAndClosures") -val renovationsAndClosures: kotlin.collections.List? = null, - - @JsonProperty("ChainAndBrandInfo") -val chainAndBrandInfo: ChainAndBrandInfo? = null, - - /* URL of the thumbnail image of the hotel. Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). */ -@JsonProperty("ThumbnailUrl") -val thumbnailUrl: kotlin.String? = null, - - /* Star rating value of the hotel property. */ -@JsonProperty("StarRating") -val starRating: Hotel.StarRating? = null, - - /* Average overall guest rating of the hotel. The value is between 1.0 and 5.0 in 0.1 increments. Higher is better. */ -@JsonProperty("GuestRating") -val guestRating: kotlin.String? = null, - - /* The total count of guest reviews used to create the average `GuestRating` above. */ -@JsonProperty("GuestReviewCount") -val guestReviewCount: kotlin.Int? = null, - - /* Indicates whether the property allows certain pets under certain circumstances. Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out whether a particular pet will be permitted to stay at the property. */ -@JsonProperty("PetFriendly") -val petFriendly: kotlin.Boolean? = null, - - /* This value is returned if the property owner has specifically designated this property as LGBTQIA-friendly. */ -@JsonProperty("LgbtqiaFriendly") -val lgbtqiaFriendly: kotlin.Boolean? = null, - - @JsonProperty("Links") -val links: HotelLinks? = null, - - @JsonProperty("Policies") -val policies: HotelPolicies? = null, - - /* Container for all cleanliness and safety measures. The key is the measures category, the values are the information. The category will be: - CLEANLINESS - SOCIAL_DISTANCING - SAFETY - DISCLAIMER */ -@JsonProperty("CleanlinessAndSafety") -val cleanlinessAndSafety: kotlin.collections.Map>? = null, - - /* The optional extras info. */ -@JsonProperty("OptionalExtras") -val optionalExtras: kotlin.collections.List? = null, - - /* The important notices for hotel. */ -@JsonProperty("ImportantNotices") -val importantNotices: kotlin.collections.List? = null, - - /* Container for hotel images */ -@JsonProperty("Media") -val media: kotlin.collections.List? = null, - - /* Container for all hotel amenities. */ -@JsonProperty("HotelAmenities") -val hotelAmenities: kotlin.collections.List? = null, - - /* Container for all hotel amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - PARKING - FOOD_AND_DRINK - INTERNET - THINGS_TO_DO - FAMILY_FRIENDLY - CONVENIENCES - GUEST_SERVICES - BUSINESS_SERVICE - OUTDOOR - ACCESSIBILITY - SPA - ACTIVITIES_NEARBY - LANGS_SPOKEN - MORE The category for grouped amenities in hotel level for Vacation Rental hotel will be: - BEACH - SKI - POOL/SPA - INTERNET - PARKING - FAMILY_FRIENDLY - KITCHEN - DINING - BEDROOM - BATHROOMS - LIVING_SPACES - ENTERTAINMENT - OUTDOORS - LAUNDRY - WORKSPACES - CLIMATE_CONTROL - PETS - SUITABILITY/ACCESSIBILITY - SERVICES_AND_CONVENIENCES - LOCATION_HIGHLIGHTS - THINGS_TO_DO - GENERAL - SAFETY */ -@JsonProperty("HotelDescriptiveAmenities") -val hotelDescriptiveAmenities: kotlin.collections.Map>? = null, - - /* Container for all room amenities. */ -@JsonProperty("RoomAmenities") -val roomAmenities: kotlin.collections.List? = null, - - /* Container for all common room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - BEDROOM - BATHROOM - FOOD_AND_DRINK - ENTERTAINMENT - OUTDOOR_SPACE - MORE */ -@JsonProperty("RoomDescriptiveAmenities") -val roomDescriptiveAmenities: kotlin.collections.Map>? = null, - - /* The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage */ -@JsonProperty("Accessibility") -val accessibility: kotlin.collections.List? = null, - - /* Indicates whether the property has member only deal rates available. */ -@JsonProperty("MemberOnlyDealAvailable") -val memberOnlyDealAvailable: kotlin.Boolean? = null, - - /* Container for all of available room types. */ -@JsonProperty("RoomTypes") -val roomTypes: kotlin.collections.List? = null + // The unique, Expedia-specific hotel property identifier used to designate a single hotel. + @JsonProperty("Id") + val id: kotlin.String? = null, + // The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will only be returned if searching via hcomHotelIds in request. + @JsonProperty("HcomId") + val hcomId: kotlin.String? = null, + // The common name of the hotel + @JsonProperty("Name") + val name: kotlin.String? = null, + @JsonProperty("PropertyType") + val propertyType: HotelPropertyType? = null, + @JsonProperty("PropertyDetails") + val propertyDetails: PropertyDetails? = null, + // The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) + @JsonProperty("LocalCurrencyCode") + val localCurrencyCode: kotlin.String? = null, + @JsonProperty("Location") + val location: HotelLocation? = null, + // Container for property phone numbers. Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. + @JsonProperty("PhoneInfos") + val phoneInfos: kotlin.collections.List? = null, + @JsonProperty("Distance") + val distance: Distance? = null, + @JsonProperty("Description") + val description: Description? = null, + // Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. + @JsonProperty("Status") + val status: Hotel.Status? = null, + // The information about renovations and closures + @JsonProperty("RenovationsAndClosures") + val renovationsAndClosures: kotlin.collections.List? = null, + @JsonProperty("ChainAndBrandInfo") + val chainAndBrandInfo: ChainAndBrandInfo? = null, + // URL of the thumbnail image of the hotel. Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + @JsonProperty("ThumbnailUrl") + val thumbnailUrl: kotlin.String? = null, + // Star rating value of the hotel property. + @JsonProperty("StarRating") + val starRating: Hotel.StarRating? = null, + // Average overall guest rating of the hotel. The value is between 1.0 and 5.0 in 0.1 increments. Higher is better. + @JsonProperty("GuestRating") + val guestRating: kotlin.String? = null, + // The total count of guest reviews used to create the average `GuestRating` above. + @JsonProperty("GuestReviewCount") + val guestReviewCount: kotlin.Int? = null, + // Indicates whether the property allows certain pets under certain circumstances. Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out whether a particular pet will be permitted to stay at the property. + @JsonProperty("PetFriendly") + val petFriendly: kotlin.Boolean? = null, + // This value is returned if the property owner has specifically designated this property as LGBTQIA-friendly. + @JsonProperty("LgbtqiaFriendly") + val lgbtqiaFriendly: kotlin.Boolean? = null, + @JsonProperty("Links") + val links: HotelLinks? = null, + @JsonProperty("Policies") + val policies: HotelPolicies? = null, + // Container for all cleanliness and safety measures. The key is the measures category, the values are the information. The category will be: - CLEANLINESS - SOCIAL_DISTANCING - SAFETY - DISCLAIMER + @JsonProperty("CleanlinessAndSafety") + val cleanlinessAndSafety: kotlin.collections.Map>? = null, + // The optional extras info. + @JsonProperty("OptionalExtras") + val optionalExtras: kotlin.collections.List? = null, + // The important notices for hotel. + @JsonProperty("ImportantNotices") + val importantNotices: kotlin.collections.List? = null, + // Container for hotel images + @JsonProperty("Media") + val media: kotlin.collections.List? = null, + // Container for all hotel amenities. + @JsonProperty("HotelAmenities") + val hotelAmenities: kotlin.collections.List? = null, + // Container for all hotel amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: - PARKING - FOOD_AND_DRINK - INTERNET - THINGS_TO_DO - FAMILY_FRIENDLY - CONVENIENCES - GUEST_SERVICES - BUSINESS_SERVICE - OUTDOOR - ACCESSIBILITY - SPA - ACTIVITIES_NEARBY - LANGS_SPOKEN - MORE The category for grouped amenities in hotel level for Vacation Rental hotel will be: - BEACH - SKI - POOL/SPA - INTERNET - PARKING - FAMILY_FRIENDLY - KITCHEN - DINING - BEDROOM - BATHROOMS - LIVING_SPACES - ENTERTAINMENT - OUTDOORS - LAUNDRY - WORKSPACES - CLIMATE_CONTROL - PETS - SUITABILITY/ACCESSIBILITY - SERVICES_AND_CONVENIENCES - LOCATION_HIGHLIGHTS - THINGS_TO_DO - GENERAL - SAFETY + @JsonProperty("HotelDescriptiveAmenities") + val hotelDescriptiveAmenities: kotlin.collections.Map>? = null, + // Container for all room amenities. + @JsonProperty("RoomAmenities") + val roomAmenities: kotlin.collections.List? = null, + // Container for all common room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: - BEDROOM - BATHROOM - FOOD_AND_DRINK - ENTERTAINMENT - OUTDOOR_SPACE - MORE + @JsonProperty("RoomDescriptiveAmenities") + val roomDescriptiveAmenities: kotlin.collections.Map>? = null, + // The accessibility options available for the room. Possible accessibility include: - Accessible path of travel - Accessible bathroom - Roll-in shower - Handicapped parking - In-room accessibility - Accessibility equipment for the deaf - Braille or raised signage + @JsonProperty("Accessibility") + val accessibility: kotlin.collections.List? = null, + // Indicates whether the property has member only deal rates available. + @JsonProperty("MemberOnlyDealAvailable") + val memberOnlyDealAvailable: kotlin.Boolean? = null, + // Container for all of available room types. + @JsonProperty("RoomTypes") + val roomTypes: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var id: kotlin.String? = null, + private var hcomId: kotlin.String? = null, + private var name: kotlin.String? = null, + private var propertyType: HotelPropertyType? = null, + private var propertyDetails: PropertyDetails? = null, + private var localCurrencyCode: kotlin.String? = null, + private var location: HotelLocation? = null, + private var phoneInfos: kotlin.collections.List? = null, + private var distance: Distance? = null, + private var description: Description? = null, + private var status: Hotel.Status? = null, + private var renovationsAndClosures: kotlin.collections.List? = null, + private var chainAndBrandInfo: ChainAndBrandInfo? = null, + private var thumbnailUrl: kotlin.String? = null, + private var starRating: Hotel.StarRating? = null, + private var guestRating: kotlin.String? = null, + private var guestReviewCount: kotlin.Int? = null, + private var petFriendly: kotlin.Boolean? = null, + private var lgbtqiaFriendly: kotlin.Boolean? = null, + private var links: HotelLinks? = null, + private var policies: HotelPolicies? = null, + private var cleanlinessAndSafety: kotlin.collections.Map>? = null, + private var optionalExtras: kotlin.collections.List? = null, + private var importantNotices: kotlin.collections.List? = null, + private var media: kotlin.collections.List? = null, + private var hotelAmenities: kotlin.collections.List? = null, + private var hotelDescriptiveAmenities: kotlin.collections.Map>? = null, + private var roomAmenities: kotlin.collections.List? = null, + private var roomDescriptiveAmenities: kotlin.collections.Map>? = null, + private var accessibility: kotlin.collections.List? = null, + private var memberOnlyDealAvailable: kotlin.Boolean? = null, + private var roomTypes: kotlin.collections.List? = null, + ) { + fun id(id: kotlin.String?) = apply { this.id = id } + fun hcomId(hcomId: kotlin.String?) = apply { this.hcomId = hcomId } + fun name(name: kotlin.String?) = apply { this.name = name } + fun propertyType(propertyType: HotelPropertyType?) = apply { this.propertyType = propertyType } + fun propertyDetails(propertyDetails: PropertyDetails?) = apply { this.propertyDetails = propertyDetails } + fun localCurrencyCode(localCurrencyCode: kotlin.String?) = apply { this.localCurrencyCode = localCurrencyCode } + fun location(location: HotelLocation?) = apply { this.location = location } + fun phoneInfos(phoneInfos: kotlin.collections.List?) = apply { this.phoneInfos = phoneInfos } + fun distance(distance: Distance?) = apply { this.distance = distance } + fun description(description: Description?) = apply { this.description = description } + fun status(status: Hotel.Status?) = apply { this.status = status } + fun renovationsAndClosures(renovationsAndClosures: kotlin.collections.List?) = apply { this.renovationsAndClosures = renovationsAndClosures } + fun chainAndBrandInfo(chainAndBrandInfo: ChainAndBrandInfo?) = apply { this.chainAndBrandInfo = chainAndBrandInfo } + fun thumbnailUrl(thumbnailUrl: kotlin.String?) = apply { this.thumbnailUrl = thumbnailUrl } + fun starRating(starRating: Hotel.StarRating?) = apply { this.starRating = starRating } + fun guestRating(guestRating: kotlin.String?) = apply { this.guestRating = guestRating } + fun guestReviewCount(guestReviewCount: kotlin.Int?) = apply { this.guestReviewCount = guestReviewCount } + fun petFriendly(petFriendly: kotlin.Boolean?) = apply { this.petFriendly = petFriendly } + fun lgbtqiaFriendly(lgbtqiaFriendly: kotlin.Boolean?) = apply { this.lgbtqiaFriendly = lgbtqiaFriendly } + fun links(links: HotelLinks?) = apply { this.links = links } + fun policies(policies: HotelPolicies?) = apply { this.policies = policies } + fun cleanlinessAndSafety(cleanlinessAndSafety: kotlin.collections.Map>?) = + apply { + this.cleanlinessAndSafety = + cleanlinessAndSafety + } + fun optionalExtras(optionalExtras: kotlin.collections.List?) = apply { this.optionalExtras = optionalExtras } + fun importantNotices(importantNotices: kotlin.collections.List?) = apply { this.importantNotices = importantNotices } + fun media(media: kotlin.collections.List?) = apply { this.media = media } + fun hotelAmenities(hotelAmenities: kotlin.collections.List?) = apply { this.hotelAmenities = hotelAmenities } + fun hotelDescriptiveAmenities(hotelDescriptiveAmenities: kotlin.collections.Map>?) = + apply { + this.hotelDescriptiveAmenities = + hotelDescriptiveAmenities + } + fun roomAmenities(roomAmenities: kotlin.collections.List?) = apply { this.roomAmenities = roomAmenities } - } + fun roomDescriptiveAmenities(roomDescriptiveAmenities: kotlin.collections.Map>?) = + apply { + this.roomDescriptiveAmenities = + roomDescriptiveAmenities + } - companion object { - @JvmStatic - fun builder() = Builder() + fun accessibility(accessibility: kotlin.collections.List?) = apply { this.accessibility = accessibility } + + fun memberOnlyDealAvailable(memberOnlyDealAvailable: kotlin.Boolean?) = apply { this.memberOnlyDealAvailable = memberOnlyDealAvailable } + + fun roomTypes(roomTypes: kotlin.collections.List?) = apply { this.roomTypes = roomTypes } + + fun build(): Hotel { + val instance = + Hotel( + id = id, + hcomId = hcomId, + name = name, + propertyType = propertyType, + propertyDetails = propertyDetails, + localCurrencyCode = localCurrencyCode, + location = location, + phoneInfos = phoneInfos, + distance = distance, + description = description, + status = status, + renovationsAndClosures = renovationsAndClosures, + chainAndBrandInfo = chainAndBrandInfo, + thumbnailUrl = thumbnailUrl, + starRating = starRating, + guestRating = guestRating, + guestReviewCount = guestReviewCount, + petFriendly = petFriendly, + lgbtqiaFriendly = lgbtqiaFriendly, + links = links, + policies = policies, + cleanlinessAndSafety = cleanlinessAndSafety, + optionalExtras = optionalExtras, + importantNotices = importantNotices, + media = media, + hotelAmenities = hotelAmenities, + hotelDescriptiveAmenities = hotelDescriptiveAmenities, + roomAmenities = roomAmenities, + roomDescriptiveAmenities = roomDescriptiveAmenities, + accessibility = accessibility, + memberOnlyDealAvailable = memberOnlyDealAvailable, + roomTypes = roomTypes, + ) + + return instance + } } - class Builder( - private var id: kotlin.String? = null, - private var hcomId: kotlin.String? = null, - private var name: kotlin.String? = null, - private var propertyType: HotelPropertyType? = null, - private var propertyDetails: PropertyDetails? = null, - private var localCurrencyCode: kotlin.String? = null, - private var location: HotelLocation? = null, - private var phoneInfos: kotlin.collections.List? = null, - private var distance: Distance? = null, - private var description: Description? = null, - private var status: Hotel.Status? = null, - private var renovationsAndClosures: kotlin.collections.List? = null, - private var chainAndBrandInfo: ChainAndBrandInfo? = null, - private var thumbnailUrl: kotlin.String? = null, - private var starRating: Hotel.StarRating? = null, - private var guestRating: kotlin.String? = null, - private var guestReviewCount: kotlin.Int? = null, - private var petFriendly: kotlin.Boolean? = null, - private var lgbtqiaFriendly: kotlin.Boolean? = null, - private var links: HotelLinks? = null, - private var policies: HotelPolicies? = null, - private var cleanlinessAndSafety: kotlin.collections.Map>? = null, - private var optionalExtras: kotlin.collections.List? = null, - private var importantNotices: kotlin.collections.List? = null, - private var media: kotlin.collections.List? = null, - private var hotelAmenities: kotlin.collections.List? = null, - private var hotelDescriptiveAmenities: kotlin.collections.Map>? = null, - private var roomAmenities: kotlin.collections.List? = null, - private var roomDescriptiveAmenities: kotlin.collections.Map>? = null, - private var accessibility: kotlin.collections.List? = null, - private var memberOnlyDealAvailable: kotlin.Boolean? = null, - private var roomTypes: kotlin.collections.List? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - fun hcomId(hcomId: kotlin.String?) = apply { this.hcomId = hcomId } - fun name(name: kotlin.String?) = apply { this.name = name } - fun propertyType(propertyType: HotelPropertyType?) = apply { this.propertyType = propertyType } - fun propertyDetails(propertyDetails: PropertyDetails?) = apply { this.propertyDetails = propertyDetails } - fun localCurrencyCode(localCurrencyCode: kotlin.String?) = apply { this.localCurrencyCode = localCurrencyCode } - fun location(location: HotelLocation?) = apply { this.location = location } - fun phoneInfos(phoneInfos: kotlin.collections.List?) = apply { this.phoneInfos = phoneInfos } - fun distance(distance: Distance?) = apply { this.distance = distance } - fun description(description: Description?) = apply { this.description = description } - fun status(status: Hotel.Status?) = apply { this.status = status } - fun renovationsAndClosures(renovationsAndClosures: kotlin.collections.List?) = apply { this.renovationsAndClosures = renovationsAndClosures } - fun chainAndBrandInfo(chainAndBrandInfo: ChainAndBrandInfo?) = apply { this.chainAndBrandInfo = chainAndBrandInfo } - fun thumbnailUrl(thumbnailUrl: kotlin.String?) = apply { this.thumbnailUrl = thumbnailUrl } - fun starRating(starRating: Hotel.StarRating?) = apply { this.starRating = starRating } - fun guestRating(guestRating: kotlin.String?) = apply { this.guestRating = guestRating } - fun guestReviewCount(guestReviewCount: kotlin.Int?) = apply { this.guestReviewCount = guestReviewCount } - fun petFriendly(petFriendly: kotlin.Boolean?) = apply { this.petFriendly = petFriendly } - fun lgbtqiaFriendly(lgbtqiaFriendly: kotlin.Boolean?) = apply { this.lgbtqiaFriendly = lgbtqiaFriendly } - fun links(links: HotelLinks?) = apply { this.links = links } - fun policies(policies: HotelPolicies?) = apply { this.policies = policies } - fun cleanlinessAndSafety(cleanlinessAndSafety: kotlin.collections.Map>?) = apply { this.cleanlinessAndSafety = cleanlinessAndSafety } - fun optionalExtras(optionalExtras: kotlin.collections.List?) = apply { this.optionalExtras = optionalExtras } - fun importantNotices(importantNotices: kotlin.collections.List?) = apply { this.importantNotices = importantNotices } - fun media(media: kotlin.collections.List?) = apply { this.media = media } - fun hotelAmenities(hotelAmenities: kotlin.collections.List?) = apply { this.hotelAmenities = hotelAmenities } - fun hotelDescriptiveAmenities(hotelDescriptiveAmenities: kotlin.collections.Map>?) = apply { this.hotelDescriptiveAmenities = hotelDescriptiveAmenities } - fun roomAmenities(roomAmenities: kotlin.collections.List?) = apply { this.roomAmenities = roomAmenities } - fun roomDescriptiveAmenities(roomDescriptiveAmenities: kotlin.collections.Map>?) = apply { this.roomDescriptiveAmenities = roomDescriptiveAmenities } - fun accessibility(accessibility: kotlin.collections.List?) = apply { this.accessibility = accessibility } - fun memberOnlyDealAvailable(memberOnlyDealAvailable: kotlin.Boolean?) = apply { this.memberOnlyDealAvailable = memberOnlyDealAvailable } - fun roomTypes(roomTypes: kotlin.collections.List?) = apply { this.roomTypes = roomTypes } - - fun build(): Hotel { - val instance = Hotel( + fun toBuilder() = + Builder( id = id, hcomId = hcomId, name = name, @@ -523,108 +347,73 @@ val roomTypes: kotlin.collections.List? = null roomDescriptiveAmenities = roomDescriptiveAmenities, accessibility = accessibility, memberOnlyDealAvailable = memberOnlyDealAvailable, - roomTypes = roomTypes - ) + roomTypes = roomTypes, + ) - return instance - } + /** + * Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. + * Values: AVAILABLE,NOT_AVAILABLE,ERROR,NUMBER_OF_ADULTS_NOT_ACCEPTED,NUMBER_OF_CHILDREN_NOT_ACCEPTED,NUMBER_OF_INFANTS_NOT_ACCEPTED,NUMBER_OF_PERSONS_NOT_ACCEPTED,CHECK_IN_AGE_NOT_ACCEPTED + */ + enum class Status( + val value: kotlin.String, + ) { + @JsonProperty("AVAILABLE") + AVAILABLE("AVAILABLE"), + + @JsonProperty("NOT_AVAILABLE") + NOT_AVAILABLE("NOT_AVAILABLE"), + + @JsonProperty("ERROR") + ERROR("ERROR"), + + @JsonProperty("NUMBER_OF_ADULTS_NOT_ACCEPTED") + NUMBER_OF_ADULTS_NOT_ACCEPTED("NUMBER_OF_ADULTS_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_CHILDREN_NOT_ACCEPTED") + NUMBER_OF_CHILDREN_NOT_ACCEPTED("NUMBER_OF_CHILDREN_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_INFANTS_NOT_ACCEPTED") + NUMBER_OF_INFANTS_NOT_ACCEPTED("NUMBER_OF_INFANTS_NOT_ACCEPTED"), + + @JsonProperty("NUMBER_OF_PERSONS_NOT_ACCEPTED") + NUMBER_OF_PERSONS_NOT_ACCEPTED("NUMBER_OF_PERSONS_NOT_ACCEPTED"), + + @JsonProperty("CHECK_IN_AGE_NOT_ACCEPTED") + CHECK_IN_AGE_NOT_ACCEPTED("CHECK_IN_AGE_NOT_ACCEPTED"), } - fun toBuilder() = Builder( - id = id, - hcomId = hcomId, - name = name, - propertyType = propertyType, - propertyDetails = propertyDetails, - localCurrencyCode = localCurrencyCode, - location = location, - phoneInfos = phoneInfos, - distance = distance, - description = description, - status = status, - renovationsAndClosures = renovationsAndClosures, - chainAndBrandInfo = chainAndBrandInfo, - thumbnailUrl = thumbnailUrl, - starRating = starRating, - guestRating = guestRating, - guestReviewCount = guestReviewCount, - petFriendly = petFriendly, - lgbtqiaFriendly = lgbtqiaFriendly, - links = links, - policies = policies, - cleanlinessAndSafety = cleanlinessAndSafety, - optionalExtras = optionalExtras, - importantNotices = importantNotices, - media = media, - hotelAmenities = hotelAmenities, - hotelDescriptiveAmenities = hotelDescriptiveAmenities, - roomAmenities = roomAmenities, - roomDescriptiveAmenities = roomDescriptiveAmenities, - accessibility = accessibility, - memberOnlyDealAvailable = memberOnlyDealAvailable, - roomTypes = roomTypes - ) - - /** - * Indicates whether there are available offers at the property during the dates requested, as well as information as to why. Note that pricing will only be present in the API response for a status of `AVAILABLE`. If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be returned. If there are available rooms, but none that meet the specific parameters of the search request, then one of the other messages will be returned. - * Values: AVAILABLE,NOT_AVAILABLE,ERROR,NUMBER_OF_ADULTS_NOT_ACCEPTED,NUMBER_OF_CHILDREN_NOT_ACCEPTED,NUMBER_OF_INFANTS_NOT_ACCEPTED,NUMBER_OF_PERSONS_NOT_ACCEPTED,CHECK_IN_AGE_NOT_ACCEPTED - */ - enum class Status(val value: kotlin.String) { - @JsonProperty("AVAILABLE") - AVAILABLE("AVAILABLE"), - - @JsonProperty("NOT_AVAILABLE") - NOT_AVAILABLE("NOT_AVAILABLE"), - - @JsonProperty("ERROR") - ERROR("ERROR"), - - @JsonProperty("NUMBER_OF_ADULTS_NOT_ACCEPTED") - NUMBER_OF_ADULTS_NOT_ACCEPTED("NUMBER_OF_ADULTS_NOT_ACCEPTED"), - - @JsonProperty("NUMBER_OF_CHILDREN_NOT_ACCEPTED") - NUMBER_OF_CHILDREN_NOT_ACCEPTED("NUMBER_OF_CHILDREN_NOT_ACCEPTED"), - - @JsonProperty("NUMBER_OF_INFANTS_NOT_ACCEPTED") - NUMBER_OF_INFANTS_NOT_ACCEPTED("NUMBER_OF_INFANTS_NOT_ACCEPTED"), - - @JsonProperty("NUMBER_OF_PERSONS_NOT_ACCEPTED") - NUMBER_OF_PERSONS_NOT_ACCEPTED("NUMBER_OF_PERSONS_NOT_ACCEPTED"), - - @JsonProperty("CHECK_IN_AGE_NOT_ACCEPTED") - CHECK_IN_AGE_NOT_ACCEPTED("CHECK_IN_AGE_NOT_ACCEPTED"); - } + /** + * Star rating value of the hotel property. + * Values: _1_PERIOD0,_1_PERIOD5,_2_PERIOD0,_2_PERIOD5,_3_PERIOD0,_3_PERIOD5,_4_PERIOD0,_4_PERIOD5,_5_PERIOD0 + */ + enum class StarRating( + val value: kotlin.String, + ) { + @JsonProperty("1.0") + _1_PERIOD0("1.0"), - /** - * Star rating value of the hotel property. - * Values: _1_PERIOD0,_1_PERIOD5,_2_PERIOD0,_2_PERIOD5,_3_PERIOD0,_3_PERIOD5,_4_PERIOD0,_4_PERIOD5,_5_PERIOD0 - */ - enum class StarRating(val value: kotlin.String) { - @JsonProperty("1.0") - _1_PERIOD0("1.0"), - - @JsonProperty("1.5") - _1_PERIOD5("1.5"), - - @JsonProperty("2.0") - _2_PERIOD0("2.0"), - - @JsonProperty("2.5") - _2_PERIOD5("2.5"), - - @JsonProperty("3.0") - _3_PERIOD0("3.0"), - - @JsonProperty("3.5") - _3_PERIOD5("3.5"), - - @JsonProperty("4.0") - _4_PERIOD0("4.0"), - - @JsonProperty("4.5") - _4_PERIOD5("4.5"), - - @JsonProperty("5.0") - _5_PERIOD0("5.0"); - } + @JsonProperty("1.5") + _1_PERIOD5("1.5"), + + @JsonProperty("2.0") + _2_PERIOD0("2.0"), + + @JsonProperty("2.5") + _2_PERIOD5("2.5"), + + @JsonProperty("3.0") + _3_PERIOD0("3.0"), + + @JsonProperty("3.5") + _3_PERIOD5("3.5"), + + @JsonProperty("4.0") + _4_PERIOD0("4.0"), + + @JsonProperty("4.5") + _4_PERIOD5("4.5"), + + @JsonProperty("5.0") + _5_PERIOD0("5.0"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt index 78b8bbe87..f48658156 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponse.kt @@ -20,155 +20,96 @@ import com.expediagroup.sdk.xap.models.HotelDetailsResponseOccupantsInner import com.expediagroup.sdk.xap.models.HotelDetailsResponseStayDates import com.expediagroup.sdk.xap.models.HotelDetailsResponseWarningsInner import com.expediagroup.sdk.xap.models.ValidFormsOfPayment - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param transactionId Unique identifier for the transaction. - * @param stayDates - * @param lengthOfStay The number of stay nights. - * @param numberOfRooms Number of rooms requested. - * @param occupants Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. - * @param validFormsOfPayment Container for payment information. - * @param hotelDetails +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param transactionId Unique identifier for the transaction. + * @param stayDates + * @param lengthOfStay The number of stay nights. + * @param numberOfRooms Number of rooms requested. + * @param occupants Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. + * @param validFormsOfPayment Container for payment information. + * @param hotelDetails */ data class HotelDetailsResponse( - /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - /* Unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: kotlin.String? = null, - - @JsonProperty("StayDates") -val stayDates: HotelDetailsResponseStayDates? = null, - - /* The number of stay nights. */ -@JsonProperty("LengthOfStay") -val lengthOfStay: kotlin.Int? = null, - - /* Number of rooms requested. */ -@JsonProperty("NumberOfRooms") -val numberOfRooms: kotlin.Int? = null, - - /* Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. */ -@JsonProperty("Occupants") -val occupants: kotlin.collections.List? = null, - - /* Container for payment information. */ -@JsonProperty("ValidFormsOfPayment") -val validFormsOfPayment: kotlin.collections.List? = null, - - @JsonProperty("HotelDetails") -val hotelDetails: Hotel? = null + // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + // Unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String? = null, + @JsonProperty("StayDates") + val stayDates: HotelDetailsResponseStayDates? = null, + // The number of stay nights. + @JsonProperty("LengthOfStay") + val lengthOfStay: kotlin.Int? = null, + // Number of rooms requested. + @JsonProperty("NumberOfRooms") + val numberOfRooms: kotlin.Int? = null, + // Container for the list of rooms requested by the traveler. Occupancy for each room is specified in this node. + @JsonProperty("Occupants") + val occupants: kotlin.collections.List? = null, + // Container for payment information. + @JsonProperty("ValidFormsOfPayment") + val validFormsOfPayment: kotlin.collections.List? = null, + @JsonProperty("HotelDetails") + val hotelDetails: Hotel? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + private var stayDates: HotelDetailsResponseStayDates? = null, + private var lengthOfStay: kotlin.Int? = null, + private var numberOfRooms: kotlin.Int? = null, + private var occupants: kotlin.collections.List? = null, + private var validFormsOfPayment: kotlin.collections.List? = null, + private var hotelDetails: Hotel? = null, + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun stayDates(stayDates: HotelDetailsResponseStayDates?) = apply { this.stayDates = stayDates } + fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } + fun numberOfRooms(numberOfRooms: kotlin.Int?) = apply { this.numberOfRooms = numberOfRooms } - } + fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun validFormsOfPayment(validFormsOfPayment: kotlin.collections.List?) = apply { this.validFormsOfPayment = validFormsOfPayment } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null, - private var stayDates: HotelDetailsResponseStayDates? = null, - private var lengthOfStay: kotlin.Int? = null, - private var numberOfRooms: kotlin.Int? = null, - private var occupants: kotlin.collections.List? = null, - private var validFormsOfPayment: kotlin.collections.List? = null, - private var hotelDetails: Hotel? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - fun stayDates(stayDates: HotelDetailsResponseStayDates?) = apply { this.stayDates = stayDates } - fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } - fun numberOfRooms(numberOfRooms: kotlin.Int?) = apply { this.numberOfRooms = numberOfRooms } - fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - fun validFormsOfPayment(validFormsOfPayment: kotlin.collections.List?) = apply { this.validFormsOfPayment = validFormsOfPayment } - fun hotelDetails(hotelDetails: Hotel?) = apply { this.hotelDetails = hotelDetails } + fun hotelDetails(hotelDetails: Hotel?) = apply { this.hotelDetails = hotelDetails } - fun build(): HotelDetailsResponse { - val instance = HotelDetailsResponse( - warnings = warnings, - transactionId = transactionId, - stayDates = stayDates, - lengthOfStay = lengthOfStay, - numberOfRooms = numberOfRooms, - occupants = occupants, - validFormsOfPayment = validFormsOfPayment, - hotelDetails = hotelDetails - ) + fun build(): HotelDetailsResponse { + val instance = + HotelDetailsResponse( + warnings = warnings, + transactionId = transactionId, + stayDates = stayDates, + lengthOfStay = lengthOfStay, + numberOfRooms = numberOfRooms, + occupants = occupants, + validFormsOfPayment = validFormsOfPayment, + hotelDetails = hotelDetails, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( warnings = warnings, transactionId = transactionId, stayDates = stayDates, @@ -176,6 +117,6 @@ val hotelDetails: Hotel? = null numberOfRooms = numberOfRooms, occupants = occupants, validFormsOfPayment = validFormsOfPayment, - hotelDetails = hotelDetails - ) + hotelDetails = hotelDetails, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt index 05dea6443..fb0d01f98 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseOccupantsInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param adults Specifies the number of adults staying in each room. - * @param childAges Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. +* + * @param adults Specifies the number of adults staying in each room. + * @param childAges Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. */ data class HotelDetailsResponseOccupantsInner( - /* Specifies the number of adults staying in each room. */ -@JsonProperty("Adults") -val adults: kotlin.Any? = null, - - /* Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. */ -@JsonProperty("ChildAges") -val childAges: kotlin.Any? = null + // Specifies the number of adults staying in each room. + @JsonProperty("Adults") + val adults: kotlin.Any? = null, + // Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. + @JsonProperty("ChildAges") + val childAges: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var adults: kotlin.Any? = null, - private var childAges: kotlin.Any? = null - ) { - fun adults(adults: kotlin.Any?) = apply { this.adults = adults } - fun childAges(childAges: kotlin.Any?) = apply { this.childAges = childAges } + class Builder( + private var adults: kotlin.Any? = null, + private var childAges: kotlin.Any? = null, + ) { + fun adults(adults: kotlin.Any?) = apply { this.adults = adults } - fun build(): HotelDetailsResponseOccupantsInner { - val instance = HotelDetailsResponseOccupantsInner( - adults = adults, - childAges = childAges - ) + fun childAges(childAges: kotlin.Any?) = apply { this.childAges = childAges } - return instance - } + fun build(): HotelDetailsResponseOccupantsInner { + val instance = + HotelDetailsResponseOccupantsInner( + adults = adults, + childAges = childAges, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( adults = adults, - childAges = childAges - ) + childAges = childAges, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt index c787ff4b2..1c086ad04 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseStayDates.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param checkInDate Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. - * @param checkOutDate Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. +* + * @param checkInDate Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. + * @param checkOutDate Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. */ data class HotelDetailsResponseStayDates( - /* Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. */ -@JsonProperty("CheckInDate") -val checkInDate: kotlin.Any? = null, - - /* Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. */ -@JsonProperty("CheckOutDate") -val checkOutDate: kotlin.Any? = null + // Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. + @JsonProperty("CheckInDate") + val checkInDate: kotlin.Any? = null, + // Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. The maximum advanced search window is 330 days in the future. The maximum length of stay is 28 days. + @JsonProperty("CheckOutDate") + val checkOutDate: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInDate: kotlin.Any? = null, - private var checkOutDate: kotlin.Any? = null - ) { - fun checkInDate(checkInDate: kotlin.Any?) = apply { this.checkInDate = checkInDate } - fun checkOutDate(checkOutDate: kotlin.Any?) = apply { this.checkOutDate = checkOutDate } + class Builder( + private var checkInDate: kotlin.Any? = null, + private var checkOutDate: kotlin.Any? = null, + ) { + fun checkInDate(checkInDate: kotlin.Any?) = apply { this.checkInDate = checkInDate } - fun build(): HotelDetailsResponseStayDates { - val instance = HotelDetailsResponseStayDates( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) + fun checkOutDate(checkOutDate: kotlin.Any?) = apply { this.checkOutDate = checkOutDate } - return instance - } + fun build(): HotelDetailsResponseStayDates { + val instance = + HotelDetailsResponseStayDates( + checkInDate = checkInDate, + checkOutDate = checkOutDate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( checkInDate = checkInDate, - checkOutDate = checkOutDate - ) + checkOutDate = checkOutDate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt index 735ea7d6f..af67cc130 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelDetailsResponseWarningsInner.kt @@ -15,132 +15,87 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param code The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. - * @param description A detail information of what happened. - * @param originalPrice The original price from the Lodging Search API response. - * @param newPrice The new price. - * @param changedAmount The difference between `OriginalPrice` and `NewPrice`. - * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. +* + * @param code The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. + * @param description A detail information of what happened. + * @param originalPrice The original price from the Lodging Search API response. + * @param newPrice The new price. + * @param changedAmount The difference between `OriginalPrice` and `NewPrice`. + * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ data class HotelDetailsResponseWarningsInner( - /* The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. */ -@JsonProperty("Code") -val code: kotlin.Any? = null, - - /* A detail information of what happened. */ -@JsonProperty("Description") -val description: kotlin.String? = null, - - /* The original price from the Lodging Search API response. */ -@JsonProperty("OriginalPrice") -val originalPrice: kotlin.Any? = null, - - /* The new price. */ -@JsonProperty("NewPrice") -val newPrice: kotlin.Any? = null, - - /* The difference between `OriginalPrice` and `NewPrice`. */ -@JsonProperty("ChangedAmount") -val changedAmount: kotlin.Any? = null, - - /* The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ -@JsonProperty("ChangedPercentage") -val changedPercentage: kotlin.String? = null + // The code of the warning. Available values are: - PRICE_DECREASED: The price decreased after shopping. - PRICE_INCREASED: The price increased after shopping. - CURRENCY_CHANGE: You will be charged in a different currency. + @JsonProperty("Code") + val code: kotlin.Any? = null, + // A detail information of what happened. + @JsonProperty("Description") + val description: kotlin.String? = null, + // The original price from the Lodging Search API response. + @JsonProperty("OriginalPrice") + val originalPrice: kotlin.Any? = null, + // The new price. + @JsonProperty("NewPrice") + val newPrice: kotlin.Any? = null, + // The difference between `OriginalPrice` and `NewPrice`. + @JsonProperty("ChangedAmount") + val changedAmount: kotlin.Any? = null, + // The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. + @JsonProperty("ChangedPercentage") + val changedPercentage: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var code: kotlin.Any? = null, + private var description: kotlin.String? = null, + private var originalPrice: kotlin.Any? = null, + private var newPrice: kotlin.Any? = null, + private var changedAmount: kotlin.Any? = null, + private var changedPercentage: kotlin.String? = null, + ) { + fun code(code: kotlin.Any?) = apply { this.code = code } + fun description(description: kotlin.String?) = apply { this.description = description } + fun originalPrice(originalPrice: kotlin.Any?) = apply { this.originalPrice = originalPrice } - } + fun newPrice(newPrice: kotlin.Any?) = apply { this.newPrice = newPrice } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun changedAmount(changedAmount: kotlin.Any?) = apply { this.changedAmount = changedAmount } - class Builder( - private var code: kotlin.Any? = null, - private var description: kotlin.String? = null, - private var originalPrice: kotlin.Any? = null, - private var newPrice: kotlin.Any? = null, - private var changedAmount: kotlin.Any? = null, - private var changedPercentage: kotlin.String? = null - ) { - fun code(code: kotlin.Any?) = apply { this.code = code } - fun description(description: kotlin.String?) = apply { this.description = description } - fun originalPrice(originalPrice: kotlin.Any?) = apply { this.originalPrice = originalPrice } - fun newPrice(newPrice: kotlin.Any?) = apply { this.newPrice = newPrice } - fun changedAmount(changedAmount: kotlin.Any?) = apply { this.changedAmount = changedAmount } - fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } + fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } - fun build(): HotelDetailsResponseWarningsInner { - val instance = HotelDetailsResponseWarningsInner( - code = code, - description = description, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount, - changedPercentage = changedPercentage - ) + fun build(): HotelDetailsResponseWarningsInner { + val instance = + HotelDetailsResponseWarningsInner( + code = code, + description = description, + originalPrice = originalPrice, + newPrice = newPrice, + changedAmount = changedAmount, + changedPercentage = changedPercentage, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code, description = description, originalPrice = originalPrice, newPrice = newPrice, changedAmount = changedAmount, - changedPercentage = changedPercentage - ) + changedPercentage = changedPercentage, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt index 47068bf91..4765a03b3 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelHotelAmenitiesInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param id The identification number for a hotel amenity. - * @param name The description of a hotel amenity. +* + * @param id The identification number for a hotel amenity. + * @param name The description of a hotel amenity. */ data class HotelHotelAmenitiesInner( - /* The identification number for a hotel amenity. */ -@JsonProperty("Id") -val id: kotlin.Any? = null, - - /* The description of a hotel amenity. */ -@JsonProperty("Name") -val name: kotlin.Any? = null + // The identification number for a hotel amenity. + @JsonProperty("Id") + val id: kotlin.Any? = null, + // The description of a hotel amenity. + @JsonProperty("Name") + val name: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - fun name(name: kotlin.Any?) = apply { this.name = name } + class Builder( + private var id: kotlin.Any? = null, + private var name: kotlin.Any? = null, + ) { + fun id(id: kotlin.Any?) = apply { this.id = id } - fun build(): HotelHotelAmenitiesInner { - val instance = HotelHotelAmenitiesInner( - id = id, - name = name - ) + fun name(name: kotlin.Any?) = apply { this.name = name } - return instance - } + fun build(): HotelHotelAmenitiesInner { + val instance = + HotelHotelAmenitiesInner( + id = id, + name = name, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id, - name = name - ) + name = name, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt index 5568dac48..e7abe2e66 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinks.kt @@ -18,66 +18,49 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.HotelLinksApiRateCalendar import com.expediagroup.sdk.xap.models.HotelLinksWebSearchResult import com.expediagroup.sdk.xap.models.Link - import com.fasterxml.jackson.annotation.JsonProperty /** -* Container for list of **HATEOAS** links to Expedia website to complete booking. This links section will only return a deeplink to the Website Search Results page by default. If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the response, as the Lodging Details API returns details at the room offer level, and not at the property level. - * @param webSearchResult - * @param apiRateCalendar +* Container for list of **HATEOAS** links to Expedia website to complete booking. This links section will only return a deeplink to the Website Search Results page by default. If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the response, as the Lodging Details API returns details at the room offer level, and not at the property level. + * @param webSearchResult + * @param apiRateCalendar */ data class HotelLinks( - @JsonProperty("WebSearchResult") -val webSearchResult: HotelLinksWebSearchResult? = null, - - @JsonProperty("ApiRateCalendar") -val apiRateCalendar: HotelLinksApiRateCalendar? = null + @JsonProperty("WebSearchResult") + val webSearchResult: HotelLinksWebSearchResult? = null, + @JsonProperty("ApiRateCalendar") + val apiRateCalendar: HotelLinksApiRateCalendar? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var webSearchResult: HotelLinksWebSearchResult? = null, - private var apiRateCalendar: HotelLinksApiRateCalendar? = null - ) { - fun webSearchResult(webSearchResult: HotelLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - fun apiRateCalendar(apiRateCalendar: HotelLinksApiRateCalendar?) = apply { this.apiRateCalendar = apiRateCalendar } + class Builder( + private var webSearchResult: HotelLinksWebSearchResult? = null, + private var apiRateCalendar: HotelLinksApiRateCalendar? = null, + ) { + fun webSearchResult(webSearchResult: HotelLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - fun build(): HotelLinks { - val instance = HotelLinks( - webSearchResult = webSearchResult, - apiRateCalendar = apiRateCalendar - ) + fun apiRateCalendar(apiRateCalendar: HotelLinksApiRateCalendar?) = apply { this.apiRateCalendar = apiRateCalendar } - return instance - } + fun build(): HotelLinks { + val instance = + HotelLinks( + webSearchResult = webSearchResult, + apiRateCalendar = apiRateCalendar, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( webSearchResult = webSearchResult, - apiRateCalendar = apiRateCalendar - ) + apiRateCalendar = apiRateCalendar, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt index 2862bb48e..a5f015a35 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksApiRateCalendar.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class HotelLinksApiRateCalendar( - /* The Accept request header (for API queries only - not included for page URLs). */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* Method of request. */ -@JsonProperty("Method") -val method: kotlin.String? = null, - - /* The URL of the destination web page or API query. */ -@JsonProperty("Href") -val href: kotlin.String? = null + // The Accept request header (for API queries only - not included for page URLs). + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // Method of request. + @JsonProperty("Method") + val method: kotlin.String? = null, + // The URL of the destination web page or API query. + @JsonProperty("Href") + val href: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } - fun href(href: kotlin.String?) = apply { this.href = href } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun build(): HotelLinksApiRateCalendar { - val instance = HotelLinksApiRateCalendar( - accept = accept, - method = method, - href = href - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): HotelLinksApiRateCalendar { + val instance = + HotelLinksApiRateCalendar( + accept = accept, + method = method, + href = href, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( accept = accept, method = method, - href = href - ) + href = href, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt index 96b0e1620..b2c105756 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLinksWebSearchResult.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class HotelLinksWebSearchResult( - /* The Accept request header (for API queries only - not included for page URLs). */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* Method of request. */ -@JsonProperty("Method") -val method: kotlin.String? = null, - - /* The URL of the destination web page or API query. */ -@JsonProperty("Href") -val href: kotlin.String? = null + // The Accept request header (for API queries only - not included for page URLs). + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // Method of request. + @JsonProperty("Method") + val method: kotlin.String? = null, + // The URL of the destination web page or API query. + @JsonProperty("Href") + val href: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } - fun href(href: kotlin.String?) = apply { this.href = href } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun build(): HotelLinksWebSearchResult { - val instance = HotelLinksWebSearchResult( - accept = accept, - method = method, - href = href - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): HotelLinksWebSearchResult { + val instance = + HotelLinksWebSearchResult( + accept = accept, + method = method, + href = href, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( accept = accept, method = method, - href = href - ) + href = href, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt index b3e2d604b..1df832a92 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponse.kt @@ -19,171 +19,105 @@ import com.expediagroup.sdk.xap.models.Hotel import com.expediagroup.sdk.xap.models.HotelListingsResponseStayDates import com.expediagroup.sdk.xap.models.Occupant import com.expediagroup.sdk.xap.models.Warning - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param count The number of hotels actually returned in the response. - * @param totalHotelCount The number of hotels present in the location. - * @param transactionId Unique identifier for the transaction. - * @param stayDates - * @param lengthOfStay The number of stay nights. - * @param numberOfRooms The number of the rooms requested on behalf of the user. - * @param occupants Container of occupants. It is an array including occupants of each room. - * @param hotels Container for all hotels. +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param count The number of hotels actually returned in the response. + * @param totalHotelCount The number of hotels present in the location. + * @param transactionId Unique identifier for the transaction. + * @param stayDates + * @param lengthOfStay The number of stay nights. + * @param numberOfRooms The number of the rooms requested on behalf of the user. + * @param occupants Container of occupants. It is an array including occupants of each room. + * @param hotels Container for all hotels. */ data class HotelListingsResponse( - /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - /* The number of hotels actually returned in the response. */ -@JsonProperty("Count") -val count: kotlin.Int? = null, - - /* The number of hotels present in the location. */ -@JsonProperty("TotalHotelCount") -val totalHotelCount: kotlin.Int? = null, - - /* Unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: kotlin.String? = null, - - @JsonProperty("StayDates") -val stayDates: HotelListingsResponseStayDates? = null, - - /* The number of stay nights. */ -@JsonProperty("LengthOfStay") -val lengthOfStay: kotlin.Int? = null, - - /* The number of the rooms requested on behalf of the user. */ -@JsonProperty("NumberOfRooms") -val numberOfRooms: kotlin.Int? = null, - - /* Container of occupants. It is an array including occupants of each room. */ -@JsonProperty("Occupants") -val occupants: kotlin.collections.List? = null, - - /* Container for all hotels. */ -@JsonProperty("Hotels") -val hotels: kotlin.collections.List? = null + // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + // The number of hotels actually returned in the response. + @JsonProperty("Count") + val count: kotlin.Int? = null, + // The number of hotels present in the location. + @JsonProperty("TotalHotelCount") + val totalHotelCount: kotlin.Int? = null, + // Unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String? = null, + @JsonProperty("StayDates") + val stayDates: HotelListingsResponseStayDates? = null, + // The number of stay nights. + @JsonProperty("LengthOfStay") + val lengthOfStay: kotlin.Int? = null, + // The number of the rooms requested on behalf of the user. + @JsonProperty("NumberOfRooms") + val numberOfRooms: kotlin.Int? = null, + // Container of occupants. It is an array including occupants of each room. + @JsonProperty("Occupants") + val occupants: kotlin.collections.List? = null, + // Container for all hotels. + @JsonProperty("Hotels") + val hotels: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var count: kotlin.Int? = null, + private var totalHotelCount: kotlin.Int? = null, + private var transactionId: kotlin.String? = null, + private var stayDates: HotelListingsResponseStayDates? = null, + private var lengthOfStay: kotlin.Int? = null, + private var numberOfRooms: kotlin.Int? = null, + private var occupants: kotlin.collections.List? = null, + private var hotels: kotlin.collections.List? = null, + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun count(count: kotlin.Int?) = apply { this.count = count } + fun totalHotelCount(totalHotelCount: kotlin.Int?) = apply { this.totalHotelCount = totalHotelCount } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun stayDates(stayDates: HotelListingsResponseStayDates?) = apply { this.stayDates = stayDates } + fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } - } + fun numberOfRooms(numberOfRooms: kotlin.Int?) = apply { this.numberOfRooms = numberOfRooms } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var count: kotlin.Int? = null, - private var totalHotelCount: kotlin.Int? = null, - private var transactionId: kotlin.String? = null, - private var stayDates: HotelListingsResponseStayDates? = null, - private var lengthOfStay: kotlin.Int? = null, - private var numberOfRooms: kotlin.Int? = null, - private var occupants: kotlin.collections.List? = null, - private var hotels: kotlin.collections.List? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun count(count: kotlin.Int?) = apply { this.count = count } - fun totalHotelCount(totalHotelCount: kotlin.Int?) = apply { this.totalHotelCount = totalHotelCount } - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - fun stayDates(stayDates: HotelListingsResponseStayDates?) = apply { this.stayDates = stayDates } - fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } - fun numberOfRooms(numberOfRooms: kotlin.Int?) = apply { this.numberOfRooms = numberOfRooms } - fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - fun hotels(hotels: kotlin.collections.List?) = apply { this.hotels = hotels } + fun hotels(hotels: kotlin.collections.List?) = apply { this.hotels = hotels } - fun build(): HotelListingsResponse { - val instance = HotelListingsResponse( - warnings = warnings, - count = count, - totalHotelCount = totalHotelCount, - transactionId = transactionId, - stayDates = stayDates, - lengthOfStay = lengthOfStay, - numberOfRooms = numberOfRooms, - occupants = occupants, - hotels = hotels - ) + fun build(): HotelListingsResponse { + val instance = + HotelListingsResponse( + warnings = warnings, + count = count, + totalHotelCount = totalHotelCount, + transactionId = transactionId, + stayDates = stayDates, + lengthOfStay = lengthOfStay, + numberOfRooms = numberOfRooms, + occupants = occupants, + hotels = hotels, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( warnings = warnings, count = count, totalHotelCount = totalHotelCount, @@ -192,6 +126,6 @@ val hotels: kotlin.collections.List? = null lengthOfStay = lengthOfStay, numberOfRooms = numberOfRooms, occupants = occupants, - hotels = hotels - ) + hotels = hotels, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt index b81f0df08..7f030f4fe 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelListingsResponseStayDates.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. +* + * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ data class HotelListingsResponseStayDates( - /* The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ -@JsonProperty("CheckInDate") -val checkInDate: java.time.LocalDate? = null, - - /* The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ -@JsonProperty("CheckOutDate") -val checkOutDate: java.time.LocalDate? = null + // The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + @JsonProperty("CheckInDate") + val checkInDate: java.time.LocalDate? = null, + // The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + @JsonProperty("CheckOutDate") + val checkOutDate: java.time.LocalDate? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInDate: java.time.LocalDate? = null, - private var checkOutDate: java.time.LocalDate? = null - ) { - fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } + class Builder( + private var checkInDate: java.time.LocalDate? = null, + private var checkOutDate: java.time.LocalDate? = null, + ) { + fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - fun build(): HotelListingsResponseStayDates { - val instance = HotelListingsResponseStayDates( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) + fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } - return instance - } + fun build(): HotelListingsResponseStayDates { + val instance = + HotelListingsResponseStayDates( + checkInDate = checkInDate, + checkOutDate = checkOutDate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( checkInDate = checkInDate, - checkOutDate = checkOutDate - ) + checkOutDate = checkOutDate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt index 3b416a8e6..7a69fd9fb 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelLocation.kt @@ -18,81 +18,57 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Address import com.expediagroup.sdk.xap.models.LocationGeoLocation import com.expediagroup.sdk.xap.models.Neighborhood - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param address - * @param geoLocation - * @param neighborhood +* + * @param address + * @param geoLocation + * @param neighborhood */ data class HotelLocation( - @JsonProperty("Address") -val address: Address? = null, - - @JsonProperty("GeoLocation") -val geoLocation: LocationGeoLocation? = null, - - @JsonProperty("Neighborhood") -val neighborhood: Neighborhood? = null + @JsonProperty("Address") + val address: Address? = null, + @JsonProperty("GeoLocation") + val geoLocation: LocationGeoLocation? = null, + @JsonProperty("Neighborhood") + val neighborhood: Neighborhood? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var address: Address? = null, - private var geoLocation: LocationGeoLocation? = null, - private var neighborhood: Neighborhood? = null - ) { - fun address(address: Address?) = apply { this.address = address } - fun geoLocation(geoLocation: LocationGeoLocation?) = apply { this.geoLocation = geoLocation } - fun neighborhood(neighborhood: Neighborhood?) = apply { this.neighborhood = neighborhood } + class Builder( + private var address: Address? = null, + private var geoLocation: LocationGeoLocation? = null, + private var neighborhood: Neighborhood? = null, + ) { + fun address(address: Address?) = apply { this.address = address } - fun build(): HotelLocation { - val instance = HotelLocation( - address = address, - geoLocation = geoLocation, - neighborhood = neighborhood - ) + fun geoLocation(geoLocation: LocationGeoLocation?) = apply { this.geoLocation = geoLocation } - return instance - } + fun neighborhood(neighborhood: Neighborhood?) = apply { this.neighborhood = neighborhood } + + fun build(): HotelLocation { + val instance = + HotelLocation( + address = address, + geoLocation = geoLocation, + neighborhood = neighborhood, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( address = address, geoLocation = geoLocation, - neighborhood = neighborhood - ) + neighborhood = neighborhood, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt index 6c013149a..7f9a4caf7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPolicies.kt @@ -15,132 +15,87 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for Hotel policy information. - * @param checkInStartTime Beginning of the standard check-in window on the check in date, and in the local time of the hotel. - * @param checkInEndTime End of the standard check-in window on the check in date, and in the local time of the hotel. - * @param specialCheckInInstructions Some special instructions needed care by customer when check in. - * @param checkOutTime Customers must check out before this time on the check out date, expressed in the local time of the hotel. - * @param petPolicies The policy of the property toward having pets stay with guests. - * @param childrenAndExtraBedsPolicies The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. + * @param checkInStartTime Beginning of the standard check-in window on the check in date, and in the local time of the hotel. + * @param checkInEndTime End of the standard check-in window on the check in date, and in the local time of the hotel. + * @param specialCheckInInstructions Some special instructions needed care by customer when check in. + * @param checkOutTime Customers must check out before this time on the check out date, expressed in the local time of the hotel. + * @param petPolicies The policy of the property toward having pets stay with guests. + * @param childrenAndExtraBedsPolicies The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. */ data class HotelPolicies( - /* Beginning of the standard check-in window on the check in date, and in the local time of the hotel. */ -@JsonProperty("CheckInStartTime") -val checkInStartTime: kotlin.String? = null, - - /* End of the standard check-in window on the check in date, and in the local time of the hotel. */ -@JsonProperty("CheckInEndTime") -val checkInEndTime: kotlin.String? = null, - - /* Some special instructions needed care by customer when check in. */ -@JsonProperty("SpecialCheckInInstructions") -val specialCheckInInstructions: kotlin.collections.List? = null, - - /* Customers must check out before this time on the check out date, expressed in the local time of the hotel. */ -@JsonProperty("CheckOutTime") -val checkOutTime: kotlin.String? = null, - - /* The policy of the property toward having pets stay with guests. */ -@JsonProperty("PetPolicies") -val petPolicies: kotlin.collections.List? = null, - - /* The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. */ -@JsonProperty("ChildrenAndExtraBedsPolicies") -val childrenAndExtraBedsPolicies: kotlin.collections.List? = null + // Beginning of the standard check-in window on the check in date, and in the local time of the hotel. + @JsonProperty("CheckInStartTime") + val checkInStartTime: kotlin.String? = null, + // End of the standard check-in window on the check in date, and in the local time of the hotel. + @JsonProperty("CheckInEndTime") + val checkInEndTime: kotlin.String? = null, + // Some special instructions needed care by customer when check in. + @JsonProperty("SpecialCheckInInstructions") + val specialCheckInInstructions: kotlin.collections.List? = null, + // Customers must check out before this time on the check out date, expressed in the local time of the hotel. + @JsonProperty("CheckOutTime") + val checkOutTime: kotlin.String? = null, + // The policy of the property toward having pets stay with guests. + @JsonProperty("PetPolicies") + val petPolicies: kotlin.collections.List? = null, + // The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. + @JsonProperty("ChildrenAndExtraBedsPolicies") + val childrenAndExtraBedsPolicies: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var checkInStartTime: kotlin.String? = null, + private var checkInEndTime: kotlin.String? = null, + private var specialCheckInInstructions: kotlin.collections.List? = null, + private var checkOutTime: kotlin.String? = null, + private var petPolicies: kotlin.collections.List? = null, + private var childrenAndExtraBedsPolicies: kotlin.collections.List? = null, + ) { + fun checkInStartTime(checkInStartTime: kotlin.String?) = apply { this.checkInStartTime = checkInStartTime } + fun checkInEndTime(checkInEndTime: kotlin.String?) = apply { this.checkInEndTime = checkInEndTime } + fun specialCheckInInstructions(specialCheckInInstructions: kotlin.collections.List?) = apply { this.specialCheckInInstructions = specialCheckInInstructions } - } + fun checkOutTime(checkOutTime: kotlin.String?) = apply { this.checkOutTime = checkOutTime } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun petPolicies(petPolicies: kotlin.collections.List?) = apply { this.petPolicies = petPolicies } - class Builder( - private var checkInStartTime: kotlin.String? = null, - private var checkInEndTime: kotlin.String? = null, - private var specialCheckInInstructions: kotlin.collections.List? = null, - private var checkOutTime: kotlin.String? = null, - private var petPolicies: kotlin.collections.List? = null, - private var childrenAndExtraBedsPolicies: kotlin.collections.List? = null - ) { - fun checkInStartTime(checkInStartTime: kotlin.String?) = apply { this.checkInStartTime = checkInStartTime } - fun checkInEndTime(checkInEndTime: kotlin.String?) = apply { this.checkInEndTime = checkInEndTime } - fun specialCheckInInstructions(specialCheckInInstructions: kotlin.collections.List?) = apply { this.specialCheckInInstructions = specialCheckInInstructions } - fun checkOutTime(checkOutTime: kotlin.String?) = apply { this.checkOutTime = checkOutTime } - fun petPolicies(petPolicies: kotlin.collections.List?) = apply { this.petPolicies = petPolicies } - fun childrenAndExtraBedsPolicies(childrenAndExtraBedsPolicies: kotlin.collections.List?) = apply { this.childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies } + fun childrenAndExtraBedsPolicies(childrenAndExtraBedsPolicies: kotlin.collections.List?) = apply { this.childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies } - fun build(): HotelPolicies { - val instance = HotelPolicies( - checkInStartTime = checkInStartTime, - checkInEndTime = checkInEndTime, - specialCheckInInstructions = specialCheckInInstructions, - checkOutTime = checkOutTime, - petPolicies = petPolicies, - childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies - ) + fun build(): HotelPolicies { + val instance = + HotelPolicies( + checkInStartTime = checkInStartTime, + checkInEndTime = checkInEndTime, + specialCheckInInstructions = specialCheckInInstructions, + checkOutTime = checkOutTime, + petPolicies = petPolicies, + childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( checkInStartTime = checkInStartTime, checkInEndTime = checkInEndTime, specialCheckInInstructions = specialCheckInInstructions, checkOutTime = checkOutTime, petPolicies = petPolicies, - childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies - ) + childrenAndExtraBedsPolicies = childrenAndExtraBedsPolicies, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt index 2bd50f782..b50a94128 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelPropertyType.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* Container for information on hotel property type. You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - * @param id The id of hotel property type. - * @param name The name of hotel property type. +* Container for information on hotel property type. You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + * @param id The id of hotel property type. + * @param name The name of hotel property type. */ data class HotelPropertyType( - /* The id of hotel property type. */ -@JsonProperty("Id") -val id: kotlin.Int? = null, - - /* The name of hotel property type. */ -@JsonProperty("Name") -val name: kotlin.String? = null + // The id of hotel property type. + @JsonProperty("Id") + val id: kotlin.Int? = null, + // The name of hotel property type. + @JsonProperty("Name") + val name: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Int? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.Int?) = apply { this.id = id } - fun name(name: kotlin.String?) = apply { this.name = name } + class Builder( + private var id: kotlin.Int? = null, + private var name: kotlin.String? = null, + ) { + fun id(id: kotlin.Int?) = apply { this.id = id } - fun build(): HotelPropertyType { - val instance = HotelPropertyType( - id = id, - name = name - ) + fun name(name: kotlin.String?) = apply { this.name = name } - return instance - } + fun build(): HotelPropertyType { + val instance = + HotelPropertyType( + id = id, + name = name, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id, - name = name - ) + name = name, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt index 9a105694d..ed7689f8c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRateCalendar.kt @@ -16,84 +16,60 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.RateCalendar - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for all hotel rate calendar data. - * @param ecomHotelId The unique, Expedia-specific hotel property identifier used to designate a single hotel. - * @param hcomHotelId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. - * @param rateCalendar Container for all rate calendar data. + * @param ecomHotelId The unique, Expedia-specific hotel property identifier used to designate a single hotel. + * @param hcomHotelId The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. + * @param rateCalendar Container for all rate calendar data. */ data class HotelRateCalendar( - /* The unique, Expedia-specific hotel property identifier used to designate a single hotel. */ -@JsonProperty("EcomHotelId") -val ecomHotelId: kotlin.String? = null, - - /* The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. */ -@JsonProperty("HcomHotelId") -val hcomHotelId: kotlin.String? = null, - - /* Container for all rate calendar data. */ -@JsonProperty("RateCalendar") -val rateCalendar: kotlin.collections.List? = null + // The unique, Expedia-specific hotel property identifier used to designate a single hotel. + @JsonProperty("EcomHotelId") + val ecomHotelId: kotlin.String? = null, + // The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. + @JsonProperty("HcomHotelId") + val hcomHotelId: kotlin.String? = null, + // Container for all rate calendar data. + @JsonProperty("RateCalendar") + val rateCalendar: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ecomHotelId: kotlin.String? = null, - private var hcomHotelId: kotlin.String? = null, - private var rateCalendar: kotlin.collections.List? = null - ) { - fun ecomHotelId(ecomHotelId: kotlin.String?) = apply { this.ecomHotelId = ecomHotelId } - fun hcomHotelId(hcomHotelId: kotlin.String?) = apply { this.hcomHotelId = hcomHotelId } - fun rateCalendar(rateCalendar: kotlin.collections.List?) = apply { this.rateCalendar = rateCalendar } + class Builder( + private var ecomHotelId: kotlin.String? = null, + private var hcomHotelId: kotlin.String? = null, + private var rateCalendar: kotlin.collections.List? = null, + ) { + fun ecomHotelId(ecomHotelId: kotlin.String?) = apply { this.ecomHotelId = ecomHotelId } - fun build(): HotelRateCalendar { - val instance = HotelRateCalendar( - ecomHotelId = ecomHotelId, - hcomHotelId = hcomHotelId, - rateCalendar = rateCalendar - ) + fun hcomHotelId(hcomHotelId: kotlin.String?) = apply { this.hcomHotelId = hcomHotelId } - return instance - } + fun rateCalendar(rateCalendar: kotlin.collections.List?) = apply { this.rateCalendar = rateCalendar } + + fun build(): HotelRateCalendar { + val instance = + HotelRateCalendar( + ecomHotelId = ecomHotelId, + hcomHotelId = hcomHotelId, + rateCalendar = rateCalendar, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( ecomHotelId = ecomHotelId, hcomHotelId = hcomHotelId, - rateCalendar = rateCalendar - ) + rateCalendar = rateCalendar, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt index 4fa3c2a74..71007d0b5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/HotelRoomAmenitiesInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param id The identification number for a room amenity. - * @param name The description of a room amenity. +* + * @param id The identification number for a room amenity. + * @param name The description of a room amenity. */ data class HotelRoomAmenitiesInner( - /* The identification number for a room amenity. */ -@JsonProperty("Id") -val id: kotlin.Any? = null, - - /* The description of a room amenity. */ -@JsonProperty("Name") -val name: kotlin.Any? = null + // The identification number for a room amenity. + @JsonProperty("Id") + val id: kotlin.Any? = null, + // The description of a room amenity. + @JsonProperty("Name") + val name: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - fun name(name: kotlin.Any?) = apply { this.name = name } + class Builder( + private var id: kotlin.Any? = null, + private var name: kotlin.Any? = null, + ) { + fun id(id: kotlin.Any?) = apply { this.id = id } - fun build(): HotelRoomAmenitiesInner { - val instance = HotelRoomAmenitiesInner( - id = id, - name = name - ) + fun name(name: kotlin.Any?) = apply { this.name = name } - return instance - } + fun build(): HotelRoomAmenitiesInner { + val instance = + HotelRoomAmenitiesInner( + id = id, + name = name, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id, - name = name - ) + name = name, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt index 2c1f171a1..1495b0553 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Image.kt @@ -15,93 +15,65 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * List of image resources of the car product. - * @param type Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) - * @param propertySize Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) - * @param href URL for the image. + * @param type Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) + * @param propertySize Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) + * @param href URL for the image. */ data class Image( - /* Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) */ -@JsonProperty("Type") -val type: - kotlin.String -, - - /* Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) */ -@JsonProperty("Size") -val propertySize: - kotlin.String -, - - /* URL for the image. */ -@JsonProperty("Href") -val href: - kotlin.String - + // Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide) + @JsonProperty("Type") + val type: kotlin.String, + // Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide) + @JsonProperty("Size") + val propertySize: kotlin.String, + // URL for the image. + @JsonProperty("Href") + val href: kotlin.String, ) { - - - init { - require(type != null) { "type must not be null" } - - - - - - + require(type != null) { "type must not be null" } require(propertySize != null) { "propertySize must not be null" } - - - - - - require(href != null) { "href must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var propertySize: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - fun propertySize(propertySize: kotlin.String) = apply { this.propertySize = propertySize } - fun href(href: kotlin.String) = apply { this.href = href } + class Builder( + private var type: kotlin.String? = null, + private var propertySize: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun type(type: kotlin.String) = apply { this.type = type } - fun build(): Image { - val instance = Image( - type = type!!, - propertySize = propertySize!!, - href = href!! - ) + fun propertySize(propertySize: kotlin.String) = apply { this.propertySize = propertySize } - return instance - } + fun href(href: kotlin.String) = apply { this.href = href } + + fun build(): Image { + val instance = + Image( + type = type!!, + propertySize = propertySize!!, + href = href!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type!!, propertySize = propertySize!!, - href = href!! - ) + href = href!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt index e6db11ba1..d29d12742 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Link.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class Link( - /* The Accept request header (for API queries only - not included for page URLs). */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* Method of request. */ -@JsonProperty("Method") -val method: kotlin.String? = null, - - /* The URL of the destination web page or API query. */ -@JsonProperty("Href") -val href: kotlin.String? = null + // The Accept request header (for API queries only - not included for page URLs). + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // Method of request. + @JsonProperty("Method") + val method: kotlin.String? = null, + // The URL of the destination web page or API query. + @JsonProperty("Href") + val href: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } - fun href(href: kotlin.String?) = apply { this.href = href } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun build(): Link { - val instance = Link( - accept = accept, - method = method, - href = href - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): Link { + val instance = + Link( + accept = accept, + method = method, + href = href, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( accept = accept, method = method, - href = href - ) + href = href, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt index 3bdb77c4b..bb55e5ec1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Location.kt @@ -18,81 +18,57 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Address import com.expediagroup.sdk.xap.models.LocationGeoLocation import com.expediagroup.sdk.xap.models.Neighborhood - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for list of possible locations that could be used to disambiguate the query. - * @param address - * @param geoLocation - * @param neighborhood + * @param address + * @param geoLocation + * @param neighborhood */ data class Location( - @JsonProperty("Address") -val address: Address? = null, - - @JsonProperty("GeoLocation") -val geoLocation: LocationGeoLocation? = null, - - @JsonProperty("Neighborhood") -val neighborhood: Neighborhood? = null + @JsonProperty("Address") + val address: Address? = null, + @JsonProperty("GeoLocation") + val geoLocation: LocationGeoLocation? = null, + @JsonProperty("Neighborhood") + val neighborhood: Neighborhood? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var address: Address? = null, - private var geoLocation: LocationGeoLocation? = null, - private var neighborhood: Neighborhood? = null - ) { - fun address(address: Address?) = apply { this.address = address } - fun geoLocation(geoLocation: LocationGeoLocation?) = apply { this.geoLocation = geoLocation } - fun neighborhood(neighborhood: Neighborhood?) = apply { this.neighborhood = neighborhood } + class Builder( + private var address: Address? = null, + private var geoLocation: LocationGeoLocation? = null, + private var neighborhood: Neighborhood? = null, + ) { + fun address(address: Address?) = apply { this.address = address } - fun build(): Location { - val instance = Location( - address = address, - geoLocation = geoLocation, - neighborhood = neighborhood - ) + fun geoLocation(geoLocation: LocationGeoLocation?) = apply { this.geoLocation = geoLocation } - return instance - } + fun neighborhood(neighborhood: Neighborhood?) = apply { this.neighborhood = neighborhood } + + fun build(): Location { + val instance = + Location( + address = address, + geoLocation = geoLocation, + neighborhood = neighborhood, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( address = address, geoLocation = geoLocation, - neighborhood = neighborhood - ) + neighborhood = neighborhood, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt index 625aa903f..c0f9b0d36 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationGeoLocation.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param latitude The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. - * @param longitude The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. - * @param obfuscated Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. +* + * @param latitude The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. + * @param longitude The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. + * @param obfuscated Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. */ data class LocationGeoLocation( - /* The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. */ -@JsonProperty("Latitude") -val latitude: kotlin.String? = null, - - /* The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. */ -@JsonProperty("Longitude") -val longitude: kotlin.String? = null, - - /* Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. */ -@JsonProperty("Obfuscated") -val obfuscated: kotlin.Boolean? = null + // The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. North latitude will be represented by a positive value. South latitude will be represented by a negative value. + @JsonProperty("Latitude") + val latitude: kotlin.String? = null, + // The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). East longitude will be represented by a positive value. West longitude will be represented by a negative value. + @JsonProperty("Longitude") + val longitude: kotlin.String? = null, + // Indicates whether the displayed Latitude/Longitude information is obfuscated. Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long value will be returned that will indicate the general area within which the property is located, but not the exact location of the property itself. + @JsonProperty("Obfuscated") + val obfuscated: kotlin.Boolean? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var latitude: kotlin.String? = null, - private var longitude: kotlin.String? = null, - private var obfuscated: kotlin.Boolean? = null - ) { - fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } - fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } - fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + class Builder( + private var latitude: kotlin.String? = null, + private var longitude: kotlin.String? = null, + private var obfuscated: kotlin.Boolean? = null, + ) { + fun latitude(latitude: kotlin.String?) = apply { this.latitude = latitude } - fun build(): LocationGeoLocation { - val instance = LocationGeoLocation( - latitude = latitude, - longitude = longitude, - obfuscated = obfuscated - ) + fun longitude(longitude: kotlin.String?) = apply { this.longitude = longitude } - return instance - } + fun obfuscated(obfuscated: kotlin.Boolean?) = apply { this.obfuscated = obfuscated } + + fun build(): LocationGeoLocation { + val instance = + LocationGeoLocation( + latitude = latitude, + longitude = longitude, + obfuscated = obfuscated, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( latitude = latitude, longitude = longitude, - obfuscated = obfuscated - ) + obfuscated = obfuscated, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt index 5e4e01870..24c4d3e37 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LocationOption.kt @@ -17,146 +17,94 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Country import com.expediagroup.sdk.xap.models.GeoLocation - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for possible matches to your ambiguous `locationKeyword` query. - * @param type Type of the location. - * @param regionId RegionId the location resides in. - * @param shortName The name of the location which matches the location keyword. - * @param airportCode Indicates the nearest major airport to the location. - * @param address The address of the location. - * @param country - * @param geoLocation + * @param type Type of the location. + * @param regionId RegionId the location resides in. + * @param shortName The name of the location which matches the location keyword. + * @param airportCode Indicates the nearest major airport to the location. + * @param address The address of the location. + * @param country + * @param geoLocation */ data class LocationOption( - /* Type of the location. */ -@JsonProperty("Type") -val type: kotlin.String? = null, - - /* RegionId the location resides in. */ -@JsonProperty("RegionId") -val regionId: kotlin.String? = null, - - /* The name of the location which matches the location keyword. */ -@JsonProperty("ShortName") -val shortName: kotlin.String? = null, - - /* Indicates the nearest major airport to the location. */ -@JsonProperty("AirportCode") -val airportCode: kotlin.String? = null, - - /* The address of the location. */ -@JsonProperty("Address") -val address: kotlin.String? = null, - - @JsonProperty("Country") -val country: Country? = null, - - @JsonProperty("GeoLocation") -val geoLocation: GeoLocation? = null + // Type of the location. + @JsonProperty("Type") + val type: kotlin.String? = null, + // RegionId the location resides in. + @JsonProperty("RegionId") + val regionId: kotlin.String? = null, + // The name of the location which matches the location keyword. + @JsonProperty("ShortName") + val shortName: kotlin.String? = null, + // Indicates the nearest major airport to the location. + @JsonProperty("AirportCode") + val airportCode: kotlin.String? = null, + // The address of the location. + @JsonProperty("Address") + val address: kotlin.String? = null, + @JsonProperty("Country") + val country: Country? = null, + @JsonProperty("GeoLocation") + val geoLocation: GeoLocation? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var type: kotlin.String? = null, + private var regionId: kotlin.String? = null, + private var shortName: kotlin.String? = null, + private var airportCode: kotlin.String? = null, + private var address: kotlin.String? = null, + private var country: Country? = null, + private var geoLocation: GeoLocation? = null, + ) { + fun type(type: kotlin.String?) = apply { this.type = type } + fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } + fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } + fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } - } + fun address(address: kotlin.String?) = apply { this.address = address } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun country(country: Country?) = apply { this.country = country } - class Builder( - private var type: kotlin.String? = null, - private var regionId: kotlin.String? = null, - private var shortName: kotlin.String? = null, - private var airportCode: kotlin.String? = null, - private var address: kotlin.String? = null, - private var country: Country? = null, - private var geoLocation: GeoLocation? = null - ) { - fun type(type: kotlin.String?) = apply { this.type = type } - fun regionId(regionId: kotlin.String?) = apply { this.regionId = regionId } - fun shortName(shortName: kotlin.String?) = apply { this.shortName = shortName } - fun airportCode(airportCode: kotlin.String?) = apply { this.airportCode = airportCode } - fun address(address: kotlin.String?) = apply { this.address = address } - fun country(country: Country?) = apply { this.country = country } - fun geoLocation(geoLocation: GeoLocation?) = apply { this.geoLocation = geoLocation } + fun geoLocation(geoLocation: GeoLocation?) = apply { this.geoLocation = geoLocation } - fun build(): LocationOption { - val instance = LocationOption( - type = type, - regionId = regionId, - shortName = shortName, - airportCode = airportCode, - address = address, - country = country, - geoLocation = geoLocation - ) + fun build(): LocationOption { + val instance = + LocationOption( + type = type, + regionId = regionId, + shortName = shortName, + airportCode = airportCode, + address = address, + country = country, + geoLocation = geoLocation, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type, regionId = regionId, shortName = shortName, airportCode = airportCode, address = address, country = country, - geoLocation = geoLocation - ) + geoLocation = geoLocation, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt index dc26cc9a5..6f896ce0b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingAmenity.kt @@ -15,66 +15,49 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param id - * @param name +* + * @param id + * @param name */ data class LodgingAmenity( - @JsonProperty("Id") -val id: kotlin.String? = null, - - @JsonProperty("Name") -val name: kotlin.String? = null + @JsonProperty("Id") + val id: kotlin.String? = null, + @JsonProperty("Name") + val name: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - fun name(name: kotlin.String?) = apply { this.name = name } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + ) { + fun id(id: kotlin.String?) = apply { this.id = id } - fun build(): LodgingAmenity { - val instance = LodgingAmenity( - id = id, - name = name - ) + fun name(name: kotlin.String?) = apply { this.name = name } - return instance - } + fun build(): LodgingAmenity { + val instance = + LodgingAmenity( + id = id, + name = name, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id, - name = name - ) + name = name, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt index c181ab8bc..fb124cd4a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPenaltyRule.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for cancellation penalty details. - * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. - * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. - * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. + * @param penaltyPercentOfStay Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. + * @param penaltyStartDateTime The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. + * @param penaltyEndDateTime The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. */ data class LodgingCancellationPenaltyRule( - /* Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. */ -@JsonProperty("PenaltyPercentOfStay") -val penaltyPercentOfStay: kotlin.String? = null, - - /* The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. */ -@JsonProperty("PenaltyStartDateTime") -val penaltyStartDateTime: java.time.OffsetDateTime? = null, - - /* The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. */ -@JsonProperty("PenaltyEndDateTime") -val penaltyEndDateTime: java.time.OffsetDateTime? = null + // Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other penalties listed. + @JsonProperty("PenaltyPercentOfStay") + val penaltyPercentOfStay: kotlin.String? = null, + // The beginning of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. + @JsonProperty("PenaltyStartDateTime") + val penaltyStartDateTime: java.time.OffsetDateTime? = null, + // The end of the window of time when the `CancellationPenaltyRule` is in effect. The date and time are expressed in ISO 8601 International Date format, and local to the property. + @JsonProperty("PenaltyEndDateTime") + val penaltyEndDateTime: java.time.OffsetDateTime? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var penaltyPercentOfStay: kotlin.String? = null, - private var penaltyStartDateTime: java.time.OffsetDateTime? = null, - private var penaltyEndDateTime: java.time.OffsetDateTime? = null - ) { - fun penaltyPercentOfStay(penaltyPercentOfStay: kotlin.String?) = apply { this.penaltyPercentOfStay = penaltyPercentOfStay } - fun penaltyStartDateTime(penaltyStartDateTime: java.time.OffsetDateTime?) = apply { this.penaltyStartDateTime = penaltyStartDateTime } - fun penaltyEndDateTime(penaltyEndDateTime: java.time.OffsetDateTime?) = apply { this.penaltyEndDateTime = penaltyEndDateTime } + class Builder( + private var penaltyPercentOfStay: kotlin.String? = null, + private var penaltyStartDateTime: java.time.OffsetDateTime? = null, + private var penaltyEndDateTime: java.time.OffsetDateTime? = null, + ) { + fun penaltyPercentOfStay(penaltyPercentOfStay: kotlin.String?) = apply { this.penaltyPercentOfStay = penaltyPercentOfStay } - fun build(): LodgingCancellationPenaltyRule { - val instance = LodgingCancellationPenaltyRule( - penaltyPercentOfStay = penaltyPercentOfStay, - penaltyStartDateTime = penaltyStartDateTime, - penaltyEndDateTime = penaltyEndDateTime - ) + fun penaltyStartDateTime(penaltyStartDateTime: java.time.OffsetDateTime?) = apply { this.penaltyStartDateTime = penaltyStartDateTime } - return instance - } + fun penaltyEndDateTime(penaltyEndDateTime: java.time.OffsetDateTime?) = apply { this.penaltyEndDateTime = penaltyEndDateTime } + + fun build(): LodgingCancellationPenaltyRule { + val instance = + LodgingCancellationPenaltyRule( + penaltyPercentOfStay = penaltyPercentOfStay, + penaltyStartDateTime = penaltyStartDateTime, + penaltyEndDateTime = penaltyEndDateTime, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( penaltyPercentOfStay = penaltyPercentOfStay, penaltyStartDateTime = penaltyStartDateTime, - penaltyEndDateTime = penaltyEndDateTime - ) + penaltyEndDateTime = penaltyEndDateTime, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt index ff1769b3b..d044642a5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingCancellationPolicy.kt @@ -16,100 +16,69 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LodgingCancellationPenaltyRule - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for Cancellation Policy information. - * @param refundable Indicate whether the rate is refundable or not. - * @param freeCancellation Indicate whether the room can be cancelled free of charge. - * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. - * @param cancellationPenaltyRules Container for Cancellation Penalty Rules information. + * @param refundable Indicate whether the rate is refundable or not. + * @param freeCancellation Indicate whether the room can be cancelled free of charge. + * @param freeCancellationEndDateTime The date and time until which the room can be cancelled free of charge. + * @param cancellationPenaltyRules Container for Cancellation Penalty Rules information. */ data class LodgingCancellationPolicy( - /* Indicate whether the rate is refundable or not. */ -@JsonProperty("Refundable") -val refundable: kotlin.Boolean? = null, - - /* Indicate whether the room can be cancelled free of charge. */ -@JsonProperty("FreeCancellation") -val freeCancellation: kotlin.Boolean? = null, - - /* The date and time until which the room can be cancelled free of charge. */ -@JsonProperty("FreeCancellationEndDateTime") -val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, - - /* Container for Cancellation Penalty Rules information. */ -@JsonProperty("CancellationPenaltyRules") -val cancellationPenaltyRules: kotlin.collections.List? = null + // Indicate whether the rate is refundable or not. + @JsonProperty("Refundable") + val refundable: kotlin.Boolean? = null, + // Indicate whether the room can be cancelled free of charge. + @JsonProperty("FreeCancellation") + val freeCancellation: kotlin.Boolean? = null, + // The date and time until which the room can be cancelled free of charge. + @JsonProperty("FreeCancellationEndDateTime") + val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + // Container for Cancellation Penalty Rules information. + @JsonProperty("CancellationPenaltyRules") + val cancellationPenaltyRules: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var refundable: kotlin.Boolean? = null, - private var freeCancellation: kotlin.Boolean? = null, - private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, - private var cancellationPenaltyRules: kotlin.collections.List? = null - ) { - fun refundable(refundable: kotlin.Boolean?) = apply { this.refundable = refundable } - fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } - fun cancellationPenaltyRules(cancellationPenaltyRules: kotlin.collections.List?) = apply { this.cancellationPenaltyRules = cancellationPenaltyRules } + class Builder( + private var refundable: kotlin.Boolean? = null, + private var freeCancellation: kotlin.Boolean? = null, + private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + private var cancellationPenaltyRules: kotlin.collections.List? = null, + ) { + fun refundable(refundable: kotlin.Boolean?) = apply { this.refundable = refundable } - fun build(): LodgingCancellationPolicy { - val instance = LodgingCancellationPolicy( - refundable = refundable, - freeCancellation = freeCancellation, - freeCancellationEndDateTime = freeCancellationEndDateTime, - cancellationPenaltyRules = cancellationPenaltyRules - ) + fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - return instance - } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + + fun cancellationPenaltyRules(cancellationPenaltyRules: kotlin.collections.List?) = apply { this.cancellationPenaltyRules = cancellationPenaltyRules } + + fun build(): LodgingCancellationPolicy { + val instance = + LodgingCancellationPolicy( + refundable = refundable, + freeCancellation = freeCancellation, + freeCancellationEndDateTime = freeCancellationEndDateTime, + cancellationPenaltyRules = cancellationPenaltyRules, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( refundable = refundable, freeCancellation = freeCancellation, freeCancellationEndDateTime = freeCancellationEndDateTime, - cancellationPenaltyRules = cancellationPenaltyRules - ) + cancellationPenaltyRules = cancellationPenaltyRules, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt index 6596a462d..4e504f76f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingError.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for error list. - * @param code Error code describing the issue - * @param description A simple description of what the error is. + * @param code Error code describing the issue + * @param description A simple description of what the error is. */ data class LodgingError( - /* Error code describing the issue */ -@JsonProperty("Code") -val code: kotlin.String? = null, - - /* A simple description of what the error is. */ -@JsonProperty("Description") -val description: kotlin.String? = null + // Error code describing the issue + @JsonProperty("Code") + val code: kotlin.String? = null, + // A simple description of what the error is. + @JsonProperty("Description") + val description: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - fun description(description: kotlin.String?) = apply { this.description = description } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + ) { + fun code(code: kotlin.String?) = apply { this.code = code } - fun build(): LodgingError { - val instance = LodgingError( - code = code, - description = description - ) + fun description(description: kotlin.String?) = apply { this.description = description } - return instance - } + fun build(): LodgingError { + val instance = + LodgingError( + code = code, + description = description, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code, - description = description - ) + description = description, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt index 38eaa2b94..01831a0a2 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingErrors.kt @@ -16,68 +16,51 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LodgingError - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param errors Container for error list. - * @param transactionId A unique identifier for the transaction. +* + * @param errors Container for error list. + * @param transactionId A unique identifier for the transaction. */ data class LodgingErrors( - /* Container for error list. */ -@JsonProperty("Errors") -val errors: kotlin.collections.List? = null, - - /* A unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: kotlin.String? = null + // Container for error list. + @JsonProperty("Errors") + val errors: kotlin.collections.List? = null, + // A unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var errors: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null - ) { - fun errors(errors: kotlin.collections.List?) = apply { this.errors = errors } - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + class Builder( + private var errors: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + ) { + fun errors(errors: kotlin.collections.List?) = apply { this.errors = errors } - fun build(): LodgingErrors { - val instance = LodgingErrors( - errors = errors, - transactionId = transactionId - ) + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - return instance - } + fun build(): LodgingErrors { + val instance = + LodgingErrors( + errors = errors, + transactionId = transactionId, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( errors = errors, - transactionId = transactionId - ) + transactionId = transactionId, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt index 5fdbdab1c..dd905910f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingLink.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class LodgingLink( - /* The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* Method of request. */ -@JsonProperty("Method") -val method: kotlin.String? = null, - - /* The URL of the destination web page or API query. */ -@JsonProperty("Href") -val href: kotlin.String? = null + // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // Method of request. + @JsonProperty("Method") + val method: kotlin.String? = null, + // The URL of the destination web page or API query. + @JsonProperty("Href") + val href: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } - fun href(href: kotlin.String?) = apply { this.href = href } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun build(): LodgingLink { - val instance = LodgingLink( - accept = accept, - method = method, - href = href - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): LodgingLink { + val instance = + LodgingLink( + accept = accept, + method = method, + href = href, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( accept = accept, method = method, - href = href - ) + href = href, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt index 339ee671a..bd7b009d9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingMoney.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Pricing information of the stat date - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. */ data class LodgingMoney( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): LodgingMoney { - val instance = LodgingMoney( - `value` = `value`, - currency = currency - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun build(): LodgingMoney { + val instance = + LodgingMoney( + `value` = `value`, + currency = currency, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, - currency = currency - ) + currency = currency, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt index 7fb2b7b17..7d2c2df73 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingOccupant.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param adults The number of adults in a room. - * @param childAges The ages of children in a room. +* + * @param adults The number of adults in a room. + * @param childAges The ages of children in a room. */ data class LodgingOccupant( - /* The number of adults in a room. */ -@JsonProperty("Adults") -val adults: kotlin.Int? = null, - - /* The ages of children in a room. */ -@JsonProperty("ChildAges") -val childAges: kotlin.collections.List? = null + // The number of adults in a room. + @JsonProperty("Adults") + val adults: kotlin.Int? = null, + // The ages of children in a room. + @JsonProperty("ChildAges") + val childAges: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var adults: kotlin.Int? = null, - private var childAges: kotlin.collections.List? = null - ) { - fun adults(adults: kotlin.Int?) = apply { this.adults = adults } - fun childAges(childAges: kotlin.collections.List?) = apply { this.childAges = childAges } + class Builder( + private var adults: kotlin.Int? = null, + private var childAges: kotlin.collections.List? = null, + ) { + fun adults(adults: kotlin.Int?) = apply { this.adults = adults } - fun build(): LodgingOccupant { - val instance = LodgingOccupant( - adults = adults, - childAges = childAges - ) + fun childAges(childAges: kotlin.collections.List?) = apply { this.childAges = childAges } - return instance - } + fun build(): LodgingOccupant { + val instance = + LodgingOccupant( + adults = adults, + childAges = childAges, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( adults = adults, - childAges = childAges - ) + childAges = childAges, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt index a3a886fb9..f865e660b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingPromotion.kt @@ -16,67 +16,50 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LodgingMoney - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param description The description of the promotion. - * @param amount +* + * @param description The description of the promotion. + * @param amount */ data class LodgingPromotion( - /* The description of the promotion. */ -@JsonProperty("Description") -val description: kotlin.String? = null, - - @JsonProperty("Amount") -val amount: LodgingMoney? = null + // The description of the promotion. + @JsonProperty("Description") + val description: kotlin.String? = null, + @JsonProperty("Amount") + val amount: LodgingMoney? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var description: kotlin.String? = null, - private var amount: LodgingMoney? = null - ) { - fun description(description: kotlin.String?) = apply { this.description = description } - fun amount(amount: LodgingMoney?) = apply { this.amount = amount } + class Builder( + private var description: kotlin.String? = null, + private var amount: LodgingMoney? = null, + ) { + fun description(description: kotlin.String?) = apply { this.description = description } - fun build(): LodgingPromotion { - val instance = LodgingPromotion( - description = description, - amount = amount - ) + fun amount(amount: LodgingMoney?) = apply { this.amount = amount } - return instance - } + fun build(): LodgingPromotion { + val instance = + LodgingPromotion( + description = description, + amount = amount, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( description = description, - amount = amount - ) + amount = amount, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt index dcd3c27fc..d5b900015 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingQuotesResponse.kt @@ -19,156 +19,97 @@ import com.expediagroup.sdk.xap.models.LodgingOccupant import com.expediagroup.sdk.xap.models.LodgingStayDates import com.expediagroup.sdk.xap.models.LodgingWarning import com.expediagroup.sdk.xap.models.Property - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param count The number of properties actually returned in the response. - * @param totalPropertyCount The number of properties requested. - * @param transactionId Unique identifier for the API transaction. - * @param stayDates - * @param lengthOfStay The number of stay nights. - * @param occupants Container for the list of room occupants. - * @param properties Container for all properties. +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param count The number of properties actually returned in the response. + * @param totalPropertyCount The number of properties requested. + * @param transactionId Unique identifier for the API transaction. + * @param stayDates + * @param lengthOfStay The number of stay nights. + * @param occupants Container for the list of room occupants. + * @param properties Container for all properties. */ data class LodgingQuotesResponse( - /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - /* The number of properties actually returned in the response. */ -@JsonProperty("Count") -val count: kotlin.Int? = null, - - /* The number of properties requested. */ -@JsonProperty("TotalPropertyCount") -val totalPropertyCount: kotlin.Int? = null, - - /* Unique identifier for the API transaction. */ -@JsonProperty("TransactionId") -val transactionId: kotlin.String? = null, - - @JsonProperty("StayDates") -val stayDates: LodgingStayDates? = null, - - /* The number of stay nights. */ -@JsonProperty("LengthOfStay") -val lengthOfStay: kotlin.Int? = null, - - /* Container for the list of room occupants. */ -@JsonProperty("Occupants") -val occupants: kotlin.collections.List? = null, - - /* Container for all properties. */ -@JsonProperty("Properties") -val properties: kotlin.collections.List? = null + // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + // The number of properties actually returned in the response. + @JsonProperty("Count") + val count: kotlin.Int? = null, + // The number of properties requested. + @JsonProperty("TotalPropertyCount") + val totalPropertyCount: kotlin.Int? = null, + // Unique identifier for the API transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String? = null, + @JsonProperty("StayDates") + val stayDates: LodgingStayDates? = null, + // The number of stay nights. + @JsonProperty("LengthOfStay") + val lengthOfStay: kotlin.Int? = null, + // Container for the list of room occupants. + @JsonProperty("Occupants") + val occupants: kotlin.collections.List? = null, + // Container for all properties. + @JsonProperty("Properties") + val properties: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var count: kotlin.Int? = null, + private var totalPropertyCount: kotlin.Int? = null, + private var transactionId: kotlin.String? = null, + private var stayDates: LodgingStayDates? = null, + private var lengthOfStay: kotlin.Int? = null, + private var occupants: kotlin.collections.List? = null, + private var properties: kotlin.collections.List? = null, + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } + fun count(count: kotlin.Int?) = apply { this.count = count } + fun totalPropertyCount(totalPropertyCount: kotlin.Int?) = apply { this.totalPropertyCount = totalPropertyCount } + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun stayDates(stayDates: LodgingStayDates?) = apply { this.stayDates = stayDates } - } + fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var count: kotlin.Int? = null, - private var totalPropertyCount: kotlin.Int? = null, - private var transactionId: kotlin.String? = null, - private var stayDates: LodgingStayDates? = null, - private var lengthOfStay: kotlin.Int? = null, - private var occupants: kotlin.collections.List? = null, - private var properties: kotlin.collections.List? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun count(count: kotlin.Int?) = apply { this.count = count } - fun totalPropertyCount(totalPropertyCount: kotlin.Int?) = apply { this.totalPropertyCount = totalPropertyCount } - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - fun stayDates(stayDates: LodgingStayDates?) = apply { this.stayDates = stayDates } - fun lengthOfStay(lengthOfStay: kotlin.Int?) = apply { this.lengthOfStay = lengthOfStay } - fun occupants(occupants: kotlin.collections.List?) = apply { this.occupants = occupants } - fun properties(properties: kotlin.collections.List?) = apply { this.properties = properties } + fun properties(properties: kotlin.collections.List?) = apply { this.properties = properties } - fun build(): LodgingQuotesResponse { - val instance = LodgingQuotesResponse( - warnings = warnings, - count = count, - totalPropertyCount = totalPropertyCount, - transactionId = transactionId, - stayDates = stayDates, - lengthOfStay = lengthOfStay, - occupants = occupants, - properties = properties - ) + fun build(): LodgingQuotesResponse { + val instance = + LodgingQuotesResponse( + warnings = warnings, + count = count, + totalPropertyCount = totalPropertyCount, + transactionId = transactionId, + stayDates = stayDates, + lengthOfStay = lengthOfStay, + occupants = occupants, + properties = properties, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( warnings = warnings, count = count, totalPropertyCount = totalPropertyCount, @@ -176,6 +117,6 @@ val properties: kotlin.collections.List? = null stayDates = stayDates, lengthOfStay = lengthOfStay, occupants = occupants, - properties = properties - ) + properties = properties, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt index 6d0bd8272..5dd8312d0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRatePlan.kt @@ -17,67 +17,50 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LodgingCancellationPolicy import com.expediagroup.sdk.xap.models.LodgingPromotion - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for rate plan information. - * @param cancellationPolicy - * @param promotions All promotion information of the ratePlan. + * @param cancellationPolicy + * @param promotions All promotion information of the ratePlan. */ data class LodgingRatePlan( - @JsonProperty("CancellationPolicy") -val cancellationPolicy: LodgingCancellationPolicy? = null, - - /* All promotion information of the ratePlan. */ -@JsonProperty("Promotions") -val promotions: kotlin.collections.List? = null + @JsonProperty("CancellationPolicy") + val cancellationPolicy: LodgingCancellationPolicy? = null, + // All promotion information of the ratePlan. + @JsonProperty("Promotions") + val promotions: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var cancellationPolicy: LodgingCancellationPolicy? = null, - private var promotions: kotlin.collections.List? = null - ) { - fun cancellationPolicy(cancellationPolicy: LodgingCancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } - fun promotions(promotions: kotlin.collections.List?) = apply { this.promotions = promotions } + class Builder( + private var cancellationPolicy: LodgingCancellationPolicy? = null, + private var promotions: kotlin.collections.List? = null, + ) { + fun cancellationPolicy(cancellationPolicy: LodgingCancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } - fun build(): LodgingRatePlan { - val instance = LodgingRatePlan( - cancellationPolicy = cancellationPolicy, - promotions = promotions - ) + fun promotions(promotions: kotlin.collections.List?) = apply { this.promotions = promotions } - return instance - } + fun build(): LodgingRatePlan { + val instance = + LodgingRatePlan( + cancellationPolicy = cancellationPolicy, + promotions = promotions, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( cancellationPolicy = cancellationPolicy, - promotions = promotions - ) + promotions = promotions, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt index 98dbe5869..5dbbebbc0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomType.kt @@ -18,82 +18,58 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LodgingRatePlan import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinks import com.expediagroup.sdk.xap.models.LodgingRoomTypePrice - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param ratePlans Container for rate plan information. - * @param price - * @param links +* + * @param ratePlans Container for rate plan information. + * @param price + * @param links */ data class LodgingRoomType( - /* Container for rate plan information. */ -@JsonProperty("RatePlans") -val ratePlans: kotlin.collections.List? = null, - - @JsonProperty("Price") -val price: LodgingRoomTypePrice? = null, - - @JsonProperty("Links") -val links: LodgingRoomTypeLinks? = null + // Container for rate plan information. + @JsonProperty("RatePlans") + val ratePlans: kotlin.collections.List? = null, + @JsonProperty("Price") + val price: LodgingRoomTypePrice? = null, + @JsonProperty("Links") + val links: LodgingRoomTypeLinks? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ratePlans: kotlin.collections.List? = null, - private var price: LodgingRoomTypePrice? = null, - private var links: LodgingRoomTypeLinks? = null - ) { - fun ratePlans(ratePlans: kotlin.collections.List?) = apply { this.ratePlans = ratePlans } - fun price(price: LodgingRoomTypePrice?) = apply { this.price = price } - fun links(links: LodgingRoomTypeLinks?) = apply { this.links = links } + class Builder( + private var ratePlans: kotlin.collections.List? = null, + private var price: LodgingRoomTypePrice? = null, + private var links: LodgingRoomTypeLinks? = null, + ) { + fun ratePlans(ratePlans: kotlin.collections.List?) = apply { this.ratePlans = ratePlans } - fun build(): LodgingRoomType { - val instance = LodgingRoomType( - ratePlans = ratePlans, - price = price, - links = links - ) + fun price(price: LodgingRoomTypePrice?) = apply { this.price = price } - return instance - } + fun links(links: LodgingRoomTypeLinks?) = apply { this.links = links } + + fun build(): LodgingRoomType { + val instance = + LodgingRoomType( + ratePlans = ratePlans, + price = price, + links = links, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( ratePlans = ratePlans, price = price, - links = links - ) + links = links, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt index 9ef79374c..78f017bd3 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinks.kt @@ -18,66 +18,49 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LodgingLink import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinksWebDetails import com.expediagroup.sdk.xap.models.LodgingRoomTypeLinksWebSearchResult - import com.fasterxml.jackson.annotation.JsonProperty /** -* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the links parameter in the Search API query. Available links are: - WebDetails (link to web infosite) - WebSearchResult (link to web search result page) - * @param webSearchResult - * @param webDetails +* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the links parameter in the Search API query. Available links are: - WebDetails (link to web infosite) - WebSearchResult (link to web search result page) + * @param webSearchResult + * @param webDetails */ data class LodgingRoomTypeLinks( - @JsonProperty("WebSearchResult") -val webSearchResult: LodgingRoomTypeLinksWebSearchResult? = null, - - @JsonProperty("WebDetails") -val webDetails: LodgingRoomTypeLinksWebDetails? = null + @JsonProperty("WebSearchResult") + val webSearchResult: LodgingRoomTypeLinksWebSearchResult? = null, + @JsonProperty("WebDetails") + val webDetails: LodgingRoomTypeLinksWebDetails? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var webSearchResult: LodgingRoomTypeLinksWebSearchResult? = null, - private var webDetails: LodgingRoomTypeLinksWebDetails? = null - ) { - fun webSearchResult(webSearchResult: LodgingRoomTypeLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - fun webDetails(webDetails: LodgingRoomTypeLinksWebDetails?) = apply { this.webDetails = webDetails } + class Builder( + private var webSearchResult: LodgingRoomTypeLinksWebSearchResult? = null, + private var webDetails: LodgingRoomTypeLinksWebDetails? = null, + ) { + fun webSearchResult(webSearchResult: LodgingRoomTypeLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - fun build(): LodgingRoomTypeLinks { - val instance = LodgingRoomTypeLinks( - webSearchResult = webSearchResult, - webDetails = webDetails - ) + fun webDetails(webDetails: LodgingRoomTypeLinksWebDetails?) = apply { this.webDetails = webDetails } - return instance - } + fun build(): LodgingRoomTypeLinks { + val instance = + LodgingRoomTypeLinks( + webSearchResult = webSearchResult, + webDetails = webDetails, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( webSearchResult = webSearchResult, - webDetails = webDetails - ) + webDetails = webDetails, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt index bd95570c7..8794eda6a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebDetails.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class LodgingRoomTypeLinksWebDetails( - /* The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* Method of request. */ -@JsonProperty("Method") -val method: kotlin.String? = null, - - /* The URL of the destination web page or API query. */ -@JsonProperty("Href") -val href: kotlin.String? = null + // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // Method of request. + @JsonProperty("Method") + val method: kotlin.String? = null, + // The URL of the destination web page or API query. + @JsonProperty("Href") + val href: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } - fun href(href: kotlin.String?) = apply { this.href = href } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun build(): LodgingRoomTypeLinksWebDetails { - val instance = LodgingRoomTypeLinksWebDetails( - accept = accept, - method = method, - href = href - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): LodgingRoomTypeLinksWebDetails { + val instance = + LodgingRoomTypeLinksWebDetails( + accept = accept, + method = method, + href = href, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( accept = accept, method = method, - href = href - ) + href = href, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt index 1682db66c..1cbb75cd4 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypeLinksWebSearchResult.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class LodgingRoomTypeLinksWebSearchResult( - /* The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* Method of request. */ -@JsonProperty("Method") -val method: kotlin.String? = null, - - /* The URL of the destination web page or API query. */ -@JsonProperty("Href") -val href: kotlin.String? = null + // The Accept request header for API queries only. Note: this value will only be returned if the link is an API query, as website URLs do not require an `Accept` header. + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // Method of request. + @JsonProperty("Method") + val method: kotlin.String? = null, + // The URL of the destination web page or API query. + @JsonProperty("Href") + val href: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } - fun href(href: kotlin.String?) = apply { this.href = href } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun build(): LodgingRoomTypeLinksWebSearchResult { - val instance = LodgingRoomTypeLinksWebSearchResult( - accept = accept, - method = method, - href = href - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): LodgingRoomTypeLinksWebSearchResult { + val instance = + LodgingRoomTypeLinksWebSearchResult( + accept = accept, + method = method, + href = href, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( accept = accept, method = method, - href = href - ) + href = href, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt index 5bd925732..8fe3f8eaa 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingRoomTypePrice.kt @@ -16,157 +16,98 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LodgingMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for Price information. - * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. - * @param taxesAndFees The total amount of taxes and fees of the rate plan for all occupants. - * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. - * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - * @param propertyMandatoryFees The total mandatory fees which will be charged at the property for the rate plan. - * @param totalPriceWithPropertyFees The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. - * @param refundableDamageDeposit The refundable damage deposit. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total amount of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. + * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + * @param propertyMandatoryFees The total mandatory fees which will be charged at the property for the rate plan. + * @param totalPriceWithPropertyFees The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + * @param refundableDamageDeposit The refundable damage deposit. */ data class LodgingRoomTypePrice( - /* The price of the rate plan for all occupants, excluding taxes and fees. */ -@JsonProperty("BaseRate") -val baseRate: LodgingMoney? = null, - - /* The total amount of taxes and fees of the rate plan for all occupants. */ -@JsonProperty("TaxesAndFees") -val taxesAndFees: LodgingMoney? = null, - - /* The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. */ -@JsonProperty("TotalPrice") -val totalPrice: LodgingMoney? = null, - - /* The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyRate") -val avgNightlyRate: LodgingMoney? = null, - - /* The average nightly rate per night per room of the room type, including all fees except those imposed by the government. */ -@JsonProperty("AvgNightlyRateWithFees") -val avgNightlyRateWithFees: LodgingMoney? = null, - - /* The total mandatory fees which will be charged at the property for the rate plan. */ -@JsonProperty("PropertyMandatoryFees") -val propertyMandatoryFees: LodgingMoney? = null, - - /* The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. */ -@JsonProperty("TotalPriceWithPropertyFees") -val totalPriceWithPropertyFees: LodgingMoney? = null, - - /* The refundable damage deposit. */ -@JsonProperty("RefundableDamageDeposit") -val refundableDamageDeposit: LodgingMoney? = null + // The price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + val baseRate: LodgingMoney? = null, + // The total amount of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + val taxesAndFees: LodgingMoney? = null, + // The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Property mandatory fees are not included in this value as these are paid at the property at checkout. + @JsonProperty("TotalPrice") + val totalPrice: LodgingMoney? = null, + // The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + val avgNightlyRate: LodgingMoney? = null, + // The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + @JsonProperty("AvgNightlyRateWithFees") + val avgNightlyRateWithFees: LodgingMoney? = null, + // The total mandatory fees which will be charged at the property for the rate plan. + @JsonProperty("PropertyMandatoryFees") + val propertyMandatoryFees: LodgingMoney? = null, + // The total price of the rate plan include property mandatory fees, which is equal to the sum of `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + @JsonProperty("TotalPriceWithPropertyFees") + val totalPriceWithPropertyFees: LodgingMoney? = null, + // The refundable damage deposit. + @JsonProperty("RefundableDamageDeposit") + val refundableDamageDeposit: LodgingMoney? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var baseRate: LodgingMoney? = null, + private var taxesAndFees: LodgingMoney? = null, + private var totalPrice: LodgingMoney? = null, + private var avgNightlyRate: LodgingMoney? = null, + private var avgNightlyRateWithFees: LodgingMoney? = null, + private var propertyMandatoryFees: LodgingMoney? = null, + private var totalPriceWithPropertyFees: LodgingMoney? = null, + private var refundableDamageDeposit: LodgingMoney? = null, + ) { + fun baseRate(baseRate: LodgingMoney?) = apply { this.baseRate = baseRate } + fun taxesAndFees(taxesAndFees: LodgingMoney?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPrice(totalPrice: LodgingMoney?) = apply { this.totalPrice = totalPrice } + fun avgNightlyRate(avgNightlyRate: LodgingMoney?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyRateWithFees(avgNightlyRateWithFees: LodgingMoney?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } - } + fun propertyMandatoryFees(propertyMandatoryFees: LodgingMoney?) = apply { this.propertyMandatoryFees = propertyMandatoryFees } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun totalPriceWithPropertyFees(totalPriceWithPropertyFees: LodgingMoney?) = apply { this.totalPriceWithPropertyFees = totalPriceWithPropertyFees } - class Builder( - private var baseRate: LodgingMoney? = null, - private var taxesAndFees: LodgingMoney? = null, - private var totalPrice: LodgingMoney? = null, - private var avgNightlyRate: LodgingMoney? = null, - private var avgNightlyRateWithFees: LodgingMoney? = null, - private var propertyMandatoryFees: LodgingMoney? = null, - private var totalPriceWithPropertyFees: LodgingMoney? = null, - private var refundableDamageDeposit: LodgingMoney? = null - ) { - fun baseRate(baseRate: LodgingMoney?) = apply { this.baseRate = baseRate } - fun taxesAndFees(taxesAndFees: LodgingMoney?) = apply { this.taxesAndFees = taxesAndFees } - fun totalPrice(totalPrice: LodgingMoney?) = apply { this.totalPrice = totalPrice } - fun avgNightlyRate(avgNightlyRate: LodgingMoney?) = apply { this.avgNightlyRate = avgNightlyRate } - fun avgNightlyRateWithFees(avgNightlyRateWithFees: LodgingMoney?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } - fun propertyMandatoryFees(propertyMandatoryFees: LodgingMoney?) = apply { this.propertyMandatoryFees = propertyMandatoryFees } - fun totalPriceWithPropertyFees(totalPriceWithPropertyFees: LodgingMoney?) = apply { this.totalPriceWithPropertyFees = totalPriceWithPropertyFees } - fun refundableDamageDeposit(refundableDamageDeposit: LodgingMoney?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } + fun refundableDamageDeposit(refundableDamageDeposit: LodgingMoney?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - fun build(): LodgingRoomTypePrice { - val instance = LodgingRoomTypePrice( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyRateWithFees = avgNightlyRateWithFees, - propertyMandatoryFees = propertyMandatoryFees, - totalPriceWithPropertyFees = totalPriceWithPropertyFees, - refundableDamageDeposit = refundableDamageDeposit - ) + fun build(): LodgingRoomTypePrice { + val instance = + LodgingRoomTypePrice( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyRateWithFees = avgNightlyRateWithFees, + propertyMandatoryFees = propertyMandatoryFees, + totalPriceWithPropertyFees = totalPriceWithPropertyFees, + refundableDamageDeposit = refundableDamageDeposit, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( baseRate = baseRate, taxesAndFees = taxesAndFees, totalPrice = totalPrice, @@ -174,6 +115,6 @@ val refundableDamageDeposit: LodgingMoney? = null avgNightlyRateWithFees = avgNightlyRateWithFees, propertyMandatoryFees = propertyMandatoryFees, totalPriceWithPropertyFees = totalPriceWithPropertyFees, - refundableDamageDeposit = refundableDamageDeposit - ) + refundableDamageDeposit = refundableDamageDeposit, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt index a7b1df104..2546348cc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingStayDates.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* Container for requested dates of stay. - * @param checkInDate The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. - * @param checkOutDate The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. +* Container for requested dates of stay. + * @param checkInDate The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. + * @param checkOutDate The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. */ data class LodgingStayDates( - /* The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. */ -@JsonProperty("CheckInDate") -val checkInDate: java.time.LocalDate? = null, - - /* The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. */ -@JsonProperty("CheckOutDate") -val checkOutDate: java.time.LocalDate? = null + // The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. + @JsonProperty("CheckInDate") + val checkInDate: java.time.LocalDate? = null, + // The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. + @JsonProperty("CheckOutDate") + val checkOutDate: java.time.LocalDate? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInDate: java.time.LocalDate? = null, - private var checkOutDate: java.time.LocalDate? = null - ) { - fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } + class Builder( + private var checkInDate: java.time.LocalDate? = null, + private var checkOutDate: java.time.LocalDate? = null, + ) { + fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - fun build(): LodgingStayDates { - val instance = LodgingStayDates( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) + fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } - return instance - } + fun build(): LodgingStayDates { + val instance = + LodgingStayDates( + checkInDate = checkInDate, + checkOutDate = checkOutDate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( checkInDate = checkInDate, - checkOutDate = checkOutDate - ) + checkOutDate = checkOutDate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt index 789621756..439606e28 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/LodgingWarning.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param code The code of a warning. - * @param description A description of what caused the issues. +* + * @param code The code of a warning. + * @param description A description of what caused the issues. */ data class LodgingWarning( - /* The code of a warning. */ -@JsonProperty("Code") -val code: kotlin.String? = null, - - /* A description of what caused the issues. */ -@JsonProperty("Description") -val description: kotlin.String? = null + // The code of a warning. + @JsonProperty("Code") + val code: kotlin.String? = null, + // A description of what caused the issues. + @JsonProperty("Description") + val description: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - fun description(description: kotlin.String?) = apply { this.description = description } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + ) { + fun code(code: kotlin.String?) = apply { this.code = code } - fun build(): LodgingWarning { - val instance = LodgingWarning( - code = code, - description = description - ) + fun description(description: kotlin.String?) = apply { this.description = description } - return instance - } + fun build(): LodgingWarning { + val instance = + LodgingWarning( + code = code, + description = description, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code, - description = description - ) + description = description, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt index a6b2ca87a..272200072 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetail.kt @@ -16,169 +16,154 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.MandatoryFeesDetailAmount - import com.fasterxml.jackson.annotation.JsonProperty /** * The breakdown for the taxes and fees that must be paid at the property. - * @param type Type of mandatory fee. - * @param amount + * @param type Type of mandatory fee. + * @param amount */ data class MandatoryFeesDetail( - /* Type of mandatory fee. */ -@JsonProperty("Type") -val type: MandatoryFeesDetail.Type? = null, - - @JsonProperty("Amount") -val amount: MandatoryFeesDetailAmount? = null + // Type of mandatory fee. + @JsonProperty("Type") + val type: MandatoryFeesDetail.Type? = null, + @JsonProperty("Amount") + val amount: MandatoryFeesDetailAmount? = null, ) { - + init { + } + companion object { + @JvmStatic + fun builder() = Builder() + } - init { - + class Builder( + private var type: MandatoryFeesDetail.Type? = null, + private var amount: MandatoryFeesDetailAmount? = null, + ) { + fun type(type: MandatoryFeesDetail.Type?) = apply { this.type = type } + fun amount(amount: MandatoryFeesDetailAmount?) = apply { this.amount = amount } + fun build(): MandatoryFeesDetail { + val instance = + MandatoryFeesDetail( + type = type, + amount = amount, + ) + return instance + } + } + fun toBuilder() = + Builder( + type = type, + amount = amount, + ) + /** + * Type of mandatory fee. + * Values: CITY_LOCAL_TAX_AMT,CITY_LOCAL_TAX_PCNT,CLEANING_FEE_AMT,CLEANING_FEE_PCNT,CLUB_CARD_ADULT,CLUB_CARD_CHILD,DESTINATION_FEE_AMT,DESTINATION_FEE_PCNT,GALA_DINNER_ADULT,GALA_DINNER_CHILD,GALA_DINNER_CHINESE_NY_ADULT,GALA_DINNER_CHINESE_NY_CHILD,GALA_DINNER_NY_DAY_ADULT,GALA_DINNER_NY_DAY_CHILD,GALA_DINNER_NY_EVE_ADULT,GALA_DINNER_NY_EVE_CHILD,GALA_DINNER_VALENTINES_DAY_ADULT,GALA_DINNER_VALENTINES_DAY_CHILD,GALA_DINNER_XMAS_DAY_ADULT,GALA_DINNER_XMAS_DAY_CHILD,GALA_DINNER_XMAS_EVE_ADULT,GALA_DINNER_XMAS_EVE_CHILD,RESORT_FEE_AMT,RESORT_FEE_PCNT,SANITATION_FEE,SEASONAL_HEATING_FEE,TOURISM_FEE_AMT,TOURISM_FEE_PCNT,TOWEL_SHEETS_FEE_AMT,TRANSFER_FEE_AMT_ADULT,TRANSFER_FEE_AMT_CHILD,UTILITY_SURCHARGE + */ + enum class Type( + val value: kotlin.String, + ) { + @JsonProperty("City_LocalTax_Amt") + CITY_LOCAL_TAX_AMT("City_LocalTax_Amt"), + @JsonProperty("City_LocalTax_Pcnt") + CITY_LOCAL_TAX_PCNT("City_LocalTax_Pcnt"), + @JsonProperty("CleaningFee_Amt") + CLEANING_FEE_AMT("CleaningFee_Amt"), + @JsonProperty("CleaningFee_Pcnt") + CLEANING_FEE_PCNT("CleaningFee_Pcnt"), + @JsonProperty("ClubCardAdult") + CLUB_CARD_ADULT("ClubCardAdult"), + @JsonProperty("ClubCardChild") + CLUB_CARD_CHILD("ClubCardChild"), + @JsonProperty("DestinationFee_Amt") + DESTINATION_FEE_AMT("DestinationFee_Amt"), + @JsonProperty("DestinationFee_Pcnt") + DESTINATION_FEE_PCNT("DestinationFee_Pcnt"), + @JsonProperty("GalaDinnerAdult") + GALA_DINNER_ADULT("GalaDinnerAdult"), - } + @JsonProperty("GalaDinnerChild") + GALA_DINNER_CHILD("GalaDinnerChild"), - companion object { - @JvmStatic - fun builder() = Builder() - } + @JsonProperty("GalaDinnerChineseNYAdult") + GALA_DINNER_CHINESE_NY_ADULT("GalaDinnerChineseNYAdult"), - class Builder( - private var type: MandatoryFeesDetail.Type? = null, - private var amount: MandatoryFeesDetailAmount? = null - ) { - fun type(type: MandatoryFeesDetail.Type?) = apply { this.type = type } - fun amount(amount: MandatoryFeesDetailAmount?) = apply { this.amount = amount } + @JsonProperty("GalaDinnerChineseNYChild") + GALA_DINNER_CHINESE_NY_CHILD("GalaDinnerChineseNYChild"), - fun build(): MandatoryFeesDetail { - val instance = MandatoryFeesDetail( - type = type, - amount = amount - ) + @JsonProperty("GalaDinnerNYDayAdult") + GALA_DINNER_NY_DAY_ADULT("GalaDinnerNYDayAdult"), - return instance - } - } + @JsonProperty("GalaDinnerNYDayChild") + GALA_DINNER_NY_DAY_CHILD("GalaDinnerNYDayChild"), - fun toBuilder() = Builder( - type = type, - amount = amount - ) - - /** - * Type of mandatory fee. - * Values: CITY_LOCAL_TAX_AMT,CITY_LOCAL_TAX_PCNT,CLEANING_FEE_AMT,CLEANING_FEE_PCNT,CLUB_CARD_ADULT,CLUB_CARD_CHILD,DESTINATION_FEE_AMT,DESTINATION_FEE_PCNT,GALA_DINNER_ADULT,GALA_DINNER_CHILD,GALA_DINNER_CHINESE_NY_ADULT,GALA_DINNER_CHINESE_NY_CHILD,GALA_DINNER_NY_DAY_ADULT,GALA_DINNER_NY_DAY_CHILD,GALA_DINNER_NY_EVE_ADULT,GALA_DINNER_NY_EVE_CHILD,GALA_DINNER_VALENTINES_DAY_ADULT,GALA_DINNER_VALENTINES_DAY_CHILD,GALA_DINNER_XMAS_DAY_ADULT,GALA_DINNER_XMAS_DAY_CHILD,GALA_DINNER_XMAS_EVE_ADULT,GALA_DINNER_XMAS_EVE_CHILD,RESORT_FEE_AMT,RESORT_FEE_PCNT,SANITATION_FEE,SEASONAL_HEATING_FEE,TOURISM_FEE_AMT,TOURISM_FEE_PCNT,TOWEL_SHEETS_FEE_AMT,TRANSFER_FEE_AMT_ADULT,TRANSFER_FEE_AMT_CHILD,UTILITY_SURCHARGE - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("City_LocalTax_Amt") - CITY_LOCAL_TAX_AMT("City_LocalTax_Amt"), - - @JsonProperty("City_LocalTax_Pcnt") - CITY_LOCAL_TAX_PCNT("City_LocalTax_Pcnt"), - - @JsonProperty("CleaningFee_Amt") - CLEANING_FEE_AMT("CleaningFee_Amt"), - - @JsonProperty("CleaningFee_Pcnt") - CLEANING_FEE_PCNT("CleaningFee_Pcnt"), - - @JsonProperty("ClubCardAdult") - CLUB_CARD_ADULT("ClubCardAdult"), - - @JsonProperty("ClubCardChild") - CLUB_CARD_CHILD("ClubCardChild"), - - @JsonProperty("DestinationFee_Amt") - DESTINATION_FEE_AMT("DestinationFee_Amt"), - - @JsonProperty("DestinationFee_Pcnt") - DESTINATION_FEE_PCNT("DestinationFee_Pcnt"), - - @JsonProperty("GalaDinnerAdult") - GALA_DINNER_ADULT("GalaDinnerAdult"), - - @JsonProperty("GalaDinnerChild") - GALA_DINNER_CHILD("GalaDinnerChild"), - - @JsonProperty("GalaDinnerChineseNYAdult") - GALA_DINNER_CHINESE_NY_ADULT("GalaDinnerChineseNYAdult"), - - @JsonProperty("GalaDinnerChineseNYChild") - GALA_DINNER_CHINESE_NY_CHILD("GalaDinnerChineseNYChild"), - - @JsonProperty("GalaDinnerNYDayAdult") - GALA_DINNER_NY_DAY_ADULT("GalaDinnerNYDayAdult"), - - @JsonProperty("GalaDinnerNYDayChild") - GALA_DINNER_NY_DAY_CHILD("GalaDinnerNYDayChild"), - - @JsonProperty("GalaDinnerNYEveAdult") - GALA_DINNER_NY_EVE_ADULT("GalaDinnerNYEveAdult"), - - @JsonProperty("GalaDinnerNYEveChild") - GALA_DINNER_NY_EVE_CHILD("GalaDinnerNYEveChild"), - - @JsonProperty("GalaDinnerValentinesDayAdult") - GALA_DINNER_VALENTINES_DAY_ADULT("GalaDinnerValentinesDayAdult"), - - @JsonProperty("GalaDinnerValentinesDayChild") - GALA_DINNER_VALENTINES_DAY_CHILD("GalaDinnerValentinesDayChild"), - - @JsonProperty("GalaDinnerXMASDayAdult") - GALA_DINNER_XMAS_DAY_ADULT("GalaDinnerXMASDayAdult"), - - @JsonProperty("GalaDinnerXMASDayChild") - GALA_DINNER_XMAS_DAY_CHILD("GalaDinnerXMASDayChild"), - - @JsonProperty("GalaDinnerXMASEveAdult") - GALA_DINNER_XMAS_EVE_ADULT("GalaDinnerXMASEveAdult"), - - @JsonProperty("GalaDinnerXMASEveChild") - GALA_DINNER_XMAS_EVE_CHILD("GalaDinnerXMASEveChild"), - - @JsonProperty("ResortFee_Amt") - RESORT_FEE_AMT("ResortFee_Amt"), - - @JsonProperty("ResortFee_Pcnt") - RESORT_FEE_PCNT("ResortFee_Pcnt"), - - @JsonProperty("SanitationFee") - SANITATION_FEE("SanitationFee"), - - @JsonProperty("SeasonalHeatingFee") - SEASONAL_HEATING_FEE("SeasonalHeatingFee"), - - @JsonProperty("TourismFee_Amt") - TOURISM_FEE_AMT("TourismFee_Amt"), - - @JsonProperty("TourismFee_Pcnt") - TOURISM_FEE_PCNT("TourismFee_Pcnt"), - - @JsonProperty("TowelSheetsFee_Amt") - TOWEL_SHEETS_FEE_AMT("TowelSheetsFee_Amt"), - - @JsonProperty("TransferFee_Amt_Adult") - TRANSFER_FEE_AMT_ADULT("TransferFee_Amt_Adult"), - - @JsonProperty("TransferFee_Amt_Child") - TRANSFER_FEE_AMT_CHILD("TransferFee_Amt_Child"), - - @JsonProperty("UtilitySurcharge") - UTILITY_SURCHARGE("UtilitySurcharge"); - } + @JsonProperty("GalaDinnerNYEveAdult") + GALA_DINNER_NY_EVE_ADULT("GalaDinnerNYEveAdult"), + + @JsonProperty("GalaDinnerNYEveChild") + GALA_DINNER_NY_EVE_CHILD("GalaDinnerNYEveChild"), + + @JsonProperty("GalaDinnerValentinesDayAdult") + GALA_DINNER_VALENTINES_DAY_ADULT("GalaDinnerValentinesDayAdult"), + + @JsonProperty("GalaDinnerValentinesDayChild") + GALA_DINNER_VALENTINES_DAY_CHILD("GalaDinnerValentinesDayChild"), + + @JsonProperty("GalaDinnerXMASDayAdult") + GALA_DINNER_XMAS_DAY_ADULT("GalaDinnerXMASDayAdult"), + + @JsonProperty("GalaDinnerXMASDayChild") + GALA_DINNER_XMAS_DAY_CHILD("GalaDinnerXMASDayChild"), + + @JsonProperty("GalaDinnerXMASEveAdult") + GALA_DINNER_XMAS_EVE_ADULT("GalaDinnerXMASEveAdult"), + + @JsonProperty("GalaDinnerXMASEveChild") + GALA_DINNER_XMAS_EVE_CHILD("GalaDinnerXMASEveChild"), + + @JsonProperty("ResortFee_Amt") + RESORT_FEE_AMT("ResortFee_Amt"), + + @JsonProperty("ResortFee_Pcnt") + RESORT_FEE_PCNT("ResortFee_Pcnt"), + + @JsonProperty("SanitationFee") + SANITATION_FEE("SanitationFee"), + + @JsonProperty("SeasonalHeatingFee") + SEASONAL_HEATING_FEE("SeasonalHeatingFee"), + + @JsonProperty("TourismFee_Amt") + TOURISM_FEE_AMT("TourismFee_Amt"), + + @JsonProperty("TourismFee_Pcnt") + TOURISM_FEE_PCNT("TourismFee_Pcnt"), + + @JsonProperty("TowelSheetsFee_Amt") + TOWEL_SHEETS_FEE_AMT("TowelSheetsFee_Amt"), + + @JsonProperty("TransferFee_Amt_Adult") + TRANSFER_FEE_AMT_ADULT("TransferFee_Amt_Adult"), + + @JsonProperty("TransferFee_Amt_Child") + TRANSFER_FEE_AMT_CHILD("TransferFee_Amt_Child"), + + @JsonProperty("UtilitySurcharge") + UTILITY_SURCHARGE("UtilitySurcharge"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt index cdc4f974b..5c5401c08 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/MandatoryFeesDetailAmount.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class MandatoryFeesDetailAmount( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): MandatoryFeesDetailAmount { - val instance = MandatoryFeesDetailAmount( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): MandatoryFeesDetailAmount { + val instance = + MandatoryFeesDetailAmount( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt index 0cc33c5ad..92073f54d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Media.kt @@ -15,109 +15,80 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for hotel images - * @param type Supported type of media. 1=Image. Only 1 is supported now. - * @param title Image title - * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - * @param url Image URL + * @param type Supported type of media. 1=Image. Only 1 is supported now. + * @param title Image title + * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + * @param url Image URL */ data class Media( - /* Supported type of media. 1=Image. Only 1 is supported now. */ -@JsonProperty("Type") -val type: Media.Type? = null, - - /* Image title */ -@JsonProperty("Title") -val title: kotlin.String? = null, - - /* Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). */ -@JsonProperty("Size") -val propertySize: kotlin.String? = null, - - /* Image URL */ -@JsonProperty("Url") -val url: kotlin.String? = null + // Supported type of media. 1=Image. Only 1 is supported now. + @JsonProperty("Type") + val type: Media.Type? = null, + // Image title + @JsonProperty("Title") + val title: kotlin.String? = null, + // Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + @JsonProperty("Size") + val propertySize: kotlin.String? = null, + // Image URL + @JsonProperty("Url") + val url: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var type: Media.Type? = null, + private var title: kotlin.String? = null, + private var propertySize: kotlin.String? = null, + private var url: kotlin.String? = null, + ) { + fun type(type: Media.Type?) = apply { this.type = type } + fun title(title: kotlin.String?) = apply { this.title = title } + fun propertySize(propertySize: kotlin.String?) = apply { this.propertySize = propertySize } + fun url(url: kotlin.String?) = apply { this.url = url } - } + fun build(): Media { + val instance = + Media( + type = type, + title = title, + propertySize = propertySize, + url = url, + ) - companion object { - @JvmStatic - fun builder() = Builder() + return instance + } } - class Builder( - private var type: Media.Type? = null, - private var title: kotlin.String? = null, - private var propertySize: kotlin.String? = null, - private var url: kotlin.String? = null - ) { - fun type(type: Media.Type?) = apply { this.type = type } - fun title(title: kotlin.String?) = apply { this.title = title } - fun propertySize(propertySize: kotlin.String?) = apply { this.propertySize = propertySize } - fun url(url: kotlin.String?) = apply { this.url = url } - - fun build(): Media { - val instance = Media( + fun toBuilder() = + Builder( type = type, title = title, propertySize = propertySize, - url = url - ) - - return instance - } + url = url, + ) + + /** + * Supported type of media. 1=Image. Only 1 is supported now. + * Values: _1 + */ + enum class Type( + val value: kotlin.String, + ) { + @JsonProperty("1") + _1("1"), } - - fun toBuilder() = Builder( - type = type, - title = title, - propertySize = propertySize, - url = url - ) - - /** - * Supported type of media. 1=Image. Only 1 is supported now. - * Values: _1 - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("1") - _1("1"); - } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt index 431270f16..5625b0429 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Mileage.kt @@ -17,88 +17,61 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.ExtraCostPerDistance - import com.fasterxml.jackson.annotation.JsonProperty /** * A list of charges to be levied based on the mileage driven. - * @param freeDistance - * @param freeDistanceRatePeriod Rate period for free distance. - * @param extraCostPerDistance + * @param freeDistance + * @param freeDistanceRatePeriod Rate period for free distance. + * @param extraCostPerDistance */ data class Mileage( - @JsonProperty("FreeDistance") -val freeDistance: - CarsDistance -, - - /* Rate period for free distance. */ -@JsonProperty("FreeDistanceRatePeriod") -val freeDistanceRatePeriod: - kotlin.String -, - - @JsonProperty("ExtraCostPerDistance") -val extraCostPerDistance: ExtraCostPerDistance? = null + @JsonProperty("FreeDistance") + val freeDistance: CarsDistance, + // Rate period for free distance. + @JsonProperty("FreeDistanceRatePeriod") + val freeDistanceRatePeriod: kotlin.String, + @JsonProperty("ExtraCostPerDistance") + val extraCostPerDistance: ExtraCostPerDistance? = null, ) { - - - init { - require(freeDistance != null) { "freeDistance must not be null" } - - - - - - + require(freeDistance != null) { "freeDistance must not be null" } require(freeDistanceRatePeriod != null) { "freeDistanceRatePeriod must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var freeDistance: CarsDistance? = null, - private var freeDistanceRatePeriod: kotlin.String? = null, - private var extraCostPerDistance: ExtraCostPerDistance? = null - ) { - fun freeDistance(freeDistance: CarsDistance) = apply { this.freeDistance = freeDistance } - fun freeDistanceRatePeriod(freeDistanceRatePeriod: kotlin.String) = apply { this.freeDistanceRatePeriod = freeDistanceRatePeriod } - fun extraCostPerDistance(extraCostPerDistance: ExtraCostPerDistance?) = apply { this.extraCostPerDistance = extraCostPerDistance } + class Builder( + private var freeDistance: CarsDistance? = null, + private var freeDistanceRatePeriod: kotlin.String? = null, + private var extraCostPerDistance: ExtraCostPerDistance? = null, + ) { + fun freeDistance(freeDistance: CarsDistance) = apply { this.freeDistance = freeDistance } - fun build(): Mileage { - val instance = Mileage( - freeDistance = freeDistance!!, - freeDistanceRatePeriod = freeDistanceRatePeriod!!, - extraCostPerDistance = extraCostPerDistance - ) + fun freeDistanceRatePeriod(freeDistanceRatePeriod: kotlin.String) = apply { this.freeDistanceRatePeriod = freeDistanceRatePeriod } - return instance - } + fun extraCostPerDistance(extraCostPerDistance: ExtraCostPerDistance?) = apply { this.extraCostPerDistance = extraCostPerDistance } + + fun build(): Mileage { + val instance = + Mileage( + freeDistance = freeDistance!!, + freeDistanceRatePeriod = freeDistanceRatePeriod!!, + extraCostPerDistance = extraCostPerDistance, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( freeDistance = freeDistance!!, freeDistanceRatePeriod = freeDistanceRatePeriod!!, - extraCostPerDistance = extraCostPerDistance - ) + extraCostPerDistance = extraCostPerDistance, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt index b5d07eb2c..63ffdf3ee 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Money.kt @@ -15,83 +15,59 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Pricing information of the stat date - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class Money( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): Money { - val instance = Money( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): Money { + val instance = + Money( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt index fd16e58b6..8ff27eca1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Neighborhood.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. - * @param id Neighborhood id. - * @param name Neighborhood name. + * @param id Neighborhood id. + * @param name Neighborhood name. */ data class Neighborhood( - /* Neighborhood id. */ -@JsonProperty("Id") -val id: kotlin.String? = null, - - /* Neighborhood name. */ -@JsonProperty("Name") -val name: kotlin.String? = null + // Neighborhood id. + @JsonProperty("Id") + val id: kotlin.String? = null, + // Neighborhood name. + @JsonProperty("Name") + val name: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - fun name(name: kotlin.String?) = apply { this.name = name } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + ) { + fun id(id: kotlin.String?) = apply { this.id = id } - fun build(): Neighborhood { - val instance = Neighborhood( - id = id, - name = name - ) + fun name(name: kotlin.String?) = apply { this.name = name } - return instance - } + fun build(): Neighborhood { + val instance = + Neighborhood( + id = id, + name = name, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id, - name = name - ) + name = name, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt index 9c88518ec..199b02791 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NightlyRates.kt @@ -16,66 +16,49 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param stayDate - * @param baseRate +* + * @param stayDate + * @param baseRate */ data class NightlyRates( - @JsonProperty("StayDate") -val stayDate: java.time.LocalDate? = null, - - @JsonProperty("BaseRate") -val baseRate: Money? = null + @JsonProperty("StayDate") + val stayDate: java.time.LocalDate? = null, + @JsonProperty("BaseRate") + val baseRate: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var stayDate: java.time.LocalDate? = null, - private var baseRate: Money? = null - ) { - fun stayDate(stayDate: java.time.LocalDate?) = apply { this.stayDate = stayDate } - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + class Builder( + private var stayDate: java.time.LocalDate? = null, + private var baseRate: Money? = null, + ) { + fun stayDate(stayDate: java.time.LocalDate?) = apply { this.stayDate = stayDate } - fun build(): NightlyRates { - val instance = NightlyRates( - stayDate = stayDate, - baseRate = baseRate - ) + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - return instance - } + fun build(): NightlyRates { + val instance = + NightlyRates( + stayDate = stayDate, + baseRate = baseRate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( stayDate = stayDate, - baseRate = baseRate - ) + baseRate = baseRate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt index ed9e42723..605c5401a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for non-cancellable date and time range element - * @param startDateTime The time of this non-cancellable window starts - * @param endDateTime The time of this non-cancellable window ends + * @param startDateTime The time of this non-cancellable window starts + * @param endDateTime The time of this non-cancellable window ends */ data class NonCancellableDateTimeRange( - /* The time of this non-cancellable window starts */ -@JsonProperty("StartDateTime") -val startDateTime: - java.time.LocalDateTime -, - - /* The time of this non-cancellable window ends */ -@JsonProperty("EndDateTime") -val endDateTime: - java.time.LocalDateTime - + // The time of this non-cancellable window starts + @JsonProperty("StartDateTime") + val startDateTime: java.time.LocalDateTime, + // The time of this non-cancellable window ends + @JsonProperty("EndDateTime") + val endDateTime: java.time.LocalDateTime, ) { - - - init { - require(startDateTime != null) { "startDateTime must not be null" } - - - - - - + require(startDateTime != null) { "startDateTime must not be null" } require(endDateTime != null) { "endDateTime must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startDateTime: java.time.LocalDateTime? = null, - private var endDateTime: java.time.LocalDateTime? = null - ) { - fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } - fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } + class Builder( + private var startDateTime: java.time.LocalDateTime? = null, + private var endDateTime: java.time.LocalDateTime? = null, + ) { + fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } - fun build(): NonCancellableDateTimeRange { - val instance = NonCancellableDateTimeRange( - startDateTime = startDateTime!!, - endDateTime = endDateTime!! - ) + fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } - return instance - } + fun build(): NonCancellableDateTimeRange { + val instance = + NonCancellableDateTimeRange( + startDateTime = startDateTime!!, + endDateTime = endDateTime!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( startDateTime = startDateTime!!, - endDateTime = endDateTime!! - ) + endDateTime = endDateTime!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt index a5ea239b8..5f6bb2812 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonRefundableDateRange.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param startDate Start date of a non-refundable date range. - * @param endDate End date of a non-refundable date range. +* + * @param startDate Start date of a non-refundable date range. + * @param endDate End date of a non-refundable date range. */ data class NonRefundableDateRange( - /* Start date of a non-refundable date range. */ -@JsonProperty("StartDate") -val startDate: java.time.LocalDate? = null, - - /* End date of a non-refundable date range. */ -@JsonProperty("EndDate") -val endDate: java.time.LocalDate? = null + // Start date of a non-refundable date range. + @JsonProperty("StartDate") + val startDate: java.time.LocalDate? = null, + // End date of a non-refundable date range. + @JsonProperty("EndDate") + val endDate: java.time.LocalDate? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startDate: java.time.LocalDate? = null, - private var endDate: java.time.LocalDate? = null - ) { - fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } + class Builder( + private var startDate: java.time.LocalDate? = null, + private var endDate: java.time.LocalDate? = null, + ) { + fun startDate(startDate: java.time.LocalDate?) = apply { this.startDate = startDate } - fun build(): NonRefundableDateRange { - val instance = NonRefundableDateRange( - startDate = startDate, - endDate = endDate - ) + fun endDate(endDate: java.time.LocalDate?) = apply { this.endDate = endDate } - return instance - } + fun build(): NonRefundableDateRange { + val instance = + NonRefundableDateRange( + startDate = startDate, + endDate = endDate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( startDate = startDate, - endDate = endDate - ) + endDate = endDate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt index 3d2254981..0e89710c7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Occupant.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for the list of room occupants. - * @param adults The number of adults in a room. - * @param childAges The ages of children in a room. + * @param adults The number of adults in a room. + * @param childAges The ages of children in a room. */ data class Occupant( - /* The number of adults in a room. */ -@JsonProperty("Adults") -val adults: kotlin.Int? = null, - - /* The ages of children in a room. */ -@JsonProperty("ChildAges") -val childAges: kotlin.collections.List? = null + // The number of adults in a room. + @JsonProperty("Adults") + val adults: kotlin.Int? = null, + // The ages of children in a room. + @JsonProperty("ChildAges") + val childAges: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var adults: kotlin.Int? = null, - private var childAges: kotlin.collections.List? = null - ) { - fun adults(adults: kotlin.Int?) = apply { this.adults = adults } - fun childAges(childAges: kotlin.collections.List?) = apply { this.childAges = childAges } + class Builder( + private var adults: kotlin.Int? = null, + private var childAges: kotlin.collections.List? = null, + ) { + fun adults(adults: kotlin.Int?) = apply { this.adults = adults } - fun build(): Occupant { - val instance = Occupant( - adults = adults, - childAges = childAges - ) + fun childAges(childAges: kotlin.collections.List?) = apply { this.childAges = childAges } - return instance - } + fun build(): Occupant { + val instance = + Occupant( + adults = adults, + childAges = childAges, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( adults = adults, - childAges = childAges - ) + childAges = childAges, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt index 7cf739a83..ff749c878 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Offer.kt @@ -18,167 +18,107 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesLink import com.expediagroup.sdk.xap.models.ActivitiesPrice import com.expediagroup.sdk.xap.models.AvailableTimeSlot - import com.fasterxml.jackson.annotation.JsonProperty /** * Offers for the activity. - * @param id The numerical identifier for the offer. - * @param title A descriptive title for this offer. - * @param duration The anticipated time duration for the activity, e xpressed using Java JDK duration format. - * @param availableTimeSlots The list of available Time Slots for the activity. - * @param offerPrice - * @param description Description of this offer. - * @param links Container of HATEOAS URL's + * @param id The numerical identifier for the offer. + * @param title A descriptive title for this offer. + * @param duration The anticipated time duration for the activity, e xpressed using Java JDK duration format. + * @param availableTimeSlots The list of available Time Slots for the activity. + * @param offerPrice + * @param description Description of this offer. + * @param links Container of HATEOAS URL's */ data class Offer( - /* The numerical identifier for the offer. */ -@JsonProperty("Id") -val id: - kotlin.Int -, - - /* A descriptive title for this offer. */ -@JsonProperty("Title") -val title: - kotlin.String -, - - /* The anticipated time duration for the activity, e xpressed using Java JDK duration format. */ -@JsonProperty("Duration") -val duration: - kotlin.String -, - - /* The list of available Time Slots for the activity. */ -@JsonProperty("AvailableTimeSlots") -val availableTimeSlots: - kotlin.collections. - List -< - AvailableTimeSlot -> - -, - - @JsonProperty("OfferPrice") -val offerPrice: - ActivitiesPrice -, - - /* Description of this offer. */ -@JsonProperty("Description") -val description: kotlin.String? = null, - - /* Container of HATEOAS URL's */ -@JsonProperty("Links") -val links: kotlin.collections.Map? = null + // The numerical identifier for the offer. + @JsonProperty("Id") + val id: kotlin.Int, + // A descriptive title for this offer. + @JsonProperty("Title") + val title: kotlin.String, + // The anticipated time duration for the activity, e xpressed using Java JDK duration format. + @JsonProperty("Duration") + val duration: kotlin.String, + // The list of available Time Slots for the activity. + @JsonProperty("AvailableTimeSlots") + val availableTimeSlots: kotlin.collections + .List< + AvailableTimeSlot, + >, + @JsonProperty("OfferPrice") + val offerPrice: ActivitiesPrice, + // Description of this offer. + @JsonProperty("Description") + val description: kotlin.String? = null, + // Container of HATEOAS URL's + @JsonProperty("Links") + val links: kotlin.collections.Map? = null, ) { - - - init { - require(id != null) { "id must not be null" } - - - - - - + require(id != null) { "id must not be null" } require(title != null) { "title must not be null" } - - - - - - require(duration != null) { "duration must not be null" } - - - - - - require(availableTimeSlots != null) { "availableTimeSlots must not be null" } - - - - - - require(offerPrice != null) { "offerPrice must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var id: kotlin.Int? = null, + private var title: kotlin.String? = null, + private var duration: kotlin.String? = null, + private var availableTimeSlots: kotlin.collections.List? = null, + private var offerPrice: ActivitiesPrice? = null, + private var description: kotlin.String? = null, + private var links: kotlin.collections.Map? = null, + ) { + fun id(id: kotlin.Int) = apply { this.id = id } + fun title(title: kotlin.String) = apply { this.title = title } + fun duration(duration: kotlin.String) = apply { this.duration = duration } + fun availableTimeSlots(availableTimeSlots: kotlin.collections.List) = apply { this.availableTimeSlots = availableTimeSlots } + fun offerPrice(offerPrice: ActivitiesPrice) = apply { this.offerPrice = offerPrice } + fun description(description: kotlin.String?) = apply { this.description = description } + fun links(links: kotlin.collections.Map?) = apply { this.links = links } + fun build(): Offer { + val instance = + Offer( + id = id!!, + title = title!!, + duration = duration!!, + availableTimeSlots = availableTimeSlots!!, + offerPrice = offerPrice!!, + description = description, + links = links, + ) - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var id: kotlin.Int? = null, - private var title: kotlin.String? = null, - private var duration: kotlin.String? = null, - private var availableTimeSlots: kotlin.collections.List? = null, - private var offerPrice: ActivitiesPrice? = null, - private var description: kotlin.String? = null, - private var links: kotlin.collections.Map? = null - ) { - fun id(id: kotlin.Int) = apply { this.id = id } - fun title(title: kotlin.String) = apply { this.title = title } - fun duration(duration: kotlin.String) = apply { this.duration = duration } - fun availableTimeSlots(availableTimeSlots: kotlin.collections.List) = apply { this.availableTimeSlots = availableTimeSlots } - fun offerPrice(offerPrice: ActivitiesPrice) = apply { this.offerPrice = offerPrice } - fun description(description: kotlin.String?) = apply { this.description = description } - fun links(links: kotlin.collections.Map?) = apply { this.links = links } - - fun build(): Offer { - val instance = Offer( - id = id!!, - title = title!!, - duration = duration!!, - availableTimeSlots = availableTimeSlots!!, - offerPrice = offerPrice!!, - description = description, - links = links - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id!!, title = title!!, duration = duration!!, availableTimeSlots = availableTimeSlots!!, offerPrice = offerPrice!!, description = description, - links = links - ) + links = links, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt index 1024760c9..dc9f523c9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedule.kt @@ -16,67 +16,50 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.PaymentSchedulePrice - import com.fasterxml.jackson.annotation.JsonProperty /** * Contains information on the payment schedule. - * @param due Date/Time stamp when this installment/deposit should be paid by. - * @param price + * @param due Date/Time stamp when this installment/deposit should be paid by. + * @param price */ data class PaymentSchedule( - /* Date/Time stamp when this installment/deposit should be paid by. */ -@JsonProperty("Due") -val due: java.time.LocalDate? = null, - - @JsonProperty("Price") -val price: PaymentSchedulePrice? = null + // Date/Time stamp when this installment/deposit should be paid by. + @JsonProperty("Due") + val due: java.time.LocalDate? = null, + @JsonProperty("Price") + val price: PaymentSchedulePrice? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var due: java.time.LocalDate? = null, - private var price: PaymentSchedulePrice? = null - ) { - fun due(due: java.time.LocalDate?) = apply { this.due = due } - fun price(price: PaymentSchedulePrice?) = apply { this.price = price } + class Builder( + private var due: java.time.LocalDate? = null, + private var price: PaymentSchedulePrice? = null, + ) { + fun due(due: java.time.LocalDate?) = apply { this.due = due } - fun build(): PaymentSchedule { - val instance = PaymentSchedule( - due = due, - price = price - ) + fun price(price: PaymentSchedulePrice?) = apply { this.price = price } - return instance - } + fun build(): PaymentSchedule { + val instance = + PaymentSchedule( + due = due, + price = price, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( due = due, - price = price - ) + price = price, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt index 9ad3be451..6f591291b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PaymentSchedulePrice.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class PaymentSchedulePrice( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): PaymentSchedulePrice { - val instance = PaymentSchedulePrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): PaymentSchedulePrice { + val instance = + PaymentSchedulePrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt index 181ddd9d5..8323846fb 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt @@ -16,92 +16,64 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.PenaltyType - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for penalty rules - * @param penalty - * @param startDateTime The time when this penalty window starts - * @param endDateTime The time when this penalty window ends + * @param penalty + * @param startDateTime The time when this penalty window starts + * @param endDateTime The time when this penalty window ends */ data class PenaltyRule( - @JsonProperty("Penalty") -val penalty: - PenaltyType -, - - /* The time when this penalty window starts */ -@JsonProperty("StartDateTime") -val startDateTime: - java.time.LocalDateTime -, - - /* The time when this penalty window ends */ -@JsonProperty("EndDateTime") -val endDateTime: - java.time.LocalDateTime - + @JsonProperty("Penalty") + val penalty: PenaltyType, + // The time when this penalty window starts + @JsonProperty("StartDateTime") + val startDateTime: java.time.LocalDateTime, + // The time when this penalty window ends + @JsonProperty("EndDateTime") + val endDateTime: java.time.LocalDateTime, ) { - - - init { - require(penalty != null) { "penalty must not be null" } - - - - - - + require(penalty != null) { "penalty must not be null" } require(startDateTime != null) { "startDateTime must not be null" } - - - - - - require(endDateTime != null) { "endDateTime must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var penalty: PenaltyType? = null, - private var startDateTime: java.time.LocalDateTime? = null, - private var endDateTime: java.time.LocalDateTime? = null - ) { - fun penalty(penalty: PenaltyType) = apply { this.penalty = penalty } - fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } - fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } + class Builder( + private var penalty: PenaltyType? = null, + private var startDateTime: java.time.LocalDateTime? = null, + private var endDateTime: java.time.LocalDateTime? = null, + ) { + fun penalty(penalty: PenaltyType) = apply { this.penalty = penalty } - fun build(): PenaltyRule { - val instance = PenaltyRule( - penalty = penalty!!, - startDateTime = startDateTime!!, - endDateTime = endDateTime!! - ) + fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } - return instance - } + fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } + + fun build(): PenaltyRule { + val instance = + PenaltyRule( + penalty = penalty!!, + startDateTime = startDateTime!!, + endDateTime = endDateTime!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( penalty = penalty!!, startDateTime = startDateTime!!, - endDateTime = endDateTime!! - ) + endDateTime = endDateTime!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt index 26b07c37b..e5736c58c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyType.kt @@ -15,93 +15,65 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for no show penalty element - * @param type What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. - * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a penalty. - * @param currency The currency of the amount, only valid when Type=AMOUNT + * @param type What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. + * @param `value` Value to indicate how many/much of the type listed above is going to be charged as a penalty. + * @param currency The currency of the amount, only valid when Type=AMOUNT */ data class PenaltyType( - /* What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. */ -@JsonProperty("Type") -val type: - kotlin.String -, - - /* Value to indicate how many/much of the type listed above is going to be charged as a penalty. */ -@JsonProperty("Value") -val `value`: - kotlin.String -, - - /* The currency of the amount, only valid when Type=AMOUNT */ -@JsonProperty("Currency") -val currency: - kotlin.String - + // What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days. + @JsonProperty("Type") + val type: kotlin.String, + // Value to indicate how many/much of the type listed above is going to be charged as a penalty. + @JsonProperty("Value") + val `value`: kotlin.String, + // The currency of the amount, only valid when Type=AMOUNT + @JsonProperty("Currency") + val currency: kotlin.String, ) { - - - init { - require(type != null) { "type must not be null" } - - - - - - + require(type != null) { "type must not be null" } require(`value` != null) { "`value` must not be null" } - - - - - - require(currency != null) { "currency must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String) = apply { this.currency = currency } + class Builder( + private var type: kotlin.String? = null, + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + ) { + fun type(type: kotlin.String) = apply { this.type = type } - fun build(): PenaltyType { - val instance = PenaltyType( - type = type!!, - `value` = `value`!!, - currency = currency!! - ) + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - return instance - } + fun currency(currency: kotlin.String) = apply { this.currency = currency } + + fun build(): PenaltyType { + val instance = + PenaltyType( + type = type!!, + `value` = `value`!!, + currency = currency!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type!!, `value` = `value`!!, - currency = currency!! - ) + currency = currency!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt index 4e2a6da0a..5001877b0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Phone.kt @@ -15,100 +15,69 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param countryCode The designated country calling code. - * @param areaCode The phone's area code. - * @param number The phone's local number. - * @param extensionNumber Optional extension number, if required to reach the hotel. +* + * @param countryCode The designated country calling code. + * @param areaCode The phone's area code. + * @param number The phone's local number. + * @param extensionNumber Optional extension number, if required to reach the hotel. */ data class Phone( - /* The designated country calling code. */ -@JsonProperty("CountryCode") -val countryCode: kotlin.String? = null, - - /* The phone's area code. */ -@JsonProperty("AreaCode") -val areaCode: kotlin.String? = null, - - /* The phone's local number. */ -@JsonProperty("Number") -val number: kotlin.String? = null, - - /* Optional extension number, if required to reach the hotel. */ -@JsonProperty("ExtensionNumber") -val extensionNumber: kotlin.String? = null + // The designated country calling code. + @JsonProperty("CountryCode") + val countryCode: kotlin.String? = null, + // The phone's area code. + @JsonProperty("AreaCode") + val areaCode: kotlin.String? = null, + // The phone's local number. + @JsonProperty("Number") + val number: kotlin.String? = null, + // Optional extension number, if required to reach the hotel. + @JsonProperty("ExtensionNumber") + val extensionNumber: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var countryCode: kotlin.String? = null, - private var areaCode: kotlin.String? = null, - private var number: kotlin.String? = null, - private var extensionNumber: kotlin.String? = null - ) { - fun countryCode(countryCode: kotlin.String?) = apply { this.countryCode = countryCode } - fun areaCode(areaCode: kotlin.String?) = apply { this.areaCode = areaCode } - fun number(number: kotlin.String?) = apply { this.number = number } - fun extensionNumber(extensionNumber: kotlin.String?) = apply { this.extensionNumber = extensionNumber } + class Builder( + private var countryCode: kotlin.String? = null, + private var areaCode: kotlin.String? = null, + private var number: kotlin.String? = null, + private var extensionNumber: kotlin.String? = null, + ) { + fun countryCode(countryCode: kotlin.String?) = apply { this.countryCode = countryCode } - fun build(): Phone { - val instance = Phone( - countryCode = countryCode, - areaCode = areaCode, - number = number, - extensionNumber = extensionNumber - ) + fun areaCode(areaCode: kotlin.String?) = apply { this.areaCode = areaCode } - return instance - } + fun number(number: kotlin.String?) = apply { this.number = number } + + fun extensionNumber(extensionNumber: kotlin.String?) = apply { this.extensionNumber = extensionNumber } + + fun build(): Phone { + val instance = + Phone( + countryCode = countryCode, + areaCode = areaCode, + number = number, + extensionNumber = extensionNumber, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( countryCode = countryCode, areaCode = areaCode, number = number, - extensionNumber = extensionNumber - ) + extensionNumber = extensionNumber, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt index 30ae8a6a9..258c51c8e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PresignedUrlResponse.kt @@ -17,113 +17,75 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Fault import com.expediagroup.sdk.xap.models.FileInfo - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param transactionId Unique identifier for each API response. - * @param error - * @param warning - * @param bestMatchedFile - * @param otherFileOptions Container for file Pre-signed download URL and informations. +* + * @param transactionId Unique identifier for each API response. + * @param error + * @param warning + * @param bestMatchedFile + * @param otherFileOptions Container for file Pre-signed download URL and informations. */ data class PresignedUrlResponse( - /* Unique identifier for each API response. */ -@JsonProperty("transactionId") -val transactionId: kotlin.String? = null, - - @JsonProperty("error") -val error: Fault? = null, - - @JsonProperty("warning") -val warning: Fault? = null, - - @JsonProperty("bestMatchedFile") -val bestMatchedFile: FileInfo? = null, - - /* Container for file Pre-signed download URL and informations. */ -@JsonProperty("otherFileOptions") -val otherFileOptions: kotlin.collections.List? = null + // Unique identifier for each API response. + @JsonProperty("transactionId") + val transactionId: kotlin.String? = null, + @JsonProperty("error") + val error: Fault? = null, + @JsonProperty("warning") + val warning: Fault? = null, + @JsonProperty("bestMatchedFile") + val bestMatchedFile: FileInfo? = null, + // Container for file Pre-signed download URL and informations. + @JsonProperty("otherFileOptions") + val otherFileOptions: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var transactionId: kotlin.String? = null, + private var error: Fault? = null, + private var warning: Fault? = null, + private var bestMatchedFile: FileInfo? = null, + private var otherFileOptions: kotlin.collections.List? = null, + ) { + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } + fun error(error: Fault?) = apply { this.error = error } - } + fun warning(warning: Fault?) = apply { this.warning = warning } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun bestMatchedFile(bestMatchedFile: FileInfo?) = apply { this.bestMatchedFile = bestMatchedFile } - class Builder( - private var transactionId: kotlin.String? = null, - private var error: Fault? = null, - private var warning: Fault? = null, - private var bestMatchedFile: FileInfo? = null, - private var otherFileOptions: kotlin.collections.List? = null - ) { - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - fun error(error: Fault?) = apply { this.error = error } - fun warning(warning: Fault?) = apply { this.warning = warning } - fun bestMatchedFile(bestMatchedFile: FileInfo?) = apply { this.bestMatchedFile = bestMatchedFile } - fun otherFileOptions(otherFileOptions: kotlin.collections.List?) = apply { this.otherFileOptions = otherFileOptions } + fun otherFileOptions(otherFileOptions: kotlin.collections.List?) = apply { this.otherFileOptions = otherFileOptions } - fun build(): PresignedUrlResponse { - val instance = PresignedUrlResponse( - transactionId = transactionId, - error = error, - warning = warning, - bestMatchedFile = bestMatchedFile, - otherFileOptions = otherFileOptions - ) + fun build(): PresignedUrlResponse { + val instance = + PresignedUrlResponse( + transactionId = transactionId, + error = error, + warning = warning, + bestMatchedFile = bestMatchedFile, + otherFileOptions = otherFileOptions, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( transactionId = transactionId, error = error, warning = warning, bestMatchedFile = bestMatchedFile, - otherFileOptions = otherFileOptions - ) + otherFileOptions = otherFileOptions, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt index 79eb0c98b..8fc5ca7eb 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Price.kt @@ -16,114 +16,74 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Pricing information for the rental. - * @param totalPrice - * @param ratePeriodUnitPrice - * @param basePrice - * @param taxesAndFees - * @param totalPriceDueAtBooking + * @param totalPrice + * @param ratePeriodUnitPrice + * @param basePrice + * @param taxesAndFees + * @param totalPriceDueAtBooking */ data class Price( - @JsonProperty("TotalPrice") -val totalPrice: - CarsMoney -, - - @JsonProperty("RatePeriodUnitPrice") -val ratePeriodUnitPrice: CarsMoney? = null, - - @JsonProperty("BasePrice") -val basePrice: CarsMoney? = null, - - @JsonProperty("TaxesAndFees") -val taxesAndFees: CarsMoney? = null, - - @JsonProperty("TotalPriceDueAtBooking") -val totalPriceDueAtBooking: CarsMoney? = null + @JsonProperty("TotalPrice") + val totalPrice: CarsMoney, + @JsonProperty("RatePeriodUnitPrice") + val ratePeriodUnitPrice: CarsMoney? = null, + @JsonProperty("BasePrice") + val basePrice: CarsMoney? = null, + @JsonProperty("TaxesAndFees") + val taxesAndFees: CarsMoney? = null, + @JsonProperty("TotalPriceDueAtBooking") + val totalPriceDueAtBooking: CarsMoney? = null, ) { - - - init { - require(totalPrice != null) { "totalPrice must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + require(totalPrice != null) { "totalPrice must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var totalPrice: CarsMoney? = null, + private var ratePeriodUnitPrice: CarsMoney? = null, + private var basePrice: CarsMoney? = null, + private var taxesAndFees: CarsMoney? = null, + private var totalPriceDueAtBooking: CarsMoney? = null, + ) { + fun totalPrice(totalPrice: CarsMoney) = apply { this.totalPrice = totalPrice } + fun ratePeriodUnitPrice(ratePeriodUnitPrice: CarsMoney?) = apply { this.ratePeriodUnitPrice = ratePeriodUnitPrice } - } + fun basePrice(basePrice: CarsMoney?) = apply { this.basePrice = basePrice } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun taxesAndFees(taxesAndFees: CarsMoney?) = apply { this.taxesAndFees = taxesAndFees } - class Builder( - private var totalPrice: CarsMoney? = null, - private var ratePeriodUnitPrice: CarsMoney? = null, - private var basePrice: CarsMoney? = null, - private var taxesAndFees: CarsMoney? = null, - private var totalPriceDueAtBooking: CarsMoney? = null - ) { - fun totalPrice(totalPrice: CarsMoney) = apply { this.totalPrice = totalPrice } - fun ratePeriodUnitPrice(ratePeriodUnitPrice: CarsMoney?) = apply { this.ratePeriodUnitPrice = ratePeriodUnitPrice } - fun basePrice(basePrice: CarsMoney?) = apply { this.basePrice = basePrice } - fun taxesAndFees(taxesAndFees: CarsMoney?) = apply { this.taxesAndFees = taxesAndFees } - fun totalPriceDueAtBooking(totalPriceDueAtBooking: CarsMoney?) = apply { this.totalPriceDueAtBooking = totalPriceDueAtBooking } + fun totalPriceDueAtBooking(totalPriceDueAtBooking: CarsMoney?) = apply { this.totalPriceDueAtBooking = totalPriceDueAtBooking } - fun build(): Price { - val instance = Price( - totalPrice = totalPrice!!, - ratePeriodUnitPrice = ratePeriodUnitPrice, - basePrice = basePrice, - taxesAndFees = taxesAndFees, - totalPriceDueAtBooking = totalPriceDueAtBooking - ) + fun build(): Price { + val instance = + Price( + totalPrice = totalPrice!!, + ratePeriodUnitPrice = ratePeriodUnitPrice, + basePrice = basePrice, + taxesAndFees = taxesAndFees, + totalPriceDueAtBooking = totalPriceDueAtBooking, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( totalPrice = totalPrice!!, ratePeriodUnitPrice = ratePeriodUnitPrice, basePrice = basePrice, taxesAndFees = taxesAndFees, - totalPriceDueAtBooking = totalPriceDueAtBooking - ) + totalPriceDueAtBooking = totalPriceDueAtBooking, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt index 0af96b75d..367851e3c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Promotion.kt @@ -16,67 +16,50 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.PromotionAmount - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param description The description of the promotion. - * @param amount +* + * @param description The description of the promotion. + * @param amount */ data class Promotion( - /* The description of the promotion. */ -@JsonProperty("Description") -val description: kotlin.String? = null, - - @JsonProperty("Amount") -val amount: PromotionAmount? = null + // The description of the promotion. + @JsonProperty("Description") + val description: kotlin.String? = null, + @JsonProperty("Amount") + val amount: PromotionAmount? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var description: kotlin.String? = null, - private var amount: PromotionAmount? = null - ) { - fun description(description: kotlin.String?) = apply { this.description = description } - fun amount(amount: PromotionAmount?) = apply { this.amount = amount } + class Builder( + private var description: kotlin.String? = null, + private var amount: PromotionAmount? = null, + ) { + fun description(description: kotlin.String?) = apply { this.description = description } - fun build(): Promotion { - val instance = Promotion( - description = description, - amount = amount - ) + fun amount(amount: PromotionAmount?) = apply { this.amount = amount } - return instance - } + fun build(): Promotion { + val instance = + Promotion( + description = description, + amount = amount, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( description = description, - amount = amount - ) + amount = amount, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt index 5581719ca..a05e7bcd8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PromotionAmount.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class PromotionAmount( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): PromotionAmount { - val instance = PromotionAmount( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): PromotionAmount { + val instance = + PromotionAmount( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt index 9c42ead46..98734baca 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Property.kt @@ -16,114 +16,92 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.LodgingRoomType - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for information on each offered hotel. - * @param id The unique property identifier used to designate a single property. - * @param status Represents whether the offer is currently available. - * @param roomTypes Container for all of available room types. + * @param id The unique property identifier used to designate a single property. + * @param status Represents whether the offer is currently available. + * @param roomTypes Container for all of available room types. */ data class Property( - /* The unique property identifier used to designate a single property. */ -@JsonProperty("Id") -val id: kotlin.String? = null, - - /* Represents whether the offer is currently available. */ -@JsonProperty("Status") -val status: Property.Status? = null, - - /* Container for all of available room types. */ -@JsonProperty("RoomTypes") -val roomTypes: kotlin.collections.List? = null + // The unique property identifier used to designate a single property. + @JsonProperty("Id") + val id: kotlin.String? = null, + // Represents whether the offer is currently available. + @JsonProperty("Status") + val status: Property.Status? = null, + // Container for all of available room types. + @JsonProperty("RoomTypes") + val roomTypes: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var id: kotlin.String? = null, + private var status: Property.Status? = null, + private var roomTypes: kotlin.collections.List? = null, + ) { + fun id(id: kotlin.String?) = apply { this.id = id } + fun status(status: Property.Status?) = apply { this.status = status } + fun roomTypes(roomTypes: kotlin.collections.List?) = apply { this.roomTypes = roomTypes } + fun build(): Property { + val instance = + Property( + id = id, + status = status, + roomTypes = roomTypes, + ) + return instance + } + } + fun toBuilder() = + Builder( + id = id, + status = status, + roomTypes = roomTypes, + ) + /** + * Represents whether the offer is currently available. + * Values: AVAILABLE,NOT_AVAILABLE,ERROR,NUMBER_OF_ADULTS_NOT_ACCEPTED,NUMBER_OF_CHILDREN_NOT_ACCEPTED,NUMBER_OF_INFANTS_NOT_ACCEPTED,NUMBER_OF_PERSONS_NOT_ACCEPTED,CHECK_IN_AGE_NOT_ACCEPTED + */ + enum class Status( + val value: kotlin.String, + ) { + @JsonProperty("AVAILABLE") + AVAILABLE("AVAILABLE"), + @JsonProperty("NOT_AVAILABLE") + NOT_AVAILABLE("NOT_AVAILABLE"), + @JsonProperty("ERROR") + ERROR("ERROR"), + @JsonProperty("NUMBER_OF_ADULTS_NOT_ACCEPTED") + NUMBER_OF_ADULTS_NOT_ACCEPTED("NUMBER_OF_ADULTS_NOT_ACCEPTED"), - } + @JsonProperty("NUMBER_OF_CHILDREN_NOT_ACCEPTED") + NUMBER_OF_CHILDREN_NOT_ACCEPTED("NUMBER_OF_CHILDREN_NOT_ACCEPTED"), - companion object { - @JvmStatic - fun builder() = Builder() - } + @JsonProperty("NUMBER_OF_INFANTS_NOT_ACCEPTED") + NUMBER_OF_INFANTS_NOT_ACCEPTED("NUMBER_OF_INFANTS_NOT_ACCEPTED"), - class Builder( - private var id: kotlin.String? = null, - private var status: Property.Status? = null, - private var roomTypes: kotlin.collections.List? = null - ) { - fun id(id: kotlin.String?) = apply { this.id = id } - fun status(status: Property.Status?) = apply { this.status = status } - fun roomTypes(roomTypes: kotlin.collections.List?) = apply { this.roomTypes = roomTypes } - - fun build(): Property { - val instance = Property( - id = id, - status = status, - roomTypes = roomTypes - ) + @JsonProperty("NUMBER_OF_PERSONS_NOT_ACCEPTED") + NUMBER_OF_PERSONS_NOT_ACCEPTED("NUMBER_OF_PERSONS_NOT_ACCEPTED"), - return instance - } + @JsonProperty("CHECK_IN_AGE_NOT_ACCEPTED") + CHECK_IN_AGE_NOT_ACCEPTED("CHECK_IN_AGE_NOT_ACCEPTED"), } - - fun toBuilder() = Builder( - id = id, - status = status, - roomTypes = roomTypes - ) - - /** - * Represents whether the offer is currently available. - * Values: AVAILABLE,NOT_AVAILABLE,ERROR,NUMBER_OF_ADULTS_NOT_ACCEPTED,NUMBER_OF_CHILDREN_NOT_ACCEPTED,NUMBER_OF_INFANTS_NOT_ACCEPTED,NUMBER_OF_PERSONS_NOT_ACCEPTED,CHECK_IN_AGE_NOT_ACCEPTED - */ - enum class Status(val value: kotlin.String) { - @JsonProperty("AVAILABLE") - AVAILABLE("AVAILABLE"), - - @JsonProperty("NOT_AVAILABLE") - NOT_AVAILABLE("NOT_AVAILABLE"), - - @JsonProperty("ERROR") - ERROR("ERROR"), - - @JsonProperty("NUMBER_OF_ADULTS_NOT_ACCEPTED") - NUMBER_OF_ADULTS_NOT_ACCEPTED("NUMBER_OF_ADULTS_NOT_ACCEPTED"), - - @JsonProperty("NUMBER_OF_CHILDREN_NOT_ACCEPTED") - NUMBER_OF_CHILDREN_NOT_ACCEPTED("NUMBER_OF_CHILDREN_NOT_ACCEPTED"), - - @JsonProperty("NUMBER_OF_INFANTS_NOT_ACCEPTED") - NUMBER_OF_INFANTS_NOT_ACCEPTED("NUMBER_OF_INFANTS_NOT_ACCEPTED"), - - @JsonProperty("NUMBER_OF_PERSONS_NOT_ACCEPTED") - NUMBER_OF_PERSONS_NOT_ACCEPTED("NUMBER_OF_PERSONS_NOT_ACCEPTED"), - - @JsonProperty("CHECK_IN_AGE_NOT_ACCEPTED") - CHECK_IN_AGE_NOT_ACCEPTED("CHECK_IN_AGE_NOT_ACCEPTED"); - } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt index 1429692b2..fd8c2b682 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyDetails.kt @@ -16,147 +16,95 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.PropertyManager - import com.fasterxml.jackson.annotation.JsonProperty /** -* Container for information about the hotel property detail. It will be shown for Vacation Rental hotel only. - * @param propertyRegistryNumber The registry number of property. - * @param hostLanguages The languages the host of property will speak. - * @param maxOccupancy The maximum number of guests allowed to stay in the property. - * @param numberOfBedrooms The number of bedrooms in the property. - * @param numberOfBathrooms The number of bathrooms in the property. - * @param squareFeet Property area in square feet. - * @param propertyManager +* Container for information about the hotel property detail. It will be shown for Vacation Rental hotel only. + * @param propertyRegistryNumber The registry number of property. + * @param hostLanguages The languages the host of property will speak. + * @param maxOccupancy The maximum number of guests allowed to stay in the property. + * @param numberOfBedrooms The number of bedrooms in the property. + * @param numberOfBathrooms The number of bathrooms in the property. + * @param squareFeet Property area in square feet. + * @param propertyManager */ data class PropertyDetails( - /* The registry number of property. */ -@JsonProperty("PropertyRegistryNumber") -val propertyRegistryNumber: kotlin.String? = null, - - /* The languages the host of property will speak. */ -@JsonProperty("HostLanguages") -val hostLanguages: kotlin.collections.List? = null, - - /* The maximum number of guests allowed to stay in the property. */ -@JsonProperty("MaxOccupancy") -val maxOccupancy: kotlin.Int? = null, - - /* The number of bedrooms in the property. */ -@JsonProperty("NumberOfBedrooms") -val numberOfBedrooms: kotlin.Int? = null, - - /* The number of bathrooms in the property. */ -@JsonProperty("NumberOfBathrooms") -val numberOfBathrooms: kotlin.Int? = null, - - /* Property area in square feet. */ -@JsonProperty("SquareFeet") -val squareFeet: kotlin.String? = null, - - @JsonProperty("PropertyManager") -val propertyManager: PropertyManager? = null + // The registry number of property. + @JsonProperty("PropertyRegistryNumber") + val propertyRegistryNumber: kotlin.String? = null, + // The languages the host of property will speak. + @JsonProperty("HostLanguages") + val hostLanguages: kotlin.collections.List? = null, + // The maximum number of guests allowed to stay in the property. + @JsonProperty("MaxOccupancy") + val maxOccupancy: kotlin.Int? = null, + // The number of bedrooms in the property. + @JsonProperty("NumberOfBedrooms") + val numberOfBedrooms: kotlin.Int? = null, + // The number of bathrooms in the property. + @JsonProperty("NumberOfBathrooms") + val numberOfBathrooms: kotlin.Int? = null, + // Property area in square feet. + @JsonProperty("SquareFeet") + val squareFeet: kotlin.String? = null, + @JsonProperty("PropertyManager") + val propertyManager: PropertyManager? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var propertyRegistryNumber: kotlin.String? = null, + private var hostLanguages: kotlin.collections.List? = null, + private var maxOccupancy: kotlin.Int? = null, + private var numberOfBedrooms: kotlin.Int? = null, + private var numberOfBathrooms: kotlin.Int? = null, + private var squareFeet: kotlin.String? = null, + private var propertyManager: PropertyManager? = null, + ) { + fun propertyRegistryNumber(propertyRegistryNumber: kotlin.String?) = apply { this.propertyRegistryNumber = propertyRegistryNumber } + fun hostLanguages(hostLanguages: kotlin.collections.List?) = apply { this.hostLanguages = hostLanguages } + fun maxOccupancy(maxOccupancy: kotlin.Int?) = apply { this.maxOccupancy = maxOccupancy } + fun numberOfBedrooms(numberOfBedrooms: kotlin.Int?) = apply { this.numberOfBedrooms = numberOfBedrooms } - } + fun numberOfBathrooms(numberOfBathrooms: kotlin.Int?) = apply { this.numberOfBathrooms = numberOfBathrooms } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun squareFeet(squareFeet: kotlin.String?) = apply { this.squareFeet = squareFeet } - class Builder( - private var propertyRegistryNumber: kotlin.String? = null, - private var hostLanguages: kotlin.collections.List? = null, - private var maxOccupancy: kotlin.Int? = null, - private var numberOfBedrooms: kotlin.Int? = null, - private var numberOfBathrooms: kotlin.Int? = null, - private var squareFeet: kotlin.String? = null, - private var propertyManager: PropertyManager? = null - ) { - fun propertyRegistryNumber(propertyRegistryNumber: kotlin.String?) = apply { this.propertyRegistryNumber = propertyRegistryNumber } - fun hostLanguages(hostLanguages: kotlin.collections.List?) = apply { this.hostLanguages = hostLanguages } - fun maxOccupancy(maxOccupancy: kotlin.Int?) = apply { this.maxOccupancy = maxOccupancy } - fun numberOfBedrooms(numberOfBedrooms: kotlin.Int?) = apply { this.numberOfBedrooms = numberOfBedrooms } - fun numberOfBathrooms(numberOfBathrooms: kotlin.Int?) = apply { this.numberOfBathrooms = numberOfBathrooms } - fun squareFeet(squareFeet: kotlin.String?) = apply { this.squareFeet = squareFeet } - fun propertyManager(propertyManager: PropertyManager?) = apply { this.propertyManager = propertyManager } + fun propertyManager(propertyManager: PropertyManager?) = apply { this.propertyManager = propertyManager } - fun build(): PropertyDetails { - val instance = PropertyDetails( - propertyRegistryNumber = propertyRegistryNumber, - hostLanguages = hostLanguages, - maxOccupancy = maxOccupancy, - numberOfBedrooms = numberOfBedrooms, - numberOfBathrooms = numberOfBathrooms, - squareFeet = squareFeet, - propertyManager = propertyManager - ) + fun build(): PropertyDetails { + val instance = + PropertyDetails( + propertyRegistryNumber = propertyRegistryNumber, + hostLanguages = hostLanguages, + maxOccupancy = maxOccupancy, + numberOfBedrooms = numberOfBedrooms, + numberOfBathrooms = numberOfBathrooms, + squareFeet = squareFeet, + propertyManager = propertyManager, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( propertyRegistryNumber = propertyRegistryNumber, hostLanguages = hostLanguages, maxOccupancy = maxOccupancy, numberOfBedrooms = numberOfBedrooms, numberOfBathrooms = numberOfBathrooms, squareFeet = squareFeet, - propertyManager = propertyManager - ) + propertyManager = propertyManager, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt index fde690382..edbddd768 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PropertyManager.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for information about the property manager. It will be shown for Vacation Rental hotel only. - * @param name The name of the property manager. - * @param calendarLastUpdated The latest updated date. - * @param photoUrl The URL for property manager's photo. + * @param name The name of the property manager. + * @param calendarLastUpdated The latest updated date. + * @param photoUrl The URL for property manager's photo. */ data class PropertyManager( - /* The name of the property manager. */ -@JsonProperty("Name") -val name: kotlin.String? = null, - - /* The latest updated date. */ -@JsonProperty("CalendarLastUpdated") -val calendarLastUpdated: java.time.LocalDate? = null, - - /* The URL for property manager's photo. */ -@JsonProperty("PhotoUrl") -val photoUrl: kotlin.String? = null + // The name of the property manager. + @JsonProperty("Name") + val name: kotlin.String? = null, + // The latest updated date. + @JsonProperty("CalendarLastUpdated") + val calendarLastUpdated: java.time.LocalDate? = null, + // The URL for property manager's photo. + @JsonProperty("PhotoUrl") + val photoUrl: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var name: kotlin.String? = null, - private var calendarLastUpdated: java.time.LocalDate? = null, - private var photoUrl: kotlin.String? = null - ) { - fun name(name: kotlin.String?) = apply { this.name = name } - fun calendarLastUpdated(calendarLastUpdated: java.time.LocalDate?) = apply { this.calendarLastUpdated = calendarLastUpdated } - fun photoUrl(photoUrl: kotlin.String?) = apply { this.photoUrl = photoUrl } + class Builder( + private var name: kotlin.String? = null, + private var calendarLastUpdated: java.time.LocalDate? = null, + private var photoUrl: kotlin.String? = null, + ) { + fun name(name: kotlin.String?) = apply { this.name = name } - fun build(): PropertyManager { - val instance = PropertyManager( - name = name, - calendarLastUpdated = calendarLastUpdated, - photoUrl = photoUrl - ) + fun calendarLastUpdated(calendarLastUpdated: java.time.LocalDate?) = apply { this.calendarLastUpdated = calendarLastUpdated } - return instance - } + fun photoUrl(photoUrl: kotlin.String?) = apply { this.photoUrl = photoUrl } + + fun build(): PropertyManager { + val instance = + PropertyManager( + name = name, + calendarLastUpdated = calendarLastUpdated, + photoUrl = photoUrl, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( name = name, calendarLastUpdated = calendarLastUpdated, - photoUrl = photoUrl - ) + photoUrl = photoUrl, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt index 3b3e3fd31..f4f6ba807 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendar.kt @@ -16,126 +16,99 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.RateCalendarPrice - import com.fasterxml.jackson.annotation.JsonProperty /** * The lowest rate information of requested days - * @param stayDate Stay date for which the price is returned. - * @param price - * @param priceLevel Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile - * @param status Represents whether the offer is currently available. + * @param stayDate Stay date for which the price is returned. + * @param price + * @param priceLevel Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile + * @param status Represents whether the offer is currently available. */ data class RateCalendar( - /* Stay date for which the price is returned. */ -@JsonProperty("StayDate") -val stayDate: java.time.LocalDate? = null, - - @JsonProperty("Price") -val price: RateCalendarPrice? = null, - - /* Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile */ -@JsonProperty("PriceLevel") -val priceLevel: RateCalendar.PriceLevel? = null, - - /* Represents whether the offer is currently available. */ -@JsonProperty("Status") -val status: RateCalendar.Status? = null + // Stay date for which the price is returned. + @JsonProperty("StayDate") + val stayDate: java.time.LocalDate? = null, + @JsonProperty("Price") + val price: RateCalendarPrice? = null, + // Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile + @JsonProperty("PriceLevel") + val priceLevel: RateCalendar.PriceLevel? = null, + // Represents whether the offer is currently available. + @JsonProperty("Status") + val status: RateCalendar.Status? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var stayDate: java.time.LocalDate? = null, + private var price: RateCalendarPrice? = null, + private var priceLevel: RateCalendar.PriceLevel? = null, + private var status: RateCalendar.Status? = null, + ) { + fun stayDate(stayDate: java.time.LocalDate?) = apply { this.stayDate = stayDate } + fun price(price: RateCalendarPrice?) = apply { this.price = price } + fun priceLevel(priceLevel: RateCalendar.PriceLevel?) = apply { this.priceLevel = priceLevel } + fun status(status: RateCalendar.Status?) = apply { this.status = status } + fun build(): RateCalendar { + val instance = + RateCalendar( + stayDate = stayDate, + price = price, + priceLevel = priceLevel, + status = status, + ) + return instance + } } - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var stayDate: java.time.LocalDate? = null, - private var price: RateCalendarPrice? = null, - private var priceLevel: RateCalendar.PriceLevel? = null, - private var status: RateCalendar.Status? = null - ) { - fun stayDate(stayDate: java.time.LocalDate?) = apply { this.stayDate = stayDate } - fun price(price: RateCalendarPrice?) = apply { this.price = price } - fun priceLevel(priceLevel: RateCalendar.PriceLevel?) = apply { this.priceLevel = priceLevel } - fun status(status: RateCalendar.Status?) = apply { this.status = status } - - fun build(): RateCalendar { - val instance = RateCalendar( + fun toBuilder() = + Builder( stayDate = stayDate, price = price, priceLevel = priceLevel, - status = status - ) - - return instance + status = status, + ) + + /** + * Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile + * Values: HIGH,MEDIUM,LOW + */ + enum class PriceLevel( + val value: kotlin.String, + ) { + @JsonProperty("HIGH") + HIGH("HIGH"), + + @JsonProperty("MEDIUM") + MEDIUM("MEDIUM"), + + @JsonProperty("LOW") + LOW("LOW"), } - } - - fun toBuilder() = Builder( - stayDate = stayDate, - price = price, - priceLevel = priceLevel, - status = status - ) - /** - * Indicates how that day's price compares to the other lowest price for that hotel over the searched date range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: - HIGH: 65th percentile+ - MEDIUM: 30th Percentile+ - LOW: Anything lower than 30th percentile - * Values: HIGH,MEDIUM,LOW - */ - enum class PriceLevel(val value: kotlin.String) { - @JsonProperty("HIGH") - HIGH("HIGH"), - - @JsonProperty("MEDIUM") - MEDIUM("MEDIUM"), - - @JsonProperty("LOW") - LOW("LOW"); - } - - /** - * Represents whether the offer is currently available. - * Values: AVAILABLE,NOT_AVAILABLE - */ - enum class Status(val value: kotlin.String) { - @JsonProperty("AVAILABLE") - AVAILABLE("AVAILABLE"), - - @JsonProperty("NOT_AVAILABLE") - NOT_AVAILABLE("NOT_AVAILABLE"); - } + /** + * Represents whether the offer is currently available. + * Values: AVAILABLE,NOT_AVAILABLE + */ + enum class Status( + val value: kotlin.String, + ) { + @JsonProperty("AVAILABLE") + AVAILABLE("AVAILABLE"), + + @JsonProperty("NOT_AVAILABLE") + NOT_AVAILABLE("NOT_AVAILABLE"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt index 84a10492e..6a009c1d3 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarPrice.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The total price of the corresponding date. - * @param currency The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. - * @param localCurrencyPrice +* + * @param `value` The total price of the corresponding date. + * @param currency The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. + * @param localCurrencyPrice */ data class RateCalendarPrice( - /* The total price of the corresponding date. */ -@JsonProperty("Value") -val `value`: kotlin.Any? = null, - - /* The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. */ -@JsonProperty("Currency") -val currency: kotlin.Any? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The total price of the corresponding date. + @JsonProperty("Value") + val `value`: kotlin.Any? = null, + // The ISO 4217 Currency Code that the Value is expressed in. See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) for a full list of supported currencies. + @JsonProperty("Currency") + val currency: kotlin.Any? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.Any? = null, - private var currency: kotlin.Any? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.Any?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.Any?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.Any? = null, + private var currency: kotlin.Any? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.Any?) = apply { this.`value` = `value` } - fun build(): RateCalendarPrice { - val instance = RateCalendarPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.Any?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RateCalendarPrice { + val instance = + RateCalendarPrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt index 59dc9b930..41222ce07 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateCalendarResponse.kt @@ -17,84 +17,60 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.HotelRateCalendar import com.expediagroup.sdk.xap.models.Warning - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param transactionId Unique identifier for the transaction. - * @param rateCalendars Container for all hotel rate calendar data. +* + * @param warnings There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param transactionId Unique identifier for the transaction. + * @param rateCalendars Container for all hotel rate calendar data. */ data class RateCalendarResponse( - /* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. */ -@JsonProperty("Warnings") -val warnings: kotlin.collections.List? = null, - - /* Unique identifier for the transaction. */ -@JsonProperty("TransactionId") -val transactionId: kotlin.String? = null, - - /* Container for all hotel rate calendar data. */ -@JsonProperty("RateCalendars") -val rateCalendars: kotlin.collections.List? = null + // There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + @JsonProperty("Warnings") + val warnings: kotlin.collections.List? = null, + // Unique identifier for the transaction. + @JsonProperty("TransactionId") + val transactionId: kotlin.String? = null, + // Container for all hotel rate calendar data. + @JsonProperty("RateCalendars") + val rateCalendars: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var warnings: kotlin.collections.List? = null, - private var transactionId: kotlin.String? = null, - private var rateCalendars: kotlin.collections.List? = null - ) { - fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - fun rateCalendars(rateCalendars: kotlin.collections.List?) = apply { this.rateCalendars = rateCalendars } + class Builder( + private var warnings: kotlin.collections.List? = null, + private var transactionId: kotlin.String? = null, + private var rateCalendars: kotlin.collections.List? = null, + ) { + fun warnings(warnings: kotlin.collections.List?) = apply { this.warnings = warnings } - fun build(): RateCalendarResponse { - val instance = RateCalendarResponse( - warnings = warnings, - transactionId = transactionId, - rateCalendars = rateCalendars - ) + fun transactionId(transactionId: kotlin.String?) = apply { this.transactionId = transactionId } - return instance - } + fun rateCalendars(rateCalendars: kotlin.collections.List?) = apply { this.rateCalendars = rateCalendars } + + fun build(): RateCalendarResponse { + val instance = + RateCalendarResponse( + warnings = warnings, + transactionId = transactionId, + rateCalendars = rateCalendars, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( warnings = warnings, transactionId = transactionId, - rateCalendars = rateCalendars - ) + rateCalendars = rateCalendars, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt index ccd4eaebb..b75ebb0e7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RateDetails.kt @@ -17,154 +17,99 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Discount import com.expediagroup.sdk.xap.models.Mileage - import com.fasterxml.jackson.annotation.JsonProperty /** * The rate detail information for a car offer. - * @param ratePeriod Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend - * @param prePay Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). - * @param rateCode Rate plan identifier. - * @param creditCardRequired Indicates whether credit card is required for booking. - * @param discounts List of discount information. - * @param mileages A list of charges to be levied based on the mileage driven. - * @param mobileRate Indicates whether car offer is mobile rate. + * @param ratePeriod Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend + * @param prePay Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). + * @param rateCode Rate plan identifier. + * @param creditCardRequired Indicates whether credit card is required for booking. + * @param discounts List of discount information. + * @param mileages A list of charges to be levied based on the mileage driven. + * @param mobileRate Indicates whether car offer is mobile rate. */ data class RateDetails( - /* Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend */ -@JsonProperty("RatePeriod") -val ratePeriod: - kotlin.String -, - - /* Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). */ -@JsonProperty("PrePay") -val prePay: - kotlin.Boolean -, - - /* Rate plan identifier. */ -@JsonProperty("RateCode") -val rateCode: kotlin.String? = null, - - /* Indicates whether credit card is required for booking. */ -@JsonProperty("CreditCardRequired") -val creditCardRequired: kotlin.Boolean? = null, - - /* List of discount information. */ -@JsonProperty("Discounts") -val discounts: kotlin.collections.List? = null, - - /* A list of charges to be levied based on the mileage driven. */ -@JsonProperty("Mileages") -val mileages: kotlin.collections.List? = null, - - /* Indicates whether car offer is mobile rate. */ -@JsonProperty("MobileRate") -val mobileRate: kotlin.Boolean? = null + // Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend + @JsonProperty("RatePeriod") + val ratePeriod: kotlin.String, + // Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). + @JsonProperty("PrePay") + val prePay: kotlin.Boolean, + // Rate plan identifier. + @JsonProperty("RateCode") + val rateCode: kotlin.String? = null, + // Indicates whether credit card is required for booking. + @JsonProperty("CreditCardRequired") + val creditCardRequired: kotlin.Boolean? = null, + // List of discount information. + @JsonProperty("Discounts") + val discounts: kotlin.collections.List? = null, + // A list of charges to be levied based on the mileage driven. + @JsonProperty("Mileages") + val mileages: kotlin.collections.List? = null, + // Indicates whether car offer is mobile rate. + @JsonProperty("MobileRate") + val mobileRate: kotlin.Boolean? = null, ) { - - - init { - require(ratePeriod != null) { "ratePeriod must not be null" } - - - - - - + require(ratePeriod != null) { "ratePeriod must not be null" } require(prePay != null) { "prePay must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var ratePeriod: kotlin.String? = null, + private var prePay: kotlin.Boolean? = null, + private var rateCode: kotlin.String? = null, + private var creditCardRequired: kotlin.Boolean? = null, + private var discounts: kotlin.collections.List? = null, + private var mileages: kotlin.collections.List? = null, + private var mobileRate: kotlin.Boolean? = null, + ) { + fun ratePeriod(ratePeriod: kotlin.String) = apply { this.ratePeriod = ratePeriod } + fun prePay(prePay: kotlin.Boolean) = apply { this.prePay = prePay } + fun rateCode(rateCode: kotlin.String?) = apply { this.rateCode = rateCode } + fun creditCardRequired(creditCardRequired: kotlin.Boolean?) = apply { this.creditCardRequired = creditCardRequired } + fun discounts(discounts: kotlin.collections.List?) = apply { this.discounts = discounts } + fun mileages(mileages: kotlin.collections.List?) = apply { this.mileages = mileages } + fun mobileRate(mobileRate: kotlin.Boolean?) = apply { this.mobileRate = mobileRate } + fun build(): RateDetails { + val instance = + RateDetails( + ratePeriod = ratePeriod!!, + prePay = prePay!!, + rateCode = rateCode, + creditCardRequired = creditCardRequired, + discounts = discounts, + mileages = mileages, + mobileRate = mobileRate, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var ratePeriod: kotlin.String? = null, - private var prePay: kotlin.Boolean? = null, - private var rateCode: kotlin.String? = null, - private var creditCardRequired: kotlin.Boolean? = null, - private var discounts: kotlin.collections.List? = null, - private var mileages: kotlin.collections.List? = null, - private var mobileRate: kotlin.Boolean? = null - ) { - fun ratePeriod(ratePeriod: kotlin.String) = apply { this.ratePeriod = ratePeriod } - fun prePay(prePay: kotlin.Boolean) = apply { this.prePay = prePay } - fun rateCode(rateCode: kotlin.String?) = apply { this.rateCode = rateCode } - fun creditCardRequired(creditCardRequired: kotlin.Boolean?) = apply { this.creditCardRequired = creditCardRequired } - fun discounts(discounts: kotlin.collections.List?) = apply { this.discounts = discounts } - fun mileages(mileages: kotlin.collections.List?) = apply { this.mileages = mileages } - fun mobileRate(mobileRate: kotlin.Boolean?) = apply { this.mobileRate = mobileRate } - - fun build(): RateDetails { - val instance = RateDetails( - ratePeriod = ratePeriod!!, - prePay = prePay!!, - rateCode = rateCode, - creditCardRequired = creditCardRequired, - discounts = discounts, - mileages = mileages, - mobileRate = mobileRate - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( ratePeriod = ratePeriod!!, prePay = prePay!!, rateCode = rateCode, creditCardRequired = creditCardRequired, discounts = discounts, mileages = mileages, - mobileRate = mobileRate - ) + mobileRate = mobileRate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt index 9c79ecf29..95999640a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlan.kt @@ -22,418 +22,254 @@ import com.expediagroup.sdk.xap.models.RatePlanAmenitiesInner import com.expediagroup.sdk.xap.models.RatePlanPrice import com.expediagroup.sdk.xap.models.RatePlanStandalonePrice import com.expediagroup.sdk.xap.models.StayDates - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for information on each rate plan. - * @param roomTypeId The room type identifier. - * @param ratePlanId The rate plan identifier. - * @param rateRuleId The identifier of rate rule. - * @param inventorySourceId The identification number of the source that provides the rate plan. - * @param inventorySourceCode The source name that provided the rate plan. - * @param stayDates - * @param remainingCount The number of rooms remaining through Expedia for this room type. **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are more than 100 rooms available within bookable Expedia inventory. **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. - * @param price - * @param memberOnlyDeal Indicates whether the rate is for member only. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param promotions All promotion information of the `ratePlan`. - * @param standalonePrice - * @param taxesAndFeesInclusive Indicates whether taxes and fees are included in base rate. - * @param guaranteeText Text description for any deposit information provide by the property (if applicable). - * @param paymentMethod Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` - * @param paymentTime The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion - * @param fullDepositUponBooking It will be true if PaymentSchedule has one installment and the value of \"Due\" is booking date, otherwise, it will be false. - * @param paymentSchedule Contains information on the payment schedule. - * @param reserveWithDeposit Indicates whether this rate plan need deposit to reserve. - * @param freeInternet Indicates whether the price of the room includes free Internet. (either wireless or wired) - * @param freeWiFi Indicates whether the price of the room includes free wireless Internet access. - * @param freeInternetDetails The localized details for the free internet amenity (only shown when FreeInternet = true). You can find a link to the complete list of Free Internet Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - * @param freeParking Indicates whether the price of the room includes free parking. - * @param freeBreakfast Indicates whether the price of the room includes free breakfast. - * @param freeBreakfastDetails The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). You can find a link to the complete list of Free Breakfast Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). - * @param hcomRewardsEarn Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) - * @param hcomRewardsBurn Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) - * @param cancellationPolicy - * @param amenities The amenities of the `rateplan`. + * @param roomTypeId The room type identifier. + * @param ratePlanId The rate plan identifier. + * @param rateRuleId The identifier of rate rule. + * @param inventorySourceId The identification number of the source that provides the rate plan. + * @param inventorySourceCode The source name that provided the rate plan. + * @param stayDates + * @param remainingCount The number of rooms remaining through Expedia for this room type. **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are more than 100 rooms available within bookable Expedia inventory. **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. + * @param price + * @param memberOnlyDeal Indicates whether the rate is for member only. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + * @param promotions All promotion information of the `ratePlan`. + * @param standalonePrice + * @param taxesAndFeesInclusive Indicates whether taxes and fees are included in base rate. + * @param guaranteeText Text description for any deposit information provide by the property (if applicable). + * @param paymentMethod Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` + * @param paymentTime The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion + * @param fullDepositUponBooking It will be true if PaymentSchedule has one installment and the value of \"Due\" is booking date, otherwise, it will be false. + * @param paymentSchedule Contains information on the payment schedule. + * @param reserveWithDeposit Indicates whether this rate plan need deposit to reserve. + * @param freeInternet Indicates whether the price of the room includes free Internet. (either wireless or wired) + * @param freeWiFi Indicates whether the price of the room includes free wireless Internet access. + * @param freeInternetDetails The localized details for the free internet amenity (only shown when FreeInternet = true). You can find a link to the complete list of Free Internet Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + * @param freeParking Indicates whether the price of the room includes free parking. + * @param freeBreakfast Indicates whether the price of the room includes free breakfast. + * @param freeBreakfastDetails The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). You can find a link to the complete list of Free Breakfast Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + * @param hcomRewardsEarn Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) + * @param hcomRewardsBurn Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) + * @param cancellationPolicy + * @param amenities The amenities of the `rateplan`. */ data class RatePlan( - /* The room type identifier. */ -@JsonProperty("RoomTypeId") -val roomTypeId: kotlin.String? = null, - - /* The rate plan identifier. */ -@JsonProperty("RatePlanId") -val ratePlanId: kotlin.String? = null, - - /* The identifier of rate rule. */ -@JsonProperty("RateRuleId") -val rateRuleId: kotlin.String? = null, - - /* The identification number of the source that provides the rate plan. */ -@JsonProperty("InventorySourceId") -val inventorySourceId: kotlin.String? = null, - - /* The source name that provided the rate plan. */ -@JsonProperty("InventorySourceCode") -val inventorySourceCode: kotlin.String? = null, - - @JsonProperty("StayDates") -val stayDates: StayDates? = null, - - /* The number of rooms remaining through Expedia for this room type. **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are more than 100 rooms available within bookable Expedia inventory. **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. */ -@JsonProperty("RemainingCount") -val remainingCount: kotlin.Int? = null, - - @JsonProperty("Price") -val price: RatePlanPrice? = null, - - /* Indicates whether the rate is for member only. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. */ -@JsonProperty("MemberOnlyDeal") -val memberOnlyDeal: kotlin.Boolean? = null, - - /* All promotion information of the `ratePlan`. */ -@JsonProperty("Promotions") -val promotions: kotlin.collections.List? = null, - - @JsonProperty("StandalonePrice") -val standalonePrice: RatePlanStandalonePrice? = null, - - /* Indicates whether taxes and fees are included in base rate. */ -@JsonProperty("TaxesAndFeesInclusive") -val taxesAndFeesInclusive: kotlin.Boolean? = null, - - /* Text description for any deposit information provide by the property (if applicable). */ -@JsonProperty("GuaranteeText") -val guaranteeText: kotlin.String? = null, - - /* Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` */ -@JsonProperty("PaymentMethod") -val paymentMethod: RatePlan.PaymentMethod? = null, - - /* The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion */ -@JsonProperty("PaymentTime") -val paymentTime: RatePlan.PaymentTime? = null, - - /* It will be true if PaymentSchedule has one installment and the value of \"Due\" is booking date, otherwise, it will be false. */ -@JsonProperty("FullDepositUponBooking") -val fullDepositUponBooking: kotlin.Boolean? = null, - - /* Contains information on the payment schedule. */ -@JsonProperty("PaymentSchedule") -val paymentSchedule: kotlin.collections.List? = null, - - /* Indicates whether this rate plan need deposit to reserve. */ -@JsonProperty("ReserveWithDeposit") -val reserveWithDeposit: kotlin.Boolean? = null, - - /* Indicates whether the price of the room includes free Internet. (either wireless or wired) */ -@JsonProperty("FreeInternet") -val freeInternet: kotlin.Boolean? = null, - - /* Indicates whether the price of the room includes free wireless Internet access. */ -@JsonProperty("FreeWiFi") -val freeWiFi: kotlin.Boolean? = null, - - /* The localized details for the free internet amenity (only shown when FreeInternet = true). You can find a link to the complete list of Free Internet Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). */ -@JsonProperty("FreeInternetDetails") -val freeInternetDetails: kotlin.collections.List? = null, - - /* Indicates whether the price of the room includes free parking. */ -@JsonProperty("FreeParking") -val freeParking: kotlin.Boolean? = null, - - /* Indicates whether the price of the room includes free breakfast. */ -@JsonProperty("FreeBreakfast") -val freeBreakfast: kotlin.Boolean? = null, - - /* The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). You can find a link to the complete list of Free Breakfast Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). */ -@JsonProperty("FreeBreakfastDetails") -val freeBreakfastDetails: kotlin.collections.List? = null, - - /* Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) */ -@JsonProperty("HcomRewardsEarn") -val hcomRewardsEarn: kotlin.Boolean? = null, - - /* Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) */ -@JsonProperty("HcomRewardsBurn") -val hcomRewardsBurn: kotlin.Boolean? = null, - - @JsonProperty("CancellationPolicy") -val cancellationPolicy: CancellationPolicy? = null, - - /* The amenities of the `rateplan`. */ -@JsonProperty("Amenities") -val amenities: kotlin.collections.List? = null + // The room type identifier. + @JsonProperty("RoomTypeId") + val roomTypeId: kotlin.String? = null, + // The rate plan identifier. + @JsonProperty("RatePlanId") + val ratePlanId: kotlin.String? = null, + // The identifier of rate rule. + @JsonProperty("RateRuleId") + val rateRuleId: kotlin.String? = null, + // The identification number of the source that provides the rate plan. + @JsonProperty("InventorySourceId") + val inventorySourceId: kotlin.String? = null, + // The source name that provided the rate plan. + @JsonProperty("InventorySourceCode") + val inventorySourceCode: kotlin.String? = null, + @JsonProperty("StayDates") + val stayDates: StayDates? = null, + // The number of rooms remaining through Expedia for this room type. **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are more than 100 rooms available within bookable Expedia inventory. **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. + @JsonProperty("RemainingCount") + val remainingCount: kotlin.Int? = null, + @JsonProperty("Price") + val price: RatePlanPrice? = null, + // Indicates whether the rate is for member only. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + @JsonProperty("MemberOnlyDeal") + val memberOnlyDeal: kotlin.Boolean? = null, + // All promotion information of the `ratePlan`. + @JsonProperty("Promotions") + val promotions: kotlin.collections.List? = null, + @JsonProperty("StandalonePrice") + val standalonePrice: RatePlanStandalonePrice? = null, + // Indicates whether taxes and fees are included in base rate. + @JsonProperty("TaxesAndFeesInclusive") + val taxesAndFeesInclusive: kotlin.Boolean? = null, + // Text description for any deposit information provide by the property (if applicable). + @JsonProperty("GuaranteeText") + val guaranteeText: kotlin.String? = null, + // Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` + @JsonProperty("PaymentMethod") + val paymentMethod: RatePlan.PaymentMethod? = null, + // The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion + @JsonProperty("PaymentTime") + val paymentTime: RatePlan.PaymentTime? = null, + // It will be true if PaymentSchedule has one installment and the value of \"Due\" is booking date, otherwise, it will be false. + @JsonProperty("FullDepositUponBooking") + val fullDepositUponBooking: kotlin.Boolean? = null, + // Contains information on the payment schedule. + @JsonProperty("PaymentSchedule") + val paymentSchedule: kotlin.collections.List? = null, + // Indicates whether this rate plan need deposit to reserve. + @JsonProperty("ReserveWithDeposit") + val reserveWithDeposit: kotlin.Boolean? = null, + // Indicates whether the price of the room includes free Internet. (either wireless or wired) + @JsonProperty("FreeInternet") + val freeInternet: kotlin.Boolean? = null, + // Indicates whether the price of the room includes free wireless Internet access. + @JsonProperty("FreeWiFi") + val freeWiFi: kotlin.Boolean? = null, + // The localized details for the free internet amenity (only shown when FreeInternet = true). You can find a link to the complete list of Free Internet Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + @JsonProperty("FreeInternetDetails") + val freeInternetDetails: kotlin.collections.List? = null, + // Indicates whether the price of the room includes free parking. + @JsonProperty("FreeParking") + val freeParking: kotlin.Boolean? = null, + // Indicates whether the price of the room includes free breakfast. + @JsonProperty("FreeBreakfast") + val freeBreakfast: kotlin.Boolean? = null, + // The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). You can find a link to the complete list of Free Breakfast Details in [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + @JsonProperty("FreeBreakfastDetails") + val freeBreakfastDetails: kotlin.collections.List? = null, + // Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) + @JsonProperty("HcomRewardsEarn") + val hcomRewardsEarn: kotlin.Boolean? = null, + // Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) + @JsonProperty("HcomRewardsBurn") + val hcomRewardsBurn: kotlin.Boolean? = null, + @JsonProperty("CancellationPolicy") + val cancellationPolicy: CancellationPolicy? = null, + // The amenities of the `rateplan`. + @JsonProperty("Amenities") + val amenities: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var roomTypeId: kotlin.String? = null, + private var ratePlanId: kotlin.String? = null, + private var rateRuleId: kotlin.String? = null, + private var inventorySourceId: kotlin.String? = null, + private var inventorySourceCode: kotlin.String? = null, + private var stayDates: StayDates? = null, + private var remainingCount: kotlin.Int? = null, + private var price: RatePlanPrice? = null, + private var memberOnlyDeal: kotlin.Boolean? = null, + private var promotions: kotlin.collections.List? = null, + private var standalonePrice: RatePlanStandalonePrice? = null, + private var taxesAndFeesInclusive: kotlin.Boolean? = null, + private var guaranteeText: kotlin.String? = null, + private var paymentMethod: RatePlan.PaymentMethod? = null, + private var paymentTime: RatePlan.PaymentTime? = null, + private var fullDepositUponBooking: kotlin.Boolean? = null, + private var paymentSchedule: kotlin.collections.List? = null, + private var reserveWithDeposit: kotlin.Boolean? = null, + private var freeInternet: kotlin.Boolean? = null, + private var freeWiFi: kotlin.Boolean? = null, + private var freeInternetDetails: kotlin.collections.List? = null, + private var freeParking: kotlin.Boolean? = null, + private var freeBreakfast: kotlin.Boolean? = null, + private var freeBreakfastDetails: kotlin.collections.List? = null, + private var hcomRewardsEarn: kotlin.Boolean? = null, + private var hcomRewardsBurn: kotlin.Boolean? = null, + private var cancellationPolicy: CancellationPolicy? = null, + private var amenities: kotlin.collections.List? = null, + ) { + fun roomTypeId(roomTypeId: kotlin.String?) = apply { this.roomTypeId = roomTypeId } + fun ratePlanId(ratePlanId: kotlin.String?) = apply { this.ratePlanId = ratePlanId } + fun rateRuleId(rateRuleId: kotlin.String?) = apply { this.rateRuleId = rateRuleId } + fun inventorySourceId(inventorySourceId: kotlin.String?) = apply { this.inventorySourceId = inventorySourceId } + fun inventorySourceCode(inventorySourceCode: kotlin.String?) = apply { this.inventorySourceCode = inventorySourceCode } + fun stayDates(stayDates: StayDates?) = apply { this.stayDates = stayDates } + fun remainingCount(remainingCount: kotlin.Int?) = apply { this.remainingCount = remainingCount } + fun price(price: RatePlanPrice?) = apply { this.price = price } + fun memberOnlyDeal(memberOnlyDeal: kotlin.Boolean?) = apply { this.memberOnlyDeal = memberOnlyDeal } + fun promotions(promotions: kotlin.collections.List?) = apply { this.promotions = promotions } + fun standalonePrice(standalonePrice: RatePlanStandalonePrice?) = apply { this.standalonePrice = standalonePrice } + fun taxesAndFeesInclusive(taxesAndFeesInclusive: kotlin.Boolean?) = apply { this.taxesAndFeesInclusive = taxesAndFeesInclusive } + fun guaranteeText(guaranteeText: kotlin.String?) = apply { this.guaranteeText = guaranteeText } + fun paymentMethod(paymentMethod: RatePlan.PaymentMethod?) = apply { this.paymentMethod = paymentMethod } + fun paymentTime(paymentTime: RatePlan.PaymentTime?) = apply { this.paymentTime = paymentTime } + fun fullDepositUponBooking(fullDepositUponBooking: kotlin.Boolean?) = apply { this.fullDepositUponBooking = fullDepositUponBooking } + fun paymentSchedule(paymentSchedule: kotlin.collections.List?) = apply { this.paymentSchedule = paymentSchedule } + fun reserveWithDeposit(reserveWithDeposit: kotlin.Boolean?) = apply { this.reserveWithDeposit = reserveWithDeposit } + fun freeInternet(freeInternet: kotlin.Boolean?) = apply { this.freeInternet = freeInternet } + fun freeWiFi(freeWiFi: kotlin.Boolean?) = apply { this.freeWiFi = freeWiFi } + fun freeInternetDetails(freeInternetDetails: kotlin.collections.List?) = apply { this.freeInternetDetails = freeInternetDetails } + fun freeParking(freeParking: kotlin.Boolean?) = apply { this.freeParking = freeParking } + fun freeBreakfast(freeBreakfast: kotlin.Boolean?) = apply { this.freeBreakfast = freeBreakfast } + fun freeBreakfastDetails(freeBreakfastDetails: kotlin.collections.List?) = apply { this.freeBreakfastDetails = freeBreakfastDetails } + fun hcomRewardsEarn(hcomRewardsEarn: kotlin.Boolean?) = apply { this.hcomRewardsEarn = hcomRewardsEarn } + fun hcomRewardsBurn(hcomRewardsBurn: kotlin.Boolean?) = apply { this.hcomRewardsBurn = hcomRewardsBurn } + fun cancellationPolicy(cancellationPolicy: CancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } + fun amenities(amenities: kotlin.collections.List?) = apply { this.amenities = amenities } - } + fun build(): RatePlan { + val instance = + RatePlan( + roomTypeId = roomTypeId, + ratePlanId = ratePlanId, + rateRuleId = rateRuleId, + inventorySourceId = inventorySourceId, + inventorySourceCode = inventorySourceCode, + stayDates = stayDates, + remainingCount = remainingCount, + price = price, + memberOnlyDeal = memberOnlyDeal, + promotions = promotions, + standalonePrice = standalonePrice, + taxesAndFeesInclusive = taxesAndFeesInclusive, + guaranteeText = guaranteeText, + paymentMethod = paymentMethod, + paymentTime = paymentTime, + fullDepositUponBooking = fullDepositUponBooking, + paymentSchedule = paymentSchedule, + reserveWithDeposit = reserveWithDeposit, + freeInternet = freeInternet, + freeWiFi = freeWiFi, + freeInternetDetails = freeInternetDetails, + freeParking = freeParking, + freeBreakfast = freeBreakfast, + freeBreakfastDetails = freeBreakfastDetails, + hcomRewardsEarn = hcomRewardsEarn, + hcomRewardsBurn = hcomRewardsBurn, + cancellationPolicy = cancellationPolicy, + amenities = amenities, + ) - companion object { - @JvmStatic - fun builder() = Builder() + return instance + } } - class Builder( - private var roomTypeId: kotlin.String? = null, - private var ratePlanId: kotlin.String? = null, - private var rateRuleId: kotlin.String? = null, - private var inventorySourceId: kotlin.String? = null, - private var inventorySourceCode: kotlin.String? = null, - private var stayDates: StayDates? = null, - private var remainingCount: kotlin.Int? = null, - private var price: RatePlanPrice? = null, - private var memberOnlyDeal: kotlin.Boolean? = null, - private var promotions: kotlin.collections.List? = null, - private var standalonePrice: RatePlanStandalonePrice? = null, - private var taxesAndFeesInclusive: kotlin.Boolean? = null, - private var guaranteeText: kotlin.String? = null, - private var paymentMethod: RatePlan.PaymentMethod? = null, - private var paymentTime: RatePlan.PaymentTime? = null, - private var fullDepositUponBooking: kotlin.Boolean? = null, - private var paymentSchedule: kotlin.collections.List? = null, - private var reserveWithDeposit: kotlin.Boolean? = null, - private var freeInternet: kotlin.Boolean? = null, - private var freeWiFi: kotlin.Boolean? = null, - private var freeInternetDetails: kotlin.collections.List? = null, - private var freeParking: kotlin.Boolean? = null, - private var freeBreakfast: kotlin.Boolean? = null, - private var freeBreakfastDetails: kotlin.collections.List? = null, - private var hcomRewardsEarn: kotlin.Boolean? = null, - private var hcomRewardsBurn: kotlin.Boolean? = null, - private var cancellationPolicy: CancellationPolicy? = null, - private var amenities: kotlin.collections.List? = null - ) { - fun roomTypeId(roomTypeId: kotlin.String?) = apply { this.roomTypeId = roomTypeId } - fun ratePlanId(ratePlanId: kotlin.String?) = apply { this.ratePlanId = ratePlanId } - fun rateRuleId(rateRuleId: kotlin.String?) = apply { this.rateRuleId = rateRuleId } - fun inventorySourceId(inventorySourceId: kotlin.String?) = apply { this.inventorySourceId = inventorySourceId } - fun inventorySourceCode(inventorySourceCode: kotlin.String?) = apply { this.inventorySourceCode = inventorySourceCode } - fun stayDates(stayDates: StayDates?) = apply { this.stayDates = stayDates } - fun remainingCount(remainingCount: kotlin.Int?) = apply { this.remainingCount = remainingCount } - fun price(price: RatePlanPrice?) = apply { this.price = price } - fun memberOnlyDeal(memberOnlyDeal: kotlin.Boolean?) = apply { this.memberOnlyDeal = memberOnlyDeal } - fun promotions(promotions: kotlin.collections.List?) = apply { this.promotions = promotions } - fun standalonePrice(standalonePrice: RatePlanStandalonePrice?) = apply { this.standalonePrice = standalonePrice } - fun taxesAndFeesInclusive(taxesAndFeesInclusive: kotlin.Boolean?) = apply { this.taxesAndFeesInclusive = taxesAndFeesInclusive } - fun guaranteeText(guaranteeText: kotlin.String?) = apply { this.guaranteeText = guaranteeText } - fun paymentMethod(paymentMethod: RatePlan.PaymentMethod?) = apply { this.paymentMethod = paymentMethod } - fun paymentTime(paymentTime: RatePlan.PaymentTime?) = apply { this.paymentTime = paymentTime } - fun fullDepositUponBooking(fullDepositUponBooking: kotlin.Boolean?) = apply { this.fullDepositUponBooking = fullDepositUponBooking } - fun paymentSchedule(paymentSchedule: kotlin.collections.List?) = apply { this.paymentSchedule = paymentSchedule } - fun reserveWithDeposit(reserveWithDeposit: kotlin.Boolean?) = apply { this.reserveWithDeposit = reserveWithDeposit } - fun freeInternet(freeInternet: kotlin.Boolean?) = apply { this.freeInternet = freeInternet } - fun freeWiFi(freeWiFi: kotlin.Boolean?) = apply { this.freeWiFi = freeWiFi } - fun freeInternetDetails(freeInternetDetails: kotlin.collections.List?) = apply { this.freeInternetDetails = freeInternetDetails } - fun freeParking(freeParking: kotlin.Boolean?) = apply { this.freeParking = freeParking } - fun freeBreakfast(freeBreakfast: kotlin.Boolean?) = apply { this.freeBreakfast = freeBreakfast } - fun freeBreakfastDetails(freeBreakfastDetails: kotlin.collections.List?) = apply { this.freeBreakfastDetails = freeBreakfastDetails } - fun hcomRewardsEarn(hcomRewardsEarn: kotlin.Boolean?) = apply { this.hcomRewardsEarn = hcomRewardsEarn } - fun hcomRewardsBurn(hcomRewardsBurn: kotlin.Boolean?) = apply { this.hcomRewardsBurn = hcomRewardsBurn } - fun cancellationPolicy(cancellationPolicy: CancellationPolicy?) = apply { this.cancellationPolicy = cancellationPolicy } - fun amenities(amenities: kotlin.collections.List?) = apply { this.amenities = amenities } - - fun build(): RatePlan { - val instance = RatePlan( + fun toBuilder() = + Builder( roomTypeId = roomTypeId, ratePlanId = ratePlanId, rateRuleId = rateRuleId, @@ -461,68 +297,37 @@ val amenities: kotlin.collections.List? = null hcomRewardsEarn = hcomRewardsEarn, hcomRewardsBurn = hcomRewardsBurn, cancellationPolicy = cancellationPolicy, - amenities = amenities - ) - - return instance - } + amenities = amenities, + ) + + /** + * Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` + * Values: ONLINE,HOTEL + */ + enum class PaymentMethod( + val value: kotlin.String, + ) { + @JsonProperty("Online") + ONLINE("Online"), + + @JsonProperty("Hotel") + HOTEL("Hotel"), } - fun toBuilder() = Builder( - roomTypeId = roomTypeId, - ratePlanId = ratePlanId, - rateRuleId = rateRuleId, - inventorySourceId = inventorySourceId, - inventorySourceCode = inventorySourceCode, - stayDates = stayDates, - remainingCount = remainingCount, - price = price, - memberOnlyDeal = memberOnlyDeal, - promotions = promotions, - standalonePrice = standalonePrice, - taxesAndFeesInclusive = taxesAndFeesInclusive, - guaranteeText = guaranteeText, - paymentMethod = paymentMethod, - paymentTime = paymentTime, - fullDepositUponBooking = fullDepositUponBooking, - paymentSchedule = paymentSchedule, - reserveWithDeposit = reserveWithDeposit, - freeInternet = freeInternet, - freeWiFi = freeWiFi, - freeInternetDetails = freeInternetDetails, - freeParking = freeParking, - freeBreakfast = freeBreakfast, - freeBreakfastDetails = freeBreakfastDetails, - hcomRewardsEarn = hcomRewardsEarn, - hcomRewardsBurn = hcomRewardsBurn, - cancellationPolicy = cancellationPolicy, - amenities = amenities - ) - - /** - * Room payment information. The available options are: - Online: Pay at the time of booking - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` - * Values: ONLINE,HOTEL - */ - enum class PaymentMethod(val value: kotlin.String) { - @JsonProperty("Online") - ONLINE("Online"), - - @JsonProperty("Hotel") - HOTEL("Hotel"); - } - - /** - * The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion - * Values: UPON_BOOKING,PAY_LATER,SUPPLIER_DISCRETION - */ - enum class PaymentTime(val value: kotlin.String) { - @JsonProperty("UponBooking") - UPON_BOOKING("UponBooking"), - - @JsonProperty("PayLater") - PAY_LATER("PayLater"), - - @JsonProperty("SupplierDiscretion") - SUPPLIER_DISCRETION("SupplierDiscretion"); - } + /** + * The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: - UponBooking - PayLater - SupplierDiscretion + * Values: UPON_BOOKING,PAY_LATER,SUPPLIER_DISCRETION + */ + enum class PaymentTime( + val value: kotlin.String, + ) { + @JsonProperty("UponBooking") + UPON_BOOKING("UponBooking"), + + @JsonProperty("PayLater") + PAY_LATER("PayLater"), + + @JsonProperty("SupplierDiscretion") + SUPPLIER_DISCRETION("SupplierDiscretion"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt index 426bf6e2b..ddad85122 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanAmenitiesInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param id Amenity ID. - * @param name Amenity Name. +* + * @param id Amenity ID. + * @param name Amenity Name. */ data class RatePlanAmenitiesInner( - /* Amenity ID. */ -@JsonProperty("Id") -val id: kotlin.Any? = null, - - /* Amenity Name. */ -@JsonProperty("Name") -val name: kotlin.Any? = null + // Amenity ID. + @JsonProperty("Id") + val id: kotlin.Any? = null, + // Amenity Name. + @JsonProperty("Name") + val name: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - fun name(name: kotlin.Any?) = apply { this.name = name } + class Builder( + private var id: kotlin.Any? = null, + private var name: kotlin.Any? = null, + ) { + fun id(id: kotlin.Any?) = apply { this.id = id } - fun build(): RatePlanAmenitiesInner { - val instance = RatePlanAmenitiesInner( - id = id, - name = name - ) + fun name(name: kotlin.Any?) = apply { this.name = name } - return instance - } + fun build(): RatePlanAmenitiesInner { + val instance = + RatePlanAmenitiesInner( + id = id, + name = name, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id, - name = name - ) + name = name, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt index 9ad34231b..75b8d7207 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPrice.kt @@ -19,202 +19,122 @@ import com.expediagroup.sdk.xap.models.Money import com.expediagroup.sdk.xap.models.RatePlanPriceNightlyRatesInner import com.expediagroup.sdk.xap.models.RatePlanPriceTaxesAndFeesDetailsInner import com.expediagroup.sdk.xap.models.RoomRates - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for all price components of the rate plan. - * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. - * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. - * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. - * @param totalStrikeOutPrice The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. - * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyStrikeOutRate The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. - * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. - * @param refundableDamageDeposit The refundable damage deposit. - * @param nightlyRates Nightly base rate of the rate plan. - * @param taxesAndFeesDetails Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param roomRates Container for the rate information of all rooms. This is only returned in Lodging Details API. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. + * @param totalStrikeOutPrice The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. + * @param avgNightlyRate The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. + * @param refundableDamageDeposit The refundable damage deposit. + * @param nightlyRates Nightly base rate of the rate plan. + * @param taxesAndFeesDetails Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + * @param roomRates Container for the rate information of all rooms. This is only returned in Lodging Details API. */ data class RatePlanPrice( - /* The price of the rate plan for all occupants, excluding taxes and fees. */ -@JsonProperty("BaseRate") -val baseRate: Money? = null, - - /* The total rate of taxes and fees of the rate plan for all occupants. */ -@JsonProperty("TaxesAndFees") -val taxesAndFees: Money? = null, - - /* The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. */ -@JsonProperty("TotalPrice") -val totalPrice: Money? = null, - - /* The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. */ -@JsonProperty("TotalStrikeOutPrice") -val totalStrikeOutPrice: Money? = null, - - /* The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyRate") -val avgNightlyRate: Money? = null, - - /* The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyStrikeOutRate") -val avgNightlyStrikeOutRate: Money? = null, - - /* The total mandatory fees which will be charged at the hotel for the rate plan. */ -@JsonProperty("HotelMandatoryFees") -val hotelMandatoryFees: Money? = null, - - /* The refundable damage deposit. */ -@JsonProperty("RefundableDamageDeposit") -val refundableDamageDeposit: Money? = null, - - /* Nightly base rate of the rate plan. */ -@JsonProperty("NightlyRates") -val nightlyRates: kotlin.collections.List? = null, - - /* Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. */ -@JsonProperty("TaxesAndFeesDetails") -val taxesAndFeesDetails: kotlin.collections.List? = null, - - /* Container for the rate information of all rooms. This is only returned in Lodging Details API. */ -@JsonProperty("RoomRates") -val roomRates: kotlin.collections.List? = null + // The price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + val baseRate: Money? = null, + // The total rate of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + val taxesAndFees: Money? = null, + // The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. Promotion amount have been deducted from the `TotalPrice` value. + @JsonProperty("TotalPrice") + val totalPrice: Money? = null, + // The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the pre-discount `TaxesAndFees`. + @JsonProperty("TotalStrikeOutPrice") + val totalStrikeOutPrice: Money? = null, + // The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + val avgNightlyRate: Money? = null, + // The average nightly strike out price per night per room of the rate plan, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyStrikeOutRate") + val avgNightlyStrikeOutRate: Money? = null, + // The total mandatory fees which will be charged at the hotel for the rate plan. + @JsonProperty("HotelMandatoryFees") + val hotelMandatoryFees: Money? = null, + // The refundable damage deposit. + @JsonProperty("RefundableDamageDeposit") + val refundableDamageDeposit: Money? = null, + // Nightly base rate of the rate plan. + @JsonProperty("NightlyRates") + val nightlyRates: kotlin.collections.List? = null, + // Container for taxes and fees detail information. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + @JsonProperty("TaxesAndFeesDetails") + val taxesAndFeesDetails: kotlin.collections.List? = null, + // Container for the rate information of all rooms. This is only returned in Lodging Details API. + @JsonProperty("RoomRates") + val roomRates: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var baseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var refundableDamageDeposit: Money? = null, + private var nightlyRates: kotlin.collections.List? = null, + private var taxesAndFeesDetails: kotlin.collections.List? = null, + private var roomRates: kotlin.collections.List? = null, + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } + fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } + fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } - } + fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun roomRates(roomRates: kotlin.collections.List?) = apply { this.roomRates = roomRates } - class Builder( - private var baseRate: Money? = null, - private var taxesAndFees: Money? = null, - private var totalPrice: Money? = null, - private var totalStrikeOutPrice: Money? = null, - private var avgNightlyRate: Money? = null, - private var avgNightlyStrikeOutRate: Money? = null, - private var hotelMandatoryFees: Money? = null, - private var refundableDamageDeposit: Money? = null, - private var nightlyRates: kotlin.collections.List? = null, - private var taxesAndFeesDetails: kotlin.collections.List? = null, - private var roomRates: kotlin.collections.List? = null - ) { - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } - fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - fun roomRates(roomRates: kotlin.collections.List?) = apply { this.roomRates = roomRates } - - fun build(): RatePlanPrice { - val instance = RatePlanPrice( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - refundableDamageDeposit = refundableDamageDeposit, - nightlyRates = nightlyRates, - taxesAndFeesDetails = taxesAndFeesDetails, - roomRates = roomRates - ) + fun build(): RatePlanPrice { + val instance = + RatePlanPrice( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + refundableDamageDeposit = refundableDamageDeposit, + nightlyRates = nightlyRates, + taxesAndFeesDetails = taxesAndFeesDetails, + roomRates = roomRates, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( baseRate = baseRate, taxesAndFees = taxesAndFees, totalPrice = totalPrice, @@ -225,6 +145,6 @@ val roomRates: kotlin.collections.List? = null refundableDamageDeposit = refundableDamageDeposit, nightlyRates = nightlyRates, taxesAndFeesDetails = taxesAndFeesDetails, - roomRates = roomRates - ) + roomRates = roomRates, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt index 0508a52bc..fba98dd70 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceNightlyRatesInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param stayDate A single night during the requested stay. - * @param baseRate Container for nightly base rate. +* + * @param stayDate A single night during the requested stay. + * @param baseRate Container for nightly base rate. */ data class RatePlanPriceNightlyRatesInner( - /* A single night during the requested stay. */ -@JsonProperty("StayDate") -val stayDate: kotlin.Any? = null, - - /* Container for nightly base rate. */ -@JsonProperty("BaseRate") -val baseRate: kotlin.Any? = null + // A single night during the requested stay. + @JsonProperty("StayDate") + val stayDate: kotlin.Any? = null, + // Container for nightly base rate. + @JsonProperty("BaseRate") + val baseRate: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var stayDate: kotlin.Any? = null, - private var baseRate: kotlin.Any? = null - ) { - fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } - fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } + class Builder( + private var stayDate: kotlin.Any? = null, + private var baseRate: kotlin.Any? = null, + ) { + fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } - fun build(): RatePlanPriceNightlyRatesInner { - val instance = RatePlanPriceNightlyRatesInner( - stayDate = stayDate, - baseRate = baseRate - ) + fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } - return instance - } + fun build(): RatePlanPriceNightlyRatesInner { + val instance = + RatePlanPriceNightlyRatesInner( + stayDate = stayDate, + baseRate = baseRate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( stayDate = stayDate, - baseRate = baseRate - ) + baseRate = baseRate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt index cf0939aa7..755f8c5a7 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanPriceTaxesAndFeesDetailsInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param categoryCode Category ID of this specific tax or fee. - * @param amount The value of this specific tax or fee. +* + * @param categoryCode Category ID of this specific tax or fee. + * @param amount The value of this specific tax or fee. */ data class RatePlanPriceTaxesAndFeesDetailsInner( - /* Category ID of this specific tax or fee. */ -@JsonProperty("CategoryCode") -val categoryCode: kotlin.Any? = null, - - /* The value of this specific tax or fee. */ -@JsonProperty("Amount") -val amount: kotlin.Any? = null + // Category ID of this specific tax or fee. + @JsonProperty("CategoryCode") + val categoryCode: kotlin.Any? = null, + // The value of this specific tax or fee. + @JsonProperty("Amount") + val amount: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var categoryCode: kotlin.Any? = null, - private var amount: kotlin.Any? = null - ) { - fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } - fun amount(amount: kotlin.Any?) = apply { this.amount = amount } + class Builder( + private var categoryCode: kotlin.Any? = null, + private var amount: kotlin.Any? = null, + ) { + fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } - fun build(): RatePlanPriceTaxesAndFeesDetailsInner { - val instance = RatePlanPriceTaxesAndFeesDetailsInner( - categoryCode = categoryCode, - amount = amount - ) + fun amount(amount: kotlin.Any?) = apply { this.amount = amount } - return instance - } + fun build(): RatePlanPriceTaxesAndFeesDetailsInner { + val instance = + RatePlanPriceTaxesAndFeesDetailsInner( + categoryCode = categoryCode, + amount = amount, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( categoryCode = categoryCode, - amount = amount - ) + amount = amount, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt index d009bdbcf..eee768f83 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatePlanStandalonePrice.kt @@ -16,187 +16,114 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when the returned `rateplan` is being used as part of a package. - * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. - * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. - * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. - * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. - * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - * @param hotelMandatoryFees The total standalone mandatory fees. - * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. +* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when the returned `rateplan` is being used as part of a package. + * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. + * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. + * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. + * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. + * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total standalone mandatory fees. + * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. */ data class RatePlanStandalonePrice( - /* The standalone price of the rate plan for all occupants, excluding taxes and fees. */ -@JsonProperty("BaseRate") -val baseRate: Money? = null, - - /* The base rate strikeout in the standalone shopping path. */ -@JsonProperty("StrikeOutBaseRate") -val strikeOutBaseRate: Money? = null, - - /* The total standalone rate of taxes and fees of the rate plan for all occupants. */ -@JsonProperty("TaxesAndFees") -val taxesAndFees: Money? = null, - - /* The taxes and fees strikeout in the standalone shopping path. */ -@JsonProperty("StrikeOutTaxesAndFees") -val strikeOutTaxesAndFees: Money? = null, - - /* The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. */ -@JsonProperty("TotalPrice") -val totalPrice: Money? = null, - - /* The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. */ -@JsonProperty("TotalStrikeOutPrice") -val totalStrikeOutPrice: Money? = null, - - /* The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyRate") -val avgNightlyRate: Money? = null, - - /* The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyStrikeOutRate") -val avgNightlyStrikeOutRate: Money? = null, - - /* The total standalone mandatory fees. */ -@JsonProperty("HotelMandatoryFees") -val hotelMandatoryFees: Money? = null, - - /* The strikeout of the mandatory fees in the standalone shopping path. */ -@JsonProperty("StrikeOutHotelMandatoryFees") -val strikeOutHotelMandatoryFees: Money? = null + // The standalone price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + val baseRate: Money? = null, + // The base rate strikeout in the standalone shopping path. + @JsonProperty("StrikeOutBaseRate") + val strikeOutBaseRate: Money? = null, + // The total standalone rate of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + val taxesAndFees: Money? = null, + // The taxes and fees strikeout in the standalone shopping path. + @JsonProperty("StrikeOutTaxesAndFees") + val strikeOutTaxesAndFees: Money? = null, + // The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + @JsonProperty("TotalPrice") + val totalPrice: Money? = null, + // The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + @JsonProperty("TotalStrikeOutPrice") + val totalStrikeOutPrice: Money? = null, + // The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + val avgNightlyRate: Money? = null, + // The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyStrikeOutRate") + val avgNightlyStrikeOutRate: Money? = null, + // The total standalone mandatory fees. + @JsonProperty("HotelMandatoryFees") + val hotelMandatoryFees: Money? = null, + // The strikeout of the mandatory fees in the standalone shopping path. + @JsonProperty("StrikeOutHotelMandatoryFees") + val strikeOutHotelMandatoryFees: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var baseRate: Money? = null, + private var strikeOutBaseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var strikeOutTaxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var strikeOutHotelMandatoryFees: Money? = null, + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } - class Builder( - private var baseRate: Money? = null, - private var strikeOutBaseRate: Money? = null, - private var taxesAndFees: Money? = null, - private var strikeOutTaxesAndFees: Money? = null, - private var totalPrice: Money? = null, - private var totalStrikeOutPrice: Money? = null, - private var avgNightlyRate: Money? = null, - private var avgNightlyStrikeOutRate: Money? = null, - private var hotelMandatoryFees: Money? = null, - private var strikeOutHotelMandatoryFees: Money? = null - ) { - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } - fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } - fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } - - fun build(): RatePlanStandalonePrice { - val instance = RatePlanStandalonePrice( - baseRate = baseRate, - strikeOutBaseRate = strikeOutBaseRate, - taxesAndFees = taxesAndFees, - strikeOutTaxesAndFees = strikeOutTaxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) + fun build(): RatePlanStandalonePrice { + val instance = + RatePlanStandalonePrice( + baseRate = baseRate, + strikeOutBaseRate = strikeOutBaseRate, + taxesAndFees = taxesAndFees, + strikeOutTaxesAndFees = strikeOutTaxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( baseRate = baseRate, strikeOutBaseRate = strikeOutBaseRate, taxesAndFees = taxesAndFees, @@ -206,6 +133,6 @@ val strikeOutHotelMandatoryFees: Money? = null avgNightlyRate = avgNightlyRate, avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt index 24e57f879..29636cd34 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Rating.kt @@ -16,90 +16,63 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.RatingDetails - import com.fasterxml.jackson.annotation.JsonProperty /** * The rating of the car being offered. - * @param ratingPercentage The percentage of rating. - * @param ratingCount The total count of rating. - * @param ratingDetails List of all the details of rating. + * @param ratingPercentage The percentage of rating. + * @param ratingCount The total count of rating. + * @param ratingDetails List of all the details of rating. */ data class Rating( - /* The percentage of rating. */ -@JsonProperty("RatingPercentage") -val ratingPercentage: - kotlin.String -, - - /* The total count of rating. */ -@JsonProperty("RatingCount") -val ratingCount: - kotlin.String -, - - /* List of all the details of rating. */ -@JsonProperty("RatingDetails") -val ratingDetails: kotlin.collections.List? = null + // The percentage of rating. + @JsonProperty("RatingPercentage") + val ratingPercentage: kotlin.String, + // The total count of rating. + @JsonProperty("RatingCount") + val ratingCount: kotlin.String, + // List of all the details of rating. + @JsonProperty("RatingDetails") + val ratingDetails: kotlin.collections.List? = null, ) { - - - init { - require(ratingPercentage != null) { "ratingPercentage must not be null" } - - - - - - + require(ratingPercentage != null) { "ratingPercentage must not be null" } require(ratingCount != null) { "ratingCount must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ratingPercentage: kotlin.String? = null, - private var ratingCount: kotlin.String? = null, - private var ratingDetails: kotlin.collections.List? = null - ) { - fun ratingPercentage(ratingPercentage: kotlin.String) = apply { this.ratingPercentage = ratingPercentage } - fun ratingCount(ratingCount: kotlin.String) = apply { this.ratingCount = ratingCount } - fun ratingDetails(ratingDetails: kotlin.collections.List?) = apply { this.ratingDetails = ratingDetails } + class Builder( + private var ratingPercentage: kotlin.String? = null, + private var ratingCount: kotlin.String? = null, + private var ratingDetails: kotlin.collections.List? = null, + ) { + fun ratingPercentage(ratingPercentage: kotlin.String) = apply { this.ratingPercentage = ratingPercentage } - fun build(): Rating { - val instance = Rating( - ratingPercentage = ratingPercentage!!, - ratingCount = ratingCount!!, - ratingDetails = ratingDetails - ) + fun ratingCount(ratingCount: kotlin.String) = apply { this.ratingCount = ratingCount } - return instance - } + fun ratingDetails(ratingDetails: kotlin.collections.List?) = apply { this.ratingDetails = ratingDetails } + + fun build(): Rating { + val instance = + Rating( + ratingPercentage = ratingPercentage!!, + ratingCount = ratingCount!!, + ratingDetails = ratingDetails, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( ratingPercentage = ratingPercentage!!, ratingCount = ratingCount!!, - ratingDetails = ratingDetails - ) + ratingDetails = ratingDetails, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt index f8e95b18c..c1f7c3dd6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingDetails.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * List of all the details of rating. - * @param category The category of rating detail. - * @param percentage The percentage of rating detail category. + * @param category The category of rating detail. + * @param percentage The percentage of rating detail category. */ data class RatingDetails( - /* The category of rating detail. */ -@JsonProperty("Category") -val category: - kotlin.String -, - - /* The percentage of rating detail category. */ -@JsonProperty("Percentage") -val percentage: - kotlin.String - + // The category of rating detail. + @JsonProperty("Category") + val category: kotlin.String, + // The percentage of rating detail category. + @JsonProperty("Percentage") + val percentage: kotlin.String, ) { - - - init { - require(category != null) { "category must not be null" } - - - - - - + require(category != null) { "category must not be null" } require(percentage != null) { "percentage must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var category: kotlin.String? = null, - private var percentage: kotlin.String? = null - ) { - fun category(category: kotlin.String) = apply { this.category = category } - fun percentage(percentage: kotlin.String) = apply { this.percentage = percentage } + class Builder( + private var category: kotlin.String? = null, + private var percentage: kotlin.String? = null, + ) { + fun category(category: kotlin.String) = apply { this.category = category } - fun build(): RatingDetails { - val instance = RatingDetails( - category = category!!, - percentage = percentage!! - ) + fun percentage(percentage: kotlin.String) = apply { this.percentage = percentage } - return instance - } + fun build(): RatingDetails { + val instance = + RatingDetails( + category = category!!, + percentage = percentage!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( category = category!!, - percentage = percentage!! - ) + percentage = percentage!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt index 604ed8e35..e1ced55ef 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RatingWithoutDetails.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * The rating of the car being offered. - * @param ratingPercentage The percentage of rating. - * @param ratingCount The total count of rating. + * @param ratingPercentage The percentage of rating. + * @param ratingCount The total count of rating. */ data class RatingWithoutDetails( - /* The percentage of rating. */ -@JsonProperty("RatingPercentage") -val ratingPercentage: - kotlin.String -, - - /* The total count of rating. */ -@JsonProperty("RatingCount") -val ratingCount: - kotlin.String - + // The percentage of rating. + @JsonProperty("RatingPercentage") + val ratingPercentage: kotlin.String, + // The total count of rating. + @JsonProperty("RatingCount") + val ratingCount: kotlin.String, ) { - - - init { - require(ratingPercentage != null) { "ratingPercentage must not be null" } - - - - - - + require(ratingPercentage != null) { "ratingPercentage must not be null" } require(ratingCount != null) { "ratingCount must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var ratingPercentage: kotlin.String? = null, - private var ratingCount: kotlin.String? = null - ) { - fun ratingPercentage(ratingPercentage: kotlin.String) = apply { this.ratingPercentage = ratingPercentage } - fun ratingCount(ratingCount: kotlin.String) = apply { this.ratingCount = ratingCount } + class Builder( + private var ratingPercentage: kotlin.String? = null, + private var ratingCount: kotlin.String? = null, + ) { + fun ratingPercentage(ratingPercentage: kotlin.String) = apply { this.ratingPercentage = ratingPercentage } - fun build(): RatingWithoutDetails { - val instance = RatingWithoutDetails( - ratingPercentage = ratingPercentage!!, - ratingCount = ratingCount!! - ) + fun ratingCount(ratingCount: kotlin.String) = apply { this.ratingCount = ratingCount } - return instance - } + fun build(): RatingWithoutDetails { + val instance = + RatingWithoutDetails( + ratingPercentage = ratingPercentage!!, + ratingCount = ratingCount!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( ratingPercentage = ratingPercentage!!, - ratingCount = ratingCount!! - ) + ratingCount = ratingCount!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt index d6c9e79e4..b6d3a9fda 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Redemption.kt @@ -16,68 +16,51 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesLocation - import com.fasterxml.jackson.annotation.JsonProperty /** * Container of redemption information. - * @param type The type of redemption process associated to the activity. - * @param redemptionLocations List of redemption locations where the activity will take place, please refer to Location Section below. + * @param type The type of redemption process associated to the activity. + * @param redemptionLocations List of redemption locations where the activity will take place, please refer to Location Section below. */ data class Redemption( - /* The type of redemption process associated to the activity. */ -@JsonProperty("Type") -val type: kotlin.String? = null, - - /* List of redemption locations where the activity will take place, please refer to Location Section below. */ -@JsonProperty("RedemptionLocations") -val redemptionLocations: kotlin.collections.List? = null + // The type of redemption process associated to the activity. + @JsonProperty("Type") + val type: kotlin.String? = null, + // List of redemption locations where the activity will take place, please refer to Location Section below. + @JsonProperty("RedemptionLocations") + val redemptionLocations: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var redemptionLocations: kotlin.collections.List? = null - ) { - fun type(type: kotlin.String?) = apply { this.type = type } - fun redemptionLocations(redemptionLocations: kotlin.collections.List?) = apply { this.redemptionLocations = redemptionLocations } + class Builder( + private var type: kotlin.String? = null, + private var redemptionLocations: kotlin.collections.List? = null, + ) { + fun type(type: kotlin.String?) = apply { this.type = type } - fun build(): Redemption { - val instance = Redemption( - type = type, - redemptionLocations = redemptionLocations - ) + fun redemptionLocations(redemptionLocations: kotlin.collections.List?) = apply { this.redemptionLocations = redemptionLocations } - return instance - } + fun build(): Redemption { + val instance = + Redemption( + type = type, + redemptionLocations = redemptionLocations, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type, - redemptionLocations = redemptionLocations - ) + redemptionLocations = redemptionLocations, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt index 6aa163d44..1979f7f5b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ReferencePrice.kt @@ -16,84 +16,58 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for the reference price used for strike out display. - * @param totalRate - * @param totalFees - * @param totalTaxesAndFees + * @param totalRate + * @param totalFees + * @param totalTaxesAndFees */ data class ReferencePrice( - @JsonProperty("TotalRate") -val totalRate: - ActivitiesMoney -, - - @JsonProperty("TotalFees") -val totalFees: ActivitiesMoney? = null, - - @JsonProperty("TotalTaxesAndFees") -val totalTaxesAndFees: ActivitiesMoney? = null + @JsonProperty("TotalRate") + val totalRate: ActivitiesMoney, + @JsonProperty("TotalFees") + val totalFees: ActivitiesMoney? = null, + @JsonProperty("TotalTaxesAndFees") + val totalTaxesAndFees: ActivitiesMoney? = null, ) { - - - init { - require(totalRate != null) { "totalRate must not be null" } - - - - - - - - - - - - - - - - - - - - - - + require(totalRate != null) { "totalRate must not be null" } } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var totalRate: ActivitiesMoney? = null, - private var totalFees: ActivitiesMoney? = null, - private var totalTaxesAndFees: ActivitiesMoney? = null - ) { - fun totalRate(totalRate: ActivitiesMoney) = apply { this.totalRate = totalRate } - fun totalFees(totalFees: ActivitiesMoney?) = apply { this.totalFees = totalFees } - fun totalTaxesAndFees(totalTaxesAndFees: ActivitiesMoney?) = apply { this.totalTaxesAndFees = totalTaxesAndFees } + class Builder( + private var totalRate: ActivitiesMoney? = null, + private var totalFees: ActivitiesMoney? = null, + private var totalTaxesAndFees: ActivitiesMoney? = null, + ) { + fun totalRate(totalRate: ActivitiesMoney) = apply { this.totalRate = totalRate } - fun build(): ReferencePrice { - val instance = ReferencePrice( - totalRate = totalRate!!, - totalFees = totalFees, - totalTaxesAndFees = totalTaxesAndFees - ) + fun totalFees(totalFees: ActivitiesMoney?) = apply { this.totalFees = totalFees } - return instance - } + fun totalTaxesAndFees(totalTaxesAndFees: ActivitiesMoney?) = apply { this.totalTaxesAndFees = totalTaxesAndFees } + + fun build(): ReferencePrice { + val instance = + ReferencePrice( + totalRate = totalRate!!, + totalFees = totalFees, + totalTaxesAndFees = totalTaxesAndFees, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( totalRate = totalRate!!, totalFees = totalFees, - totalTaxesAndFees = totalTaxesAndFees - ) + totalTaxesAndFees = totalTaxesAndFees, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt index 1c7262aa8..f3218e201 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RentalLimits.kt @@ -16,72 +16,52 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Duration - import com.fasterxml.jackson.annotation.JsonProperty /** * Limitations that are part of this rental agreement. - * @param minDuration - * @param maxDuration + * @param minDuration + * @param maxDuration */ data class RentalLimits( - @JsonProperty("MinDuration") -val minDuration: - Duration -, - - @JsonProperty("MaxDuration") -val maxDuration: - Duration - + @JsonProperty("MinDuration") + val minDuration: Duration, + @JsonProperty("MaxDuration") + val maxDuration: Duration, ) { - - - init { - require(minDuration != null) { "minDuration must not be null" } - - - - - - + require(minDuration != null) { "minDuration must not be null" } require(maxDuration != null) { "maxDuration must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var minDuration: Duration? = null, - private var maxDuration: Duration? = null - ) { - fun minDuration(minDuration: Duration) = apply { this.minDuration = minDuration } - fun maxDuration(maxDuration: Duration) = apply { this.maxDuration = maxDuration } + class Builder( + private var minDuration: Duration? = null, + private var maxDuration: Duration? = null, + ) { + fun minDuration(minDuration: Duration) = apply { this.minDuration = minDuration } - fun build(): RentalLimits { - val instance = RentalLimits( - minDuration = minDuration!!, - maxDuration = maxDuration!! - ) + fun maxDuration(maxDuration: Duration) = apply { this.maxDuration = maxDuration } - return instance - } + fun build(): RentalLimits { + val instance = + RentalLimits( + minDuration = minDuration!!, + maxDuration = maxDuration!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( minDuration = minDuration!!, - maxDuration = maxDuration!! - ) + maxDuration = maxDuration!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt index bc7d086dc..53e338b91 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Restrictions.kt @@ -15,109 +15,74 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container of the Restrictions associated to this ticket. - * @param type Type of the Restriction. - * @param max Maximum value allowed for the restriction type. - * @param min Minimum value allowed for the restriction type. - * @param description The text to describe the restriction. + * @param type Type of the Restriction. + * @param max Maximum value allowed for the restriction type. + * @param min Minimum value allowed for the restriction type. + * @param description The text to describe the restriction. */ data class Restrictions( - /* Type of the Restriction. */ -@JsonProperty("Type") -val type: - kotlin.String -, - - /* Maximum value allowed for the restriction type. */ -@JsonProperty("Max") -val max: - kotlin.String -, - - /* Minimum value allowed for the restriction type. */ -@JsonProperty("Min") -val min: - kotlin.String -, - - /* The text to describe the restriction. */ -@JsonProperty("Description") -val description: kotlin.String? = null + // Type of the Restriction. + @JsonProperty("Type") + val type: kotlin.String, + // Maximum value allowed for the restriction type. + @JsonProperty("Max") + val max: kotlin.String, + // Minimum value allowed for the restriction type. + @JsonProperty("Min") + val min: kotlin.String, + // The text to describe the restriction. + @JsonProperty("Description") + val description: kotlin.String? = null, ) { - - - init { - require(type != null) { "type must not be null" } - - - - - - + require(type != null) { "type must not be null" } require(max != null) { "max must not be null" } - - - - - - require(min != null) { "min must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: kotlin.String? = null, - private var max: kotlin.String? = null, - private var min: kotlin.String? = null, - private var description: kotlin.String? = null - ) { - fun type(type: kotlin.String) = apply { this.type = type } - fun max(max: kotlin.String) = apply { this.max = max } - fun min(min: kotlin.String) = apply { this.min = min } - fun description(description: kotlin.String?) = apply { this.description = description } + class Builder( + private var type: kotlin.String? = null, + private var max: kotlin.String? = null, + private var min: kotlin.String? = null, + private var description: kotlin.String? = null, + ) { + fun type(type: kotlin.String) = apply { this.type = type } - fun build(): Restrictions { - val instance = Restrictions( - type = type!!, - max = max!!, - min = min!!, - description = description - ) + fun max(max: kotlin.String) = apply { this.max = max } - return instance - } + fun min(min: kotlin.String) = apply { this.min = min } + + fun description(description: kotlin.String?) = apply { this.description = description } + + fun build(): Restrictions { + val instance = + Restrictions( + type = type!!, + max = max!!, + min = min!!, + description = description, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type!!, max = max!!, min = min!!, - description = description - ) + description = description, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt index 0f03543b1..fa5c73b6f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Room.kt @@ -2,7 +2,7 @@ package com.expediagroup.sdk.xap.models data class Room( val adults: Long?, - val childAges: List? + val childAges: List?, ) { companion object { @JvmStatic @@ -17,11 +17,10 @@ data class Room( fun childAges(childAges: List?) = apply { this.childAges = childAges } - fun build(): Room { - return Room( + fun build(): Room = + Room( adults = this.adults, - childAges = this.childAges + childAges = this.childAges, ) - } } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt index df1b658a5..86a4e7ac8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomOccupancyPolicy.kt @@ -16,116 +16,78 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.AgeClassRestriction - import com.fasterxml.jackson.annotation.JsonProperty /** * Room occupancy policy. - * @param maxGuestCount The maximum number of guests allowed to stay in a room. - * @param minCheckInAge The minimum age required for check-in. - * @param includedGuestCount The number of guests included in base rate. - * @param minGuestAge The minimum age required for any guest staying in the room. - * @param ageClassRestrictions Container for room occupancy rules based on the age of the guests. + * @param maxGuestCount The maximum number of guests allowed to stay in a room. + * @param minCheckInAge The minimum age required for check-in. + * @param includedGuestCount The number of guests included in base rate. + * @param minGuestAge The minimum age required for any guest staying in the room. + * @param ageClassRestrictions Container for room occupancy rules based on the age of the guests. */ data class RoomOccupancyPolicy( - /* The maximum number of guests allowed to stay in a room. */ -@JsonProperty("MaxGuestCount") -val maxGuestCount: kotlin.Int? = null, - - /* The minimum age required for check-in. */ -@JsonProperty("MinCheckInAge") -val minCheckInAge: kotlin.Int? = null, - - /* The number of guests included in base rate. */ -@JsonProperty("IncludedGuestCount") -val includedGuestCount: kotlin.Int? = null, - - /* The minimum age required for any guest staying in the room. */ -@JsonProperty("MinGuestAge") -val minGuestAge: kotlin.Int? = null, - - /* Container for room occupancy rules based on the age of the guests. */ -@JsonProperty("AgeClassRestrictions") -val ageClassRestrictions: kotlin.collections.List? = null + // The maximum number of guests allowed to stay in a room. + @JsonProperty("MaxGuestCount") + val maxGuestCount: kotlin.Int? = null, + // The minimum age required for check-in. + @JsonProperty("MinCheckInAge") + val minCheckInAge: kotlin.Int? = null, + // The number of guests included in base rate. + @JsonProperty("IncludedGuestCount") + val includedGuestCount: kotlin.Int? = null, + // The minimum age required for any guest staying in the room. + @JsonProperty("MinGuestAge") + val minGuestAge: kotlin.Int? = null, + // Container for room occupancy rules based on the age of the guests. + @JsonProperty("AgeClassRestrictions") + val ageClassRestrictions: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var maxGuestCount: kotlin.Int? = null, + private var minCheckInAge: kotlin.Int? = null, + private var includedGuestCount: kotlin.Int? = null, + private var minGuestAge: kotlin.Int? = null, + private var ageClassRestrictions: kotlin.collections.List? = null, + ) { + fun maxGuestCount(maxGuestCount: kotlin.Int?) = apply { this.maxGuestCount = maxGuestCount } + fun minCheckInAge(minCheckInAge: kotlin.Int?) = apply { this.minCheckInAge = minCheckInAge } - } + fun includedGuestCount(includedGuestCount: kotlin.Int?) = apply { this.includedGuestCount = includedGuestCount } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun minGuestAge(minGuestAge: kotlin.Int?) = apply { this.minGuestAge = minGuestAge } - class Builder( - private var maxGuestCount: kotlin.Int? = null, - private var minCheckInAge: kotlin.Int? = null, - private var includedGuestCount: kotlin.Int? = null, - private var minGuestAge: kotlin.Int? = null, - private var ageClassRestrictions: kotlin.collections.List? = null - ) { - fun maxGuestCount(maxGuestCount: kotlin.Int?) = apply { this.maxGuestCount = maxGuestCount } - fun minCheckInAge(minCheckInAge: kotlin.Int?) = apply { this.minCheckInAge = minCheckInAge } - fun includedGuestCount(includedGuestCount: kotlin.Int?) = apply { this.includedGuestCount = includedGuestCount } - fun minGuestAge(minGuestAge: kotlin.Int?) = apply { this.minGuestAge = minGuestAge } - fun ageClassRestrictions(ageClassRestrictions: kotlin.collections.List?) = apply { this.ageClassRestrictions = ageClassRestrictions } + fun ageClassRestrictions(ageClassRestrictions: kotlin.collections.List?) = apply { this.ageClassRestrictions = ageClassRestrictions } - fun build(): RoomOccupancyPolicy { - val instance = RoomOccupancyPolicy( - maxGuestCount = maxGuestCount, - minCheckInAge = minCheckInAge, - includedGuestCount = includedGuestCount, - minGuestAge = minGuestAge, - ageClassRestrictions = ageClassRestrictions - ) + fun build(): RoomOccupancyPolicy { + val instance = + RoomOccupancyPolicy( + maxGuestCount = maxGuestCount, + minCheckInAge = minCheckInAge, + includedGuestCount = includedGuestCount, + minGuestAge = minGuestAge, + ageClassRestrictions = ageClassRestrictions, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( maxGuestCount = maxGuestCount, minCheckInAge = minCheckInAge, includedGuestCount = includedGuestCount, minGuestAge = minGuestAge, - ageClassRestrictions = ageClassRestrictions - ) + ageClassRestrictions = ageClassRestrictions, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt index 8805c36a3..a06d74961 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomPreference.kt @@ -15,80 +15,65 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for room preferences. - * @param type The type of preference. Options are: SmokingPreference Bed - * @param `value` The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. + * @param type The type of preference. Options are: SmokingPreference Bed + * @param `value` The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. */ data class RoomPreference( - /* The type of preference. Options are: SmokingPreference Bed */ -@JsonProperty("Type") -val type: RoomPreference.Type? = null, - - /* The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null + // The type of preference. Options are: SmokingPreference Bed + @JsonProperty("Type") + val type: RoomPreference.Type? = null, + // The value of the room preference. For SmokingPreference, options are SmokingOrNonSmoking Smoking NonSmoking For supported Bed Types, please refer to the Related Links section at the bottom of the page. + @JsonProperty("Value") + val `value`: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: RoomPreference.Type? = null, - private var `value`: kotlin.String? = null - ) { - fun type(type: RoomPreference.Type?) = apply { this.type = type } - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + class Builder( + private var type: RoomPreference.Type? = null, + private var `value`: kotlin.String? = null, + ) { + fun type(type: RoomPreference.Type?) = apply { this.type = type } - fun build(): RoomPreference { - val instance = RoomPreference( - type = type, - `value` = `value` - ) + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - return instance - } + fun build(): RoomPreference { + val instance = + RoomPreference( + type = type, + `value` = `value`, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type, - `value` = `value` - ) - - /** - * The type of preference. Options are: SmokingPreference Bed - * Values: SMOKING_PREFERENCE,BED - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("SmokingPreference") - SMOKING_PREFERENCE("SmokingPreference"), - - @JsonProperty("Bed") - BED("Bed"); - } + `value` = `value`, + ) + + /** + * The type of preference. Options are: SmokingPreference Bed + * Values: SMOKING_PREFERENCE,BED + */ + enum class Type( + val value: kotlin.String, + ) { + @JsonProperty("SmokingPreference") + SMOKING_PREFERENCE("SmokingPreference"), + + @JsonProperty("Bed") + BED("Bed"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt index c9d58fb8b..7b6e4af4b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRates.kt @@ -22,153 +22,94 @@ import com.expediagroup.sdk.xap.models.RoomRatesTaxesAndFees import com.expediagroup.sdk.xap.models.RoomRatesTaxesAndFeesDetailsInner import com.expediagroup.sdk.xap.models.RoomRatesTotalPrice import com.expediagroup.sdk.xap.models.RoomRatesTotalStrikeOutPrice - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param roomIndex Index of which of the requested rooms this entry refers to. - * @param baseRate - * @param taxesAndFees - * @param totalPrice - * @param totalStrikeOutPrice - * @param taxesAndFeesDetails The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. - * @param mandatoryFeesDetails The breakdown for the taxes and fees that must be paid at the property. - * @param nightlyRates Container for the nightly rate of current room. +* + * @param roomIndex Index of which of the requested rooms this entry refers to. + * @param baseRate + * @param taxesAndFees + * @param totalPrice + * @param totalStrikeOutPrice + * @param taxesAndFeesDetails The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + * @param mandatoryFeesDetails The breakdown for the taxes and fees that must be paid at the property. + * @param nightlyRates Container for the nightly rate of current room. */ data class RoomRates( - /* Index of which of the requested rooms this entry refers to. */ -@JsonProperty("RoomIndex") -val roomIndex: kotlin.Int? = null, - - @JsonProperty("BaseRate") -val baseRate: RoomRatesBaseRate? = null, - - @JsonProperty("TaxesAndFees") -val taxesAndFees: RoomRatesTaxesAndFees? = null, - - @JsonProperty("TotalPrice") -val totalPrice: RoomRatesTotalPrice? = null, - - @JsonProperty("TotalStrikeOutPrice") -val totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, - - /* The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. */ -@JsonProperty("TaxesAndFeesDetails") -val taxesAndFeesDetails: kotlin.collections.List? = null, - - /* The breakdown for the taxes and fees that must be paid at the property. */ -@JsonProperty("MandatoryFeesDetails") -val mandatoryFeesDetails: kotlin.collections.List? = null, - - /* Container for the nightly rate of current room. */ -@JsonProperty("NightlyRates") -val nightlyRates: kotlin.collections.List? = null + // Index of which of the requested rooms this entry refers to. + @JsonProperty("RoomIndex") + val roomIndex: kotlin.Int? = null, + @JsonProperty("BaseRate") + val baseRate: RoomRatesBaseRate? = null, + @JsonProperty("TaxesAndFees") + val taxesAndFees: RoomRatesTaxesAndFees? = null, + @JsonProperty("TotalPrice") + val totalPrice: RoomRatesTotalPrice? = null, + @JsonProperty("TotalStrikeOutPrice") + val totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, + // The breakdown for taxes and fees for this room for the entire stay. Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + @JsonProperty("TaxesAndFeesDetails") + val taxesAndFeesDetails: kotlin.collections.List? = null, + // The breakdown for the taxes and fees that must be paid at the property. + @JsonProperty("MandatoryFeesDetails") + val mandatoryFeesDetails: kotlin.collections.List? = null, + // Container for the nightly rate of current room. + @JsonProperty("NightlyRates") + val nightlyRates: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var roomIndex: kotlin.Int? = null, + private var baseRate: RoomRatesBaseRate? = null, + private var taxesAndFees: RoomRatesTaxesAndFees? = null, + private var totalPrice: RoomRatesTotalPrice? = null, + private var totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, + private var taxesAndFeesDetails: kotlin.collections.List? = null, + private var mandatoryFeesDetails: kotlin.collections.List? = null, + private var nightlyRates: kotlin.collections.List? = null, + ) { + fun roomIndex(roomIndex: kotlin.Int?) = apply { this.roomIndex = roomIndex } + fun baseRate(baseRate: RoomRatesBaseRate?) = apply { this.baseRate = baseRate } + fun taxesAndFees(taxesAndFees: RoomRatesTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPrice(totalPrice: RoomRatesTotalPrice?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - } + fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun mandatoryFeesDetails(mandatoryFeesDetails: kotlin.collections.List?) = apply { this.mandatoryFeesDetails = mandatoryFeesDetails } - class Builder( - private var roomIndex: kotlin.Int? = null, - private var baseRate: RoomRatesBaseRate? = null, - private var taxesAndFees: RoomRatesTaxesAndFees? = null, - private var totalPrice: RoomRatesTotalPrice? = null, - private var totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice? = null, - private var taxesAndFeesDetails: kotlin.collections.List? = null, - private var mandatoryFeesDetails: kotlin.collections.List? = null, - private var nightlyRates: kotlin.collections.List? = null - ) { - fun roomIndex(roomIndex: kotlin.Int?) = apply { this.roomIndex = roomIndex } - fun baseRate(baseRate: RoomRatesBaseRate?) = apply { this.baseRate = baseRate } - fun taxesAndFees(taxesAndFees: RoomRatesTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees } - fun totalPrice(totalPrice: RoomRatesTotalPrice?) = apply { this.totalPrice = totalPrice } - fun totalStrikeOutPrice(totalStrikeOutPrice: RoomRatesTotalStrikeOutPrice?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - fun taxesAndFeesDetails(taxesAndFeesDetails: kotlin.collections.List?) = apply { this.taxesAndFeesDetails = taxesAndFeesDetails } - fun mandatoryFeesDetails(mandatoryFeesDetails: kotlin.collections.List?) = apply { this.mandatoryFeesDetails = mandatoryFeesDetails } - fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } + fun nightlyRates(nightlyRates: kotlin.collections.List?) = apply { this.nightlyRates = nightlyRates } - fun build(): RoomRates { - val instance = RoomRates( - roomIndex = roomIndex, - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - taxesAndFeesDetails = taxesAndFeesDetails, - mandatoryFeesDetails = mandatoryFeesDetails, - nightlyRates = nightlyRates - ) + fun build(): RoomRates { + val instance = + RoomRates( + roomIndex = roomIndex, + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + taxesAndFeesDetails = taxesAndFeesDetails, + mandatoryFeesDetails = mandatoryFeesDetails, + nightlyRates = nightlyRates, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( roomIndex = roomIndex, baseRate = baseRate, taxesAndFees = taxesAndFees, @@ -176,6 +117,6 @@ val nightlyRates: kotlin.collections.List? = null totalStrikeOutPrice = totalStrikeOutPrice, taxesAndFeesDetails = taxesAndFeesDetails, mandatoryFeesDetails = mandatoryFeesDetails, - nightlyRates = nightlyRates - ) + nightlyRates = nightlyRates, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt index 476d48e30..37edb9215 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesBaseRate.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class RoomRatesBaseRate( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): RoomRatesBaseRate { - val instance = RoomRatesBaseRate( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RoomRatesBaseRate { + val instance = + RoomRatesBaseRate( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt index 9f8feb7a8..992c412b4 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesNightlyRatesInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param stayDate One date of the property stay - * @param baseRate Nightly Base Rate for the selected date of stay. +* + * @param stayDate One date of the property stay + * @param baseRate Nightly Base Rate for the selected date of stay. */ data class RoomRatesNightlyRatesInner( - /* One date of the property stay */ -@JsonProperty("StayDate") -val stayDate: kotlin.Any? = null, - - /* Nightly Base Rate for the selected date of stay. */ -@JsonProperty("BaseRate") -val baseRate: kotlin.Any? = null + // One date of the property stay + @JsonProperty("StayDate") + val stayDate: kotlin.Any? = null, + // Nightly Base Rate for the selected date of stay. + @JsonProperty("BaseRate") + val baseRate: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var stayDate: kotlin.Any? = null, - private var baseRate: kotlin.Any? = null - ) { - fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } - fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } + class Builder( + private var stayDate: kotlin.Any? = null, + private var baseRate: kotlin.Any? = null, + ) { + fun stayDate(stayDate: kotlin.Any?) = apply { this.stayDate = stayDate } - fun build(): RoomRatesNightlyRatesInner { - val instance = RoomRatesNightlyRatesInner( - stayDate = stayDate, - baseRate = baseRate - ) + fun baseRate(baseRate: kotlin.Any?) = apply { this.baseRate = baseRate } - return instance - } + fun build(): RoomRatesNightlyRatesInner { + val instance = + RoomRatesNightlyRatesInner( + stayDate = stayDate, + baseRate = baseRate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( stayDate = stayDate, - baseRate = baseRate - ) + baseRate = baseRate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt index bcf2950c5..cdef69c74 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFees.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class RoomRatesTaxesAndFees( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): RoomRatesTaxesAndFees { - val instance = RoomRatesTaxesAndFees( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RoomRatesTaxesAndFees { + val instance = + RoomRatesTaxesAndFees( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt index d7c739098..a777bca7b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTaxesAndFeesDetailsInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param categoryCode Tax or fee category code. - * @param amount Tax or fee value. +* + * @param categoryCode Tax or fee category code. + * @param amount Tax or fee value. */ data class RoomRatesTaxesAndFeesDetailsInner( - /* Tax or fee category code. */ -@JsonProperty("CategoryCode") -val categoryCode: kotlin.Any? = null, - - /* Tax or fee value. */ -@JsonProperty("Amount") -val amount: kotlin.Any? = null + // Tax or fee category code. + @JsonProperty("CategoryCode") + val categoryCode: kotlin.Any? = null, + // Tax or fee value. + @JsonProperty("Amount") + val amount: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var categoryCode: kotlin.Any? = null, - private var amount: kotlin.Any? = null - ) { - fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } - fun amount(amount: kotlin.Any?) = apply { this.amount = amount } + class Builder( + private var categoryCode: kotlin.Any? = null, + private var amount: kotlin.Any? = null, + ) { + fun categoryCode(categoryCode: kotlin.Any?) = apply { this.categoryCode = categoryCode } - fun build(): RoomRatesTaxesAndFeesDetailsInner { - val instance = RoomRatesTaxesAndFeesDetailsInner( - categoryCode = categoryCode, - amount = amount - ) + fun amount(amount: kotlin.Any?) = apply { this.amount = amount } - return instance - } + fun build(): RoomRatesTaxesAndFeesDetailsInner { + val instance = + RoomRatesTaxesAndFeesDetailsInner( + categoryCode = categoryCode, + amount = amount, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( categoryCode = categoryCode, - amount = amount - ) + amount = amount, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt index 33da788b4..5433314b6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalPrice.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class RoomRatesTotalPrice( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): RoomRatesTotalPrice { - val instance = RoomRatesTotalPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RoomRatesTotalPrice { + val instance = + RoomRatesTotalPrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt index 8af397a92..3b4abb91b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomRatesTotalStrikeOutPrice.kt @@ -16,83 +16,59 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param `value` The value of the element being defined. - * @param currency The ISO 4217 Currency Code that the value is expressed in. - * @param localCurrencyPrice +* + * @param `value` The value of the element being defined. + * @param currency The ISO 4217 Currency Code that the value is expressed in. + * @param localCurrencyPrice */ data class RoomRatesTotalStrikeOutPrice( - /* The value of the element being defined. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null, - - /* The ISO 4217 Currency Code that the value is expressed in. */ -@JsonProperty("Currency") -val currency: kotlin.String? = null, - - @JsonProperty("LocalCurrencyPrice") -val localCurrencyPrice: Money? = null + // The value of the element being defined. + @JsonProperty("Value") + val `value`: kotlin.String? = null, + // The ISO 4217 Currency Code that the value is expressed in. + @JsonProperty("Currency") + val currency: kotlin.String? = null, + @JsonProperty("LocalCurrencyPrice") + val localCurrencyPrice: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var `value`: kotlin.String? = null, - private var currency: kotlin.String? = null, - private var localCurrencyPrice: Money? = null - ) { - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun currency(currency: kotlin.String?) = apply { this.currency = currency } - fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + class Builder( + private var `value`: kotlin.String? = null, + private var currency: kotlin.String? = null, + private var localCurrencyPrice: Money? = null, + ) { + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - fun build(): RoomRatesTotalStrikeOutPrice { - val instance = RoomRatesTotalStrikeOutPrice( - `value` = `value`, - currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + fun currency(currency: kotlin.String?) = apply { this.currency = currency } - return instance - } + fun localCurrencyPrice(localCurrencyPrice: Money?) = apply { this.localCurrencyPrice = localCurrencyPrice } + + fun build(): RoomRatesTotalStrikeOutPrice { + val instance = + RoomRatesTotalStrikeOutPrice( + `value` = `value`, + currency = currency, + localCurrencyPrice = localCurrencyPrice, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( `value` = `value`, currency = currency, - localCurrencyPrice = localCurrencyPrice - ) + localCurrencyPrice = localCurrencyPrice, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt index 1891c8371..9becbe6a6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomType.kt @@ -24,252 +24,164 @@ import com.expediagroup.sdk.xap.models.RoomTypeLinks import com.expediagroup.sdk.xap.models.RoomTypeMediaInner import com.expediagroup.sdk.xap.models.RoomTypePrice import com.expediagroup.sdk.xap.models.RoomTypeStandalonePrice - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param description Text description of the room type. - * @param roomKey An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. - * @param offerId An encrypted string which includes the information that could be used to address the current room type. - * @param merchantName Name of Merchant that did the initial Authentication. - * @param ratePlanType Indicate the room type is sold as package or standalone. - * @param ratePlans Container for rate plan information. - * @param price - * @param standalonePrice - * @param promotionsDeprecated All promotion information of the room. **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. - * @param links - * @param smokingOption The smoking options available for the room type. - * @param bedTypeOptions Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). - * @param roomOccupancyPolicy - * @param amenities Container for all room amenities. - * @param descriptiveAmenities Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY - * @param media Container for Media elements. +* + * @param description Text description of the room type. + * @param roomKey An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. + * @param offerId An encrypted string which includes the information that could be used to address the current room type. + * @param merchantName Name of Merchant that did the initial Authentication. + * @param ratePlanType Indicate the room type is sold as package or standalone. + * @param ratePlans Container for rate plan information. + * @param price + * @param standalonePrice + * @param promotionsDeprecated All promotion information of the room. **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. + * @param links + * @param smokingOption The smoking options available for the room type. + * @param bedTypeOptions Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + * @param roomOccupancyPolicy + * @param amenities Container for all room amenities. + * @param descriptiveAmenities Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY + * @param media Container for Media elements. */ data class RoomType( - /* Text description of the room type. */ -@JsonProperty("Description") -val description: kotlin.String? = null, - - /* An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. */ + // Text description of the room type. + @JsonProperty("Description") + val description: kotlin.String? = null, + // An encrypted string which includes the information that could be used to address the current room type. `RoomKey` has been renamed as `OfferId`. @Deprecated(message = "This property is deprecated.") -@JsonProperty("RoomKey") -val roomKey: kotlin.String? = null, - - /* An encrypted string which includes the information that could be used to address the current room type. */ -@JsonProperty("OfferId") -val offerId: kotlin.String? = null, - - /* Name of Merchant that did the initial Authentication. */ -@JsonProperty("MerchantName") -val merchantName: kotlin.String? = null, - - /* Indicate the room type is sold as package or standalone. */ -@JsonProperty("RatePlanType") -val ratePlanType: RoomType.RatePlanType? = null, - - /* Container for rate plan information. */ -@JsonProperty("RatePlans") -val ratePlans: kotlin.collections.List? = null, - - @JsonProperty("Price") -val price: RoomTypePrice? = null, - - @JsonProperty("StandalonePrice") -val standalonePrice: RoomTypeStandalonePrice? = null, - - /* All promotion information of the room. **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. */ + @JsonProperty("RoomKey") + val roomKey: kotlin.String? = null, + // An encrypted string which includes the information that could be used to address the current room type. + @JsonProperty("OfferId") + val offerId: kotlin.String? = null, + // Name of Merchant that did the initial Authentication. + @JsonProperty("MerchantName") + val merchantName: kotlin.String? = null, + // Indicate the room type is sold as package or standalone. + @JsonProperty("RatePlanType") + val ratePlanType: RoomType.RatePlanType? = null, + // Container for rate plan information. + @JsonProperty("RatePlans") + val ratePlans: kotlin.collections.List? = null, + @JsonProperty("Price") + val price: RoomTypePrice? = null, + @JsonProperty("StandalonePrice") + val standalonePrice: RoomTypeStandalonePrice? = null, + // All promotion information of the room. **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. @Deprecated(message = "This property is deprecated.") -@JsonProperty("Promotions [deprecated]") -val promotionsDeprecated: kotlin.collections.List? = null, - - @JsonProperty("Links") -val links: RoomTypeLinks? = null, - - /* The smoking options available for the room type. */ -@JsonProperty("SmokingOption") -val smokingOption: RoomType.SmokingOption? = null, - - /* Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). */ -@JsonProperty("BedTypeOptions") -val bedTypeOptions: kotlin.collections.List? = null, - - @JsonProperty("RoomOccupancyPolicy") -val roomOccupancyPolicy: RoomOccupancyPolicy? = null, - - /* Container for all room amenities. */ -@JsonProperty("Amenities") -val amenities: kotlin.collections.List? = null, - - /* Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY */ -@JsonProperty("DescriptiveAmenities") -val descriptiveAmenities: kotlin.collections.Map>? = null, - - /* Container for Media elements. */ -@JsonProperty("Media") -val media: kotlin.collections.List? = null + @JsonProperty("Promotions [deprecated]") + val promotionsDeprecated: kotlin.collections.List? = null, + @JsonProperty("Links") + val links: RoomTypeLinks? = null, + // The smoking options available for the room type. + @JsonProperty("SmokingOption") + val smokingOption: RoomType.SmokingOption? = null, + // Statement of bed types available for this offer. A room may have several bed type options available. **NOTE**: due to the large number of bed type options available, we no longer publish a list of available bed types. More information is available in [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + @JsonProperty("BedTypeOptions") + val bedTypeOptions: kotlin.collections.List? = null, + @JsonProperty("RoomOccupancyPolicy") + val roomOccupancyPolicy: RoomOccupancyPolicy? = null, + // Container for all room amenities. + @JsonProperty("Amenities") + val amenities: kotlin.collections.List? = null, + // Container for all room amenities in group. The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: - ACCESSIBILITY - BATHROOM - BEDROOM - CLUB_EXEC - FAMILY_FRIENDLY - ENTERTAINMENT - FOOD_AND_DRINK - INTERNET - MORE - OUTDOOR_SPACE - SAFETY + @JsonProperty("DescriptiveAmenities") + val descriptiveAmenities: kotlin.collections.Map>? = null, + // Container for Media elements. + @JsonProperty("Media") + val media: kotlin.collections.List? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var description: kotlin.String? = null, + private var roomKey: kotlin.String? = null, + private var offerId: kotlin.String? = null, + private var merchantName: kotlin.String? = null, + private var ratePlanType: RoomType.RatePlanType? = null, + private var ratePlans: kotlin.collections.List? = null, + private var price: RoomTypePrice? = null, + private var standalonePrice: RoomTypeStandalonePrice? = null, + private var promotionsDeprecated: kotlin.collections.List? = null, + private var links: RoomTypeLinks? = null, + private var smokingOption: RoomType.SmokingOption? = null, + private var bedTypeOptions: kotlin.collections.List? = null, + private var roomOccupancyPolicy: RoomOccupancyPolicy? = null, + private var amenities: kotlin.collections.List? = null, + private var descriptiveAmenities: kotlin.collections.Map>? = null, + private var media: kotlin.collections.List? = null, + ) { + fun description(description: kotlin.String?) = apply { this.description = description } + fun roomKey(roomKey: kotlin.String?) = apply { this.roomKey = roomKey } + fun offerId(offerId: kotlin.String?) = apply { this.offerId = offerId } + fun merchantName(merchantName: kotlin.String?) = apply { this.merchantName = merchantName } + fun ratePlanType(ratePlanType: RoomType.RatePlanType?) = apply { this.ratePlanType = ratePlanType } + fun ratePlans(ratePlans: kotlin.collections.List?) = apply { this.ratePlans = ratePlans } + fun price(price: RoomTypePrice?) = apply { this.price = price } + fun standalonePrice(standalonePrice: RoomTypeStandalonePrice?) = apply { this.standalonePrice = standalonePrice } + fun promotionsDeprecated(promotionsDeprecated: kotlin.collections.List?) = apply { this.promotionsDeprecated = promotionsDeprecated } + fun links(links: RoomTypeLinks?) = apply { this.links = links } + fun smokingOption(smokingOption: RoomType.SmokingOption?) = apply { this.smokingOption = smokingOption } + fun bedTypeOptions(bedTypeOptions: kotlin.collections.List?) = apply { this.bedTypeOptions = bedTypeOptions } + fun roomOccupancyPolicy(roomOccupancyPolicy: RoomOccupancyPolicy?) = apply { this.roomOccupancyPolicy = roomOccupancyPolicy } + fun amenities(amenities: kotlin.collections.List?) = apply { this.amenities = amenities } - } + fun descriptiveAmenities(descriptiveAmenities: kotlin.collections.Map>?) = + apply { + this.descriptiveAmenities = + descriptiveAmenities + } - companion object { - @JvmStatic - fun builder() = Builder() + fun media(media: kotlin.collections.List?) = apply { this.media = media } + + fun build(): RoomType { + val instance = + RoomType( + description = description, + roomKey = roomKey, + offerId = offerId, + merchantName = merchantName, + ratePlanType = ratePlanType, + ratePlans = ratePlans, + price = price, + standalonePrice = standalonePrice, + promotionsDeprecated = promotionsDeprecated, + links = links, + smokingOption = smokingOption, + bedTypeOptions = bedTypeOptions, + roomOccupancyPolicy = roomOccupancyPolicy, + amenities = amenities, + descriptiveAmenities = descriptiveAmenities, + media = media, + ) + + return instance + } } - class Builder( - private var description: kotlin.String? = null, - private var roomKey: kotlin.String? = null, - private var offerId: kotlin.String? = null, - private var merchantName: kotlin.String? = null, - private var ratePlanType: RoomType.RatePlanType? = null, - private var ratePlans: kotlin.collections.List? = null, - private var price: RoomTypePrice? = null, - private var standalonePrice: RoomTypeStandalonePrice? = null, - private var promotionsDeprecated: kotlin.collections.List? = null, - private var links: RoomTypeLinks? = null, - private var smokingOption: RoomType.SmokingOption? = null, - private var bedTypeOptions: kotlin.collections.List? = null, - private var roomOccupancyPolicy: RoomOccupancyPolicy? = null, - private var amenities: kotlin.collections.List? = null, - private var descriptiveAmenities: kotlin.collections.Map>? = null, - private var media: kotlin.collections.List? = null - ) { - fun description(description: kotlin.String?) = apply { this.description = description } - fun roomKey(roomKey: kotlin.String?) = apply { this.roomKey = roomKey } - fun offerId(offerId: kotlin.String?) = apply { this.offerId = offerId } - fun merchantName(merchantName: kotlin.String?) = apply { this.merchantName = merchantName } - fun ratePlanType(ratePlanType: RoomType.RatePlanType?) = apply { this.ratePlanType = ratePlanType } - fun ratePlans(ratePlans: kotlin.collections.List?) = apply { this.ratePlans = ratePlans } - fun price(price: RoomTypePrice?) = apply { this.price = price } - fun standalonePrice(standalonePrice: RoomTypeStandalonePrice?) = apply { this.standalonePrice = standalonePrice } - fun promotionsDeprecated(promotionsDeprecated: kotlin.collections.List?) = apply { this.promotionsDeprecated = promotionsDeprecated } - fun links(links: RoomTypeLinks?) = apply { this.links = links } - fun smokingOption(smokingOption: RoomType.SmokingOption?) = apply { this.smokingOption = smokingOption } - fun bedTypeOptions(bedTypeOptions: kotlin.collections.List?) = apply { this.bedTypeOptions = bedTypeOptions } - fun roomOccupancyPolicy(roomOccupancyPolicy: RoomOccupancyPolicy?) = apply { this.roomOccupancyPolicy = roomOccupancyPolicy } - fun amenities(amenities: kotlin.collections.List?) = apply { this.amenities = amenities } - fun descriptiveAmenities(descriptiveAmenities: kotlin.collections.Map>?) = apply { this.descriptiveAmenities = descriptiveAmenities } - fun media(media: kotlin.collections.List?) = apply { this.media = media } - - fun build(): RoomType { - val instance = RoomType( + fun toBuilder() = + Builder( description = description, roomKey = roomKey, offerId = offerId, @@ -285,59 +197,40 @@ val media: kotlin.collections.List? = null roomOccupancyPolicy = roomOccupancyPolicy, amenities = amenities, descriptiveAmenities = descriptiveAmenities, - media = media - ) - - return instance - } + media = media, + ) + + /** + * Indicate the room type is sold as package or standalone. + * Values: STANDALONE,PACKAGE,WHOLESALE + */ + enum class RatePlanType( + val value: kotlin.String, + ) { + @JsonProperty("standalone") + STANDALONE("standalone"), + + @JsonProperty("package") + PACKAGE("package"), + + @JsonProperty("wholesale") + WHOLESALE("wholesale"), } - fun toBuilder() = Builder( - description = description, - roomKey = roomKey, - offerId = offerId, - merchantName = merchantName, - ratePlanType = ratePlanType, - ratePlans = ratePlans, - price = price, - standalonePrice = standalonePrice, - promotionsDeprecated = promotionsDeprecated, - links = links, - smokingOption = smokingOption, - bedTypeOptions = bedTypeOptions, - roomOccupancyPolicy = roomOccupancyPolicy, - amenities = amenities, - descriptiveAmenities = descriptiveAmenities, - media = media - ) - - /** - * Indicate the room type is sold as package or standalone. - * Values: STANDALONE,PACKAGE,WHOLESALE - */ - enum class RatePlanType(val value: kotlin.String) { - @JsonProperty("standalone") - STANDALONE("standalone"), - - @JsonProperty("package") - PACKAGE("package"), - - @JsonProperty("wholesale") - WHOLESALE("wholesale"); - } - - /** - * The smoking options available for the room type. - * Values: SMOKING_OR_NON_SMOKING,SMOKING,NON_SMOKING - */ - enum class SmokingOption(val value: kotlin.String) { - @JsonProperty("SmokingOrNonSmoking") - SMOKING_OR_NON_SMOKING("SmokingOrNonSmoking"), - - @JsonProperty("Smoking") - SMOKING("Smoking"), - - @JsonProperty("NonSmoking") - NON_SMOKING("NonSmoking"); - } + /** + * The smoking options available for the room type. + * Values: SMOKING_OR_NON_SMOKING,SMOKING,NON_SMOKING + */ + enum class SmokingOption( + val value: kotlin.String, + ) { + @JsonProperty("SmokingOrNonSmoking") + SMOKING_OR_NON_SMOKING("SmokingOrNonSmoking"), + + @JsonProperty("Smoking") + SMOKING("Smoking"), + + @JsonProperty("NonSmoking") + NON_SMOKING("NonSmoking"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt index a091af609..33dfe06d4 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeAmenitiesInner.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param id Amenity id - * @param name Amenity name +* + * @param id Amenity id + * @param name Amenity name */ data class RoomTypeAmenitiesInner( - /* Amenity id */ -@JsonProperty("Id") -val id: kotlin.Any? = null, - - /* Amenity name */ -@JsonProperty("Name") -val name: kotlin.Any? = null + // Amenity id + @JsonProperty("Id") + val id: kotlin.Any? = null, + // Amenity name + @JsonProperty("Name") + val name: kotlin.Any? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.Any? = null, - private var name: kotlin.Any? = null - ) { - fun id(id: kotlin.Any?) = apply { this.id = id } - fun name(name: kotlin.Any?) = apply { this.name = name } + class Builder( + private var id: kotlin.Any? = null, + private var name: kotlin.Any? = null, + ) { + fun id(id: kotlin.Any?) = apply { this.id = id } - fun build(): RoomTypeAmenitiesInner { - val instance = RoomTypeAmenitiesInner( - id = id, - name = name - ) + fun name(name: kotlin.Any?) = apply { this.name = name } - return instance - } + fun build(): RoomTypeAmenitiesInner { + val instance = + RoomTypeAmenitiesInner( + id = id, + name = name, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id, - name = name - ) + name = name, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt index 995e16f14..a88c91238 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinks.kt @@ -19,81 +19,57 @@ import com.expediagroup.sdk.xap.models.HotelLinksWebSearchResult import com.expediagroup.sdk.xap.models.Link import com.expediagroup.sdk.xap.models.RoomTypeLinksApiDetails import com.expediagroup.sdk.xap.models.RoomTypeLinksWebDetails - import com.fasterxml.jackson.annotation.JsonProperty /** -* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the `links` parameter in the Search API query. Available links are: - WebSearchResult (link to web search result page) - WebDetails (link to web infosite) - ApiDetails (link for details API) - * @param webSearchResult - * @param webDetails - * @param apiDetails +* Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. Which links are returned in this section are defined by the `links` parameter in the Search API query. Available links are: - WebSearchResult (link to web search result page) - WebDetails (link to web infosite) - ApiDetails (link for details API) + * @param webSearchResult + * @param webDetails + * @param apiDetails */ data class RoomTypeLinks( - @JsonProperty("WebSearchResult") -val webSearchResult: HotelLinksWebSearchResult? = null, - - @JsonProperty("WebDetails") -val webDetails: RoomTypeLinksWebDetails? = null, - - @JsonProperty("ApiDetails") -val apiDetails: RoomTypeLinksApiDetails? = null + @JsonProperty("WebSearchResult") + val webSearchResult: HotelLinksWebSearchResult? = null, + @JsonProperty("WebDetails") + val webDetails: RoomTypeLinksWebDetails? = null, + @JsonProperty("ApiDetails") + val apiDetails: RoomTypeLinksApiDetails? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var webSearchResult: HotelLinksWebSearchResult? = null, - private var webDetails: RoomTypeLinksWebDetails? = null, - private var apiDetails: RoomTypeLinksApiDetails? = null - ) { - fun webSearchResult(webSearchResult: HotelLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - fun webDetails(webDetails: RoomTypeLinksWebDetails?) = apply { this.webDetails = webDetails } - fun apiDetails(apiDetails: RoomTypeLinksApiDetails?) = apply { this.apiDetails = apiDetails } + class Builder( + private var webSearchResult: HotelLinksWebSearchResult? = null, + private var webDetails: RoomTypeLinksWebDetails? = null, + private var apiDetails: RoomTypeLinksApiDetails? = null, + ) { + fun webSearchResult(webSearchResult: HotelLinksWebSearchResult?) = apply { this.webSearchResult = webSearchResult } - fun build(): RoomTypeLinks { - val instance = RoomTypeLinks( - webSearchResult = webSearchResult, - webDetails = webDetails, - apiDetails = apiDetails - ) + fun webDetails(webDetails: RoomTypeLinksWebDetails?) = apply { this.webDetails = webDetails } - return instance - } + fun apiDetails(apiDetails: RoomTypeLinksApiDetails?) = apply { this.apiDetails = apiDetails } + + fun build(): RoomTypeLinks { + val instance = + RoomTypeLinks( + webSearchResult = webSearchResult, + webDetails = webDetails, + apiDetails = apiDetails, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( webSearchResult = webSearchResult, webDetails = webDetails, - apiDetails = apiDetails - ) + apiDetails = apiDetails, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt index 14d9683be..5f9f1397a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksApiDetails.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class RoomTypeLinksApiDetails( - /* The Accept request header (for API queries only - not included for page URLs). */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* Method of request. */ -@JsonProperty("Method") -val method: kotlin.String? = null, - - /* The URL of the destination web page or API query. */ -@JsonProperty("Href") -val href: kotlin.String? = null + // The Accept request header (for API queries only - not included for page URLs). + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // Method of request. + @JsonProperty("Method") + val method: kotlin.String? = null, + // The URL of the destination web page or API query. + @JsonProperty("Href") + val href: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } - fun href(href: kotlin.String?) = apply { this.href = href } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun build(): RoomTypeLinksApiDetails { - val instance = RoomTypeLinksApiDetails( - accept = accept, - method = method, - href = href - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): RoomTypeLinksApiDetails { + val instance = + RoomTypeLinksApiDetails( + accept = accept, + method = method, + href = href, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( accept = accept, method = method, - href = href - ) + href = href, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt index 8edd68695..279b7426b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeLinksWebDetails.kt @@ -15,84 +15,60 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param accept The Accept request header (for API queries only - not included for page URLs). - * @param method Method of request. - * @param href The URL of the destination web page or API query. +* + * @param accept The Accept request header (for API queries only - not included for page URLs). + * @param method Method of request. + * @param href The URL of the destination web page or API query. */ data class RoomTypeLinksWebDetails( - /* The Accept request header (for API queries only - not included for page URLs). */ -@JsonProperty("Accept") -val accept: kotlin.String? = null, - - /* Method of request. */ -@JsonProperty("Method") -val method: kotlin.String? = null, - - /* The URL of the destination web page or API query. */ -@JsonProperty("Href") -val href: kotlin.String? = null + // The Accept request header (for API queries only - not included for page URLs). + @JsonProperty("Accept") + val accept: kotlin.String? = null, + // Method of request. + @JsonProperty("Method") + val method: kotlin.String? = null, + // The URL of the destination web page or API query. + @JsonProperty("Href") + val href: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var accept: kotlin.String? = null, - private var method: kotlin.String? = null, - private var href: kotlin.String? = null - ) { - fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun method(method: kotlin.String?) = apply { this.method = method } - fun href(href: kotlin.String?) = apply { this.href = href } + class Builder( + private var accept: kotlin.String? = null, + private var method: kotlin.String? = null, + private var href: kotlin.String? = null, + ) { + fun accept(accept: kotlin.String?) = apply { this.accept = accept } - fun build(): RoomTypeLinksWebDetails { - val instance = RoomTypeLinksWebDetails( - accept = accept, - method = method, - href = href - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun href(href: kotlin.String?) = apply { this.href = href } + + fun build(): RoomTypeLinksWebDetails { + val instance = + RoomTypeLinksWebDetails( + accept = accept, + method = method, + href = href, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( accept = accept, method = method, - href = href - ) + href = href, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt index 40d355c09..ed41738d6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeMediaInner.kt @@ -15,109 +15,80 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param type Supported type of media. 1=Image. Only 1 is supported now. - * @param title Image title - * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). - * @param url Image URL +* + * @param type Supported type of media. 1=Image. Only 1 is supported now. + * @param title Image title + * @param propertySize Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + * @param url Image URL */ data class RoomTypeMediaInner( - /* Supported type of media. 1=Image. Only 1 is supported now. */ -@JsonProperty("Type") -val type: RoomTypeMediaInner.Type? = null, - - /* Image title */ -@JsonProperty("Title") -val title: kotlin.String? = null, - - /* Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). */ -@JsonProperty("Size") -val propertySize: kotlin.String? = null, - - /* Image URL */ -@JsonProperty("Url") -val url: kotlin.String? = null + // Supported type of media. 1=Image. Only 1 is supported now. + @JsonProperty("Type") + val type: RoomTypeMediaInner.Type? = null, + // Image title + @JsonProperty("Title") + val title: kotlin.String? = null, + // Image size. You can find a link to the complete list of Supported Images Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + @JsonProperty("Size") + val propertySize: kotlin.String? = null, + // Image URL + @JsonProperty("Url") + val url: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var type: RoomTypeMediaInner.Type? = null, + private var title: kotlin.String? = null, + private var propertySize: kotlin.String? = null, + private var url: kotlin.String? = null, + ) { + fun type(type: RoomTypeMediaInner.Type?) = apply { this.type = type } + fun title(title: kotlin.String?) = apply { this.title = title } + fun propertySize(propertySize: kotlin.String?) = apply { this.propertySize = propertySize } + fun url(url: kotlin.String?) = apply { this.url = url } - } + fun build(): RoomTypeMediaInner { + val instance = + RoomTypeMediaInner( + type = type, + title = title, + propertySize = propertySize, + url = url, + ) - companion object { - @JvmStatic - fun builder() = Builder() + return instance + } } - class Builder( - private var type: RoomTypeMediaInner.Type? = null, - private var title: kotlin.String? = null, - private var propertySize: kotlin.String? = null, - private var url: kotlin.String? = null - ) { - fun type(type: RoomTypeMediaInner.Type?) = apply { this.type = type } - fun title(title: kotlin.String?) = apply { this.title = title } - fun propertySize(propertySize: kotlin.String?) = apply { this.propertySize = propertySize } - fun url(url: kotlin.String?) = apply { this.url = url } - - fun build(): RoomTypeMediaInner { - val instance = RoomTypeMediaInner( + fun toBuilder() = + Builder( type = type, title = title, propertySize = propertySize, - url = url - ) - - return instance - } + url = url, + ) + + /** + * Supported type of media. 1=Image. Only 1 is supported now. + * Values: _1 + */ + enum class Type( + val value: kotlin.String, + ) { + @JsonProperty("1") + _1("1"), } - - fun toBuilder() = Builder( - type = type, - title = title, - propertySize = propertySize, - url = url - ) - - /** - * Supported type of media. 1=Image. Only 1 is supported now. - * Values: _1 - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("1") - _1("1"); - } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt index afb5436a9..112356417 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypePrice.kt @@ -16,202 +16,122 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** * Container of all price components of the room. - * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. - * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. - * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - * @param totalStrikeOutPrice The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. - * @param avgNightlyRate The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyStrikeOutRate The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. - * @param avgNightlyStrikeoutRateWithFees The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. - * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. - * @param totalPriceWithHotelFees The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. - * @param refundableDamageDeposit The refundable damage deposit for the rate plan. + * @param baseRate The price of the rate plan for all occupants, excluding taxes and fees. + * @param taxesAndFees The total rate of taxes and fees of the rate plan for all occupants. + * @param totalPrice The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. + * @param avgNightlyRate The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyRateWithFees The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + * @param avgNightlyStrikeoutRateWithFees The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. + * @param hotelMandatoryFees The total mandatory fees which will be charged at the hotel for the rate plan. + * @param totalPriceWithHotelFees The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + * @param refundableDamageDeposit The refundable damage deposit for the rate plan. */ data class RoomTypePrice( - /* The price of the rate plan for all occupants, excluding taxes and fees. */ -@JsonProperty("BaseRate") -val baseRate: Money? = null, - - /* The total rate of taxes and fees of the rate plan for all occupants. */ -@JsonProperty("TaxesAndFees") -val taxesAndFees: Money? = null, - - /* The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. */ -@JsonProperty("TotalPrice") -val totalPrice: Money? = null, - - /* The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. */ -@JsonProperty("TotalStrikeOutPrice") -val totalStrikeOutPrice: Money? = null, - - /* The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyRate") -val avgNightlyRate: Money? = null, - - /* The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyStrikeOutRate") -val avgNightlyStrikeOutRate: Money? = null, - - /* The average nightly rate per night per room of the room type, including all fees except those imposed by the government. */ -@JsonProperty("AvgNightlyRateWithFees") -val avgNightlyRateWithFees: Money? = null, - - /* The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. */ -@JsonProperty("AvgNightlyStrikeoutRateWithFees") -val avgNightlyStrikeoutRateWithFees: Money? = null, - - /* The total mandatory fees which will be charged at the hotel for the rate plan. */ -@JsonProperty("HotelMandatoryFees") -val hotelMandatoryFees: Money? = null, - - /* The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. */ -@JsonProperty("TotalPriceWithHotelFees") -val totalPriceWithHotelFees: Money? = null, - - /* The refundable damage deposit for the rate plan. */ -@JsonProperty("RefundableDamageDeposit") -val refundableDamageDeposit: Money? = null + // The price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + val baseRate: Money? = null, + // The total rate of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + val taxesAndFees: Money? = null, + // The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + @JsonProperty("TotalPrice") + val totalPrice: Money? = null, + // The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. + @JsonProperty("TotalStrikeOutPrice") + val totalStrikeOutPrice: Money? = null, + // The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + val avgNightlyRate: Money? = null, + // The average nightly strike out rate per night per room of the room type, which is equal to the strike out of `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyStrikeOutRate") + val avgNightlyStrikeOutRate: Money? = null, + // The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + @JsonProperty("AvgNightlyRateWithFees") + val avgNightlyRateWithFees: Money? = null, + // The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. + @JsonProperty("AvgNightlyStrikeoutRateWithFees") + val avgNightlyStrikeoutRateWithFees: Money? = null, + // The total mandatory fees which will be charged at the hotel for the rate plan. + @JsonProperty("HotelMandatoryFees") + val hotelMandatoryFees: Money? = null, + // The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the quoted price will only be accurate for the day of quote. This is due to the fact that currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to be collected at the hotel during the guest's stay if the cost is converted into any other currency. **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to be compliant with CMA requirements. + @JsonProperty("TotalPriceWithHotelFees") + val totalPriceWithHotelFees: Money? = null, + // The refundable damage deposit for the rate plan. + @JsonProperty("RefundableDamageDeposit") + val refundableDamageDeposit: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var baseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var avgNightlyRateWithFees: Money? = null, + private var avgNightlyStrikeoutRateWithFees: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var totalPriceWithHotelFees: Money? = null, + private var refundableDamageDeposit: Money? = null, + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } + fun avgNightlyRateWithFees(avgNightlyRateWithFees: Money?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } + fun avgNightlyStrikeoutRateWithFees(avgNightlyStrikeoutRateWithFees: Money?) = apply { this.avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - } + fun totalPriceWithHotelFees(totalPriceWithHotelFees: Money?) = apply { this.totalPriceWithHotelFees = totalPriceWithHotelFees } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - class Builder( - private var baseRate: Money? = null, - private var taxesAndFees: Money? = null, - private var totalPrice: Money? = null, - private var totalStrikeOutPrice: Money? = null, - private var avgNightlyRate: Money? = null, - private var avgNightlyStrikeOutRate: Money? = null, - private var avgNightlyRateWithFees: Money? = null, - private var avgNightlyStrikeoutRateWithFees: Money? = null, - private var hotelMandatoryFees: Money? = null, - private var totalPriceWithHotelFees: Money? = null, - private var refundableDamageDeposit: Money? = null - ) { - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - fun avgNightlyRateWithFees(avgNightlyRateWithFees: Money?) = apply { this.avgNightlyRateWithFees = avgNightlyRateWithFees } - fun avgNightlyStrikeoutRateWithFees(avgNightlyStrikeoutRateWithFees: Money?) = apply { this.avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees } - fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - fun totalPriceWithHotelFees(totalPriceWithHotelFees: Money?) = apply { this.totalPriceWithHotelFees = totalPriceWithHotelFees } - fun refundableDamageDeposit(refundableDamageDeposit: Money?) = apply { this.refundableDamageDeposit = refundableDamageDeposit } - - fun build(): RoomTypePrice { - val instance = RoomTypePrice( - baseRate = baseRate, - taxesAndFees = taxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - avgNightlyRateWithFees = avgNightlyRateWithFees, - avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, - hotelMandatoryFees = hotelMandatoryFees, - totalPriceWithHotelFees = totalPriceWithHotelFees, - refundableDamageDeposit = refundableDamageDeposit - ) + fun build(): RoomTypePrice { + val instance = + RoomTypePrice( + baseRate = baseRate, + taxesAndFees = taxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + avgNightlyRateWithFees = avgNightlyRateWithFees, + avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, + hotelMandatoryFees = hotelMandatoryFees, + totalPriceWithHotelFees = totalPriceWithHotelFees, + refundableDamageDeposit = refundableDamageDeposit, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( baseRate = baseRate, taxesAndFees = taxesAndFees, totalPrice = totalPrice, @@ -222,6 +142,6 @@ val refundableDamageDeposit: Money? = null avgNightlyStrikeoutRateWithFees = avgNightlyStrikeoutRateWithFees, hotelMandatoryFees = hotelMandatoryFees, totalPriceWithHotelFees = totalPriceWithHotelFees, - refundableDamageDeposit = refundableDamageDeposit - ) + refundableDamageDeposit = refundableDamageDeposit, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt index e9c1002a0..7bf77f6da 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/RoomTypeStandalonePrice.kt @@ -16,187 +16,114 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when this is a package rate plan. - * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. - * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. - * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. - * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. - * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. - * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. - * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. - * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. - * @param hotelMandatoryFees The total standalone mandatory fees. - * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. +* The corresponded standalone price to the package rate plan (to show the `strikethrough`). Only returned when this is a package rate plan. + * @param baseRate The standalone price of the rate plan for all occupants, excluding taxes and fees. + * @param strikeOutBaseRate The base rate strikeout in the standalone shopping path. + * @param taxesAndFees The total standalone rate of taxes and fees of the rate plan for all occupants. + * @param strikeOutTaxesAndFees The taxes and fees strikeout in the standalone shopping path. + * @param totalPrice The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + * @param totalStrikeOutPrice The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + * @param avgNightlyRate The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + * @param avgNightlyStrikeOutRate The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + * @param hotelMandatoryFees The total standalone mandatory fees. + * @param strikeOutHotelMandatoryFees The strikeout of the mandatory fees in the standalone shopping path. */ data class RoomTypeStandalonePrice( - /* The standalone price of the rate plan for all occupants, excluding taxes and fees. */ -@JsonProperty("BaseRate") -val baseRate: Money? = null, - - /* The base rate strikeout in the standalone shopping path. */ -@JsonProperty("StrikeOutBaseRate") -val strikeOutBaseRate: Money? = null, - - /* The total standalone rate of taxes and fees of the rate plan for all occupants. */ -@JsonProperty("TaxesAndFees") -val taxesAndFees: Money? = null, - - /* The taxes and fees strikeout in the standalone shopping path. */ -@JsonProperty("StrikeOutTaxesAndFees") -val strikeOutTaxesAndFees: Money? = null, - - /* The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. */ -@JsonProperty("TotalPrice") -val totalPrice: Money? = null, - - /* The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. */ -@JsonProperty("TotalStrikeOutPrice") -val totalStrikeOutPrice: Money? = null, - - /* The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyRate") -val avgNightlyRate: Money? = null, - - /* The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. */ -@JsonProperty("AvgNightlyStrikeOutRate") -val avgNightlyStrikeOutRate: Money? = null, - - /* The total standalone mandatory fees. */ -@JsonProperty("HotelMandatoryFees") -val hotelMandatoryFees: Money? = null, - - /* The strikeout of the mandatory fees in the standalone shopping path. */ -@JsonProperty("StrikeOutHotelMandatoryFees") -val strikeOutHotelMandatoryFees: Money? = null + // The standalone price of the rate plan for all occupants, excluding taxes and fees. + @JsonProperty("BaseRate") + val baseRate: Money? = null, + // The base rate strikeout in the standalone shopping path. + @JsonProperty("StrikeOutBaseRate") + val strikeOutBaseRate: Money? = null, + // The total standalone rate of taxes and fees of the rate plan for all occupants. + @JsonProperty("TaxesAndFees") + val taxesAndFees: Money? = null, + // The taxes and fees strikeout in the standalone shopping path. + @JsonProperty("StrikeOutTaxesAndFees") + val strikeOutTaxesAndFees: Money? = null, + // The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel mandatory fees are not included as these are paid at the hotel at checkout. + @JsonProperty("TotalPrice") + val totalPrice: Money? = null, + // The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + @JsonProperty("TotalStrikeOutPrice") + val totalStrikeOutPrice: Money? = null, + // The average standalone nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyRate") + val avgNightlyRate: Money? = null, + // The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + @JsonProperty("AvgNightlyStrikeOutRate") + val avgNightlyStrikeOutRate: Money? = null, + // The total standalone mandatory fees. + @JsonProperty("HotelMandatoryFees") + val hotelMandatoryFees: Money? = null, + // The strikeout of the mandatory fees in the standalone shopping path. + @JsonProperty("StrikeOutHotelMandatoryFees") + val strikeOutHotelMandatoryFees: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var baseRate: Money? = null, + private var strikeOutBaseRate: Money? = null, + private var taxesAndFees: Money? = null, + private var strikeOutTaxesAndFees: Money? = null, + private var totalPrice: Money? = null, + private var totalStrikeOutPrice: Money? = null, + private var avgNightlyRate: Money? = null, + private var avgNightlyStrikeOutRate: Money? = null, + private var hotelMandatoryFees: Money? = null, + private var strikeOutHotelMandatoryFees: Money? = null, + ) { + fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } + fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } + fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } + fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } + fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } + fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } + fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } + fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - } + fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } - class Builder( - private var baseRate: Money? = null, - private var strikeOutBaseRate: Money? = null, - private var taxesAndFees: Money? = null, - private var strikeOutTaxesAndFees: Money? = null, - private var totalPrice: Money? = null, - private var totalStrikeOutPrice: Money? = null, - private var avgNightlyRate: Money? = null, - private var avgNightlyStrikeOutRate: Money? = null, - private var hotelMandatoryFees: Money? = null, - private var strikeOutHotelMandatoryFees: Money? = null - ) { - fun baseRate(baseRate: Money?) = apply { this.baseRate = baseRate } - fun strikeOutBaseRate(strikeOutBaseRate: Money?) = apply { this.strikeOutBaseRate = strikeOutBaseRate } - fun taxesAndFees(taxesAndFees: Money?) = apply { this.taxesAndFees = taxesAndFees } - fun strikeOutTaxesAndFees(strikeOutTaxesAndFees: Money?) = apply { this.strikeOutTaxesAndFees = strikeOutTaxesAndFees } - fun totalPrice(totalPrice: Money?) = apply { this.totalPrice = totalPrice } - fun totalStrikeOutPrice(totalStrikeOutPrice: Money?) = apply { this.totalStrikeOutPrice = totalStrikeOutPrice } - fun avgNightlyRate(avgNightlyRate: Money?) = apply { this.avgNightlyRate = avgNightlyRate } - fun avgNightlyStrikeOutRate(avgNightlyStrikeOutRate: Money?) = apply { this.avgNightlyStrikeOutRate = avgNightlyStrikeOutRate } - fun hotelMandatoryFees(hotelMandatoryFees: Money?) = apply { this.hotelMandatoryFees = hotelMandatoryFees } - fun strikeOutHotelMandatoryFees(strikeOutHotelMandatoryFees: Money?) = apply { this.strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees } - - fun build(): RoomTypeStandalonePrice { - val instance = RoomTypeStandalonePrice( - baseRate = baseRate, - strikeOutBaseRate = strikeOutBaseRate, - taxesAndFees = taxesAndFees, - strikeOutTaxesAndFees = strikeOutTaxesAndFees, - totalPrice = totalPrice, - totalStrikeOutPrice = totalStrikeOutPrice, - avgNightlyRate = avgNightlyRate, - avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, - hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) + fun build(): RoomTypeStandalonePrice { + val instance = + RoomTypeStandalonePrice( + baseRate = baseRate, + strikeOutBaseRate = strikeOutBaseRate, + taxesAndFees = taxesAndFees, + strikeOutTaxesAndFees = strikeOutTaxesAndFees, + totalPrice = totalPrice, + totalStrikeOutPrice = totalStrikeOutPrice, + avgNightlyRate = avgNightlyRate, + avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, + hotelMandatoryFees = hotelMandatoryFees, + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( baseRate = baseRate, strikeOutBaseRate = strikeOutBaseRate, taxesAndFees = taxesAndFees, @@ -206,6 +133,6 @@ val strikeOutHotelMandatoryFees: Money? = null avgNightlyRate = avgNightlyRate, avgNightlyStrikeOutRate = avgNightlyStrikeOutRate, hotelMandatoryFees = hotelMandatoryFees, - strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees - ) + strikeOutHotelMandatoryFees = strikeOutHotelMandatoryFees, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt index a8727d42d..bee2be476 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Savings.kt @@ -16,73 +16,53 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * Container of savings information. - * @param percentage The percentage of the price that has been discounted off the regular price for the current activity. - * @param amount + * @param percentage The percentage of the price that has been discounted off the regular price for the current activity. + * @param amount */ data class Savings( - /* The percentage of the price that has been discounted off the regular price for the current activity. */ -@JsonProperty("Percentage") -val percentage: - kotlin.Int -, - - @JsonProperty("Amount") -val amount: - ActivitiesMoney - + // The percentage of the price that has been discounted off the regular price for the current activity. + @JsonProperty("Percentage") + val percentage: kotlin.Int, + @JsonProperty("Amount") + val amount: ActivitiesMoney, ) { - - - init { - require(percentage != null) { "percentage must not be null" } - - - - - - + require(percentage != null) { "percentage must not be null" } require(amount != null) { "amount must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var percentage: kotlin.Int? = null, - private var amount: ActivitiesMoney? = null - ) { - fun percentage(percentage: kotlin.Int) = apply { this.percentage = percentage } - fun amount(amount: ActivitiesMoney) = apply { this.amount = amount } + class Builder( + private var percentage: kotlin.Int? = null, + private var amount: ActivitiesMoney? = null, + ) { + fun percentage(percentage: kotlin.Int) = apply { this.percentage = percentage } - fun build(): Savings { - val instance = Savings( - percentage = percentage!!, - amount = amount!! - ) + fun amount(amount: ActivitiesMoney) = apply { this.amount = amount } - return instance - } + fun build(): Savings { + val instance = + Savings( + percentage = percentage!!, + amount = amount!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( percentage = percentage!!, - amount = amount!! - ) + amount = amount!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt index 69de47a20..74d7b4d98 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpAPIMError.kt @@ -15,52 +15,42 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Error from the APIM. - * @param message Error from the APIM. + * @param message Error from the APIM. */ data class SdpAPIMError( - /* Error from the APIM. */ -@JsonProperty("message") -val message: kotlin.String? = null + // Error from the APIM. + @JsonProperty("message") + val message: kotlin.String? = null, ) { - - - init { - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var message: kotlin.String? = null - ) { - fun message(message: kotlin.String?) = apply { this.message = message } + class Builder( + private var message: kotlin.String? = null, + ) { + fun message(message: kotlin.String?) = apply { this.message = message } - fun build(): SdpAPIMError { - val instance = SdpAPIMError( - message = message - ) + fun build(): SdpAPIMError { + val instance = + SdpAPIMError( + message = message, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( - message = message - ) + fun toBuilder() = + Builder( + message = message, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt index 04adeae73..a8e106893 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/SdpLink.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Contains link information, including link address, request method. Only provided if FileInfo is in OtherFileOptions. - * @param href a link address. - * @param method Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... + * @param href a link address. + * @param method Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... */ data class SdpLink( - /* a link address. */ -@JsonProperty("href") -val href: kotlin.String? = null, - - /* Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... */ -@JsonProperty("method") -val method: kotlin.String? = null + // a link address. + @JsonProperty("href") + val href: kotlin.String? = null, + // Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... + @JsonProperty("method") + val method: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var href: kotlin.String? = null, - private var method: kotlin.String? = null - ) { - fun href(href: kotlin.String?) = apply { this.href = href } - fun method(method: kotlin.String?) = apply { this.method = method } + class Builder( + private var href: kotlin.String? = null, + private var method: kotlin.String? = null, + ) { + fun href(href: kotlin.String?) = apply { this.href = href } - fun build(): SdpLink { - val instance = SdpLink( - href = href, - method = method - ) + fun method(method: kotlin.String?) = apply { this.method = method } - return instance - } + fun build(): SdpLink { + val instance = + SdpLink( + href = href, + method = method, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( href = href, - method = method - ) + method = method, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt index d5f35a5af..a223495f2 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/StayDates.kt @@ -15,68 +15,51 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for information for the stay dates of the rate plan. - * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. - * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + * @param checkInDate The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + * @param checkOutDate The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ data class StayDates( - /* The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ -@JsonProperty("CheckInDate") -val checkInDate: java.time.LocalDate? = null, - - /* The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. */ -@JsonProperty("CheckOutDate") -val checkOutDate: java.time.LocalDate? = null + // The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + @JsonProperty("CheckInDate") + val checkInDate: java.time.LocalDate? = null, + // The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + @JsonProperty("CheckOutDate") + val checkOutDate: java.time.LocalDate? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var checkInDate: java.time.LocalDate? = null, - private var checkOutDate: java.time.LocalDate? = null - ) { - fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } + class Builder( + private var checkInDate: java.time.LocalDate? = null, + private var checkOutDate: java.time.LocalDate? = null, + ) { + fun checkInDate(checkInDate: java.time.LocalDate?) = apply { this.checkInDate = checkInDate } - fun build(): StayDates { - val instance = StayDates( - checkInDate = checkInDate, - checkOutDate = checkOutDate - ) + fun checkOutDate(checkOutDate: java.time.LocalDate?) = apply { this.checkOutDate = checkOutDate } - return instance - } + fun build(): StayDates { + val instance = + StayDates( + checkInDate = checkInDate, + checkOutDate = checkOutDate, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( checkInDate = checkInDate, - checkOutDate = checkOutDate - ) + checkOutDate = checkOutDate, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt index 5b49222d3..28a082b57 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Supplier.kt @@ -15,109 +15,74 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * The supplier of the car being offered. - * @param id Supplier ID. - * @param name Supplier Name. - * @param code Supplier Code. - * @param logoImageUrl Supplier Logo Image Url. + * @param id Supplier ID. + * @param name Supplier Name. + * @param code Supplier Code. + * @param logoImageUrl Supplier Logo Image Url. */ data class Supplier( - /* Supplier ID. */ -@JsonProperty("Id") -val id: - kotlin.String -, - - /* Supplier Name. */ -@JsonProperty("Name") -val name: - kotlin.String -, - - /* Supplier Code. */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* Supplier Logo Image Url. */ -@JsonProperty("LogoImageUrl") -val logoImageUrl: kotlin.String? = null + // Supplier ID. + @JsonProperty("Id") + val id: kotlin.String, + // Supplier Name. + @JsonProperty("Name") + val name: kotlin.String, + // Supplier Code. + @JsonProperty("Code") + val code: kotlin.String, + // Supplier Logo Image Url. + @JsonProperty("LogoImageUrl") + val logoImageUrl: kotlin.String? = null, ) { - - - init { - require(id != null) { "id must not be null" } - - - - - - + require(id != null) { "id must not be null" } require(name != null) { "name must not be null" } - - - - - - require(code != null) { "code must not be null" } - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var id: kotlin.String? = null, - private var name: kotlin.String? = null, - private var code: kotlin.String? = null, - private var logoImageUrl: kotlin.String? = null - ) { - fun id(id: kotlin.String) = apply { this.id = id } - fun name(name: kotlin.String) = apply { this.name = name } - fun code(code: kotlin.String) = apply { this.code = code } - fun logoImageUrl(logoImageUrl: kotlin.String?) = apply { this.logoImageUrl = logoImageUrl } + class Builder( + private var id: kotlin.String? = null, + private var name: kotlin.String? = null, + private var code: kotlin.String? = null, + private var logoImageUrl: kotlin.String? = null, + ) { + fun id(id: kotlin.String) = apply { this.id = id } - fun build(): Supplier { - val instance = Supplier( - id = id!!, - name = name!!, - code = code!!, - logoImageUrl = logoImageUrl - ) + fun name(name: kotlin.String) = apply { this.name = name } - return instance - } + fun code(code: kotlin.String) = apply { this.code = code } + + fun logoImageUrl(logoImageUrl: kotlin.String?) = apply { this.logoImageUrl = logoImageUrl } + + fun build(): Supplier { + val instance = + Supplier( + id = id!!, + name = name!!, + code = code!!, + logoImageUrl = logoImageUrl, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id!!, name = name!!, code = code!!, - logoImageUrl = logoImageUrl - ) + logoImageUrl = logoImageUrl, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt index ccb4baf38..57a3f03d6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFees.kt @@ -16,73 +16,53 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsMoney - import com.fasterxml.jackson.annotation.JsonProperty /** * List of TaxesAndFees Details - * @param description TaxesAndFees description - * @param amount + * @param description TaxesAndFees description + * @param amount */ data class TaxesAndFees( - /* TaxesAndFees description */ -@JsonProperty("Description") -val description: - kotlin.String -, - - @JsonProperty("Amount") -val amount: - CarsMoney - + // TaxesAndFees description + @JsonProperty("Description") + val description: kotlin.String, + @JsonProperty("Amount") + val amount: CarsMoney, ) { - - - init { - require(description != null) { "description must not be null" } - - - - - - + require(description != null) { "description must not be null" } require(amount != null) { "amount must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var description: kotlin.String? = null, - private var amount: CarsMoney? = null - ) { - fun description(description: kotlin.String) = apply { this.description = description } - fun amount(amount: CarsMoney) = apply { this.amount = amount } + class Builder( + private var description: kotlin.String? = null, + private var amount: CarsMoney? = null, + ) { + fun description(description: kotlin.String) = apply { this.description = description } - fun build(): TaxesAndFees { - val instance = TaxesAndFees( - description = description!!, - amount = amount!! - ) + fun amount(amount: CarsMoney) = apply { this.amount = amount } - return instance - } + fun build(): TaxesAndFees { + val instance = + TaxesAndFees( + description = description!!, + amount = amount!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( description = description!!, - amount = amount!! - ) + amount = amount!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt index db8741ca8..526b786b5 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TaxesAndFeesDetail.kt @@ -16,66 +16,49 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param categoryCode - * @param amount +* + * @param categoryCode + * @param amount */ data class TaxesAndFeesDetail( - @JsonProperty("CategoryCode") -val categoryCode: kotlin.String? = null, - - @JsonProperty("Amount") -val amount: Money? = null + @JsonProperty("CategoryCode") + val categoryCode: kotlin.String? = null, + @JsonProperty("Amount") + val amount: Money? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var categoryCode: kotlin.String? = null, - private var amount: Money? = null - ) { - fun categoryCode(categoryCode: kotlin.String?) = apply { this.categoryCode = categoryCode } - fun amount(amount: Money?) = apply { this.amount = amount } + class Builder( + private var categoryCode: kotlin.String? = null, + private var amount: Money? = null, + ) { + fun categoryCode(categoryCode: kotlin.String?) = apply { this.categoryCode = categoryCode } - fun build(): TaxesAndFeesDetail { - val instance = TaxesAndFeesDetail( - categoryCode = categoryCode, - amount = amount - ) + fun amount(amount: Money?) = apply { this.amount = amount } - return instance - } + fun build(): TaxesAndFeesDetail { + val instance = + TaxesAndFeesDetail( + categoryCode = categoryCode, + amount = amount, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( categoryCode = categoryCode, - amount = amount - ) + amount = amount, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt index 20a435871..87ffad3fa 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Ticket.kt @@ -17,126 +17,83 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.ActivitiesPrice import com.expediagroup.sdk.xap.models.Restrictions - import com.fasterxml.jackson.annotation.JsonProperty /** * The list of Ticket information. - * @param id The numerical identifier for the ticket. - * @param code The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student - * @param count The number of each ticket type to be booked. - * @param ticketPrice - * @param restrictions + * @param id The numerical identifier for the ticket. + * @param code The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student + * @param count The number of each ticket type to be booked. + * @param ticketPrice + * @param restrictions */ data class Ticket( - /* The numerical identifier for the ticket. */ -@JsonProperty("Id") -val id: - kotlin.Int -, - - /* The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* The number of each ticket type to be booked. */ -@JsonProperty("Count") -val count: - kotlin.Int -, - - @JsonProperty("TicketPrice") -val ticketPrice: - ActivitiesPrice -, - - @JsonProperty("Restrictions") -val restrictions: Restrictions? = null + // The numerical identifier for the ticket. + @JsonProperty("Id") + val id: kotlin.Int, + // The code for the ticket. Values supported are: Adult Traveler Child Group Senior Infant Student + @JsonProperty("Code") + val code: kotlin.String, + // The number of each ticket type to be booked. + @JsonProperty("Count") + val count: kotlin.Int, + @JsonProperty("TicketPrice") + val ticketPrice: ActivitiesPrice, + @JsonProperty("Restrictions") + val restrictions: Restrictions? = null, ) { - - - init { - require(id != null) { "id must not be null" } - - - - - - + require(id != null) { "id must not be null" } require(code != null) { "code must not be null" } - - - - - - require(count != null) { "count must not be null" } - - - - - - require(ticketPrice != null) { "ticketPrice must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var id: kotlin.Int? = null, + private var code: kotlin.String? = null, + private var count: kotlin.Int? = null, + private var ticketPrice: ActivitiesPrice? = null, + private var restrictions: Restrictions? = null, + ) { + fun id(id: kotlin.Int) = apply { this.id = id } + fun code(code: kotlin.String) = apply { this.code = code } + fun count(count: kotlin.Int) = apply { this.count = count } + fun ticketPrice(ticketPrice: ActivitiesPrice) = apply { this.ticketPrice = ticketPrice } + fun restrictions(restrictions: Restrictions?) = apply { this.restrictions = restrictions } + fun build(): Ticket { + val instance = + Ticket( + id = id!!, + code = code!!, + count = count!!, + ticketPrice = ticketPrice!!, + restrictions = restrictions, + ) - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var id: kotlin.Int? = null, - private var code: kotlin.String? = null, - private var count: kotlin.Int? = null, - private var ticketPrice: ActivitiesPrice? = null, - private var restrictions: Restrictions? = null - ) { - fun id(id: kotlin.Int) = apply { this.id = id } - fun code(code: kotlin.String) = apply { this.code = code } - fun count(count: kotlin.Int) = apply { this.count = count } - fun ticketPrice(ticketPrice: ActivitiesPrice) = apply { this.ticketPrice = ticketPrice } - fun restrictions(restrictions: Restrictions?) = apply { this.restrictions = restrictions } - - fun build(): Ticket { - val instance = Ticket( - id = id!!, - code = code!!, - count = count!!, - ticketPrice = ticketPrice!!, - restrictions = restrictions - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( id = id!!, code = code!!, count = count!!, ticketPrice = ticketPrice!!, - restrictions = restrictions - ) + restrictions = restrictions, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt index 5c2ef15d6..0cedf5189 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TimeRange.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * A list of time range to indicate the operation hours of the date range. - * @param startTime Start time at pickup location of the date range. - * @param endTime End time at pickup location of the date range. + * @param startTime Start time at pickup location of the date range. + * @param endTime End time at pickup location of the date range. */ data class TimeRange( - /* Start time at pickup location of the date range. */ -@JsonProperty("StartTime") -val startTime: - kotlin.String -, - - /* End time at pickup location of the date range. */ -@JsonProperty("EndTime") -val endTime: - kotlin.String - + // Start time at pickup location of the date range. + @JsonProperty("StartTime") + val startTime: kotlin.String, + // End time at pickup location of the date range. + @JsonProperty("EndTime") + val endTime: kotlin.String, ) { - - - init { - require(startTime != null) { "startTime must not be null" } - - - - - - + require(startTime != null) { "startTime must not be null" } require(endTime != null) { "endTime must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var startTime: kotlin.String? = null, - private var endTime: kotlin.String? = null - ) { - fun startTime(startTime: kotlin.String) = apply { this.startTime = startTime } - fun endTime(endTime: kotlin.String) = apply { this.endTime = endTime } + class Builder( + private var startTime: kotlin.String? = null, + private var endTime: kotlin.String? = null, + ) { + fun startTime(startTime: kotlin.String) = apply { this.startTime = startTime } - fun build(): TimeRange { - val instance = TimeRange( - startTime = startTime!!, - endTime = endTime!! - ) + fun endTime(endTime: kotlin.String) = apply { this.endTime = endTime } - return instance - } + fun build(): TimeRange { + val instance = + TimeRange( + startTime = startTime!!, + endTime = endTime!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( startTime = startTime!!, - endTime = endTime!! - ) + endTime = endTime!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt index 0cccd4100..be384206a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/TransmissionDrive.kt @@ -15,74 +15,54 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Car transmission and drive. Please find list of Car Transmission Drive Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005380028 - * @param code Car transmission and drive code. - * @param `value` Car transmission and drive value. + * @param code Car transmission and drive code. + * @param `value` Car transmission and drive value. */ data class TransmissionDrive( - /* Car transmission and drive code. */ -@JsonProperty("Code") -val code: - kotlin.String -, - - /* Car transmission and drive value. */ -@JsonProperty("Value") -val `value`: - kotlin.String - + // Car transmission and drive code. + @JsonProperty("Code") + val code: kotlin.String, + // Car transmission and drive value. + @JsonProperty("Value") + val `value`: kotlin.String, ) { - - - init { - require(code != null) { "code must not be null" } - - - - - - + require(code != null) { "code must not be null" } require(`value` != null) { "`value` must not be null" } - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var code: kotlin.String? = null, - private var `value`: kotlin.String? = null - ) { - fun code(code: kotlin.String) = apply { this.code = code } - fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } + class Builder( + private var code: kotlin.String? = null, + private var `value`: kotlin.String? = null, + ) { + fun code(code: kotlin.String) = apply { this.code = code } - fun build(): TransmissionDrive { - val instance = TransmissionDrive( - code = code!!, - `value` = `value`!! - ) + fun `value`(`value`: kotlin.String) = apply { this.`value` = `value` } - return instance - } + fun build(): TransmissionDrive { + val instance = + TransmissionDrive( + code = code!!, + `value` = `value`!!, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code!!, - `value` = `value`!! - ) + `value` = `value`!!, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt index 395f18644..804c8b015 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ValidFormsOfPayment.kt @@ -15,102 +15,71 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Container for hotel supported payment information. - * @param paymentMethod The payment method. - * @param name The brand name of the payment sub-method to be displayed to the customer. - * @param paymentSubMethod The payment sub-method. - * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. + * @param paymentMethod The payment method. + * @param name The brand name of the payment sub-method to be displayed to the customer. + * @param paymentSubMethod The payment sub-method. + * @param brandName The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. */ data class ValidFormsOfPayment( - /* The payment method. */ -@JsonProperty("PaymentMethod") -val paymentMethod: kotlin.String? = null, - - /* The brand name of the payment sub-method to be displayed to the customer. */ -@JsonProperty("Name") -val name: kotlin.String? = null, - - /* The payment sub-method. */ + // The payment method. + @JsonProperty("PaymentMethod") + val paymentMethod: kotlin.String? = null, + // The brand name of the payment sub-method to be displayed to the customer. + @JsonProperty("Name") + val name: kotlin.String? = null, + // The payment sub-method. @Deprecated(message = "This property is deprecated.") -@JsonProperty("PaymentSubMethod") -val paymentSubMethod: kotlin.String? = null, - - /* The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. */ + @JsonProperty("PaymentSubMethod") + val paymentSubMethod: kotlin.String? = null, + // The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but \"Visa/Carte Blanche\" and \"Visa/Delta\" are some of the exceptions. @Deprecated(message = "This property is deprecated.") -@JsonProperty("BrandName") -val brandName: kotlin.String? = null + @JsonProperty("BrandName") + val brandName: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var paymentMethod: kotlin.String? = null, - private var name: kotlin.String? = null, - private var paymentSubMethod: kotlin.String? = null, - private var brandName: kotlin.String? = null - ) { - fun paymentMethod(paymentMethod: kotlin.String?) = apply { this.paymentMethod = paymentMethod } - fun name(name: kotlin.String?) = apply { this.name = name } - fun paymentSubMethod(paymentSubMethod: kotlin.String?) = apply { this.paymentSubMethod = paymentSubMethod } - fun brandName(brandName: kotlin.String?) = apply { this.brandName = brandName } + class Builder( + private var paymentMethod: kotlin.String? = null, + private var name: kotlin.String? = null, + private var paymentSubMethod: kotlin.String? = null, + private var brandName: kotlin.String? = null, + ) { + fun paymentMethod(paymentMethod: kotlin.String?) = apply { this.paymentMethod = paymentMethod } - fun build(): ValidFormsOfPayment { - val instance = ValidFormsOfPayment( - paymentMethod = paymentMethod, - name = name, - paymentSubMethod = paymentSubMethod, - brandName = brandName - ) + fun name(name: kotlin.String?) = apply { this.name = name } - return instance - } + fun paymentSubMethod(paymentSubMethod: kotlin.String?) = apply { this.paymentSubMethod = paymentSubMethod } + + fun brandName(brandName: kotlin.String?) = apply { this.brandName = brandName } + + fun build(): ValidFormsOfPayment { + val instance = + ValidFormsOfPayment( + paymentMethod = paymentMethod, + name = name, + paymentSubMethod = paymentSubMethod, + brandName = brandName, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( paymentMethod = paymentMethod, name = name, paymentSubMethod = paymentSubMethod, - brandName = brandName - ) + brandName = brandName, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt index 6021e0a6d..c3908291e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VehicleDetails.kt @@ -20,197 +20,118 @@ import com.expediagroup.sdk.xap.models.CarCategory import com.expediagroup.sdk.xap.models.CarType import com.expediagroup.sdk.xap.models.FuelAC import com.expediagroup.sdk.xap.models.TransmissionDrive - import com.fasterxml.jackson.annotation.JsonProperty /** * Specific information for a car. - * @param carClass Car category and type. - * @param carCategory - * @param carType - * @param transmissionDrive - * @param fuelAC - * @param make Car manufacturer and model. - * @param minDoors Minimal car door count. - * @param maxDoors Maximal car door count. - * @param fuelLevel Car fuel information. - * @param capacity + * @param carClass Car category and type. + * @param carCategory + * @param carType + * @param transmissionDrive + * @param fuelAC + * @param make Car manufacturer and model. + * @param minDoors Minimal car door count. + * @param maxDoors Maximal car door count. + * @param fuelLevel Car fuel information. + * @param capacity */ data class VehicleDetails( - /* Car category and type. */ -@JsonProperty("CarClass") -val carClass: - kotlin.String -, - - @JsonProperty("CarCategory") -val carCategory: - CarCategory -, - - @JsonProperty("CarType") -val carType: - CarType -, - - @JsonProperty("TransmissionDrive") -val transmissionDrive: - TransmissionDrive -, - - @JsonProperty("FuelAC") -val fuelAC: - FuelAC -, - - /* Car manufacturer and model. */ -@JsonProperty("Make") -val make: kotlin.String? = null, - - /* Minimal car door count. */ -@JsonProperty("MinDoors") -val minDoors: kotlin.Int? = null, - - /* Maximal car door count. */ -@JsonProperty("MaxDoors") -val maxDoors: kotlin.Int? = null, - - /* Car fuel information. */ -@JsonProperty("FuelLevel") -val fuelLevel: kotlin.String? = null, - - @JsonProperty("Capacity") -val capacity: Capacity? = null + // Car category and type. + @JsonProperty("CarClass") + val carClass: kotlin.String, + @JsonProperty("CarCategory") + val carCategory: CarCategory, + @JsonProperty("CarType") + val carType: CarType, + @JsonProperty("TransmissionDrive") + val transmissionDrive: TransmissionDrive, + @JsonProperty("FuelAC") + val fuelAC: FuelAC, + // Car manufacturer and model. + @JsonProperty("Make") + val make: kotlin.String? = null, + // Minimal car door count. + @JsonProperty("MinDoors") + val minDoors: kotlin.Int? = null, + // Maximal car door count. + @JsonProperty("MaxDoors") + val maxDoors: kotlin.Int? = null, + // Car fuel information. + @JsonProperty("FuelLevel") + val fuelLevel: kotlin.String? = null, + @JsonProperty("Capacity") + val capacity: Capacity? = null, ) { - - - init { - require(carClass != null) { "carClass must not be null" } - - - - - - + require(carClass != null) { "carClass must not be null" } require(carCategory != null) { "carCategory must not be null" } - - - - - - require(carType != null) { "carType must not be null" } - - - - - - require(transmissionDrive != null) { "transmissionDrive must not be null" } - - - - - - require(fuelAC != null) { "fuelAC must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var carClass: kotlin.String? = null, + private var carCategory: CarCategory? = null, + private var carType: CarType? = null, + private var transmissionDrive: TransmissionDrive? = null, + private var fuelAC: FuelAC? = null, + private var make: kotlin.String? = null, + private var minDoors: kotlin.Int? = null, + private var maxDoors: kotlin.Int? = null, + private var fuelLevel: kotlin.String? = null, + private var capacity: Capacity? = null, + ) { + fun carClass(carClass: kotlin.String) = apply { this.carClass = carClass } + fun carCategory(carCategory: CarCategory) = apply { this.carCategory = carCategory } + fun carType(carType: CarType) = apply { this.carType = carType } + fun transmissionDrive(transmissionDrive: TransmissionDrive) = apply { this.transmissionDrive = transmissionDrive } + fun fuelAC(fuelAC: FuelAC) = apply { this.fuelAC = fuelAC } + fun make(make: kotlin.String?) = apply { this.make = make } + fun minDoors(minDoors: kotlin.Int?) = apply { this.minDoors = minDoors } + fun maxDoors(maxDoors: kotlin.Int?) = apply { this.maxDoors = maxDoors } + fun fuelLevel(fuelLevel: kotlin.String?) = apply { this.fuelLevel = fuelLevel } + fun capacity(capacity: Capacity?) = apply { this.capacity = capacity } + fun build(): VehicleDetails { + val instance = + VehicleDetails( + carClass = carClass!!, + carCategory = carCategory!!, + carType = carType!!, + transmissionDrive = transmissionDrive!!, + fuelAC = fuelAC!!, + make = make, + minDoors = minDoors, + maxDoors = maxDoors, + fuelLevel = fuelLevel, + capacity = capacity, + ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var carClass: kotlin.String? = null, - private var carCategory: CarCategory? = null, - private var carType: CarType? = null, - private var transmissionDrive: TransmissionDrive? = null, - private var fuelAC: FuelAC? = null, - private var make: kotlin.String? = null, - private var minDoors: kotlin.Int? = null, - private var maxDoors: kotlin.Int? = null, - private var fuelLevel: kotlin.String? = null, - private var capacity: Capacity? = null - ) { - fun carClass(carClass: kotlin.String) = apply { this.carClass = carClass } - fun carCategory(carCategory: CarCategory) = apply { this.carCategory = carCategory } - fun carType(carType: CarType) = apply { this.carType = carType } - fun transmissionDrive(transmissionDrive: TransmissionDrive) = apply { this.transmissionDrive = transmissionDrive } - fun fuelAC(fuelAC: FuelAC) = apply { this.fuelAC = fuelAC } - fun make(make: kotlin.String?) = apply { this.make = make } - fun minDoors(minDoors: kotlin.Int?) = apply { this.minDoors = minDoors } - fun maxDoors(maxDoors: kotlin.Int?) = apply { this.maxDoors = maxDoors } - fun fuelLevel(fuelLevel: kotlin.String?) = apply { this.fuelLevel = fuelLevel } - fun capacity(capacity: Capacity?) = apply { this.capacity = capacity } - - fun build(): VehicleDetails { - val instance = VehicleDetails( - carClass = carClass!!, - carCategory = carCategory!!, - carType = carType!!, - transmissionDrive = transmissionDrive!!, - fuelAC = fuelAC!!, - make = make, - minDoors = minDoors, - maxDoors = maxDoors, - fuelLevel = fuelLevel, - capacity = capacity - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( carClass = carClass!!, carCategory = carCategory!!, carType = carType!!, @@ -220,6 +141,6 @@ val capacity: Capacity? = null minDoors = minDoors, maxDoors = maxDoors, fuelLevel = fuelLevel, - capacity = capacity - ) + capacity = capacity, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt index 8fd87aa66..98a6da5ee 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt @@ -18,120 +18,79 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.CarsDistance import com.expediagroup.sdk.xap.models.CarsLocation import com.expediagroup.sdk.xap.models.DateTimePeriod - import com.fasterxml.jackson.annotation.JsonProperty /** * Drop off information - * @param dateTime Pickup date and time. - * @param location - * @param shuttleCategory The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. - * @param distance - * @param openSchedule A List of date time periods to indicate the vendor business hours for the pickup time. + * @param dateTime Pickup date and time. + * @param location + * @param shuttleCategory The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. + * @param distance + * @param openSchedule A List of date time periods to indicate the vendor business hours for the pickup time. */ data class VendorLocationDetails( - /* Pickup date and time. */ -@JsonProperty("DateTime") -val dateTime: - java.time.LocalDateTime -, - - @JsonProperty("Location") -val location: - CarsLocation -, - - /* The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. */ -@JsonProperty("ShuttleCategory") -val shuttleCategory: kotlin.String? = null, - - @JsonProperty("Distance") -val distance: CarsDistance? = null, - - /* A List of date time periods to indicate the vendor business hours for the pickup time. */ -@JsonProperty("OpenSchedule") -val openSchedule: kotlin.collections.List? = null + // Pickup date and time. + @JsonProperty("DateTime") + val dateTime: java.time.LocalDateTime, + @JsonProperty("Location") + val location: CarsLocation, + // The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. + @JsonProperty("ShuttleCategory") + val shuttleCategory: kotlin.String? = null, + @JsonProperty("Distance") + val distance: CarsDistance? = null, + // A List of date time periods to indicate the vendor business hours for the pickup time. + @JsonProperty("OpenSchedule") + val openSchedule: kotlin.collections.List? = null, ) { - - - init { - require(dateTime != null) { "dateTime must not be null" } - - - - - - + require(dateTime != null) { "dateTime must not be null" } require(location != null) { "location must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var dateTime: java.time.LocalDateTime? = null, + private var location: CarsLocation? = null, + private var shuttleCategory: kotlin.String? = null, + private var distance: CarsDistance? = null, + private var openSchedule: kotlin.collections.List? = null, + ) { + fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } + fun location(location: CarsLocation) = apply { this.location = location } + fun shuttleCategory(shuttleCategory: kotlin.String?) = apply { this.shuttleCategory = shuttleCategory } + fun distance(distance: CarsDistance?) = apply { this.distance = distance } + fun openSchedule(openSchedule: kotlin.collections.List?) = apply { this.openSchedule = openSchedule } + fun build(): VendorLocationDetails { + val instance = + VendorLocationDetails( + dateTime = dateTime!!, + location = location!!, + shuttleCategory = shuttleCategory, + distance = distance, + openSchedule = openSchedule, + ) - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - class Builder( - private var dateTime: java.time.LocalDateTime? = null, - private var location: CarsLocation? = null, - private var shuttleCategory: kotlin.String? = null, - private var distance: CarsDistance? = null, - private var openSchedule: kotlin.collections.List? = null - ) { - fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } - fun location(location: CarsLocation) = apply { this.location = location } - fun shuttleCategory(shuttleCategory: kotlin.String?) = apply { this.shuttleCategory = shuttleCategory } - fun distance(distance: CarsDistance?) = apply { this.distance = distance } - fun openSchedule(openSchedule: kotlin.collections.List?) = apply { this.openSchedule = openSchedule } - - fun build(): VendorLocationDetails { - val instance = VendorLocationDetails( - dateTime = dateTime!!, - location = location!!, - shuttleCategory = shuttleCategory, - distance = distance, - openSchedule = openSchedule - ) - - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( dateTime = dateTime!!, location = location!!, shuttleCategory = shuttleCategory, distance = distance, - openSchedule = openSchedule - ) + openSchedule = openSchedule, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt index 37b63f1d3..3b230b249 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/WaiverPolicy.kt @@ -15,52 +15,42 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** -* - * @param waiverPolicyDescription The localized waiver policy description, which could be put in front of cancellation policy description. +* + * @param waiverPolicyDescription The localized waiver policy description, which could be put in front of cancellation policy description. */ data class WaiverPolicy( - /* The localized waiver policy description, which could be put in front of cancellation policy description. */ -@JsonProperty("WaiverPolicyDescription") -val waiverPolicyDescription: kotlin.String? = null + // The localized waiver policy description, which could be put in front of cancellation policy description. + @JsonProperty("WaiverPolicyDescription") + val waiverPolicyDescription: kotlin.String? = null, ) { - - - init { - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var waiverPolicyDescription: kotlin.String? = null - ) { - fun waiverPolicyDescription(waiverPolicyDescription: kotlin.String?) = apply { this.waiverPolicyDescription = waiverPolicyDescription } + class Builder( + private var waiverPolicyDescription: kotlin.String? = null, + ) { + fun waiverPolicyDescription(waiverPolicyDescription: kotlin.String?) = apply { this.waiverPolicyDescription = waiverPolicyDescription } - fun build(): WaiverPolicy { - val instance = WaiverPolicy( - waiverPolicyDescription = waiverPolicyDescription - ) + fun build(): WaiverPolicy { + val instance = + WaiverPolicy( + waiverPolicyDescription = waiverPolicyDescription, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( - waiverPolicyDescription = waiverPolicyDescription - ) + fun toBuilder() = + Builder( + waiverPolicyDescription = waiverPolicyDescription, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt index e36f1569f..7df4ee20f 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/Warning.kt @@ -16,129 +16,84 @@ package com.expediagroup.sdk.xap.models import com.expediagroup.sdk.xap.models.Money - import com.fasterxml.jackson.annotation.JsonProperty /** -* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. - * @param code The code of a warning. - * @param description A detail information of what happened. - * @param originalPrice - * @param newPrice - * @param changedAmount - * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. +* There were some errors or events during the transaction, but the API has still returned a response. Container for all warnings. + * @param code The code of a warning. + * @param description A detail information of what happened. + * @param originalPrice + * @param newPrice + * @param changedAmount + * @param changedPercentage The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ data class Warning( - /* The code of a warning. */ -@JsonProperty("Code") -val code: kotlin.String? = null, - - /* A detail information of what happened. */ -@JsonProperty("Description") -val description: kotlin.String? = null, - - @JsonProperty("OriginalPrice") -val originalPrice: Money? = null, - - @JsonProperty("NewPrice") -val newPrice: Money? = null, - - @JsonProperty("ChangedAmount") -val changedAmount: Money? = null, - - /* The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. */ -@JsonProperty("ChangedPercentage") -val changedPercentage: kotlin.String? = null + // The code of a warning. + @JsonProperty("Code") + val code: kotlin.String? = null, + // A detail information of what happened. + @JsonProperty("Description") + val description: kotlin.String? = null, + @JsonProperty("OriginalPrice") + val originalPrice: Money? = null, + @JsonProperty("NewPrice") + val newPrice: Money? = null, + @JsonProperty("ChangedAmount") + val changedAmount: Money? = null, + // The changed percentage. In the sample 2.97 means the changed percentage is 2.97%. + @JsonProperty("ChangedPercentage") + val changedPercentage: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + private var code: kotlin.String? = null, + private var description: kotlin.String? = null, + private var originalPrice: Money? = null, + private var newPrice: Money? = null, + private var changedAmount: Money? = null, + private var changedPercentage: kotlin.String? = null, + ) { + fun code(code: kotlin.String?) = apply { this.code = code } + fun description(description: kotlin.String?) = apply { this.description = description } + fun originalPrice(originalPrice: Money?) = apply { this.originalPrice = originalPrice } - } + fun newPrice(newPrice: Money?) = apply { this.newPrice = newPrice } - companion object { - @JvmStatic - fun builder() = Builder() - } + fun changedAmount(changedAmount: Money?) = apply { this.changedAmount = changedAmount } - class Builder( - private var code: kotlin.String? = null, - private var description: kotlin.String? = null, - private var originalPrice: Money? = null, - private var newPrice: Money? = null, - private var changedAmount: Money? = null, - private var changedPercentage: kotlin.String? = null - ) { - fun code(code: kotlin.String?) = apply { this.code = code } - fun description(description: kotlin.String?) = apply { this.description = description } - fun originalPrice(originalPrice: Money?) = apply { this.originalPrice = originalPrice } - fun newPrice(newPrice: Money?) = apply { this.newPrice = newPrice } - fun changedAmount(changedAmount: Money?) = apply { this.changedAmount = changedAmount } - fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } + fun changedPercentage(changedPercentage: kotlin.String?) = apply { this.changedPercentage = changedPercentage } - fun build(): Warning { - val instance = Warning( - code = code, - description = description, - originalPrice = originalPrice, - newPrice = newPrice, - changedAmount = changedAmount, - changedPercentage = changedPercentage - ) + fun build(): Warning { + val instance = + Warning( + code = code, + description = description, + originalPrice = originalPrice, + newPrice = newPrice, + changedAmount = changedAmount, + changedPercentage = changedPercentage, + ) - return instance - } + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( code = code, description = description, originalPrice = originalPrice, newPrice = newPrice, changedAmount = changedAmount, - changedPercentage = changedPercentage - ) + changedPercentage = changedPercentage, + ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt index e891a80d8..01d2fad9c 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/When.kt @@ -15,83 +15,68 @@ */ package com.expediagroup.sdk.xap.models - import com.fasterxml.jackson.annotation.JsonProperty /** * Indicate when to pay. - * @param type Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. - * @param `value` This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. + * @param type Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. + * @param `value` This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. */ data class When( - /* Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. */ -@JsonProperty("Type") -val type: When.Type? = null, - - /* This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. */ -@JsonProperty("Value") -val `value`: kotlin.String? = null + // Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. + @JsonProperty("Type") + val type: When.Type? = null, + // This value will only be shown when Deposit Type is DAYS_PRIOR to indicate the number of days prior to check in when the deposit will be collected. + @JsonProperty("Value") + val `value`: kotlin.String? = null, ) { - - - init { - - - - - - - - - - - - - - - } companion object { - @JvmStatic - fun builder() = Builder() + @JvmStatic + fun builder() = Builder() } - class Builder( - private var type: When.Type? = null, - private var `value`: kotlin.String? = null - ) { - fun type(type: When.Type?) = apply { this.type = type } - fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } + class Builder( + private var type: When.Type? = null, + private var `value`: kotlin.String? = null, + ) { + fun type(type: When.Type?) = apply { this.type = type } - fun build(): When { - val instance = When( - type = type, - `value` = `value` - ) + fun `value`(`value`: kotlin.String?) = apply { this.`value` = `value` } - return instance - } + fun build(): When { + val instance = + When( + type = type, + `value` = `value`, + ) + + return instance + } } - fun toBuilder() = Builder( + fun toBuilder() = + Builder( type = type, - `value` = `value` - ) - - /** - * Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. - * Values: UPON_BOOKING,DAYS_PRIOR,UPON_ARRIVAL - */ - enum class Type(val value: kotlin.String) { - @JsonProperty("UPON_BOOKING") - UPON_BOOKING("UPON_BOOKING"), - - @JsonProperty("DAYS_PRIOR") - DAYS_PRIOR("DAYS_PRIOR"), - - @JsonProperty("UPON_ARRIVAL") - UPON_ARRIVAL("UPON_ARRIVAL"); - } + `value` = `value`, + ) + + /** + * Indicates the time of the deposit collection. Options are: UPON_BOOKING The customer must pay the deposit when booking the property. DAYS_PRIOR The customer must pay the deposit a number of days before arriving at the property. UPON_ARRIVAL The customer must pay the deposit upon arriving at the property. + * Values: UPON_BOOKING,DAYS_PRIOR,UPON_ARRIVAL + */ + enum class Type( + val value: kotlin.String, + ) { + @JsonProperty("UPON_BOOKING") + UPON_BOOKING("UPON_BOOKING"), + + @JsonProperty("DAYS_PRIOR") + DAYS_PRIOR("DAYS_PRIOR"), + + @JsonProperty("UPON_ARRIVAL") + UPON_ARRIVAL("UPON_ARRIVAL"), + } } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt index 9115017ea..0cd20730e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperation.kt @@ -1,64 +1,46 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIMError - import com.expediagroup.sdk.xap.models.ActivitiesErrors - import com.expediagroup.sdk.xap.models.ActivityDetailsResponse - - /** - * - * @property params [GetActivityDetailsOperationParams] - */ - class GetActivityDetailsOperation( - private val params: GetActivityDetailsOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/activities/details/{offerToken}" - - - url = url.replace( - oldValue = "{" + "offerToken" + "}", - newValue = this.params.offerToken, - ignoreCase = true - ) - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.ActivityDetailsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * + * @property params [GetActivityDetailsOperationParams] + */ +class GetActivityDetailsOperation( + private val params: GetActivityDetailsOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/activities/details/{offerToken}" + + url = + url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true, + ) + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt index b328783fe..48bc4dc38 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityDetailsOperationParams.kt @@ -1,171 +1,107 @@ package com.expediagroup.sdk.xap.operations - - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - -import com.expediagroup.sdk.xap.models.APIMError -import com.expediagroup.sdk.xap.models.ActivitiesErrors -import com.expediagroup.sdk.xap.models.ActivityDetailsResponse - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property offerToken the offerToken of a activity - * @property partnerTransactionId Partner-generated identifier. - * @property locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. - */ - @JsonDeserialize(builder = GetActivityDetailsOperationParams.Builder::class) - data class GetActivityDetailsOperationParams( - val offerToken: - kotlin.String - - , - val partnerTransactionId: - kotlin.String - - , - val locale: - kotlin.String - -? - = null - - ) { - - init { - require(offerToken != null) { "offerToken must not be null" } - - - - - - - - - require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - - - class Builder( - @JsonProperty("offerToken") private var offerToken: - kotlin.String -? = null - , - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String -? = null - , - @JsonProperty("locale") private var locale: - kotlin.String -? = null - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property offerToken the offerToken of a activity + * @property partnerTransactionId Partner-generated identifier. + * @property locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. + */ +@JsonDeserialize(builder = GetActivityDetailsOperationParams.Builder::class) +data class GetActivityDetailsOperationParams( + val offerToken: kotlin.String, + val partnerTransactionId: kotlin.String, + val locale: kotlin.String? = + null, ) { - /** - * @param offerToken the offerToken of a activity - */ - fun offerToken(offerToken: - kotlin.String -) = apply { this.offerToken = offerToken } - /** - * @param partnerTransactionId Partner-generated identifier. - */ - fun partnerTransactionId(partnerTransactionId: - kotlin.String -) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. - */ - fun locale(locale: - kotlin.String -) = apply { this.locale = locale } + init { + require(offerToken != null) { "offerToken must not be null" } - fun build(): GetActivityDetailsOperationParams { - val params = GetActivityDetailsOperationParams( - offerToken = offerToken!!, - partnerTransactionId = partnerTransactionId!!, - locale = locale - ) + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + } - return params + companion object { + @JvmStatic + fun builder() = Builder() } -} -fun toBuilder() = Builder( - offerToken = offerToken, - partnerTransactionId = partnerTransactionId, - locale = locale -) + class Builder( + @JsonProperty("offerToken") private var offerToken: kotlin.String? = null, + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("locale") private var locale: kotlin.String? = null, + ) { + /** + * @param offerToken the offerToken of a activity + */ + fun offerToken(offerToken: kotlin.String) = apply { this.offerToken = offerToken } + /** + * @param partnerTransactionId Partner-generated identifier. + */ + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - fun getHeaders(): Headers { -return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) + /** + * @param locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. + */ + fun locale(locale: kotlin.String) = apply { this.locale = locale } + + fun build(): GetActivityDetailsOperationParams { + val params = + GetActivityDetailsOperationParams( + offerToken = offerToken!!, + partnerTransactionId = partnerTransactionId!!, + locale = locale, + ) + + return params + } } - add("Accept", "application/vnd.exp-activity.v3+json") -}.build() -} - fun getQueryParams(): List = - buildList { - locale?.let { - val key = "locale" - val value = buildList { - add(it) - } + fun toBuilder() = + Builder( + offerToken = offerToken, + partnerTransactionId = partnerTransactionId, + locale = locale, + ) - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-activity.v3+json") + }.build() + + fun getQueryParams(): List = + buildList { + locale?.let { + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } } -} - fun getPathParams() : Map { -return buildMap { - offerToken?.also { - put("offerToken", offerToken) + fun getPathParams(): Map = + buildMap { + offerToken?.also { + put("offerToken", offerToken) + } } - } } - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt index ddec5b672..4018b6324 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperation.kt @@ -1,58 +1,39 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIMError - import com.expediagroup.sdk.xap.models.ActivitiesErrors - import com.expediagroup.sdk.xap.models.ActivityListingsResponse - - /** - * - * @property params [GetActivityListingsOperationParams] - */ - class GetActivityListingsOperation( - private val params: GetActivityListingsOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/activities/listings" - - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.ActivityListingsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * + * @property params [GetActivityListingsOperationParams] + */ +class GetActivityListingsOperation( + private val params: GetActivityListingsOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/activities/listings" + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt index 0795511bd..1ebd1d8c2 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetActivityListingsOperationParams.kt @@ -1,353 +1,233 @@ package com.expediagroup.sdk.xap.operations - - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - -import com.expediagroup.sdk.xap.models.APIMError -import com.expediagroup.sdk.xap.models.ActivitiesErrors -import com.expediagroup.sdk.xap.models.ActivityListingsResponse - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property partnerTransactionId Partner-generated identifier. - * @property location Can be a city name, street address, three-letter IATA Airport Code or a landmark name. (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) - * @property geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. - * @property startDate Start date for the activity window in YYY-MM-DD format. If an endDate value is supplied there must also be a startDate. default: currentDate - * @property endDate End date for the activity window in YYY-MM-DD format. default: \"startDate+14\" - * @property locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. - * @property links Comma-separated list to specify the types of HATEAOS links returned in the API Response. WD (deep link URL to web infosite) AD (details API query) - */ - @JsonDeserialize(builder = GetActivityListingsOperationParams.Builder::class) - data class GetActivityListingsOperationParams( - val partnerTransactionId: - kotlin.String - - , - val location: - kotlin.String - -? - = null -, - val geoLocation: - kotlin.String - -? - = null -, - val startDate: - java.time.LocalDate - -? - = null -, - val endDate: - java.time.LocalDate - -? - = null -, - val locale: - kotlin.String - -? - = null -, - val links: kotlin.collections.List - < - GetActivityListingsOperationParams.Links - - > - -? - = null - - ) { - - init { - require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - enum class Links( - val value: - kotlin.String - - ) { - WD("WD") - , - AD("AD") - - } - - - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String -? = null - , - @JsonProperty("location") private var location: - kotlin.String -? = null - , - @JsonProperty("geoLocation") private var geoLocation: - kotlin.String -? = null - , - @JsonProperty("startDate") private var startDate: - java.time.LocalDate -? = null - , - @JsonProperty("endDate") private var endDate: - java.time.LocalDate -? = null - , - @JsonProperty("locale") private var locale: - kotlin.String -? = null - , - @JsonProperty("links") private var links: kotlin.collections.List - < - GetActivityListingsOperationParams.Links - - > -? = null - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property partnerTransactionId Partner-generated identifier. + * @property location Can be a city name, street address, three-letter IATA Airport Code or a landmark name. (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) + * @property geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. + * @property startDate Start date for the activity window in YYY-MM-DD format. If an endDate value is supplied there must also be a startDate. default: currentDate + * @property endDate End date for the activity window in YYY-MM-DD format. default: \"startDate+14\" + * @property locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. + * @property links Comma-separated list to specify the types of HATEAOS links returned in the API Response. WD (deep link URL to web infosite) AD (details API query) + */ +@JsonDeserialize(builder = GetActivityListingsOperationParams.Builder::class) +data class GetActivityListingsOperationParams( + val partnerTransactionId: kotlin.String, + val location: kotlin.String? = + null, + val geoLocation: kotlin.String? = + null, + val startDate: java.time.LocalDate? = + null, + val endDate: java.time.LocalDate? = + null, + val locale: kotlin.String? = + null, + val links: kotlin.collections.List< + GetActivityListingsOperationParams.Links, + >? = + null, ) { - /** - * @param partnerTransactionId Partner-generated identifier. - */ - fun partnerTransactionId(partnerTransactionId: - kotlin.String -) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param location Can be a city name, street address, three-letter IATA Airport Code or a landmark name. (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) - */ - fun location(location: - kotlin.String -) = apply { this.location = location } - /** - * @param geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. - */ - fun geoLocation(geoLocation: - kotlin.String -) = apply { this.geoLocation = geoLocation } - /** - * @param startDate Start date for the activity window in YYY-MM-DD format. If an endDate value is supplied there must also be a startDate. default: currentDate - */ - fun startDate(startDate: - java.time.LocalDate -) = apply { this.startDate = startDate } - /** - * @param endDate End date for the activity window in YYY-MM-DD format. default: \"startDate+14\" - */ - fun endDate(endDate: - java.time.LocalDate -) = apply { this.endDate = endDate } - /** - * @param locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. - */ - fun locale(locale: - kotlin.String -) = apply { this.locale = locale } - /** - * @param links Comma-separated list to specify the types of HATEAOS links returned in the API Response. WD (deep link URL to web infosite) AD (details API query) - */ - fun links(links: kotlin.collections.List - < - GetActivityListingsOperationParams.Links - - > -) = apply { this.links = links } - - fun build(): GetActivityListingsOperationParams { - val params = GetActivityListingsOperationParams( - partnerTransactionId = partnerTransactionId!!, - location = location, - geoLocation = geoLocation, - startDate = startDate, - endDate = endDate, - locale = locale, - links = links - ) + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + } - return params + companion object { + @JvmStatic + fun builder() = Builder() } -} -fun toBuilder() = Builder( - partnerTransactionId = partnerTransactionId, - location = location, - geoLocation = geoLocation, - startDate = startDate, - endDate = endDate, - locale = locale, - links = links -) + enum class Links( + val value: kotlin.String, + ) { + WD("WD"), + AD("AD"), + } + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("location") private var location: kotlin.String? = null, + @JsonProperty("geoLocation") private var geoLocation: kotlin.String? = null, + @JsonProperty("startDate") private var startDate: java.time.LocalDate? = null, + @JsonProperty("endDate") private var endDate: java.time.LocalDate? = null, + @JsonProperty("locale") private var locale: kotlin.String? = null, + @JsonProperty("links") private var links: kotlin.collections.List< + GetActivityListingsOperationParams.Links, + >? = null, + ) { + /** + * @param partnerTransactionId Partner-generated identifier. + */ + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - fun getHeaders(): Headers { -return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-activity.v3+json") -}.build() -} + /** + * @param location Can be a city name, street address, three-letter IATA Airport Code or a landmark name. (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) + */ + fun location(location: kotlin.String) = apply { this.location = location } - fun getQueryParams(): List = - buildList { - location?.let { - val key = "location" - val value = buildList { - add(it) - } + /** + * @param geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. + */ + fun geoLocation(geoLocation: kotlin.String) = apply { this.geoLocation = geoLocation } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - geoLocation?.let { - val key = "geoLocation" - val value = buildList { - add(it) - } + /** + * @param startDate Start date for the activity window in YYY-MM-DD format. If an endDate value is supplied there must also be a startDate. default: currentDate + */ + fun startDate(startDate: java.time.LocalDate) = apply { this.startDate = startDate } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - startDate?.let { - val key = "startDate" - val value = buildList { - add(it.toString()) - } + /** + * @param endDate End date for the activity window in YYY-MM-DD format. default: \"startDate+14\" + */ + fun endDate(endDate: java.time.LocalDate) = apply { this.endDate = endDate } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - endDate?.let { - val key = "endDate" - val value = buildList { - add(it.toString()) - } + /** + * @param locale locale is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. example: \"fr_FR\" refers to French as spoken in France, while \"fr_CA\" refers to French as spoken in Canada. For a full list of supported locales please refer to the link at the bottom of the page. + */ + fun locale(locale: kotlin.String) = apply { this.locale = locale } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - locale?.let { - val key = "locale" - val value = buildList { - add(it) + /** + * @param links Comma-separated list to specify the types of HATEAOS links returned in the API Response. WD (deep link URL to web infosite) AD (details API query) + */ + fun links( + links: kotlin.collections.List< + GetActivityListingsOperationParams.Links, + >, + ) = apply { this.links = links } + + fun build(): GetActivityListingsOperationParams { + val params = + GetActivityListingsOperationParams( + partnerTransactionId = partnerTransactionId!!, + location = location, + geoLocation = geoLocation, + startDate = startDate, + endDate = endDate, + locale = locale, + links = links, + ) + + return params } + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - links?.let { - val key = "links" - val value = buildList { - addAll(it.map { it.value }) - } + fun toBuilder() = + Builder( + partnerTransactionId = partnerTransactionId, + location = location, + geoLocation = geoLocation, + startDate = startDate, + endDate = endDate, + locale = locale, + links = links, + ) - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-activity.v3+json") + }.build() + + fun getQueryParams(): List = + buildList { + location?.let { + val key = "location" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + geoLocation?.let { + val key = "geoLocation" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + startDate?.let { + val key = "startDate" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + endDate?.let { + val key = "endDate" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + locale?.let { + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + links?.let { + val key = "links" + val value = + buildList { + addAll(it.map { it.value }) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } } } - - - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt index e80b7038f..162a839b0 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperation.kt @@ -1,64 +1,46 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIMError - import com.expediagroup.sdk.xap.models.CarDetailsResponse - import com.expediagroup.sdk.xap.models.CarsErrors - - /** - * Get Extended information with a single car offer - * @property params [GetCarDetailsOperationParams] - */ - class GetCarDetailsOperation( - private val params: GetCarDetailsOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/cars/details/{offerToken}" - - - url = url.replace( - oldValue = "{" + "offerToken" + "}", - newValue = this.params.offerToken, - ignoreCase = true - ) - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.CarDetailsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get Extended information with a single car offer + * @property params [GetCarDetailsOperationParams] + */ +class GetCarDetailsOperation( + private val params: GetCarDetailsOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/cars/details/{offerToken}" + + url = + url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true, + ) + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt index c2ada49b0..1817791dc 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarDetailsOperationParams.kt @@ -1,247 +1,161 @@ package com.expediagroup.sdk.xap.operations +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property offerToken car offer token + * @property partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. + * @property price The total price for the product. + * @property currency Price currency code + * @property source source mobile - The value mobile represents that the client is mobile. + */ +@JsonDeserialize(builder = GetCarDetailsOperationParams.Builder::class) +data class GetCarDetailsOperationParams( + val offerToken: kotlin.String, + val partnerTransactionId: kotlin.String, + val price: kotlin.String, + val currency: kotlin.String, + val source: kotlin.String? = + null, +) { + init { + require(offerToken != null) { "offerToken must not be null" } - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - -import com.expediagroup.sdk.xap.models.APIMError -import com.expediagroup.sdk.xap.models.CarDetailsResponse -import com.expediagroup.sdk.xap.models.CarsErrors - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property offerToken car offer token - * @property partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. - * @property price The total price for the product. - * @property currency Price currency code - * @property source source mobile - The value mobile represents that the client is mobile. - */ - @JsonDeserialize(builder = GetCarDetailsOperationParams.Builder::class) - data class GetCarDetailsOperationParams( - val offerToken: - kotlin.String - - , - val partnerTransactionId: - kotlin.String - - , - val price: - kotlin.String - - , - val currency: - kotlin.String - - , - val source: - kotlin.String - -? - = null - - ) { - - init { - require(offerToken != null) { "offerToken must not be null" } - - - - - - - - - require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - - - - - - - - require(price != null) { "price must not be null" } - - - - - - - - - require(currency != null) { "currency must not be null" } - - - - - - - - - - - - - - - - + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - } + require(price != null) { "price must not be null" } - companion object { - @JvmStatic - fun builder() = Builder() - } - - - - class Builder( - @JsonProperty("offerToken") private var offerToken: - kotlin.String -? = null - , - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String -? = null - , - @JsonProperty("price") private var price: - kotlin.String -? = null - , - @JsonProperty("currency") private var currency: - kotlin.String -? = null - , - @JsonProperty("source") private var source: - kotlin.String -? = null - -) { - /** - * @param offerToken car offer token - */ - fun offerToken(offerToken: - kotlin.String -) = apply { this.offerToken = offerToken } - /** - * @param partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. - */ - fun partnerTransactionId(partnerTransactionId: - kotlin.String -) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param price The total price for the product. - */ - fun price(price: - kotlin.String -) = apply { this.price = price } - /** - * @param currency Price currency code - */ - fun currency(currency: - kotlin.String -) = apply { this.currency = currency } - /** - * @param source source mobile - The value mobile represents that the client is mobile. - */ - fun source(source: - kotlin.String -) = apply { this.source = source } - - fun build(): GetCarDetailsOperationParams { - val params = GetCarDetailsOperationParams( - offerToken = offerToken!!, - partnerTransactionId = partnerTransactionId!!, - price = price!!, - currency = currency!!, - source = source - ) + require(currency != null) { "currency must not be null" } + } - return params + companion object { + @JvmStatic + fun builder() = Builder() } -} -fun toBuilder() = Builder( - offerToken = offerToken, - partnerTransactionId = partnerTransactionId, - price = price, - currency = currency, - source = source -) + class Builder( + @JsonProperty("offerToken") private var offerToken: kotlin.String? = null, + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("price") private var price: kotlin.String? = null, + @JsonProperty("currency") private var currency: kotlin.String? = null, + @JsonProperty("source") private var source: kotlin.String? = null, + ) { + /** + * @param offerToken car offer token + */ + fun offerToken(offerToken: kotlin.String) = apply { this.offerToken = offerToken } + /** + * @param partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. + */ + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - fun getHeaders(): Headers { -return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-car.v3+json") -}.build() -} + /** + * @param price The total price for the product. + */ + fun price(price: kotlin.String) = apply { this.price = price } - fun getQueryParams(): List = - buildList { - price?.let { - val key = "price" - val value = buildList { - add(it) - } + /** + * @param currency Price currency code + */ + fun currency(currency: kotlin.String) = apply { this.currency = currency } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - currency?.let { - val key = "currency" - val value = buildList { - add(it) + /** + * @param source source mobile - The value mobile represents that the client is mobile. + */ + fun source(source: kotlin.String) = apply { this.source = source } + + fun build(): GetCarDetailsOperationParams { + val params = + GetCarDetailsOperationParams( + offerToken = offerToken!!, + partnerTransactionId = partnerTransactionId!!, + price = price!!, + currency = currency!!, + source = source, + ) + + return params } + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - source?.let { - val key = "source" - val value = buildList { - add(it) - } + fun toBuilder() = + Builder( + offerToken = offerToken, + partnerTransactionId = partnerTransactionId, + price = price, + currency = currency, + source = source, + ) - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-car.v3+json") + }.build() + + fun getQueryParams(): List = + buildList { + price?.let { + val key = "price" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + currency?.let { + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + source?.let { + val key = "source" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } } -} - fun getPathParams() : Map { -return buildMap { - offerToken?.also { - put("offerToken", offerToken) + fun getPathParams(): Map = + buildMap { + offerToken?.also { + put("offerToken", offerToken) + } } - } } - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt index 9e16907e1..2cc3ba5e8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperation.kt @@ -1,59 +1,39 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIMError - import com.expediagroup.sdk.xap.models.CarListingsResponse - import com.expediagroup.sdk.xap.models.CarsErrors - import com.expediagroup.sdk.xap.models.DisambiguationResponse - - /** - * Search Expedia car inventory - * @property params [GetCarsListingsOperationParams] - */ - class GetCarsListingsOperation( - private val params: GetCarsListingsOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/cars/listings" - - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.CarListingsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Search Expedia car inventory + * @property params [GetCarsListingsOperationParams] + */ +class GetCarsListingsOperation( + private val params: GetCarsListingsOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/cars/listings" + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt index fc1fc6602..6494b3e79 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt @@ -1,1259 +1,849 @@ package com.expediagroup.sdk.xap.operations +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. + * @property pickupAirport Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + * @property pickupCity The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + * @property pickupAddress The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + * @property pickupGeoLocation The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + * @property pickupRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed. + * @property dropOffAirport Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + * @property dropOffCity City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + * @property dropOffAddress Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + * @property dropOffGeoLocation Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + * @property dropOffRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same. + * @property pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) + * @property dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. + * @property sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. + * @property sortOrder Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of 'ascending' will be assumed. + * @property limit The maximum number of search results that will be returned by the query. + * @property suppliers A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier. + * @property carClasses A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. + * @property discount1Supplier Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below. + * @property discount1Type The type of discount to be applied.Supported values: CorpDiscount | Coupon. + * @property discount1Code The code of the discount to be applied. + * @property transmissions A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. + * @property airConditioning Specify whether to filter for cars that include or exclude air conditioning. + * @property carTypes A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. + * @property unit The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM. + * @property driverAge The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. + * @property links WS = WebSearch, AD = ApiDetails, WD = WebDetails + * @property source Indicates the source where the request is coming from.The available values for the source as below:browser - The value \"browser\" represents that the client is traditional website.mobile - The value \"mobile\" represents that the client is mobile.all - The value \"all\" indicates that the client includes both browser and mobile.Only one source value may be used at a time. + */ +@JsonDeserialize(builder = GetCarsListingsOperationParams.Builder::class) +data class GetCarsListingsOperationParams( + val partnerTransactionId: kotlin.String, + val pickupAirport: kotlin.String? = + null, + val pickupCity: kotlin.String? = + null, + val pickupAddress: kotlin.String? = + null, + val pickupGeoLocation: kotlin.String? = + null, + val pickupRadius: kotlin.Int? = + null, + val dropOffAirport: kotlin.String? = + null, + val dropOffCity: kotlin.String? = + null, + val dropOffAddress: kotlin.String? = + null, + val dropOffGeoLocation: kotlin.String? = + null, + val dropOffRadius: kotlin.Int? = + null, + val pickupTime: java.time.LocalDateTime, + val dropOffTime: java.time.LocalDateTime, + val sortType: GetCarsListingsOperationParams.SortType? = + null, + val sortOrder: GetCarsListingsOperationParams.SortOrder? = + null, + val limit: kotlin.Int? = + null, + val suppliers: kotlin.collections.Set< + kotlin.String, + >? = + null, + val carClasses: kotlin.collections.Set< + kotlin.String, + >? = + null, + val discount1Supplier: kotlin.String? = + null, + val discount1Type: GetCarsListingsOperationParams.Discount1Type? = + null, + val discount1Code: kotlin.String? = + null, + val transmissions: kotlin.collections.Set< + kotlin.String, + >? = + null, + val airConditioning: kotlin.Boolean? = + null, + val carTypes: kotlin.collections.Set< + kotlin.String, + >? = + null, + val unit: GetCarsListingsOperationParams.Unit? = + null, + val driverAge: kotlin.Int? = + null, + val links: kotlin.collections.List< + GetCarsListingsOperationParams.Links, + >? = + null, + val source: GetCarsListingsOperationParams.Source? = + null, +) { + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - -import com.expediagroup.sdk.xap.models.APIMError -import com.expediagroup.sdk.xap.models.CarListingsResponse -import com.expediagroup.sdk.xap.models.CarsErrors -import com.expediagroup.sdk.xap.models.DisambiguationResponse - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. - * @property pickupAirport Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - * @property pickupCity The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - * @property pickupAddress The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - * @property pickupGeoLocation The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - * @property pickupRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed. - * @property dropOffAirport Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - * @property dropOffCity City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - * @property dropOffAddress Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - * @property dropOffGeoLocation Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - * @property dropOffRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same. - * @property pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) - * @property dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. - * @property sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. - * @property sortOrder Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of 'ascending' will be assumed. - * @property limit The maximum number of search results that will be returned by the query. - * @property suppliers A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier. - * @property carClasses A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. - * @property discount1Supplier Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below. - * @property discount1Type The type of discount to be applied.Supported values: CorpDiscount | Coupon. - * @property discount1Code The code of the discount to be applied. - * @property transmissions A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. - * @property airConditioning Specify whether to filter for cars that include or exclude air conditioning. - * @property carTypes A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. - * @property unit The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM. - * @property driverAge The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. - * @property links WS = WebSearch, AD = ApiDetails, WD = WebDetails - * @property source Indicates the source where the request is coming from.The available values for the source as below:browser - The value \"browser\" represents that the client is traditional website.mobile - The value \"mobile\" represents that the client is mobile.all - The value \"all\" indicates that the client includes both browser and mobile.Only one source value may be used at a time. - */ - @JsonDeserialize(builder = GetCarsListingsOperationParams.Builder::class) - data class GetCarsListingsOperationParams( - val partnerTransactionId: - kotlin.String - - , - val pickupAirport: - kotlin.String - -? - = null -, - val pickupCity: - kotlin.String - -? - = null -, - val pickupAddress: - kotlin.String - -? - = null -, - val pickupGeoLocation: - kotlin.String - -? - = null -, - val pickupRadius: - kotlin.Int - -? - = null -, - val dropOffAirport: - kotlin.String - -? - = null -, - val dropOffCity: - kotlin.String - -? - = null -, - val dropOffAddress: - kotlin.String - -? - = null -, - val dropOffGeoLocation: - kotlin.String - -? - = null -, - val dropOffRadius: - kotlin.Int - -? - = null -, - val pickupTime: - java.time.LocalDateTime - - , - val dropOffTime: - java.time.LocalDateTime - - , - val sortType: GetCarsListingsOperationParams.SortType - - -? - = null -, - val sortOrder: GetCarsListingsOperationParams.SortOrder - - -? - = null -, - val limit: - kotlin.Int - -? - = null -, - val suppliers: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val carClasses: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val discount1Supplier: - kotlin.String - -? - = null -, - val discount1Type: GetCarsListingsOperationParams.Discount1Type - - -? - = null -, - val discount1Code: - kotlin.String - -? - = null -, - val transmissions: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val airConditioning: - kotlin.Boolean - -? - = null -, - val carTypes: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val unit: GetCarsListingsOperationParams.Unit - - -? - = null -, - val driverAge: - kotlin.Int - -? - = null -, - val links: kotlin.collections.List - < - GetCarsListingsOperationParams.Links - - > - -? - = null -, - val source: GetCarsListingsOperationParams.Source - - -? - = null - - ) { - - init { - require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - require(pickupTime != null) { "pickupTime must not be null" } - - - - - - - - - require(dropOffTime != null) { "dropOffTime must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + require(pickupTime != null) { "pickupTime must not be null" } + require(dropOffTime != null) { "dropOffTime must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + enum class SortType( + val value: kotlin.String, + ) { + PRICE("Price"), + } + enum class SortOrder( + val value: kotlin.String, + ) { + ASC("ASC"), + DESC("DESC"), + } + enum class Discount1Type( + val value: kotlin.String, + ) { + CORP_DISCOUNT("CorpDiscount"), + COUPON("Coupon"), + } + enum class Unit( + val value: kotlin.String, + ) { + KM("KM"), + MI("MI"), + } + enum class Links( + val value: kotlin.String, + ) { + WS("WS"), + AD("AD"), + WD("WD"), + } + enum class Source( + val value: kotlin.String, + ) { + BROWSER("browser"), + MOBILE("mobile"), + ALL("all"), + } + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("pickup.airport") private var pickupAirport: kotlin.String? = null, + @JsonProperty("pickup.city") private var pickupCity: kotlin.String? = null, + @JsonProperty("pickup.address") private var pickupAddress: kotlin.String? = null, + @JsonProperty("pickup.geoLocation") private var pickupGeoLocation: kotlin.String? = null, + @JsonProperty("pickup.radius") private var pickupRadius: kotlin.Int? = null, + @JsonProperty("dropOff.airport") private var dropOffAirport: kotlin.String? = null, + @JsonProperty("dropOff.city") private var dropOffCity: kotlin.String? = null, + @JsonProperty("dropOff.address") private var dropOffAddress: kotlin.String? = null, + @JsonProperty("dropOff.geoLocation") private var dropOffGeoLocation: kotlin.String? = null, + @JsonProperty("dropOff.radius") private var dropOffRadius: kotlin.Int? = null, + @JsonProperty("pickupTime") private var pickupTime: java.time.LocalDateTime? = null, + @JsonProperty("dropOffTime") private var dropOffTime: java.time.LocalDateTime? = null, + @JsonProperty("sortType") private var sortType: GetCarsListingsOperationParams.SortType? = null, + @JsonProperty("sortOrder") private var sortOrder: GetCarsListingsOperationParams.SortOrder? = null, + @JsonProperty("limit") private var limit: kotlin.Int? = null, + @JsonProperty("suppliers") private var suppliers: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("carClasses") private var carClasses: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("discount1.supplier") private var discount1Supplier: kotlin.String? = null, + @JsonProperty("discount1.type") private var discount1Type: GetCarsListingsOperationParams.Discount1Type? = null, + @JsonProperty("discount1.code") private var discount1Code: kotlin.String? = null, + @JsonProperty("transmissions") private var transmissions: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("airConditioning") private var airConditioning: kotlin.Boolean? = null, + @JsonProperty("carTypes") private var carTypes: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("unit") private var unit: GetCarsListingsOperationParams.Unit? = null, + @JsonProperty("driverAge") private var driverAge: kotlin.Int? = null, + @JsonProperty("links") private var links: kotlin.collections.List< + GetCarsListingsOperationParams.Links, + >? = null, + @JsonProperty("source") private var source: GetCarsListingsOperationParams.Source? = null, + ) { + /** + * @param partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. + */ + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param pickupAirport Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + */ + fun pickupAirport(pickupAirport: kotlin.String) = apply { this.pickupAirport = pickupAirport } + /** + * @param pickupCity The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + */ + fun pickupCity(pickupCity: kotlin.String) = apply { this.pickupCity = pickupCity } + /** + * @param pickupAddress The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + */ + fun pickupAddress(pickupAddress: kotlin.String) = apply { this.pickupAddress = pickupAddress } + /** + * @param pickupGeoLocation The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. + */ + fun pickupGeoLocation(pickupGeoLocation: kotlin.String) = apply { this.pickupGeoLocation = pickupGeoLocation } + /** + * @param pickupRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed. + */ + fun pickupRadius(pickupRadius: kotlin.Int) = apply { this.pickupRadius = pickupRadius } + /** + * @param dropOffAirport Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + */ + fun dropOffAirport(dropOffAirport: kotlin.String) = apply { this.dropOffAirport = dropOffAirport } + /** + * @param dropOffCity City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + */ + fun dropOffCity(dropOffCity: kotlin.String) = apply { this.dropOffCity = dropOffCity } + /** + * @param dropOffAddress Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + */ + fun dropOffAddress(dropOffAddress: kotlin.String) = apply { this.dropOffAddress = dropOffAddress } + /** + * @param dropOffGeoLocation Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. + */ + fun dropOffGeoLocation(dropOffGeoLocation: kotlin.String) = apply { this.dropOffGeoLocation = dropOffGeoLocation } + /** + * @param dropOffRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same. + */ + fun dropOffRadius(dropOffRadius: kotlin.Int) = apply { this.dropOffRadius = dropOffRadius } + /** + * @param pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) + */ + fun pickupTime(pickupTime: java.time.LocalDateTime) = apply { this.pickupTime = pickupTime } + /** + * @param dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. + */ + fun dropOffTime(dropOffTime: java.time.LocalDateTime) = apply { this.dropOffTime = dropOffTime } + /** + * @param sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. + */ + fun sortType(sortType: GetCarsListingsOperationParams.SortType) = apply { this.sortType = sortType } + /** + * @param sortOrder Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of 'ascending' will be assumed. + */ + fun sortOrder(sortOrder: GetCarsListingsOperationParams.SortOrder) = apply { this.sortOrder = sortOrder } + /** + * @param limit The maximum number of search results that will be returned by the query. + */ + fun limit(limit: kotlin.Int) = apply { this.limit = limit } + /** + * @param suppliers A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier. + */ + fun suppliers( + suppliers: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.suppliers = suppliers } + /** + * @param carClasses A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. + */ + fun carClasses( + carClasses: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.carClasses = carClasses } + /** + * @param discount1Supplier Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below. + */ + fun discount1Supplier(discount1Supplier: kotlin.String) = apply { this.discount1Supplier = discount1Supplier } + /** + * @param discount1Type The type of discount to be applied.Supported values: CorpDiscount | Coupon. + */ + fun discount1Type(discount1Type: GetCarsListingsOperationParams.Discount1Type) = apply { this.discount1Type = discount1Type } + /** + * @param discount1Code The code of the discount to be applied. + */ + fun discount1Code(discount1Code: kotlin.String) = apply { this.discount1Code = discount1Code } + /** + * @param transmissions A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. + */ + fun transmissions( + transmissions: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.transmissions = transmissions } + /** + * @param airConditioning Specify whether to filter for cars that include or exclude air conditioning. + */ + fun airConditioning(airConditioning: kotlin.Boolean) = apply { this.airConditioning = airConditioning } + /** + * @param carTypes A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. + */ + fun carTypes( + carTypes: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.carTypes = carTypes } + /** + * @param unit The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM. + */ + fun unit(unit: GetCarsListingsOperationParams.Unit) = apply { this.unit = unit } + /** + * @param driverAge The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. + */ + fun driverAge(driverAge: kotlin.Int) = apply { this.driverAge = driverAge } + /** + * @param links WS = WebSearch, AD = ApiDetails, WD = WebDetails + */ + fun links( + links: kotlin.collections.List< + GetCarsListingsOperationParams.Links, + >, + ) = apply { this.links = links } + /** + * @param source Indicates the source where the request is coming from.The available values for the source as below:browser - The value \"browser\" represents that the client is traditional website.mobile - The value \"mobile\" represents that the client is mobile.all - The value \"all\" indicates that the client includes both browser and mobile.Only one source value may be used at a time. + */ + fun source(source: GetCarsListingsOperationParams.Source) = apply { this.source = source } + + fun build(): GetCarsListingsOperationParams { + val params = + GetCarsListingsOperationParams( + partnerTransactionId = partnerTransactionId!!, + pickupAirport = pickupAirport, + pickupCity = pickupCity, + pickupAddress = pickupAddress, + pickupGeoLocation = pickupGeoLocation, + pickupRadius = pickupRadius, + dropOffAirport = dropOffAirport, + dropOffCity = dropOffCity, + dropOffAddress = dropOffAddress, + dropOffGeoLocation = dropOffGeoLocation, + dropOffRadius = dropOffRadius, + pickupTime = pickupTime!!, + dropOffTime = dropOffTime!!, + sortType = sortType, + sortOrder = sortOrder, + limit = limit, + suppliers = suppliers, + carClasses = carClasses, + discount1Supplier = discount1Supplier, + discount1Type = discount1Type, + discount1Code = discount1Code, + transmissions = transmissions, + airConditioning = airConditioning, + carTypes = carTypes, + unit = unit, + driverAge = driverAge, + links = links, + source = source, + ) + + return params + } + } + fun toBuilder() = + Builder( + partnerTransactionId = partnerTransactionId, + pickupAirport = pickupAirport, + pickupCity = pickupCity, + pickupAddress = pickupAddress, + pickupGeoLocation = pickupGeoLocation, + pickupRadius = pickupRadius, + dropOffAirport = dropOffAirport, + dropOffCity = dropOffCity, + dropOffAddress = dropOffAddress, + dropOffGeoLocation = dropOffGeoLocation, + dropOffRadius = dropOffRadius, + pickupTime = pickupTime, + dropOffTime = dropOffTime, + sortType = sortType, + sortOrder = sortOrder, + limit = limit, + suppliers = suppliers, + carClasses = carClasses, + discount1Supplier = discount1Supplier, + discount1Type = discount1Type, + discount1Code = discount1Code, + transmissions = transmissions, + airConditioning = airConditioning, + carTypes = carTypes, + unit = unit, + driverAge = driverAge, + links = links, + source = source, + ) + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-car.v3+json") + }.build() + + fun getQueryParams(): List = + buildList { + pickupAirport?.let { + val key = "pickup.airport" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - - companion object { - @JvmStatic - fun builder() = Builder() + pickupCity?.let { + val key = "pickup.city" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - - enum class SortType( - val value: - - kotlin.String - ) { - PRICE("Price") - + pickupAddress?.let { + val key = "pickup.address" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - enum class SortOrder( - val value: - - kotlin.String - ) { - ASC("ASC") - , - DESC("DESC") - + pickupGeoLocation?.let { + val key = "pickup.geoLocation" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - enum class Discount1Type( - val value: - - kotlin.String - ) { - CORP_DISCOUNT("CorpDiscount") - , - COUPON("Coupon") - + pickupRadius?.let { + val key = "pickup.radius" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - enum class Unit( - val value: - - kotlin.String - ) { - KM("KM") - , - MI("MI") - + dropOffAirport?.let { + val key = "dropOff.airport" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - enum class Links( - val value: - kotlin.String - - ) { - WS("WS") - , - AD("AD") - , - WD("WD") - + dropOffCity?.let { + val key = "dropOff.city" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - enum class Source( - val value: - - kotlin.String - ) { - BROWSER("browser") - , - MOBILE("mobile") - , - ALL("all") - + dropOffAddress?.let { + val key = "dropOff.address" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + dropOffGeoLocation?.let { + val key = "dropOff.geoLocation" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + dropOffRadius?.let { + val key = "dropOff.radius" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + pickupTime?.let { + val key = "pickupTime" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + dropOffTime?.let { + val key = "dropOffTime" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + sortType?.let { + val key = "sortType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + sortOrder?.let { + val key = "sortOrder" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + limit?.let { + val key = "limit" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + suppliers?.let { + val key = "suppliers" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + carClasses?.let { + val key = "carClasses" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + discount1Supplier?.let { + val key = "discount1.supplier" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + discount1Type?.let { + val key = "discount1.type" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + discount1Code?.let { + val key = "discount1.code" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + transmissions?.let { + val key = "transmissions" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + airConditioning?.let { + val key = "airConditioning" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + carTypes?.let { + val key = "carTypes" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + unit?.let { + val key = "unit" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + driverAge?.let { + val key = "driverAge" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + links?.let { + val key = "links" + val value = + buildList { + addAll(it.map { it.value }) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + source?.let { + val key = "source" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - - - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String -? = null - , - @JsonProperty("pickup.airport") private var pickupAirport: - kotlin.String -? = null - , - @JsonProperty("pickup.city") private var pickupCity: - kotlin.String -? = null - , - @JsonProperty("pickup.address") private var pickupAddress: - kotlin.String -? = null - , - @JsonProperty("pickup.geoLocation") private var pickupGeoLocation: - kotlin.String -? = null - , - @JsonProperty("pickup.radius") private var pickupRadius: - kotlin.Int -? = null - , - @JsonProperty("dropOff.airport") private var dropOffAirport: - kotlin.String -? = null - , - @JsonProperty("dropOff.city") private var dropOffCity: - kotlin.String -? = null - , - @JsonProperty("dropOff.address") private var dropOffAddress: - kotlin.String -? = null - , - @JsonProperty("dropOff.geoLocation") private var dropOffGeoLocation: - kotlin.String -? = null - , - @JsonProperty("dropOff.radius") private var dropOffRadius: - kotlin.Int -? = null - , - @JsonProperty("pickupTime") private var pickupTime: - java.time.LocalDateTime -? = null - , - @JsonProperty("dropOffTime") private var dropOffTime: - java.time.LocalDateTime -? = null - , - @JsonProperty("sortType") private var sortType: GetCarsListingsOperationParams.SortType - -? = null - , - @JsonProperty("sortOrder") private var sortOrder: GetCarsListingsOperationParams.SortOrder - -? = null - , - @JsonProperty("limit") private var limit: - kotlin.Int -? = null - , - @JsonProperty("suppliers") private var suppliers: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("carClasses") private var carClasses: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("discount1.supplier") private var discount1Supplier: - kotlin.String -? = null - , - @JsonProperty("discount1.type") private var discount1Type: GetCarsListingsOperationParams.Discount1Type - -? = null - , - @JsonProperty("discount1.code") private var discount1Code: - kotlin.String -? = null - , - @JsonProperty("transmissions") private var transmissions: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("airConditioning") private var airConditioning: - kotlin.Boolean -? = null - , - @JsonProperty("carTypes") private var carTypes: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("unit") private var unit: GetCarsListingsOperationParams.Unit - -? = null - , - @JsonProperty("driverAge") private var driverAge: - kotlin.Int -? = null - , - @JsonProperty("links") private var links: kotlin.collections.List - < - GetCarsListingsOperationParams.Links - - > -? = null - , - @JsonProperty("source") private var source: GetCarsListingsOperationParams.Source - -? = null - -) { - /** - * @param partnerTransactionId [Not consumed by Expedia] Partner-generated identifier. - */ - fun partnerTransactionId(partnerTransactionId: - kotlin.String -) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param pickupAirport Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - */ - fun pickupAirport(pickupAirport: - kotlin.String -) = apply { this.pickupAirport = pickupAirport } - /** - * @param pickupCity The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - */ - fun pickupCity(pickupCity: - kotlin.String -) = apply { this.pickupCity = pickupCity } - /** - * @param pickupAddress The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - */ - fun pickupAddress(pickupAddress: - kotlin.String -) = apply { this.pickupAddress = pickupAddress } - /** - * @param pickupGeoLocation The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request. - */ - fun pickupGeoLocation(pickupGeoLocation: - kotlin.String -) = apply { this.pickupGeoLocation = pickupGeoLocation } - /** - * @param pickupRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed. - */ - fun pickupRadius(pickupRadius: - kotlin.Int -) = apply { this.pickupRadius = pickupRadius } - /** - * @param dropOffAirport Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - */ - fun dropOffAirport(dropOffAirport: - kotlin.String -) = apply { this.dropOffAirport = dropOffAirport } - /** - * @param dropOffCity City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - */ - fun dropOffCity(dropOffCity: - kotlin.String -) = apply { this.dropOffCity = dropOffCity } - /** - * @param dropOffAddress Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - */ - fun dropOffAddress(dropOffAddress: - kotlin.String -) = apply { this.dropOffAddress = dropOffAddress } - /** - * @param dropOffGeoLocation Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up. - */ - fun dropOffGeoLocation(dropOffGeoLocation: - kotlin.String -) = apply { this.dropOffGeoLocation = dropOffGeoLocation } - /** - * @param dropOffRadius Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See ' unit' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same. - */ - fun dropOffRadius(dropOffRadius: - kotlin.Int -) = apply { this.dropOffRadius = dropOffRadius } - /** - * @param pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) - */ - fun pickupTime(pickupTime: - java.time.LocalDateTime -) = apply { this.pickupTime = pickupTime } - /** - * @param dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. - */ - fun dropOffTime(dropOffTime: - java.time.LocalDateTime -) = apply { this.dropOffTime = dropOffTime } - /** - * @param sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. - */ - fun sortType(sortType: GetCarsListingsOperationParams.SortType - -) = apply { this.sortType = sortType } - /** - * @param sortOrder Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of 'ascending' will be assumed. - */ - fun sortOrder(sortOrder: GetCarsListingsOperationParams.SortOrder - -) = apply { this.sortOrder = sortOrder } - /** - * @param limit The maximum number of search results that will be returned by the query. - */ - fun limit(limit: - kotlin.Int -) = apply { this.limit = limit } - /** - * @param suppliers A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier. - */ - fun suppliers(suppliers: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.suppliers = suppliers } - /** - * @param carClasses A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. - */ - fun carClasses(carClasses: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.carClasses = carClasses } - /** - * @param discount1Supplier Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below. - */ - fun discount1Supplier(discount1Supplier: - kotlin.String -) = apply { this.discount1Supplier = discount1Supplier } - /** - * @param discount1Type The type of discount to be applied.Supported values: CorpDiscount | Coupon. - */ - fun discount1Type(discount1Type: GetCarsListingsOperationParams.Discount1Type - -) = apply { this.discount1Type = discount1Type } - /** - * @param discount1Code The code of the discount to be applied. - */ - fun discount1Code(discount1Code: - kotlin.String -) = apply { this.discount1Code = discount1Code } - /** - * @param transmissions A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. - */ - fun transmissions(transmissions: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.transmissions = transmissions } - /** - * @param airConditioning Specify whether to filter for cars that include or exclude air conditioning. - */ - fun airConditioning(airConditioning: - kotlin.Boolean -) = apply { this.airConditioning = airConditioning } - /** - * @param carTypes A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. - */ - fun carTypes(carTypes: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.carTypes = carTypes } - /** - * @param unit The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM. - */ - fun unit(unit: GetCarsListingsOperationParams.Unit - -) = apply { this.unit = unit } - /** - * @param driverAge The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. - */ - fun driverAge(driverAge: - kotlin.Int -) = apply { this.driverAge = driverAge } - /** - * @param links WS = WebSearch, AD = ApiDetails, WD = WebDetails - */ - fun links(links: kotlin.collections.List - < - GetCarsListingsOperationParams.Links - - > -) = apply { this.links = links } - /** - * @param source Indicates the source where the request is coming from.The available values for the source as below:browser - The value \"browser\" represents that the client is traditional website.mobile - The value \"mobile\" represents that the client is mobile.all - The value \"all\" indicates that the client includes both browser and mobile.Only one source value may be used at a time. - */ - fun source(source: GetCarsListingsOperationParams.Source - -) = apply { this.source = source } - - fun build(): GetCarsListingsOperationParams { - val params = GetCarsListingsOperationParams( - partnerTransactionId = partnerTransactionId!!, - pickupAirport = pickupAirport, - pickupCity = pickupCity, - pickupAddress = pickupAddress, - pickupGeoLocation = pickupGeoLocation, - pickupRadius = pickupRadius, - dropOffAirport = dropOffAirport, - dropOffCity = dropOffCity, - dropOffAddress = dropOffAddress, - dropOffGeoLocation = dropOffGeoLocation, - dropOffRadius = dropOffRadius, - pickupTime = pickupTime!!, - dropOffTime = dropOffTime!!, - sortType = sortType, - sortOrder = sortOrder, - limit = limit, - suppliers = suppliers, - carClasses = carClasses, - discount1Supplier = discount1Supplier, - discount1Type = discount1Type, - discount1Code = discount1Code, - transmissions = transmissions, - airConditioning = airConditioning, - carTypes = carTypes, - unit = unit, - driverAge = driverAge, - links = links, - source = source - ) - - return params - } -} - -fun toBuilder() = Builder( - partnerTransactionId = partnerTransactionId, - pickupAirport = pickupAirport, - pickupCity = pickupCity, - pickupAddress = pickupAddress, - pickupGeoLocation = pickupGeoLocation, - pickupRadius = pickupRadius, - dropOffAirport = dropOffAirport, - dropOffCity = dropOffCity, - dropOffAddress = dropOffAddress, - dropOffGeoLocation = dropOffGeoLocation, - dropOffRadius = dropOffRadius, - pickupTime = pickupTime, - dropOffTime = dropOffTime, - sortType = sortType, - sortOrder = sortOrder, - limit = limit, - suppliers = suppliers, - carClasses = carClasses, - discount1Supplier = discount1Supplier, - discount1Type = discount1Type, - discount1Code = discount1Code, - transmissions = transmissions, - airConditioning = airConditioning, - carTypes = carTypes, - unit = unit, - driverAge = driverAge, - links = links, - source = source -) - - - fun getHeaders(): Headers { -return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-car.v3+json") -}.build() -} - - fun getQueryParams(): List = - buildList { - pickupAirport?.let { - val key = "pickup.airport" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - pickupCity?.let { - val key = "pickup.city" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - pickupAddress?.let { - val key = "pickup.address" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - pickupGeoLocation?.let { - val key = "pickup.geoLocation" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - pickupRadius?.let { - val key = "pickup.radius" - val value = buildList { - add(it.toString()) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - dropOffAirport?.let { - val key = "dropOff.airport" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - dropOffCity?.let { - val key = "dropOff.city" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - dropOffAddress?.let { - val key = "dropOff.address" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - dropOffGeoLocation?.let { - val key = "dropOff.geoLocation" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - dropOffRadius?.let { - val key = "dropOff.radius" - val value = buildList { - add(it.toString()) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - pickupTime?.let { - val key = "pickupTime" - val value = buildList { - add(it.toString()) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - dropOffTime?.let { - val key = "dropOffTime" - val value = buildList { - add(it.toString()) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - sortType?.let { - val key = "sortType" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - sortOrder?.let { - val key = "sortOrder" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - limit?.let { - val key = "limit" - val value = buildList { - add(it.toString()) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - suppliers?.let { - val key = "suppliers" - val value = buildList { - addAll(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - carClasses?.let { - val key = "carClasses" - val value = buildList { - addAll(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - discount1Supplier?.let { - val key = "discount1.supplier" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - discount1Type?.let { - val key = "discount1.type" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - discount1Code?.let { - val key = "discount1.code" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - transmissions?.let { - val key = "transmissions" - val value = buildList { - addAll(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - airConditioning?.let { - val key = "airConditioning" - val value = buildList { - add(it.toString()) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - carTypes?.let { - val key = "carTypes" - val value = buildList { - addAll(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - unit?.let { - val key = "unit" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - driverAge?.let { - val key = "driverAge" - val value = buildList { - add(it.toString()) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - links?.let { - val key = "links" - val value = buildList { - addAll(it.map { it.value }) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - source?.let { - val key = "source" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) } } - - - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt index d75b052b5..5ab427857 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperation.kt @@ -1,54 +1,34 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - - - import com.expediagroup.sdk.xap.models.PresignedUrlResponse - import com.expediagroup.sdk.xap.models.SdpAPIMError - - /** - * - * @property params [GetFeedDownloadUrlOperationParams] - */ - class GetFeedDownloadUrlOperation( - private val params: GetFeedDownloadUrlOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait - { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/feed/v1/download-url" - - - -return url -} - - +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.PresignedUrlResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * + * @property params [GetFeedDownloadUrlOperationParams] + */ +class GetFeedDownloadUrlOperation( + private val params: GetFeedDownloadUrlOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/feed/v1/download-url" + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() - - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt index 991324319..1335db0e3 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetFeedDownloadUrlOperationParams.kt @@ -1,350 +1,224 @@ package com.expediagroup.sdk.xap.operations +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property type The type of file, used to get files by type. + * @property locale Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: \"{LanguageCode}-{CountryCode}\".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. + * @property pointOfSupply The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. + * @property lodgingType The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. + * @property brand The downloadable files provided after specifying will only contain property information for that brand. + */ +@JsonDeserialize(builder = GetFeedDownloadUrlOperationParams.Builder::class) +data class GetFeedDownloadUrlOperationParams( + val type: GetFeedDownloadUrlOperationParams.Type, + val locale: kotlin.String? = + null, + val pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply? = + null, + val lodgingType: GetFeedDownloadUrlOperationParams.LodgingType? = + null, + val brand: GetFeedDownloadUrlOperationParams.Brand? = + null, +) { + init { + require(type != null) { "type must not be null" } + } - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - - -import com.expediagroup.sdk.xap.models.PresignedUrlResponse -import com.expediagroup.sdk.xap.models.SdpAPIMError - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property type The type of file, used to get files by type. - * @property locale Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: \"{LanguageCode}-{CountryCode}\".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. - * @property pointOfSupply The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. - * @property lodgingType The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. - * @property brand The downloadable files provided after specifying will only contain property information for that brand. - */ - @JsonDeserialize(builder = GetFeedDownloadUrlOperationParams.Builder::class) - data class GetFeedDownloadUrlOperationParams( - val type: GetFeedDownloadUrlOperationParams.Type - - - , - val locale: - kotlin.String - -? - = null -, - val pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply - - -? - = null -, - val lodgingType: GetFeedDownloadUrlOperationParams.LodgingType - - -? - = null -, - val brand: GetFeedDownloadUrlOperationParams.Brand - - -? - = null - - ) { - - init { - require(type != null) { "type must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + companion object { + @JvmStatic + fun builder() = Builder() + } + enum class Type( + val value: kotlin.String, + ) { + DESTINATION("DESTINATION"), + VENDORLOGO("VENDORLOGO"), + SUMMARY("SUMMARY"), + LISTINGS("LISTINGS"), + IMAGES("IMAGES"), + AMENITIES("AMENITIES"), + LOCATIONS("LOCATIONS"), + DESCRIPTIONS("DESCRIPTIONS"), + POLICIES("POLICIES"), + GUEST_REVIEW("GUEST_REVIEW"), + VACATION_RENTAL("VACATION_RENTAL"), + ALL_REGIONS("ALL_REGIONS"), + BOUNDING_POLYGON("BOUNDING_POLYGON"), + HOTEL_TO_REGION_HIERARCHY("HOTEL_TO_REGION_HIERARCHY"), + ROOM_DETAILS("ROOM_DETAILS"), + } + enum class PointOfSupply( + val value: kotlin.String, + ) { + US("US"), + AT("AT"), + BR("BR"), + CA("CA"), + FR("FR"), + DE("DE"), + GR("GR"), + IT("IT"), + JA("JA"), + KR("KR"), + MX("MX"), + PT("PT"), + ES("ES"), + TR("TR"), + AE("AE"), + GB("GB"), + } + enum class LodgingType( + val value: kotlin.String, + ) { + CL("CL"), + VR("VR"), + } + enum class Brand( + val value: kotlin.String, + ) { + VRBO("VRBO"), + } + class Builder( + @JsonProperty("type") private var type: GetFeedDownloadUrlOperationParams.Type? = null, + @JsonProperty("locale") private var locale: kotlin.String? = null, + @JsonProperty("pointOfSupply") private var pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply? = null, + @JsonProperty("lodgingType") private var lodgingType: GetFeedDownloadUrlOperationParams.LodgingType? = null, + @JsonProperty("brand") private var brand: GetFeedDownloadUrlOperationParams.Brand? = null, + ) { + /** + * @param type The type of file, used to get files by type. + */ + fun type(type: GetFeedDownloadUrlOperationParams.Type) = apply { this.type = type } + /** + * @param locale Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: \"{LanguageCode}-{CountryCode}\".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. + */ + fun locale(locale: kotlin.String) = apply { this.locale = locale } + /** + * @param pointOfSupply The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. + */ + fun pointOfSupply(pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply) = apply { this.pointOfSupply = pointOfSupply } + /** + * @param lodgingType The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. + */ + fun lodgingType(lodgingType: GetFeedDownloadUrlOperationParams.LodgingType) = apply { this.lodgingType = lodgingType } + /** + * @param brand The downloadable files provided after specifying will only contain property information for that brand. + */ + fun brand(brand: GetFeedDownloadUrlOperationParams.Brand) = apply { this.brand = brand } + + fun build(): GetFeedDownloadUrlOperationParams { + val params = + GetFeedDownloadUrlOperationParams( + type = type!!, + locale = locale, + pointOfSupply = pointOfSupply, + lodgingType = lodgingType, + brand = brand, + ) + + return params + } + } - } + fun toBuilder() = + Builder( + type = type, + locale = locale, + pointOfSupply = pointOfSupply, + lodgingType = lodgingType, + brand = brand, + ) - companion object { - @JvmStatic - fun builder() = Builder() + fun getQueryParams(): List = + buildList { + type?.let { + val key = "type" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - - enum class Type( - val value: - - kotlin.String - ) { - DESTINATION("DESTINATION") - , - VENDORLOGO("VENDORLOGO") - , - SUMMARY("SUMMARY") - , - LISTINGS("LISTINGS") - , - IMAGES("IMAGES") - , - AMENITIES("AMENITIES") - , - LOCATIONS("LOCATIONS") - , - DESCRIPTIONS("DESCRIPTIONS") - , - POLICIES("POLICIES") - , - GUEST_REVIEW("GUEST_REVIEW") - , - VACATION_RENTAL("VACATION_RENTAL") - , - ALL_REGIONS("ALL_REGIONS") - , - BOUNDING_POLYGON("BOUNDING_POLYGON") - , - HOTEL_TO_REGION_HIERARCHY("HOTEL_TO_REGION_HIERARCHY") - , - ROOM_DETAILS("ROOM_DETAILS") - + locale?.let { + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - enum class PointOfSupply( - val value: - - kotlin.String - ) { - US("US") - , - AT("AT") - , - BR("BR") - , - CA("CA") - , - FR("FR") - , - DE("DE") - , - GR("GR") - , - IT("IT") - , - JA("JA") - , - KR("KR") - , - MX("MX") - , - PT("PT") - , - ES("ES") - , - TR("TR") - , - AE("AE") - , - GB("GB") - + pointOfSupply?.let { + val key = "pointOfSupply" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - enum class LodgingType( - val value: - - kotlin.String - ) { - CL("CL") - , - VR("VR") - + lodgingType?.let { + val key = "lodgingType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - enum class Brand( - val value: - - kotlin.String - ) { - VRBO("VRBO") - + brand?.let { + val key = "brand" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - - - class Builder( - @JsonProperty("type") private var type: GetFeedDownloadUrlOperationParams.Type - -? = null - , - @JsonProperty("locale") private var locale: - kotlin.String -? = null - , - @JsonProperty("pointOfSupply") private var pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply - -? = null - , - @JsonProperty("lodgingType") private var lodgingType: GetFeedDownloadUrlOperationParams.LodgingType - -? = null - , - @JsonProperty("brand") private var brand: GetFeedDownloadUrlOperationParams.Brand - -? = null - -) { - /** - * @param type The type of file, used to get files by type. - */ - fun type(type: GetFeedDownloadUrlOperationParams.Type - -) = apply { this.type = type } - /** - * @param locale Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: \"{LanguageCode}-{CountryCode}\".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. - */ - fun locale(locale: - kotlin.String -) = apply { this.locale = locale } - /** - * @param pointOfSupply The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. - */ - fun pointOfSupply(pointOfSupply: GetFeedDownloadUrlOperationParams.PointOfSupply - -) = apply { this.pointOfSupply = pointOfSupply } - /** - * @param lodgingType The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. - */ - fun lodgingType(lodgingType: GetFeedDownloadUrlOperationParams.LodgingType - -) = apply { this.lodgingType = lodgingType } - /** - * @param brand The downloadable files provided after specifying will only contain property information for that brand. - */ - fun brand(brand: GetFeedDownloadUrlOperationParams.Brand - -) = apply { this.brand = brand } - - fun build(): GetFeedDownloadUrlOperationParams { - val params = GetFeedDownloadUrlOperationParams( - type = type!!, - locale = locale, - pointOfSupply = pointOfSupply, - lodgingType = lodgingType, - brand = brand - ) - - return params - } -} - -fun toBuilder() = Builder( - type = type, - locale = locale, - pointOfSupply = pointOfSupply, - lodgingType = lodgingType, - brand = brand -) - - - - - fun getQueryParams(): List = - buildList { - type?.let { - val key = "type" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - locale?.let { - val key = "locale" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - pointOfSupply?.let { - val key = "pointOfSupply" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - lodgingType?.let { - val key = "lodgingType" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - brand?.let { - val key = "brand" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) } } - - - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt index dc5c60c82..aa2a05f52 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperation.kt @@ -1,58 +1,39 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIGatewayError - import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse - import com.expediagroup.sdk.xap.models.LodgingErrors - - /** - * Get availability calendars of properties - * @property params [GetLodgingAvailabilityCalendarsOperationParams] - */ - class GetLodgingAvailabilityCalendarsOperation( - private val params: GetLodgingAvailabilityCalendarsOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/lodging/availabilityCalendars" - - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get availability calendars of properties + * @property params [GetLodgingAvailabilityCalendarsOperationParams] + */ +class GetLodgingAvailabilityCalendarsOperation( + private val params: GetLodgingAvailabilityCalendarsOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/lodging/availabilityCalendars" + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt index 53bfed045..702152cee 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingAvailabilityCalendarsOperationParams.kt @@ -1,148 +1,96 @@ package com.expediagroup.sdk.xap.operations - - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - -import com.expediagroup.sdk.xap.models.APIGatewayError -import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse -import com.expediagroup.sdk.xap.models.LodgingErrors - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - * @property propertyIds Comma-separated list of Expedia Property IDs. The API request supports a maximum of 50 Property IDs in a single request. - */ - @JsonDeserialize(builder = GetLodgingAvailabilityCalendarsOperationParams.Builder::class) - data class GetLodgingAvailabilityCalendarsOperationParams( - val partnerTransactionId: - kotlin.String - - , - val propertyIds: kotlin.collections.Set - < - - kotlin.String - > - -? - = null - - ) { - - init { - require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - - - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String -? = null - , - @JsonProperty("propertyIds") private var propertyIds: kotlin.collections.Set - < - - kotlin.String - > -? = null - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + * @property propertyIds Comma-separated list of Expedia Property IDs. The API request supports a maximum of 50 Property IDs in a single request. + */ +@JsonDeserialize(builder = GetLodgingAvailabilityCalendarsOperationParams.Builder::class) +data class GetLodgingAvailabilityCalendarsOperationParams( + val partnerTransactionId: kotlin.String, + val propertyIds: kotlin.collections.Set< + kotlin.String, + >? = + null, ) { - /** - * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - */ - fun partnerTransactionId(partnerTransactionId: - kotlin.String -) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param propertyIds Comma-separated list of Expedia Property IDs. The API request supports a maximum of 50 Property IDs in a single request. - */ - fun propertyIds(propertyIds: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.propertyIds = propertyIds } - - fun build(): GetLodgingAvailabilityCalendarsOperationParams { - val params = GetLodgingAvailabilityCalendarsOperationParams( - partnerTransactionId = partnerTransactionId!!, - propertyIds = propertyIds - ) - - return params + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } } -} -fun toBuilder() = Builder( - partnerTransactionId = partnerTransactionId, - propertyIds = propertyIds -) + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("propertyIds") private var propertyIds: kotlin.collections.Set< + kotlin.String, + >? = null, + ) { + /** + * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + */ + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - fun getHeaders(): Headers { -return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) + /** + * @param propertyIds Comma-separated list of Expedia Property IDs. The API request supports a maximum of 50 Property IDs in a single request. + */ + fun propertyIds( + propertyIds: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.propertyIds = propertyIds } + + fun build(): GetLodgingAvailabilityCalendarsOperationParams { + val params = + GetLodgingAvailabilityCalendarsOperationParams( + partnerTransactionId = partnerTransactionId!!, + propertyIds = propertyIds, + ) + + return params + } } - add("Accept", "application/vnd.exp-lodging.v3+json") -}.build() -} - fun getQueryParams(): List = - buildList { - propertyIds?.let { - val key = "propertyIds" - val value = buildList { - addAll(it) - } + fun toBuilder() = + Builder( + partnerTransactionId = partnerTransactionId, + propertyIds = propertyIds, + ) - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-lodging.v3+json") + }.build() + + fun getQueryParams(): List = + buildList { + propertyIds?.let { + val key = "propertyIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } } } - - - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt index e69d6177c..1bade7bf1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperation.kt @@ -1,64 +1,46 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIGatewayError - import com.expediagroup.sdk.xap.models.Errors - import com.expediagroup.sdk.xap.models.HotelDetailsResponse - - /** - * Get Extended information with a single property offer - * @property params [GetLodgingDetailsOperationParams] - */ - class GetLodgingDetailsOperation( - private val params: GetLodgingDetailsOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/hotels/details/{offerToken}" - - - url = url.replace( - oldValue = "{" + "offerToken" + "}", - newValue = this.params.offerToken, - ignoreCase = true - ) - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.HotelDetailsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get Extended information with a single property offer + * @property params [GetLodgingDetailsOperationParams] + */ +class GetLodgingDetailsOperation( + private val params: GetLodgingDetailsOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/hotels/details/{offerToken}" + + url = + url.replace( + oldValue = "{" + "offerToken" + "}", + newValue = this.params.offerToken, + ignoreCase = true, + ) + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt index 6c399d9d7..232adb6d1 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingDetailsOperationParams.kt @@ -1,344 +1,221 @@ package com.expediagroup.sdk.xap.operations +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property offerToken A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated string of multiple values that defines a hotel offer. + * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + * @property price The total price of the selected property. This value will be used to determine if there is a price change between the details and booking request. The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details API response. + * @property currency Value should be a standard ISO 3 letter currency code. The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from the Lodging Listing API response. The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details response. + * @property locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. The `locale` value used in the Lodging Details API query should match the `locale` value that was used in the Lodging Search API query. + * @property imageSizes Indicate what size of image will be returned. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. + * @property groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. + */ +@JsonDeserialize(builder = GetLodgingDetailsOperationParams.Builder::class) +data class GetLodgingDetailsOperationParams( + val offerToken: kotlin.String, + val partnerTransactionId: kotlin.String, + val price: kotlin.String? = + null, + val currency: kotlin.String? = + null, + val locale: kotlin.String? = + null, + val imageSizes: GetLodgingDetailsOperationParams.ImageSizes? = + ImageSizes.T, + val groupedAmenities: kotlin.Boolean? = + null, +) { + init { + require(offerToken != null) { "offerToken must not be null" } - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - -import com.expediagroup.sdk.xap.models.APIGatewayError -import com.expediagroup.sdk.xap.models.Errors -import com.expediagroup.sdk.xap.models.HotelDetailsResponse - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property offerToken A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated string of multiple values that defines a hotel offer. - * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - * @property price The total price of the selected property. This value will be used to determine if there is a price change between the details and booking request. The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details API response. - * @property currency Value should be a standard ISO 3 letter currency code. The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from the Lodging Listing API response. The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details response. - * @property locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. The `locale` value used in the Lodging Details API query should match the `locale` value that was used in the Lodging Search API query. - * @property imageSizes Indicate what size of image will be returned. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. - * @property groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. - */ - @JsonDeserialize(builder = GetLodgingDetailsOperationParams.Builder::class) - data class GetLodgingDetailsOperationParams( - val offerToken: - kotlin.String - - , - val partnerTransactionId: - kotlin.String - - , - val price: - kotlin.String - -? - = null -, - val currency: - kotlin.String - -? - = null -, - val locale: - kotlin.String - -? - = null -, - val imageSizes: GetLodgingDetailsOperationParams.ImageSizes - - -? - = - ImageSizes.T -, - val groupedAmenities: - kotlin.Boolean - -? - = null - - ) { - - init { - require(offerToken != null) { "offerToken must not be null" } - - - - - - - - - require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } + } + companion object { + @JvmStatic + fun builder() = Builder() + } + enum class ImageSizes( + val value: kotlin.String, + ) { + T("t"), + S("s"), + B("b"), + Y("y"), + Z("z"), + } + class Builder( + @JsonProperty("offerToken") private var offerToken: kotlin.String? = null, + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("price") private var price: kotlin.String? = null, + @JsonProperty("currency") private var currency: kotlin.String? = null, + @JsonProperty("locale") private var locale: kotlin.String? = null, + @JsonProperty("imageSizes") private var imageSizes: GetLodgingDetailsOperationParams.ImageSizes? = null, + @JsonProperty("groupedAmenities") private var groupedAmenities: kotlin.Boolean? = null, + ) { + /** + * @param offerToken A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated string of multiple values that defines a hotel offer. + */ + fun offerToken(offerToken: kotlin.String) = apply { this.offerToken = offerToken } + /** + * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + */ + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } + /** + * @param price The total price of the selected property. This value will be used to determine if there is a price change between the details and booking request. The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details API response. + */ + fun price(price: kotlin.String) = apply { this.price = price } + /** + * @param currency Value should be a standard ISO 3 letter currency code. The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from the Lodging Listing API response. The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details response. + */ + fun currency(currency: kotlin.String) = apply { this.currency = currency } + /** + * @param locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. The `locale` value used in the Lodging Details API query should match the `locale` value that was used in the Lodging Search API query. + */ + fun locale(locale: kotlin.String) = apply { this.locale = locale } + /** + * @param imageSizes Indicate what size of image will be returned. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. + */ + fun imageSizes(imageSizes: GetLodgingDetailsOperationParams.ImageSizes) = apply { this.imageSizes = imageSizes } + /** + * @param groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. + */ + fun groupedAmenities(groupedAmenities: kotlin.Boolean) = apply { this.groupedAmenities = groupedAmenities } + + fun build(): GetLodgingDetailsOperationParams { + val params = + GetLodgingDetailsOperationParams( + offerToken = offerToken!!, + partnerTransactionId = partnerTransactionId!!, + price = price, + currency = currency, + locale = locale, + imageSizes = imageSizes, + groupedAmenities = groupedAmenities, + ) + + return params + } + } + fun toBuilder() = + Builder( + offerToken = offerToken, + partnerTransactionId = partnerTransactionId, + price = price, + currency = currency, + locale = locale, + imageSizes = imageSizes, + groupedAmenities = groupedAmenities, + ) + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-hotel.v3+json") + }.build() + + fun getQueryParams(): List = + buildList { + price?.let { + val key = "price" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - - companion object { - @JvmStatic - fun builder() = Builder() + currency?.let { + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - - enum class ImageSizes( - val value: - - kotlin.String - ) { - T("t") - , - S("s") - , - B("b") - , - Y("y") - , - Z("z") - + locale?.let { + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + imageSizes?.let { + val key = "imageSizes" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + groupedAmenities?.let { + val key = "groupedAmenities" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) } - - - class Builder( - @JsonProperty("offerToken") private var offerToken: - kotlin.String -? = null - , - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String -? = null - , - @JsonProperty("price") private var price: - kotlin.String -? = null - , - @JsonProperty("currency") private var currency: - kotlin.String -? = null - , - @JsonProperty("locale") private var locale: - kotlin.String -? = null - , - @JsonProperty("imageSizes") private var imageSizes: GetLodgingDetailsOperationParams.ImageSizes - -? = null - , - @JsonProperty("groupedAmenities") private var groupedAmenities: - kotlin.Boolean -? = null - -) { - /** - * @param offerToken A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated string of multiple values that defines a hotel offer. - */ - fun offerToken(offerToken: - kotlin.String -) = apply { this.offerToken = offerToken } - /** - * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - */ - fun partnerTransactionId(partnerTransactionId: - kotlin.String -) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param price The total price of the selected property. This value will be used to determine if there is a price change between the details and booking request. The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details API response. - */ - fun price(price: - kotlin.String -) = apply { this.price = price } - /** - * @param currency Value should be a standard ISO 3 letter currency code. The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from the Lodging Listing API response. The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned along with the Lodging Details response. - */ - fun currency(currency: - kotlin.String -) = apply { this.currency = currency } - /** - * @param locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. The `locale` value used in the Lodging Details API query should match the `locale` value that was used in the Lodging Search API query. - */ - fun locale(locale: - kotlin.String -) = apply { this.locale = locale } - /** - * @param imageSizes Indicate what size of image will be returned. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. - */ - fun imageSizes(imageSizes: GetLodgingDetailsOperationParams.ImageSizes - -) = apply { this.imageSizes = imageSizes } - /** - * @param groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. - */ - fun groupedAmenities(groupedAmenities: - kotlin.Boolean -) = apply { this.groupedAmenities = groupedAmenities } - - fun build(): GetLodgingDetailsOperationParams { - val params = GetLodgingDetailsOperationParams( - offerToken = offerToken!!, - partnerTransactionId = partnerTransactionId!!, - price = price, - currency = currency, - locale = locale, - imageSizes = imageSizes, - groupedAmenities = groupedAmenities - ) - - return params - } -} - -fun toBuilder() = Builder( - offerToken = offerToken, - partnerTransactionId = partnerTransactionId, - price = price, - currency = currency, - locale = locale, - imageSizes = imageSizes, - groupedAmenities = groupedAmenities -) - - - fun getHeaders(): Headers { -return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-hotel.v3+json") -}.build() -} - - fun getQueryParams(): List = - buildList { - price?.let { - val key = "price" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - currency?.let { - val key = "currency" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - locale?.let { - val key = "locale" - val value = buildList { - add(it) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - imageSizes?.let { - val key = "imageSizes" - val value = buildList { - add(it.value) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - groupedAmenities?.let { - val key = "groupedAmenities" - val value = buildList { - add(it.toString()) - } - - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) } -} - fun getPathParams() : Map { -return buildMap { - offerToken?.also { - put("offerToken", offerToken) + fun getPathParams(): Map = + buildMap { + offerToken?.also { + put("offerToken", offerToken) + } } - } } - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt index cad8c329d..f96cdfed9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperation.kt @@ -1,58 +1,39 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIGatewayError - import com.expediagroup.sdk.xap.models.Errors - import com.expediagroup.sdk.xap.models.HotelListingsResponse - - /** - * Search lodging inventory - * @property params [GetLodgingListingsOperationParams] - */ - class GetLodgingListingsOperation( - private val params: GetLodgingListingsOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/hotels/listings" - - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.HotelListingsResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Search lodging inventory + * @property params [GetLodgingListingsOperationParams] + */ +class GetLodgingListingsOperation( + private val params: GetLodgingListingsOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/hotels/listings" + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt index deb042889..aa7a37249 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt @@ -1,2352 +1,1544 @@ package com.expediagroup.sdk.xap.operations - - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - -import com.expediagroup.sdk.xap.models.APIGatewayError -import com.expediagroup.sdk.xap.models.Errors -import com.expediagroup.sdk.xap.models.HotelListingsResponse - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - * @property ecomHotelIds Comma-separated list of Expedia hotel IDs. There can be no spaces between parameters. - * @property hcomHotelIds Comma-separated list of Hotels.com hotel IDs. There can be no spaces between parameters. - * @property geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. There can be no spaces between parameters. This parameter should be used in combination with the radius and unit parameters below. - * @property radius The size of the search radius around a specified point when searching by `geoLocation`, `locationKeyword`, or `regionids`. `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` if not specified. `radius` must be less than 200 km or 124 mi. This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, or `regionids` parameters.\" - * @property unit The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. Valid units are `km` and `mi`. This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, or `regionids`. - * @property locationKeyword A keyword search for a location. The keyword can be a city, address, airport or a landmark. This parameter should be used in combination with the `radius` and `unit` parameters above to define a circle around the landmark. The default radius value is 25 if not specified. Combined search is not supported, if more than one search method is included in the request, an error will be returned. - * @property regionIds Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. Search returns set of all hotels in the combined regions. You may search using a string of 1 - 10 Region ID's. More than 10 Region ID's are not supported and will generate and error. You can get the complete list of Expedia Region IDs from [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). This parameter could be used in combination with the `radius` and `unit` parameters above to define a circle around the `regionIds`. The default radius value is 0 if not specified. - * @property checkIn Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - * @property checkOut Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - * @property locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. If not specified in the query, the native language for that POS will be returned. And if more than one language is supported, the response will be returned in the first language depending on the language setting of the POS. - * @property currency Value should be a standard ISO 3 letter currency code. - * @property source Indicate the source where the request is coming from. - * @property travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. - * @property contentDetails This parameter is optional and can be specified as the following values. - lowest - low (default) - medium - high ### *lowest* Returns the absolute minimum response for up to 1,000 hotels: - Count(Count of hotels that are actually returned) - TotalHotelCount(Count of hotels that are requested) - TransactionId - StayDates - LengthOfStay - NumberOfRooms - Occupants - ***Hotels*** - Id - Status - Links - ***RoomTypes*** - RoomKey [Deprecated] - OfferId - RatePlanType - ***RatePlans*** - RoomTypeId - RatePlanId - RateRuleId - InventorySourceId - RemainingCount - Price - MemberOnlyDeal - Promotions - PaymentMethod - FullDepositUponBooking - PaymentSchedule - CancellationPolicy - Price - BaseRate - TaxesAndFees - TotalPrice - TotalStrikeOutPrice - AvgNightlyRate - AvgNightlyStrikeOutRate - AvgNightlyRateWithFees - AvgNightlyStrikeOutRateWithFees - HotelMandatoryFees - TotalPriceWithHotelFees - NightlyRates - TaxesAndFeesDetails - RefundableDamageDeposit This minimal response is the best for partners that store static hotel location data locally, and who would like to have the smallest and fastest API response. ### *low* Returns basic hotel information in response for up to 1,000 hotels. Includes all elements returned when `contentDetails=lowest` plus: - ***Hotels*** - Name - PropertyType - PropertyDetails - LocalCurrencyCode - Location - Distance - Description(may not be localized) - ChainAndBrandInfo - ThumbnailUrl - StarRating - GuestRating - GuestReviewCount - PetFriendly - LgbtqiaFriendly - ImportantNotices - ***RoomTypes*** - Description - ***RatePlans*** - InventorySourceCode - PaymentTime - ReserveWithDeposit - FreeInternet - FreeWiFi - FreeParking - FreeBreakfast ### *medium* Returns more complete hotel information in response for up to 200 hotels. Includes all elements returned when `contentDetails=low` plus: - ***Hotels*** - HotelAmenities - RoomAmenities - ***RoomTypes*** - ***RatePlans*** - FreeInternetDetails - FreeBreakfastDetails - Amenities - Amenities **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. ### *high* Returns extended hotel information in response for up to 5 hotels. Includes all elements returned when `contentDetails=medium` plus: - ***Hotels*** - RenovationsAndClosures - Policies - OptionalExtras - Media - Accessibility - ***RoomTypes*** - SmokingOption - BedTypeOptions - RoomOccupancyPolicy - Media **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. - * @property allRoomTypes Returns all available rate plans for the selected hotels. This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. - * @property links Comma-separated list to specify the types of deep links. - WD (link to Web Details site) - WS (link to Web Search Result page) - AD (link for Details API) - RC (link for RateCalendar API) - WEB (include all website links) - API (links for Details and RateCalendar API) There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. When requesting API deeplinks you will receive both a RateCalendar API link at the property level, and Details API links at the room level, since the Lodging Details API only displays information on rate plan offers. When requesting AD deeplinks, you will only receive Details API links at the room level. `Links` node in property-level will be omitted. If you are looking for more complete details on a single property via the API, you should do another search in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only return details on a specific room offer for specific dates. - * @property minStarRating The minimum star rating for hotels returned in the response. - * @property maxStarRating The maximum star rating for hotels returned in the response. - * @property limit The maximum number of hotels returned in the response. Must be an integer greater than 0. If the value is greater than 1000, only the first 1000 hotels are returned. Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden and a lower number of hotels to be returned. The `limit` parameter is intended to be used to control the response size, but partners should be careful about combining it with other filter parameters, as each parameter that you add will shrink the response, even to the point where you may even get a \"no hotel found\" error if none of the hotels in the base response meet the combined filter requirements. Filters are cumulative in effect, and results must meet all filter requirements to be displayed. - * @property queryText Query text is used for a full text search of hotel data. Text search based on hotel name, description, address, promotion description, amenities description. - * @property availOnly Specifies whether to return only available hotels in the search results. If the value of this parameter is true, the search results will only return hotels that have availability during the requested dates. If there are no hotels with availability in your search then an empty record set will be returned. This parameter is ignored for dateless searches. - * @property smokingPreference Specifies smoking preference. - * @property rateType Indicate which type of `paymentMethod` for each room will be returned. - * @property imageSizes Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when `contentDetails=high`. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. - * @property thumbnailImageSize Indicate what size of image will be used for the single `thumbnail` image that is returned when `contentDetails` is set to `low`, `medium` or `high`. The available thumbnail image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `thumbnailImageSize` is specified, the t size images will be returned. if no thumbnail image found, it would not return thumbnail image. Only one thumbnail image size is allowed. - * @property includedPropertyTypeIds Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - * @property excludedPropertyTypeIds Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - * @property includedInventorySourceIds Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory sources. Query with the `includedInventorySourceIds` parameter included will only return listings from the requested inventory sources. All others will be left out. `includedInventorySourceId=24` will return only Expedia lodging inventory. `includedInventorySourceId=83` will return only Vrbo lodging inventory. `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. - * @property freeCancellation Specifies whether to return only free cancelable room rates in the search results. If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. This parameter is ignored for dateless searches. - * @property groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. - * @property blockFullDepositRateplan Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. This parameter is ignored for dateless search. - * @property ratePlanType **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account Manager if you need this parameter. To specify the desired rate plan types. The options are: - standalone : Ask for standalone rates - package : Ask for package rates, but standalone rate also may be returned if available. Otherwise only standalone rate plans will be returned. `WebSearchResult` and `WebDetails` links won't be returned for package rate. - * @property sortType Specifies the field that the search results will be ordered by. To be used in conjunction with sortOrder parameter below. **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. - * @property sortOrder Specifies the sort order of search results. If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. To be used in conjunction with the `sortType` parameter above. - * @property room1Adults Specifies the number of adults staying in a specific room. Default value is one room with 2 adults. Example: `room1.adults` is used to specify the number of adults in the first room. - * @property room1ChildAges Comma-separated list that specifies the age(s) for each of the children in each of the rooms. Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. Children must be accompanied by an adult. - * @property room2Adults Specifies the number of adults staying in second room. - * @property room2ChildAges Comma-separated list that specifies the age(s) for each of the children in second room. - * @property room3Adults Specifies the number of adults staying in third room. - * @property room3ChildAges Comma-separated list that specifies the age(s) for each of the children in third room. - * @property room4Adults Specifies the number of adults staying in fourth room. - * @property room4ChildAges Comma-separated list that specifies the age(s) for each of the children in fourth room. - * @property room5Adults Specifies the number of adults staying in fifth room. - * @property room5ChildAges Comma-separated list that specifies the age(s) for each of the children in fifth room. - * @property room6Adults Specifies the number of adults staying in sixth room. - * @property room6ChildAges Comma-separated list that specifies the age(s) for each of the children in sixth room. - * @property room7Adults Specifies the number of adults staying in seventh room. - * @property room7ChildAges Comma-separated list that specifies the age(s) for each of the children in seventh room. - * @property room8Adults Specifies the number of adults staying in eighth room. - * @property room8ChildAges Comma-separated list that specifies the age(s) for each of the children in eighth room. - */ - @JsonDeserialize(builder = GetLodgingListingsOperationParams.Builder::class) - data class GetLodgingListingsOperationParams( - val partnerTransactionId: - kotlin.String - - , - val ecomHotelIds: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val hcomHotelIds: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val geoLocation: - kotlin.String - -? - = null -, - val radius: - kotlin.Long - -? - = - 25L -, - val unit: GetLodgingListingsOperationParams.Unit - - -? - = - Unit.KM -, - val locationKeyword: - kotlin.String - -? - = null -, - val regionIds: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val checkIn: - java.time.LocalDate - -? - = null -, - val checkOut: - java.time.LocalDate - -? - = null -, - val locale: - kotlin.String - -? - = null -, - val currency: - kotlin.String - -? - = null -, - val source: GetLodgingListingsOperationParams.Source - - -? - = - Source.BROWSER -, - val travelWithPets: - kotlin.Boolean - -? - = - false -, - val contentDetails: GetLodgingListingsOperationParams.ContentDetails - - -? - = - ContentDetails.LOW -, - val allRoomTypes: - kotlin.Boolean - -? - = - false -, - val links: kotlin.collections.List - < - GetLodgingListingsOperationParams.Links - - > - -? - = null -, - val minStarRating: GetLodgingListingsOperationParams.MinStarRating - - -? - = null -, - val maxStarRating: GetLodgingListingsOperationParams.MaxStarRating - - -? - = null -, - val limit: - kotlin.Long - -? - = null -, - val queryText: - kotlin.String - -? - = null -, - val availOnly: - kotlin.Boolean - -? - = null -, - val smokingPreference: GetLodgingListingsOperationParams.SmokingPreference - - -? - = null -, - val rateType: GetLodgingListingsOperationParams.RateType - - -? - = null -, - val imageSizes: GetLodgingListingsOperationParams.ImageSizes - - -? - = null -, - val thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize - - -? - = null -, - val includedPropertyTypeIds: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val excludedPropertyTypeIds: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val includedInventorySourceIds: kotlin.collections.Set - < - - kotlin.String - > - -? - = null -, - val freeCancellation: - kotlin.Boolean - -? - = null -, - val groupedAmenities: - kotlin.Boolean - -? - = null -, - val blockFullDepositRateplan: - kotlin.Boolean - -? - = - false -, - val ratePlanType: GetLodgingListingsOperationParams.RatePlanType - - -? - = null -, - val sortType: GetLodgingListingsOperationParams.SortType - - -? - = null -, - val sortOrder: GetLodgingListingsOperationParams.SortOrder - - -? - = - SortOrder.ASC -, - val room1Adults: - kotlin.Long - -? - = null -, - val room1ChildAges: kotlin.collections.List - < - - kotlin.String - > - -? - = null -, - val room2Adults: - kotlin.Long - -? - = null -, - val room2ChildAges: kotlin.collections.List - < - - kotlin.String - > - -? - = null -, - val room3Adults: - kotlin.Long - -? - = null -, - val room3ChildAges: kotlin.collections.List - < - - kotlin.String - > - -? - = null -, - val room4Adults: - kotlin.Long - -? - = null -, - val room4ChildAges: kotlin.collections.List - < - - kotlin.String - > - -? - = null -, - val room5Adults: - kotlin.Long - -? - = null -, - val room5ChildAges: kotlin.collections.List - < - - kotlin.String - > - -? - = null -, - val room6Adults: - kotlin.Long - -? - = null -, - val room6ChildAges: kotlin.collections.List - < - - kotlin.String - > - -? - = null -, - val room7Adults: - kotlin.Long - -? - = null -, - val room7ChildAges: kotlin.collections.List - < - - kotlin.String - > - -? - = null -, - val room8Adults: - kotlin.Long - -? - = null -, - val room8ChildAges: kotlin.collections.List - < - - kotlin.String - > - -? - = null - - ) { - - init { - require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - enum class Unit( - val value: - - kotlin.String - ) { - KM("km") - , - MI("mi") - - } - enum class Source( - val value: - - kotlin.String - ) { - BROWSER("browser") - , - MOBILEAPP("mobileapp") - - } - enum class ContentDetails( - val value: - - kotlin.String - ) { - LOWEST("lowest") - , - LOW("low") - , - MEDIUM("medium") - , - HIGH("high") - - } - enum class Links( - val value: - kotlin.String - - ) { - WD("WD") - , - WS("WS") - , - AD("AD") - , - RC("RC") - , - WEB("WEB") - , - API("API") - - } - enum class MinStarRating( - val value: - - kotlin.String - ) { - _1_PERIOD0("1.0") - , - _1_PERIOD5("1.5") - , - _2_PERIOD0("2.0") - , - _2_PERIOD5("2.5") - , - _3_PERIOD0("3.0") - , - _3_PERIOD5("3.5") - , - _4_PERIOD0("4.0") - , - _4_PERIOD5("4.5") - , - _5_PERIOD0("5.0") - - } - enum class MaxStarRating( - val value: - - kotlin.String - ) { - _1_PERIOD0("1.0") - , - _1_PERIOD5("1.5") - , - _2_PERIOD0("2.0") - , - _2_PERIOD5("2.5") - , - _3_PERIOD0("3.0") - , - _3_PERIOD5("3.5") - , - _4_PERIOD0("4.0") - , - _4_PERIOD5("4.5") - , - _5_PERIOD0("5.0") - - } - enum class SmokingPreference( - val value: - - kotlin.String - ) { - SMOKING("smoking") - , - NONSMOKING("nonsmoking") - , - BOTH("both") - - } - enum class RateType( - val value: - - kotlin.String - ) { - PAYONLINE("payonline") - , - PAYHOTEL("payhotel") - , - ALL("all") - - } - enum class ImageSizes( - val value: - - kotlin.String - ) { - T("t") - , - S("s") - , - B("b") - , - Y("y") - , - Z("z") - - } - enum class ThumbnailImageSize( - val value: - - kotlin.String - ) { - T("t") - , - S("s") - , - B("b") - , - Y("y") - , - Z("z") - - } - enum class RatePlanType( - val value: - - kotlin.String - ) { - STANDALONE("standalone") - , - PACKAGE("package") - - } - enum class SortType( - val value: - - kotlin.String - ) { - PRICE("price") - , - STARRATING("starrating") - , - AVGRATE("avgrate") - , - DEALS("deals") - , - GUESTRATING("guestrating") - , - HOTELNAME("hotelname") - , - DISTANCE("distance") - , - TOTALPRICEWITHFEES("totalpricewithfees") - - } - enum class SortOrder( - val value: - - kotlin.String - ) { - ASC("asc") - , - DESC("desc") - - } - - - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String -? = null - , - @JsonProperty("ecomHotelIds") private var ecomHotelIds: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("hcomHotelIds") private var hcomHotelIds: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("geoLocation") private var geoLocation: - kotlin.String -? = null - , - @JsonProperty("radius") private var radius: - kotlin.Long -? = null - , - @JsonProperty("unit") private var unit: GetLodgingListingsOperationParams.Unit - -? = null - , - @JsonProperty("locationKeyword") private var locationKeyword: - kotlin.String -? = null - , - @JsonProperty("regionIds") private var regionIds: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("checkIn") private var checkIn: - java.time.LocalDate -? = null - , - @JsonProperty("checkOut") private var checkOut: - java.time.LocalDate -? = null - , - @JsonProperty("locale") private var locale: - kotlin.String -? = null - , - @JsonProperty("currency") private var currency: - kotlin.String -? = null - , - @JsonProperty("source") private var source: GetLodgingListingsOperationParams.Source - -? = null - , - @JsonProperty("travelWithPets") private var travelWithPets: - kotlin.Boolean -? = null - , - @JsonProperty("contentDetails") private var contentDetails: GetLodgingListingsOperationParams.ContentDetails - -? = null - , - @JsonProperty("allRoomTypes") private var allRoomTypes: - kotlin.Boolean -? = null - , - @JsonProperty("links") private var links: kotlin.collections.List - < - GetLodgingListingsOperationParams.Links - - > -? = null - , - @JsonProperty("minStarRating") private var minStarRating: GetLodgingListingsOperationParams.MinStarRating - -? = null - , - @JsonProperty("maxStarRating") private var maxStarRating: GetLodgingListingsOperationParams.MaxStarRating - -? = null - , - @JsonProperty("limit") private var limit: - kotlin.Long -? = null - , - @JsonProperty("queryText") private var queryText: - kotlin.String -? = null - , - @JsonProperty("availOnly") private var availOnly: - kotlin.Boolean -? = null - , - @JsonProperty("smokingPreference") private var smokingPreference: GetLodgingListingsOperationParams.SmokingPreference - -? = null - , - @JsonProperty("rateType") private var rateType: GetLodgingListingsOperationParams.RateType - -? = null - , - @JsonProperty("imageSizes") private var imageSizes: GetLodgingListingsOperationParams.ImageSizes - -? = null - , - @JsonProperty("thumbnailImageSize") private var thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize - -? = null - , - @JsonProperty("includedPropertyTypeIds") private var includedPropertyTypeIds: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("excludedPropertyTypeIds") private var excludedPropertyTypeIds: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("includedInventorySourceIds") private var includedInventorySourceIds: kotlin.collections.Set - < - - kotlin.String - > -? = null - , - @JsonProperty("freeCancellation") private var freeCancellation: - kotlin.Boolean -? = null - , - @JsonProperty("groupedAmenities") private var groupedAmenities: - kotlin.Boolean -? = null - , - @JsonProperty("blockFullDepositRateplan") private var blockFullDepositRateplan: - kotlin.Boolean -? = null - , - @JsonProperty("ratePlanType") private var ratePlanType: GetLodgingListingsOperationParams.RatePlanType - -? = null - , - @JsonProperty("sortType") private var sortType: GetLodgingListingsOperationParams.SortType - -? = null - , - @JsonProperty("sortOrder") private var sortOrder: GetLodgingListingsOperationParams.SortOrder - -? = null - , - @JsonProperty("room1.adults") private var room1Adults: - kotlin.Long -? = null - , - @JsonProperty("room1.childAges") private var room1ChildAges: kotlin.collections.List - < - - kotlin.String - > -? = null - , - @JsonProperty("room2.adults") private var room2Adults: - kotlin.Long -? = null - , - @JsonProperty("room2.childAges") private var room2ChildAges: kotlin.collections.List - < - - kotlin.String - > -? = null - , - @JsonProperty("room3.adults") private var room3Adults: - kotlin.Long -? = null - , - @JsonProperty("room3.childAges") private var room3ChildAges: kotlin.collections.List - < - - kotlin.String - > -? = null - , - @JsonProperty("room4.adults") private var room4Adults: - kotlin.Long -? = null - , - @JsonProperty("room4.childAges") private var room4ChildAges: kotlin.collections.List - < - - kotlin.String - > -? = null - , - @JsonProperty("room5.adults") private var room5Adults: - kotlin.Long -? = null - , - @JsonProperty("room5.childAges") private var room5ChildAges: kotlin.collections.List - < - - kotlin.String - > -? = null - , - @JsonProperty("room6.adults") private var room6Adults: - kotlin.Long -? = null - , - @JsonProperty("room6.childAges") private var room6ChildAges: kotlin.collections.List - < - - kotlin.String - > -? = null - , - @JsonProperty("room7.adults") private var room7Adults: - kotlin.Long -? = null - , - @JsonProperty("room7.childAges") private var room7ChildAges: kotlin.collections.List - < - - kotlin.String - > -? = null - , - @JsonProperty("room8.adults") private var room8Adults: - kotlin.Long -? = null - , - @JsonProperty("room8.childAges") private var room8ChildAges: kotlin.collections.List - < - - kotlin.String - > -? = null - -) { - /** - * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - */ - fun partnerTransactionId(partnerTransactionId: - kotlin.String -) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param ecomHotelIds Comma-separated list of Expedia hotel IDs. There can be no spaces between parameters. - */ - fun ecomHotelIds(ecomHotelIds: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.ecomHotelIds = ecomHotelIds } - /** - * @param hcomHotelIds Comma-separated list of Hotels.com hotel IDs. There can be no spaces between parameters. - */ - fun hcomHotelIds(hcomHotelIds: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.hcomHotelIds = hcomHotelIds } - /** - * @param geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. There can be no spaces between parameters. This parameter should be used in combination with the radius and unit parameters below. - */ - fun geoLocation(geoLocation: - kotlin.String -) = apply { this.geoLocation = geoLocation } - /** - * @param radius The size of the search radius around a specified point when searching by `geoLocation`, `locationKeyword`, or `regionids`. `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` if not specified. `radius` must be less than 200 km or 124 mi. This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, or `regionids` parameters.\" - */ - fun radius(radius: - kotlin.Long -) = apply { this.radius = radius } - /** - * @param unit The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. Valid units are `km` and `mi`. This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, or `regionids`. - */ - fun unit(unit: GetLodgingListingsOperationParams.Unit - -) = apply { this.unit = unit } - /** - * @param locationKeyword A keyword search for a location. The keyword can be a city, address, airport or a landmark. This parameter should be used in combination with the `radius` and `unit` parameters above to define a circle around the landmark. The default radius value is 25 if not specified. Combined search is not supported, if more than one search method is included in the request, an error will be returned. - */ - fun locationKeyword(locationKeyword: - kotlin.String -) = apply { this.locationKeyword = locationKeyword } - /** - * @param regionIds Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. Search returns set of all hotels in the combined regions. You may search using a string of 1 - 10 Region ID's. More than 10 Region ID's are not supported and will generate and error. You can get the complete list of Expedia Region IDs from [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). This parameter could be used in combination with the `radius` and `unit` parameters above to define a circle around the `regionIds`. The default radius value is 0 if not specified. - */ - fun regionIds(regionIds: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.regionIds = regionIds } - /** - * @param checkIn Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - */ - fun checkIn(checkIn: - java.time.LocalDate -) = apply { this.checkIn = checkIn } - /** - * @param checkOut Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. - */ - fun checkOut(checkOut: - java.time.LocalDate -) = apply { this.checkOut = checkOut } - /** - * @param locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. If not specified in the query, the native language for that POS will be returned. And if more than one language is supported, the response will be returned in the first language depending on the language setting of the POS. - */ - fun locale(locale: - kotlin.String -) = apply { this.locale = locale } - /** - * @param currency Value should be a standard ISO 3 letter currency code. - */ - fun currency(currency: - kotlin.String -) = apply { this.currency = currency } - /** - * @param source Indicate the source where the request is coming from. - */ - fun source(source: GetLodgingListingsOperationParams.Source - -) = apply { this.source = source } - /** - * @param travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. - */ - fun travelWithPets(travelWithPets: - kotlin.Boolean -) = apply { this.travelWithPets = travelWithPets } - /** - * @param contentDetails This parameter is optional and can be specified as the following values. - lowest - low (default) - medium - high ### *lowest* Returns the absolute minimum response for up to 1,000 hotels: - Count(Count of hotels that are actually returned) - TotalHotelCount(Count of hotels that are requested) - TransactionId - StayDates - LengthOfStay - NumberOfRooms - Occupants - ***Hotels*** - Id - Status - Links - ***RoomTypes*** - RoomKey [Deprecated] - OfferId - RatePlanType - ***RatePlans*** - RoomTypeId - RatePlanId - RateRuleId - InventorySourceId - RemainingCount - Price - MemberOnlyDeal - Promotions - PaymentMethod - FullDepositUponBooking - PaymentSchedule - CancellationPolicy - Price - BaseRate - TaxesAndFees - TotalPrice - TotalStrikeOutPrice - AvgNightlyRate - AvgNightlyStrikeOutRate - AvgNightlyRateWithFees - AvgNightlyStrikeOutRateWithFees - HotelMandatoryFees - TotalPriceWithHotelFees - NightlyRates - TaxesAndFeesDetails - RefundableDamageDeposit This minimal response is the best for partners that store static hotel location data locally, and who would like to have the smallest and fastest API response. ### *low* Returns basic hotel information in response for up to 1,000 hotels. Includes all elements returned when `contentDetails=lowest` plus: - ***Hotels*** - Name - PropertyType - PropertyDetails - LocalCurrencyCode - Location - Distance - Description(may not be localized) - ChainAndBrandInfo - ThumbnailUrl - StarRating - GuestRating - GuestReviewCount - PetFriendly - LgbtqiaFriendly - ImportantNotices - ***RoomTypes*** - Description - ***RatePlans*** - InventorySourceCode - PaymentTime - ReserveWithDeposit - FreeInternet - FreeWiFi - FreeParking - FreeBreakfast ### *medium* Returns more complete hotel information in response for up to 200 hotels. Includes all elements returned when `contentDetails=low` plus: - ***Hotels*** - HotelAmenities - RoomAmenities - ***RoomTypes*** - ***RatePlans*** - FreeInternetDetails - FreeBreakfastDetails - Amenities - Amenities **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. ### *high* Returns extended hotel information in response for up to 5 hotels. Includes all elements returned when `contentDetails=medium` plus: - ***Hotels*** - RenovationsAndClosures - Policies - OptionalExtras - Media - Accessibility - ***RoomTypes*** - SmokingOption - BedTypeOptions - RoomOccupancyPolicy - Media **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. - */ - fun contentDetails(contentDetails: GetLodgingListingsOperationParams.ContentDetails - -) = apply { this.contentDetails = contentDetails } - /** - * @param allRoomTypes Returns all available rate plans for the selected hotels. This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. - */ - fun allRoomTypes(allRoomTypes: - kotlin.Boolean -) = apply { this.allRoomTypes = allRoomTypes } - /** - * @param links Comma-separated list to specify the types of deep links. - WD (link to Web Details site) - WS (link to Web Search Result page) - AD (link for Details API) - RC (link for RateCalendar API) - WEB (include all website links) - API (links for Details and RateCalendar API) There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. When requesting API deeplinks you will receive both a RateCalendar API link at the property level, and Details API links at the room level, since the Lodging Details API only displays information on rate plan offers. When requesting AD deeplinks, you will only receive Details API links at the room level. `Links` node in property-level will be omitted. If you are looking for more complete details on a single property via the API, you should do another search in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only return details on a specific room offer for specific dates. - */ - fun links(links: kotlin.collections.List - < - GetLodgingListingsOperationParams.Links - - > -) = apply { this.links = links } - /** - * @param minStarRating The minimum star rating for hotels returned in the response. - */ - fun minStarRating(minStarRating: GetLodgingListingsOperationParams.MinStarRating - -) = apply { this.minStarRating = minStarRating } - /** - * @param maxStarRating The maximum star rating for hotels returned in the response. - */ - fun maxStarRating(maxStarRating: GetLodgingListingsOperationParams.MaxStarRating - -) = apply { this.maxStarRating = maxStarRating } - /** - * @param limit The maximum number of hotels returned in the response. Must be an integer greater than 0. If the value is greater than 1000, only the first 1000 hotels are returned. Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden and a lower number of hotels to be returned. The `limit` parameter is intended to be used to control the response size, but partners should be careful about combining it with other filter parameters, as each parameter that you add will shrink the response, even to the point where you may even get a \"no hotel found\" error if none of the hotels in the base response meet the combined filter requirements. Filters are cumulative in effect, and results must meet all filter requirements to be displayed. - */ - fun limit(limit: - kotlin.Long -) = apply { this.limit = limit } - /** - * @param queryText Query text is used for a full text search of hotel data. Text search based on hotel name, description, address, promotion description, amenities description. - */ - fun queryText(queryText: - kotlin.String -) = apply { this.queryText = queryText } - /** - * @param availOnly Specifies whether to return only available hotels in the search results. If the value of this parameter is true, the search results will only return hotels that have availability during the requested dates. If there are no hotels with availability in your search then an empty record set will be returned. This parameter is ignored for dateless searches. - */ - fun availOnly(availOnly: - kotlin.Boolean -) = apply { this.availOnly = availOnly } - /** - * @param smokingPreference Specifies smoking preference. - */ - fun smokingPreference(smokingPreference: GetLodgingListingsOperationParams.SmokingPreference - -) = apply { this.smokingPreference = smokingPreference } - /** - * @param rateType Indicate which type of `paymentMethod` for each room will be returned. - */ - fun rateType(rateType: GetLodgingListingsOperationParams.RateType - -) = apply { this.rateType = rateType } - /** - * @param imageSizes Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when `contentDetails=high`. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. - */ - fun imageSizes(imageSizes: GetLodgingListingsOperationParams.ImageSizes - -) = apply { this.imageSizes = imageSizes } - /** - * @param thumbnailImageSize Indicate what size of image will be used for the single `thumbnail` image that is returned when `contentDetails` is set to `low`, `medium` or `high`. The available thumbnail image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `thumbnailImageSize` is specified, the t size images will be returned. if no thumbnail image found, it would not return thumbnail image. Only one thumbnail image size is allowed. - */ - fun thumbnailImageSize(thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize - -) = apply { this.thumbnailImageSize = thumbnailImageSize } - /** - * @param includedPropertyTypeIds Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - */ - fun includedPropertyTypeIds(includedPropertyTypeIds: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.includedPropertyTypeIds = includedPropertyTypeIds } - /** - * @param excludedPropertyTypeIds Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). - */ - fun excludedPropertyTypeIds(excludedPropertyTypeIds: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.excludedPropertyTypeIds = excludedPropertyTypeIds } - /** - * @param includedInventorySourceIds Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory sources. Query with the `includedInventorySourceIds` parameter included will only return listings from the requested inventory sources. All others will be left out. `includedInventorySourceId=24` will return only Expedia lodging inventory. `includedInventorySourceId=83` will return only Vrbo lodging inventory. `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. - */ - fun includedInventorySourceIds(includedInventorySourceIds: kotlin.collections.Set - < - - kotlin.String - > -) = apply { this.includedInventorySourceIds = includedInventorySourceIds } - /** - * @param freeCancellation Specifies whether to return only free cancelable room rates in the search results. If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. This parameter is ignored for dateless searches. - */ - fun freeCancellation(freeCancellation: - kotlin.Boolean -) = apply { this.freeCancellation = freeCancellation } - /** - * @param groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. - */ - fun groupedAmenities(groupedAmenities: - kotlin.Boolean -) = apply { this.groupedAmenities = groupedAmenities } - /** - * @param blockFullDepositRateplan Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. This parameter is ignored for dateless search. - */ - fun blockFullDepositRateplan(blockFullDepositRateplan: - kotlin.Boolean -) = apply { this.blockFullDepositRateplan = blockFullDepositRateplan } - /** - * @param ratePlanType **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account Manager if you need this parameter. To specify the desired rate plan types. The options are: - standalone : Ask for standalone rates - package : Ask for package rates, but standalone rate also may be returned if available. Otherwise only standalone rate plans will be returned. `WebSearchResult` and `WebDetails` links won't be returned for package rate. - */ - fun ratePlanType(ratePlanType: GetLodgingListingsOperationParams.RatePlanType - -) = apply { this.ratePlanType = ratePlanType } - /** - * @param sortType Specifies the field that the search results will be ordered by. To be used in conjunction with sortOrder parameter below. **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. - */ - fun sortType(sortType: GetLodgingListingsOperationParams.SortType - -) = apply { this.sortType = sortType } - /** - * @param sortOrder Specifies the sort order of search results. If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. To be used in conjunction with the `sortType` parameter above. - */ - fun sortOrder(sortOrder: GetLodgingListingsOperationParams.SortOrder - -) = apply { this.sortOrder = sortOrder } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fun rooms(rooms: List) = - apply { - if (rooms.size > 8) { - throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( - constraintViolations = listOf("rooms: size must be between 0 and 8") - ) - } - - rooms.elementAtOrNull(0)?.let { - this.room1Adults = it.adults - this.room1ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(1)?.let { - this.room2Adults = it.adults - this.room2ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(2)?.let { - this.room3Adults = it.adults - this.room3ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(3)?.let { - this.room4Adults = it.adults - this.room4ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(4)?.let { - this.room5Adults = it.adults - this.room5ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(5)?.let { - this.room6Adults = it.adults - this.room6ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(6)?.let { - this.room7Adults = it.adults - this.room7ChildAges = it.childAges?.map { item -> item.toString() } - } - - rooms.elementAtOrNull(7)?.let { - this.room8Adults = it.adults - this.room8ChildAges = it.childAges?.map { item -> item.toString() } - } +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + * @property ecomHotelIds Comma-separated list of Expedia hotel IDs. There can be no spaces between parameters. + * @property hcomHotelIds Comma-separated list of Hotels.com hotel IDs. There can be no spaces between parameters. + * @property geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. There can be no spaces between parameters. This parameter should be used in combination with the radius and unit parameters below. + * @property radius The size of the search radius around a specified point when searching by `geoLocation`, `locationKeyword`, or `regionids`. `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` if not specified. `radius` must be less than 200 km or 124 mi. This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, or `regionids` parameters.\" + * @property unit The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. Valid units are `km` and `mi`. This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, or `regionids`. + * @property locationKeyword A keyword search for a location. The keyword can be a city, address, airport or a landmark. This parameter should be used in combination with the `radius` and `unit` parameters above to define a circle around the landmark. The default radius value is 25 if not specified. Combined search is not supported, if more than one search method is included in the request, an error will be returned. + * @property regionIds Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. Search returns set of all hotels in the combined regions. You may search using a string of 1 - 10 Region ID's. More than 10 Region ID's are not supported and will generate and error. You can get the complete list of Expedia Region IDs from [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). This parameter could be used in combination with the `radius` and `unit` parameters above to define a circle around the `regionIds`. The default radius value is 0 if not specified. + * @property checkIn Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + * @property checkOut Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + * @property locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. If not specified in the query, the native language for that POS will be returned. And if more than one language is supported, the response will be returned in the first language depending on the language setting of the POS. + * @property currency Value should be a standard ISO 3 letter currency code. + * @property source Indicate the source where the request is coming from. + * @property travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. + * @property contentDetails This parameter is optional and can be specified as the following values. - lowest - low (default) - medium - high ### *lowest* Returns the absolute minimum response for up to 1,000 hotels: - Count(Count of hotels that are actually returned) - TotalHotelCount(Count of hotels that are requested) - TransactionId - StayDates - LengthOfStay - NumberOfRooms - Occupants - ***Hotels*** - Id - Status - Links - ***RoomTypes*** - RoomKey [Deprecated] - OfferId - RatePlanType - ***RatePlans*** - RoomTypeId - RatePlanId - RateRuleId - InventorySourceId - RemainingCount - Price - MemberOnlyDeal - Promotions - PaymentMethod - FullDepositUponBooking - PaymentSchedule - CancellationPolicy - Price - BaseRate - TaxesAndFees - TotalPrice - TotalStrikeOutPrice - AvgNightlyRate - AvgNightlyStrikeOutRate - AvgNightlyRateWithFees - AvgNightlyStrikeOutRateWithFees - HotelMandatoryFees - TotalPriceWithHotelFees - NightlyRates - TaxesAndFeesDetails - RefundableDamageDeposit This minimal response is the best for partners that store static hotel location data locally, and who would like to have the smallest and fastest API response. ### *low* Returns basic hotel information in response for up to 1,000 hotels. Includes all elements returned when `contentDetails=lowest` plus: - ***Hotels*** - Name - PropertyType - PropertyDetails - LocalCurrencyCode - Location - Distance - Description(may not be localized) - ChainAndBrandInfo - ThumbnailUrl - StarRating - GuestRating - GuestReviewCount - PetFriendly - LgbtqiaFriendly - ImportantNotices - ***RoomTypes*** - Description - ***RatePlans*** - InventorySourceCode - PaymentTime - ReserveWithDeposit - FreeInternet - FreeWiFi - FreeParking - FreeBreakfast ### *medium* Returns more complete hotel information in response for up to 200 hotels. Includes all elements returned when `contentDetails=low` plus: - ***Hotels*** - HotelAmenities - RoomAmenities - ***RoomTypes*** - ***RatePlans*** - FreeInternetDetails - FreeBreakfastDetails - Amenities - Amenities **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. ### *high* Returns extended hotel information in response for up to 5 hotels. Includes all elements returned when `contentDetails=medium` plus: - ***Hotels*** - RenovationsAndClosures - Policies - OptionalExtras - Media - Accessibility - ***RoomTypes*** - SmokingOption - BedTypeOptions - RoomOccupancyPolicy - Media **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. + * @property allRoomTypes Returns all available rate plans for the selected hotels. This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. + * @property links Comma-separated list to specify the types of deep links. - WD (link to Web Details site) - WS (link to Web Search Result page) - AD (link for Details API) - RC (link for RateCalendar API) - WEB (include all website links) - API (links for Details and RateCalendar API) There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. When requesting API deeplinks you will receive both a RateCalendar API link at the property level, and Details API links at the room level, since the Lodging Details API only displays information on rate plan offers. When requesting AD deeplinks, you will only receive Details API links at the room level. `Links` node in property-level will be omitted. If you are looking for more complete details on a single property via the API, you should do another search in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only return details on a specific room offer for specific dates. + * @property minStarRating The minimum star rating for hotels returned in the response. + * @property maxStarRating The maximum star rating for hotels returned in the response. + * @property limit The maximum number of hotels returned in the response. Must be an integer greater than 0. If the value is greater than 1000, only the first 1000 hotels are returned. Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden and a lower number of hotels to be returned. The `limit` parameter is intended to be used to control the response size, but partners should be careful about combining it with other filter parameters, as each parameter that you add will shrink the response, even to the point where you may even get a \"no hotel found\" error if none of the hotels in the base response meet the combined filter requirements. Filters are cumulative in effect, and results must meet all filter requirements to be displayed. + * @property queryText Query text is used for a full text search of hotel data. Text search based on hotel name, description, address, promotion description, amenities description. + * @property availOnly Specifies whether to return only available hotels in the search results. If the value of this parameter is true, the search results will only return hotels that have availability during the requested dates. If there are no hotels with availability in your search then an empty record set will be returned. This parameter is ignored for dateless searches. + * @property smokingPreference Specifies smoking preference. + * @property rateType Indicate which type of `paymentMethod` for each room will be returned. + * @property imageSizes Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when `contentDetails=high`. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. + * @property thumbnailImageSize Indicate what size of image will be used for the single `thumbnail` image that is returned when `contentDetails` is set to `low`, `medium` or `high`. The available thumbnail image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `thumbnailImageSize` is specified, the t size images will be returned. if no thumbnail image found, it would not return thumbnail image. Only one thumbnail image size is allowed. + * @property includedPropertyTypeIds Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + * @property excludedPropertyTypeIds Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + * @property includedInventorySourceIds Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory sources. Query with the `includedInventorySourceIds` parameter included will only return listings from the requested inventory sources. All others will be left out. `includedInventorySourceId=24` will return only Expedia lodging inventory. `includedInventorySourceId=83` will return only Vrbo lodging inventory. `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. + * @property freeCancellation Specifies whether to return only free cancelable room rates in the search results. If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. This parameter is ignored for dateless searches. + * @property groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. + * @property blockFullDepositRateplan Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. This parameter is ignored for dateless search. + * @property ratePlanType **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account Manager if you need this parameter. To specify the desired rate plan types. The options are: - standalone : Ask for standalone rates - package : Ask for package rates, but standalone rate also may be returned if available. Otherwise only standalone rate plans will be returned. `WebSearchResult` and `WebDetails` links won't be returned for package rate. + * @property sortType Specifies the field that the search results will be ordered by. To be used in conjunction with sortOrder parameter below. **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. + * @property sortOrder Specifies the sort order of search results. If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. To be used in conjunction with the `sortType` parameter above. + * @property room1Adults Specifies the number of adults staying in a specific room. Default value is one room with 2 adults. Example: `room1.adults` is used to specify the number of adults in the first room. + * @property room1ChildAges Comma-separated list that specifies the age(s) for each of the children in each of the rooms. Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. Children must be accompanied by an adult. + * @property room2Adults Specifies the number of adults staying in second room. + * @property room2ChildAges Comma-separated list that specifies the age(s) for each of the children in second room. + * @property room3Adults Specifies the number of adults staying in third room. + * @property room3ChildAges Comma-separated list that specifies the age(s) for each of the children in third room. + * @property room4Adults Specifies the number of adults staying in fourth room. + * @property room4ChildAges Comma-separated list that specifies the age(s) for each of the children in fourth room. + * @property room5Adults Specifies the number of adults staying in fifth room. + * @property room5ChildAges Comma-separated list that specifies the age(s) for each of the children in fifth room. + * @property room6Adults Specifies the number of adults staying in sixth room. + * @property room6ChildAges Comma-separated list that specifies the age(s) for each of the children in sixth room. + * @property room7Adults Specifies the number of adults staying in seventh room. + * @property room7ChildAges Comma-separated list that specifies the age(s) for each of the children in seventh room. + * @property room8Adults Specifies the number of adults staying in eighth room. + * @property room8ChildAges Comma-separated list that specifies the age(s) for each of the children in eighth room. + */ +@JsonDeserialize(builder = GetLodgingListingsOperationParams.Builder::class) +data class GetLodgingListingsOperationParams( + val partnerTransactionId: kotlin.String, + val ecomHotelIds: kotlin.collections.Set< + kotlin.String, + >? = + null, + val hcomHotelIds: kotlin.collections.Set< + kotlin.String, + >? = + null, + val geoLocation: kotlin.String? = + null, + val radius: kotlin.Long? = + 25L, + val unit: GetLodgingListingsOperationParams.Unit? = + Unit.KM, + val locationKeyword: kotlin.String? = + null, + val regionIds: kotlin.collections.Set< + kotlin.String, + >? = + null, + val checkIn: java.time.LocalDate? = + null, + val checkOut: java.time.LocalDate? = + null, + val locale: kotlin.String? = + null, + val currency: kotlin.String? = + null, + val source: GetLodgingListingsOperationParams.Source? = + Source.BROWSER, + val travelWithPets: kotlin.Boolean? = + false, + val contentDetails: GetLodgingListingsOperationParams.ContentDetails? = + ContentDetails.LOW, + val allRoomTypes: kotlin.Boolean? = + false, + val links: kotlin.collections.List< + GetLodgingListingsOperationParams.Links, + >? = + null, + val minStarRating: GetLodgingListingsOperationParams.MinStarRating? = + null, + val maxStarRating: GetLodgingListingsOperationParams.MaxStarRating? = + null, + val limit: kotlin.Long? = + null, + val queryText: kotlin.String? = + null, + val availOnly: kotlin.Boolean? = + null, + val smokingPreference: GetLodgingListingsOperationParams.SmokingPreference? = + null, + val rateType: GetLodgingListingsOperationParams.RateType? = + null, + val imageSizes: GetLodgingListingsOperationParams.ImageSizes? = + null, + val thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize? = + null, + val includedPropertyTypeIds: kotlin.collections.Set< + kotlin.String, + >? = + null, + val excludedPropertyTypeIds: kotlin.collections.Set< + kotlin.String, + >? = + null, + val includedInventorySourceIds: kotlin.collections.Set< + kotlin.String, + >? = + null, + val freeCancellation: kotlin.Boolean? = + null, + val groupedAmenities: kotlin.Boolean? = + null, + val blockFullDepositRateplan: kotlin.Boolean? = + false, + val ratePlanType: GetLodgingListingsOperationParams.RatePlanType? = + null, + val sortType: GetLodgingListingsOperationParams.SortType? = + null, + val sortOrder: GetLodgingListingsOperationParams.SortOrder? = + SortOrder.ASC, + val room1Adults: kotlin.Long? = + null, + val room1ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room2Adults: kotlin.Long? = + null, + val room2ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room3Adults: kotlin.Long? = + null, + val room3ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room4Adults: kotlin.Long? = + null, + val room4ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room5Adults: kotlin.Long? = + null, + val room5ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room6Adults: kotlin.Long? = + null, + val room6ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room7Adults: kotlin.Long? = + null, + val room7ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room8Adults: kotlin.Long? = + null, + val room8ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, +) { + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } } -fun build(): GetLodgingListingsOperationParams { - val params = GetLodgingListingsOperationParams( - partnerTransactionId = partnerTransactionId!!, - ecomHotelIds = ecomHotelIds, - hcomHotelIds = hcomHotelIds, - geoLocation = geoLocation, - radius = radius, - unit = unit, - locationKeyword = locationKeyword, - regionIds = regionIds, - checkIn = checkIn, - checkOut = checkOut, - locale = locale, - currency = currency, - source = source, - travelWithPets = travelWithPets, - contentDetails = contentDetails, - allRoomTypes = allRoomTypes, - links = links, - minStarRating = minStarRating, - maxStarRating = maxStarRating, - limit = limit, - queryText = queryText, - availOnly = availOnly, - smokingPreference = smokingPreference, - rateType = rateType, - imageSizes = imageSizes, - thumbnailImageSize = thumbnailImageSize, - includedPropertyTypeIds = includedPropertyTypeIds, - excludedPropertyTypeIds = excludedPropertyTypeIds, - includedInventorySourceIds = includedInventorySourceIds, - freeCancellation = freeCancellation, - groupedAmenities = groupedAmenities, - blockFullDepositRateplan = blockFullDepositRateplan, - ratePlanType = ratePlanType, - sortType = sortType, - sortOrder = sortOrder, - room1Adults = room1Adults, - room1ChildAges = room1ChildAges, - room2Adults = room2Adults, - room2ChildAges = room2ChildAges, - room3Adults = room3Adults, - room3ChildAges = room3ChildAges, - room4Adults = room4Adults, - room4ChildAges = room4ChildAges, - room5Adults = room5Adults, - room5ChildAges = room5ChildAges, - room6Adults = room6Adults, - room6ChildAges = room6ChildAges, - room7Adults = room7Adults, - room7ChildAges = room7ChildAges, - room8Adults = room8Adults, - room8ChildAges = room8ChildAges - ) - - return params + companion object { + @JvmStatic + fun builder() = Builder() } -} -fun toBuilder() = Builder( - partnerTransactionId = partnerTransactionId, - ecomHotelIds = ecomHotelIds, - hcomHotelIds = hcomHotelIds, - geoLocation = geoLocation, - radius = radius, - unit = unit, - locationKeyword = locationKeyword, - regionIds = regionIds, - checkIn = checkIn, - checkOut = checkOut, - locale = locale, - currency = currency, - source = source, - travelWithPets = travelWithPets, - contentDetails = contentDetails, - allRoomTypes = allRoomTypes, - links = links, - minStarRating = minStarRating, - maxStarRating = maxStarRating, - limit = limit, - queryText = queryText, - availOnly = availOnly, - smokingPreference = smokingPreference, - rateType = rateType, - imageSizes = imageSizes, - thumbnailImageSize = thumbnailImageSize, - includedPropertyTypeIds = includedPropertyTypeIds, - excludedPropertyTypeIds = excludedPropertyTypeIds, - includedInventorySourceIds = includedInventorySourceIds, - freeCancellation = freeCancellation, - groupedAmenities = groupedAmenities, - blockFullDepositRateplan = blockFullDepositRateplan, - ratePlanType = ratePlanType, - sortType = sortType, - sortOrder = sortOrder, - room1Adults = room1Adults, - room1ChildAges = room1ChildAges, - room2Adults = room2Adults, - room2ChildAges = room2ChildAges, - room3Adults = room3Adults, - room3ChildAges = room3ChildAges, - room4Adults = room4Adults, - room4ChildAges = room4ChildAges, - room5Adults = room5Adults, - room5ChildAges = room5ChildAges, - room6Adults = room6Adults, - room6ChildAges = room6ChildAges, - room7Adults = room7Adults, - room7ChildAges = room7ChildAges, - room8Adults = room8Adults, - room8ChildAges = room8ChildAges -) - - - fun getHeaders(): Headers { -return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) + enum class Unit( + val value: kotlin.String, + ) { + KM("km"), + MI("mi"), } - add("Accept", "application/vnd.exp-hotel.v3+json") -}.build() -} - - fun getQueryParams(): List = - buildList { - ecomHotelIds?.let { - val key = "ecomHotelIds" - val value = buildList { - addAll(it) - } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - hcomHotelIds?.let { - val key = "hcomHotelIds" - val value = buildList { - addAll(it) - } + enum class Source( + val value: kotlin.String, + ) { + BROWSER("browser"), + MOBILEAPP("mobileapp"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - geoLocation?.let { - val key = "geoLocation" - val value = buildList { - add(it) - } + enum class ContentDetails( + val value: kotlin.String, + ) { + LOWEST("lowest"), + LOW("low"), + MEDIUM("medium"), + HIGH("high"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - radius?.let { - val key = "radius" - val value = buildList { - add(it.toString()) - } + enum class Links( + val value: kotlin.String, + ) { + WD("WD"), + WS("WS"), + AD("AD"), + RC("RC"), + WEB("WEB"), + API("API"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - unit?.let { - val key = "unit" - val value = buildList { - add(it.value) - } + enum class MinStarRating( + val value: kotlin.String, + ) { + _1_PERIOD0("1.0"), + _1_PERIOD5("1.5"), + _2_PERIOD0("2.0"), + _2_PERIOD5("2.5"), + _3_PERIOD0("3.0"), + _3_PERIOD5("3.5"), + _4_PERIOD0("4.0"), + _4_PERIOD5("4.5"), + _5_PERIOD0("5.0"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - locationKeyword?.let { - val key = "locationKeyword" - val value = buildList { - add(it) - } + enum class MaxStarRating( + val value: kotlin.String, + ) { + _1_PERIOD0("1.0"), + _1_PERIOD5("1.5"), + _2_PERIOD0("2.0"), + _2_PERIOD5("2.5"), + _3_PERIOD0("3.0"), + _3_PERIOD5("3.5"), + _4_PERIOD0("4.0"), + _4_PERIOD5("4.5"), + _5_PERIOD0("5.0"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - regionIds?.let { - val key = "regionIds" - val value = buildList { - addAll(it) - } + enum class SmokingPreference( + val value: kotlin.String, + ) { + SMOKING("smoking"), + NONSMOKING("nonsmoking"), + BOTH("both"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - checkIn?.let { - val key = "checkIn" - val value = buildList { - add(it.toString()) - } + enum class RateType( + val value: kotlin.String, + ) { + PAYONLINE("payonline"), + PAYHOTEL("payhotel"), + ALL("all"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - checkOut?.let { - val key = "checkOut" - val value = buildList { - add(it.toString()) - } + enum class ImageSizes( + val value: kotlin.String, + ) { + T("t"), + S("s"), + B("b"), + Y("y"), + Z("z"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - locale?.let { - val key = "locale" - val value = buildList { - add(it) - } + enum class ThumbnailImageSize( + val value: kotlin.String, + ) { + T("t"), + S("s"), + B("b"), + Y("y"), + Z("z"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - currency?.let { - val key = "currency" - val value = buildList { - add(it) - } + enum class RatePlanType( + val value: kotlin.String, + ) { + STANDALONE("standalone"), + PACKAGE("package"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - source?.let { - val key = "source" - val value = buildList { - add(it.value) - } + enum class SortType( + val value: kotlin.String, + ) { + PRICE("price"), + STARRATING("starrating"), + AVGRATE("avgrate"), + DEALS("deals"), + GUESTRATING("guestrating"), + HOTELNAME("hotelname"), + DISTANCE("distance"), + TOTALPRICEWITHFEES("totalpricewithfees"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - travelWithPets?.let { - val key = "travelWithPets" - val value = buildList { - add(it.toString()) - } + enum class SortOrder( + val value: kotlin.String, + ) { + ASC("asc"), + DESC("desc"), + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - contentDetails?.let { - val key = "contentDetails" - val value = buildList { - add(it.value) - } + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("ecomHotelIds") private var ecomHotelIds: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("hcomHotelIds") private var hcomHotelIds: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("geoLocation") private var geoLocation: kotlin.String? = null, + @JsonProperty("radius") private var radius: kotlin.Long? = null, + @JsonProperty("unit") private var unit: GetLodgingListingsOperationParams.Unit? = null, + @JsonProperty("locationKeyword") private var locationKeyword: kotlin.String? = null, + @JsonProperty("regionIds") private var regionIds: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("checkIn") private var checkIn: java.time.LocalDate? = null, + @JsonProperty("checkOut") private var checkOut: java.time.LocalDate? = null, + @JsonProperty("locale") private var locale: kotlin.String? = null, + @JsonProperty("currency") private var currency: kotlin.String? = null, + @JsonProperty("source") private var source: GetLodgingListingsOperationParams.Source? = null, + @JsonProperty("travelWithPets") private var travelWithPets: kotlin.Boolean? = null, + @JsonProperty("contentDetails") private var contentDetails: GetLodgingListingsOperationParams.ContentDetails? = null, + @JsonProperty("allRoomTypes") private var allRoomTypes: kotlin.Boolean? = null, + @JsonProperty("links") private var links: kotlin.collections.List< + GetLodgingListingsOperationParams.Links, + >? = null, + @JsonProperty("minStarRating") private var minStarRating: GetLodgingListingsOperationParams.MinStarRating? = null, + @JsonProperty("maxStarRating") private var maxStarRating: GetLodgingListingsOperationParams.MaxStarRating? = null, + @JsonProperty("limit") private var limit: kotlin.Long? = null, + @JsonProperty("queryText") private var queryText: kotlin.String? = null, + @JsonProperty("availOnly") private var availOnly: kotlin.Boolean? = null, + @JsonProperty("smokingPreference") private var smokingPreference: GetLodgingListingsOperationParams.SmokingPreference? = null, + @JsonProperty("rateType") private var rateType: GetLodgingListingsOperationParams.RateType? = null, + @JsonProperty("imageSizes") private var imageSizes: GetLodgingListingsOperationParams.ImageSizes? = null, + @JsonProperty("thumbnailImageSize") private var thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize? = null, + @JsonProperty("includedPropertyTypeIds") private var includedPropertyTypeIds: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("excludedPropertyTypeIds") private var excludedPropertyTypeIds: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("includedInventorySourceIds") private var includedInventorySourceIds: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("freeCancellation") private var freeCancellation: kotlin.Boolean? = null, + @JsonProperty("groupedAmenities") private var groupedAmenities: kotlin.Boolean? = null, + @JsonProperty("blockFullDepositRateplan") private var blockFullDepositRateplan: kotlin.Boolean? = null, + @JsonProperty("ratePlanType") private var ratePlanType: GetLodgingListingsOperationParams.RatePlanType? = null, + @JsonProperty("sortType") private var sortType: GetLodgingListingsOperationParams.SortType? = null, + @JsonProperty("sortOrder") private var sortOrder: GetLodgingListingsOperationParams.SortOrder? = null, + @JsonProperty("room1.adults") private var room1Adults: kotlin.Long? = null, + @JsonProperty("room1.childAges") private var room1ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room2.adults") private var room2Adults: kotlin.Long? = null, + @JsonProperty("room2.childAges") private var room2ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room3.adults") private var room3Adults: kotlin.Long? = null, + @JsonProperty("room3.childAges") private var room3ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room4.adults") private var room4Adults: kotlin.Long? = null, + @JsonProperty("room4.childAges") private var room4ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room5.adults") private var room5Adults: kotlin.Long? = null, + @JsonProperty("room5.childAges") private var room5ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room6.adults") private var room6Adults: kotlin.Long? = null, + @JsonProperty("room6.childAges") private var room6ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room7.adults") private var room7Adults: kotlin.Long? = null, + @JsonProperty("room7.childAges") private var room7ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room8.adults") private var room8Adults: kotlin.Long? = null, + @JsonProperty("room8.childAges") private var room8ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + ) { + /** + * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + */ + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - allRoomTypes?.let { - val key = "allRoomTypes" - val value = buildList { - add(it.toString()) - } + /** + * @param ecomHotelIds Comma-separated list of Expedia hotel IDs. There can be no spaces between parameters. + */ + fun ecomHotelIds( + ecomHotelIds: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.ecomHotelIds = ecomHotelIds } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - links?.let { - val key = "links" - val value = buildList { - addAll(it.map { it.value }) - } + /** + * @param hcomHotelIds Comma-separated list of Hotels.com hotel IDs. There can be no spaces between parameters. + */ + fun hcomHotelIds( + hcomHotelIds: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.hcomHotelIds = hcomHotelIds } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - minStarRating?.let { - val key = "minStarRating" - val value = buildList { - add(it.value) - } + /** + * @param geoLocation The latitude and longitude values identifying the center point of a search radius (circle). North latitude will be represented by a positive value. South latitude by a negative value. East longitude will be represented by a positive value. West longitude by a negative value. The latitude and longitude values are joined together with a comma (,) character. There can be no spaces between parameters. This parameter should be used in combination with the radius and unit parameters below. + */ + fun geoLocation(geoLocation: kotlin.String) = apply { this.geoLocation = geoLocation } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - maxStarRating?.let { - val key = "maxStarRating" - val value = buildList { - add(it.value) - } + /** + * @param radius The size of the search radius around a specified point when searching by `geoLocation`, `locationKeyword`, or `regionids`. `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` if not specified. `radius` must be less than 200 km or 124 mi. This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, or `regionids` parameters.\" + */ + fun radius(radius: kotlin.Long) = apply { this.radius = radius } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - limit?.let { - val key = "limit" - val value = buildList { - add(it.toString()) - } + /** + * @param unit The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. Valid units are `km` and `mi`. This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, or `regionids`. + */ + fun unit(unit: GetLodgingListingsOperationParams.Unit) = apply { this.unit = unit } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - queryText?.let { - val key = "queryText" - val value = buildList { - add(it) - } + /** + * @param locationKeyword A keyword search for a location. The keyword can be a city, address, airport or a landmark. This parameter should be used in combination with the `radius` and `unit` parameters above to define a circle around the landmark. The default radius value is 25 if not specified. Combined search is not supported, if more than one search method is included in the request, an error will be returned. + */ + fun locationKeyword(locationKeyword: kotlin.String) = apply { this.locationKeyword = locationKeyword } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - availOnly?.let { - val key = "availOnly" - val value = buildList { - add(it.toString()) - } + /** + * @param regionIds Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. Search returns set of all hotels in the combined regions. You may search using a string of 1 - 10 Region ID's. More than 10 Region ID's are not supported and will generate and error. You can get the complete list of Expedia Region IDs from [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). This parameter could be used in combination with the `radius` and `unit` parameters above to define a circle around the `regionIds`. The default radius value is 0 if not specified. + */ + fun regionIds( + regionIds: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.regionIds = regionIds } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - smokingPreference?.let { - val key = "smokingPreference" - val value = buildList { - add(it.value) - } + /** + * @param checkIn Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkOut` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + */ + fun checkIn(checkIn: java.time.LocalDate) = apply { this.checkIn = checkIn } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - rateType?.let { - val key = "rateType" - val value = buildList { - add(it.value) - } + /** + * @param checkOut Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. This parameter should be used in combination with the `checkIn` parameter. If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns a `Featured Offer` for each of the hotels found. If one of `checkIn` and `checkOut` is not included, an error will be returned. The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + */ + fun checkOut(checkOut: java.time.LocalDate) = apply { this.checkOut = checkOut } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - imageSizes?.let { - val key = "imageSizes" - val value = buildList { - add(it.value) - } + /** + * @param locale `locale` is composed of language identifier and region identifier, connected by \"_\" that specifies the language in which the response will be returned. You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. If not specified in the query, the native language for that POS will be returned. And if more than one language is supported, the response will be returned in the first language depending on the language setting of the POS. + */ + fun locale(locale: kotlin.String) = apply { this.locale = locale } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - thumbnailImageSize?.let { - val key = "thumbnailImageSize" - val value = buildList { - add(it.value) - } + /** + * @param currency Value should be a standard ISO 3 letter currency code. + */ + fun currency(currency: kotlin.String) = apply { this.currency = currency } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - includedPropertyTypeIds?.let { - val key = "includedPropertyTypeIds" - val value = buildList { - addAll(it) - } + /** + * @param source Indicate the source where the request is coming from. + */ + fun source(source: GetLodgingListingsOperationParams.Source) = apply { this.source = source } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - excludedPropertyTypeIds?.let { - val key = "excludedPropertyTypeIds" - val value = buildList { - addAll(it) - } + /** + * @param travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. + */ + fun travelWithPets(travelWithPets: kotlin.Boolean) = apply { this.travelWithPets = travelWithPets } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - includedInventorySourceIds?.let { - val key = "includedInventorySourceIds" - val value = buildList { - addAll(it) - } + /** + * @param contentDetails This parameter is optional and can be specified as the following values. - lowest - low (default) - medium - high ### *lowest* Returns the absolute minimum response for up to 1,000 hotels: - Count(Count of hotels that are actually returned) - TotalHotelCount(Count of hotels that are requested) - TransactionId - StayDates - LengthOfStay - NumberOfRooms - Occupants - ***Hotels*** - Id - Status - Links - ***RoomTypes*** - RoomKey [Deprecated] - OfferId - RatePlanType - ***RatePlans*** - RoomTypeId - RatePlanId - RateRuleId - InventorySourceId - RemainingCount - Price - MemberOnlyDeal - Promotions - PaymentMethod - FullDepositUponBooking - PaymentSchedule - CancellationPolicy - Price - BaseRate - TaxesAndFees - TotalPrice - TotalStrikeOutPrice - AvgNightlyRate - AvgNightlyStrikeOutRate - AvgNightlyRateWithFees - AvgNightlyStrikeOutRateWithFees - HotelMandatoryFees - TotalPriceWithHotelFees - NightlyRates - TaxesAndFeesDetails - RefundableDamageDeposit This minimal response is the best for partners that store static hotel location data locally, and who would like to have the smallest and fastest API response. ### *low* Returns basic hotel information in response for up to 1,000 hotels. Includes all elements returned when `contentDetails=lowest` plus: - ***Hotels*** - Name - PropertyType - PropertyDetails - LocalCurrencyCode - Location - Distance - Description(may not be localized) - ChainAndBrandInfo - ThumbnailUrl - StarRating - GuestRating - GuestReviewCount - PetFriendly - LgbtqiaFriendly - ImportantNotices - ***RoomTypes*** - Description - ***RatePlans*** - InventorySourceCode - PaymentTime - ReserveWithDeposit - FreeInternet - FreeWiFi - FreeParking - FreeBreakfast ### *medium* Returns more complete hotel information in response for up to 200 hotels. Includes all elements returned when `contentDetails=low` plus: - ***Hotels*** - HotelAmenities - RoomAmenities - ***RoomTypes*** - ***RatePlans*** - FreeInternetDetails - FreeBreakfastDetails - Amenities - Amenities **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. ### *high* Returns extended hotel information in response for up to 5 hotels. Includes all elements returned when `contentDetails=medium` plus: - ***Hotels*** - RenovationsAndClosures - Policies - OptionalExtras - Media - Accessibility - ***RoomTypes*** - SmokingOption - BedTypeOptions - RoomOccupancyPolicy - Media **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. + */ + fun contentDetails(contentDetails: GetLodgingListingsOperationParams.ContentDetails) = apply { this.contentDetails = contentDetails } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - freeCancellation?.let { - val key = "freeCancellation" - val value = buildList { - add(it.toString()) - } + /** + * @param allRoomTypes Returns all available rate plans for the selected hotels. This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. + */ + fun allRoomTypes(allRoomTypes: kotlin.Boolean) = apply { this.allRoomTypes = allRoomTypes } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - groupedAmenities?.let { - val key = "groupedAmenities" - val value = buildList { - add(it.toString()) - } + /** + * @param links Comma-separated list to specify the types of deep links. - WD (link to Web Details site) - WS (link to Web Search Result page) - AD (link for Details API) - RC (link for RateCalendar API) - WEB (include all website links) - API (links for Details and RateCalendar API) There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. When requesting API deeplinks you will receive both a RateCalendar API link at the property level, and Details API links at the room level, since the Lodging Details API only displays information on rate plan offers. When requesting AD deeplinks, you will only receive Details API links at the room level. `Links` node in property-level will be omitted. If you are looking for more complete details on a single property via the API, you should do another search in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only return details on a specific room offer for specific dates. + */ + fun links( + links: kotlin.collections.List< + GetLodgingListingsOperationParams.Links, + >, + ) = apply { this.links = links } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - blockFullDepositRateplan?.let { - val key = "blockFullDepositRateplan" - val value = buildList { - add(it.toString()) - } + /** + * @param minStarRating The minimum star rating for hotels returned in the response. + */ + fun minStarRating(minStarRating: GetLodgingListingsOperationParams.MinStarRating) = apply { this.minStarRating = minStarRating } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - ratePlanType?.let { - val key = "ratePlanType" - val value = buildList { - add(it.value) - } + /** + * @param maxStarRating The maximum star rating for hotels returned in the response. + */ + fun maxStarRating(maxStarRating: GetLodgingListingsOperationParams.MaxStarRating) = apply { this.maxStarRating = maxStarRating } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - sortType?.let { - val key = "sortType" - val value = buildList { - add(it.value) - } + /** + * @param limit The maximum number of hotels returned in the response. Must be an integer greater than 0. If the value is greater than 1000, only the first 1000 hotels are returned. Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden and a lower number of hotels to be returned. The `limit` parameter is intended to be used to control the response size, but partners should be careful about combining it with other filter parameters, as each parameter that you add will shrink the response, even to the point where you may even get a \"no hotel found\" error if none of the hotels in the base response meet the combined filter requirements. Filters are cumulative in effect, and results must meet all filter requirements to be displayed. + */ + fun limit(limit: kotlin.Long) = apply { this.limit = limit } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - sortOrder?.let { - val key = "sortOrder" - val value = buildList { - add(it.value) - } + /** + * @param queryText Query text is used for a full text search of hotel data. Text search based on hotel name, description, address, promotion description, amenities description. + */ + fun queryText(queryText: kotlin.String) = apply { this.queryText = queryText } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room1Adults?.let { - val key = "room1.adults" - val value = buildList { - add(it.toString()) - } + /** + * @param availOnly Specifies whether to return only available hotels in the search results. If the value of this parameter is true, the search results will only return hotels that have availability during the requested dates. If there are no hotels with availability in your search then an empty record set will be returned. This parameter is ignored for dateless searches. + */ + fun availOnly(availOnly: kotlin.Boolean) = apply { this.availOnly = availOnly } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room1ChildAges?.let { - val key = "room1.childAges" - val value = buildList { - addAll(it) - } + /** + * @param smokingPreference Specifies smoking preference. + */ + fun smokingPreference(smokingPreference: GetLodgingListingsOperationParams.SmokingPreference) = apply { this.smokingPreference = smokingPreference } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - room2Adults?.let { - val key = "room2.adults" - val value = buildList { - add(it.toString()) - } + /** + * @param rateType Indicate which type of `paymentMethod` for each room will be returned. + */ + fun rateType(rateType: GetLodgingListingsOperationParams.RateType) = apply { this.rateType = rateType } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room2ChildAges?.let { - val key = "room2.childAges" - val value = buildList { - addAll(it) - } + /** + * @param imageSizes Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when `contentDetails=high`. The available image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `imageSizes` is specified, the t size images will be returned. If an image is missing in one size, we will try to fall back to the same image with lower resolution. (If image \"_z\" is not available, we will try to return image \"_y\", and if it is also unavailable, we will return image \"_b\", and so on.) Only one image size is allowed. + */ + fun imageSizes(imageSizes: GetLodgingListingsOperationParams.ImageSizes) = apply { this.imageSizes = imageSizes } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - room3Adults?.let { - val key = "room3.adults" - val value = buildList { - add(it.toString()) - } + /** + * @param thumbnailImageSize Indicate what size of image will be used for the single `thumbnail` image that is returned when `contentDetails` is set to `low`, `medium` or `high`. The available thumbnail image sizes are: - t : Thumbnail - s : Small - b : Big - y : 500x500v - z : 1000x1000v Resolution from smallest to largest is t < s < b < y < z. If no `thumbnailImageSize` is specified, the t size images will be returned. if no thumbnail image found, it would not return thumbnail image. Only one thumbnail image size is allowed. + */ + fun thumbnailImageSize(thumbnailImageSize: GetLodgingListingsOperationParams.ThumbnailImageSize) = apply { this.thumbnailImageSize = thumbnailImageSize } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room3ChildAges?.let { - val key = "room3.childAges" - val value = buildList { - addAll(it) - } + /** + * @param includedPropertyTypeIds Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + */ + fun includedPropertyTypeIds( + includedPropertyTypeIds: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.includedPropertyTypeIds = includedPropertyTypeIds } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - room4Adults?.let { - val key = "room4.adults" - val value = buildList { - add(it.toString()) - } + /** + * @param excludedPropertyTypeIds Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not be returned in the response. Even in this case, the filtering is still being applied, even though there is no `PropertyType` parameter in the response with which to validate. `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not contain **both** of the parameters. A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + */ + fun excludedPropertyTypeIds( + excludedPropertyTypeIds: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.excludedPropertyTypeIds = excludedPropertyTypeIds } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room4ChildAges?.let { - val key = "room4.childAges" - val value = buildList { - addAll(it) - } + /** + * @param includedInventorySourceIds Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory sources. Query with the `includedInventorySourceIds` parameter included will only return listings from the requested inventory sources. All others will be left out. `includedInventorySourceId=24` will return only Expedia lodging inventory. `includedInventorySourceId=83` will return only Vrbo lodging inventory. `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. + */ + fun includedInventorySourceIds( + includedInventorySourceIds: kotlin.collections.Set< + kotlin.String, + >, + ) = apply { this.includedInventorySourceIds = includedInventorySourceIds } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - room5Adults?.let { - val key = "room5.adults" - val value = buildList { - add(it.toString()) - } + /** + * @param freeCancellation Specifies whether to return only free cancelable room rates in the search results. If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. This parameter is ignored for dateless searches. + */ + fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room5ChildAges?.let { - val key = "room5.childAges" - val value = buildList { - addAll(it) - } + /** + * @param groupedAmenities Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` node will be returned in response, otherwise `Amenities` node will be returned. + */ + fun groupedAmenities(groupedAmenities: kotlin.Boolean) = apply { this.groupedAmenities = groupedAmenities } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - room6Adults?.let { - val key = "room6.adults" - val value = buildList { - add(it.toString()) - } + /** + * @param blockFullDepositRateplan Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. This parameter is ignored for dateless search. + */ + fun blockFullDepositRateplan(blockFullDepositRateplan: kotlin.Boolean) = apply { this.blockFullDepositRateplan = blockFullDepositRateplan } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room6ChildAges?.let { - val key = "room6.childAges" - val value = buildList { - addAll(it) - } + /** + * @param ratePlanType **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account Manager if you need this parameter. To specify the desired rate plan types. The options are: - standalone : Ask for standalone rates - package : Ask for package rates, but standalone rate also may be returned if available. Otherwise only standalone rate plans will be returned. `WebSearchResult` and `WebDetails` links won't be returned for package rate. + */ + fun ratePlanType(ratePlanType: GetLodgingListingsOperationParams.RatePlanType) = apply { this.ratePlanType = ratePlanType } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - room7Adults?.let { - val key = "room7.adults" - val value = buildList { - add(it.toString()) - } + /** + * @param sortType Specifies the field that the search results will be ordered by. To be used in conjunction with sortOrder parameter below. **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. + */ + fun sortType(sortType: GetLodgingListingsOperationParams.SortType) = apply { this.sortType = sortType } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room7ChildAges?.let { - val key = "room7.childAges" - val value = buildList { - addAll(it) - } + /** + * @param sortOrder Specifies the sort order of search results. If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. To be used in conjunction with the `sortType` parameter above. + */ + fun sortOrder(sortOrder: GetLodgingListingsOperationParams.SortOrder) = apply { this.sortOrder = sortOrder } + + fun rooms(rooms: List) = + apply { + if (rooms.size > 8) { + throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( + constraintViolations = listOf("rooms: size must be between 0 and 8"), + ) + } + + rooms.elementAtOrNull(0)?.let { + this.room1Adults = it.adults + this.room1ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(1)?.let { + this.room2Adults = it.adults + this.room2ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(2)?.let { + this.room3Adults = it.adults + this.room3ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(3)?.let { + this.room4Adults = it.adults + this.room4ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(4)?.let { + this.room5Adults = it.adults + this.room5ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(5)?.let { + this.room6Adults = it.adults + this.room6ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(6)?.let { + this.room7Adults = it.adults + this.room7ChildAges = it.childAges?.map { item -> item.toString() } + } + + rooms.elementAtOrNull(7)?.let { + this.room8Adults = it.adults + this.room8ChildAges = it.childAges?.map { item -> item.toString() } + } + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) - } - room8Adults?.let { - val key = "room8.adults" - val value = buildList { - add(it.toString()) + fun build(): GetLodgingListingsOperationParams { + val params = + GetLodgingListingsOperationParams( + partnerTransactionId = partnerTransactionId!!, + ecomHotelIds = ecomHotelIds, + hcomHotelIds = hcomHotelIds, + geoLocation = geoLocation, + radius = radius, + unit = unit, + locationKeyword = locationKeyword, + regionIds = regionIds, + checkIn = checkIn, + checkOut = checkOut, + locale = locale, + currency = currency, + source = source, + travelWithPets = travelWithPets, + contentDetails = contentDetails, + allRoomTypes = allRoomTypes, + links = links, + minStarRating = minStarRating, + maxStarRating = maxStarRating, + limit = limit, + queryText = queryText, + availOnly = availOnly, + smokingPreference = smokingPreference, + rateType = rateType, + imageSizes = imageSizes, + thumbnailImageSize = thumbnailImageSize, + includedPropertyTypeIds = includedPropertyTypeIds, + excludedPropertyTypeIds = excludedPropertyTypeIds, + includedInventorySourceIds = includedInventorySourceIds, + freeCancellation = freeCancellation, + groupedAmenities = groupedAmenities, + blockFullDepositRateplan = blockFullDepositRateplan, + ratePlanType = ratePlanType, + sortType = sortType, + sortOrder = sortOrder, + room1Adults = room1Adults, + room1ChildAges = room1ChildAges, + room2Adults = room2Adults, + room2ChildAges = room2ChildAges, + room3Adults = room3Adults, + room3ChildAges = room3ChildAges, + room4Adults = room4Adults, + room4ChildAges = room4ChildAges, + room5Adults = room5Adults, + room5ChildAges = room5ChildAges, + room6Adults = room6Adults, + room6ChildAges = room6ChildAges, + room7Adults = room7Adults, + room7ChildAges = room7ChildAges, + room8Adults = room8Adults, + room8ChildAges = room8ChildAges, + ) + + return params } + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - room8ChildAges?.let { - val key = "room8.childAges" - val value = buildList { - addAll(it) - } + fun toBuilder() = + Builder( + partnerTransactionId = partnerTransactionId, + ecomHotelIds = ecomHotelIds, + hcomHotelIds = hcomHotelIds, + geoLocation = geoLocation, + radius = radius, + unit = unit, + locationKeyword = locationKeyword, + regionIds = regionIds, + checkIn = checkIn, + checkOut = checkOut, + locale = locale, + currency = currency, + source = source, + travelWithPets = travelWithPets, + contentDetails = contentDetails, + allRoomTypes = allRoomTypes, + links = links, + minStarRating = minStarRating, + maxStarRating = maxStarRating, + limit = limit, + queryText = queryText, + availOnly = availOnly, + smokingPreference = smokingPreference, + rateType = rateType, + imageSizes = imageSizes, + thumbnailImageSize = thumbnailImageSize, + includedPropertyTypeIds = includedPropertyTypeIds, + excludedPropertyTypeIds = excludedPropertyTypeIds, + includedInventorySourceIds = includedInventorySourceIds, + freeCancellation = freeCancellation, + groupedAmenities = groupedAmenities, + blockFullDepositRateplan = blockFullDepositRateplan, + ratePlanType = ratePlanType, + sortType = sortType, + sortOrder = sortOrder, + room1Adults = room1Adults, + room1ChildAges = room1ChildAges, + room2Adults = room2Adults, + room2ChildAges = room2ChildAges, + room3Adults = room3Adults, + room3ChildAges = room3ChildAges, + room4Adults = room4Adults, + room4ChildAges = room4ChildAges, + room5Adults = room5Adults, + room5ChildAges = room5ChildAges, + room6Adults = room6Adults, + room6ChildAges = room6ChildAges, + room7Adults = room7Adults, + room7ChildAges = room7ChildAges, + room8Adults = room8Adults, + room8ChildAges = room8ChildAges, + ) - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - )) + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-hotel.v3+json") + }.build() + + fun getQueryParams(): List = + buildList { + ecomHotelIds?.let { + val key = "ecomHotelIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + hcomHotelIds?.let { + val key = "hcomHotelIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + geoLocation?.let { + val key = "geoLocation" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + radius?.let { + val key = "radius" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + unit?.let { + val key = "unit" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + locationKeyword?.let { + val key = "locationKeyword" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + regionIds?.let { + val key = "regionIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + checkIn?.let { + val key = "checkIn" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + checkOut?.let { + val key = "checkOut" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + locale?.let { + val key = "locale" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + currency?.let { + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + source?.let { + val key = "source" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + travelWithPets?.let { + val key = "travelWithPets" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + contentDetails?.let { + val key = "contentDetails" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + allRoomTypes?.let { + val key = "allRoomTypes" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + links?.let { + val key = "links" + val value = + buildList { + addAll(it.map { it.value }) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + minStarRating?.let { + val key = "minStarRating" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + maxStarRating?.let { + val key = "maxStarRating" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + limit?.let { + val key = "limit" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + queryText?.let { + val key = "queryText" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + availOnly?.let { + val key = "availOnly" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + smokingPreference?.let { + val key = "smokingPreference" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + rateType?.let { + val key = "rateType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + imageSizes?.let { + val key = "imageSizes" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + thumbnailImageSize?.let { + val key = "thumbnailImageSize" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + includedPropertyTypeIds?.let { + val key = "includedPropertyTypeIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + excludedPropertyTypeIds?.let { + val key = "excludedPropertyTypeIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + includedInventorySourceIds?.let { + val key = "includedInventorySourceIds" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + freeCancellation?.let { + val key = "freeCancellation" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + groupedAmenities?.let { + val key = "groupedAmenities" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + blockFullDepositRateplan?.let { + val key = "blockFullDepositRateplan" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + ratePlanType?.let { + val key = "ratePlanType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + sortType?.let { + val key = "sortType" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + sortOrder?.let { + val key = "sortOrder" + val value = + buildList { + add(it.value) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room1Adults?.let { + val key = "room1.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room1ChildAges?.let { + val key = "room1.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + room2Adults?.let { + val key = "room2.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room2ChildAges?.let { + val key = "room2.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + room3Adults?.let { + val key = "room3.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room3ChildAges?.let { + val key = "room3.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + room4Adults?.let { + val key = "room4.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room4ChildAges?.let { + val key = "room4.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + room5Adults?.let { + val key = "room5.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room5ChildAges?.let { + val key = "room5.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + room6Adults?.let { + val key = "room6.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room6ChildAges?.let { + val key = "room6.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + room7Adults?.let { + val key = "room7.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room7ChildAges?.let { + val key = "room7.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } + room8Adults?.let { + val key = "room8.adults" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + room8ChildAges?.let { + val key = "room8.childAges" + val value = + buildList { + addAll(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), + ) + } } } - - - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt index 24b94801c..09d31bcfa 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperation.kt @@ -1,58 +1,39 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIGatewayError - import com.expediagroup.sdk.xap.models.LodgingErrors - import com.expediagroup.sdk.xap.models.LodgingQuotesResponse - - /** - * Get properties price and availability information - * @property params [GetLodgingQuotesOperationParams] - */ - class GetLodgingQuotesOperation( - private val params: GetLodgingQuotesOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/lodging/quotes" - - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.LodgingQuotesResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get properties price and availability information + * @property params [GetLodgingQuotesOperationParams] + */ +class GetLodgingQuotesOperation( + private val params: GetLodgingQuotesOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/lodging/quotes" + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt index 3938f38e0..d87668e83 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt @@ -1,6 +1,5 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.core.http.Headers import com.expediagroup.sdk.rest.model.UrlQueryParam import com.expediagroup.sdk.rest.util.stringifyExplode @@ -35,156 +34,74 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize */ @JsonDeserialize(builder = GetLodgingQuotesOperationParams.Builder::class) data class GetLodgingQuotesOperationParams( - val partnerTransactionId: - kotlin.String, - val propertyIds: kotlin.collections.Set - < - - kotlin.String - > - - ? - = null, - val checkIn: - java.time.LocalDate - - ? - = null, - val checkOut: - java.time.LocalDate - - ? - = null, - val currency: - kotlin.String - - ? - = null, - val links: kotlin.collections.List - < - GetLodgingQuotesOperationParams.Links - - > - - ? - = null, - val travelWithPets: - kotlin.Boolean - - ? - = + val partnerTransactionId: kotlin.String, + val propertyIds: kotlin.collections.Set< + kotlin.String, + >? = + null, + val checkIn: java.time.LocalDate? = + null, + val checkOut: java.time.LocalDate? = + null, + val currency: kotlin.String? = + null, + val links: kotlin.collections.List< + GetLodgingQuotesOperationParams.Links, + >? = + null, + val travelWithPets: kotlin.Boolean? = false, - val room1Adults: - kotlin.Long - - ? - = null, - val room1ChildAges: kotlin.collections.List - < - - kotlin.String - > - - ? - = null, - val room2Adults: - kotlin.Long - - ? - = null, - val room2ChildAges: kotlin.collections.List - < - - kotlin.String - > - - ? - = null, - val room3Adults: - kotlin.Long - - ? - = null, - val room3ChildAges: kotlin.collections.List - < - - kotlin.String - > - - ? - = null, - val room4Adults: - kotlin.Long - - ? - = null, - val room4ChildAges: kotlin.collections.List - < - - kotlin.String - > - - ? - = null, - val room5Adults: - kotlin.Long - - ? - = null, - val room5ChildAges: kotlin.collections.List - < - - kotlin.String - > - - ? - = null, - val room6Adults: - kotlin.Long - - ? - = null, - val room6ChildAges: kotlin.collections.List - < - - kotlin.String - > - - ? - = null, - val room7Adults: - kotlin.Long - - ? - = null, - val room7ChildAges: kotlin.collections.List - < - - kotlin.String - > - - ? - = null, - val room8Adults: - kotlin.Long - - ? - = null, - val room8ChildAges: kotlin.collections.List - < - - kotlin.String - > - - ? - = null - + val room1Adults: kotlin.Long? = + null, + val room1ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room2Adults: kotlin.Long? = + null, + val room2ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room3Adults: kotlin.Long? = + null, + val room3ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room4Adults: kotlin.Long? = + null, + val room4ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room5Adults: kotlin.Long? = + null, + val room5ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room6Adults: kotlin.Long? = + null, + val room6ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room7Adults: kotlin.Long? = + null, + val room7ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, + val room8Adults: kotlin.Long? = + null, + val room8ChildAges: kotlin.collections.List< + kotlin.String, + >? = + null, ) { - init { require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - } companion object { @@ -193,187 +110,106 @@ data class GetLodgingQuotesOperationParams( } enum class Links( - val value: - kotlin.String - + val value: kotlin.String, ) { WD("WD"), WS("WS"), - WEB("WEB") - + WEB("WEB"), } - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String - ? = null, - @JsonProperty("propertyIds") private var propertyIds: kotlin.collections.Set - < - - kotlin.String - > - ? = null, - @JsonProperty("checkIn") private var checkIn: - java.time.LocalDate - ? = null, - @JsonProperty("checkOut") private var checkOut: - java.time.LocalDate - ? = null, - @JsonProperty("currency") private var currency: - kotlin.String - ? = null, - @JsonProperty("links") private var links: kotlin.collections.List - < - GetLodgingQuotesOperationParams.Links - - > - ? = null, - @JsonProperty("travelWithPets") private var travelWithPets: - kotlin.Boolean - ? = null, - @JsonProperty("room1.adults") private var room1Adults: - kotlin.Long - ? = null, - @JsonProperty("room1.childAges") private var room1ChildAges: kotlin.collections.List - < - - kotlin.String - > - ? = null, - @JsonProperty("room2.adults") private var room2Adults: - kotlin.Long - ? = null, - @JsonProperty("room2.childAges") private var room2ChildAges: kotlin.collections.List - < - - kotlin.String - > - ? = null, - @JsonProperty("room3.adults") private var room3Adults: - kotlin.Long - ? = null, - @JsonProperty("room3.childAges") private var room3ChildAges: kotlin.collections.List - < - - kotlin.String - > - ? = null, - @JsonProperty("room4.adults") private var room4Adults: - kotlin.Long - ? = null, - @JsonProperty("room4.childAges") private var room4ChildAges: kotlin.collections.List - < - - kotlin.String - > - ? = null, - @JsonProperty("room5.adults") private var room5Adults: - kotlin.Long - ? = null, - @JsonProperty("room5.childAges") private var room5ChildAges: kotlin.collections.List - < - - kotlin.String - > - ? = null, - @JsonProperty("room6.adults") private var room6Adults: - kotlin.Long - ? = null, - @JsonProperty("room6.childAges") private var room6ChildAges: kotlin.collections.List - < - - kotlin.String - > - ? = null, - @JsonProperty("room7.adults") private var room7Adults: - kotlin.Long - ? = null, - @JsonProperty("room7.childAges") private var room7ChildAges: kotlin.collections.List - < - - kotlin.String - > - ? = null, - @JsonProperty("room8.adults") private var room8Adults: - kotlin.Long - ? = null, - @JsonProperty("room8.childAges") private var room8ChildAges: kotlin.collections.List - < - - kotlin.String - > - ? = null - + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("propertyIds") private var propertyIds: kotlin.collections.Set< + kotlin.String, + >? = null, + @JsonProperty("checkIn") private var checkIn: java.time.LocalDate? = null, + @JsonProperty("checkOut") private var checkOut: java.time.LocalDate? = null, + @JsonProperty("currency") private var currency: kotlin.String? = null, + @JsonProperty("links") private var links: kotlin.collections.List< + GetLodgingQuotesOperationParams.Links, + >? = null, + @JsonProperty("travelWithPets") private var travelWithPets: kotlin.Boolean? = null, + @JsonProperty("room1.adults") private var room1Adults: kotlin.Long? = null, + @JsonProperty("room1.childAges") private var room1ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room2.adults") private var room2Adults: kotlin.Long? = null, + @JsonProperty("room2.childAges") private var room2ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room3.adults") private var room3Adults: kotlin.Long? = null, + @JsonProperty("room3.childAges") private var room3ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room4.adults") private var room4Adults: kotlin.Long? = null, + @JsonProperty("room4.childAges") private var room4ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room5.adults") private var room5Adults: kotlin.Long? = null, + @JsonProperty("room5.childAges") private var room5ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room6.adults") private var room6Adults: kotlin.Long? = null, + @JsonProperty("room6.childAges") private var room6ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room7.adults") private var room7Adults: kotlin.Long? = null, + @JsonProperty("room7.childAges") private var room7ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, + @JsonProperty("room8.adults") private var room8Adults: kotlin.Long? = null, + @JsonProperty("room8.childAges") private var room8ChildAges: kotlin.collections.List< + kotlin.String, + >? = null, ) { /** * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. */ - fun partnerTransactionId( - partnerTransactionId: - kotlin.String - ) = apply { this.partnerTransactionId = partnerTransactionId } + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } /** * @param propertyIds Comma-separated list of Expedia Property IDs. ***NOTE**: This API supports Expedia property IDs only by design – HCOM and Vrbo property IDs are not supported.* *For optimal performance, limiting your request to a maximum of 200 properties is recommended.* */ fun propertyIds( - propertyIds: kotlin.collections.Set - < - - kotlin.String - > + propertyIds: kotlin.collections.Set< + kotlin.String, + >, ) = apply { this.propertyIds = propertyIds } /** * @param checkIn Check-in date for property stay in an ISO 8601 Date format. This parameter should be used in combination with the checkOut parameter. The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. */ - fun checkIn( - checkIn: - java.time.LocalDate - ) = apply { this.checkIn = checkIn } + fun checkIn(checkIn: java.time.LocalDate) = apply { this.checkIn = checkIn } /** * @param checkOut Check-out date for property stay in an ISO 8601 Date format This parameter should be used in combination with the checkIn parameter. The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. */ - fun checkOut( - checkOut: - java.time.LocalDate - ) = apply { this.checkOut = checkOut } + fun checkOut(checkOut: java.time.LocalDate) = apply { this.checkOut = checkOut } /** * @param currency The requested currency expressed according to ISO 4217. PoS default currency will be passed if another currency is not specified in the request. */ - fun currency( - currency: - kotlin.String - ) = apply { this.currency = currency } + fun currency(currency: kotlin.String) = apply { this.currency = currency } /** * @param links Comma-separated list to specify the types of deep links. - WD (link to web infosite) - WS (link to web search result page) - WEB (include all website links) */ fun links( - links: kotlin.collections.List - < - GetLodgingQuotesOperationParams.Links - - > + links: kotlin.collections.List< + GetLodgingQuotesOperationParams.Links, + >, ) = apply { this.links = links } /** * @param travelWithPets Indicates if the search should include pet-friendly properties. If set to \"True\" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. The parameter is only applicable to the Vrbo brand. */ - fun travelWithPets( - travelWithPets: - kotlin.Boolean - ) = apply { this.travelWithPets = travelWithPets } - + fun travelWithPets(travelWithPets: kotlin.Boolean) = apply { this.travelWithPets = travelWithPets } fun rooms(rooms: List) = apply { if (rooms.size > 8) { throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( - constraintViolations = listOf("rooms: size must be between 0 and 8") + constraintViolations = listOf("rooms: size must be between 0 and 8"), ) } @@ -419,383 +255,405 @@ data class GetLodgingQuotesOperationParams( } fun build(): GetLodgingQuotesOperationParams { - val params = GetLodgingQuotesOperationParams( - partnerTransactionId = partnerTransactionId!!, - propertyIds = propertyIds, - checkIn = checkIn, - checkOut = checkOut, - currency = currency, - links = links, - travelWithPets = travelWithPets, - room1Adults = room1Adults, - room1ChildAges = room1ChildAges, - room2Adults = room2Adults, - room2ChildAges = room2ChildAges, - room3Adults = room3Adults, - room3ChildAges = room3ChildAges, - room4Adults = room4Adults, - room4ChildAges = room4ChildAges, - room5Adults = room5Adults, - room5ChildAges = room5ChildAges, - room6Adults = room6Adults, - room6ChildAges = room6ChildAges, - room7Adults = room7Adults, - room7ChildAges = room7ChildAges, - room8Adults = room8Adults, - room8ChildAges = room8ChildAges - ) + val params = + GetLodgingQuotesOperationParams( + partnerTransactionId = partnerTransactionId!!, + propertyIds = propertyIds, + checkIn = checkIn, + checkOut = checkOut, + currency = currency, + links = links, + travelWithPets = travelWithPets, + room1Adults = room1Adults, + room1ChildAges = room1ChildAges, + room2Adults = room2Adults, + room2ChildAges = room2ChildAges, + room3Adults = room3Adults, + room3ChildAges = room3ChildAges, + room4Adults = room4Adults, + room4ChildAges = room4ChildAges, + room5Adults = room5Adults, + room5ChildAges = room5ChildAges, + room6Adults = room6Adults, + room6ChildAges = room6ChildAges, + room7Adults = room7Adults, + room7ChildAges = room7ChildAges, + room8Adults = room8Adults, + room8ChildAges = room8ChildAges, + ) return params } } - fun toBuilder() = Builder( - partnerTransactionId = partnerTransactionId, - propertyIds = propertyIds, - checkIn = checkIn, - checkOut = checkOut, - currency = currency, - links = links, - travelWithPets = travelWithPets, - room1Adults = room1Adults, - room1ChildAges = room1ChildAges, - room2Adults = room2Adults, - room2ChildAges = room2ChildAges, - room3Adults = room3Adults, - room3ChildAges = room3ChildAges, - room4Adults = room4Adults, - room4ChildAges = room4ChildAges, - room5Adults = room5Adults, - room5ChildAges = room5ChildAges, - room6Adults = room6Adults, - room6ChildAges = room6ChildAges, - room7Adults = room7Adults, - room7ChildAges = room7ChildAges, - room8Adults = room8Adults, - room8ChildAges = room8ChildAges - ) - - - fun getHeaders(): Headers { - return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-lodging.v3+json") - }.build() - } + fun toBuilder() = + Builder( + partnerTransactionId = partnerTransactionId, + propertyIds = propertyIds, + checkIn = checkIn, + checkOut = checkOut, + currency = currency, + links = links, + travelWithPets = travelWithPets, + room1Adults = room1Adults, + room1ChildAges = room1ChildAges, + room2Adults = room2Adults, + room2ChildAges = room2ChildAges, + room3Adults = room3Adults, + room3ChildAges = room3ChildAges, + room4Adults = room4Adults, + room4ChildAges = room4ChildAges, + room5Adults = room5Adults, + room5ChildAges = room5ChildAges, + room6Adults = room6Adults, + room6ChildAges = room6ChildAges, + room7Adults = room7Adults, + room7ChildAges = room7ChildAges, + room8Adults = room8Adults, + room8ChildAges = room8ChildAges, + ) + + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-lodging.v3+json") + }.build() fun getQueryParams(): List = buildList { propertyIds?.let { val key = "propertyIds" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } checkIn?.let { val key = "checkIn" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } checkOut?.let { val key = "checkOut" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } currency?.let { val key = "currency" - val value = buildList { - add(it) - } + val value = + buildList { + add(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } links?.let { val key = "links" - val value = buildList { - addAll(it.map { it.value }) - } + val value = + buildList { + addAll(it.map { it.value }) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } travelWithPets?.let { val key = "travelWithPets" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room1Adults?.let { val key = "room1.adults" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room1ChildAges?.let { val key = "room1.childAges" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } room2Adults?.let { val key = "room2.adults" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room2ChildAges?.let { val key = "room2.childAges" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } room3Adults?.let { val key = "room3.adults" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room3ChildAges?.let { val key = "room3.childAges" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } room4Adults?.let { val key = "room4.adults" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room4ChildAges?.let { val key = "room4.childAges" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } room5Adults?.let { val key = "room5.adults" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room5ChildAges?.let { val key = "room5.childAges" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } room6Adults?.let { val key = "room6.adults" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room6ChildAges?.let { val key = "room6.childAges" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } room7Adults?.let { val key = "room7.adults" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room7ChildAges?.let { val key = "room7.childAges" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } room8Adults?.let { val key = "room8.adults" - val value = buildList { - add(it.toString()) - } + val value = + buildList { + add(it.toString()) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), ) } room8ChildAges?.let { val key = "room8.childAges" - val value = buildList { - addAll(it) - } + val value = + buildList { + addAll(it) + } add( UrlQueryParam( key = key, value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode) - ) + stringify = swaggerCollectionFormatStringifier.getOrDefault("csv", stringifyExplode), + ), ) } } - - } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt index 264561ee0..223ed63db 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperation.kt @@ -1,58 +1,39 @@ package com.expediagroup.sdk.xap.operations - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - - import com.expediagroup.sdk.xap.models.APIGatewayError - import com.expediagroup.sdk.xap.models.Errors - import com.expediagroup.sdk.xap.models.RateCalendarResponse - - /** - * Get rate calendar of a property - * @property params [GetLodgingRateCalendarOperationParams] - */ - class GetLodgingRateCalendarOperation( - private val params: GetLodgingRateCalendarOperationParams, - ) : OperationRequestTrait, -UrlPathTrait - -, JacksonModelOperationResponseBodyTrait - - -, UrlQueryParamsTrait -, HeadersTrait { - override fun getHttpMethod(): String = "GET" - -override fun getRequestInfo(): OperationRequestTrait = this - -override fun getUrlPath(): String { -var url = "/hotels/rateCalendar" - - - -return url -} - - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.trait.operation.HeadersTrait +import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait +import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait +import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait +import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait +import com.expediagroup.sdk.xap.models.RateCalendarResponse +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef + +/** + * Get rate calendar of a property + * @property params [GetLodgingRateCalendarOperationParams] + */ +class GetLodgingRateCalendarOperation( + private val params: GetLodgingRateCalendarOperationParams, +) : OperationRequestTrait, + UrlPathTrait, + JacksonModelOperationResponseBodyTrait, + UrlQueryParamsTrait, + HeadersTrait { + override fun getHttpMethod(): String = "GET" + + override fun getRequestInfo(): OperationRequestTrait = this + + override fun getUrlPath(): String { + var url = "/hotels/rateCalendar" + + return url + } override fun getTypeIdentifier(): TypeReference = jacksonTypeRef() override fun getHeaders(): Headers = this.params.getHeaders() - override fun getUrlQueryParams() = this.params.getQueryParams() - - } +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt index 66f01f7c9..c7aba6fbe 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingRateCalendarOperationParams.kt @@ -1,333 +1,220 @@ package com.expediagroup.sdk.xap.operations - - import com.expediagroup.sdk.rest.trait.operation.OperationRequestTrait - import com.expediagroup.sdk.rest.trait.operation.UrlPathTrait - - import com.fasterxml.jackson.core.type.TypeReference - import com.fasterxml.jackson.module.kotlin.jacksonTypeRef - import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait - - - import com.expediagroup.sdk.rest.trait.operation.UrlQueryParamsTrait - import com.expediagroup.sdk.rest.model.UrlQueryParam - import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier - import com.expediagroup.sdk.rest.util.stringifyExplode - import com.expediagroup.sdk.rest.trait.operation.HeadersTrait - import com.expediagroup.sdk.core.http.Headers - - -import com.expediagroup.sdk.xap.models.APIGatewayError -import com.expediagroup.sdk.xap.models.Errors -import com.expediagroup.sdk.xap.models.RateCalendarResponse - - - import com.fasterxml.jackson.annotation.JsonProperty - import com.fasterxml.jackson.databind.annotation.JsonDeserialize - - /** - * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - * @property ecomHotelId The Expedia hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. - * @property hcomHotelId The Hotel.com hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. - * @property startDate Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The start date may not be in the past. - * @property endDate End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The end date must be after the start date. The maximum supported search range is 180 days. - * @property lengthOfStay The length of stay to retrieve the lowest price for. - * @property currency The requested currency expressed according to ISO 4217. - */ - @JsonDeserialize(builder = GetLodgingRateCalendarOperationParams.Builder::class) - data class GetLodgingRateCalendarOperationParams( - val partnerTransactionId: - kotlin.String - - , - val ecomHotelId: - kotlin.String - -? - = null -, - val hcomHotelId: - kotlin.String - -? - = null -, - val startDate: - java.time.LocalDate - - , - val endDate: - java.time.LocalDate - - , - val lengthOfStay: - kotlin.Int - -? - = - 1 -, - val currency: - kotlin.String - -? - = null - - ) { - - init { - require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - require(startDate != null) { "startDate must not be null" } - - - - - - - - - require(endDate != null) { "endDate must not be null" } - - - - - - - - - - - - - - - - - - - - - - - - - - } - - companion object { - @JvmStatic - fun builder() = Builder() - } - - - - class Builder( - @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: - kotlin.String -? = null - , - @JsonProperty("ecomHotelId") private var ecomHotelId: - kotlin.String -? = null - , - @JsonProperty("hcomHotelId") private var hcomHotelId: - kotlin.String -? = null - , - @JsonProperty("startDate") private var startDate: - java.time.LocalDate -? = null - , - @JsonProperty("endDate") private var endDate: - java.time.LocalDate -? = null - , - @JsonProperty("lengthOfStay") private var lengthOfStay: - kotlin.Int -? = null - , - @JsonProperty("currency") private var currency: - kotlin.String -? = null - +import com.expediagroup.sdk.core.http.Headers +import com.expediagroup.sdk.rest.model.UrlQueryParam +import com.expediagroup.sdk.rest.util.stringifyExplode +import com.expediagroup.sdk.rest.util.swaggerCollectionFormatStringifier +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize + +/** + * @property partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + * @property ecomHotelId The Expedia hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. + * @property hcomHotelId The Hotel.com hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. + * @property startDate Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The start date may not be in the past. + * @property endDate End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The end date must be after the start date. The maximum supported search range is 180 days. + * @property lengthOfStay The length of stay to retrieve the lowest price for. + * @property currency The requested currency expressed according to ISO 4217. + */ +@JsonDeserialize(builder = GetLodgingRateCalendarOperationParams.Builder::class) +data class GetLodgingRateCalendarOperationParams( + val partnerTransactionId: kotlin.String, + val ecomHotelId: kotlin.String? = + null, + val hcomHotelId: kotlin.String? = + null, + val startDate: java.time.LocalDate, + val endDate: java.time.LocalDate, + val lengthOfStay: kotlin.Int? = + 1, + val currency: kotlin.String? = + null, ) { - /** - * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. - */ - fun partnerTransactionId(partnerTransactionId: - kotlin.String -) = apply { this.partnerTransactionId = partnerTransactionId } - /** - * @param ecomHotelId The Expedia hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. - */ - fun ecomHotelId(ecomHotelId: - kotlin.String -) = apply { this.ecomHotelId = ecomHotelId } - /** - * @param hcomHotelId The Hotel.com hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. - */ - fun hcomHotelId(hcomHotelId: - kotlin.String -) = apply { this.hcomHotelId = hcomHotelId } - /** - * @param startDate Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The start date may not be in the past. - */ - fun startDate(startDate: - java.time.LocalDate -) = apply { this.startDate = startDate } - /** - * @param endDate End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The end date must be after the start date. The maximum supported search range is 180 days. - */ - fun endDate(endDate: - java.time.LocalDate -) = apply { this.endDate = endDate } - /** - * @param lengthOfStay The length of stay to retrieve the lowest price for. - */ - fun lengthOfStay(lengthOfStay: - kotlin.Int -) = apply { this.lengthOfStay = lengthOfStay } - /** - * @param currency The requested currency expressed according to ISO 4217. - */ - fun currency(currency: - kotlin.String -) = apply { this.currency = currency } + init { + require(partnerTransactionId != null) { "partnerTransactionId must not be null" } - fun build(): GetLodgingRateCalendarOperationParams { - val params = GetLodgingRateCalendarOperationParams( - partnerTransactionId = partnerTransactionId!!, - ecomHotelId = ecomHotelId, - hcomHotelId = hcomHotelId, - startDate = startDate!!, - endDate = endDate!!, - lengthOfStay = lengthOfStay, - currency = currency - ) + require(startDate != null) { "startDate must not be null" } - return params + require(endDate != null) { "endDate must not be null" } } -} -fun toBuilder() = Builder( - partnerTransactionId = partnerTransactionId, - ecomHotelId = ecomHotelId, - hcomHotelId = hcomHotelId, - startDate = startDate, - endDate = endDate, - lengthOfStay = lengthOfStay, - currency = currency -) + companion object { + @JvmStatic + fun builder() = Builder() + } + class Builder( + @JsonProperty("Partner-Transaction-Id") private var partnerTransactionId: kotlin.String? = null, + @JsonProperty("ecomHotelId") private var ecomHotelId: kotlin.String? = null, + @JsonProperty("hcomHotelId") private var hcomHotelId: kotlin.String? = null, + @JsonProperty("startDate") private var startDate: java.time.LocalDate? = null, + @JsonProperty("endDate") private var endDate: java.time.LocalDate? = null, + @JsonProperty("lengthOfStay") private var lengthOfStay: kotlin.Int? = null, + @JsonProperty("currency") private var currency: kotlin.String? = null, + ) { + /** + * @param partnerTransactionId The `Partner-Transaction-ID` is a required API request header element that is not consumed by Expedia. It will be required in all XAP v3 API request headers and will be mirrored back to the partner in the corresponding API response header. The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + */ + fun partnerTransactionId(partnerTransactionId: kotlin.String) = apply { this.partnerTransactionId = partnerTransactionId } - fun getHeaders(): Headers { -return Headers.builder().apply { - partnerTransactionId?.let { - add("Partner-Transaction-Id", it) - } - add("Accept", "application/vnd.exp-hotel.v3+json") -}.build() -} + /** + * @param ecomHotelId The Expedia hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. + */ + fun ecomHotelId(ecomHotelId: kotlin.String) = apply { this.ecomHotelId = ecomHotelId } - fun getQueryParams(): List = - buildList { - ecomHotelId?.let { - val key = "ecomHotelId" - val value = buildList { - add(it) - } + /** + * @param hcomHotelId The Hotel.com hotel ID for which the calendar is being requested. **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. You may use one or the other, but not both. + */ + fun hcomHotelId(hcomHotelId: kotlin.String) = apply { this.hcomHotelId = hcomHotelId } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - hcomHotelId?.let { - val key = "hcomHotelId" - val value = buildList { - add(it) - } + /** + * @param startDate Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The start date may not be in the past. + */ + fun startDate(startDate: java.time.LocalDate) = apply { this.startDate = startDate } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - startDate?.let { - val key = "startDate" - val value = buildList { - add(it.toString()) - } + /** + * @param endDate End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. **Note**: The end date must be after the start date. The maximum supported search range is 180 days. + */ + fun endDate(endDate: java.time.LocalDate) = apply { this.endDate = endDate } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - endDate?.let { - val key = "endDate" - val value = buildList { - add(it.toString()) - } + /** + * @param lengthOfStay The length of stay to retrieve the lowest price for. + */ + fun lengthOfStay(lengthOfStay: kotlin.Int) = apply { this.lengthOfStay = lengthOfStay } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - lengthOfStay?.let { - val key = "lengthOfStay" - val value = buildList { - add(it.toString()) + /** + * @param currency The requested currency expressed according to ISO 4217. + */ + fun currency(currency: kotlin.String) = apply { this.currency = currency } + + fun build(): GetLodgingRateCalendarOperationParams { + val params = + GetLodgingRateCalendarOperationParams( + partnerTransactionId = partnerTransactionId!!, + ecomHotelId = ecomHotelId, + hcomHotelId = hcomHotelId, + startDate = startDate!!, + endDate = endDate!!, + lengthOfStay = lengthOfStay, + currency = currency, + ) + + return params } + } - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) - } - currency?.let { - val key = "currency" - val value = buildList { - add(it) - } + fun toBuilder() = + Builder( + partnerTransactionId = partnerTransactionId, + ecomHotelId = ecomHotelId, + hcomHotelId = hcomHotelId, + startDate = startDate, + endDate = endDate, + lengthOfStay = lengthOfStay, + currency = currency, + ) - add(UrlQueryParam( - key = key, - value = value, - stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode) - )) + fun getHeaders(): Headers = + Headers + .builder() + .apply { + partnerTransactionId?.let { + add("Partner-Transaction-Id", it) + } + add("Accept", "application/vnd.exp-hotel.v3+json") + }.build() + + fun getQueryParams(): List = + buildList { + ecomHotelId?.let { + val key = "ecomHotelId" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + hcomHotelId?.let { + val key = "hcomHotelId" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + startDate?.let { + val key = "startDate" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + endDate?.let { + val key = "endDate" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + lengthOfStay?.let { + val key = "lengthOfStay" + val value = + buildList { + add(it.toString()) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } + currency?.let { + val key = "currency" + val value = + buildList { + add(it) + } + + add( + UrlQueryParam( + key = key, + value = value, + stringify = swaggerCollectionFormatStringifier.getOrDefault("", stringifyExplode), + ), + ) + } } } - - - } From 99f56ed5e9e1694091789fcd6e630394e951353d Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 17 Mar 2025 05:26:00 +0300 Subject: [PATCH 04/40] lint code --- xap-sdk/gradlew | 234 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100755 xap-sdk/gradlew diff --git a/xap-sdk/gradlew b/xap-sdk/gradlew new file mode 100755 index 000000000..1b6c78733 --- /dev/null +++ b/xap-sdk/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# 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 +# +# https://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. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" From 215923afd591ba9d9fa5c4533fb959b868ae750a Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 17 Mar 2025 05:32:21 +0300 Subject: [PATCH 05/40] lint code --- build.gradle.kts | 2 + xap-sdk/build.gradle.kts | 25 +++++ xap-sdk/gradlew | 234 --------------------------------------- 3 files changed, 27 insertions(+), 234 deletions(-) delete mode 100755 xap-sdk/gradlew diff --git a/build.gradle.kts b/build.gradle.kts index c0ebeae88..8a6d391a5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,6 +12,8 @@ repositories { } } + + dependencies { testImplementation(kotlin("test")) } diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index 9701c1483..455660c91 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -103,3 +103,28 @@ publishing { } } } + +gradle.taskGraph.whenReady { + if (hasTask(":publishSnapshots")) { + rootProject.version = "1.0.0-SNAPSHOT" + println("📌 Setting root project version to 1.0.0-SNAPSHOT for publishSnapshots task") + } +} + +tasks.register("publishSnapshots") { + val snapshotModules = rootProject.subprojects.filter { project -> + project.version.toString().contains("-SNAPSHOT") && project.tasks.names.contains("publish") + } + + if (snapshotModules.isNotEmpty()) { + dependsOn(snapshotModules.map { ":${it.name}:publish" }) + } + + doLast { + if (snapshotModules.isEmpty()) { + println("❌ No snapshot modules to publish.") + } else { + println("📦 Successfully published snapshots for: ${snapshotModules.map { it.name }}") + } + } +} diff --git a/xap-sdk/gradlew b/xap-sdk/gradlew deleted file mode 100755 index 1b6c78733..000000000 --- a/xap-sdk/gradlew +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# 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 -# -# https://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. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" From 278ef46adf609b01408f70df5d2fb0a9ca0bc464 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 17 Mar 2025 05:40:32 +0300 Subject: [PATCH 06/40] add signing --- xap-sdk/build.gradle.kts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index 455660c91..69ec7f7f8 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { kotlin("jvm") id("java") + id("signing") id("maven-publish") id("org.jlleitschuh.gradle.ktlint") version "12.1.2" } @@ -104,6 +105,14 @@ publishing { } } +signing { + val signingKey = System.getenv("GPG_SECRET") + val signingPassword = System.getenv("GPG_PASSPHRASE") + + useInMemoryPgpKeys(signingKey, signingPassword) + sign(publishing.publications) +} + gradle.taskGraph.whenReady { if (hasTask(":publishSnapshots")) { rootProject.version = "1.0.0-SNAPSHOT" From 6692aa5fb89659dd6236a009de306cc82cafbdda Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 17 Mar 2025 06:00:42 +0300 Subject: [PATCH 07/40] add signing --- build.gradle.kts | 17 +++++++ settings.gradle.kts | 1 + xap-sdk/build.gradle.kts | 103 ++++++++++++++++++++++----------------- 3 files changed, 77 insertions(+), 44 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8a6d391a5..50a93419a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,10 @@ +import java.time.Duration + plugins { kotlin("jvm") version "2.1.10" + id("maven-publish") + id("signing") + id("io.github.gradle-nexus.publish-plugin") version "2.0.0" } group = "com.expediagroup.sdk" @@ -12,7 +17,19 @@ repositories { } } +nexusPublishing { + repositories { + sonatype { + username.set(System.getenv("SONATYPE_USERNAME")) + password.set(System.getenv("SONATYPE_PASSWORD")) + } + } + transitionCheckOptions { + maxRetries.set(60) + delayBetween.set(Duration.ofMillis(5000)) + } +} dependencies { testImplementation(kotlin("test")) diff --git a/settings.gradle.kts b/settings.gradle.kts index b4ee28019..1e1c0e7cf 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -12,6 +12,7 @@ pluginManagement { plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } + rootProject.name = "xap-java-sdk" include("xap-sdk") include("generator") diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index 69ec7f7f8..6d97ca939 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -8,9 +8,6 @@ plugins { id("org.jlleitschuh.gradle.ktlint") version "12.1.2" } -group = "com.expediagroup.sdk" -version = "1.0.0-SNAPSHOT" - repositories { mavenCentral() maven { @@ -18,47 +15,6 @@ repositories { } } -dependencies { - testImplementation(kotlin("test")) - api("com.expediagroup:expediagroup-sdk-rest:0.0.1-beta-SNAPSHOT") - implementation("com.expediagroup:expediagroup-sdk-transport-okhttp:0.0.1-beta-SNAPSHOT") - implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2") - implementation("org.slf4j:slf4j-simple:2.0.16") - runtimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2") -} - -tasks.test { - useJUnitPlatform() -} - -kotlin { - jvmToolchain(21) - compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8) -} - -java { - withSourcesJar() - targetCompatibility = JavaVersion.VERSION_1_8 - sourceCompatibility = JavaVersion.VERSION_1_8 -} - -ktlint { - debug = true - version = "1.5.0" - verbose = true - - additionalEditorconfig = - mapOf( - "max_line_length" to "200", - "indent_style" to "space", - "indent_size" to "4", - "insert_final_newline" to "true", - "end_of_line" to "lf", - "ktlint_standard_enum-entry-name-case" to "disabled", - ) -} - publishing { publications { create("mavenJava") { @@ -113,6 +69,65 @@ signing { sign(publishing.publications) } +group = "com.expediagroup.sdk" +version = "1.0.0-SNAPSHOT" + + +//nexusPublishing { +// repositories { +// sonatype { +// username.set(System.getenv("SONATYPE_USERNAME")) +// password.set(System.getenv("SONATYPE_PASSWORD")) +// } +// } +// +// transitionCheckOptions { +// maxRetries.set(60) +// delayBetween.set(Duration.ofMillis(5000)) +// } +//} + +dependencies { + testImplementation(kotlin("test")) + api("com.expediagroup:expediagroup-sdk-rest:0.0.1-beta-SNAPSHOT") + implementation("com.expediagroup:expediagroup-sdk-transport-okhttp:0.0.1-beta-SNAPSHOT") + implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2") + implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2") + implementation("org.slf4j:slf4j-simple:2.0.16") + runtimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2") +} + +tasks.test { + useJUnitPlatform() +} + +kotlin { + jvmToolchain(21) + compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8) +} + +java { + withSourcesJar() + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 +} + +ktlint { + debug = true + version = "1.5.0" + verbose = true + + additionalEditorconfig = + mapOf( + "max_line_length" to "200", + "indent_style" to "space", + "indent_size" to "4", + "insert_final_newline" to "true", + "end_of_line" to "lf", + "ktlint_standard_enum-entry-name-case" to "disabled", + ) +} + gradle.taskGraph.whenReady { if (hasTask(":publishSnapshots")) { rootProject.version = "1.0.0-SNAPSHOT" From e35c0f7dbb7f5fbf469edb373099bf9e8a50d4ad Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Fri, 21 Mar 2025 23:21:54 +0300 Subject: [PATCH 08/40] commit --- build.gradle.kts | 47 +- .../mustache/AllowedMediaTypesLambda.kt | 25 + generator/build.gradle.kts | 39 +- generator/tasks/lambdas.gradle.kts | 2 + gradle-tasks/specs.gradle.kts | 19 + gradle/wrapper/gradle-wrapper.jar | Bin 60756 -> 43583 bytes gradle/wrapper/gradle-wrapper.properties | 5 +- gradlew | 44 +- gradlew.bat | 37 +- specs/openapi-merge.json | 50 + specs/xap-activity.specs.yaml | 1335 +++++ specs/xap-car.specs.yaml | 1633 ++++++ specs/xap-flight-v1.specs.yaml | 773 +++ specs/xap-flight-v2.specs.yaml | 566 ++ specs/xap-flight-v3.specs.yaml | 4571 +++++++++++++++++ specs/xap-hotel.specs.yaml | 3394 ++++++++++++ specs/xap-lodging.specs.yaml | 998 ++++ specs/xap-sdp-v1.specs.yaml | 392 ++ xap-sdk/build.gradle.kts | 20 +- 19 files changed, 13856 insertions(+), 94 deletions(-) create mode 100644 buildSrc/src/main/kotlin/com/expediagroup/sdk/xap/generator/mustache/AllowedMediaTypesLambda.kt create mode 100644 generator/tasks/lambdas.gradle.kts create mode 100644 gradle-tasks/specs.gradle.kts create mode 100644 specs/openapi-merge.json create mode 100644 specs/xap-activity.specs.yaml create mode 100644 specs/xap-car.specs.yaml create mode 100644 specs/xap-flight-v1.specs.yaml create mode 100644 specs/xap-flight-v2.specs.yaml create mode 100644 specs/xap-flight-v3.specs.yaml create mode 100644 specs/xap-hotel.specs.yaml create mode 100644 specs/xap-lodging.specs.yaml create mode 100644 specs/xap-sdp-v1.specs.yaml diff --git a/build.gradle.kts b/build.gradle.kts index 50a93419a..242743660 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,9 +1,9 @@ import java.time.Duration +import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { kotlin("jvm") version "2.1.10" - id("maven-publish") - id("signing") + id("org.jlleitschuh.gradle.ktlint") version "12.1.2" id("io.github.gradle-nexus.publish-plugin") version "2.0.0" } @@ -12,11 +12,39 @@ version = "1.0-SNAPSHOT" repositories { mavenCentral() + gradlePluginPortal() maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") } } +subprojects { + apply(plugin = "org.jlleitschuh.gradle.ktlint") + apply(plugin = "org.jetbrains.kotlin.jvm") + + repositories { + mavenCentral() + gradlePluginPortal() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + } + } + + kotlin { + jvmToolchain(21) + target { + compilerOptions { + jvmTarget = JvmTarget.JVM_1_8 + } + } + } + + java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } +} + nexusPublishing { repositories { sonatype { @@ -31,13 +59,14 @@ nexusPublishing { } } -dependencies { - testImplementation(kotlin("test")) -} - -tasks.test { - useJUnitPlatform() -} kotlin { jvmToolchain(21) } + +tasks.register("prepareSpecs") { + dependsOn("mergeSpecs", "transformSpecs") + + File("$rootDir", "specs/specs.yaml") +} + +apply("gradle-tasks/specs.gradle.kts") diff --git a/buildSrc/src/main/kotlin/com/expediagroup/sdk/xap/generator/mustache/AllowedMediaTypesLambda.kt b/buildSrc/src/main/kotlin/com/expediagroup/sdk/xap/generator/mustache/AllowedMediaTypesLambda.kt new file mode 100644 index 000000000..456507725 --- /dev/null +++ b/buildSrc/src/main/kotlin/com/expediagroup/sdk/xap/generator/mustache/AllowedMediaTypesLambda.kt @@ -0,0 +1,25 @@ +package com.expediagroup.sdk.xap.generator.mustache + +import com.samskivert.mustache.Mustache +import com.samskivert.mustache.Template +import java.io.Serializable +import java.io.Writer +import org.openapitools.codegen.CodegenResponse + +class AllowedMediaTypesLambda : Mustache.Lambda, Serializable { + override fun execute( + fragment: Template.Fragment, + writer: Writer, + ) { + val response: CodegenResponse = fragment.context() as CodegenResponse + if (response.is2xx) { + val mediaTypes: List = + response.content.keys.filter { + !it.contains("xml", ignoreCase = true) + } + + val context = mapOf("mediaTypes" to mediaTypes) + fragment.execute(context, writer) + } + } +} diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index ece4e6481..9f7f9bdc7 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -1,12 +1,8 @@ -import com.samskivert.mustache.Mustache -import com.samskivert.mustache.Template -import org.jlleitschuh.gradle.ktlint.tasks.KtLintFormatTask import org.openapitools.codegen.CodegenConstants -import org.openapitools.codegen.CodegenResponse -import java.io.Serializable -import java.io.Writer +import com.expediagroup.sdk.xap.generator.mustache.AllowedMediaTypesLambda plugins { + `kotlin-dsl` kotlin("jvm") version "2.1.10" id("com.expediagroup.sdk.openapigenerator") version "0.0.3-beta-SNAPSHOT" id("org.jlleitschuh.gradle.ktlint") version "12.1.2" @@ -15,13 +11,6 @@ plugins { group = "com.expediagroup.sdk" version = "1.0-SNAPSHOT" -repositories { - mavenCentral() - maven { - url = uri("https://oss.sonatype.org/content/repositories/snapshots/") - } -} - dependencies { api("org.openapitools:openapi-generator:7.11.0") testImplementation(kotlin("test")) @@ -38,6 +27,7 @@ kotlin { openApiGenerate { inputSpec = System.getProperty("inputSpec") ?: "$projectDir/src/main/resources/specs.yaml" + packageName = "com.expediagroup.sdk.xap" invokerPackage = "com.expediagroup.sdk.xap" apiPackage = "com.expediagroup.sdk.xap.operations" modelPackage = "com.expediagroup.sdk.xap.models" @@ -54,30 +44,9 @@ openApiGenerate { outputDir = "$rootDir/xap-sdk/src/main/kotlin" additionalProperties.put(CodegenConstants.ENUM_PROPERTY_NAMING, "UPPERCASE") - additionalProperties.put("allowedMediaTypes", Lambdas.AllowedMediaTypesLambda()) + additionalProperties.put("allowedMediaTypes", AllowedMediaTypesLambda()) configOptions.put("sourceFolder", "") globalProperties.put("supportingFiles", "Room.kt") } - - -class Lambdas { - class AllowedMediaTypesLambda : Mustache.Lambda, Serializable { - override fun execute( - fragment: Template.Fragment, - writer: Writer, - ) { - val response: CodegenResponse = fragment.context() as CodegenResponse - if (response.is2xx) { - val mediaTypes: List = - response.content.keys.filter { - !it.contains("xml", ignoreCase = true) - } - - val context = mapOf("mediaTypes" to mediaTypes) - fragment.execute(context, writer) - } - } - } -} diff --git a/generator/tasks/lambdas.gradle.kts b/generator/tasks/lambdas.gradle.kts new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/generator/tasks/lambdas.gradle.kts @@ -0,0 +1,2 @@ + + diff --git a/gradle-tasks/specs.gradle.kts b/gradle-tasks/specs.gradle.kts new file mode 100644 index 000000000..82c8083a3 --- /dev/null +++ b/gradle-tasks/specs.gradle.kts @@ -0,0 +1,19 @@ +tasks.register("mergeSpecs") { + exec { + commandLine( + "npx openapi-merge-cli".split(" ") + ) + workingDir = File(rootDir, "specs") + } +} + +tasks.register("transformSpecs") { + dependsOn("mergeSpecs") + + exec { + commandLine( + "npx --yes -p @expediagroup/spec-transformer cli --headers --operationIdsToTags -i specs.yaml -o specs.yaml" + ) + workingDir = File(rootDir, "specs") + } +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e5832f090a2944b7473328c07c9755baa3196..a4b76b9530d66f5e68d973ea569d8e19de379189 100644 GIT binary patch literal 43583 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0sur@TMa!Y}S8irn(%d-gi0*WxxCSk*A?3lGh=gcYN?FGl z7D=Js!i~0=u3rox^eO3i@$0=n{K1lPNU zwmfjRVmLOCRfe=seV&P*1Iq=^i`502keY8Uy-WNPwVNNtJFx?IwAyRPZo2Wo1+S(xF37LJZ~%i)kpFQ3Fw=mXfd@>%+)RpYQLnr}B~~zoof(JVm^^&f zxKV^+3D3$A1G;qh4gPVjhrC8e(VYUHv#dy^)(RoUFM?o%W-EHxufuWf(l*@-l+7vt z=l`qmR56K~F|v<^Pd*p~1_y^P0P^aPC##d8+HqX4IR1gu+7w#~TBFphJxF)T$2WEa zxa?H&6=Qe7d(#tha?_1uQys2KtHQ{)Qco)qwGjrdNL7thd^G5i8Os)CHqc>iOidS} z%nFEDdm=GXBw=yXe1W-ShHHFb?Cc70+$W~z_+}nAoHFYI1MV1wZegw*0y^tC*s%3h zhD3tN8b=Gv&rj}!SUM6|ajSPp*58KR7MPpI{oAJCtY~JECm)*m_x>AZEu>DFgUcby z1Qaw8lU4jZpQ_$;*7RME+gq1KySGG#Wql>aL~k9tLrSO()LWn*q&YxHEuzmwd1?aAtI zBJ>P=&$=l1efe1CDU;`Fd+_;&wI07?V0aAIgc(!{a z0Jg6Y=inXc3^n!U0Atk`iCFIQooHqcWhO(qrieUOW8X(x?(RD}iYDLMjSwffH2~tB z)oDgNBLB^AJBM1M^c5HdRx6fBfka`(LD-qrlh5jqH~);#nw|iyp)()xVYak3;Ybik z0j`(+69aK*B>)e_p%=wu8XC&9e{AO4c~O1U`5X9}?0mrd*m$_EUek{R?DNSh(=br# z#Q61gBzEpmy`$pA*6!87 zSDD+=@fTY7<4A?GLqpA?Pb2z$pbCc4B4zL{BeZ?F-8`s$?>*lXXtn*NC61>|*w7J* z$?!iB{6R-0=KFmyp1nnEmLsA-H0a6l+1uaH^g%c(p{iT&YFrbQ$&PRb8Up#X3@Zsk zD^^&LK~111%cqlP%!_gFNa^dTYT?rhkGl}5=fL{a`UViaXWI$k-UcHJwmaH1s=S$4 z%4)PdWJX;hh5UoK?6aWoyLxX&NhNRqKam7tcOkLh{%j3K^4Mgx1@i|Pi&}<^5>hs5 zm8?uOS>%)NzT(%PjVPGa?X%`N2TQCKbeH2l;cTnHiHppPSJ<7y-yEIiC!P*ikl&!B z%+?>VttCOQM@ShFguHVjxX^?mHX^hSaO_;pnyh^v9EumqSZTi+#f&_Vaija0Q-e*| z7ulQj6Fs*bbmsWp{`auM04gGwsYYdNNZcg|ph0OgD>7O}Asn7^Z=eI>`$2*v78;sj-}oMoEj&@)9+ycEOo92xSyY344^ z11Hb8^kdOvbf^GNAK++bYioknrpdN>+u8R?JxG=!2Kd9r=YWCOJYXYuM0cOq^FhEd zBg2puKy__7VT3-r*dG4c62Wgxi52EMCQ`bKgf*#*ou(D4-ZN$+mg&7$u!! z-^+Z%;-3IDwqZ|K=ah85OLwkO zKxNBh+4QHh)u9D?MFtpbl)us}9+V!D%w9jfAMYEb>%$A;u)rrI zuBudh;5PN}_6J_}l55P3l_)&RMlH{m!)ai-i$g)&*M`eN$XQMw{v^r@-125^RRCF0 z^2>|DxhQw(mtNEI2Kj(;KblC7x=JlK$@78`O~>V!`|1Lm-^JR$-5pUANAnb(5}B}JGjBsliK4& zk6y(;$e&h)lh2)L=bvZKbvh@>vLlreBdH8No2>$#%_Wp1U0N7Ank!6$dFSi#xzh|( zRi{Uw%-4W!{IXZ)fWx@XX6;&(m_F%c6~X8hx=BN1&q}*( zoaNjWabE{oUPb!Bt$eyd#$5j9rItB-h*5JiNi(v^e|XKAj*8(k<5-2$&ZBR5fF|JA z9&m4fbzNQnAU}r8ab>fFV%J0z5awe#UZ|bz?Ur)U9bCIKWEzi2%A+5CLqh?}K4JHi z4vtM;+uPsVz{Lfr;78W78gC;z*yTch~4YkLr&m-7%-xc ztw6Mh2d>_iO*$Rd8(-Cr1_V8EO1f*^@wRoSozS) zy1UoC@pruAaC8Z_7~_w4Q6n*&B0AjOmMWa;sIav&gu z|J5&|{=a@vR!~k-OjKEgPFCzcJ>#A1uL&7xTDn;{XBdeM}V=l3B8fE1--DHjSaxoSjNKEM9|U9#m2<3>n{Iuo`r3UZp;>GkT2YBNAh|b z^jTq-hJp(ebZh#Lk8hVBP%qXwv-@vbvoREX$TqRGTgEi$%_F9tZES@z8Bx}$#5eeG zk^UsLBH{bc2VBW)*EdS({yw=?qmevwi?BL6*=12k9zM5gJv1>y#ML4!)iiPzVaH9% zgSImetD@dam~e>{LvVh!phhzpW+iFvWpGT#CVE5TQ40n%F|p(sP5mXxna+Ev7PDwA zamaV4m*^~*xV+&p;W749xhb_X=$|LD;FHuB&JL5?*Y2-oIT(wYY2;73<^#46S~Gx| z^cez%V7x$81}UWqS13Gz80379Rj;6~WdiXWOSsdmzY39L;Hg3MH43o*y8ibNBBH`(av4|u;YPq%{R;IuYow<+GEsf@R?=@tT@!}?#>zIIn0CoyV!hq3mw zHj>OOjfJM3F{RG#6ujzo?y32m^tgSXf@v=J$ELdJ+=5j|=F-~hP$G&}tDZsZE?5rX ztGj`!S>)CFmdkccxM9eGIcGnS2AfK#gXwj%esuIBNJQP1WV~b~+D7PJTmWGTSDrR` zEAu4B8l>NPuhsk5a`rReSya2nfV1EK01+G!x8aBdTs3Io$u5!6n6KX%uv@DxAp3F@{4UYg4SWJtQ-W~0MDb|j-$lwVn znAm*Pl!?Ps&3wO=R115RWKb*JKoexo*)uhhHBncEDMSVa_PyA>k{Zm2(wMQ(5NM3# z)jkza|GoWEQo4^s*wE(gHz?Xsg4`}HUAcs42cM1-qq_=+=!Gk^y710j=66(cSWqUe zklbm8+zB_syQv5A2rj!Vbw8;|$@C!vfNmNV!yJIWDQ>{+2x zKjuFX`~~HKG~^6h5FntRpnnHt=D&rq0>IJ9#F0eM)Y-)GpRjiN7gkA8wvnG#K=q{q z9dBn8_~wm4J<3J_vl|9H{7q6u2A!cW{bp#r*-f{gOV^e=8S{nc1DxMHFwuM$;aVI^ zz6A*}m8N-&x8;aunp1w7_vtB*pa+OYBw=TMc6QK=mbA-|Cf* zvyh8D4LRJImooUaSb7t*fVfih<97Gf@VE0|z>NcBwBQze);Rh!k3K_sfunToZY;f2 z^HmC4KjHRVg+eKYj;PRN^|E0>Gj_zagfRbrki68I^#~6-HaHg3BUW%+clM1xQEdPYt_g<2K+z!$>*$9nQ>; zf9Bei{?zY^-e{q_*|W#2rJG`2fy@{%6u0i_VEWTq$*(ZN37|8lFFFt)nCG({r!q#9 z5VK_kkSJ3?zOH)OezMT{!YkCuSSn!K#-Rhl$uUM(bq*jY? zi1xbMVthJ`E>d>(f3)~fozjg^@eheMF6<)I`oeJYx4*+M&%c9VArn(OM-wp%M<-`x z7sLP1&3^%Nld9Dhm@$3f2}87!quhI@nwd@3~fZl_3LYW-B?Ia>ui`ELg z&Qfe!7m6ze=mZ`Ia9$z|ARSw|IdMpooY4YiPN8K z4B(ts3p%2i(Td=tgEHX z0UQ_>URBtG+-?0E;E7Ld^dyZ;jjw0}XZ(}-QzC6+NN=40oDb2^v!L1g9xRvE#@IBR zO!b-2N7wVfLV;mhEaXQ9XAU+>=XVA6f&T4Z-@AX!leJ8obP^P^wP0aICND?~w&NykJ#54x3_@r7IDMdRNy4Hh;h*!u(Ol(#0bJdwEo$5437-UBjQ+j=Ic>Q2z` zJNDf0yO6@mr6y1#n3)s(W|$iE_i8r@Gd@!DWDqZ7J&~gAm1#~maIGJ1sls^gxL9LLG_NhU!pTGty!TbhzQnu)I*S^54U6Yu%ZeCg`R>Q zhBv$n5j0v%O_j{QYWG!R9W?5_b&67KB$t}&e2LdMvd(PxN6Ir!H4>PNlerpBL>Zvyy!yw z-SOo8caEpDt(}|gKPBd$qND5#a5nju^O>V&;f890?yEOfkSG^HQVmEbM3Ugzu+UtH zC(INPDdraBN?P%kE;*Ae%Wto&sgw(crfZ#Qy(<4nk;S|hD3j{IQRI6Yq|f^basLY; z-HB&Je%Gg}Jt@={_C{L$!RM;$$|iD6vu#3w?v?*;&()uB|I-XqEKqZPS!reW9JkLewLb!70T7n`i!gNtb1%vN- zySZj{8-1>6E%H&=V}LM#xmt`J3XQoaD|@XygXjdZ1+P77-=;=eYpoEQ01B@L*a(uW zrZeZz?HJsw_4g0vhUgkg@VF8<-X$B8pOqCuWAl28uB|@r`19DTUQQsb^pfqB6QtiT z*`_UZ`fT}vtUY#%sq2{rchyfu*pCg;uec2$-$N_xgjZcoumE5vSI{+s@iLWoz^Mf; zuI8kDP{!XY6OP~q5}%1&L}CtfH^N<3o4L@J@zg1-mt{9L`s^z$Vgb|mr{@WiwAqKg zp#t-lhrU>F8o0s1q_9y`gQNf~Vb!F%70f}$>i7o4ho$`uciNf=xgJ>&!gSt0g;M>*x4-`U)ysFW&Vs^Vk6m%?iuWU+o&m(2Jm26Y(3%TL; zA7T)BP{WS!&xmxNw%J=$MPfn(9*^*TV;$JwRy8Zl*yUZi8jWYF>==j~&S|Xinsb%c z2?B+kpet*muEW7@AzjBA^wAJBY8i|#C{WtO_or&Nj2{=6JTTX05}|H>N2B|Wf!*3_ z7hW*j6p3TvpghEc6-wufFiY!%-GvOx*bZrhZu+7?iSrZL5q9}igiF^*R3%DE4aCHZ zqu>xS8LkW+Auv%z-<1Xs92u23R$nk@Pk}MU5!gT|c7vGlEA%G^2th&Q*zfg%-D^=f z&J_}jskj|Q;73NP4<4k*Y%pXPU2Thoqr+5uH1yEYM|VtBPW6lXaetokD0u z9qVek6Q&wk)tFbQ8(^HGf3Wp16gKmr>G;#G(HRBx?F`9AIRboK+;OfHaLJ(P>IP0w zyTbTkx_THEOs%Q&aPrxbZrJlio+hCC_HK<4%f3ZoSAyG7Dn`=X=&h@m*|UYO-4Hq0 z-Bq&+Ie!S##4A6OGoC~>ZW`Y5J)*ouaFl_e9GA*VSL!O_@xGiBw!AF}1{tB)z(w%c zS1Hmrb9OC8>0a_$BzeiN?rkPLc9%&;1CZW*4}CDDNr2gcl_3z+WC15&H1Zc2{o~i) z)LLW=WQ{?ricmC`G1GfJ0Yp4Dy~Ba;j6ZV4r{8xRs`13{dD!xXmr^Aga|C=iSmor% z8hi|pTXH)5Yf&v~exp3o+sY4B^^b*eYkkCYl*T{*=-0HniSA_1F53eCb{x~1k3*`W zr~};p1A`k{1DV9=UPnLDgz{aJH=-LQo<5%+Em!DNN252xwIf*wF_zS^!(XSm(9eoj z=*dXG&n0>)_)N5oc6v!>-bd(2ragD8O=M|wGW z!xJQS<)u70m&6OmrF0WSsr@I%T*c#Qo#Ha4d3COcX+9}hM5!7JIGF>7<~C(Ear^Sn zm^ZFkV6~Ula6+8S?oOROOA6$C&q&dp`>oR-2Ym3(HT@O7Sd5c~+kjrmM)YmgPH*tL zX+znN>`tv;5eOfX?h{AuX^LK~V#gPCu=)Tigtq9&?7Xh$qN|%A$?V*v=&-2F$zTUv z`C#WyIrChS5|Kgm_GeudCFf;)!WH7FI60j^0o#65o6`w*S7R@)88n$1nrgU(oU0M9 zx+EuMkC>(4j1;m6NoGqEkpJYJ?vc|B zOlwT3t&UgL!pX_P*6g36`ZXQ; z9~Cv}ANFnJGp(;ZhS(@FT;3e)0)Kp;h^x;$*xZn*k0U6-&FwI=uOGaODdrsp-!K$Ac32^c{+FhI-HkYd5v=`PGsg%6I`4d9Jy)uW0y%) zm&j^9WBAp*P8#kGJUhB!L?a%h$hJgQrx!6KCB_TRo%9{t0J7KW8!o1B!NC)VGLM5! zpZy5Jc{`r{1e(jd%jsG7k%I+m#CGS*BPA65ZVW~fLYw0dA-H_}O zrkGFL&P1PG9p2(%QiEWm6x;U-U&I#;Em$nx-_I^wtgw3xUPVVu zqSuKnx&dIT-XT+T10p;yjo1Y)z(x1fb8Dzfn8e yu?e%!_ptzGB|8GrCfu%p?(_ zQccdaaVK$5bz;*rnyK{_SQYM>;aES6Qs^lj9lEs6_J+%nIiuQC*fN;z8md>r_~Mfl zU%p5Dt_YT>gQqfr@`cR!$NWr~+`CZb%dn;WtzrAOI>P_JtsB76PYe*<%H(y>qx-`Kq!X_; z<{RpAqYhE=L1r*M)gNF3B8r(<%8mo*SR2hu zccLRZwGARt)Hlo1euqTyM>^!HK*!Q2P;4UYrysje@;(<|$&%vQekbn|0Ruu_Io(w4#%p6ld2Yp7tlA`Y$cciThP zKzNGIMPXX%&Ud0uQh!uQZz|FB`4KGD?3!ND?wQt6!n*f4EmCoJUh&b?;B{|lxs#F- z31~HQ`SF4x$&v00@(P+j1pAaj5!s`)b2RDBp*PB=2IB>oBF!*6vwr7Dp%zpAx*dPr zb@Zjq^XjN?O4QcZ*O+8>)|HlrR>oD*?WQl5ri3R#2?*W6iJ>>kH%KnnME&TT@ZzrHS$Q%LC?n|e>V+D+8D zYc4)QddFz7I8#}y#Wj6>4P%34dZH~OUDb?uP%-E zwjXM(?Sg~1!|wI(RVuxbu)-rH+O=igSho_pDCw(c6b=P zKk4ATlB?bj9+HHlh<_!&z0rx13K3ZrAR8W)!@Y}o`?a*JJsD+twZIv`W)@Y?Amu_u zz``@-e2X}27$i(2=9rvIu5uTUOVhzwu%mNazS|lZb&PT;XE2|B&W1>=B58#*!~D&) zfVmJGg8UdP*fx(>Cj^?yS^zH#o-$Q-*$SnK(ZVFkw+er=>N^7!)FtP3y~Xxnu^nzY zikgB>Nj0%;WOltWIob|}%lo?_C7<``a5hEkx&1ku$|)i>Rh6@3h*`slY=9U}(Ql_< zaNG*J8vb&@zpdhAvv`?{=zDedJ23TD&Zg__snRAH4eh~^oawdYi6A3w8<Ozh@Kw)#bdktM^GVb zrG08?0bG?|NG+w^&JvD*7LAbjED{_Zkc`3H!My>0u5Q}m!+6VokMLXxl`Mkd=g&Xx z-a>m*#G3SLlhbKB!)tnzfWOBV;u;ftU}S!NdD5+YtOjLg?X}dl>7m^gOpihrf1;PY zvll&>dIuUGs{Qnd- zwIR3oIrct8Va^Tm0t#(bJD7c$Z7DO9*7NnRZorrSm`b`cxz>OIC;jSE3DO8`hX955ui`s%||YQtt2 z5DNA&pG-V+4oI2s*x^>-$6J?p=I>C|9wZF8z;VjR??Icg?1w2v5Me+FgAeGGa8(3S z4vg*$>zC-WIVZtJ7}o9{D-7d>zCe|z#<9>CFve-OPAYsneTb^JH!Enaza#j}^mXy1 z+ULn^10+rWLF6j2>Ya@@Kq?26>AqK{A_| zQKb*~F1>sE*=d?A?W7N2j?L09_7n+HGi{VY;MoTGr_)G9)ot$p!-UY5zZ2Xtbm=t z@dpPSGwgH=QtIcEulQNI>S-#ifbnO5EWkI;$A|pxJd885oM+ zGZ0_0gDvG8q2xebj+fbCHYfAXuZStH2j~|d^sBAzo46(K8n59+T6rzBwK)^rfPT+B zyIFw)9YC-V^rhtK`!3jrhmW-sTmM+tPH+;nwjL#-SjQPUZ53L@A>y*rt(#M(qsiB2 zx6B)dI}6Wlsw%bJ8h|(lhkJVogQZA&n{?Vgs6gNSXzuZpEyu*xySy8ro07QZ7Vk1!3tJphN_5V7qOiyK8p z#@jcDD8nmtYi1^l8ml;AF<#IPK?!pqf9D4moYk>d99Im}Jtwj6c#+A;f)CQ*f-hZ< z=p_T86jog%!p)D&5g9taSwYi&eP z#JuEK%+NULWus;0w32-SYFku#i}d~+{Pkho&^{;RxzP&0!RCm3-9K6`>KZpnzS6?L z^H^V*s!8<>x8bomvD%rh>Zp3>Db%kyin;qtl+jAv8Oo~1g~mqGAC&Qi_wy|xEt2iz zWAJEfTV%cl2Cs<1L&DLRVVH05EDq`pH7Oh7sR`NNkL%wi}8n>IXcO40hp+J+sC!W?!krJf!GJNE8uj zg-y~Ns-<~D?yqbzVRB}G>0A^f0!^N7l=$m0OdZuqAOQqLc zX?AEGr1Ht+inZ-Qiwnl@Z0qukd__a!C*CKuGdy5#nD7VUBM^6OCpxCa2A(X;e0&V4 zM&WR8+wErQ7UIc6LY~Q9x%Sn*Tn>>P`^t&idaOEnOd(Ufw#>NoR^1QdhJ8s`h^|R_ zXX`c5*O~Xdvh%q;7L!_!ohf$NfEBmCde|#uVZvEo>OfEq%+Ns7&_f$OR9xsihRpBb z+cjk8LyDm@U{YN>+r46?nn{7Gh(;WhFw6GAxtcKD+YWV?uge>;+q#Xx4!GpRkVZYu zzsF}1)7$?%s9g9CH=Zs+B%M_)+~*j3L0&Q9u7!|+T`^O{xE6qvAP?XWv9_MrZKdo& z%IyU)$Q95AB4!#hT!_dA>4e@zjOBD*Y=XjtMm)V|+IXzjuM;(l+8aA5#Kaz_$rR6! zj>#&^DidYD$nUY(D$mH`9eb|dtV0b{S>H6FBfq>t5`;OxA4Nn{J(+XihF(stSche7$es&~N$epi&PDM_N`As;*9D^L==2Q7Z2zD+CiU(|+-kL*VG+&9!Yb3LgPy?A zm7Z&^qRG_JIxK7-FBzZI3Q<;{`DIxtc48k> zc|0dmX;Z=W$+)qE)~`yn6MdoJ4co;%!`ddy+FV538Y)j(vg}5*k(WK)KWZ3WaOG!8 z!syGn=s{H$odtpqFrT#JGM*utN7B((abXnpDM6w56nhw}OY}0TiTG1#f*VFZr+^-g zbP10`$LPq_;PvrA1XXlyx2uM^mrjTzX}w{yuLo-cOClE8MMk47T25G8M!9Z5ypOSV zAJUBGEg5L2fY)ZGJb^E34R2zJ?}Vf>{~gB!8=5Z) z9y$>5c)=;o0HeHHSuE4U)#vG&KF|I%-cF6f$~pdYJWk_dD}iOA>iA$O$+4%@>JU08 zS`ep)$XLPJ+n0_i@PkF#ri6T8?ZeAot$6JIYHm&P6EB=BiaNY|aA$W0I+nz*zkz_z zkEru!tj!QUffq%)8y0y`T&`fuus-1p>=^hnBiBqD^hXrPs`PY9tU3m0np~rISY09> z`P3s=-kt_cYcxWd{de@}TwSqg*xVhp;E9zCsnXo6z z?f&Sv^U7n4`xr=mXle94HzOdN!2kB~4=%)u&N!+2;z6UYKUDqi-s6AZ!haB;@&B`? z_TRX0%@suz^TRdCb?!vNJYPY8L_}&07uySH9%W^Tc&1pia6y1q#?*Drf}GjGbPjBS zbOPcUY#*$3sL2x4v_i*Y=N7E$mR}J%|GUI(>WEr+28+V z%v5{#e!UF*6~G&%;l*q*$V?&r$Pp^sE^i-0$+RH3ERUUdQ0>rAq2(2QAbG}$y{de( z>{qD~GGuOk559Y@%$?N^1ApVL_a704>8OD%8Y%8B;FCt%AoPu8*D1 zLB5X>b}Syz81pn;xnB}%0FnwazlWfUV)Z-~rZg6~b z6!9J$EcE&sEbzcy?CI~=boWA&eeIa%z(7SE^qgVLz??1Vbc1*aRvc%Mri)AJaAG!p z$X!_9Ds;Zz)f+;%s&dRcJt2==P{^j3bf0M=nJd&xwUGlUFn?H=2W(*2I2Gdu zv!gYCwM10aeus)`RIZSrCK=&oKaO_Ry~D1B5!y0R=%!i2*KfXGYX&gNv_u+n9wiR5 z*e$Zjju&ODRW3phN925%S(jL+bCHv6rZtc?!*`1TyYXT6%Ju=|X;6D@lq$8T zW{Y|e39ioPez(pBH%k)HzFITXHvnD6hw^lIoUMA;qAJ^CU?top1fo@s7xT13Fvn1H z6JWa-6+FJF#x>~+A;D~;VDs26>^oH0EI`IYT2iagy23?nyJ==i{g4%HrAf1-*v zK1)~@&(KkwR7TL}L(A@C_S0G;-GMDy=MJn2$FP5s<%wC)4jC5PXoxrQBFZ_k0P{{s@sz+gX`-!=T8rcB(=7vW}^K6oLWMmp(rwDh}b zwaGGd>yEy6fHv%jM$yJXo5oMAQ>c9j`**}F?MCry;T@47@r?&sKHgVe$MCqk#Z_3S z1GZI~nOEN*P~+UaFGnj{{Jo@16`(qVNtbU>O0Hf57-P>x8Jikp=`s8xWs^dAJ9lCQ z)GFm+=OV%AMVqVATtN@|vp61VVAHRn87}%PC^RAzJ%JngmZTasWBAWsoAqBU+8L8u z4A&Pe?fmTm0?mK-BL9t+{y7o(7jm+RpOhL9KnY#E&qu^}B6=K_dB}*VlSEiC9fn)+V=J;OnN)Ta5v66ic1rG+dGAJ1 z1%Zb_+!$=tQ~lxQrzv3x#CPb?CekEkA}0MYSgx$Jdd}q8+R=ma$|&1a#)TQ=l$1tQ z=tL9&_^vJ)Pk}EDO-va`UCT1m#Uty1{v^A3P~83_#v^ozH}6*9mIjIr;t3Uv%@VeW zGL6(CwCUp)Jq%G0bIG%?{_*Y#5IHf*5M@wPo6A{$Um++Co$wLC=J1aoG93&T7Ho}P z=mGEPP7GbvoG!uD$k(H3A$Z))+i{Hy?QHdk>3xSBXR0j!11O^mEe9RHmw!pvzv?Ua~2_l2Yh~_!s1qS`|0~0)YsbHSz8!mG)WiJE| z2f($6TQtt6L_f~ApQYQKSb=`053LgrQq7G@98#igV>y#i==-nEjQ!XNu9 z~;mE+gtj4IDDNQJ~JVk5Ux6&LCSFL!y=>79kE9=V}J7tD==Ga+IW zX)r7>VZ9dY=V&}DR))xUoV!u(Z|%3ciQi_2jl}3=$Agc(`RPb z8kEBpvY>1FGQ9W$n>Cq=DIpski};nE)`p3IUw1Oz0|wxll^)4dq3;CCY@RyJgFgc# zKouFh!`?Xuo{IMz^xi-h=StCis_M7yq$u) z?XHvw*HP0VgR+KR6wI)jEMX|ssqYvSf*_3W8zVTQzD?3>H!#>InzpSO)@SC8q*ii- z%%h}_#0{4JG;Jm`4zg};BPTGkYamx$Xo#O~lBirRY)q=5M45n{GCfV7h9qwyu1NxOMoP4)jjZMxmT|IQQh0U7C$EbnMN<3)Kk?fFHYq$d|ICu>KbY_hO zTZM+uKHe(cIZfEqyzyYSUBZa8;Fcut-GN!HSA9ius`ltNebF46ZX_BbZNU}}ZOm{M2&nANL9@0qvih15(|`S~z}m&h!u4x~(%MAO$jHRWNfuxWF#B)E&g3ghSQ9|> z(MFaLQj)NE0lowyjvg8z0#m6FIuKE9lDO~Glg}nSb7`~^&#(Lw{}GVOS>U)m8bF}x zVjbXljBm34Cs-yM6TVusr+3kYFjr28STT3g056y3cH5Tmge~ASxBj z%|yb>$eF;WgrcOZf569sDZOVwoo%8>XO>XQOX1OyN9I-SQgrm;U;+#3OI(zrWyow3 zk==|{lt2xrQ%FIXOTejR>;wv(Pb8u8}BUpx?yd(Abh6? zsoO3VYWkeLnF43&@*#MQ9-i-d0t*xN-UEyNKeyNMHw|A(k(_6QKO=nKMCxD(W(Yop zsRQ)QeL4X3Lxp^L%wzi2-WVSsf61dqliPUM7srDB?Wm6Lzn0&{*}|IsKQW;02(Y&| zaTKv|`U(pSzuvR6Rduu$wzK_W-Y-7>7s?G$)U}&uK;<>vU}^^ns@Z!p+9?St1s)dG zK%y6xkPyyS1$~&6v{kl?Md6gwM|>mt6Upm>oa8RLD^8T{0?HC!Z>;(Bob7el(DV6x zi`I)$&E&ngwFS@bi4^xFLAn`=fzTC;aimE^!cMI2n@Vo%Ae-ne`RF((&5y6xsjjAZ zVguVoQ?Z9uk$2ON;ersE%PU*xGO@T*;j1BO5#TuZKEf(mB7|g7pcEA=nYJ{s3vlbg zd4-DUlD{*6o%Gc^N!Nptgay>j6E5;3psI+C3Q!1ZIbeCubW%w4pq9)MSDyB{HLm|k zxv-{$$A*pS@csolri$Ge<4VZ}e~78JOL-EVyrbxKra^d{?|NnPp86!q>t<&IP07?Z z^>~IK^k#OEKgRH+LjllZXk7iA>2cfH6+(e&9ku5poo~6y{GC5>(bRK7hwjiurqAiZ zg*DmtgY}v83IjE&AbiWgMyFbaRUPZ{lYiz$U^&Zt2YjG<%m((&_JUbZcfJ22(>bi5 z!J?<7AySj0JZ&<-qXX;mcV!f~>G=sB0KnjWca4}vrtunD^1TrpfeS^4dvFr!65knK zZh`d;*VOkPs4*-9kL>$GP0`(M!j~B;#x?Ba~&s6CopvO86oM?-? zOw#dIRc;6A6T?B`Qp%^<U5 z19x(ywSH$_N+Io!6;e?`tWaM$`=Db!gzx|lQ${DG!zb1Zl&|{kX0y6xvO1o z220r<-oaS^^R2pEyY;=Qllqpmue|5yI~D|iI!IGt@iod{Opz@*ml^w2bNs)p`M(Io z|E;;m*Xpjd9l)4G#KaWfV(t8YUn@A;nK^#xgv=LtnArX|vWQVuw3}B${h+frU2>9^ z!l6)!Uo4`5k`<<;E(ido7M6lKTgWezNLq>U*=uz&s=cc$1%>VrAeOoUtA|T6gO4>UNqsdK=NF*8|~*sl&wI=x9-EGiq*aqV!(VVXA57 zw9*o6Ir8Lj1npUXvlevtn(_+^X5rzdR>#(}4YcB9O50q97%rW2me5_L=%ffYPUSRc z!vv?Kv>dH994Qi>U(a<0KF6NH5b16enCp+mw^Hb3Xs1^tThFpz!3QuN#}KBbww`(h z7GO)1olDqy6?T$()R7y%NYx*B0k_2IBiZ14&8|JPFxeMF{vW>HF-Vi3+ZOI=+qP}n zw(+!WcTd~4ZJX1!ZM&y!+uyt=&i!+~d(V%GjH;-NsEEv6nS1TERt|RHh!0>W4+4pp z1-*EzAM~i`+1f(VEHI8So`S`akPfPTfq*`l{Fz`hS%k#JS0cjT2mS0#QLGf=J?1`he3W*;m4)ce8*WFq1sdP=~$5RlH1EdWm|~dCvKOi4*I_96{^95p#B<(n!d?B z=o`0{t+&OMwKcxiBECznJcfH!fL(z3OvmxP#oWd48|mMjpE||zdiTBdWelj8&Qosv zZFp@&UgXuvJw5y=q6*28AtxZzo-UUpkRW%ne+Ylf!V-0+uQXBW=5S1o#6LXNtY5!I z%Rkz#(S8Pjz*P7bqB6L|M#Er{|QLae-Y{KA>`^} z@lPjeX>90X|34S-7}ZVXe{wEei1<{*e8T-Nbj8JmD4iwcE+Hg_zhkPVm#=@b$;)h6 z<<6y`nPa`f3I6`!28d@kdM{uJOgM%`EvlQ5B2bL)Sl=|y@YB3KeOzz=9cUW3clPAU z^sYc}xf9{4Oj?L5MOlYxR{+>w=vJjvbyO5}ptT(o6dR|ygO$)nVCvNGnq(6;bHlBd zl?w-|plD8spjDF03g5ip;W3Z z><0{BCq!Dw;h5~#1BuQilq*TwEu)qy50@+BE4bX28+7erX{BD4H)N+7U`AVEuREE8 z;X?~fyhF-x_sRfHIj~6f(+^@H)D=ngP;mwJjxhQUbUdzk8f94Ab%59-eRIq?ZKrwD z(BFI=)xrUlgu(b|hAysqK<}8bslmNNeD=#JW*}^~Nrswn^xw*nL@Tx!49bfJecV&KC2G4q5a!NSv)06A_5N3Y?veAz;Gv+@U3R% z)~UA8-0LvVE{}8LVDOHzp~2twReqf}ODIyXMM6=W>kL|OHcx9P%+aJGYi_Om)b!xe zF40Vntn0+VP>o<$AtP&JANjXBn7$}C@{+@3I@cqlwR2MdwGhVPxlTIcRVu@Ho-wO` z_~Or~IMG)A_`6-p)KPS@cT9mu9RGA>dVh5wY$NM9-^c@N=hcNaw4ITjm;iWSP^ZX| z)_XpaI61<+La+U&&%2a z0za$)-wZP@mwSELo#3!PGTt$uy0C(nTT@9NX*r3Ctw6J~7A(m#8fE)0RBd`TdKfAT zCf@$MAxjP`O(u9s@c0Fd@|}UQ6qp)O5Q5DPCeE6mSIh|Rj{$cAVIWsA=xPKVKxdhg zLzPZ`3CS+KIO;T}0Ip!fAUaNU>++ZJZRk@I(h<)RsJUhZ&Ru9*!4Ptn;gX^~4E8W^TSR&~3BAZc#HquXn)OW|TJ`CTahk+{qe`5+ixON^zA9IFd8)kc%*!AiLu z>`SFoZ5bW-%7}xZ>gpJcx_hpF$2l+533{gW{a7ce^B9sIdmLrI0)4yivZ^(Vh@-1q zFT!NQK$Iz^xu%|EOK=n>ug;(7J4OnS$;yWmq>A;hsD_0oAbLYhW^1Vdt9>;(JIYjf zdb+&f&D4@4AS?!*XpH>8egQvSVX`36jMd>$+RgI|pEg))^djhGSo&#lhS~9%NuWfX zDDH;3T*GzRT@5=7ibO>N-6_XPBYxno@mD_3I#rDD?iADxX`! zh*v8^i*JEMzyN#bGEBz7;UYXki*Xr(9xXax(_1qVW=Ml)kSuvK$coq2A(5ZGhs_pF z$*w}FbN6+QDseuB9=fdp_MTs)nQf!2SlROQ!gBJBCXD&@-VurqHj0wm@LWX-TDmS= z71M__vAok|@!qgi#H&H%Vg-((ZfxPAL8AI{x|VV!9)ZE}_l>iWk8UPTGHs*?u7RfP z5MC&=c6X;XlUzrz5q?(!eO@~* zoh2I*%J7dF!!_!vXoSIn5o|wj1#_>K*&CIn{qSaRc&iFVxt*^20ngCL;QonIS>I5^ zMw8HXm>W0PGd*}Ko)f|~dDd%;Wu_RWI_d;&2g6R3S63Uzjd7dn%Svu-OKpx*o|N>F zZg=-~qLb~VRLpv`k zWSdfHh@?dp=s_X`{yxOlxE$4iuyS;Z-x!*E6eqmEm*j2bE@=ZI0YZ5%Yj29!5+J$4h{s($nakA`xgbO8w zi=*r}PWz#lTL_DSAu1?f%-2OjD}NHXp4pXOsCW;DS@BC3h-q4_l`<))8WgzkdXg3! zs1WMt32kS2E#L0p_|x+x**TFV=gn`m9BWlzF{b%6j-odf4{7a4y4Uaef@YaeuPhU8 zHBvRqN^;$Jizy+ z=zW{E5<>2gp$pH{M@S*!sJVQU)b*J5*bX4h>5VJve#Q6ga}cQ&iL#=(u+KroWrxa%8&~p{WEUF0il=db;-$=A;&9M{Rq`ouZ5m%BHT6%st%saGsD6)fQgLN}x@d3q>FC;=f%O3Cyg=Ke@Gh`XW za@RajqOE9UB6eE=zhG%|dYS)IW)&y&Id2n7r)6p_)vlRP7NJL(x4UbhlcFXWT8?K=%s7;z?Vjts?y2+r|uk8Wt(DM*73^W%pAkZa1Jd zNoE)8FvQA>Z`eR5Z@Ig6kS5?0h;`Y&OL2D&xnnAUzQz{YSdh0k zB3exx%A2TyI)M*EM6htrxSlep!Kk(P(VP`$p0G~f$smld6W1r_Z+o?=IB@^weq>5VYsYZZR@` z&XJFxd5{|KPZmVOSxc@^%71C@;z}}WhbF9p!%yLj3j%YOlPL5s>7I3vj25 z@xmf=*z%Wb4;Va6SDk9cv|r*lhZ`(y_*M@>q;wrn)oQx%B(2A$9(74>;$zmQ!4fN; z>XurIk-7@wZys<+7XL@0Fhe-f%*=(weaQEdR9Eh6>Kl-EcI({qoZqyzziGwpg-GM#251sK_ z=3|kitS!j%;fpc@oWn65SEL73^N&t>Ix37xgs= zYG%eQDJc|rqHFia0!_sm7`@lvcv)gfy(+KXA@E{3t1DaZ$DijWAcA)E0@X?2ziJ{v z&KOYZ|DdkM{}t+@{@*6ge}m%xfjIxi%qh`=^2Rwz@w0cCvZ&Tc#UmCDbVwABrON^x zEBK43FO@weA8s7zggCOWhMvGGE`baZ62cC)VHyy!5Zbt%ieH+XN|OLbAFPZWyC6)p z4P3%8sq9HdS3=ih^0OOlqTPbKuzQ?lBEI{w^ReUO{V?@`ARsL|S*%yOS=Z%sF)>-y z(LAQdhgAcuF6LQjRYfdbD1g4o%tV4EiK&ElLB&^VZHbrV1K>tHTO{#XTo>)2UMm`2 z^t4s;vnMQgf-njU-RVBRw0P0-m#d-u`(kq7NL&2T)TjI_@iKuPAK-@oH(J8?%(e!0Ir$yG32@CGUPn5w4)+9@8c&pGx z+K3GKESI4*`tYlmMHt@br;jBWTei&(a=iYslc^c#RU3Q&sYp zSG){)V<(g7+8W!Wxeb5zJb4XE{I|&Y4UrFWr%LHkdQ;~XU zgy^dH-Z3lmY+0G~?DrC_S4@=>0oM8Isw%g(id10gWkoz2Q%7W$bFk@mIzTCcIB(K8 zc<5h&ZzCdT=9n-D>&a8vl+=ZF*`uTvQviG_bLde*k>{^)&0o*b05x$MO3gVLUx`xZ z43j+>!u?XV)Yp@MmG%Y`+COH2?nQcMrQ%k~6#O%PeD_WvFO~Kct za4XoCM_X!c5vhRkIdV=xUB3xI2NNStK*8_Zl!cFjOvp-AY=D;5{uXj}GV{LK1~IE2 z|KffUiBaStRr;10R~K2VVtf{TzM7FaPm;Y(zQjILn+tIPSrJh&EMf6evaBKIvi42-WYU9Vhj~3< zZSM-B;E`g_o8_XTM9IzEL=9Lb^SPhe(f(-`Yh=X6O7+6ALXnTcUFpI>ekl6v)ZQeNCg2 z^H|{SKXHU*%nBQ@I3It0m^h+6tvI@FS=MYS$ZpBaG7j#V@P2ZuYySbp@hA# ze(kc;P4i_-_UDP?%<6>%tTRih6VBgScKU^BV6Aoeg6Uh(W^#J^V$Xo^4#Ekp ztqQVK^g9gKMTHvV7nb64UU7p~!B?>Y0oFH5T7#BSW#YfSB@5PtE~#SCCg3p^o=NkMk$<8- z6PT*yIKGrvne7+y3}_!AC8NNeI?iTY(&nakN>>U-zT0wzZf-RuyZk^X9H-DT_*wk= z;&0}6LsGtfVa1q)CEUPlx#(ED@-?H<1_FrHU#z5^P3lEB|qsxEyn%FOpjx z3S?~gvoXy~L(Q{Jh6*i~=f%9kM1>RGjBzQh_SaIDfSU_9!<>*Pm>l)cJD@wlyxpBV z4Fmhc2q=R_wHCEK69<*wG%}mgD1=FHi4h!98B-*vMu4ZGW~%IrYSLGU{^TuseqVgV zLP<%wirIL`VLyJv9XG_p8w@Q4HzNt-o;U@Au{7%Ji;53!7V8Rv0^Lu^Vf*sL>R(;c zQG_ZuFl)Mh-xEIkGu}?_(HwkB2jS;HdPLSxVU&Jxy9*XRG~^HY(f0g8Q}iqnVmgjI zfd=``2&8GsycjR?M%(zMjn;tn9agcq;&rR!Hp z$B*gzHsQ~aXw8c|a(L^LW(|`yGc!qOnV(ZjU_Q-4z1&0;jG&vAKuNG=F|H?@m5^N@ zq{E!1n;)kNTJ>|Hb2ODt-7U~-MOIFo%9I)_@7fnX+eMMNh>)V$IXesJpBn|uo8f~#aOFytCT zf9&%MCLf8mp4kwHTcojWmM3LU=#|{3L>E}SKwOd?%{HogCZ_Z1BSA}P#O(%H$;z7XyJ^sjGX;j5 zrzp>|Ud;*&VAU3x#f{CKwY7Vc{%TKKqmB@oTHA9;>?!nvMA;8+Jh=cambHz#J18x~ zs!dF>$*AnsQ{{82r5Aw&^7eRCdvcgyxH?*DV5(I$qXh^zS>us*I66_MbL8y4d3ULj z{S(ipo+T3Ag!+5`NU2sc+@*m{_X|&p#O-SAqF&g_n7ObB82~$p%fXA5GLHMC+#qqL zdt`sJC&6C2)=juQ_!NeD>U8lDVpAOkW*khf7MCcs$A(wiIl#B9HM%~GtQ^}yBPjT@ z+E=|A!Z?A(rwzZ;T}o6pOVqHzTr*i;Wrc%&36kc@jXq~+w8kVrs;%=IFdACoLAcCAmhFNpbP8;s`zG|HC2Gv?I~w4ITy=g$`0qMQdkijLSOtX6xW%Z9Nw<;M- zMN`c7=$QxN00DiSjbVt9Mi6-pjv*j(_8PyV-il8Q-&TwBwH1gz1uoxs6~uU}PrgWB zIAE_I-a1EqlIaGQNbcp@iI8W1sm9fBBNOk(k&iLBe%MCo#?xI$%ZmGA?=)M9D=0t7 zc)Q0LnI)kCy{`jCGy9lYX%mUsDWwsY`;jE(;Us@gmWPqjmXL+Hu#^;k%eT>{nMtzj zsV`Iy6leTA8-PndszF;N^X@CJrTw5IIm!GPeu)H2#FQitR{1p;MasQVAG3*+=9FYK zw*k!HT(YQorfQj+1*mCV458(T5=fH`um$gS38hw(OqVMyunQ;rW5aPbF##A3fGH6h z@W)i9Uff?qz`YbK4c}JzQpuxuE3pcQO)%xBRZp{zJ^-*|oryTxJ-rR+MXJ)!f=+pp z10H|DdGd2exhi+hftcYbM0_}C0ZI-2vh+$fU1acsB-YXid7O|=9L!3e@$H*6?G*Zp z%qFB(sgl=FcC=E4CYGp4CN>=M8#5r!RU!u+FJVlH6=gI5xHVD&k;Ta*M28BsxfMV~ zLz+@6TxnfLhF@5=yQo^1&S}cmTN@m!7*c6z;}~*!hNBjuE>NLVl2EwN!F+)0$R1S! zR|lF%n!9fkZ@gPW|x|B={V6x3`=jS*$Pu0+5OWf?wnIy>Y1MbbGSncpKO0qE(qO=ts z!~@&!N`10S593pVQu4FzpOh!tvg}p%zCU(aV5=~K#bKi zHdJ1>tQSrhW%KOky;iW+O_n;`l9~omqM%sdxdLtI`TrJzN6BQz+7xOl*rM>xVI2~# z)7FJ^Dc{DC<%~VS?@WXzuOG$YPLC;>#vUJ^MmtbSL`_yXtNKa$Hk+l-c!aC7gn(Cg ze?YPYZ(2Jw{SF6MiO5(%_pTo7j@&DHNW`|lD`~{iH+_eSTS&OC*2WTT*a`?|9w1dh zh1nh@$a}T#WE5$7Od~NvSEU)T(W$p$s5fe^GpG+7fdJ9=enRT9$wEk+ZaB>G3$KQO zgq?-rZZnIv!p#>Ty~}c*Lb_jxJg$eGM*XwHUwuQ|o^}b3^T6Bxx{!?va8aC@-xK*H ztJBFvFfsSWu89%@b^l3-B~O!CXs)I6Y}y#0C0U0R0WG zybjroj$io0j}3%P7zADXOwHwafT#uu*zfM!oD$6aJx7+WL%t-@6^rD_a_M?S^>c;z zMK580bZXo1f*L$CuMeM4Mp!;P@}b~$cd(s5*q~FP+NHSq;nw3fbWyH)i2)-;gQl{S zZO!T}A}fC}vUdskGSq&{`oxt~0i?0xhr6I47_tBc`fqaSrMOzR4>0H^;A zF)hX1nfHs)%Zb-(YGX;=#2R6C{BG;k=?FfP?9{_uFLri~-~AJ;jw({4MU7e*d)?P@ zXX*GkNY9ItFjhwgAIWq7Y!ksbMzfqpG)IrqKx9q{zu%Mdl+{Dis#p9q`02pr1LG8R z@As?eG!>IoROgS!@J*to<27coFc1zpkh?w=)h9CbYe%^Q!Ui46Y*HO0mr% zEff-*$ndMNw}H2a5@BsGj5oFfd!T(F&0$<{GO!Qdd?McKkorh=5{EIjDTHU`So>8V zBA-fqVLb2;u7UhDV1xMI?y>fe3~4urv3%PX)lDw+HYa;HFkaLqi4c~VtCm&Ca+9C~ zge+67hp#R9`+Euq59WhHX&7~RlXn=--m8$iZ~~1C8cv^2(qO#X0?vl91gzUKBeR1J z^p4!!&7)3#@@X&2aF2-)1Ffcc^F8r|RtdL2X%HgN&XU-KH2SLCbpw?J5xJ*!F-ypZ zMG%AJ!Pr&}`LW?E!K~=(NJxuSVTRCGJ$2a*Ao=uUDSys!OFYu!Vs2IT;xQ6EubLIl z+?+nMGeQQhh~??0!s4iQ#gm3!BpMpnY?04kK375e((Uc7B3RMj;wE?BCoQGu=UlZt!EZ1Q*auI)dj3Jj{Ujgt zW5hd~-HWBLI_3HuO) zNrb^XzPsTIb=*a69wAAA3J6AAZZ1VsYbIG}a`=d6?PjM)3EPaDpW2YP$|GrBX{q*! z$KBHNif)OKMBCFP5>!1d=DK>8u+Upm-{hj5o|Wn$vh1&K!lVfDB&47lw$tJ?d5|=B z^(_9=(1T3Fte)z^>|3**n}mIX;mMN5v2F#l(q*CvU{Ga`@VMp#%rQkDBy7kYbmb-q z<5!4iuB#Q_lLZ8}h|hPODI^U6`gzLJre9u3k3c#%86IKI*^H-@I48Bi*@avYm4v!n0+v zWu{M{&F8#p9cx+gF0yTB_<2QUrjMPo9*7^-uP#~gGW~y3nfPAoV%amgr>PSyVAd@l)}8#X zR5zV6t*uKJZL}?NYvPVK6J0v4iVpwiN|>+t3aYiZSp;m0!(1`bHO}TEtWR1tY%BPB z(W!0DmXbZAsT$iC13p4f>u*ZAy@JoLAkJhzFf1#4;#1deO8#8d&89}en&z!W&A3++^1(;>0SB1*54d@y&9Pn;^IAf3GiXbfT`_>{R+Xv; zQvgL>+0#8-laO!j#-WB~(I>l0NCMt_;@Gp_f0#^c)t?&#Xh1-7RR0@zPyBz!U#0Av zT?}n({(p?p7!4S2ZBw)#KdCG)uPnZe+U|0{BW!m)9 zi_9$F?m<`2!`JNFv+w8MK_K)qJ^aO@7-Ig>cM4-r0bi=>?B_2mFNJ}aE3<+QCzRr*NA!QjHw# z`1OsvcoD0?%jq{*7b!l|L1+Tw0TTAM4XMq7*ntc-Ived>Sj_ZtS|uVdpfg1_I9knY z2{GM_j5sDC7(W&}#s{jqbybqJWyn?{PW*&cQIU|*v8YGOKKlGl@?c#TCnmnAkAzV- zmK={|1G90zz=YUvC}+fMqts0d4vgA%t6Jhjv?d;(Z}(Ep8fTZfHA9``fdUHkA+z3+ zhh{ohP%Bj?T~{i0sYCQ}uC#5BwN`skI7`|c%kqkyWIQ;!ysvA8H`b-t()n6>GJj6xlYDu~8qX{AFo$Cm3d|XFL=4uvc?Keb zzb0ZmMoXca6Mob>JqkNuoP>B2Z>D`Q(TvrG6m`j}-1rGP!g|qoL=$FVQYxJQjFn33lODt3Wb1j8VR zlR++vIT6^DtYxAv_hxupbLLN3e0%A%a+hWTKDV3!Fjr^cWJ{scsAdfhpI)`Bms^M6 zQG$waKgFr=c|p9Piug=fcJvZ1ThMnNhQvBAg-8~b1?6wL*WyqXhtj^g(Ke}mEfZVM zJuLNTUVh#WsE*a6uqiz`b#9ZYg3+2%=C(6AvZGc=u&<6??!slB1a9K)=VL zY9EL^mfyKnD zSJyYBc_>G;5RRnrNgzJz#Rkn3S1`mZgO`(r5;Hw6MveN(URf_XS-r58Cn80K)ArH4 z#Rrd~LG1W&@ttw85cjp8xV&>$b%nSXH_*W}7Ch2pg$$c0BdEo-HWRTZcxngIBJad> z;C>b{jIXjb_9Jis?NZJsdm^EG}e*pR&DAy0EaSGi3XWTa(>C%tz1n$u?5Fb z1qtl?;_yjYo)(gB^iQq?=jusF%kywm?CJP~zEHi0NbZ);$(H$w(Hy@{i>$wcVRD_X|w-~(0Z9BJyh zhNh;+eQ9BEIs;tPz%jSVnfCP!3L&9YtEP;svoj_bNzeGSQIAjd zBss@A;)R^WAu-37RQrM%{DfBNRx>v!G31Z}8-El9IOJlb_MSoMu2}GDYycNaf>uny z+8xykD-7ONCM!APry_Lw6-yT>5!tR}W;W`C)1>pxSs5o1z#j7%m=&=7O4hz+Lsqm` z*>{+xsabZPr&X=}G@obTb{nPTkccJX8w3CG7X+1+t{JcMabv~UNv+G?txRqXib~c^Mo}`q{$`;EBNJ;#F*{gvS12kV?AZ%O0SFB$^ zn+}!HbmEj}w{Vq(G)OGAzH}R~kS^;(-s&=ectz8vN!_)Yl$$U@HNTI-pV`LSj7Opu zTZ5zZ)-S_{GcEQPIQXLQ#oMS`HPu{`SQiAZ)m1at*Hy%3xma|>o`h%E%8BEbi9p0r zVjcsh<{NBKQ4eKlXU|}@XJ#@uQw*$4BxKn6#W~I4T<^f99~(=}a`&3(ur8R9t+|AQ zWkQx7l}wa48-jO@ft2h+7qn%SJtL%~890FG0s5g*kNbL3I&@brh&f6)TlM`K^(bhr zJWM6N6x3flOw$@|C@kPi7yP&SP?bzP-E|HSXQXG>7gk|R9BTj`e=4de9C6+H7H7n# z#GJeVs1mtHhLDmVO?LkYRQc`DVOJ_vdl8VUihO-j#t=0T3%Fc1f9F73ufJz*adn*p zc%&vi(4NqHu^R>sAT_0EDjVR8bc%wTz#$;%NU-kbDyL_dg0%TFafZwZ?5KZpcuaO54Z9hX zD$u>q!-9`U6-D`E#`W~fIfiIF5_m6{fvM)b1NG3xf4Auw;Go~Fu7cth#DlUn{@~yu z=B;RT*dp?bO}o%4x7k9v{r=Y@^YQ^UUm(Qmliw8brO^=NP+UOohLYiaEB3^DB56&V zK?4jV61B|1Uj_5fBKW;8LdwOFZKWp)g{B%7g1~DgO&N& z#lisxf?R~Z@?3E$Mms$$JK8oe@X`5m98V*aV6Ua}8Xs2#A!{x?IP|N(%nxsH?^c{& z@vY&R1QmQs83BW28qAmJfS7MYi=h(YK??@EhjL-t*5W!p z^gYX!Q6-vBqcv~ruw@oMaU&qp0Fb(dbVzm5xJN%0o_^@fWq$oa3X?9s%+b)x4w-q5Koe(@j6Ez7V@~NRFvd zfBH~)U5!ix3isg`6be__wBJp=1@yfsCMw1C@y+9WYD9_C%{Q~7^0AF2KFryfLlUP# zwrtJEcH)jm48!6tUcxiurAMaiD04C&tPe6DI0#aoqz#Bt0_7_*X*TsF7u*zv(iEfA z;$@?XVu~oX#1YXtceQL{dSneL&*nDug^OW$DSLF0M1Im|sSX8R26&)<0Fbh^*l6!5wfSu8MpMoh=2l z^^0Sr$UpZp*9oqa23fcCfm7`ya2<4wzJ`Axt7e4jJrRFVf?nY~2&tRL* zd;6_njcz01c>$IvN=?K}9ie%Z(BO@JG2J}fT#BJQ+f5LFSgup7i!xWRKw6)iITjZU z%l6hPZia>R!`aZjwCp}I zg)%20;}f+&@t;(%5;RHL>K_&7MH^S+7<|(SZH!u zznW|jz$uA`P9@ZWtJgv$EFp>)K&Gt+4C6#*khZQXS*S~6N%JDT$r`aJDs9|uXWdbg zBwho$phWx}x!qy8&}6y5Vr$G{yGSE*r$^r{}pw zVTZKvikRZ`J_IJrjc=X1uw?estdwm&bEahku&D04HD+0Bm~q#YGS6gp!KLf$A{%Qd z&&yX@Hp>~(wU{|(#U&Bf92+1i&Q*-S+=y=3pSZy$#8Uc$#7oiJUuO{cE6=tsPhwPe| zxQpK>`Dbka`V)$}e6_OXKLB%i76~4N*zA?X+PrhH<&)}prET;kel24kW%+9))G^JI zsq7L{P}^#QsZViX%KgxBvEugr>ZmFqe^oAg?{EI=&_O#e)F3V#rc z8$4}0Zr19qd3tE4#$3_f=Bbx9oV6VO!d3(R===i-7p=Vj`520w0D3W6lQfY48}!D* z&)lZMG;~er2qBoI2gsX+Ts-hnpS~NYRDtPd^FPzn!^&yxRy#CSz(b&E*tL|jIkq|l zf%>)7Dtu>jCf`-7R#*GhGn4FkYf;B$+9IxmqH|lf6$4irg{0ept__%)V*R_OK=T06 zyT_m-o@Kp6U{l5h>W1hGq*X#8*y@<;vsOFqEjTQXFEotR+{3}ODDnj;o0@!bB5x=N z394FojuGOtVKBlVRLtHp%EJv_G5q=AgF)SKyRN5=cGBjDWv4LDn$IL`*=~J7u&Dy5 zrMc83y+w^F&{?X(KOOAl-sWZDb{9X9#jrQtmrEXD?;h-}SYT7yM(X_6qksM=K_a;Z z3u0qT0TtaNvDER_8x*rxXw&C^|h{P1qxK|@pS7vdlZ#P z7PdB7MmC2}%sdzAxt>;WM1s0??`1983O4nFK|hVAbHcZ3x{PzytQLkCVk7hA!Lo` zEJH?4qw|}WH{dc4z%aB=0XqsFW?^p=X}4xnCJXK%c#ItOSjdSO`UXJyuc8bh^Cf}8 z@Ht|vXd^6{Fgai8*tmyRGmD_s_nv~r^Fy7j`Bu`6=G)5H$i7Q7lvQnmea&TGvJp9a|qOrUymZ$6G|Ly z#zOCg++$3iB$!6!>215A4!iryregKuUT344X)jQb3|9qY>c0LO{6Vby05n~VFzd?q zgGZv&FGlkiH*`fTurp>B8v&nSxNz)=5IF$=@rgND4d`!AaaX;_lK~)-U8la_Wa8i?NJC@BURO*sUW)E9oyv3RG^YGfN%BmxzjlT)bp*$<| zX3tt?EAy<&K+bhIuMs-g#=d1}N_?isY)6Ay$mDOKRh z4v1asEGWoAp=srraLW^h&_Uw|6O+r;wns=uwYm=JN4Q!quD8SQRSeEcGh|Eb5Jg8m zOT}u;N|x@aq)=&;wufCc^#)5U^VcZw;d_wwaoh9$p@Xrc{DD6GZUqZ ziC6OT^zSq@-lhbgR8B+e;7_Giv;DK5gn^$bs<6~SUadiosfewWDJu`XsBfOd1|p=q zE>m=zF}!lObA%ePey~gqU8S6h-^J2Y?>7)L2+%8kV}Gp=h`Xm_}rlm)SyUS=`=S7msKu zC|T!gPiI1rWGb1z$Md?0YJQ;%>uPLOXf1Z>N~`~JHJ!^@D5kSXQ4ugnFZ>^`zH8CAiZmp z6Ms|#2gcGsQ{{u7+Nb9sA?U>(0e$5V1|WVwY`Kn)rsnnZ4=1u=7u!4WexZD^IQ1Jk zfF#NLe>W$3m&C^ULjdw+5|)-BSHwpegdyt9NYC{3@QtMfd8GrIWDu`gd0nv-3LpGCh@wgBaG z176tikL!_NXM+Bv#7q^cyn9$XSeZR6#!B4JE@GVH zoobHZN_*RF#@_SVYKkQ_igme-Y5U}cV(hkR#k1c{bQNMji zU7aE`?dHyx=1`kOYZo_8U7?3-7vHOp`Qe%Z*i+FX!s?6huNp0iCEW-Z7E&jRWmUW_ z67j>)Ew!yq)hhG4o?^z}HWH-e=es#xJUhDRc4B51M4~E-l5VZ!&zQq`gWe`?}#b~7w1LH4Xa-UCT5LXkXQWheBa2YJYbyQ zl1pXR%b(KCXMO0OsXgl0P0Og<{(@&z1aokU-Pq`eQq*JYgt8xdFQ6S z6Z3IFSua8W&M#`~*L#r>Jfd6*BzJ?JFdBR#bDv$_0N!_5vnmo@!>vULcDm`MFU823 zpG9pqjqz^FE5zMDoGqhs5OMmC{Y3iVcl>F}5Rs24Y5B^mYQ;1T&ks@pIApHOdrzXF z-SdX}Hf{X;TaSxG_T$0~#RhqKISGKNK47}0*x&nRIPtmdwxc&QT3$8&!3fWu1eZ_P zJveQj^hJL#Sn!*4k`3}(d(aasl&7G0j0-*_2xtAnoX1@9+h zO#c>YQg60Z;o{Bi=3i7S`Ic+ZE>K{(u|#)9y}q*j8uKQ1^>+(BI}m%1v3$=4ojGBc zm+o1*!T&b}-lVvZqIUBc8V}QyFEgm#oyIuC{8WqUNV{Toz`oxhYpP!_p2oHHh5P@iB*NVo~2=GQm+8Yrkm2Xjc_VyHg1c0>+o~@>*Qzo zHVBJS>$$}$_4EniTI;b1WShX<5-p#TPB&!;lP!lBVBbLOOxh6FuYloD%m;n{r|;MU3!q4AVkua~fieeWu2 zQAQ$ue(IklX6+V;F1vCu-&V?I3d42FgWgsb_e^29ol}HYft?{SLf>DrmOp9o!t>I^ zY7fBCk+E8n_|apgM|-;^=#B?6RnFKlN`oR)`e$+;D=yO-(U^jV;rft^G_zl`n7qnM zL z*-Y4Phq+ZI1$j$F-f;`CD#|`-T~OM5Q>x}a>B~Gb3-+9i>Lfr|Ca6S^8g*{*?_5!x zH_N!SoRP=gX1?)q%>QTY!r77e2j9W(I!uAz{T`NdNmPBBUzi2{`XMB^zJGGwFWeA9 z{fk33#*9SO0)DjROug+(M)I-pKA!CX;IY(#gE!UxXVsa)X!UftIN98{pt#4MJHOhY zM$_l}-TJlxY?LS6Nuz1T<44m<4i^8k@D$zuCPrkmz@sdv+{ciyFJG2Zwy&%c7;atIeTdh!a(R^QXnu1Oq1b42*OQFWnyQ zWeQrdvP|w_idy53Wa<{QH^lFmEd+VlJkyiC>6B#s)F;w-{c;aKIm;Kp50HnA-o3lY z9B~F$gJ@yYE#g#X&3ADx&tO+P_@mnQTz9gv30_sTsaGXkfNYXY{$(>*PEN3QL>I!k zp)KibPhrfX3%Z$H6SY`rXGYS~143wZrG2;=FLj50+VM6soI~up_>fU(2Wl@{BRsMi zO%sL3x?2l1cXTF)k&moNsHfQrQ+wu(gBt{sk#CU=UhrvJIncy@tJX5klLjgMn>~h= zg|FR&;@eh|C7`>s_9c~0-{IAPV){l|Ts`i=)AW;d9&KPc3fMeoTS%8@V~D8*h;&(^>yjT84MM}=%#LS7shLAuuj(0VAYoozhWjq z4LEr?wUe2^WGwdTIgWBkDUJa>YP@5d9^Rs$kCXmMRxuF*YMVrn?0NFyPl}>`&dqZb z<5eqR=ZG3>n2{6v6BvJ`YBZeeTtB88TAY(x0a58EWyuf>+^|x8Qa6wA|1Nb_p|nA zWWa}|z8a)--Wj`LqyFk_a3gN2>5{Rl_wbW?#by7&i*^hRknK%jwIH6=dQ8*-_{*x0j^DUfMX0`|K@6C<|1cgZ~D(e5vBFFm;HTZF(!vT8=T$K+|F)x3kqzBV4-=p1V(lzi(s7jdu0>LD#N=$Lk#3HkG!a zIF<7>%B7sRNzJ66KrFV76J<2bdYhxll0y2^_rdG=I%AgW4~)1Nvz=$1UkE^J%BxLo z+lUci`UcU062os*=`-j4IfSQA{w@y|3}Vk?i;&SSdh8n+$iHA#%ERL{;EpXl6u&8@ zzg}?hkEOUOJt?ZL=pWZFJ19mI1@P=$U5*Im1e_8Z${JsM>Ov?nh8Z zP5QvI!{Jy@&BP48%P2{Jr_VgzW;P@7)M9n|lDT|Ep#}7C$&ud&6>C^5ZiwKIg2McPU(4jhM!BD@@L(Gd*Nu$ji(ljZ<{FIeW_1Mmf;76{LU z-ywN~=uNN)Xi6$<12A9y)K%X|(W0p|&>>4OXB?IiYr||WKDOJPxiSe01NSV-h24^L z_>m$;|C+q!Mj**-qQ$L-*++en(g|hw;M!^%_h-iDjFHLo-n3JpB;p?+o2;`*jpvJU zLY^lt)Un4joij^^)O(CKs@7E%*!w>!HA4Q?0}oBJ7Nr8NQ7QmY^4~jvf0-`%waOLn zdNjAPaC0_7c|RVhw)+71NWjRi!y>C+Bl;Z`NiL^zn2*0kmj5gyhCLCxts*cWCdRI| zjsd=sT5BVJc^$GxP~YF$-U{-?kW6r@^vHXB%{CqYzU@1>dzf#3SYedJG-Rm6^RB7s zGM5PR(yKPKR)>?~vpUIeTP7A1sc8-knnJk*9)3t^e%izbdm>Y=W{$wm(cy1RB-19i za#828DMBY+ps#7Y8^6t)=Ea@%Nkt)O6JCx|ybC;Ap}Z@Zw~*}3P>MZLPb4Enxz9Wf zssobT^(R@KuShj8>@!1M7tm|2%-pYYDxz-5`rCbaTCG5{;Uxm z*g=+H1X8{NUvFGzz~wXa%Eo};I;~`37*WrRU&K0dPSB$yk(Z*@K&+mFal^?c zurbqB-+|Kb5|sznT;?Pj!+kgFY1#Dr;_%A(GIQC{3ct|{*Bji%FNa6c-thbpBkA;U zURV!Dr&X{0J}iht#-Qp2=xzuh(fM>zRoiGrYl5ttw2#r34gC41CCOC31m~^UPTK@s z6;A@)7O7_%C)>bnAXerYuAHdE93>j2N}H${zEc6&SbZ|-fiG*-qtGuy-qDelH(|u$ zorf8_T6Zqe#Ub!+e3oSyrskt_HyW_^5lrWt#30l)tHk|j$@YyEkXUOV;6B51L;M@=NIWZXU;GrAa(LGxO%|im%7F<-6N;en0Cr zLH>l*y?pMwt`1*cH~LdBPFY_l;~`N!Clyfr;7w<^X;&(ZiVdF1S5e(+Q%60zgh)s4 zn2yj$+mE=miVERP(g8}G4<85^-5f@qxh2ec?n+$A_`?qN=iyT1?U@t?V6DM~BIlBB z>u~eXm-aE>R0sQy!-I4xtCNi!!qh?R1!kKf6BoH2GG{L4%PAz0{Sh6xpuyI%*~u)s z%rLuFl)uQUCBQAtMyN;%)zFMx4loh7uTfKeB2Xif`lN?2gq6NhWhfz0u5WP9J>=V2 zo{mLtSy&BA!mSzs&CrKWq^y40JF5a&GSXIi2= z{EYb59J4}VwikL4P=>+mc6{($FNE@e=VUwG+KV21;<@lrN`mnz5jYGASyvz7BOG_6(p^eTxD-4O#lROgon;R35=|nj#eHIfJBYPWG>H>`dHKCDZ3`R{-?HO0mE~(5_WYcFmp8sU?wr*UkAQiNDGc6T zA%}GOLXlOWqL?WwfHO8MB#8M8*~Y*gz;1rWWoVSXP&IbKxbQ8+s%4Jnt?kDsq7btI zCDr0PZ)b;B%!lu&CT#RJzm{l{2fq|BcY85`w~3LSK<><@(2EdzFLt9Y_`;WXL6x`0 zDoQ?=?I@Hbr;*VVll1Gmd8*%tiXggMK81a+T(5Gx6;eNb8=uYn z5BG-0g>pP21NPn>$ntBh>`*})Fl|38oC^9Qz>~MAazH%3Q~Qb!ALMf$srexgPZ2@&c~+hxRi1;}+)-06)!#Mq<6GhP z-Q?qmgo${aFBApb5p}$1OJKTClfi8%PpnczyVKkoHw7Ml9e7ikrF0d~UB}i3vizos zXW4DN$SiEV9{faLt5bHy2a>33K%7Td-n5C*N;f&ZqAg#2hIqEb(y<&f4u5BWJ>2^4 z414GosL=Aom#m&=x_v<0-fp1r%oVJ{T-(xnomNJ(Dryv zh?vj+%=II_nV+@NR+(!fZZVM&(W6{6%9cm+o+Z6}KqzLw{(>E86uA1`_K$HqINlb1 zKelh3-jr2I9V?ych`{hta9wQ2c9=MM`2cC{m6^MhlL2{DLv7C^j z$xXBCnDl_;l|bPGMX@*tV)B!c|4oZyftUlP*?$YU9C_eAsuVHJ58?)zpbr30P*C`T z7y#ao`uE-SOG(Pi+`$=e^mle~)pRrdwL5)N;o{gpW21of(QE#U6w%*C~`v-z0QqBML!!5EeYA5IQB0 z^l01c;L6E(iytN!LhL}wfwP7W9PNAkb+)Cst?qg#$n;z41O4&v+8-zPs+XNb-q zIeeBCh#ivnFLUCwfS;p{LC0O7tm+Sf9Jn)~b%uwP{%69;QC)Ok0t%*a5M+=;y8j=v z#!*pp$9@!x;UMIs4~hP#pnfVc!%-D<+wsG@R2+J&%73lK|2G!EQC)O05TCV=&3g)C!lT=czLpZ@Sa%TYuoE?v8T8`V;e$#Zf2_Nj6nvBgh1)2 GZ~q4|mN%#X literal 60756 zcmb5WV{~QRw(p$^Dz@00IL3?^hro$gg*4VI_WAaTyVM5Foj~O|-84 z$;06hMwt*rV;^8iB z1~&0XWpYJmG?Ts^K9PC62H*`G}xom%S%yq|xvG~FIfP=9*f zZoDRJBm*Y0aId=qJ?7dyb)6)JGWGwe)MHeNSzhi)Ko6J<-m@v=a%NsP537lHe0R* z`If4$aaBA#S=w!2z&m>{lpTy^Lm^mg*3?M&7HFv}7K6x*cukLIGX;bQG|QWdn{%_6 zHnwBKr84#B7Z+AnBXa16a?or^R?+>$4`}{*a_>IhbjvyTtWkHw)|ay)ahWUd-qq$~ zMbh6roVsj;_qnC-R{G+Cy6bApVOinSU-;(DxUEl!i2)1EeQ9`hrfqj(nKI7?Z>Xur zoJz-a`PxkYit1HEbv|jy%~DO^13J-ut986EEG=66S}D3!L}Efp;Bez~7tNq{QsUMm zh9~(HYg1pA*=37C0}n4g&bFbQ+?-h-W}onYeE{q;cIy%eZK9wZjSwGvT+&Cgv z?~{9p(;bY_1+k|wkt_|N!@J~aoY@|U_RGoWX<;p{Nu*D*&_phw`8jYkMNpRTWx1H* z>J-Mi_!`M468#5Aix$$u1M@rJEIOc?k^QBc?T(#=n&*5eS#u*Y)?L8Ha$9wRWdH^3D4|Ps)Y?m0q~SiKiSfEkJ!=^`lJ(%W3o|CZ zSrZL-Xxc{OrmsQD&s~zPfNJOpSZUl%V8tdG%ei}lQkM+z@-4etFPR>GOH9+Y_F<3=~SXln9Kb-o~f>2a6Xz@AS3cn^;c_>lUwlK(n>z?A>NbC z`Ud8^aQy>wy=$)w;JZzA)_*Y$Z5hU=KAG&htLw1Uh00yE!|Nu{EZkch zY9O6x7Y??>!7pUNME*d!=R#s)ghr|R#41l!c?~=3CS8&zr6*aA7n9*)*PWBV2w+&I zpW1-9fr3j{VTcls1>ua}F*bbju_Xq%^v;-W~paSqlf zolj*dt`BBjHI)H9{zrkBo=B%>8}4jeBO~kWqO!~Thi!I1H(in=n^fS%nuL=X2+s!p}HfTU#NBGiwEBF^^tKU zbhhv+0dE-sbK$>J#t-J!B$TMgN@Wh5wTtK2BG}4BGfsZOoRUS#G8Cxv|6EI*n&Xxq zt{&OxCC+BNqz$9b0WM7_PyBJEVObHFh%%`~!@MNZlo*oXDCwDcFwT~Rls!aApL<)^ zbBftGKKBRhB!{?fX@l2_y~%ygNFfF(XJzHh#?`WlSL{1lKT*gJM zs>bd^H9NCxqxn(IOky5k-wALFowQr(gw%|`0991u#9jXQh?4l|l>pd6a&rx|v=fPJ z1mutj{YzpJ_gsClbWFk(G}bSlFi-6@mwoQh-XeD*j@~huW4(8ub%^I|azA)h2t#yG z7e_V_<4jlM3D(I+qX}yEtqj)cpzN*oCdYHa!nm%0t^wHm)EmFP*|FMw!tb@&`G-u~ zK)=Sf6z+BiTAI}}i{*_Ac$ffr*Wrv$F7_0gJkjx;@)XjYSh`RjAgrCck`x!zP>Ifu z&%he4P|S)H*(9oB4uvH67^0}I-_ye_!w)u3v2+EY>eD3#8QR24<;7?*hj8k~rS)~7 zSXs5ww)T(0eHSp$hEIBnW|Iun<_i`}VE0Nc$|-R}wlSIs5pV{g_Dar(Zz<4X3`W?K z6&CAIl4U(Qk-tTcK{|zYF6QG5ArrEB!;5s?tW7 zrE3hcFY&k)+)e{+YOJ0X2uDE_hd2{|m_dC}kgEKqiE9Q^A-+>2UonB+L@v3$9?AYw zVQv?X*pK;X4Ovc6Ev5Gbg{{Eu*7{N3#0@9oMI~}KnObQE#Y{&3mM4`w%wN+xrKYgD zB-ay0Q}m{QI;iY`s1Z^NqIkjrTlf`B)B#MajZ#9u41oRBC1oM1vq0i|F59> z#StM@bHt|#`2)cpl_rWB($DNJ3Lap}QM-+A$3pe}NyP(@+i1>o^fe-oxX#Bt`mcQc zb?pD4W%#ep|3%CHAYnr*^M6Czg>~L4?l16H1OozM{P*en298b+`i4$|w$|4AHbzqB zHpYUsHZET$Z0ztC;U+0*+amF!@PI%^oUIZy{`L{%O^i{Xk}X0&nl)n~tVEpcAJSJ} zverw15zP1P-O8h9nd!&hj$zuwjg?DoxYIw{jWM zW5_pj+wFy8Tsa9g<7Qa21WaV&;ejoYflRKcz?#fSH_)@*QVlN2l4(QNk| z4aPnv&mrS&0|6NHq05XQw$J^RR9T{3SOcMKCXIR1iSf+xJ0E_Wv?jEc*I#ZPzyJN2 zUG0UOXHl+PikM*&g$U@g+KbG-RY>uaIl&DEtw_Q=FYq?etc!;hEC_}UX{eyh%dw2V zTTSlap&5>PY{6I#(6`j-9`D&I#|YPP8a;(sOzgeKDWsLa!i-$frD>zr-oid!Hf&yS z!i^cr&7tN}OOGmX2)`8k?Tn!!4=tz~3hCTq_9CdiV!NIblUDxHh(FJ$zs)B2(t5@u z-`^RA1ShrLCkg0)OhfoM;4Z{&oZmAec$qV@ zGQ(7(!CBk<5;Ar%DLJ0p0!ResC#U<+3i<|vib1?{5gCebG7$F7URKZXuX-2WgF>YJ^i zMhHDBsh9PDU8dlZ$yJKtc6JA#y!y$57%sE>4Nt+wF1lfNIWyA`=hF=9Gj%sRwi@vd z%2eVV3y&dvAgyuJ=eNJR+*080dbO_t@BFJO<@&#yqTK&+xc|FRR;p;KVk@J3$S{p` zGaMj6isho#%m)?pOG^G0mzOAw0z?!AEMsv=0T>WWcE>??WS=fII$t$(^PDPMU(P>o z_*0s^W#|x)%tx8jIgZY~A2yG;US0m2ZOQt6yJqW@XNY_>_R7(Nxb8Ged6BdYW6{prd!|zuX$@Q2o6Ona8zzYC1u!+2!Y$Jc9a;wy+pXt}o6~Bu1oF1c zp7Y|SBTNi@=I(K%A60PMjM#sfH$y*c{xUgeSpi#HB`?|`!Tb&-qJ3;vxS!TIzuTZs-&%#bAkAyw9m4PJgvey zM5?up*b}eDEY+#@tKec)-c(#QF0P?MRlD1+7%Yk*jW;)`f;0a-ZJ6CQA?E%>i2Dt7T9?s|9ZF|KP4;CNWvaVKZ+Qeut;Jith_y{v*Ny6Co6!8MZx;Wgo z=qAi%&S;8J{iyD&>3CLCQdTX*$+Rx1AwA*D_J^0>suTgBMBb=*hefV+Ars#mmr+YsI3#!F@Xc1t4F-gB@6aoyT+5O(qMz*zG<9Qq*f0w^V!03rpr*-WLH}; zfM{xSPJeu6D(%8HU%0GEa%waFHE$G?FH^kMS-&I3)ycx|iv{T6Wx}9$$D&6{%1N_8 z_CLw)_9+O4&u94##vI9b-HHm_95m)fa??q07`DniVjAy`t7;)4NpeyAY(aAk(+T_O z1om+b5K2g_B&b2DCTK<>SE$Ode1DopAi)xaJjU>**AJK3hZrnhEQ9E`2=|HHe<^tv z63e(bn#fMWuz>4erc47}!J>U58%<&N<6AOAewyzNTqi7hJc|X{782&cM zHZYclNbBwU6673=!ClmxMfkC$(CykGR@10F!zN1Se83LR&a~$Ht&>~43OX22mt7tcZUpa;9@q}KDX3O&Ugp6< zLZLfIMO5;pTee1vNyVC$FGxzK2f>0Z-6hM82zKg44nWo|n}$Zk6&;5ry3`(JFEX$q zK&KivAe${e^5ZGc3a9hOt|!UOE&OocpVryE$Y4sPcs4rJ>>Kbi2_subQ9($2VN(3o zb~tEzMsHaBmBtaHAyES+d3A(qURgiskSSwUc9CfJ@99&MKp2sooSYZu+-0t0+L*!I zYagjOlPgx|lep9tiU%ts&McF6b0VE57%E0Ho%2oi?=Ks+5%aj#au^OBwNwhec zta6QAeQI^V!dF1C)>RHAmB`HnxyqWx?td@4sd15zPd*Fc9hpDXP23kbBenBxGeD$k z;%0VBQEJ-C)&dTAw_yW@k0u?IUk*NrkJ)(XEeI z9Y>6Vel>#s_v@=@0<{4A{pl=9cQ&Iah0iD0H`q)7NeCIRz8zx;! z^OO;1+IqoQNak&pV`qKW+K0^Hqp!~gSohcyS)?^P`JNZXw@gc6{A3OLZ?@1Uc^I2v z+X!^R*HCm3{7JPq{8*Tn>5;B|X7n4QQ0Bs79uTU%nbqOJh`nX(BVj!#f;#J+WZxx4 z_yM&1Y`2XzhfqkIMO7tB3raJKQS+H5F%o83bM+hxbQ zeeJm=Dvix$2j|b4?mDacb67v-1^lTp${z=jc1=j~QD>7c*@+1?py>%Kj%Ejp7Y-!? z8iYRUlGVrQPandAaxFfks53@2EC#0)%mrnmGRn&>=$H$S8q|kE_iWko4`^vCS2aWg z#!`RHUGyOt*k?bBYu3*j3u0gB#v(3tsije zgIuNNWNtrOkx@Pzs;A9un+2LX!zw+p3_NX^Sh09HZAf>m8l@O*rXy_82aWT$Q>iyy zqO7Of)D=wcSn!0+467&!Hl))eff=$aneB?R!YykdKW@k^_uR!+Q1tR)+IJb`-6=jj zymzA>Sv4>Z&g&WWu#|~GcP7qP&m*w-S$)7Xr;(duqCTe7p8H3k5>Y-n8438+%^9~K z3r^LIT_K{i7DgEJjIocw_6d0!<;wKT`X;&vv+&msmhAAnIe!OTdybPctzcEzBy88_ zWO{6i4YT%e4^WQZB)KHCvA(0tS zHu_Bg+6Ko%a9~$EjRB90`P(2~6uI@SFibxct{H#o&y40MdiXblu@VFXbhz>Nko;7R z70Ntmm-FePqhb%9gL+7U8@(ch|JfH5Fm)5${8|`Lef>LttM_iww6LW2X61ldBmG0z zax3y)njFe>j*T{i0s8D4=L>X^j0)({R5lMGVS#7(2C9@AxL&C-lZQx~czI7Iv+{%1 z2hEG>RzX4S8x3v#9sgGAnPzptM)g&LB}@%E>fy0vGSa(&q0ch|=ncKjNrK z`jA~jObJhrJ^ri|-)J^HUyeZXz~XkBp$VhcTEcTdc#a2EUOGVX?@mYx#Vy*!qO$Jv zQ4rgOJ~M*o-_Wptam=~krnmG*p^j!JAqoQ%+YsDFW7Cc9M%YPiBOrVcD^RY>m9Pd< zu}#9M?K{+;UIO!D9qOpq9yxUquQRmQNMo0pT`@$pVt=rMvyX)ph(-CCJLvUJy71DI zBk7oc7)-%ngdj~s@76Yse3L^gV0 z2==qfp&Q~L(+%RHP0n}+xH#k(hPRx(!AdBM$JCfJ5*C=K3ts>P?@@SZ_+{U2qFZb>4kZ{Go37{# zSQc+-dq*a-Vy4?taS&{Ht|MLRiS)Sn14JOONyXqPNnpq&2y~)6wEG0oNy>qvod$FF z`9o&?&6uZjhZ4_*5qWVrEfu(>_n2Xi2{@Gz9MZ8!YmjYvIMasE9yVQL10NBrTCczq zcTY1q^PF2l!Eraguf{+PtHV3=2A?Cu&NN&a8V(y;q(^_mFc6)%Yfn&X&~Pq zU1?qCj^LF(EQB1F`8NxNjyV%fde}dEa(Hx=r7$~ts2dzDwyi6ByBAIx$NllB4%K=O z$AHz1<2bTUb>(MCVPpK(E9wlLElo(aSd(Os)^Raum`d(g9Vd_+Bf&V;l=@mM=cC>) z)9b0enb)u_7V!!E_bl>u5nf&Rl|2r=2F3rHMdb7y9E}}F82^$Rf+P8%dKnOeKh1vs zhH^P*4Ydr^$)$h@4KVzxrHyy#cKmWEa9P5DJ|- zG;!Qi35Tp7XNj60=$!S6U#!(${6hyh7d4q=pF{`0t|N^|L^d8pD{O9@tF~W;#Je*P z&ah%W!KOIN;SyAEhAeTafJ4uEL`(RtnovM+cb(O#>xQnk?dzAjG^~4$dFn^<@-Na3 z395;wBnS{t*H;Jef2eE!2}u5Ns{AHj>WYZDgQJt8v%x?9{MXqJsGP|l%OiZqQ1aB! z%E=*Ig`(!tHh>}4_z5IMpg{49UvD*Pp9!pxt_gdAW%sIf3k6CTycOT1McPl=_#0?8 zVjz8Hj*Vy9c5-krd-{BQ{6Xy|P$6LJvMuX$* zA+@I_66_ET5l2&gk9n4$1M3LN8(yEViRx&mtd#LD}AqEs?RW=xKC(OCWH;~>(X6h!uDxXIPH06xh z*`F4cVlbDP`A)-fzf>MuScYsmq&1LUMGaQ3bRm6i7OsJ|%uhTDT zlvZA1M}nz*SalJWNT|`dBm1$xlaA>CCiQ zK`xD-RuEn>-`Z?M{1%@wewf#8?F|(@1e0+T4>nmlSRrNK5f)BJ2H*$q(H>zGD0>eL zQ!tl_Wk)k*e6v^m*{~A;@6+JGeWU-q9>?+L_#UNT%G?4&BnOgvm9@o7l?ov~XL+et zbGT)|G7)KAeqb=wHSPk+J1bdg7N3$vp(ekjI1D9V$G5Cj!=R2w=3*4!z*J-r-cyeb zd(i2KmX!|Lhey!snRw z?#$Gu%S^SQEKt&kep)up#j&9}e+3=JJBS(s>MH+|=R(`8xK{mmndWo_r`-w1#SeRD&YtAJ#GiVI*TkQZ}&aq<+bU2+coU3!jCI6E+Ad_xFW*ghnZ$q zAoF*i&3n1j#?B8x;kjSJD${1jdRB;)R*)Ao!9bd|C7{;iqDo|T&>KSh6*hCD!rwv= zyK#F@2+cv3=|S1Kef(E6Niv8kyLVLX&e=U;{0x{$tDfShqkjUME>f8d(5nzSkY6@! z^-0>DM)wa&%m#UF1F?zR`8Y3X#tA!*7Q$P3lZJ%*KNlrk_uaPkxw~ zxZ1qlE;Zo;nb@!SMazSjM>;34ROOoygo%SF);LL>rRonWwR>bmSd1XD^~sGSu$Gg# zFZ`|yKU0%!v07dz^v(tY%;So(e`o{ZYTX`hm;@b0%8|H>VW`*cr8R%3n|ehw2`(9B+V72`>SY}9^8oh$En80mZK9T4abVG*to;E z1_S6bgDOW?!Oy1LwYy=w3q~KKdbNtyH#d24PFjX)KYMY93{3-mPP-H>@M-_>N~DDu zENh~reh?JBAK=TFN-SfDfT^=+{w4ea2KNWXq2Y<;?(gf(FgVp8Zp-oEjKzB%2Iqj;48GmY3h=bcdYJ}~&4tS`Q1sb=^emaW$IC$|R+r-8V- zf0$gGE(CS_n4s>oicVk)MfvVg#I>iDvf~Ov8bk}sSxluG!6#^Z_zhB&U^`eIi1@j( z^CK$z^stBHtaDDHxn+R;3u+>Lil^}fj?7eaGB z&5nl^STqcaBxI@v>%zG|j))G(rVa4aY=B@^2{TFkW~YP!8!9TG#(-nOf^^X-%m9{Z zCC?iC`G-^RcBSCuk=Z`(FaUUe?hf3{0C>>$?Vs z`2Uud9M+T&KB6o4o9kvdi^Q=Bw!asPdxbe#W-Oaa#_NP(qpyF@bVxv5D5))srkU#m zj_KA+#7sqDn*Ipf!F5Byco4HOSd!Ui$l94|IbW%Ny(s1>f4|Mv^#NfB31N~kya9!k zWCGL-$0ZQztBate^fd>R!hXY_N9ZjYp3V~4_V z#eB)Kjr8yW=+oG)BuNdZG?jaZlw+l_ma8aET(s+-x+=F-t#Qoiuu1i`^x8Sj>b^U} zs^z<()YMFP7CmjUC@M=&lA5W7t&cxTlzJAts*%PBDAPuqcV5o7HEnqjif_7xGt)F% zGx2b4w{@!tE)$p=l3&?Bf#`+!-RLOleeRk3 z7#pF|w@6_sBmn1nECqdunmG^}pr5(ZJQVvAt$6p3H(16~;vO>?sTE`Y+mq5YP&PBo zvq!7#W$Gewy`;%6o^!Dtjz~x)T}Bdk*BS#=EY=ODD&B=V6TD2z^hj1m5^d6s)D*wk zu$z~D7QuZ2b?5`p)E8e2_L38v3WE{V`bVk;6fl#o2`) z99JsWhh?$oVRn@$S#)uK&8DL8>An0&S<%V8hnGD7Z^;Y(%6;^9!7kDQ5bjR_V+~wp zfx4m3z6CWmmZ<8gDGUyg3>t8wgJ5NkkiEm^(sedCicP^&3D%}6LtIUq>mXCAt{9eF zNXL$kGcoUTf_Lhm`t;hD-SE)m=iBnxRU(NyL}f6~1uH)`K!hmYZjLI%H}AmEF5RZt z06$wn63GHnApHXZZJ}s^s)j9(BM6e*7IBK6Bq(!)d~zR#rbxK9NVIlgquoMq z=eGZ9NR!SEqP6=9UQg#@!rtbbSBUM#ynF);zKX+|!Zm}*{H z+j=d?aZ2!?@EL7C~%B?6ouCKLnO$uWn;Y6Xz zX8dSwj732u(o*U3F$F=7xwxm>E-B+SVZH;O-4XPuPkLSt_?S0)lb7EEg)Mglk0#eS z9@jl(OnH4juMxY+*r03VDfPx_IM!Lmc(5hOI;`?d37f>jPP$?9jQQIQU@i4vuG6MagEoJrQ=RD7xt@8E;c zeGV*+Pt+t$@pt!|McETOE$9k=_C!70uhwRS9X#b%ZK z%q(TIUXSS^F0`4Cx?Rk07C6wI4!UVPeI~-fxY6`YH$kABdOuiRtl73MqG|~AzZ@iL&^s?24iS;RK_pdlWkhcF z@Wv-Om(Aealfg)D^adlXh9Nvf~Uf@y;g3Y)i(YP zEXDnb1V}1pJT5ZWyw=1i+0fni9yINurD=EqH^ciOwLUGi)C%Da)tyt=zq2P7pV5-G zR7!oq28-Fgn5pW|nlu^b!S1Z#r7!Wtr{5J5PQ>pd+2P7RSD?>(U7-|Y z7ZQ5lhYIl_IF<9?T9^IPK<(Hp;l5bl5tF9>X-zG14_7PfsA>6<$~A338iYRT{a@r_ zuXBaT=`T5x3=s&3=RYx6NgG>No4?5KFBVjE(swfcivcIpPQFx5l+O;fiGsOrl5teR z_Cm+;PW}O0Dwe_(4Z@XZ)O0W-v2X><&L*<~*q3dg;bQW3g7)a#3KiQP>+qj|qo*Hk z?57>f2?f@`=Fj^nkDKeRkN2d$Z@2eNKpHo}ksj-$`QKb6n?*$^*%Fb3_Kbf1(*W9K>{L$mud2WHJ=j0^=g30Xhg8$#g^?36`p1fm;;1@0Lrx+8t`?vN0ZorM zSW?rhjCE8$C|@p^sXdx z|NOHHg+fL;HIlqyLp~SSdIF`TnSHehNCU9t89yr@)FY<~hu+X`tjg(aSVae$wDG*C zq$nY(Y494R)hD!i1|IIyP*&PD_c2FPgeY)&mX1qujB1VHPG9`yFQpLFVQ0>EKS@Bp zAfP5`C(sWGLI?AC{XEjLKR4FVNw(4+9b?kba95ukgR1H?w<8F7)G+6&(zUhIE5Ef% z=fFkL3QKA~M@h{nzjRq!Y_t!%U66#L8!(2-GgFxkD1=JRRqk=n%G(yHKn%^&$dW>; zSjAcjETMz1%205se$iH_)ZCpfg_LwvnsZQAUCS#^FExp8O4CrJb6>JquNV@qPq~3A zZ<6dOU#6|8+fcgiA#~MDmcpIEaUO02L5#T$HV0$EMD94HT_eXLZ2Zi&(! z&5E>%&|FZ`)CN10tM%tLSPD*~r#--K(H-CZqIOb99_;m|D5wdgJ<1iOJz@h2Zkq?} z%8_KXb&hf=2Wza(Wgc;3v3TN*;HTU*q2?#z&tLn_U0Nt!y>Oo>+2T)He6%XuP;fgn z-G!#h$Y2`9>Jtf}hbVrm6D70|ERzLAU>3zoWhJmjWfgM^))T+2u$~5>HF9jQDkrXR z=IzX36)V75PrFjkQ%TO+iqKGCQ-DDXbaE;C#}!-CoWQx&v*vHfyI>$HNRbpvm<`O( zlx9NBWD6_e&J%Ous4yp~s6)Ghni!I6)0W;9(9$y1wWu`$gs<$9Mcf$L*piP zPR0Av*2%ul`W;?-1_-5Zy0~}?`e@Y5A&0H!^ApyVTT}BiOm4GeFo$_oPlDEyeGBbh z1h3q&Dx~GmUS|3@4V36&$2uO8!Yp&^pD7J5&TN{?xphf*-js1fP?B|`>p_K>lh{ij zP(?H%e}AIP?_i^f&Li=FDSQ`2_NWxL+BB=nQr=$ zHojMlXNGauvvwPU>ZLq!`bX-5F4jBJ&So{kE5+ms9UEYD{66!|k~3vsP+mE}x!>%P za98bAU0!h0&ka4EoiDvBM#CP#dRNdXJcb*(%=<(g+M@<)DZ!@v1V>;54En?igcHR2 zhubQMq}VSOK)onqHfczM7YA@s=9*ow;k;8)&?J3@0JiGcP! zP#00KZ1t)GyZeRJ=f0^gc+58lc4Qh*S7RqPIC6GugG1gXe$LIQMRCo8cHf^qXgAa2 z`}t>u2Cq1CbSEpLr~E=c7~=Qkc9-vLE%(v9N*&HF`(d~(0`iukl5aQ9u4rUvc8%m) zr2GwZN4!s;{SB87lJB;veebPmqE}tSpT>+`t?<457Q9iV$th%i__Z1kOMAswFldD6 ztbOvO337S5o#ZZgN2G99_AVqPv!?Gmt3pzgD+Hp3QPQ`9qJ(g=kjvD+fUSS3upJn! zqoG7acIKEFRX~S}3|{EWT$kdz#zrDlJU(rPkxjws_iyLKU8+v|*oS_W*-guAb&Pj1 z35Z`3z<&Jb@2Mwz=KXucNYdY#SNO$tcVFr9KdKm|%^e-TXzs6M`PBper%ajkrIyUe zp$vVxVs9*>Vp4_1NC~Zg)WOCPmOxI1V34QlG4!aSFOH{QqSVq1^1)- z0P!Z?tT&E-ll(pwf0?=F=yOzik=@nh1Clxr9}Vij89z)ePDSCYAqw?lVI?v?+&*zH z)p$CScFI8rrwId~`}9YWPFu0cW1Sf@vRELs&cbntRU6QfPK-SO*mqu|u~}8AJ!Q$z znzu}50O=YbjwKCuSVBs6&CZR#0FTu)3{}qJJYX(>QPr4$RqWiwX3NT~;>cLn*_&1H zaKpIW)JVJ>b{uo2oq>oQt3y=zJjb%fU@wLqM{SyaC6x2snMx-}ivfU<1- znu1Lh;i$3Tf$Kh5Uk))G!D1UhE8pvx&nO~w^fG)BC&L!_hQk%^p`Kp@F{cz>80W&T ziOK=Sq3fdRu*V0=S53rcIfWFazI}Twj63CG(jOB;$*b`*#B9uEnBM`hDk*EwSRdwP8?5T?xGUKs=5N83XsR*)a4|ijz|c{4tIU+4j^A5C<#5 z*$c_d=5ml~%pGxw#?*q9N7aRwPux5EyqHVkdJO=5J>84!X6P>DS8PTTz>7C#FO?k#edkntG+fJk8ZMn?pmJSO@`x-QHq;7^h6GEXLXo1TCNhH z8ZDH{*NLAjo3WM`xeb=X{((uv3H(8&r8fJJg_uSs_%hOH%JDD?hu*2NvWGYD+j)&` zz#_1%O1wF^o5ryt?O0n;`lHbzp0wQ?rcbW(F1+h7_EZZ9{>rePvLAPVZ_R|n@;b$;UchU=0j<6k8G9QuQf@76oiE*4 zXOLQ&n3$NR#p4<5NJMVC*S);5x2)eRbaAM%VxWu9ohlT;pGEk7;002enCbQ>2r-us z3#bpXP9g|mE`65VrN`+3mC)M(eMj~~eOf)do<@l+fMiTR)XO}422*1SL{wyY(%oMpBgJagtiDf zz>O6(m;};>Hi=t8o{DVC@YigqS(Qh+ix3Rwa9aliH}a}IlOCW1@?%h_bRbq-W{KHF z%Vo?-j@{Xi@=~Lz5uZP27==UGE15|g^0gzD|3x)SCEXrx`*MP^FDLl%pOi~~Il;dc z^hrwp9sYeT7iZ)-ajKy@{a`kr0-5*_!XfBpXwEcFGJ;%kV$0Nx;apKrur zJN2J~CAv{Zjj%FolyurtW8RaFmpn&zKJWL>(0;;+q(%(Hx!GMW4AcfP0YJ*Vz!F4g z!ZhMyj$BdXL@MlF%KeInmPCt~9&A!;cRw)W!Hi@0DY(GD_f?jeV{=s=cJ6e}JktJw zQORnxxj3mBxfrH=x{`_^Z1ddDh}L#V7i}$njUFRVwOX?qOTKjfPMBO4y(WiU<)epb zvB9L=%jW#*SL|Nd_G?E*_h1^M-$PG6Pc_&QqF0O-FIOpa4)PAEPsyvB)GKasmBoEt z?_Q2~QCYGH+hW31x-B=@5_AN870vY#KB~3a*&{I=f);3Kv7q4Q7s)0)gVYx2#Iz9g(F2;=+Iy4 z6KI^8GJ6D@%tpS^8boU}zpi=+(5GfIR)35PzrbuXeL1Y1N%JK7PG|^2k3qIqHfX;G zQ}~JZ-UWx|60P5?d1e;AHx!_;#PG%d=^X(AR%i`l0jSpYOpXoKFW~7ip7|xvN;2^? zsYC9fanpO7rO=V7+KXqVc;Q5z%Bj})xHVrgoR04sA2 zl~DAwv=!(()DvH*=lyhIlU^hBkA0$e*7&fJpB0|oB7)rqGK#5##2T`@_I^|O2x4GO z;xh6ROcV<9>?e0)MI(y++$-ksV;G;Xe`lh76T#Htuia+(UrIXrf9?

L(tZ$0BqX1>24?V$S+&kLZ`AodQ4_)P#Q3*4xg8}lMV-FLwC*cN$< zt65Rf%7z41u^i=P*qO8>JqXPrinQFapR7qHAtp~&RZ85$>ob|Js;GS^y;S{XnGiBc zGa4IGvDl?x%gY`vNhv8wgZnP#UYI-w*^4YCZnxkF85@ldepk$&$#3EAhrJY0U)lR{F6sM3SONV^+$;Zx8BD&Eku3K zKNLZyBni3)pGzU0;n(X@1fX8wYGKYMpLmCu{N5-}epPDxClPFK#A@02WM3!myN%bkF z|GJ4GZ}3sL{3{qXemy+#Uk{4>Kf8v11;f8I&c76+B&AQ8udd<8gU7+BeWC`akUU~U zgXoxie>MS@rBoyY8O8Tc&8id!w+_ooxcr!1?#rc$-|SBBtH6S?)1e#P#S?jFZ8u-Bs&k`yLqW|{j+%c#A4AQ>+tj$Y z^CZajspu$F%73E68Lw5q7IVREED9r1Ijsg#@DzH>wKseye>hjsk^{n0g?3+gs@7`i zHx+-!sjLx^fS;fY!ERBU+Q zVJ!e0hJH%P)z!y%1^ZyG0>PN@5W~SV%f>}c?$H8r;Sy-ui>aruVTY=bHe}$e zi&Q4&XK!qT7-XjCrDaufT@>ieQ&4G(SShUob0Q>Gznep9fR783jGuUynAqc6$pYX; z7*O@@JW>O6lKIk0G00xsm|=*UVTQBB`u1f=6wGAj%nHK_;Aqmfa!eAykDmi-@u%6~ z;*c!pS1@V8r@IX9j&rW&d*}wpNs96O2Ute>%yt{yv>k!6zfT6pru{F1M3P z2WN1JDYqoTB#(`kE{H676QOoX`cnqHl1Yaru)>8Ky~VU{)r#{&s86Vz5X)v15ULHA zAZDb{99+s~qI6;-dQ5DBjHJP@GYTwn;Dv&9kE<0R!d z8tf1oq$kO`_sV(NHOSbMwr=To4r^X$`sBW4$gWUov|WY?xccQJN}1DOL|GEaD_!@& z15p?Pj+>7d`@LvNIu9*^hPN)pwcv|akvYYq)ks%`G>!+!pW{-iXPZsRp8 z35LR;DhseQKWYSD`%gO&k$Dj6_6q#vjWA}rZcWtQr=Xn*)kJ9kacA=esi*I<)1>w^ zO_+E>QvjP)qiSZg9M|GNeLtO2D7xT6vsj`88sd!94j^AqxFLi}@w9!Y*?nwWARE0P znuI_7A-saQ+%?MFA$gttMV-NAR^#tjl_e{R$N8t2NbOlX373>e7Ox=l=;y#;M7asp zRCz*CLnrm$esvSb5{T<$6CjY zmZ(i{Rs_<#pWW>(HPaaYj`%YqBra=Ey3R21O7vUbzOkJJO?V`4-D*u4$Me0Bx$K(lYo`JO}gnC zx`V}a7m-hLU9Xvb@K2ymioF)vj12<*^oAqRuG_4u%(ah?+go%$kOpfb`T96P+L$4> zQ#S+sA%VbH&mD1k5Ak7^^dZoC>`1L%i>ZXmooA!%GI)b+$D&ziKrb)a=-ds9xk#~& z7)3iem6I|r5+ZrTRe_W861x8JpD`DDIYZNm{$baw+$)X^Jtjnl0xlBgdnNY}x%5za zkQ8E6T<^$sKBPtL4(1zi_Rd(tVth*3Xs!ulflX+70?gb&jRTnI8l+*Aj9{|d%qLZ+ z>~V9Z;)`8-lds*Zgs~z1?Fg?Po7|FDl(Ce<*c^2=lFQ~ahwh6rqSjtM5+$GT>3WZW zj;u~w9xwAhOc<kF}~`CJ68 z?(S5vNJa;kriPlim33{N5`C{9?NWhzsna_~^|K2k4xz1`xcui*LXL-1#Y}Hi9`Oo!zQ>x-kgAX4LrPz63uZ+?uG*84@PKq-KgQlMNRwz=6Yes) zY}>YN+qP}nwr$(CZQFjUOI=-6J$2^XGvC~EZ+vrqWaOXB$k?%Suf5k=4>AveC1aJ! ziaW4IS%F$_Babi)kA8Y&u4F7E%99OPtm=vzw$$ zEz#9rvn`Iot_z-r3MtV>k)YvErZ<^Oa${`2>MYYODSr6?QZu+be-~MBjwPGdMvGd!b!elsdi4% z`37W*8+OGulab8YM?`KjJ8e+jM(tqLKSS@=jimq3)Ea2EB%88L8CaM+aG7;27b?5` z4zuUWBr)f)k2o&xg{iZ$IQkJ+SK>lpq4GEacu~eOW4yNFLU!Kgc{w4&D$4ecm0f}~ zTTzquRW@`f0}|IILl`!1P+;69g^upiPA6F{)U8)muWHzexRenBU$E^9X-uIY2%&1w z_=#5*(nmxJ9zF%styBwivi)?#KMG96-H@hD-H_&EZiRNsfk7mjBq{L%!E;Sqn!mVX*}kXhwH6eh;b42eD!*~upVG@ z#smUqz$ICm!Y8wY53gJeS|Iuard0=;k5i5Z_hSIs6tr)R4n*r*rE`>38Pw&lkv{_r!jNN=;#?WbMj|l>cU(9trCq; z%nN~r^y7!kH^GPOf3R}?dDhO=v^3BeP5hF|%4GNQYBSwz;x({21i4OQY->1G=KFyu z&6d`f2tT9Yl_Z8YACZaJ#v#-(gcyeqXMhYGXb=t>)M@fFa8tHp2x;ODX=Ap@a5I=U z0G80^$N0G4=U(>W%mrrThl0DjyQ-_I>+1Tdd_AuB3qpYAqY54upwa3}owa|x5iQ^1 zEf|iTZxKNGRpI>34EwkIQ2zHDEZ=(J@lRaOH>F|2Z%V_t56Km$PUYu^xA5#5Uj4I4RGqHD56xT%H{+P8Ag>e_3pN$4m8n>i%OyJFPNWaEnJ4McUZPa1QmOh?t8~n& z&RulPCors8wUaqMHECG=IhB(-tU2XvHP6#NrLVyKG%Ee*mQ5Ps%wW?mcnriTVRc4J`2YVM>$ixSF2Xi+Wn(RUZnV?mJ?GRdw%lhZ+t&3s7g!~g{%m&i<6 z5{ib-<==DYG93I(yhyv4jp*y3#*WNuDUf6`vTM%c&hiayf(%=x@4$kJ!W4MtYcE#1 zHM?3xw63;L%x3drtd?jot!8u3qeqctceX3m;tWetK+>~q7Be$h>n6riK(5@ujLgRS zvOym)k+VAtyV^mF)$29Y`nw&ijdg~jYpkx%*^ z8dz`C*g=I?;clyi5|!27e2AuSa$&%UyR(J3W!A=ZgHF9OuKA34I-1U~pyD!KuRkjA zbkN!?MfQOeN>DUPBxoy5IX}@vw`EEB->q!)8fRl_mqUVuRu|C@KD-;yl=yKc=ZT0% zB$fMwcC|HE*0f8+PVlWHi>M`zfsA(NQFET?LrM^pPcw`cK+Mo0%8*x8@65=CS_^$cG{GZQ#xv($7J z??R$P)nPLodI;P!IC3eEYEHh7TV@opr#*)6A-;EU2XuogHvC;;k1aI8asq7ovoP!* z?x%UoPrZjj<&&aWpsbr>J$Er-7!E(BmOyEv!-mbGQGeJm-U2J>74>o5x`1l;)+P&~ z>}f^=Rx(ZQ2bm+YE0u=ZYrAV@apyt=v1wb?R@`i_g64YyAwcOUl=C!i>=Lzb$`tjv zOO-P#A+)t-JbbotGMT}arNhJmmGl-lyUpMn=2UacVZxmiG!s!6H39@~&uVokS zG=5qWhfW-WOI9g4!R$n7!|ViL!|v3G?GN6HR0Pt_L5*>D#FEj5wM1DScz4Jv@Sxnl zB@MPPmdI{(2D?;*wd>3#tjAirmUnQoZrVv`xM3hARuJksF(Q)wd4P$88fGYOT1p6U z`AHSN!`St}}UMBT9o7i|G`r$ zrB=s$qV3d6$W9@?L!pl0lf%)xs%1ko^=QY$ty-57=55PvP(^6E7cc zGJ*>m2=;fOj?F~yBf@K@9qwX0hA803Xw+b0m}+#a(>RyR8}*Y<4b+kpp|OS+!whP( zH`v{%s>jsQI9rd$*vm)EkwOm#W_-rLTHcZRek)>AtF+~<(did)*oR1|&~1|e36d-d zgtm5cv1O0oqgWC%Et@P4Vhm}Ndl(Y#C^MD03g#PH-TFy+7!Osv1z^UWS9@%JhswEq~6kSr2DITo59+; ze=ZC}i2Q?CJ~Iyu?vn|=9iKV>4j8KbxhE4&!@SQ^dVa-gK@YfS9xT(0kpW*EDjYUkoj! zE49{7H&E}k%5(>sM4uGY)Q*&3>{aitqdNnRJkbOmD5Mp5rv-hxzOn80QsG=HJ_atI-EaP69cacR)Uvh{G5dTpYG7d zbtmRMq@Sexey)||UpnZ?;g_KMZq4IDCy5}@u!5&B^-=6yyY{}e4Hh3ee!ZWtL*s?G zxG(A!<9o!CL+q?u_utltPMk+hn?N2@?}xU0KlYg?Jco{Yf@|mSGC<(Zj^yHCvhmyx z?OxOYoxbptDK()tsJ42VzXdINAMWL$0Gcw?G(g8TMB)Khw_|v9`_ql#pRd2i*?CZl z7k1b!jQB=9-V@h%;Cnl7EKi;Y^&NhU0mWEcj8B|3L30Ku#-9389Q+(Yet0r$F=+3p z6AKOMAIi|OHyzlHZtOm73}|ntKtFaXF2Fy|M!gOh^L4^62kGUoWS1i{9gsds_GWBc zLw|TaLP64z3z9?=R2|T6Xh2W4_F*$cq>MtXMOy&=IPIJ`;!Tw?PqvI2b*U1)25^<2 zU_ZPoxg_V0tngA0J+mm?3;OYw{i2Zb4x}NedZug!>EoN3DC{1i)Z{Z4m*(y{ov2%- zk(w>+scOO}MN!exSc`TN)!B=NUX`zThWO~M*ohqq;J2hx9h9}|s#?@eR!=F{QTrq~ zTcY|>azkCe$|Q0XFUdpFT=lTcyW##i;-e{}ORB4D?t@SfqGo_cS z->?^rh$<&n9DL!CF+h?LMZRi)qju!meugvxX*&jfD!^1XB3?E?HnwHP8$;uX{Rvp# zh|)hM>XDv$ZGg=$1{+_bA~u-vXqlw6NH=nkpyWE0u}LQjF-3NhATL@9rRxMnpO%f7 z)EhZf{PF|mKIMFxnC?*78(}{Y)}iztV12}_OXffJ;ta!fcFIVjdchyHxH=t%ci`Xd zX2AUB?%?poD6Zv*&BA!6c5S#|xn~DK01#XvjT!w!;&`lDXSJT4_j$}!qSPrb37vc{ z9^NfC%QvPu@vlxaZ;mIbn-VHA6miwi8qJ~V;pTZkKqqOii<1Cs}0i?uUIss;hM4dKq^1O35y?Yp=l4i zf{M!@QHH~rJ&X~8uATV><23zZUbs-J^3}$IvV_ANLS08>k`Td7aU_S1sLsfi*C-m1 z-e#S%UGs4E!;CeBT@9}aaI)qR-6NU@kvS#0r`g&UWg?fC7|b^_HyCE!8}nyh^~o@< zpm7PDFs9yxp+byMS(JWm$NeL?DNrMCNE!I^ko-*csB+dsf4GAq{=6sfyf4wb>?v1v zmb`F*bN1KUx-`ra1+TJ37bXNP%`-Fd`vVQFTwWpX@;s(%nDQa#oWhgk#mYlY*!d>( zE&!|ySF!mIyfING+#%RDY3IBH_fW$}6~1%!G`suHub1kP@&DoAd5~7J55;5_noPI6eLf{t;@9Kf<{aO0`1WNKd?<)C-|?C?)3s z>wEq@8=I$Wc~Mt$o;g++5qR+(6wt9GI~pyrDJ%c?gPZe)owvy^J2S=+M^ z&WhIE`g;;J^xQLVeCtf7b%Dg#Z2gq9hp_%g)-%_`y*zb; zn9`f`mUPN-Ts&fFo(aNTsXPA|J!TJ{0hZp0^;MYHLOcD=r_~~^ymS8KLCSeU3;^QzJNqS z5{5rEAv#l(X?bvwxpU;2%pQftF`YFgrD1jt2^~Mt^~G>T*}A$yZc@(k9orlCGv&|1 zWWvVgiJsCAtamuAYT~nzs?TQFt<1LSEx!@e0~@yd6$b5!Zm(FpBl;(Cn>2vF?k zOm#TTjFwd2D-CyA!mqR^?#Uwm{NBemP>(pHmM}9;;8`c&+_o3#E5m)JzfwN?(f-a4 zyd%xZc^oQx3XT?vcCqCX&Qrk~nu;fxs@JUoyVoi5fqpi&bUhQ2y!Ok2pzsFR(M(|U zw3E+kH_zmTRQ9dUMZWRE%Zakiwc+lgv7Z%|YO9YxAy`y28`Aw;WU6HXBgU7fl@dnt z-fFBV)}H-gqP!1;V@Je$WcbYre|dRdp{xt!7sL3Eoa%IA`5CAA%;Wq8PktwPdULo! z8!sB}Qt8#jH9Sh}QiUtEPZ6H0b*7qEKGJ%ITZ|vH)5Q^2m<7o3#Z>AKc%z7_u`rXA zqrCy{-{8;9>dfllLu$^M5L z-hXs))h*qz%~ActwkIA(qOVBZl2v4lwbM>9l70Y`+T*elINFqt#>OaVWoja8RMsep z6Or3f=oBnA3vDbn*+HNZP?8LsH2MY)x%c13@(XfuGR}R?Nu<|07{$+Lc3$Uv^I!MQ z>6qWgd-=aG2Y^24g4{Bw9ueOR)(9h`scImD=86dD+MnSN4$6 z^U*o_mE-6Rk~Dp!ANp#5RE9n*LG(Vg`1)g6!(XtDzsov$Dvz|Gv1WU68J$CkshQhS zCrc|cdkW~UK}5NeaWj^F4MSgFM+@fJd{|LLM)}_O<{rj z+?*Lm?owq?IzC%U%9EBga~h-cJbIu=#C}XuWN>OLrc%M@Gu~kFEYUi4EC6l#PR2JS zQUkGKrrS#6H7}2l0F@S11DP`@pih0WRkRJl#F;u{c&ZC{^$Z+_*lB)r)-bPgRFE;* zl)@hK4`tEP=P=il02x7-C7p%l=B`vkYjw?YhdJU9!P!jcmY$OtC^12w?vy3<<=tlY zUwHJ_0lgWN9vf>1%WACBD{UT)1qHQSE2%z|JHvP{#INr13jM}oYv_5#xsnv9`)UAO zuwgyV4YZ;O)eSc3(mka6=aRohi!HH@I#xq7kng?Acdg7S4vDJb6cI5fw?2z%3yR+| zU5v@Hm}vy;${cBp&@D=HQ9j7NcFaOYL zj-wV=eYF{|XTkFNM2uz&T8uH~;)^Zo!=KP)EVyH6s9l1~4m}N%XzPpduPg|h-&lL` zAXspR0YMOKd2yO)eMFFJ4?sQ&!`dF&!|niH*!^*Ml##o0M(0*uK9&yzekFi$+mP9s z>W9d%Jb)PtVi&-Ha!o~Iyh@KRuKpQ@)I~L*d`{O8!kRObjO7=n+Gp36fe!66neh+7 zW*l^0tTKjLLzr`x4`_8&on?mjW-PzheTNox8Hg7Nt@*SbE-%kP2hWYmHu#Fn@Q^J(SsPUz*|EgOoZ6byg3ew88UGdZ>9B2Tq=jF72ZaR=4u%1A6Vm{O#?@dD!(#tmR;eP(Fu z{$0O%=Vmua7=Gjr8nY%>ul?w=FJ76O2js&17W_iq2*tb!i{pt#`qZB#im9Rl>?t?0c zicIC}et_4d+CpVPx)i4~$u6N-QX3H77ez z?ZdvXifFk|*F8~L(W$OWM~r`pSk5}#F?j_5u$Obu9lDWIknO^AGu+Blk7!9Sb;NjS zncZA?qtASdNtzQ>z7N871IsPAk^CC?iIL}+{K|F@BuG2>qQ;_RUYV#>hHO(HUPpk@ z(bn~4|F_jiZi}Sad;_7`#4}EmD<1EiIxa48QjUuR?rC}^HRocq`OQPM@aHVKP9E#q zy%6bmHygCpIddPjE}q_DPC`VH_2m;Eey&ZH)E6xGeStOK7H)#+9y!%-Hm|QF6w#A( zIC0Yw%9j$s-#odxG~C*^MZ?M<+&WJ+@?B_QPUyTg9DJGtQN#NIC&-XddRsf3n^AL6 zT@P|H;PvN;ZpL0iv$bRb7|J{0o!Hq+S>_NrH4@coZtBJu#g8#CbR7|#?6uxi8d+$g z87apN>EciJZ`%Zv2**_uiET9Vk{pny&My;+WfGDw4EVL#B!Wiw&M|A8f1A@ z(yFQS6jfbH{b8Z-S7D2?Ixl`j0{+ZnpT=;KzVMLW{B$`N?Gw^Fl0H6lT61%T2AU**!sX0u?|I(yoy&Xveg7XBL&+>n6jd1##6d>TxE*Vj=8lWiG$4=u{1UbAa5QD>5_ z;Te^42v7K6Mmu4IWT6Rnm>oxrl~b<~^e3vbj-GCdHLIB_>59}Ya+~OF68NiH=?}2o zP(X7EN=quQn&)fK>M&kqF|<_*H`}c zk=+x)GU>{Af#vx&s?`UKUsz})g^Pc&?Ka@t5$n$bqf6{r1>#mWx6Ep>9|A}VmWRnowVo`OyCr^fHsf# zQjQ3Ttp7y#iQY8l`zEUW)(@gGQdt(~rkxlkefskT(t%@i8=|p1Y9Dc5bc+z#n$s13 zGJk|V0+&Ekh(F};PJzQKKo+FG@KV8a<$gmNSD;7rd_nRdc%?9)p!|B-@P~kxQG}~B zi|{0}@}zKC(rlFUYp*dO1RuvPC^DQOkX4<+EwvBAC{IZQdYxoq1Za!MW7%p7gGr=j zzWnAq%)^O2$eItftC#TTSArUyL$U54-O7e|)4_7%Q^2tZ^0-d&3J1}qCzR4dWX!)4 zzIEKjgnYgMus^>6uw4Jm8ga6>GBtMjpNRJ6CP~W=37~||gMo_p@GA@#-3)+cVYnU> zE5=Y4kzl+EbEh%dhQokB{gqNDqx%5*qBusWV%!iprn$S!;oN_6E3?0+umADVs4ako z?P+t?m?};gev9JXQ#Q&KBpzkHPde_CGu-y z<{}RRAx=xlv#mVi+Ibrgx~ujW$h{?zPfhz)Kp7kmYS&_|97b&H&1;J-mzrBWAvY} zh8-I8hl_RK2+nnf&}!W0P+>5?#?7>npshe<1~&l_xqKd0_>dl_^RMRq@-Myz&|TKZBj1=Q()) zF{dBjv5)h=&Z)Aevx}+i|7=R9rG^Di!sa)sZCl&ctX4&LScQ-kMncgO(9o6W6)yd< z@Rk!vkja*X_N3H=BavGoR0@u0<}m-7|2v!0+2h~S2Q&a=lTH91OJsvms2MT~ zY=c@LO5i`mLpBd(vh|)I&^A3TQLtr>w=zoyzTd=^f@TPu&+*2MtqE$Avf>l>}V|3-8Fp2hzo3y<)hr_|NO(&oSD z!vEjTWBxbKTiShVl-U{n*B3#)3a8$`{~Pk}J@elZ=>Pqp|MQ}jrGv7KrNcjW%TN_< zZz8kG{#}XoeWf7qY?D)L)8?Q-b@Na&>i=)(@uNo zr;cH98T3$Iau8Hn*@vXi{A@YehxDE2zX~o+RY`)6-X{8~hMpc#C`|8y> zU8Mnv5A0dNCf{Ims*|l-^ z(MRp{qoGohB34|ggDI*p!Aw|MFyJ|v+<+E3brfrI)|+l3W~CQLPbnF@G0)P~Ly!1TJLp}xh8uW`Q+RB-v`MRYZ9Gam3cM%{ zb4Cb*f)0deR~wtNb*8w-LlIF>kc7DAv>T0D(a3@l`k4TFnrO+g9XH7;nYOHxjc4lq zMmaW6qpgAgy)MckYMhl?>sq;-1E)-1llUneeA!ya9KM$)DaNGu57Z5aE>=VST$#vb zFo=uRHr$0M{-ha>h(D_boS4zId;3B|Tpqo|?B?Z@I?G(?&Iei+-{9L_A9=h=Qfn-U z1wIUnQe9!z%_j$F_{rf&`ZFSott09gY~qrf@g3O=Y>vzAnXCyL!@(BqWa)Zqt!#_k zfZHuwS52|&&)aK;CHq9V-t9qt0au{$#6c*R#e5n3rje0hic7c7m{kW$p(_`wB=Gw7 z4k`1Hi;Mc@yA7dp@r~?@rfw)TkjAW++|pkfOG}0N|2guek}j8Zen(!+@7?qt_7ndX zB=BG6WJ31#F3#Vk3=aQr8T)3`{=p9nBHlKzE0I@v`{vJ}h8pd6vby&VgFhzH|q;=aonunAXL6G2y(X^CtAhWr*jI zGjpY@raZDQkg*aMq}Ni6cRF z{oWv}5`nhSAv>usX}m^GHt`f(t8@zHc?K|y5Zi=4G*UG1Sza{$Dpj%X8 zzEXaKT5N6F5j4J|w#qlZP!zS7BT)9b+!ZSJdToqJts1c!)fwih4d31vfb{}W)EgcA zH2pZ^8_k$9+WD2n`6q5XbOy8>3pcYH9 z07eUB+p}YD@AH!}p!iKv><2QF-Y^&xx^PAc1F13A{nUeCDg&{hnix#FiO!fe(^&%Qcux!h znu*S!s$&nnkeotYsDthh1dq(iQrE|#f_=xVgfiiL&-5eAcC-> z5L0l|DVEM$#ulf{bj+Y~7iD)j<~O8CYM8GW)dQGq)!mck)FqoL^X zwNdZb3->hFrbHFm?hLvut-*uK?zXn3q1z|UX{RZ;-WiLoOjnle!xs+W0-8D)kjU#R z+S|A^HkRg$Ij%N4v~k`jyHffKaC~=wg=9)V5h=|kLQ@;^W!o2^K+xG&2n`XCd>OY5Ydi= zgHH=lgy++erK8&+YeTl7VNyVm9-GfONlSlVb3)V9NW5tT!cJ8d7X)!b-$fb!s76{t z@d=Vg-5K_sqHA@Zx-L_}wVnc@L@GL9_K~Zl(h5@AR#FAiKad8~KeWCo@mgXIQ#~u{ zgYFwNz}2b6Vu@CP0XoqJ+dm8px(5W5-Jpis97F`+KM)TuP*X8H@zwiVKDKGVp59pI zifNHZr|B+PG|7|Y<*tqap0CvG7tbR1R>jn70t1X`XJixiMVcHf%Ez*=xm1(CrTSDt z0cle!+{8*Ja&EOZ4@$qhBuKQ$U95Q%rc7tg$VRhk?3=pE&n+T3upZg^ZJc9~c2es% zh7>+|mrmA-p&v}|OtxqmHIBgUxL~^0+cpfkSK2mhh+4b=^F1Xgd2)}U*Yp+H?ls#z zrLxWg_hm}AfK2XYWr!rzW4g;+^^&bW%LmbtRai9f3PjU${r@n`JThy-cphbcwn)rq9{A$Ht`lmYKxOacy z6v2R(?gHhD5@&kB-Eg?4!hAoD7~(h>(R!s1c1Hx#s9vGPePUR|of32bS`J5U5w{F) z>0<^ktO2UHg<0{oxkdOQ;}coZDQph8p6ruj*_?uqURCMTac;>T#v+l1Tc~%^k-Vd@ zkc5y35jVNc49vZpZx;gG$h{%yslDI%Lqga1&&;mN{Ush1c7p>7e-(zp}6E7f-XmJb4nhk zb8zS+{IVbL$QVF8pf8}~kQ|dHJAEATmmnrb_wLG}-yHe>W|A&Y|;muy-d^t^<&)g5SJfaTH@P1%euONny=mxo+C z4N&w#biWY41r8k~468tvuYVh&XN&d#%QtIf9;iVXfWY)#j=l`&B~lqDT@28+Y!0E+MkfC}}H*#(WKKdJJq=O$vNYCb(ZG@p{fJgu;h z21oHQ(14?LeT>n5)s;uD@5&ohU!@wX8w*lB6i@GEH0pM>YTG+RAIWZD;4#F1&F%Jp zXZUml2sH0!lYJT?&sA!qwez6cXzJEd(1ZC~kT5kZSp7(@=H2$Azb_*W&6aA|9iwCL zdX7Q=42;@dspHDwYE?miGX#L^3xD&%BI&fN9^;`v4OjQXPBaBmOF1;#C)8XA(WFlH zycro;DS2?(G&6wkr6rqC>rqDv3nfGw3hmN_9Al>TgvmGsL8_hXx09};l9Ow@)F5@y z#VH5WigLDwZE4nh^7&@g{1FV^UZ%_LJ-s<{HN*2R$OPg@R~Z`c-ET*2}XB@9xvAjrK&hS=f|R8Gr9 zr|0TGOsI7RD+4+2{ZiwdVD@2zmg~g@^D--YL;6UYGSM8i$NbQr4!c7T9rg!8;TM0E zT#@?&S=t>GQm)*ua|?TLT2ktj#`|R<_*FAkOu2Pz$wEc%-=Y9V*$&dg+wIei3b*O8 z2|m$!jJG!J!ZGbbIa!(Af~oSyZV+~M1qGvelMzPNE_%5?c2>;MeeG2^N?JDKjFYCy z7SbPWH-$cWF9~fX%9~v99L!G(wi!PFp>rB!9xj7=Cv|F+7CsGNwY0Q_J%FID%C^CBZQfJ9K(HK%k31j~e#&?hQ zNuD6gRkVckU)v+53-fc} z7ZCzYN-5RG4H7;>>Hg?LU9&5_aua?A0)0dpew1#MMlu)LHe(M;OHjHIUl7|%%)YPo z0cBk;AOY00%Fe6heoN*$(b<)Cd#^8Iu;-2v@>cE-OB$icUF9EEoaC&q8z9}jMTT2I z8`9;jT%z0;dy4!8U;GW{i`)3!c6&oWY`J3669C!tM<5nQFFrFRglU8f)5Op$GtR-3 zn!+SPCw|04sv?%YZ(a7#L?vsdr7ss@WKAw&A*}-1S|9~cL%uA+E~>N6QklFE>8W|% zyX-qAUGTY1hQ-+um`2|&ji0cY*(qN!zp{YpDO-r>jPk*yuVSay<)cUt`t@&FPF_&$ zcHwu1(SQ`I-l8~vYyUxm@D1UEdFJ$f5Sw^HPH7b!9 zzYT3gKMF((N(v0#4f_jPfVZ=ApN^jQJe-X$`A?X+vWjLn_%31KXE*}5_}d8 zw_B1+a#6T1?>M{ronLbHIlEsMf93muJ7AH5h%;i99<~JX^;EAgEB1uHralD*!aJ@F zV2ruuFe9i2Q1C?^^kmVy921eb=tLDD43@-AgL^rQ3IO9%+vi_&R2^dpr}x{bCVPej z7G0-0o64uyWNtr*loIvslyo0%)KSDDKjfThe0hcqs)(C-MH1>bNGBDRTW~scy_{w} zp^aq8Qb!h9Lwielq%C1b8=?Z=&U)ST&PHbS)8Xzjh2DF?d{iAv)Eh)wsUnf>UtXN( zL7=$%YrZ#|^c{MYmhn!zV#t*(jdmYdCpwqpZ{v&L8KIuKn`@IIZfp!uo}c;7J57N` zAxyZ-uA4=Gzl~Ovycz%MW9ZL7N+nRo&1cfNn9(1H5eM;V_4Z_qVann7F>5f>%{rf= zPBZFaV@_Sobl?Fy&KXyzFDV*FIdhS5`Uc~S^Gjo)aiTHgn#<0C=9o-a-}@}xDor;D zZyZ|fvf;+=3MZd>SR1F^F`RJEZo+|MdyJYQAEauKu%WDol~ayrGU3zzbHKsnHKZ*z zFiwUkL@DZ>!*x05ql&EBq@_Vqv83&?@~q5?lVmffQZ+V-=qL+!u4Xs2Z2zdCQ3U7B&QR9_Iggy} z(om{Y9eU;IPe`+p1ifLx-XWh?wI)xU9ik+m#g&pGdB5Bi<`PR*?92lE0+TkRuXI)z z5LP!N2+tTc%cB6B1F-!fj#}>S!vnpgVU~3!*U1ej^)vjUH4s-bd^%B=ItQqDCGbrEzNQi(dJ`J}-U=2{7-d zK8k^Rlq2N#0G?9&1?HSle2vlkj^KWSBYTwx`2?9TU_DX#J+f+qLiZCqY1TXHFxXZqYMuD@RU$TgcnCC{_(vwZ-*uX)~go#%PK z@}2Km_5aQ~(<3cXeJN6|F8X_1@L%@xTzs}$_*E|a^_URF_qcF;Pfhoe?FTFwvjm1o z8onf@OY@jC2tVcMaZS;|T!Ks(wOgPpRzRnFS-^RZ4E!9dsnj9sFt609a|jJbb1Dt@ z<=Gal2jDEupxUSwWu6zp<<&RnAA;d&4gKVG0iu6g(DsST(4)z6R)zDpfaQ}v{5ARt zyhwvMtF%b-YazR5XLz+oh=mn;y-Mf2a8>7?2v8qX;19y?b>Z5laGHvzH;Nu9S`B8} zI)qN$GbXIQ1VL3lnof^6TS~rvPVg4V?Dl2Bb*K2z4E{5vy<(@@K_cN@U>R!>aUIRnb zL*)=787*cs#zb31zBC49x$`=fkQbMAef)L2$dR{)6BAz!t5U_B#1zZG`^neKSS22oJ#5B=gl%U=WeqL9REF2g zZnfCb0?quf?Ztj$VXvDSWoK`0L=Zxem2q}!XWLoT-kYMOx)!7fcgT35uC~0pySEme z`{wGWTkGr7>+Kb^n;W?BZH6ZP(9tQX%-7zF>vc2}LuWDI(9kh1G#7B99r4x6;_-V+k&c{nPUrR zAXJGRiMe~aup{0qzmLNjS_BC4cB#sXjckx{%_c&^xy{M61xEb>KW_AG5VFXUOjAG4 z^>Qlm9A#1N{4snY=(AmWzatb!ngqiqPbBZ7>Uhb3)dTkSGcL#&SH>iMO-IJBPua`u zo)LWZ>=NZLr758j{%(|uQuZ)pXq_4c!!>s|aDM9#`~1bzK3J1^^D#<2bNCccH7~-X}Ggi!pIIF>uFx%aPARGQsnC8ZQc8lrQ5o~smqOg>Ti^GNme94*w z)JZy{_{#$jxGQ&`M z!OMvZMHR>8*^>eS%o*6hJwn!l8VOOjZQJvh)@tnHVW&*GYPuxqXw}%M!(f-SQf`=L z5;=5w2;%82VMH6Xi&-K3W)o&K^+vJCepWZ-rW%+Dc6X3(){z$@4zjYxQ|}8UIojeC zYZpQ1dU{fy=oTr<4VX?$q)LP}IUmpiez^O&N3E_qPpchGTi5ZM6-2ScWlQq%V&R2Euz zO|Q0Hx>lY1Q1cW5xHv5!0OGU~PVEqSuy#fD72d#O`N!C;o=m+YioGu-wH2k6!t<~K zSr`E=W9)!g==~x9VV~-8{4ZN9{~-A9zJpRe%NGg$+MDuI-dH|b@BD)~>pPCGUNNzY zMDg||0@XGQgw`YCt5C&A{_+J}mvV9Wg{6V%2n#YSRN{AP#PY?1FF1#|vO_%e+#`|2*~wGAJaeRX6=IzFNeWhz6gJc8+(03Ph4y6ELAm=AkN7TOgMUEw*N{= z_)EIDQx5q22oUR+_b*tazu9+pX|n1c*IB-}{DqIj z-?E|ks{o3AGRNb;+iKcHkZvYJvFsW&83RAPs1Oh@IWy%l#5x2oUP6ZCtv+b|q>jsf zZ_9XO;V!>n`UxH1LvH8)L4?8raIvasEhkpQoJ`%!5rBs!0Tu(s_D{`4opB;57)pkX z4$A^8CsD3U5*!|bHIEqsn~{q+Ddj$ME@Gq4JXtgVz&7l{Ok!@?EA{B3P~NAqb9)4? zkQo30A^EbHfQ@87G5&EQTd`frrwL)&Yw?%-W@uy^Gn23%j?Y!Iea2xw<-f;esq zf%w5WN@E1}zyXtYv}}`U^B>W`>XPmdLj%4{P298|SisrE;7HvXX;A}Ffi8B#3Lr;1 zHt6zVb`8{#+e$*k?w8|O{Uh|&AG}|DG1PFo1i?Y*cQm$ZwtGcVgMwtBUDa{~L1KT-{jET4w60>{KZ27vXrHJ;fW{6| z=|Y4!&UX020wU1>1iRgB@Q#m~1^Z^9CG1LqDhYBrnx%IEdIty z!46iOoKlKs)c}newDG)rWUikD%j`)p z_w9Ph&e40=(2eBy;T!}*1p1f1SAUDP9iWy^u^Ubdj21Kn{46;GR+hwLO=4D11@c~V zI8x&(D({K~Df2E)Nx_yQvYfh4;MbMJ@Z}=Dt3_>iim~QZ*hZIlEs0mEb z_54+&*?wMD`2#vsQRN3KvoT>hWofI_Vf(^C1ff-Ike@h@saEf7g}<9T`W;HAne-Nd z>RR+&SP35w)xKn8^U$7))PsM!jKwYZ*RzEcG-OlTrX3}9a{q%#Un5E5W{{hp>w~;` zGky+3(vJvQyGwBo`tCpmo0mo((?nM8vf9aXrrY1Ve}~TuVkB(zeds^jEfI}xGBCM2 zL1|#tycSaWCurP+0MiActG3LCas@_@tao@(R1ANlwB$4K53egNE_;!&(%@Qo$>h`^1S_!hN6 z)vZtG$8fN!|BXBJ=SI>e(LAU(y(i*PHvgQ2llulxS8>qsimv7yL}0q_E5WiAz7)(f zC(ahFvG8&HN9+6^jGyLHM~$)7auppeWh_^zKk&C_MQ~8;N??OlyH~azgz5fe^>~7F zl3HnPN3z-kN)I$4@`CLCMQx3sG~V8hPS^}XDXZrQA>}mQPw%7&!sd(Pp^P=tgp-s^ zjl}1-KRPNWXgV_K^HkP__SR`S-|OF0bR-N5>I%ODj&1JUeAQ3$9i;B~$S6}*^tK?= z**%aCiH7y?xdY?{LgVP}S0HOh%0%LI$wRx;$T|~Y8R)Vdwa}kGWv8?SJVm^>r6+%I z#lj1aR94{@MP;t-scEYQWc#xFA30^}?|BeX*W#9OL;Q9#WqaaM546j5j29((^_8Nu z4uq}ESLr~r*O7E7$D{!k9W>`!SLoyA53i9QwRB{!pHe8um|aDE`Cg0O*{jmor)^t)3`>V>SWN-2VJcFmj^1?~tT=JrP`fVh*t zXHarp=8HEcR#vFe+1a%XXuK+)oFs`GDD}#Z+TJ}Ri`FvKO@ek2ayn}yaOi%(8p%2$ zpEu)v0Jym@f}U|-;}CbR=9{#<^z28PzkkTNvyKvJDZe+^VS2bES3N@Jq!-*}{oQlz z@8bgC_KnDnT4}d#&Cpr!%Yb?E!brx0!eVOw~;lLwUoz#Np%d$o%9scc3&zPm`%G((Le|6o1 zM(VhOw)!f84zG^)tZ1?Egv)d8cdNi+T${=5kV+j;Wf%2{3g@FHp^Gf*qO0q!u$=m9 zCaY`4mRqJ;FTH5`a$affE5dJrk~k`HTP_7nGTY@B9o9vvnbytaID;^b=Tzp7Q#DmD zC(XEN)Ktn39z5|G!wsVNnHi) z%^q94!lL|hF`IijA^9NR0F$@h7k5R^ljOW(;Td9grRN0Mb)l_l7##{2nPQ@?;VjXv zaLZG}yuf$r$<79rVPpXg?6iiieX|r#&`p#Con2i%S8*8F}(E) zI5E6c3tG*<;m~6>!&H!GJ6zEuhH7mkAzovdhLy;)q z{H2*8I^Pb}xC4s^6Y}6bJvMu=8>g&I)7!N!5QG$xseeU#CC?ZM-TbjsHwHgDGrsD= z{%f;@Sod+Ch66Ko2WF~;Ty)v>&x^aovCbCbD7>qF*!?BXmOV3(s|nxsb*Lx_2lpB7 zokUnzrk;P=T-&kUHO}td+Zdj!3n&NR?K~cRU zAXU!DCp?51{J4w^`cV#ye}(`SQhGQkkMu}O3M*BWt4UsC^jCFUy;wTINYmhD$AT;4 z?Xd{HaJjP`raZ39qAm;%beDbrLpbRf(mkKbANan7XsL>_pE2oo^$TgdidjRP!5-`% zv0d!|iKN$c0(T|L0C~XD0aS8t{*&#LnhE;1Kb<9&=c2B+9JeLvJr*AyyRh%@jHej=AetOMSlz^=!kxX>>B{2B1uIrQyfd8KjJ+DBy!h)~*(!|&L4^Q_07SQ~E zcemVP`{9CwFvPFu7pyVGCLhH?LhEVb2{7U+Z_>o25#+3<|8%1T^5dh}*4(kfJGry} zm%r#hU+__Z;;*4fMrX=Bkc@7|v^*B;HAl0((IBPPii%X9+u3DDF6%bI&6?Eu$8&aWVqHIM7mK6?Uvq$1|(-T|)IV<>e?!(rY zqkmO1MRaLeTR=)io(0GVtQT@s6rN%C6;nS3@eu;P#ry4q;^O@1ZKCJyp_Jo)Ty^QW z+vweTx_DLm{P-XSBj~Sl<%_b^$=}odJ!S2wAcxenmzFGX1t&Qp8Vxz2VT`uQsQYtdn&_0xVivIcxZ_hnrRtwq4cZSj1c-SG9 z7vHBCA=fd0O1<4*=lu$6pn~_pVKyL@ztw1swbZi0B?spLo56ZKu5;7ZeUml1Ws1?u zqMf1p{5myAzeX$lAi{jIUqo1g4!zWLMm9cfWcnw`k6*BR^?$2(&yW?>w;G$EmTA@a z6?y#K$C~ZT8+v{87n5Dm&H6Pb_EQ@V0IWmG9cG=O;(;5aMWWrIPzz4Q`mhK;qQp~a z+BbQrEQ+w{SeiuG-~Po5f=^EvlouB@_|4xQXH@A~KgpFHrwu%dwuCR)=B&C(y6J4J zvoGk9;lLs9%iA-IJGU#RgnZZR+@{5lYl8(e1h6&>Vc_mvg0d@);X zji4T|n#lB!>pfL|8tQYkw?U2bD`W{na&;*|znjmalA&f;*U++_aBYerq;&C8Kw7mI z7tsG*?7*5j&dU)Lje;^{D_h`%(dK|pB*A*1(Jj)w^mZ9HB|vGLkF1GEFhu&rH=r=8 zMxO42e{Si6$m+Zj`_mXb&w5Q(i|Yxyg?juUrY}78uo@~3v84|8dfgbPd0iQJRdMj< zncCNGdMEcsxu#o#B5+XD{tsg*;j-eF8`mp~K8O1J!Z0+>0=7O=4M}E?)H)ENE;P*F z$Ox?ril_^p0g7xhDUf(q652l|562VFlC8^r8?lQv;TMvn+*8I}&+hIQYh2 z1}uQQaag&!-+DZ@|C+C$bN6W;S-Z@)d1|en+XGvjbOxCa-qAF*LA=6s(Jg+g;82f$ z(Vb)8I)AH@cdjGFAR5Rqd0wiNCu!xtqWbcTx&5kslzTb^7A78~Xzw1($UV6S^VWiP zFd{Rimd-0CZC_Bu(WxBFW7+k{cOW7DxBBkJdJ;VsJ4Z@lERQr%3eVv&$%)b%<~ zCl^Y4NgO}js@u{|o~KTgH}>!* z_iDNqX2(As7T0xivMH|3SC1ivm8Q}6Ffcd7owUKN5lHAtzMM4<0v+ykUT!QiowO;`@%JGv+K$bBx@*S7C8GJVqQ_K>12}M`f_Ys=S zKFh}HM9#6Izb$Y{wYzItTy+l5U2oL%boCJn?R3?jP@n$zSIwlmyGq30Cw4QBO|14` zW5c);AN*J3&eMFAk$SR~2k|&+&Bc$e>s%c{`?d~85S-UWjA>DS5+;UKZ}5oVa5O(N zqqc@>)nee)+4MUjH?FGv%hm2{IlIF-QX}ym-7ok4Z9{V+ZHVZQl$A*x!(q%<2~iVv znUa+BX35&lCb#9VE-~Y^W_f;Xhl%vgjwdjzMy$FsSIj&ok}L+X`4>J=9BkN&nu^E*gbhj3(+D>C4E z@Fwq_=N)^bKFSHTzZk?-gNU$@l}r}dwGyh_fNi=9b|n}J>&;G!lzilbWF4B}BBq4f zYIOl?b)PSh#XTPp4IS5ZR_2C!E)Z`zH0OW%4;&~z7UAyA-X|sh9@~>cQW^COA9hV4 zXcA6qUo9P{bW1_2`eo6%hgbN%(G-F1xTvq!sc?4wN6Q4`e9Hku zFwvlAcRY?6h^Fj$R8zCNEDq8`=uZB8D-xn)tA<^bFFy}4$vA}Xq0jAsv1&5!h!yRA zU()KLJya5MQ`q&LKdH#fwq&(bNFS{sKlEh_{N%{XCGO+po#(+WCLmKW6&5iOHny>g z3*VFN?mx!16V5{zyuMWDVP8U*|BGT$(%IO|)?EF|OI*sq&RovH!N%=>i_c?K*A>>k zyg1+~++zY4Q)J;VWN0axhoIKx;l&G$gvj(#go^pZskEVj8^}is3Jw26LzYYVos0HX zRPvmK$dVxM8(Tc?pHFe0Z3uq){{#OK3i-ra#@+;*=ui8)y6hsRv z4Fxx1c1+fr!VI{L3DFMwXKrfl#Q8hfP@ajgEau&QMCxd{g#!T^;ATXW)nUg&$-n25 zruy3V!!;{?OTobo|0GAxe`Acn3GV@W=&n;~&9 zQM>NWW~R@OYORkJAo+eq1!4vzmf9K%plR4(tB@TR&FSbDoRgJ8qVcH#;7lQub*nq&?Z>7WM=oeEVjkaG zT#f)=o!M2DO5hLR+op>t0CixJCIeXH*+z{-XS|%jx)y(j&}Wo|3!l7{o)HU3m7LYyhv*xF&tq z%IN7N;D4raue&&hm0xM=`qv`+TK@;_xAcGKuK(2|75~ar2Yw)geNLSmVxV@x89bQu zpViVKKnlkwjS&&c|-X6`~xdnh}Ps)Hs z4VbUL^{XNLf7_|Oi>tA%?SG5zax}esF*FH3d(JH^Gvr7Rp*n=t7frH!U;!y1gJB^i zY_M$KL_}mW&XKaDEi9K-wZR|q*L32&m+2n_8lq$xRznJ7p8}V>w+d@?uB!eS3#u<} zIaqi!b!w}a2;_BfUUhGMy#4dPx>)_>yZ`ai?Rk`}d0>~ce-PfY-b?Csd(28yX22L% zI7XI>OjIHYTk_@Xk;Gu^F52^Gn6E1&+?4MxDS2G_#PQ&yXPXP^<-p|2nLTb@AAQEY zI*UQ9Pmm{Kat}wuazpjSyXCdnrD&|C1c5DIb1TnzF}f4KIV6D)CJ!?&l&{T)e4U%3HTSYqsQ zo@zWB1o}ceQSV)<4G<)jM|@@YpL+XHuWsr5AYh^Q{K=wSV99D~4RRU52FufmMBMmd z_H}L#qe(}|I9ZyPRD6kT>Ivj&2Y?qVZq<4bG_co_DP`sE*_Xw8D;+7QR$Uq(rr+u> z8bHUWbV19i#)@@G4bCco@Xb<8u~wVDz9S`#k@ciJtlu@uP1U0X?yov8v9U3VOig2t zL9?n$P3=1U_Emi$#slR>N5wH-=J&T=EdUHA}_Z zZIl3nvMP*AZS9{cDqFanrA~S5BqxtNm9tlu;^`)3X&V4tMAkJ4gEIPl= zoV!Gyx0N{3DpD@)pv^iS*dl2FwANu;1;%EDl}JQ7MbxLMAp>)UwNwe{=V}O-5C*>F zu?Ny+F64jZn<+fKjF01}8h5H_3pey|;%bI;SFg$w8;IC<8l|3#Lz2;mNNik6sVTG3 z+Su^rIE#40C4a-587$U~%KedEEw1%r6wdvoMwpmlXH$xPnNQN#f%Z7|p)nC>WsuO= z4zyqapLS<8(UJ~Qi9d|dQijb_xhA2)v>la)<1md5s^R1N&PiuA$^k|A<+2C?OiHbj z>Bn$~t)>Y(Zb`8hW7q9xQ=s>Rv81V+UiuZJc<23HplI88isqRCId89fb`Kt|CxVIg znWcwprwXnotO>3s&Oypkte^9yJjlUVVxSe%_xlzmje|mYOVPH^vjA=?6xd0vaj0Oz zwJ4OJNiFdnHJX3rw&inskjryukl`*fRQ#SMod5J|KroJRsVXa5_$q7whSQ{gOi*s0 z1LeCy|JBWRsDPn7jCb4s(p|JZiZ8+*ExC@Vj)MF|*Vp{B(ziccSn`G1Br9bV(v!C2 z6#?eqpJBc9o@lJ#^p-`-=`4i&wFe>2)nlPK1p9yPFzJCzBQbpkcR>={YtamIw)3nt z(QEF;+)4`>8^_LU)_Q3 zC5_7lgi_6y>U%m)m@}Ku4C}=l^J=<<7c;99ec3p{aR+v=diuJR7uZi%aQv$oP?dn?@6Yu_+*^>T0ptf(oobdL;6)N-I!TO`zg^Xbv3#L0I~sn@WGk-^SmPh5>W+LB<+1PU}AKa?FCWF|qMNELOgdxR{ zbqE7@jVe+FklzdcD$!(A$&}}H*HQFTJ+AOrJYnhh}Yvta(B zQ_bW4Rr;R~&6PAKwgLWXS{Bnln(vUI+~g#kl{r+_zbngT`Y3`^Qf=!PxN4IYX#iW4 zucW7@LLJA9Zh3(rj~&SyN_pjO8H&)|(v%!BnMWySBJV=eSkB3YSTCyIeJ{i;(oc%_hk{$_l;v>nWSB)oVeg+blh=HB5JSlG_r7@P z3q;aFoZjD_qS@zygYqCn=;Zxjo!?NK!%J$ z52lOP`8G3feEj+HTp@Tnn9X~nG=;tS+z}u{mQX_J0kxtr)O30YD%oo)L@wy`jpQYM z@M>Me=95k1p*FW~rHiV1CIfVc{K8r|#Kt(ApkXKsDG$_>76UGNhHExFCw#Ky9*B-z zNq2ga*xax!HMf_|Vp-86r{;~YgQKqu7%szk8$hpvi_2I`OVbG1doP(`gn}=W<8%Gn z%81#&WjkH4GV;4u43EtSW>K_Ta3Zj!XF?;SO3V#q=<=>Tc^@?A`i;&`-cYj|;^ zEo#Jl5zSr~_V-4}y8pnufXLa80vZY4z2ko7fj>DR)#z=wWuS1$$W!L?(y}YC+yQ|G z@L&`2upy3f>~*IquAjkVNU>}c10(fq#HdbK$~Q3l6|=@-eBbo>B9(6xV`*)sae58*f zym~RRVx;xoCG3`JV`xo z!lFw)=t2Hy)e!IFs?0~7osWk(d%^wxq&>_XD4+U#y&-VF%4z?XH^i4w`TxpF{`XhZ z%G}iEzf!T(l>g;W9<~K+)$g!{UvhW{E0Lis(S^%I8OF&%kr!gJ&fMOpM=&=Aj@wuL zBX?*6i51Qb$uhkwkFYkaD_UDE+)rh1c;(&Y=B$3)J&iJfQSx!1NGgPtK!$c9OtJuu zX(pV$bfuJpRR|K(dp@^j}i&HeJOh@|7lWo8^$*o~Xqo z5Sb+!EtJ&e@6F+h&+_1ETbg7LfP5GZjvIUIN3ibCOldAv z)>YdO|NH$x7AC8dr=<2ekiY1%fN*r~e5h6Yaw<{XIErujKV~tiyrvV_DV0AzEknC- zR^xKM3i<1UkvqBj3C{wDvytOd+YtDSGu!gEMg+!&|8BQrT*|p)(dwQLEy+ zMtMzij3zo40)CA!BKZF~yWg?#lWhqD3@qR)gh~D{uZaJO;{OWV8XZ_)J@r3=)T|kt zUS1pXr6-`!Z}w2QR7nP%d?ecf90;K_7C3d!UZ`N(TZoWNN^Q~RjVhQG{Y<%E1PpV^4 z-m-K+$A~-+VDABs^Q@U*)YvhY4Znn2^w>732H?NRK(5QSS$V@D7yz2BVX4)f5A04~$WbxGOam22>t&uD)JB8-~yiQW6ik;FGblY_I>SvB_z2?PS z*Qm&qbKI{H1V@YGWzpx`!v)WeLT02};JJo*#f$a*FH?IIad-^(;9XC#YTWN6;Z6+S zm4O1KH=#V@FJw7Pha0!9Vb%ZIM$)a`VRMoiN&C|$YA3~ZC*8ayZRY^fyuP6$n%2IU z$#XceYZeqLTXw(m$_z|33I$B4k~NZO>pP6)H_}R{E$i%USGy{l{-jOE;%CloYPEU+ zRFxOn4;7lIOh!7abb23YKD+_-?O z0FP9otcAh+oSj;=f#$&*ExUHpd&e#bSF%#8*&ItcL2H$Sa)?pt0Xtf+t)z$_u^wZi z44oE}r4kIZGy3!Mc8q$B&6JqtnHZ>Znn!Zh@6rgIu|yU+zG8q`q9%B18|T|oN3zMq z`l&D;U!OL~%>vo&q0>Y==~zLiCZk4v%s_7!9DxQ~id1LLE93gf*gg&2$|hB#j8;?3 z5v4S;oM6rT{Y;I+#FdmNw z){d%tNM<<#GN%n9ox7B=3#;u7unZ~tLB_vRZ52a&2=IM)2VkXm=L+Iqq~uk#Dug|x z>S84e+A7EiOY5lj*!q?6HDkNh~0g;0Jy(al!ZHHDtur9T$y-~)94HelX1NHjXWIM7UAe}$?jiz z9?P4`I0JM=G5K{3_%2jPLC^_Mlw?-kYYgb7`qGa3@dn|^1fRMwiyM@Ch z;CB&o7&&?c5e>h`IM;Wnha0QKnEp=$hA8TJgR-07N~U5(>9vJzeoFsSRBkDq=x(YgEMpb=l4TDD`2 zwVJpWGTA_u7}?ecW7s6%rUs&NXD3+n;jB86`X?8(l3MBo6)PdakI6V6a}22{)8ilT zM~T*mU}__xSy|6XSrJ^%lDAR3Lft%+yxC|ZUvSO_nqMX!_ul3;R#*{~4DA=h$bP)%8Yv9X zyp><|e8=_ttI}ZAwOd#dlnSjck#6%273{E$kJuCGu=I@O)&6ID{nWF5@gLb16sj|&Sb~+du4e4O_%_o`Ix4NRrAsyr1_}MuP94s>de8cH-OUkVPk3+K z&jW)It9QiU-ti~AuJkL`XMca8Oh4$SyJ=`-5WU<{cIh+XVH#e4d&zive_UHC!pN>W z3TB;Mn5i)9Qn)#6@lo4QpI3jFYc0~+jS)4AFz8fVC;lD^+idw^S~Qhq>Tg(!3$yLD zzktzoFrU@6s4wwCMz}edpF5i5Q1IMmEJQHzp(LAt)pgN3&O!&d?3W@6U4)I^2V{;- z6A(?zd93hS*uQmnh4T)nHnE{wVhh(=MMD(h(P4+^p83Om6t<*cUW>l(qJzr%5vp@K zN27ka(L{JX=1~e2^)F^i=TYj&;<7jyUUR2Bek^A8+3Up*&Xwc{)1nRR5CT8vG>ExV zHnF3UqXJOAno_?bnhCX-&kwI~Ti8t4`n0%Up>!U`ZvK^w2+0Cs-b9%w%4`$+To|k= zKtgc&l}P`*8IS>8DOe?EB84^kx4BQp3<7P{Pq}&p%xF_81pg!l2|u=&I{AuUgmF5n zJQCTLv}%}xbFGYtKfbba{CBo)lWW%Z>i(_NvLhoQZ*5-@2l&x>e+I~0Nld3UI9tdL zRzu8}i;X!h8LHVvN?C+|M81e>Jr38%&*9LYQec9Ax>?NN+9(_>XSRv&6hlCYB`>Qm z1&ygi{Y()OU4@D_jd_-7vDILR{>o|7-k)Sjdxkjgvi{@S>6GqiF|o`*Otr;P)kLHN zZkpts;0zw_6;?f(@4S1FN=m!4^mv~W+lJA`&7RH%2$)49z0A+8@0BCHtj|yH--AEL z0tW6G%X-+J+5a{5*WKaM0QDznf;V?L5&uQw+yegDNDP`hA;0XPYc6e0;Xv6|i|^F2WB)Z$LR|HR4 zTQsRAby9(^Z@yATyOgcfQw7cKyr^3Tz7lc7+JEwwzA7)|2x+PtEb>nD(tpxJQm)Kn zW9K_*r!L%~N*vS8<5T=iv|o!zTe9k_2jC_j*7ik^M_ zaf%k{WX{-;0*`t`G!&`eW;gChVXnJ-Rn)To8vW-?>>a%QU1v`ZC=U)f8iA@%JG0mZ zDqH;~mgBnrCP~1II<=V9;EBL)J+xzCoiRBaeH&J6rL!{4zIY8tZka?_FBeQeNO3q6 zyG_alW54Ba&wQf{&F1v-r1R6ID)PTsqjIBc+5MHkcW5Fnvi~{-FjKe)t1bl}Y;z@< z=!%zvpRua>>t_x}^}z0<7MI!H2v6|XAyR9!t50q-A)xk0nflgF4*OQlCGK==4S|wc zRMsSscNhRzHMBU8TdcHN!q^I}x0iXJ%uehac|Zs_B$p@CnF)HeXPpB_Za}F{<@6-4 zl%kml@}kHQ(ypD8FsPJ2=14xXJE|b20RUIgs!2|R3>LUMGF6X*B_I|$`Qg=;zm7C z{mEDy9dTmPbued7mlO@phdmAmJ7p@GR1bjCkMw6*G7#4+`k>fk1czdJUB!e@Q(~6# zwo%@p@V5RL0ABU2LH7Asq^quDUho@H>eTZH9f*no9fY0T zD_-9px3e}A!>>kv5wk91%C9R1J_Nh!*&Kk$J3KNxC}c_@zlgpJZ+5L)Nw|^p=2ue}CJtm;uj*Iqr)K})kA$xtNUEvX;4!Px*^&9T_`IN{D z{6~QY=Nau6EzpvufB^hflc#XIsSq0Y9(nf$d~6ZwK}fal92)fr%T3=q{0mP-EyP_G z)UR5h@IX}3Qll2b0oCAcBF>b*@Etu*aTLPU<%C>KoOrk=x?pN!#f_Og-w+;xbFgjQ zXp`et%lDBBh~OcFnMKMUoox0YwBNy`N0q~bSPh@+enQ=4RUw1) zpovN`QoV>vZ#5LvC;cl|6jPr}O5tu!Ipoyib8iXqy}TeJ;4+_7r<1kV0v5?Kv>fYp zg>9L`;XwXa&W7-jf|9~uP2iyF5`5AJ`Q~p4eBU$MCC00`rcSF>`&0fbd^_eqR+}mK z4n*PMMa&FOcc)vTUR zlDUAn-mh`ahi_`f`=39JYTNVjsTa_Y3b1GOIi)6dY)D}xeshB0T8Eov5%UhWd1)u}kjEQ|LDo{tqKKrYIfVz~@dp!! zMOnah@vp)%_-jDTUG09l+;{CkDCH|Q{NqX*uHa1YxFShy*1+;J`gywKaz|2Q{lG8x zP?KBur`}r`!WLKXY_K;C8$EWG>jY3UIh{+BLv0=2)KH%P}6xE2kg)%(-uA6lC?u8}{K(#P*c zE9C8t*u%j2r_{;Rpe1A{9nNXU;b_N0vNgyK!EZVut~}+R2rcbsHilqsOviYh-pYX= zHw@53nlmwYI5W5KP>&`dBZe0Jn?nAdC^HY1wlR6$u^PbpB#AS&5L6zqrXN&7*N2Q` z+Rae1EwS)H=aVSIkr8Ek^1jy2iS2o7mqm~Mr&g5=jjt7VxwglQ^`h#Mx+x2v|9ZAwE$i_9918MjJxTMr?n!bZ6n$}y11u8I9COTU`Z$Fi z!AeAQLMw^gp_{+0QTEJrhL424pVDp%wpku~XRlD3iv{vQ!lAf!_jyqd_h}+Tr1XG| z`*FT*NbPqvHCUsYAkFnM`@l4u_QH&bszpUK#M~XLJt{%?00GXY?u_{gj3Hvs!=N(I z(=AuWPijyoU!r?aFTsa8pLB&cx}$*%;K$e*XqF{~*rA-qn)h^!(-;e}O#B$|S~c+U zN4vyOK0vmtx$5K!?g*+J@G1NmlEI=pyZXZ69tAv=@`t%ag_Hk{LP~OH9iE)I= zaJ69b4kuCkV0V zo(M0#>phpQ_)@j;h%m{-a*LGi(72TP)ws2w*@4|C-3+;=5DmC4s7Lp95%n%@Ko zfdr3-a7m*dys9iIci$A=4NPJ`HfJ;hujLgU)ZRuJI`n;Pw|yksu!#LQnJ#dJysgNb z@@qwR^wrk(jbq4H?d!lNyy72~Dnn87KxsgQ!)|*m(DRM+eC$wh7KnS-mho3|KE)7h zK3k;qZ;K1Lj6uEXLYUYi)1FN}F@-xJ z@@3Hb84sl|j{4$3J}aTY@cbX@pzB_qM~APljrjju6P0tY{C@ zpUCOz_NFmALMv1*blCcwUD3?U6tYs+N%cmJ98D%3)%)Xu^uvzF zS5O!sc#X6?EwsYkvPo6A%O8&y8sCCQH<%f2togVwW&{M;PR!a(ZT_A+jVAbf{@5kL zB@Z(hb$3U{T_}SKA_CoQVU-;j>2J=L#lZ~aQCFg-d<9rzs$_gO&d5N6eFSc z1ml8)P*FSi+k@!^M9nDWR5e@ATD8oxtDu=36Iv2!;dZzidIS(PCtEuXAtlBb1;H%Z zwnC^Ek*D)EX4#Q>R$$WA2sxC_t(!!6Tr?C#@{3}n{<^o;9id1RA&-Pig1e-2B1XpG zliNjgmd3c&%A}s>qf{_j#!Z`fu0xIwm4L0)OF=u(OEmp;bLCIaZX$&J_^Z%4Sq4GZ zPn6sV_#+6pJmDN_lx@1;Zw6Md_p0w9h6mHtzpuIEwNn>OnuRSC2=>fP^Hqgc)xu^4 z<3!s`cORHJh#?!nKI`Et7{3C27+EuH)Gw1f)aoP|B3y?fuVfvpYYmmukx0ya-)TQX zR{ggy5cNf4X|g)nl#jC9p>7|09_S7>1D2GTRBUTW zAkQ=JMRogZqG#v;^=11O6@rPPwvJkr{bW-Qg8`q8GoD#K`&Y+S#%&B>SGRL>;ZunM@49!}Uy zN|bBCJ%sO;@3wl0>0gbl3L@1^O60ONObz8ZI7nder>(udj-jt`;yj^nTQ$L9`OU9W zX4alF#$|GiR47%x@s&LV>2Sz2R6?;2R~5k6V>)nz!o_*1Y!$p>BC5&?hJg_MiE6UBy>RkVZj`9UWbRkN-Hk!S`=BS3t3uyX6)7SF#)71*}`~Ogz z1rap5H6~dhBJ83;q-Y<5V35C2&F^JI-it(=5D#v!fAi9p#UwV~2tZQI+W(Dv?1t9? zfh*xpxxO{-(VGB>!Q&0%^YW_F!@aZS#ucP|YaD#>wd1Fv&Z*SR&mc;asi}1G) z_H>`!akh-Zxq9#io(7%;a$)w+{QH)Y$?UK1Dt^4)up!Szcxnu}kn$0afcfJL#IL+S z5gF_Y30j;{lNrG6m~$Ay?)*V9fZuU@3=kd40=LhazjFrau>(Y>SJNtOz>8x_X-BlA zIpl{i>OarVGj1v(4?^1`R}aQB&WCRQzS~;7R{tDZG=HhgrW@B`W|#cdyj%YBky)P= zpxuOZkW>S6%q7U{VsB#G(^FMsH5QuGXhb(sY+!-R8Bmv6Sx3WzSW<1MPPN1!&PurYky(@`bP9tz z52}LH9Q?+FF5jR6-;|+GVdRA!qtd;}*-h&iIw3Tq3qF9sDIb1FFxGbo&fbG5n8$3F zyY&PWL{ys^dTO}oZ#@sIX^BKW*bon=;te9j5k+T%wJ zNJtoN1~YVj4~YRrlZl)b&kJqp+Z`DqT!la$x&&IxgOQw#yZd-nBP3!7FijBXD|IsU8Zl^ zc6?MKpJQ+7ka|tZQLfchD$PD|;K(9FiLE|eUZX#EZxhG!S-63C$jWX1Yd!6-Yxi-u zjULIr|0-Q%D9jz}IF~S%>0(jOqZ(Ln<$9PxiySr&2Oic7vb<8q=46)Ln%Z|<*z5&> z3f~Zw@m;vR(bESB<=Jqkxn(=#hQw42l(7)h`vMQQTttz9XW6^|^8EK7qhju4r_c*b zJIi`)MB$w@9epwdIfnEBR+?~);yd6C(LeMC& zn&&N*?-g&BBJcV;8&UoZi4Lmxcj16ojlxR~zMrf=O_^i1wGb9X-0@6_rpjPYemIin zmJb+;lHe;Yp=8G)Q(L1bzH*}I>}uAqhj4;g)PlvD9_e_ScR{Ipq|$8NvAvLD8MYr}xl=bU~)f%B3E>r3Bu9_t|ThF3C5~BdOve zEbk^r&r#PT&?^V1cb{72yEWH}TXEE}w>t!cY~rA+hNOTK8FAtIEoszp!qqptS&;r$ zaYV-NX96-h$6aR@1xz6_E0^N49mU)-v#bwtGJm)ibygzJ8!7|WIrcb`$XH~^!a#s& z{Db-0IOTFq#9!^j!n_F}#Z_nX{YzBK8XLPVmc&X`fT7!@$U-@2KM9soGbmOSAmqV z{nr$L^MBo_u^Joyf0E^=eo{Rt0{{e$IFA(#*kP@SQd6lWT2-#>` zP1)7_@IO!9lk>Zt?#CU?cuhiLF&)+XEM9B)cS(gvQT!X3`wL*{fArTS;Ak`J<84du zALKPz4}3nlG8Fo^MH0L|oK2-4xIY!~Oux~1sw!+It)&D3p;+N8AgqKI`ld6v71wy8I!eP0o~=RVcFQR2Gr(eP_JbSytoQ$Yt}l*4r@A8Me94y z8cTDWhqlq^qoAhbOzGBXv^Wa4vUz$(7B!mX`T=x_ueKRRDfg&Uc-e1+z4x$jyW_Pm zp?U;-R#xt^Z8Ev~`m`iL4*c#65Nn)q#=Y0l1AuD&+{|8-Gsij3LUZXpM0Bx0u7WWm zH|%yE@-#XEph2}-$-thl+S;__ciBxSSzHveP%~v}5I%u!z_l_KoW{KRx2=eB33umE zIYFtu^5=wGU`Jab8#}cnYry@9p5UE#U|VVvx_4l49JQ;jQdp(uw=$^A$EA$LM%vmE zvdEOaIcp5qX8wX{mYf0;#51~imYYPn4=k&#DsKTxo{_Mg*;S495?OBY?#gv=edYC* z^O@-sd-qa+U24xvcbL0@C7_6o!$`)sVr-jSJE4XQUQ$?L7}2(}Eixqv;L8AdJAVqc zq}RPgpnDb@E_;?6K58r3h4-!4rT4Ab#rLHLX?eMOfluJk=3i1@Gt1i#iA=O`M0@x! z(HtJP9BMHXEzuD93m|B&woj0g6T?f#^)>J>|I4C5?Gam>n9!8CT%~aT;=oco5d6U8 zMXl(=W;$ND_8+DD*?|5bJ!;8ebESXMUKBAf7YBwNVJibGaJ*(2G`F%wx)grqVPjudiaq^Kl&g$8A2 zWMxMr@_$c}d+;_B`#kUX-t|4VKH&_f^^EP0&=DPLW)H)UzBG%%Tra*5 z%$kyZe3I&S#gfie^z5)!twG={3Cuh)FdeA!Kj<-9** zvT*5%Tb`|QbE!iW-XcOuy39>D3oe6x{>&<#E$o8Ac|j)wq#kQzz|ATd=Z0K!p2$QE zPu?jL8Lb^y3_CQE{*}sTDe!2!dtlFjq&YLY@2#4>XS`}v#PLrpvc4*@q^O{mmnr5D zmyJq~t?8>FWU5vZdE(%4cuZuao0GNjp3~Dt*SLaxI#g_u>hu@k&9Ho*#CZP~lFJHj z(e!SYlLigyc?&5-YxlE{uuk$9b&l6d`uIlpg_z15dPo*iU&|Khx2*A5Fp;8iK_bdP z?T6|^7@lcx2j0T@x>X7|kuuBSB7<^zeY~R~4McconTxA2flHC0_jFxmSTv-~?zVT| zG_|yDqa9lkF*B6_{j=T>=M8r<0s;@z#h)3BQ4NLl@`Xr__o7;~M&dL3J8fP&zLfDfy z);ckcTev{@OUlZ`bCo(-3? z1u1xD`PKgSg?RqeVVsF<1SLF;XYA@Bsa&cY!I48ZJn1V<3d!?s=St?TLo zC0cNr`qD*M#s6f~X>SCNVkva^9A2ZP>CoJ9bvgXe_c}WdX-)pHM5m7O zrHt#g$F0AO+nGA;7dSJ?)|Mo~cf{z2L)Rz!`fpi73Zv)H=a5K)*$5sf_IZypi($P5 zsPwUc4~P-J1@^3C6-r9{V-u0Z&Sl7vNfmuMY4yy*cL>_)BmQF!8Om9Dej%cHxbIzA zhtV0d{=%cr?;bpBPjt@4w=#<>k5ee=TiWAXM2~tUGfm z$s&!Dm0R^V$}fOR*B^kGaipi~rx~A2cS0;t&khV1a4u38*XRUP~f za!rZMtay8bsLt6yFYl@>-y^31(*P!L^^s@mslZy(SMsv9bVoX`O#yBgEcjCmGpyc* zeH$Dw6vB5P*;jor+JOX@;6K#+xc)Z9B8M=x2a@Wx-{snPGpRmOC$zpsqW*JCh@M2Y z#K+M(>=#d^>Of9C`))h<=Bsy)6zaMJ&x-t%&+UcpLjV`jo4R2025 zXaG8EA!0lQa)|dx-@{O)qP6`$rhCkoQqZ`^SW8g-kOwrwsK8 z3ms*AIcyj}-1x&A&vSq{r=QMyp3CHdWH35!sad#!Sm>^|-|afB+Q;|Iq@LFgqIp#Z zD1%H+3I?6RGnk&IFo|u+E0dCxXz4yI^1i!QTu7uvIEH>i3rR{srcST`LIRwdV1P;W z+%AN1NIf@xxvVLiSX`8ILA8MzNqE&7>%jMzGt9wm78bo9<;h*W84i29^w!>V>{N+S zd`5Zmz^G;f=icvoOZfK5#1ctx*~UwD=ab4DGQXehQ!XYnak*dee%YN$_ZPL%KZuz$ zD;$PpT;HM^$KwtQm@7uvT`i6>Hae1CoRVM2)NL<2-k2PiX=eAx+-6j#JI?M}(tuBW zkF%jjLR)O`gI2fcPBxF^HeI|DWwQWHVR!;;{BXXHskxh8F@BMDn`oEi-NHt;CLymW z=KSv5)3dyzec0T5B*`g-MQ<;gz=nIWKUi9ko<|4I(-E0k$QncH>E4l z**1w&#={&zv4Tvhgz#c29`m|;lU-jmaXFMC11 z*dlXDMEOG>VoLMc>!rApwOu2prKSi*!w%`yzGmS+k(zm*CsLK*wv{S_0WX^8A-rKy zbk^Gf_92^7iB_uUF)EE+ET4d|X|>d&mdN?x@vxKAQk`O+r4Qdu>XGy(a(19g;=jU} zFX{O*_NG>!$@jh!U369Lnc+D~qch3uT+_Amyi}*k#LAAwh}k8IPK5a-WZ81ufD>l> z$4cF}GSz>ce`3FAic}6W4Z7m9KGO?(eWqi@L|5Hq0@L|&2flN1PVl}XgQ2q*_n2s3 zt5KtowNkTYB5b;SVuoXA@i5irXO)A&%7?V`1@HGCB&)Wgk+l|^XXChq;u(nyPB}b3 zY>m5jkxpZgi)zfbgv&ec4Zqdvm+D<?Im*mXweS9H+V>)zF#Zp3)bhl$PbISY{5=_z!8&*Jv~NYtI-g!>fDs zmvL5O^U%!^VaKA9gvKw|5?-jk>~%CVGvctKmP$kpnpfN{D8@X*Aazi$txfa%vd-|E z>kYmV66W!lNekJPom29LdZ%(I+ZLZYTXzTg*to~m?7vp%{V<~>H+2}PQ?PPAq`36R z<%wR8v6UkS>Wt#hzGk#44W<%9S=nBfB);6clKwnxY}T*w21Qc3_?IJ@4gYzC7s;WP zVQNI(M=S=JT#xsZy7G`cR(BP9*je0bfeN8JN5~zY(DDs0t{LpHOIbN);?T-69Pf3R zSNe*&p2%AwXHL>__g+xd4Hlc_vu<25H?(`nafS%)3UPP7_4;gk-9ckt8SJRTv5v0M z_Hww`qPudL?ajIR&X*;$y-`<)6dxx1U~5eGS13CB!lX;3w7n&lDDiArbAhSycd}+b zya_3p@A`$kQy;|NJZ~s44Hqo7Hwt}X86NK=(ey>lgWTtGL6k@Gy;PbO!M%1~Wcn2k zUFP|*5d>t-X*RU8g%>|(wwj*~#l4z^Aatf^DWd1Wj#Q*AY0D^V@sC`M zjJc6qXu0I7Y*2;;gGu!plAFzG=J;1%eIOdn zQA>J&e05UN*7I5@yRhK|lbBSfJ+5Uq;!&HV@xfPZrgD}kE*1DSq^=%{o%|LChhl#0 zlMb<^a6ixzpd{kNZr|3jTGeEzuo}-eLT-)Q$#b{!vKx8Tg}swCni>{#%vDY$Ww$84 zew3c9BBovqb}_&BRo#^!G(1Eg((BScRZ}C)Oz?y`T5wOrv);)b^4XR8 zhJo7+<^7)qB>I;46!GySzdneZ>n_E1oWZY;kf94#)s)kWjuJN1c+wbVoNQcmnv}{> zN0pF+Sl3E}UQ$}slSZeLJrwT>Sr}#V(dVaezCQl2|4LN`7L7v&siYR|r7M(*JYfR$ zst3=YaDw$FSc{g}KHO&QiKxuhEzF{f%RJLKe3p*7=oo`WNP)M(9X1zIQPP0XHhY3c znrP{$4#Ol$A0s|4S7Gx2L23dv*Gv2o;h((XVn+9+$qvm}s%zi6nI-_s6?mG! zj{DV;qesJb&owKeEK?=J>UcAlYckA7Sl+I&IN=yasrZOkejir*kE@SN`fk<8Fgx*$ zy&fE6?}G)d_N`){P~U@1jRVA|2*69)KSe_}!~?+`Yb{Y=O~_+@!j<&oVQQMnhoIRU zA0CyF1OFfkK44n*JD~!2!SCPM;PRSk%1XL=0&rz00wxPs&-_eapJy#$h!eqY%nS0{ z!aGg58JIJPF3_ci%n)QSVpa2H`vIe$RD43;#IRfDV&Ibit z+?>HW4{2wOfC6Fw)}4x}i1maDxcE1qi@BS*qcxD2gE@h3#4cgU*D-&3z7D|tVZWt= z-Cy2+*Cm@P4GN_TPUtaVyVesbVDazF@)j8VJ4>XZv!f%}&eO1SvIgr}4`A*3#vat< z_MoByL(qW6L7SFZ#|Gc1fFN)L2PxY+{B8tJp+pxRyz*87)vXR}*=&ahXjBlQKguuf zX6x<<6fQulE^C*KH8~W%ptpaC0l?b=_{~*U4?5Vt;dgM4t_{&UZ1C2j?b>b+5}{IF_CUyvz-@QZPMlJ)r_tS$9kH%RPv#2_nMb zRLj5;chJ72*U`Z@Dqt4$@_+k$%|8m(HqLG!qT4P^DdfvGf&){gKnGCX#H0!;W=AGP zbA&Z`-__a)VTS}kKFjWGk z%|>yE?t*EJ!qeQ%dPk$;xIQ+P0;()PCBDgjJm6Buj{f^awNoVx+9<|lg3%-$G(*f) zll6oOkN|yamn1uyl2*N-lnqRI1cvs_JxLTeahEK=THV$Sz*gQhKNb*p0fNoda#-&F zB-qJgW^g}!TtM|0bS2QZekW7_tKu%GcJ!4?lObt0z_$mZ4rbQ0o=^curCs3bJK6sq z9fu-aW-l#>z~ca(B;4yv;2RZ?tGYAU)^)Kz{L|4oPj zdOf_?de|#yS)p2v8-N||+XL=O*%3+y)oI(HbM)Ds?q8~HPzIP(vs*G`iddbWq}! z(2!VjP&{Z1w+%eUq^ /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +134,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +201,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +217,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index ac1b06f93..9b42019c7 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/specs/openapi-merge.json b/specs/openapi-merge.json new file mode 100644 index 000000000..4961f19df --- /dev/null +++ b/specs/openapi-merge.json @@ -0,0 +1,50 @@ +{ + "inputs": [ + { + "inputFile": "./xap-hotel.specs.yaml" + }, + { + "inputFile": "./xap-lodging.specs.yaml", + "dispute": { + "prefix": "Lodging" + } + }, + { + "inputFile": "./xap-car.specs.yaml", + "dispute": { + "prefix": "Cars" + } + }, + { + "inputFile": "./xap-sdp-v1.specs.yaml", + "dispute": { + "prefix": "Sdp" + } + }, + { + "inputFile": "./xap-activity.specs.yaml", + "dispute": { + "prefix": "Activities" + } + }, + { + "inputFile": "./xap-flight-v1.specs.yaml", + "dispute": { + "prefix": "FlightsV1" + } + }, + { + "inputFile": "./xap-flight-v2.specs.yaml", + "dispute": { + "prefix": "FlightsV2" + } + }, + { + "inputFile": "./xap-flight-v3.specs.yaml", + "dispute": { + "prefix": "FlightsV3" + } + } + ], + "output": "./specs.yaml" +} diff --git a/specs/xap-activity.specs.yaml b/specs/xap-activity.specs.yaml new file mode 100644 index 000000000..2fe34aff6 --- /dev/null +++ b/specs/xap-activity.specs.yaml @@ -0,0 +1,1335 @@ +openapi: 3.0.1 +info: + title: EWSActivity Apis specification + description: OpenAPI Spec for EWS Activity APIs + contact: + name: Partner APIs + url: https://confluence.expedia.biz/pages/viewpage.action?pageId=833040081 + email: autobots@expedia.com + version: v3 + x-eg-lifecycle: LIVE + x-eg-tags: ["Partner", "Activities", "EWS", "ActivitySearch", "ActivityDetails", "ActivityLinks"] +servers: + - url: 'https://apim.expedia.com' + description: Production Server +tags: + - name: Activities List + - name: Activities Details +paths: + /activities/listings: + get: + tags: + - Activities List + description: The Activities Search API allows partners to search for Expedia Activity inventory. + operationId: get-activity-listings + parameters: + - name: location + in: query + description: |- + Can be a city name, street address, three-letter IATA Airport Code or a landmark name. + (If the value submitted does not clearly identify a single location the API may returne a disambiguation response that lists possible options) + schema: + type: string + example: shenzhen + - name: geoLocation + in: query + description: |- + The latitude and longitude values identifying the center point of a search radius (circle). + North latitude will be represented by a positive value. South latitude by a negative value. + East longitude will be represented by a positive value. West longitude by a negative value. + The latitude and longitude values are joined together with a comma (,) character. + schema: + type: string + example: 25.070062,-121.538306 + - name: startDate + in: query + description: |- + Start date for the activity window in YYY-MM-DD format. + If an endDate value is supplied there must also be a startDate. + default: currentDate + schema: + type: string + format: date + example: 2021-10-01 + - name: endDate + in: query + description: |- + End date for the activity window in YYY-MM-DD format. + default: "startDate+14" + schema: + type: string + format: date + example: 2021-10-10 + - name: locale + in: query + description: |- + locale is composed of language identifier and region identifier, connected by "_" that specifies the language in which the response will be returned. + example: "fr_FR" refers to French as spoken in France, while "fr_CA" refers to French as spoken in Canada. + For a full list of supported locales please refer to the link at the bottom of the page. + schema: + type: string + example: en_US + - name: links + in: query + description: |- + Comma-separated list to specify the types of HATEAOS links returned in the API Response. + WD (deep link URL to web infosite) + AD (details API query) + explode: false + schema: + type: array + items: + type: string + enum: + - WD + - AD + example: WD + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-Id + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: BestTravel-123456-798101112 + responses: + '500': + description: |- + Server side error i.e connection timeout while talking to downstream services, downstream returned error. The server responds back with this Http " + + "response code and with the appropriate JSON error response. + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: '#/components/schemas/Errors' + '200': + description: successful + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: '#/components/schemas/ActivityListingsResponse' + example: + TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Count: 1 + Location: shenzhen, gd + StartDate: 2021-08-01 + EndDate: 2021-08-08 + Categories: + - Count: 1 + CategoryName: Cruises & Water Tours + CategoryDisplayName: Cruises & Water Tours + GroupName: Tours + GroupDisplayName: Tours + Activities: + - Id: 166597 + Title: 'Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. + Peter''s Tour' + Description: Enjoy 5 of Seattle's most popular attractions with a multi-ticket booklet that’s valid for 9 consecutive days. This pass is perfect if you want to explore the city on your schedule, craft your own itinerary, and visit the city’s can’t-miss museums and most iconi.. + Media: + - Type: "1" + Size: t + Url: http://a.travel-assets.com/ lxweb/ media-vault/ 166597_m.jpeg? v=104741 + Categories: + - Walking & Bike Tours + Duration: PT3H0M + CancellationPolicy: + FreeCancellation: true + Price: + Category: Adult + TotalRate: + Value: 100 + Currency: USD + ReferencePrice: + Category: Adult + TotalRate: + Value: 110 + Currency: USD + Savings: + percentage: 42 + amount: + Value: "9" + Currency: USD + Redemption: + Type: Voucherless + Locations: + - Address: + Address1: 99 Union St + City: Seattle + PostalCode: "431625" + Province: WA + Country: USA + GeoLocation: + Latitude: "47.60772" + Longitude: -122.33936 + Locations: + - Address: + Address1: 99 Union St + City: Seattle + PostalCode: "431625" + Province: WA + Country: USA + GeoLocation: + Latitude: "47.60772" + Longitude: -122.33936 + Supplier: + Name: City Wonders + RecommendationScore: 90 + ReviewCount: 100 + Links: + WebDetails: + Href: https://www.expedia.com/things-to-do/space-needle-observation-deck-admission.a193678.activity-details?srp=true&location=sea + ApiDetails: + Accept: application/vnd.exp-activity.v3+json + Method: GET + Href: https://apim.expedia.com/activities/details/CgUyMDIzMBIyCgkyMDEzMDQ1OTYSCTIwOTc3MjcwOBoCMjQqCjIwMTctMTEtMTkyCjIwMTctMTEtMjUqAwoBMg + '400': + description: |- + Client side error while providing the request i.e bad / invalid input parameters. The server responds back with " + + "this Http response code and with the appropriate JSON error response. + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: AMBIGUOUS_LOCATION + Description: Multiple search locations found. + LocationKeyword: 99UnionSt + LocationOptions: + - ShortName: Union Grove, Wisconsin, United States of America + Address: Milwaukee (and vicinity), Wisconsin, United States of America + RequestedLocation: 'United States' + Locations: + - Name: Portland (and vicinity) + LocationId: seat001 + TransactionId: cecf62c8-c103-4181-b09d-53c7190d1c48 + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicSchema: [] + /activities/details/{offerToken}: + get: + tags: + - Activities Details + description: The Activity Details API provides detailed information about one selected activity. + operationId: get-activity-details + parameters: + - name: offerToken + in: path + description: the offerToken of a activity + required: true + schema: + type: string + example: CgY0NzY2NzgSCjIwMjEtMDUtMDIaCjIwMjEtMDUtMDc + - name: locale + in: query + description: |- + locale is composed of language identifier and region identifier, connected by "_" that specifies the language + in which the response will be returned. + example: "fr_FR" refers to French as spoken in France, while "fr_CA" refers to French as spoken in Canada. + For a full list of supported locales please refer to the link at the bottom of the page. + schema: + type: string + example: en_US + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-Id + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: BestTravel-123456-798101112 + responses: + '400': + description: |- + Client side error while providing the request i.e bad / invalid input parameters. The server responds back with " + + "this Http response code and with the appropriate JSON error response. + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_LINKS + Description: 'Invalid links. Allowed value are:[WS, AD, WD].' + TransactionId: 583b7277-772a-4802-8ac7-bcdf978abbdb + '500': + description: |- + Server side error i.e connection timeout while talking to downstream services, downstream returned error. The server responds back with this Http " + + "response code and with the appropriate JSON error response. + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: '#/components/schemas/Errors' + '200': + description: successful + content: + application/vnd.exp-activity.v3+json: + schema: + $ref: '#/components/schemas/ActivityDetailsResponse' + example: + TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Count: 1 + Location: shenzhen, gd + StartDate: 2021-08-01 + EndDate: 2021-08-08 + Categories: + - Count: 1 + CategoryName: Cruises & Water Tours + CategoryDisplayName: Cruises & Water Tours + GroupName: Tours + GroupDisplayName: Tours + Activities: + - Id: 166597 + Title: 'Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. + Peter''s Tour' + Description: Enjoy 5 of Seattle's most popular attractions with a multi-ticket booklet that’s valid for 9 consecutive days. This pass is perfect if you want to explore the city on your schedule, craft your own itinerary, and visit the city’s can’t-miss museums and most iconi.. + Media: + - Type: "1" + Size: t + Url: http://a.travel-assets.com/ lxweb/ media-vault/ 166597_m.jpeg? v=104741 + Categories: + - Walking & Bike Tours + Duration: PT3H0M + CancellationPolicy: + FreeCancellation: true + Price: + Category: Adult + TotalRate: + Value: 100 + Currency: USD + ReferencePrice: + Category: Adult + TotalRate: + Value: 110 + Currency: USD + Savings: + percentage: 42 + amount: + Value: "9" + Currency: USD + Redemption: + Type: Voucherless + Locations: + - Address: + Address1: 99 Union St + City: Seattle + PostalCode: "431625" + Province: WA + Country: USA + GeoLocation: + Latitude: "47.60772" + Longitude: -122.33936 + Locations: + - Address: + Address1: 99 Union St + City: Seattle + PostalCode: "431625" + Province: WA + Country: USA + GeoLocation: + Latitude: "47.60772" + Longitude: -122.33936 + Supplier: + Name: City Wonders + RecommendationScore: 90 + ReviewCount: 100 + Links: + WebDetails: + Href: https://www.expedia.com/things-to-do/space-needle-observation-deck-admission.a193678.activity-details?srp=true&location=sea + ApiDetails: + Accept: application/vnd.exp-activity.v3+json + Method: GET + Href: https://apim.expedia.com/activities/details/CgUyMDIzMBIyCgkyMDEzMDQ1OTYSCTIwOTc3MjcwOBoCMjQqCjIwMTctMTEtMTkyCjIwMTctMTEtMjUqAwoBMg + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicSchema: [] +components: + schemas: + Money: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: '#/components/schemas/Money' + description: Container for the discount amount. + Price: + required: + - TotalRate + type: object + properties: + Category: + type: string + description: |- + Type of passenger. + Values supported are: + ADULT | SENIOR | CHILD + example: ADULT + TotalRate: + $ref: '#/components/schemas/Money' + TotalFees: + $ref: '#/components/schemas/Money' + TotalTaxesAndFees: + $ref: '#/components/schemas/Money' + ReferencePrice: + $ref: '#/components/schemas/ReferencePrice' + Savings: + $ref: '#/components/schemas/Savings' + description: The price of the offer + ReferencePrice: + required: + - TotalRate + type: object + properties: + TotalRate: + $ref: '#/components/schemas/Money' + TotalFees: + $ref: '#/components/schemas/Money' + TotalTaxesAndFees: + $ref: '#/components/schemas/Money' + description: Container for the reference price used for strike out display. + Restrictions: + required: + - Max + - Min + - Type + type: object + properties: + Type: + type: string + description: Type of the Restriction. + example: AGE + Max: + type: string + description: Maximum value allowed for the restriction type. + example: "255" + Min: + type: string + description: Minimum value allowed for the restriction type. + example: "9" + Description: + type: string + description: The text to describe the restriction. + example: 9+ years + description: Container of the Restrictions associated to this ticket. + Savings: + required: + - Amount + - Percentage + type: object + properties: + Percentage: + type: integer + description: The percentage of the price that has been discounted off the regular price for the current activity. + format: int32 + example: 10 + Amount: + $ref: '#/components/schemas/Money' + description: Container of savings information. + Ticket: + required: + - Code + - Count + - Id + - TicketPrice + type: object + properties: + Id: + type: integer + description: The numerical identifier for the ticket. + format: int32 + example: 6429 + Code: + type: string + description: |- + The code for the ticket. + Values supported are: + Adult + Traveler + Child + Group + Senior + Infant + Student + example: Adult + Count: + type: integer + description: The number of each ticket type to be booked. + format: int32 + example: 1 + Restrictions: + $ref: '#/components/schemas/Restrictions' + TicketPrice: + $ref: '#/components/schemas/Price' + description: The list of Ticket information. + Address: + type: object + properties: + Address1: + type: string + description: Street Number, Street Name, or PO Box. + example: 724 Pine St + Address2: + type: string + description: Apartment, Floor, Suite, Bldg # or more specific information about Address1. + example: Second Floor + Suite: + type: string + description: Suite/apartment number + example: "123" + City: + type: string + description: The city + example: New York + Province: + type: string + description: The state or province. + example: NY + Country: + type: string + description: 3-letter code for the country. + example: USA + PostalCode: + type: string + description: Zip/postal code. + example: "98004" + description: Address information + Country: + required: + - IsoCode2 + - IsoCode3 + - Name + type: object + properties: + Name: + type: string + description: country name + example: Ireland + Code: + type: string + description: 3-letter code for the country + example: IRL + IsoCode2: + type: string + description: 2-letter code for the country + example: IE + IsoCode3: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + Error: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + DetailCode: + type: string + description: Detailed error code describing the issue. + example: MULTIPLE_AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: 'Multiple pickup locations found. ' + LocationKeyword: + type: string + description: The requested location that caused the error. + example: 'Portland. ' + LocationOptions: + type: array + description: 'List for possible locations from which the customer must choose + the best one to be re-submitted in the request. ' + items: + $ref: '#/components/schemas/LocationOption' + description: Container for error list. + Errors: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: '#/components/schemas/Error' + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + GeoLocation: + required: + - Latitude + - Longitude + type: object + properties: + Latitude: + type: string + description: Latitude of the location. + example: "38.184978" + Longitude: + type: string + description: Longitude of the location. + example: "85.7412" + Obfuscated: + type: boolean + description: Geographic information + Location: + type: object + properties: + Type: + type: string + description: The type of location code (MULTICITY | METROCODE). + example: MULTICITY + Id: + type: string + description: Expedia Region ID of the specified airport. + example: "6139103" + Name: + type: string + description: Location Name + example: Seattle-Tacoma International Airport + Code: + type: string + description: Location Code + example: SEA + LocationId: + type: string + description: Location id. + example: SEAT001 + Address: + $ref: '#/components/schemas/Address' + PointOfInterest: + type: string + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + Neighborhood: + $ref: '#/components/schemas/Neighborhood' + RegionId: + type: integer + description: RegionId the location resides in. + format: int64 + example: 6200275 + Country: + $ref: '#/components/schemas/Country' + description: List of location(s) where the activity will happen. + LocationOption: + required: + - Locations + - RequestedLocation + type: object + properties: + RequestedLocation: + type: string + description: Location used in partner request. + example: Paris + Locations: + type: array + description: Container for list of possible locations that could be used to disambiguate the query. + items: + $ref: '#/components/schemas/Location' + Type: + type: string + description: Type of the location. + example: TRAINSTATION + RegionId: + type: string + description: RegionId the location resides in. + example: "6200275" + ShortName: + type: string + description: The name of the location which matches the location keyword. + example: Dublin Connolly Station + AirportCode: + type: string + description: Indicates the nearest major airport to the location. + example: DUB + Address: + type: string + description: The address of the location. + example: Dublin Connolly Station, Ireland + Country: + $ref: '#/components/schemas/Country' + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + description: 'List for possible locations from which the customer must choose + the best one to be re-submitted in the request. ' + Neighborhood: + required: + - Id + - Name + type: object + properties: + Id: + type: string + description: Neighborhood id. + example: "6160232" + Name: + type: string + description: Neighborhood name. + example: Le Pharo + description: Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. + Activity: + required: + - Categories + - Description + - Duration + - FreeCancellation + - Id + - Media + - Price + - Supplier + - Title + type: object + properties: + Id: + type: integer + description: The numerical identifier for this particular activity + format: int32 + example: 166597 + Title: + type: string + description: The display title for this activity. + example: 'Faster Than Skip-the-Line: Vatican, Sistine Chapel & St. Peter''s + Tour' + Description: + type: string + description: The description of the Activity. + example: Enjoy 5 of Seattle's most popular attractions with a multi-ticket booklet that’s valid for 9 consecutive days. This pass is perfect if you want to explore the city on your schedule, craft your own itinerary, and visit the city’s can’t-miss museums and most iconi... + Media: + type: array + description: List of activity Media. + items: + $ref: '#/components/schemas/Media' + Categories: + type: array + description: |- + A list of the Activity categories to which this particular activity belongs. + Possible values are: + Adventures + Air, Balloon & Helicopter Tours + Attractions + Cruises & Water Tours + Day Trips & Excursions + Food & Drink + Hop-on Hop-off + Multi-Day & Extended Tours + Nightlife + Private Tours + Private Transfers + Shared Transfers + Show & Sport Tickets + Sightseeing Passes + Theme Parks + Tours & Sightseeing + Walking & Bike Tours + Water Activities + Wedding Ceremonies + Winter Activities + example: + - Walking & Bike Tours + items: + type: string + description: A list of the Activity categories to which this particular activity belongs. + example: Walking & Bike Tours + xml: + name: Categories + Duration: + type: string + description: |- + The anticipated time duration for the activity. + Using java jdk Duration parsing. + example: PT1H0M + FreeCancellation: + type: boolean + description: A boolean value describing whether or not this activity reservation can be cancelled without incurring a penalty. + example: true + Price: + $ref: '#/components/schemas/Price' + Redemption: + $ref: '#/components/schemas/Redemption' + ActivityLocations: + type: array + description: Container of location information where activity happens. + items: + $ref: '#/components/schemas/Location' + Supplier: + $ref: '#/components/schemas/Supplier' + ReviewScore: + type: integer + description: The overall Expedia score for the activity. + format: int32 + example: 72 + ReviewCount: + type: integer + description: The number of Expedia reviews that went into the calculation of the ReviewScore. + format: int32 + example: 19 + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: HATEOAS links included in this response. + xml: + wrapped: true + CancellationPolicy: + $ref: '#/components/schemas/CancellationPolicy' + Highlights: + type: array + description: Web formatted statement of the Highlight(s) for the activity. + items: + type: string + description: Web formatted statement of the Highlight(s) for the activity. + xml: + name: Highlights + TermsAndConditions: + type: array + description: Terms and Conditions for the Activity. + items: + type: string + description: Terms and Conditions for the Activity. + xml: + name: TermsAndConditions + Inclusions: + type: array + description: Web formatted statement of what is included in the activity + items: + type: string + description: Web formatted statement of what is included in the activity + xml: + name: Inclusions + Exclusions: + type: array + description: Web formatted statement of what is NOT included in the activity + items: + type: string + description: Web formatted statement of what is NOT included in the activity + xml: + name: Exclusions + KnowBeforeYouBook: + type: array + description: Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. + items: + type: string + description: Web formatted statement of things that a purchaser should be aware of BEFORE they book this activity. + xml: + name: KnowBeforeYouBook + KnowBeforeYouGo: + type: array + description: Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. + items: + type: string + description: Web formatted statement of things that a purchaser should be aware of BEFORE they go to this activity. + xml: + name: KnowBeforeYouGo + Offers: + type: array + description: Offers for the activity. + items: + $ref: '#/components/schemas/Offer' + description: Detailed information on the Activity. + AvailableTimeSlot: + required: + - AllDayActivity + - CancellationPolicy + - DateTime + - Tickets + type: object + properties: + DateTime: + type: string + description: The date and time when the activity happens. + format: date-time + AllDayActivity: + type: boolean + description: Indicates whether the activity is an all-day activity. + example: true + CancellationPolicy: + $ref: '#/components/schemas/CancellationPolicy' + Tickets: + type: array + description: Container for ticket information. + items: + $ref: '#/components/schemas/Ticket' + description: The list of available Time Slots for the activity. + CancellationPolicy: + required: + - FreeCancellation + type: object + properties: + FreeCancellation: + type: boolean + description: Indicates whether the activity can be canceled free of charge within the cancellation window or not. + example: true + CancelPolicyDescription: + type: string + description: The description of Cancellation Policy. + example: 72 hours + FreeCancellationMinHours: + type: integer + description: The minimum number of hours before activity when the activity can still be cancelled for free. + format: int32 + example: 72 + FreeCancellationEndDateTime: + type: string + description: The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. + format: date-time + description: Container for the Cancellation Policy information. + Link: + required: + - Href + type: object + properties: + Accept: + type: string + description: Accept header. + Method: + type: string + description: HTTP method to connect. + example: GET + Href: + type: string + description: HATEOAS URL to fetch details. + description: Container of HATEOAS URL's + Media: + required: + - Size + - Type + - Url + type: object + properties: + Type: + type: string + description: |- + type of the media. So far there is only one option: + 1: Image + example: "1" + Title: + type: string + description: Image title + example: Guestroom + Size: + type: string + description: |- + Image size + You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. + example: t + Url: + type: string + description: Image URL + example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg + description: List of activity Media. + Offer: + required: + - AvailableTimeSlots + - Duration + - Id + - OfferPrice + - Title + type: object + properties: + Id: + type: integer + description: The numerical identifier for the offer. + format: int32 + example: 166597 + Title: + type: string + description: A descriptive title for this offer. + example: 8:30 AM, Tour in English + Description: + type: string + description: Description of this offer. + Duration: + type: string + description: The anticipated time duration for the activity, e xpressed using Java JDK duration format. + AvailableTimeSlots: + type: array + description: The list of available Time Slots for the activity. + items: + $ref: '#/components/schemas/AvailableTimeSlot' + OfferPrice: + $ref: '#/components/schemas/Price' + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: Container of HATEOAS URL's + xml: + wrapped: true + description: Offers for the activity. + Phone: + required: + - CountryCode + - Number + type: object + properties: + CountryCode: + type: string + description: Country code of traveler's phone number; only digits allowed. + example: "1" + AreaCode: + type: string + description: Area code of traveler's phone number; only digits allowed. + example: "614" + Number: + type: string + description: Traveler's phone number; only digits allowed. + example: "9288472" + ExtensionNumber: + type: string + description: The phone of the company providing the activity. + Redemption: + type: object + properties: + Type: + type: string + description: The type of redemption process associated to the activity. + example: Voucherless + RedemptionLocations: + type: array + description: List of redemption locations where the activity will take place, please refer to Location Section below. + items: + $ref: '#/components/schemas/Location' + description: Container of redemption information. + Supplier: + required: + - Name + type: object + properties: + Name: + type: string + description: The name of the company providing the activity. + example: City Wonders + Phone: + $ref: '#/components/schemas/Phone' + description: The details information of company providing the activity. + Warning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Standardized warning code. + example: INVALID_CORPORATE_DISCOUNT_CODE + Description: + type: string + description: Standardized warning description message. + example: The Corporate DiscountCode '811490' is unavailable, but we found other rates for you. + OriginalPrice: + $ref: '#/components/schemas/Money' + NewPrice: + $ref: '#/components/schemas/Money' + ChangedAmount: + $ref: '#/components/schemas/Money' + ChangedPercentage: + type: string + description: |- + The changed percentage. + In the sample 2.97 means the changed percentage is 2.97%. + example: "2.97" + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + xml: + wrapped: true + description: Container for all warnings generated during the transaction. + ActivityListingsResponse: + required: + - Count + - Location + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for all warnings generated during the transaction. + items: + $ref: '#/components/schemas/Warning' + TransactionId: + type: string + description: A unique identifier for this transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Count: + type: integer + description: The number of activities returned in the response. + format: int64 + example: 100 + Location: + type: string + description: The location that the user searched, expressed in the exact format that the inventory system uses to designate the location. + example: shenzhen, dg + StartDate: + type: string + description: The startDate of the returned group of activities in YYYY-MM-DD format. + format: date + example: 2021-08-01 + EndDate: + type: string + description: The endDate of returned group of activities in YYYY-MM-DD format. + format: date + example: 2021-08-10 + Activities: + type: array + description: List of activities matching the search criteria. + items: + $ref: '#/components/schemas/Activity' + Categories: + type: array + description: Container for a breakdown of how many of each type of Activity have been returned in the API response. + items: + $ref: '#/components/schemas/CategoryGroup' + CategoryGroup: + required: + - CategoryName + - Count + - GroupDisplayName + - GroupName + type: object + properties: + Count: + type: integer + description: The count of the number of categories the returned set of activities map to. + format: int32 + example: 10 + GroupName: + type: string + description: |- + The group which the category belongs + Possible value is: + Recommendations + Tours + Activities + Transportation + Promotions + Duration + example: Tours + GroupDisplayName: + type: string + description: The localized value for category name. + example: Wander- und Fahrradtouren + CategoryName: + type: string + description: The name of one of the categories. + example: Walking & Bike Tours + CategoryDisplayName: + type: string + description: Container for a breakdown of how many of each type of Activity have been returned in the API response. + ActivityDetailsResponse: + required: + - Location + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for all warnings generated during the transaction. + items: + $ref: '#/components/schemas/Warning' + TransactionId: + type: string + description: A unique identifier for this transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Location: + type: string + description: The location user searched, translated into the full, unambiguous format. + example: shenzhen, dg + StartDate: + type: string + description: The startDate of activities in YYY-MM-DD format. + format: date + example: 2021-08-01 + EndDate: + type: string + description: The endDate of activities in YYY-MM-DD format. + format: date + example: 2021-08-01 + ActivityDetails: + $ref: '#/components/schemas/Activity' + APIMError: + title: APIMError + properties: + message: + type: string + securitySchemes: + basicSchema: + type: http + scheme: basic diff --git a/specs/xap-car.specs.yaml b/specs/xap-car.specs.yaml new file mode 100644 index 000000000..777c6dcfb --- /dev/null +++ b/specs/xap-car.specs.yaml @@ -0,0 +1,1633 @@ +openapi: 3.0.1 +info: + title: EWSCar API + description: EWSCar API allow users search cars and check car details. + contact: + name: EWSCar team + url: 'https://confluence.expedia.biz/display/EWS/EWS+Car' + email: autobots@expedia.com + version: v3 + x-eg-lifecycle: LIVE + x-eg-api-tags: + - EWS + - XAP + - Cars + - CarSearch + - CarDetails +tags: + - name: Cars Listings + - name: Cars Detail +servers: + - url: 'https://apim.expedia.com' + description: Production Server +paths: + /cars/listings: + get: + tags: ["Cars Listings"] + summary: Search Expedia car inventory + description: 'Search Expedia car inventory by date, pickup, and dropoff location to return a listing of available cars for hire.' + operationId: get-cars-listings + parameters: + - name: key + in: header + description: Unique identifier assigned to partner. + required: true + schema: + type: string + example: 11111111-2222-3333-4444-555555555555 + - name: Partner-Transaction-Id + in: header + description: '[Not consumed by Expedia] Partner-generated identifier.' + required: true + schema: + type: string + example: BestTravel-123456-798101112 + - name: pickup.airport + in: query + description: 'Three letter code for the airport at which the customer would like to pick up the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request.' + schema: + type: string + example: SEA + - name: pickup.city + in: query + description: 'The name of the city in which the customer would like to pick up the car.Search results will include up to 40 rental locations that are closest to the center point of the search.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request.' + schema: + type: string + - name: pickup.address + in: query + description: 'The address of a car rental location where the customer would like to pick up the car.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request.' + schema: + type: string + example: Seattle + - name: pickup.geoLocation + in: query + description: 'The latitude and longitude that defines where the customer would like to pick up the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other pickup parameters, only one pickup parameter is allowed per request.' + schema: + type: string + example: 111.00,-22.00 + - name: pickup.radius + in: query + description: 'Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See '' unit'' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.' + schema: + type: integer + example: 10 + - name: dropOff.airport + in: query + description: 'Three letter code for the airport at which the customer would like to drop off the car.Supported values: standard 3 letter IATA Airport Code.Please see a full list of Car Vendor Codes and Airport Codes in the Related Links Section below.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up.' + schema: + type: string + example: SEA + - name: dropOff.city + in: query + description: 'City name for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up.' + schema: + type: string + - name: dropOff.address + in: query + description: 'Address for the location at which the customer would like to drop off the car.Cannot coexist with other drop off parameters, only one drop off parameter is allowed in a request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up.' + schema: + type: string + example: Seattle + - name: dropOff.geoLocation + in: query + description: 'Latitude and longitude for the location at which the customer would like to drop off the car.Latitude and longitude are separated by comma.South latitudes and West longitudes are represented by negative values.Cannot coexist with other drop off parameters, only one drop off parameter is allowed per request.If no drop off location is specified, it is assumed that the customer will be dropping the car off at the same location at which they picked it up.' + schema: + type: string + example: 111.00,-22.00 + - name: dropOff.radius + in: query + description: 'Radius used in conjunction with a point to define the search area when searching by lat/ long, city or address.See '' unit'' parameter below to select miles or kilometers.If no value is specified a default value of 25 will be assumed.Note: The pickup radius value will be used (instead of the the drop-off radius) when the requested pickup and drop-off city/address are exactly the same.' + schema: + type: integer + example: 10 + - name: pickupTime + in: query + description: 'Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.)' + required: true + schema: + type: string + format: date-time + example: '2021-06-05T10:00' + - name: dropOffTime + in: query + description: 'Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid.' + required: true + schema: + type: string + format: date-time + example: '2021-06-06T10:00' + - name: sortType + in: query + description: 'Method of sorting the car search results.Supported value: Price.If no value is present a sort by ''price'' will be assumed.' + schema: + type: string + enum: + - Price + - name: sortOrder + in: query + description: 'Order of sorting the car search results.Supported values: ASC, DESCIf no value is present a sort order of ''ascending'' will be assumed.' + schema: + type: string + enum: + - ASC + - DESC + - name: limit + in: query + description: The maximum number of search results that will be returned by the query. + schema: + type: integer + example: 100 + - name: suppliers + in: query + description: 'A list of supplier ids or supplier names to be used to filter search results.Multiple supplier names or ids may be separated by comma.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.The max count of suppliers requested is limited to 20.Note: while you may filter using either supplier name or supplier ID, it is recommended that you use supplier ID, as this value will remain consistent in the event of a merger or other name change by the supplier.' + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + example: + - 11 + - 12 + - name: carClasses + in: query + description: A list of car classes to be used to filter search results.Multiple car classes may be separated by comma.Please see Class List in the Related Links Section below for all options. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + example: 'economy' + - name: discount1.supplier + in: query + description: 'Name or ID of the supplier who issued a coupon or discount code.NOTE: Only ONE discount code per transaction is currently supported by the API. If you enter more than one discount code, only the first one will be honored.Please see a full list of Expedia Vendor Codes & Names in the Related Links Section below.' + schema: + type: string + example: Avis + - name: discount1.type + in: query + description: 'The type of discount to be applied.Supported values: CorpDiscount | Coupon.' + schema: + type: string + enum: + - CorpDiscount + - Coupon + - name: discount1.code + in: query + description: The code of the discount to be applied. + schema: + type: string + example: GB1234 + - name: transmissions + in: query + description: A list of car transmission drive codes to be used to filter search results.Multiple car classes may be separated by a comma.Please see a full list of Transmission Drive Codes in the Related Links Section below. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: airConditioning + in: query + description: Specify whether to filter for cars that include or exclude air conditioning. + schema: + type: boolean + - name: carTypes + in: query + description: A list of car types to be used to filter search results.Multiple car types may be separated by comma.Please see a full list of Car Type Codes in the Related Links Section below. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + example: C,E + - name: unit + in: query + description: 'The distance unit for the radius of a location-based search, or the distance between the center point of a search and the vendor location.Supported values: KM | MI.Default value: KM.' + schema: + type: string + enum: + - KM + - MI + - name: driverAge + in: query + description: The age of the driver that will be renting the car.This value is required in the UK and optional elsewhere. + schema: + type: integer + example: 18 + - name: links + in: query + description: 'WS = WebSearch, AD = ApiDetails, WD = WebDetails' + explode: false + schema: + type: array + items: + type: string + enum: + - WS + - AD + - WD + - name: source + in: query + description: 'Indicates the source where the request is coming from.The available values for the source as below:browser - The value "browser" represents that the client is traditional website.mobile - The value "mobile" represents that the client is mobile.all - The value "all" indicates that the client includes both browser and mobile.Only one source value may be used at a time.' + schema: + type: string + enum: + - browser + - mobile + - all + responses: + '200': + description: car listing response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: '#/components/schemas/CarListingsResponse' + application/vnd.exp-car.v3+xml: + schema: + $ref: '#/components/schemas/CarListingsResponse' + '400': + description: errors response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: '#/components/schemas/Errors' + examples: + Errors: + description: Errors + value: + Errors: + - Code: INVALID_LINKS + Description: 'Invalid links. Allowed value are:[WS, AD, WD].' + TransactionId: 583b7277-772a-4802-8ac7-bcdf978abbdb + application/vnd.exp-car.v3+xml: + schema: + $ref: '#/components/schemas/DisambiguationResponse' + examples: + DisambiguationResponse: + description: DisambiguationResponse + value: + Errors: + - Code: AMBIGUOUS_LOCATION + DetailCode: MULTIPLE_AMBIGUOUS_PICKUP_LOCATION + Description: Multiple pickup locations found. + LocationKeyword: portland + LocationOptions: + - Type: MULTICITY + RequestedLocation: 'Portland (and vicinity)' + Locations: + - Name: Portland (and vicinity) + LocationId: seat001 + RegionId: '178299' + ShortName: Portland (and vicinity) + AirportCode: PDX + Address: 'Portland (and vicinity), Oregon, United States Of America' + Country: + Name: United States of America + IsoCode2: US + IsoCode3: USA + GeoLocation: + Latitude: '45.516740' + Longitude: '-122.680950' + - Type: CITY + RequestedLocation: 'Portland (and vicinity)' + Locations: + - Name: Portland (and vicinity) + LocationId: seat001 + RegionId: '6174134' + ShortName: Downtown Portland + AirportCode: PWM + Address: 'Downtown Portland, Portland, Maine, United States of America' + Country: + Name: United States of America + IsoCode2: US + IsoCode3: USA + GeoLocation: + Latitude: '43.655764' + Longitude: '-70.255458' + TransactionId: 81e0a6d6-8ca9-4adf-a1c8-08ba0d11dcef + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: '{message":"Unauthorized"}' + Invalid authentication credentials: + value: '{"message":"Invalid authentication credentials"}' + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: '{"message":"You cannot consume this service"}' + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: '{"message":"no Route matched with those values"}' + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: '{"message":"API rate limit exceeded"}' + '503': + description: service unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: '{"message":"name resolution failed"}' + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicAuth: [] + /cars/details/{offerToken}: + get: + tags: ["Cars Detail"] + summary: Get Extended information with a single car offer + description: 'Extended information about the rates, charges, fees, and other terms associated with a single car offer.' + operationId: get-car-details + parameters: + - name: key + in: header + description: Unique identifier assigned to partner. + required: true + schema: + type: string + example: 11111111-2222-3333-4444-555555555555 + - name: Partner-Transaction-Id + in: header + description: '[Not consumed by Expedia] Partner-generated identifier.' + required: true + schema: + type: string + example: BestTravel-123456-798101112 + - name: price + in: query + description: The total price for the product. + required: true + schema: + type: string + - name: currency + in: query + description: Price currency code + required: true + schema: + type: string + example: USD + - name: source + in: query + description: source mobile - The value mobile represents that the client is mobile. + schema: + type: string + example: mobile + - name: offerToken + in: path + description: car offer token + required: true + schema: + type: string + example: OFHSDJSJDFLJSDLKFJSDLJFLSDJFLSJDFL + responses: + '200': + description: car details successful response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: '#/components/schemas/CarDetailsResponse' + application/vnd.exp-car.v3+xml: + schema: + $ref: '#/components/schemas/CarDetailsResponse' + '400': + description: car details user fault response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: '#/components/schemas/Errors' + application/vnd.exp-car.v3+xml: + schema: + $ref: '#/components/schemas/Errors' + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: '{message":"Unauthorized"}' + Invalid authentication credentials: + value: '{"message":"Invalid authentication credentials"}' + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: '{"message":"You cannot consume this service"}' + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: '{"message":"no Route matched with those values"}' + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: '{"message":"API rate limit exceeded"}' + '500': + description: car details application error response + content: + application/vnd.exp-car.v3+json: + schema: + $ref: '#/components/schemas/Errors' + application/vnd.exp-car.v3+xml: + schema: + $ref: '#/components/schemas/Errors' + '503': + description: service unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: '{"message":"name resolution failed"}' + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicAuth: [] +components: + schemas: + AdditionalFee: + required: + - Amount + - FinanceCategory + - FinanceSubCategory + - IsRequired + type: object + properties: + IsRequired: + type: boolean + description: Indicates whether this additional fee is mandatory. + example: true + FinanceCategory: + type: string + description: Category of the fee / Coverages + example: Fee + FinanceSubCategory: + type: string + description: Sub category of the fee / Coverages . + example: Drop + Amount: + $ref: '#/components/schemas/Money' + Description: + type: string + description: Description of the fee. + example: DropOffCharge + Deductible: + $ref: '#/components/schemas/Deductible' + description: List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + Address: + required: + - Address1 + - City + - Country + type: object + properties: + Address1: + type: string + description: 'Street Number, Street Name, or PO Box' + example: 724 Pine St + Address2: + type: string + description: 'Apartment, Floor, Suite, Bldg # or more specific information about Address1.' + example: Second Floor + Suite: + type: string + description: Suite/apartment number + example: '123' + City: + type: string + description: The city + example: New York + Province: + type: string + description: The state or province + example: NY + Country: + type: string + description: 3-letter code for the country + example: USA + PostalCode: + type: string + description: Zip/postal code + example: '98004' + description: Address information + CancellationPolicy: + type: object + properties: + Cancellable: + type: boolean + description: Indicates if this car can be cancelled (free cancel or penalty cancel) + example: true + FreeCancellation: + type: boolean + description: Indicates if this car may be cancelled without a penalty. + example: true + FreeCancellationEndDateTime: + type: string + description: Indicates the latest time that the car can be cancelled for free. + format: date-time + PenaltyRules: + type: array + description: Container for penalty rules + items: + $ref: '#/components/schemas/PenaltyRule' + NonCancellableDateTimeRange: + $ref: '#/components/schemas/NonCancellableDateTimeRange' + description: Cancellation Policy Container. + Capacity: + required: + - AdultCount + type: object + properties: + AdultCount: + type: integer + description: The typical number of adults that can fit comfortably in the car. + format: int64 + example: 4 + ChildCount: + type: integer + description: The typical number of children that can fit comfortably in the car. + format: int64 + example: 0 + SmallLuggageCount: + type: integer + description: The typical number of small pieces of luggage that fit in the cargo space. + format: int64 + example: 2 + LargeLuggageCount: + type: integer + description: The typical number of large pieces of luggage that fit in the cargo space. + format: int64 + example: 2 + description: Capacity for car's properties. + Car: + required: + - CancellationPolicy + - DropOffDetails + - Id + - PickupDetails + - Price + - Supplier + - VehicleDetails + type: object + properties: + Id: + type: string + description: 'Uniquely identifies a Car Offer.Note: since pay-online and pay-at-the-counter Car Offers have the same associated Rate Code, the Offer ID is the only unique identifier to differentiate between the two offers when referencing or booking.' + example: ECAR-39--1Trip-SEAC005-SEAC005 + DataTimeStamp: + type: string + description: DataTimeStamp + format: date-time + example: '2021-03-09T07:08:00Z' + OnlineCheckIn: + type: boolean + description: Indicate whether the supplier supports online checkin + example: true + SkipTheCounter: + type: boolean + description: Indicate whether the supplier supports skip the counter + example: true + VehicleDetails: + $ref: '#/components/schemas/VehicleDetails' + Supplier: + $ref: '#/components/schemas/Supplier' + PickupDetails: + $ref: '#/components/schemas/VendorLocationDetails' + DropOffDetails: + $ref: '#/components/schemas/VendorLocationDetails' + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: A map of links to other Car APIs or Expedia websites. + xml: + wrapped: true + RateDetails: + $ref: '#/components/schemas/RateDetails' + Price: + $ref: '#/components/schemas/Price' + ReferencePrice: + $ref: '#/components/schemas/Money' + AdditionalFees: + type: array + description: List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + items: + $ref: '#/components/schemas/AdditionalFee' + CancellationPolicy: + $ref: '#/components/schemas/CancellationPolicy' + NoShowPenalty: + $ref: '#/components/schemas/PenaltyType' + Images: + type: array + description: List of image resources of the car product. + items: + $ref: '#/components/schemas/Image' + Rating: + $ref: '#/components/schemas/RatingWithoutDetails' + description: List of cars matching the search criteria. + CarCategory: + required: + - Code + - Value + type: object + properties: + Code: + type: string + description: Car category code. + example: M + Value: + type: string + description: Car category value. + example: Mini + description: 'Car category. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115008631767' + CarListingsResponse: + required: + - CarCount + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for warning codes + items: + $ref: '#/components/schemas/Warning' + TransactionId: + type: string + description: A unique identifier for this transaction. + example: 1111111-2222-3333-4444-55555555555 + CarCount: + type: integer + description: The number of cars offers returned in the response. + format: int64 + example: 1 + Cars: + type: array + description: List of cars matching the search criteria. + items: + $ref: '#/components/schemas/Car' + xml: + name: CarListingsResponse + CarType: + required: + - Code + - Value + type: object + properties: + Code: + type: string + description: Car type code. + example: C + Value: + type: string + description: Car type value. + example: 2/4 Door + description: 'Car type. Please find list of Car Type Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115002516708' + Country: + required: + - IsoCode2 + - IsoCode3 + - Name + type: object + properties: + Name: + type: string + description: country name + example: Ireland + Code: + type: string + description: 3-letter code for the country + example: IRL + IsoCode2: + type: string + description: 2-letter code for the country + example: IE + IsoCode3: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + DateRange: + required: + - EndDate + - StartDate + type: object + properties: + StartDate: + type: string + description: Start date at pickup location of the period. + format: date + example: '2021-06-27' + EndDate: + type: string + description: End date at pickup location of the period. + format: date + example: '2021-06-28' + description: Date range of the period. + DateTimePeriod: + required: + - DateRange + type: object + properties: + DateRange: + $ref: '#/components/schemas/DateRange' + TimeRanges: + type: array + description: A list of time range to indicate the operation hours of the date range. + items: + $ref: '#/components/schemas/TimeRange' + description: A List of date time periods to indicate the vendor business hours for the pickup time. + Deductible: + type: object + properties: + ExcessAmount: + $ref: '#/components/schemas/Money' + LiabilityAmount: + $ref: '#/components/schemas/Money' + DeductibleAmount: + $ref: '#/components/schemas/Money' + description: Indicate whether it is deductible + Discount: + required: + - Code + - Type + type: object + properties: + Type: + type: string + description: 'Discount type. Supported values : CorpDiscount | Coupon.' + example: CorpDiscount + Code: + type: string + description: Discount code. + example: G811490 + description: List of discount information. + Distance: + required: + - Value + type: object + properties: + Value: + type: string + description: The number of miles/kilometers of the distance (specified by the Unit). + example: '75' + Unit: + type: string + description: The unit (KM or MI) for the distance. + example: KM + Direction: + type: string + description: 'The direction of the location from the search ''center''.Possible values are: N,S,W,E,NW,NE,SW,SE' + example: 'N' + description: The extra distance information. + ExtraCostPerDistance: + required: + - Cost + - Distance + type: object + properties: + Distance: + $ref: '#/components/schemas/Distance' + Cost: + $ref: '#/components/schemas/Money' + description: Extra cost for each increment of distance used. + FuelAC: + required: + - Code + - Value + type: object + properties: + Code: + type: string + description: Car FuelAC code. + example: D + Value: + type: string + description: Car FuelAC value. + example: Diesel Air + description: 'Car fuel type and whether Air Conditioning is included. Please find list of Car Fuel AC Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005378328' + GeoLocation: + required: + - Latitude + - Longitude + type: object + properties: + Latitude: + type: string + description: Latitude of the location. + example: '38.184978' + Longitude: + type: string + description: Longitude of the location. + example: '85.7412' + Obfuscated: + type: boolean + description: Container for Geo location. + Image: + required: + - Href + - Size + - Type + type: object + properties: + Type: + type: string + description: 'Resource typeSupported values :Thumbnail - (70 pixels wide)Image - (165 pixels wide)' + Size: + type: string + description: 'Size of imageSupported values :s - (165 pixels wide)t - (70 pixels wide)' + Href: + type: string + description: URL for the image. + description: List of image resources of the car product. + Link: + required: + - Href + type: object + properties: + Accept: + type: string + description: Accept header. + Method: + type: string + description: HTTP method to connect. + example: GET + Href: + type: string + description: HATEOAS URL to fetch details. + description: 'A map of links to other Car APIs. possible link name: ApiBooking' + Location: + required: + - LocationId + type: object + properties: + Type: + type: string + description: The type of location code (MULTICITY | METROCODE). + example: MULTICITY + Id: + type: string + description: Expedia Region ID of the specified airport. + example: '6139103' + Name: + type: string + description: Location Name + example: Seattle-Tacoma International Airport + Code: + type: string + description: Location Code + example: SEA + LocationId: + type: string + description: Location id. + example: SEAT001 + Address: + $ref: '#/components/schemas/Address' + PointOfInterest: + type: string + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + Neighborhood: + $ref: '#/components/schemas/Neighborhood' + RegionId: + type: integer + description: RegionId the location resides in. + format: int64 + example: 6200275 + Country: + $ref: '#/components/schemas/Country' + description: Container for list of possible locations that could be used to disambiguate the query. + Mileage: + required: + - FreeDistance + - FreeDistanceRatePeriod + type: object + properties: + FreeDistance: + $ref: '#/components/schemas/Distance' + FreeDistanceRatePeriod: + type: string + description: Rate period for free distance. + example: Daily + ExtraCostPerDistance: + $ref: '#/components/schemas/ExtraCostPerDistance' + description: A list of charges to be levied based on the mileage driven. + Money: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: '21.9' + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: '#/components/schemas/Money' + description: Price of Special equipment. + Neighborhood: + required: + - Id + - Name + type: object + properties: + Id: + type: string + description: Neighborhood id. + example: '6160232' + Name: + type: string + description: Neighborhood name. + example: Le Pharo + description: Geography entities which are typically contained within a city. This includes the categories neighborhood and point of interest. Low level regions are not a formally defined concept in the geography model. + NonCancellableDateTimeRange: + required: + - EndDateTime + - StartDateTime + type: object + properties: + StartDateTime: + type: string + description: The time of this non-cancellable window starts + format: date-time + EndDateTime: + type: string + description: The time of this non-cancellable window ends + format: date-time + description: Container for non-cancellable date and time range element + PenaltyRule: + required: + - EndDateTime + - Penalty + - StartDateTime + type: object + properties: + Penalty: + $ref: '#/components/schemas/PenaltyType' + StartDateTime: + type: string + description: The time when this penalty window starts + format: date-time + EndDateTime: + type: string + description: The time when this penalty window ends + format: date-time + description: Container for penalty rules + PenaltyType: + required: + - Currency + - Type + - Value + type: object + properties: + Type: + type: string + description: 'What the penalty amount is based on. should be one of the following values:AMOUNT : it means the user is charged a fixed amount specified in the value node. Say 50$ for example.PERCENT : it means the user is charged a percentage of the base rate/total rate.PERDAY : it means the user is charged Per Day Price. For eg.., if the value is 2, it means the penalty amount will the Per day price of 2 days.' + Value: + type: string + description: Value to indicate how many/much of the type listed above is going to be charged as a penalty. + example: '20.0' + Currency: + type: string + description: 'The currency of the amount, only valid when Type=AMOUNT' + example: USD + description: Container for no show penalty element + Price: + required: + - TotalPrice + type: object + properties: + RatePeriodUnitPrice: + $ref: '#/components/schemas/Money' + BasePrice: + $ref: '#/components/schemas/Money' + TaxesAndFees: + $ref: '#/components/schemas/Money' + TotalPriceDueAtBooking: + $ref: '#/components/schemas/Money' + TotalPrice: + $ref: '#/components/schemas/Money' + description: Pricing information for the rental. + RateDetails: + required: + - PrePay + - RatePeriod + type: object + properties: + RatePeriod: + type: string + description: 'Rate period. Supported values: Daily,Weekly,Monthly,Trip,Weekend' + example: Daily + RateCode: + type: string + description: Rate plan identifier. + example: A3D10 + PrePay: + type: boolean + description: Indicates whether this reservation should be paid at the time of booking (true) or at time of rental return (false). + example: false + CreditCardRequired: + type: boolean + description: Indicates whether credit card is required for booking. + example: false + Discounts: + type: array + description: List of discount information. + items: + $ref: '#/components/schemas/Discount' + Mileages: + type: array + description: A list of charges to be levied based on the mileage driven. + items: + $ref: '#/components/schemas/Mileage' + MobileRate: + type: boolean + description: Indicates whether car offer is mobile rate. + example: true + description: The rate detail information for a car offer. + Rating: + required: + - RatingPercentage + - RatingCount + type: object + properties: + RatingPercentage: + type: string + description: The percentage of rating. + example: '87%' + RatingCount: + type: string + description: The total count of rating. + example: '2092' + RatingDetails: + type: array + description: List of all the details of rating. + items: + $ref: '#/components/schemas/RatingDetails' + description: The rating of the car being offered. + RatingWithoutDetails: + required: + - RatingPercentage + - RatingCount + type: object + properties: + RatingPercentage: + type: string + description: The percentage of rating. + example: '87%' + RatingCount: + type: string + description: The total count of rating. + example: '2092' + description: The rating of the car being offered. + RatingDetails: + required: + - Category + - Percentage + type: object + properties: + Category: + type: string + description: The category of rating detail. + example: 'Pick-up location' + Percentage: + type: string + description: The percentage of rating detail category. + example: '98' + description: List of all the details of rating. + Supplier: + required: + - Code + - Id + - Name + type: object + properties: + Id: + type: string + description: Supplier ID. + example: '3' + Name: + type: string + description: Supplier Name. + example: Advantage Rent-A-Car + Code: + type: string + description: Supplier Code. + example: AD + LogoImageUrl: + type: string + description: Supplier Logo Image Url. + example: 'https://media.int.expedia.com/int/cars/logos/NU.png' + description: The supplier of the car being offered. + TimeRange: + required: + - EndTime + - StartTime + type: object + properties: + StartTime: + type: string + description: Start time at pickup location of the date range. + format: time + example: '07:00:00' + EndTime: + type: string + description: End time at pickup location of the date range. + format: time + example: '17:00:00' + description: A list of time range to indicate the operation hours of the date range. + TransmissionDrive: + required: + - Code + - Value + type: object + properties: + Code: + type: string + description: Car transmission and drive code. + example: M + Value: + type: string + description: Car transmission and drive value. + example: Manual AWD + description: 'Car transmission and drive. Please find list of Car Transmission Drive Codes in https://expediaintegration.zendesk.com/hc/en-us/articles/115005380028' + VehicleDetails: + required: + - CarCategory + - CarClass + - CarType + - FuelAC + - TransmissionDrive + type: object + properties: + Make: + type: string + description: Car manufacturer and model. + example: Kia Rio + CarClass: + type: string + description: Car category and type. + example: Economy 2/4Door Car + MinDoors: + type: integer + description: Minimal car door count. + format: int32 + example: 2 + MaxDoors: + type: integer + description: Maximal car door count. + format: int32 + example: 4 + FuelLevel: + type: string + description: Car fuel information. + example: Full to Full + CarCategory: + $ref: '#/components/schemas/CarCategory' + CarType: + $ref: '#/components/schemas/CarType' + TransmissionDrive: + $ref: '#/components/schemas/TransmissionDrive' + FuelAC: + $ref: '#/components/schemas/FuelAC' + Capacity: + $ref: '#/components/schemas/Capacity' + description: Specific information for a car. + VendorLocationDetails: + required: + - DateTime + - Location + type: object + properties: + DateTime: + type: string + description: Pickup date and time. + format: date-time + ShuttleCategory: + type: string + description: The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. + example: AirportShuttleToCounterAndCar + Location: + $ref: '#/components/schemas/Location' + Distance: + $ref: '#/components/schemas/Distance' + OpenSchedule: + type: array + description: A List of date time periods to indicate the vendor business hours for the pickup time. + items: + $ref: '#/components/schemas/DateTimePeriod' + description: Drop off information + Warning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Standardized warning code. + example: INVALID_CORPORATE_DISCOUNT_CODE + Description: + type: string + description: Standardized warning description message. + example: 'The Corporate DiscountCode ''811490'' is unavailable, but we found other rates for you.' + OriginalPrice: + $ref: '#/components/schemas/Money' + NewPrice: + $ref: '#/components/schemas/Money' + ChangedAmount: + $ref: '#/components/schemas/Money' + ChangedPercentage: + type: string + description: |- + The changed percentage. + In the sample 2.97 means the changed percentage is 2.97%. + example: '2.97' + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + xml: + wrapped: true + description: Container for warning codes + Error: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + DetailCode: + type: string + description: Detailed error code describing the issue. + example: MULTIPLE_AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: 'Multiple pickup locations found. ' + LocationKeyword: + type: string + description: The requested location that caused the error. + example: 'Portland. ' + LocationOptions: + type: array + description: 'List for possible locations from which the customer must choose the best one to be re-submitted in the request. ' + items: + $ref: '#/components/schemas/LocationOption' + description: Container for error list. + Errors: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: '#/components/schemas/Error' + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + LocationOption: + required: + - Locations + - RequestedLocation + type: object + properties: + RequestedLocation: + type: string + description: Location used in partner request. + example: Paris + Locations: + type: array + description: Container for list of possible locations that could be used to disambiguate the query. + items: + $ref: '#/components/schemas/Location' + Type: + type: string + description: Type of the location. + example: TRAINSTATION + RegionId: + type: string + description: RegionId the location resides in. + example: '6200275' + ShortName: + type: string + description: The name of the location which matches the location keyword. + example: Dublin Connolly Station + AirportCode: + type: string + description: Indicates the nearest major airport to the location. + example: DUB + Address: + type: string + description: The address of the location. + example: 'Dublin Connolly Station, Ireland' + Country: + $ref: '#/components/schemas/Country' + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + description: 'List for possible locations from which the customer must choose the best one to be re-submitted in the request. ' + DisambiguationResponse: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: '#/components/schemas/Error' + TransactionId: + type: string + description: A unique identifier for the transaction. + example: ec007d1c-8d9d-4ed5-a880-da5b477d8c6c + xml: + name: DisambiguationResponse + CarDetails: + required: + - CancellationPolicy + - DropOffDetails + - PickupDetails + - Price + - Supplier + - VehicleDetails + type: object + properties: + OnlineCheckIn: + type: boolean + description: Indicate whether the supplier supports online checkin + example: true + SkipTheCounter: + type: boolean + description: Indicate whether the supplier supports skip the counter + example: true + VehicleDetails: + $ref: '#/components/schemas/VehicleDetails' + Supplier: + $ref: '#/components/schemas/Supplier' + PickupDetails: + $ref: '#/components/schemas/VendorLocationDetails' + DropOffDetails: + $ref: '#/components/schemas/VendorLocationDetails' + RateDetails: + $ref: '#/components/schemas/RateDetails' + Price: + $ref: '#/components/schemas/Price' + ReferencePrice: + $ref: '#/components/schemas/Money' + AdditionalFees: + type: array + description: List of additional fees including both mandatory and optional fees.such as young driver fee/drop off fee /CollisionDamageWaiver + items: + $ref: '#/components/schemas/AdditionalFee' + TaxesAndFeesDetails: + type: array + description: List of TaxesAndFees Details + items: + $ref: '#/components/schemas/TaxesAndFees' + ExtraFeesDetails: + type: array + description: List of ExtraFeesDetails + items: + $ref: '#/components/schemas/ExtraFees' + SpecialEquipments: + type: array + description: Description and costs of any optional special equipment that may be rented with the car. + items: + $ref: '#/components/schemas/Equipment' + RentalLimits: + $ref: '#/components/schemas/RentalLimits' + CancellationPolicy: + $ref: '#/components/schemas/CancellationPolicy' + NoShowPenalty: + $ref: '#/components/schemas/PenaltyType' + CarPolicies: + type: array + description: A list of policies that apply to this car rental. + items: + $ref: '#/components/schemas/CarPolicy' + Images: + type: array + description: List of image resources of the car product. + items: + $ref: '#/components/schemas/Image' + Rating: + $ref: '#/components/schemas/Rating' + description: Details of requested car. + CarDetailsResponse: + required: + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for warning codes + items: + $ref: '#/components/schemas/Warning' + TransactionId: + type: string + description: A unique identifier for this transaction. + example: 1111111-2222-3333-4444-55555555555 + CarDetails: + $ref: '#/components/schemas/CarDetails' + ValidFormsOfPayment: + type: array + description: List of all the forms of payment that will be accepted for the booking of this rental transaction. + items: + $ref: '#/components/schemas/ValidFormsOfPayment' + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: 'A map of links to other Car APIs. possible link name: ApiBooking' + xml: + wrapped: true + xml: + name: CarDetailsResponse + CarPolicy: + required: + - CategoryCode + type: object + properties: + CategoryCode: + type: string + description: 'The category that this policy applies to (e.g. cancellation, drivers license requirements, driver age requirements) ' + example: Guarantee + PolicyText: + type: string + description: 'The raw text of the policy.This is generally localized into the requested language, but may be English if no other translations are available.' + example: Credit card required. + description: A list of policies that apply to this car rental. + Duration: + required: + - Count + - Unit + type: object + properties: + Unit: + type: string + description: The unit for minimum amount of time for a rental. + example: Day + Count: + type: integer + description: The minimum number of units that qualify for minimum amount of time for a rental. + format: int64 + example: 1 + description: The maximum amount of time for a rental that still qualifies for this rate.This may or may not be the same as the current rental duration. + Equipment: + required: + - Code + - Name + type: object + properties: + Code: + type: string + description: Special equipment code + example: BabyChildSeat + Name: + type: string + description: Special equipment name + example: Baby Child Seat + RatePeriod: + type: string + description: 'Unit indicating the price of special equipment. Support value:Trip,Daily' + example: Trip + Price: + $ref: '#/components/schemas/Money' + description: Description and costs of any optional special equipment that may be rented with the car. + ExtraFees: + required: + - Amount + - Unit + - UnitCount + type: object + properties: + Unit: + type: string + description: 'Rate period beyond the base rate. Supported values: ExtraHourly, ExtraDaily' + example: ExtraHourly + UnitCount: + type: integer + description: Numbers of period + format: int64 + example: 2 + Amount: + $ref: '#/components/schemas/Money' + description: List of ExtraFeesDetails + RentalLimits: + required: + - MaxDuration + - MinDuration + type: object + properties: + MinDuration: + $ref: '#/components/schemas/Duration' + MaxDuration: + $ref: '#/components/schemas/Duration' + description: Limitations that are part of this rental agreement. + TaxesAndFees: + required: + - Amount + - Description + type: object + properties: + Description: + type: string + description: TaxesAndFees description + example: "Rental, CONSOLIDATED FACILITY CHG 4.00/DAY\t" + Amount: + $ref: '#/components/schemas/Money' + description: List of TaxesAndFees Details + ValidFormsOfPayment: + required: + - BrandName + - PaymentMethod + - PaymentSubMethod + type: object + properties: + PaymentMethod: + type: string + description: Method of payment + example: CreditCard + PaymentSubMethod: + type: string + description: Sub method of payment + example: American Express + BrandName: + type: string + description: 'The brand name of the payment sub-method to be displayed to the customer. In many cases it will be the same as the payment sub-method, but "Visa/Carte Bleue" and "Visa/Delta are some of the exceptions.' + example: American Express + description: List of all the forms of payment that will be accepted for the booking of this rental transaction. + APIMError: + title: APIMError + properties: + message: + type: string + securitySchemes: + basicAuth: + type: http + scheme: basic diff --git a/specs/xap-flight-v1.specs.yaml b/specs/xap-flight-v1.specs.yaml new file mode 100644 index 000000000..cd6aa1f04 --- /dev/null +++ b/specs/xap-flight-v1.specs.yaml @@ -0,0 +1,773 @@ +openapi: 3.0.1 +info: + title: EWSAir V1 APIs + description: OpenAPI Spec for EWS Air V1 APIs + contact: + name: Partner APIs + url: 'https://confluence.expedia.biz/display/EWS/EWS+Air' + email: EWSTeam@expedia.com + version: v1 + x-eg-lifecycle: LIVE + x-eg-tags: ["EWS", "Flights", "Flight FareRules", "Flight BaggageFee"] +servers: + - url: 'https://apim.expedia.com' + description: Production Server +tags: + - name: Flight FareRules + - name: Flight BaggageFee +paths: + /flights/baggagefees/{offerToken}: + get: + tags: + - Flight BaggageFee + description: request for baggage fee information + operationId: get-flight-bagaggefee + parameters: + - name: offerToken + in: path + description: The offerToken from the Flight Listings API + required: true + schema: + type: string + example: ClsKAkFBGhcyMDIxLTA0LTIxVDE0OjU1OjAwLjAwMCIDU0VBKhcyMDIxLTA0LTIxVDE3OjUxOjAwLjAwMDIDUEhYOgFOQghOVkFIWlNONUoHRUNPTk9NWVIDNzEwClwKAkFBGhcyMDIxLTA0LTIxVDIxOjQxOjAwLjAwMCIDUEhYKhcyMDIxLTA0LTIxVDIyOjUwOjAwLjAwMDIDTEFTOgFOQghOVkFIWlNONUoHRUNPTk9NWVIEMjEwNhIDVVNEGgJLRw + - name: locale + in: query + description: |- + Locale information to provide airline name. + If this information is not provided, the locale corresponding for that partners default will be selected. + schema: + type: string + example: en_US + - name: currency + in: query + description: |- + Specifies currency code for baggage fees to be returned in. Format should be ISO 4217 currency code (3 letter). + If this information is not provided, the currency corresponding for that partners default will be selected. + schema: + type: string + example: en_US + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-ID + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: 123456-798101112 + - name: Accept + in: header + description: Accept header for the request. + required: true + schema: + type: string + example: application/vnd.exp-flight.v1+json + - name: Accept-Encoding + in: header + description: Accept encoding for the request. + required: false + schema: + type: string + example: gzip + responses: + '400': + description: | + The locale provided in the request is not supported by API(INVALID_LOCALE). + The accept header provided is not as per the documentation(INVALID_ACCEPT_HEADER). + content: + application/vnd.exp-flight.v1+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_ACCEPT_HEADER + Description: Please provide a valid Accept header + TransactionId: c38d0183-5c90-4db6-8c5e-31b7294cd06f + '200': + description: "Baggage fee information returned successfully (this can also\ + \ include Warnings in some cases).Possible warning codes are \nNO_RESULTS_FOUND\n\ + NO_FEE_INFO\n" + content: + application/vnd.exp-flight.v1+json: + schema: + $ref: '#/components/schemas/FlightBaggageFeesResponse' + example: + FlightBaggageFees: + - FlightSegment: + AirlineCode: AA + AirlineName: American Airlines + DepartureAirport: + Code: SEA + ArrivalAirport: + Code: LAS + Links: + WebBaggageFees: + Method: GET + Href: https://www.aa.com/i18n/travelInformation/baggage/baggageAllowance.jsp + BaggageFees: + - BagType: FIRST_BAG + WeightUnit: kg + Weight: "23" + Application: upto + FixedCharge: + Value: "30.0" + Currency: USD + - BagType: SECOND_BAG + WeightUnit: kg + Weight: "23" + Application: upto + FixedCharge: + Value: "40.0" + Currency: USD + - BagType: CARRY_ON + FixedCharge: + Value: "0.0" + Currency: USD + - BagType: PREPAID_CARRY_ON + FixedCharge: + Value: "0.0" + Currency: USD + TransactionId: 6e3c782e-54e4-4f48-a909-d4f2e4fd31c4 + '500': + description: | + Server side error like backend service has some issues or some issues in EWS Air service. The Error code is SERVER_ERROR + content: + application/vnd.exp-flight.v1+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: SERVER_ERROR + Description: An error has occurred while processing the request + TransactionId: 68bce810-5af7-40c1-bea7-07a823b6f1f0 + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicSchema: [] + /flights/farerules/{offerToken}: + get: + tags: + - Flight FareRules + description: request for farerule information + operationId: get-flight-farerules + parameters: + - name: offerToken + in: path + description: An offerToken from a Flight API responses. + required: true + schema: + type: string + example: 599be702-d354-4065-bd52-348af7c728d2 + - name: locale + in: query + description: |- + locale information + (Even though locale may be requested, the majority of the information in the response comes directly from the GDS systems and does NOT have any localization to languages other than English) + schema: + type: string + example: en_US + - name: Source + in: header + description: |- + Accepts any single-word value that describes the source from which the API is being called. + Example: 'Details', 'Book', 'Itin', etc. + schema: + type: string + example: Details + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-ID + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: 123456-798101112 + - name: Accept + in: header + description: Accept header for the request. + required: true + schema: + type: string + example: application/vnd.exp-flight.v1+json + - name: Accept-Encoding + in: header + description: Accept encoding for the request. + required: false + schema: + type: string + example: gzip + responses: + '400': + description: | + Bad request from client.Possible error codes are: + INVALID_ACCEPT_HEADER + INVALID_FARE_RULES_KEY + content: + application/vnd.exp-flight.v1+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_ACCEPT_HEADER + Description: Please provide a valid Accept header + TransactionId: aedfd328-797a-43c9-9584-e901ea1f589d + '500': + description: | + Server side error like backend service has some issues or some issues in EWS Air service.Possible error codes are: + SERVER_ERROR + NO_FARE_RULES_FOUND + content: + application/vnd.exp-flight.v1+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: SERVER_ERROR + Description: An error has occurred while processing the request + TransactionId: 68bce810-5af7-40c1-bea7-07a823b6f1f0 + '200': + description: | + FareRules information returned successfully (in some cases this can have warnings). + Warning messages are: + NO_FARE_RULES_FOUND + content: + application/vnd.exp-flight.v1+json: + schema: + $ref: '#/components/schemas/FlightFareRulesResponse' + example: + FlightFareRule: + - FlightSegment: + AirlineCode: AA + DepartureAirport: + Code: LAS + ArrivalAirport: + Code: LAX + FareRules: + - FareBasisCode: OUALZNN3 + Rules: + - Category: RULE APPLICATION AND OTHER CONDITIONS + Description: | + NOTE - THE FOLLOWING TEXT IS INFORMATIONAL AND NOT VALIDATED FOR AUTOPRICING. + NORMAL/EXCURSION FARES + APPLICATION + CLASS OF SERVICE + THESE FARES APPLY FOR FIRST/BUSINESS/ECONOMY/PREMIUM ECONOMY CLASS SERVICE. + CAPACITY LIMITATIONS + SEATS ARE LIMITED. + - Category: ELIGIBILITY + Description: | + NO ELIGIBILITY REQUIREMENTS APPLY. + - Category: DAY/TIME + Description: | + NO DAY/TIME TRAVEL RESTRICTIONS APPLY. + - Category: SEASONALITY + Description: | + NO SEASONAL TRAVEL RESTRICTIONS APPLY. + - Category: FLIGHT APPLICATION + Description: | + THE FARE COMPONENT MUST NOT BE ON ONE OR MORE OF THE FOLLOWING + ANY AA FLIGHT OPERATED BY AS. + AND + THE FARE COMPONENT MUST BE ON ONE OR MORE OF THE FOLLOWING + ANY AA FLIGHT. + TransactionId: 68bce810-5af7-40c1-bea7-07a823b6f1f0 + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicSchema: [] +components: + schemas: + Error: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: 'Multiple pickup locations found. ' + description: Container for error list. + Errors: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: '#/components/schemas/Error' + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + Airport: + required: + - Code + type: object + properties: + Code: + type: string + description: Three-letter IATA airport code for departure location + example: SFO + Name: + type: string + description: Name of departure airport + example: San Francisco International Airport + City: + type: string + description: City where departure airport resides + example: San Francisco + Province: + type: string + description: Province or State where departure airport resides + example: CA + Country: + type: string + description: Country where departure airport resides + example: USA + description: Container for arrival airport details. + xml: + name: Airport + BaggageFee: + required: + - BagType + type: object + properties: + BagType: + type: string + description: Specifies the type of baggage. + example: FIRST_BAG + enum: + - PREPAID_CARRY_ON + - PREPAID_FIRST_BAG + - PREPAID_SECOND_BAG + - CARRY_ON + - FIRST_BAG + - SECOND_BAG + WeightUnit: + type: string + description: Specifies weight unit for this bagType. This will always be kilograms. + example: kg + Weight: + type: string + description: Weight of the bag. + example: "23" + Application: + type: string + description: This element specifies descriptive text useful in displaying baggage fees. + example: per + enum: + - upto + - per + FixedCharge: + $ref: '#/components/schemas/Fee' + MaxCharge: + $ref: '#/components/schemas/Fee' + MinCharge: + $ref: '#/components/schemas/Fee' + description: |- + Container for baggage fee information of each bag type. + The baggage fee can vary for each bag type. The amount can be zero, fixed amount or will be in a range + xml: + name: BaggageFees + Fee: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: '#/components/schemas/Money' + Name: + type: string + description: This is used when a fee range is returned. It specifies the highest value of bag fee. + FlightBaggageFee: + required: + - BaggageFees + - FlightSegment + type: object + properties: + FlightSegment: + $ref: '#/components/schemas/BaggageFeeFlightSegment' + BaggageFees: + type: array + description: |- + Container for baggage fee information of each bag type. + The baggage fee can vary for each bag type. The amount can be zero, fixed amount or will be in a range + items: + $ref: '#/components/schemas/BaggageFee' + description: Container for information on Baggage fee information of each Segment. + xml: + name: FlightBaggageFees + FlightBaggageFeesResponse: + required: + - FlightBaggageFees + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for Warning messages. + items: + $ref: '#/components/schemas/Warning' + FlightBaggageFees: + type: array + description: Container for information on Baggage fee information of each Segment. + items: + $ref: '#/components/schemas/FlightBaggageFee' + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + xml: + name: FlightBaggageFeesResponse + FareRule: + required: + - FareBasisCode + - Rules + type: object + properties: + FareBasisCode: + type: string + description: Fare Basis Code to which the rules are applied. + example: W7EB + Rules: + type: array + description: Container for fare rules. + items: + $ref: '#/components/schemas/Rule' + description: Contains the list of fare rule details + Rule: + required: + - Category + - Description + type: object + properties: + Category: + type: string + description: Category name of the rule. + example: ELIGIBILITY + Description: + type: string + description: Rule description. + example: NO ELIGIBILITY REQUIREMENTS APPLY + description: Container for fare rules. + FlightFareRuleItem: + required: + - FlightSegment + type: object + properties: + FlightSegment: + required: + - AirlineCode + - ArrivalAirport + - DepartureAirport + type: object + properties: + AirlineCode: + type: string + description: Specifies the 2 letter IATA airline code of the Most Significant Carrier for the flight. In the case of flights with multiple airlines involves this is the airline who will be charging for the baggage. + example: VX + DepartureAirport: + $ref: '#/components/schemas/Airport' + ArrivalAirport: + $ref: '#/components/schemas/Airport' + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: Contains the deeplink URLs of api services and websites + xml: + wrapped: true + FareRules: + type: array + description: Contains the list of fare rule details + xml: + wrapped: true + items: + $ref: '#/components/schemas/FareRule' + description: Container for flight segment information. + description: Container for segment and corresponding fare rules. + xml: + name: FlightFareRules + FlightFareRulesResponse: + required: + - FlightFareRule + - TransactionId + type: object + properties: + FlightFareRule: + type: array + description: Container for segment and corresponding fare rules. + items: + $ref: '#/components/schemas/FlightFareRuleItem' + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + BaggageFeeFlightSegment: + required: + - AirlineCode + - ArrivalAirport + - DepartureAirport + type: object + properties: + AirlineCode: + type: string + description: Specifies the 2 letter IATA airline code of the most significant carrier for the flight. In the case of flights with multiple airlines involves this is the airline who will be charging for the baggage. + example: VX + AirlineName: + type: string + description: Specifies the name of the airline. Where possible this is localized to the LangID supplied in the request. + example: Virgin America + DepartureAirport: + $ref: '#/components/schemas/Airport' + ArrivalAirport: + $ref: '#/components/schemas/Airport' + CabinClass: + type: string + description: Cabin class name of airline. + example: Economy + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: |- + Links to airline's baggage policies. + Where possible this is localized to the LangID supplied in the request. + It is possible that special characters will be present in the URL + xml: + wrapped: true + description: Container for information of Segment. + xml: + name: FlightSegment + Link: + required: + - Href + - Method + type: object + properties: + Accept: + type: string + description: Accept header. + Method: + type: string + description: HTTP method to connect. + example: GET + Href: + type: string + description: HATEOAS URL to fetch details. + description: Contains the deeplink URLs of api services and websites + Money: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + description: Container for showing price. + Warning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Standardized warning code. + example: NO_FEE_INFO + Description: + type: string + description: Standardized warning description message. + example: Fee Information is not available. + description: Container for Warning messages. + APIMError: + title: APIMError + properties: + message: + type: string + securitySchemes: + basicSchema: + type: http + scheme: basic diff --git a/specs/xap-flight-v2.specs.yaml b/specs/xap-flight-v2.specs.yaml new file mode 100644 index 000000000..ee1695648 --- /dev/null +++ b/specs/xap-flight-v2.specs.yaml @@ -0,0 +1,566 @@ +openapi: 3.0.1 +info: + title: EWSAir V2 APIs + description: OpenAPI Spec for EWS Air V2 APIs + contact: + name: Partner APIs + url: 'https://confluence.expedia.biz/display/EWS/EWS+Air' + email: EWSTeam@expedia.com + version: v2 + x-eg-lifecycle: LIVE + x-eg-tags: ["EWS", "Flights", "Flight SeatMap"] +servers: + - url: 'https://apim.expedia.com' + description: Production Server +tags: + - name: Flight SeatMap +paths: + /flights/seatmaps/{offerToken}: + get: + tags: + - Flight SeatMap + description: request for seatmap information + operationId: get-flight-seatmap + parameters: + - name: offerToken + in: path + description: An Air offerToken from a Flight Search or Flight Details. + required: true + schema: + type: string + example: CgFOEgNTRUEaAkFBIhFBbWVyaWNhbiBBaXJsaW5lcyoOQm9laW5nIDczNy04MDAyAzczODodMjAyMS0wNC0yMVQxNzo1MTowMC4wMDAtMDc6MDBCHTIwMjEtMDQtMjFUMTQ6NTU6MDAuMDAwLTA3OjAwSgM3MTBSA1BIWFoHRUNPTk9NWQ + - name: locale + in: query + description: The language in which the response content should be displayed. + schema: + type: string + example: en_US + - name: loyaltyProgramNumber + in: query + description: A Traveler's Loyalty Program number for a specified carrier. + schema: + type: string + example: F263M74 + - name: travelerFirstName + in: query + description: Traveler's first name of whose loyalty information is passed (mandatory if you are entering a loyalty number). + schema: + type: string + example: SAM + - name: travelerLastName + in: query + description: Traveler's last name of whose loyalty information is passed (mandatory if you are entering a loyalty number). + schema: + type: string + example: JOHN + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-ID + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: 123456-798101112 + - name: Accept + in: header + description: Accept header for the request. + required: true + schema: + type: string + example: application/vnd.exp-flight.v2+json + responses: + '200': + description: | + Seatmap information returned successfully (in some cases this can have warnings). + Warning messages are: + NO_RESULTS_FOUND + MISSING_LOYALTY_INFORMATION + content: + application/vnd.exp-flight.v2+json: + schema: + $ref: '#/components/schemas/SeatMapResponse' + example: + FlightNumber: "710" + DepartureDate: 2021-04-21 + MarketingAirLineCode: AA + MarketingAirLineName: American Airlines + EquipmentCode: "738" + EquipmentName: Boeing 737-800 + DepartureAirport: + Code: SEA + ArrivalAirport: + Code: PHX + SeatMap: + CabinClass: ECONOMY + Rows: + - RowNumber: 8 + Seats: + - SeatNumber: 8A + SeatToken: AQogCNOiARIEMTMyMRiSASCycSjs09sCMPDU2wI4S0AAWAESBRoDQURUGgMxOEE + SeatOccupancy: AVAILABLE + Column: A + SeatCharacteristics: + - Code: W + Name: WINDOW + - Code: M + Name: MAINCABINEXTRA + PaidSeat: true + SeatPrice: + Value: 38.55 + Currency: USD + - RowNumber: 33 + Seats: + - SeatNumber: 33A + SeatToken: AQogCNOiARIEMTMyMRiSASCycSjs09sCMPDU2wI4S0AAWAESBRoDQURUGgMxOEE + SeatOccupancy: OCCUPIED + Column: A + SeatCharacteristics: + - Code: W + Name: WINDOW + PaidSeat: true + SeatPrice: + Value: 38.55 + Currency: USD + - SeatNumber: 33B + SeatToken: AQogCNOiARIEMTMyMRiSASCycSjs09sCMPDU2wI4S0AAWAESBRoDQURUGgMxOEE + SeatOccupancy: OCCUPIED + Column: B + PaidSeat: true + SeatPrice: + Value: 35.20 + Currency: USD + Warnings: + - Code: MISSING_LOYALTY_INFORMATION + Description: travelerFirstName,travelerLastName missing in request + TransactionId: 7b8a36d9-c920-40da-999d-5eddd53318b2 + '400': + description: | + Error shown when accept header or partner transaction ID is missing or invalid. + Possible error codes are: + INVALID_ACCEPT_HEADER + INVALID_ARGUMENT + content: + application/vnd.exp-flight.v2+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_ACCEPT_HEADER + Description: Please provide a valid Accept header + TransactionId: aedfd328-797a-43c9-9584-e901ea1f589d + '500': + description: | + There is either no seat map data available for the request or supply failed to provide seat map information due to internal failure. + Possible error codes are: + SEATMAP_NOT_AVAILABLE + SERVER_ERROR + content: + application/vnd.exp-flight.v2+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: SERVER_ERROR + Description: An error has occurred while processing the request + TransactionId: 68bce810-5af7-40c1-bea7-07a823b6f1f0 + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + security: + - basicSchema: [] +components: + schemas: + Airport: + required: + - Code + type: object + properties: + Code: + type: string + description: Three-letter IATA airport code for departure location + example: SFO + Name: + type: string + description: Name of departure airport + example: San Francisco International Airport + City: + type: string + description: City where departure airport resides + example: San Francisco + Province: + type: string + description: Province or State where departure airport resides + example: CA + Country: + type: string + description: Country where departure airport resides + example: USA + Latitude: + type: string + description: Latitude where departure airport resides + example: "33.641" + Longitude: + type: string + description: Longitude where departure airport resides + example: "84.4429" + description: Container for showing the arrival airport details + xml: + name: Airport + Row: + required: + - RowNumber + type: object + properties: + RowNumber: + type: integer + description: Specific row number. + format: int32 + example: 37 + RowCharacteristics: + type: array + description: Container for row characteristics. + items: + $ref: '#/components/schemas/RowCharacteristic' + Seats: + type: array + description: |- + Container for seat information in that particular row. + It can be null if it is empty row. + items: + $ref: '#/components/schemas/Seat' + description: Container for list of seat row information. + xml: + name: Row + RowCharacteristic: + required: + - Code + - Name + type: object + properties: + Code: + type: string + description: Code of Row + example: E + enum: + - E + - X + - S + - N + - U + - W + Name: + type: string + description: |- + Corresponding name for the row code + Same response will have upper deck and lower deck information if any + example: EMPTY + enum: + - EMPTY + - EXIT + - SMOKING + - NONSMOKING + - UPPERDECK + - OVERWING + description: Container for row characteristics. + xml: + name: RowCharacteristic + Seat: + type: object + properties: + SeatNumber: + type: string + description: |- + Seat Number + It can be null if there is no physical seat in the location + example: 37A + SeatToken: + type: string + description: Token used by the Booking service to reserve seats + example: AQogCNOiARIEMTMyMRiSASCycSjs09sCMPDU2wI4S0AAWAESBRoDQURUGgMxOEE + SeatOccupancy: + type: string + description: |- + Occupancy details whether it is available or not. + It can be null if there is no physical seat in that location. + AVAILABLE - Seat is currently available for selection. + OCCUPIED - Seat already occupied + example: OCCUPIED + enum: + - AVAILABLE + - OCCUPIED + Column: + type: string + description: It can be null if there is no physical seat in that location + example: A + SeatCharacteristics: + type: array + description: Container for seat characteristics information. + items: + $ref: '#/components/schemas/SeatCharacteristic' + PaidSeat: + type: boolean + description: A boolean object (true/false) to indicate whether the seat is paid or not. It can be null + SeatPrice: + type: object + description: Container for seat price to provide fee information associated with a paid seat. It can be null if it is not a paid seat. + required: + - Value + - Currency + properties: + Value: + type: string + example: "17.99" + Currency: + type: string + example: "USD" + description: |- + Container for seat information in that particular row. + It can be null if it is empty row. + xml: + name: Seat + SeatCharacteristic: + required: + - Code + - Name + type: object + properties: + Code: + type: string + description: Code of seat + example: W + enum: + - E + - H + - W + - A + - X + - M + - S + - P + Name: + type: string + description: Corresponding name for the seat code + example: WINDOW + enum: + - EMPTY + - ACCESSIBLE + - WINDOW + - AISLE + - EXIT + - MAINCABINEXTRA + - PREFERRED + - PREMIUM + description: Container for seat characteristics information. + xml: + name: SeatCharacteristic + SeatMap: + required: + - CabinClass + - Rows + type: object + properties: + CabinClass: + type: string + description: Cabin code for different class of service offered by the airline + example: ECONOMY + enum: + - ECONOMY + - FIRST + - BUSINESS + - PREMIUM_ECONOMY + Rows: + type: array + description: Container for list of seat row information. + items: + $ref: '#/components/schemas/Row' + description: Container for seatmap information. + xml: + name: SeatMap + SeatMapResponse: + required: + - ArrivalAirport + - DepartureAirport + - DepartureDate + - EquipmentCode + - FlightNumber + - MarketingAirLineCode + - SeatMap + - TransactionId + type: object + properties: + FlightNumber: + type: string + description: Specifies the requested flight number. + example: "0300" + DepartureDate: + type: string + description: Specifies the departure date of the requested flight + format: date + example: 2021-07-03 + MarketingAirLineCode: + type: string + description: The IATA or Expedia assigned airline codes of the carrier. IATA codes must contain at least one alphabetic character. + example: AS + MarketingAirLineName: + type: string + description: The airline name of the marketing airline + example: Alaska Airlines + EquipmentCode: + type: string + description: IATA Equipment type codes. + example: 73J + EquipmentName: + type: string + description: Equipment type name. + example: Airbus 123 + DepartureAirport: + $ref: '#/components/schemas/Airport' + ArrivalAirport: + $ref: '#/components/schemas/Airport' + SeatMap: + $ref: '#/components/schemas/SeatMap' + Warnings: + type: array + description: Container for Warning messages. + items: + $ref: '#/components/schemas/Warning' + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + xml: + name: SeatMapResponse + Warning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Standardized warning code. + example: NO_RESULTS_FOUND + Description: + type: string + description: Standardized warning description message. + example: No results found for the request. + description: Container for Warning message. + Error: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: SERVER_ERROR + Description: + type: string + description: A simple description of what the error is. + example: An error has occurred while processing the request. + description: Container for error list. + Errors: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: '#/components/schemas/Error' + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + APIMError: + title: APIMError + properties: + message: + type: string + securitySchemes: + basicSchema: + type: http + scheme: basic diff --git a/specs/xap-flight-v3.specs.yaml b/specs/xap-flight-v3.specs.yaml new file mode 100644 index 000000000..af6f61ab7 --- /dev/null +++ b/specs/xap-flight-v3.specs.yaml @@ -0,0 +1,4571 @@ +openapi: 3.0.1 +info: + title: EWSAir V3 APIs + description: OpenAPI Spec for EWS Air V3 APIs + contact: + name: Partner APIs + url: 'https://confluence.expedia.biz/display/EWS/EWS+Air' + email: EWSTeam@expedia.com + version: v3 + x-eg-lifecycle: LIVE + x-eg-api-tags: ["EWS", "XAP", "Flights", "EWSFlights", "Flight List", "Flight Details", "Flight Links", "Flight FlexSearch", + "Flight FareCalendar"] +tags: + - name: Flight Links + - name: Flight Listings + - name: Flight Details + - name: Flight FlexSearch + - name: Flight FareCalendar +servers: + - url: 'https://apim.expedia.com' + description: Production Server +paths: + '/flights/links': + post: + tags: + - Flight Links + parameters: + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-ID + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: 123456-798101112 + - name: Accept + in: header + description: Accept header for the request. + required: true + schema: + type: string + example: application/vnd.exp-flight.v3+json + - name: Accept-Encoding + in: header + description: Accept encoding for the request. + required: false + schema: + type: string + example: gzip + summary: "Request for flight links" + operationId: "post-flight-links" + description: "The API inputs define a particular flight itinerary. The API response will include deeplinks to Expedia Flight Infosite and/or an API query for details for the selected flight." + requestBody: + content: + 'application/json': + schema: + "$ref": '#/components/schemas/FlightLinksRequest' + example: + Flights: + - FlightId: abc + SplitTicket: false + Segments: + - FareType: PUBLISHED + Provider: Amadeus + LowCost: false + Legs: + - DepartureAirport: + Code: COK + ArrivalAirport: + Code: DOH + DepartureDateTime: '2021-05-06T03:35:00+05:30' + ArrivalDateTime: '2021-05-06T05:35:00+03:00' + FlightNumber: '517' + MarketingAirlineCode: QR + BookingCode: W + CabinClass: ECONOMY + - DepartureAirport: + Code: DOH + ArrivalAirport: + Code: ORD + DepartureDateTime: '2021-05-06T08:50:00+03:00' + ArrivalDateTime: '2021-05-06T14:55:00-05:00' + FlightNumber: '725' + MarketingAirlineCode: QR + BookingCode: W + CabinClass: ECONOMY + TotalPrice: + Value: '2576.68' + Currency: USD + - FlightId: def + SplitTicket: false + Segments: + - FareType: PUBLISHED + Provider: Sabre + LowCost: false + Legs: + - DepartureAirport: + Code: COK + ArrivalAirport: + Code: AUH + DepartureDateTime: '2021-05-06T21:25:00+05:30' + ArrivalDateTime: '2021-05-06T23:55:00+04:00' + FlightNumber: '6528' + MarketingAirlineCode: 9W + BookingCode: H + CabinClass: ECONOMY + - DepartureAirport: + Code: AUH + ArrivalAirport: + Code: ORD + DepartureDateTime: '2021-05-07T03:20:00+04:00' + ArrivalDateTime: '2021-05-07T08:55:00-05:00' + FlightNumber: '6405' + MarketingAirlineCode: 9W + BookingCode: H + CabinClass: ECONOMY + TotalPrice: + Value: '3266.52' + Currency: USD + Passengers: + Adult: '1' + Senior: '1' + ChildrenAges: '2,14' + Links: + - WD + - AD + responses: + '200': + description: "Links returned successfully" + content: + 'application/vnd.exp-flight.v3+json': + schema: + $ref: "#/components/schemas/FlightLinksResponse" + '500': + description: "Internal Server Error" + content: + 'application/vnd.exp-flight.v3+json': + schema: + $ref: "#/components/schemas/ErrorResponse" + '400': + description: "Bad Request" + content: + 'application/vnd.exp-flight.v3+json': + schema: + $ref: "#/components/schemas/ErrorResponse" + '401': + description: "Unauthorized" + content: + 'application/json': + schema: + type: object + required: + - message + properties: + message: + type: string + example: "Invalid authentication credentials" + '403': + description: "Forbidden" + content: + 'application/json': + schema: + type: object + required: + - message + properties: + message: + type: string + example: "You cannot consume this service" + '404': + description: "Not Found" + content: + 'application/json': + schema: + type: object + required: + - message + properties: + message: + type: string + example: "The server can't find the requested resource" + '405': + description: "Method Not Allowed" + content: + 'application/json': + schema: + type: object + required: + - message + properties: + message: + type: string + example: "The request method is known by the server but is not supported by the target resource" + '429': + description: "Too Many Requests" + content: + 'application/json': + schema: + type: object + required: + - message + properties: + message: + type: string + example: "The user has sent too many requests in a given amount of time" + '503': + description: "Service Unavailable" + content: + 'application/json': + schema: + type: object + required: + - message + properties: + message: + type: string + example: "The server is not ready to handle the request" + '504': + description: "Gateway Timeout" + content: + 'application/json': + schema: + type: object + required: + - message + properties: + message: + type: string + example: "The server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request" + /flights/listings: + get: + tags: + - Flight Listings + description: search flight products + operationId: get-flight-listings + parameters: + - name: adult + in: query + description: |- + Number of Adult Travelers. + Either one adult or one senior per itinerary is mandatory + schema: + type: integer + example: 1 + - name: senior + in: query + description: Number of Senior (age > 65) Travelers + schema: + type: integer + example: 1 + - name: childrenAges + in: query + description: Comma-separated list of the ages of all child travelers (ages 2 - 17). + schema: + type: string + example: 4,5 + - name: infantInLap + in: query + description: |- + Number of Infant travelers without a reserved seat. + Age should be less than 2 + schema: + type: integer + example: 1 + - name: infantInSeat + in: query + description: |- + Number of Infant travelers with reserved seat. + Age should be less than 2 + schema: + type: integer + example: 1 + - name: segment1.origin + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is departing. + required: true + schema: + type: string + example: LAS + - name: segment1.destination + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is arriving. + required: true + schema: + type: string + example: LAX + - name: segment1.departureDate + in: query + description: Date, in ISO format [YYYY-MM-DD], on which customer wants to depart. + required: true + schema: + type: string + format: date + example: '2021-07-01' + - name: segment1.departureStartTime + in: query + description: Lower limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + example: 07:00:00 + - name: segment1.departureEndTime + in: query + description: Upper limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + example: 09:00:00 + - name: segment2.origin + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is departing. + schema: + type: string + - name: segment2.destination + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is arriving. + schema: + type: string + - name: segment2.departureDate + in: query + description: Date, in ISO format [YYYY-MM-DD], on which customer wants to depart. + schema: + type: string + - name: segment2.departureStartTime + in: query + description: Lower limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment2.departureEndTime + in: query + description: Upper limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment3.origin + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is departing. + schema: + type: string + - name: segment3.destination + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is arriving. + schema: + type: string + - name: segment3.departureDate + in: query + description: Date, in ISO format [YYYY-MM-DD], on which customer wants to depart. + schema: + type: string + - name: segment3.departureStartTime + in: query + description: Lower limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment3.departureEndTime + in: query + description: Upper limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment4.origin + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is departing. + schema: + type: string + - name: segment4.destination + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is arriving. + schema: + type: string + - name: segment4.departureDate + in: query + description: Date, in ISO format [YYYY-MM-DD], on which customer wants to depart. + schema: + type: string + - name: segment4.departureStartTime + in: query + description: Lower limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment4.departureEndTime + in: query + description: Upper limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment5.origin + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is departing. + schema: + type: string + - name: segment5.destination + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is arriving. + schema: + type: string + - name: segment5.departureDate + in: query + description: Date, in ISO format [YYYY-MM-DD], on which customer wants to depart. + schema: + type: string + - name: segment5.departureStartTime + in: query + description: Lower limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment5.departureEndTime + in: query + description: Upper limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment6.origin + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is departing. + schema: + type: string + - name: segment6.destination + in: query + description: 3-letter IATA Airport code/Location name from where the passenger is arriving. + schema: + type: string + - name: segment6.departureDate + in: query + description: Date, in ISO format [YYYY-MM-DD], on which customer wants to depart. + schema: + type: string + - name: segment6.departureStartTime + in: query + description: Lower limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: segment6.departureEndTime + in: query + description: Upper limit of desired departure time window, expressed in the local time of the departure location, in standard ISO format. + schema: + type: string + - name: locale + in: query + description: Indicates the language and country with which the user would like to see any translated information. + schema: + type: string + example: en_US + - name: cabinClass + in: query + description: |- + The desired cabin classes that the user would like to see offers for. + Options can be: economy | first | business | premiumeconomy + schema: + type: string + example: economy + - name: numberOfStops + in: query + description: |- + Filter for the number of stops the user would like to see offers for. + A value of 0 returns only non-stop flights in the search response, and a value of 1 returns offers + schema: + type: integer + example: 0 + - name: sortType + in: query + description: |- + Sort the search results according to one selected category. + Only sort by price is supported at this time. + Note: default = Price + schema: + type: string + example: Price + - name: limit + in: query + description: |- + The maximum number of Flight offers returned in the response. + Must be an integer value greater than 0.Note: default = 1600 + schema: + type: integer + example: 100 + - name: selectedCarriers + in: query + description: Adding comma-separated list of IATA or Expedia airline codes will limit the search results to include flight offers only with the selected carriers. + schema: + type: string + example: AS + - name: accountCodes + in: query + description: AlphaNumeric characters. Different codes separated by comma + schema: + type: string + example: AXP01 + - name: agent + in: query + description: |- + Designates whether a telesales agent was involved in the transaction. + true = telesales agent involved + false = no telesales agent involved + schema: + type: boolean + example: true + - name: links + in: query + description: |- + Comma-separated list that indicates which HATEOAS links should be included in the response. + WD (Website Details Page - included by default) + AD (Details API link) + ABF (Baggage Fee API) + ASM (Seat Map API) + WPS (Web Package Search) + schema: + type: string + example: WD + - name: refundable + in: query + description: |- + Refundable solutions will be returned if and only if we pass refundable as true in the request.(refundable=true). + (Not Yet Supported in Production) + schema: + type: boolean + example: true + - name: filterNearByAirport + in: query + description: |- + Filters nearby airports ensuring only results from the requests airport code are returned. + This request param is valid only for AirportCode-based searches. + Note: default = false + schema: + type: boolean + example: true + - name: filterBasicEconomy + in: query + description: |- + Filters out all the Basic Economy fare solutions in the flight search response. + Note: default = false + schema: + type: boolean + example: true + - name: anchorBy + in: query + description: |- + Designates that the user is doing a Multi-step Search. + Possible values are: segment1 | segment2 | segment3 | segment4 | segment5 + schema: + type: string + example: segment1 + - name: selectedOffer + in: query + description: | + Captures the previously selected flight segments during a Multi-step Search. + schema: + type: string + example: AQojCiEIwYIBEgM1MDQYi5ABIIu4ASihu5wBMPa7nAE4QkAAWAESCggBEAEYASoCQUEYASIECAEQASgCKAMoBDAC%2BAQokCiIIxJgBEgQyOTkyGIu4ASCLkAEovNycATCG3ZwBOEVAAFgBEgoIARABGAEqAkRMGAEiBAgBEAEoAigDKAQwAQ + - name: filterNonFlightOffers + in: query + description: |- + If set to true, this parameter filters out all non-Flight Offers (offers with any of the legs comprising transit via Train, Bus or Boat) from flight search response. + If the parameter is not present or is set to false, then Flight Offers may contain travel legs via means other than flight (Train, Bus or Boat). + Default value is false + schema: + type: boolean + example: true + - name: enableSplitTicket + in: query + description: |- + if set to false, this parameter will filter out all the split ticket solutions from the Flight Offers. + If set to true (by default it will be true), API response will include split ticket solutions if split ticket is enabled at key configuration level as well. + schema: + type: boolean + example: true + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-ID + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: 123456-798101112 + - name: Accept + in: header + description: Accept header for the request. + required: true + schema: + type: string + example: application/vnd.exp-flight.v3+json + - name: Accept-Encoding + in: header + description: Accept encoding for the request. + required: false + schema: + type: string + example: gzip + responses: + '400': + description: |- + Client side error while providing the request i.e bad / invalid input parameters. + Possible Error codes { MISSING_ADULT_OR_SENIOR + INFANT_IN_LAP_ACCOMPANIED_BY_ADULT_OR_SENIOR + INVALID_CHILD_AGE + INVALID_ACCEPT_HEADER + INVALID_PASSENGER_COUNT + ORIGIN_REQUIRED + INVALID_ORIGIN + DESTINATION_REQUIRED + INVALID_DESTINATION + INVALID_DEPARTURE_DATE + INVALID_DEPARTURE_TIME + DEPARTURE_TIME_DEPARTURE_TIMESPAN_NOT_ALLOWED_TOGETHER + DEPARTURE_DATE_OUT_OF_RANGE + DEPARTURE_DATE_OUT_OF_RANGE + INVALID_LOCALE + INVALID_ADULT_COUNT + INVALID_SENIOR_COUNT + INVALID_CHILD_COUNT + INVALID_INFANT_IN_LAP_COUNT + INVALID_INFANT_IN_SEAT_COUNT + INVALID_SELECTED_CARRIERS + INVALID_SELECTED_CARRIERS + INVALID_NUMBER_OF_STOPS + INVALID_SORT_TYPE + INVALID_NUMBER_OF_FLIGHTS + SELECTED_FLIGHT_DETAILS_NOT_AVAILABLE + INVALID_ANCHOR + INVALID_CABIN_CLASS + INVALID_DEPARTURE_TIMESPAN + MISSING_MANDATORY_SEGMENT_DETAILS + ORIGIN_DESTINATION_SAME + INVALID_DEPARTURE_DATE + INVALID_LINKS + INVALID_AGENT + } + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_ACCEPT_HEADER + Description: Please provide a valid Accept header + TransactionId: c38d0183-5c90-4db6-8c5e-31b7294cd06f + '500': + description: | + Server side error like backend service has some issues or some issues in EWS Air service. The Error code is SERVER_ERROR + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: SERVER_ERROR + Description: An error has occurred while processing the request + TransactionId: 68bce810-5af7-40c1-bea7-07a823b6f1f0 + '409': + description: There are no flights for a requested criteria during flight search API + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: NO_RESULTS_FOUND + Description: No flights solutions found for the request. + TransactionId: 68bce810-5af7-40c1-bea7-07a823b6f1f0 + '200': + description: Success Response + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/FlightSearchResponse' + example: + Segments: + - SegmentId: MTRfUHVibGlzaGVk + FlightDuration: PT4H34M + TotalStops: 0 + DepartureArrivalDayDifference: 1 + AirportChange: false + SeatsLeft: 10 + FareType: PUBLISHED + Legs: + - DepartureAirport: + Code: LAS + Name: McCarran Intl. + City: Las Vegas + Province: NV + Country: USA + Latitude: "36.085393" + Longitude: "-115.150098" + ArrivalAirport: + Code: FLL + Name: Fort Lauderdale - Hollywood Intl. + City: Fort Lauderdale + Province: FL + Country: USA + Latitude: "26.071529" + Longitude: "-80.1449" + DepartureDateTime: 2021-11-01T22:40:00-07:00 + ArrivalDateTime: 2021-11-02T06:14:00-04:00 + FlightNumber: "954" + MarketingAirlineCode: NK + MarketingAirlineName: Spirit Airlines + EquipmentCode: 32A + FlightOnTimePercentage: "80" + EquipmentName: AIRBUS INDUSTRIE A320 SHARKLETS + FlightDuration: PT4H34M + SeatMapAvailable: false + FlightDistance: + Value: "2161" + Unit: MI + BookingCode: R + CabinClass: ECONOMY + FareBasisCode: R7XSNR + MealOptions: + - FOOD_FOR_PURCHASE + Amenities: + Entertaintment: + Available: YES + Wifi: + Available: YES + Power: + Available: YES + Offers: + - offerToken: v5-sos-42b700553889490c9e966329ac528b67-3-1~0.S~AQoCCAESBwjUBBABGAEgASAMIAcgDSAJKAJYAQ~AQoiCiAIzpYBEgM5NTQYi5ABIOVaKLSouwEwxqq7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI+AQoiCiAIzpYBEgM5NTQYi5ABIOVaKLSouwEwxqq7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI + SplitTicket: false + OpaqueFlight: false + Free24HourCancellation: false + Links: + WebDetails: + Method: GET + Href: https://www.expedia.com/go/udp?CCheck=1&NumAdult=1&NumSenior=1&NumChild=2&ChildrenAges=2|3&Class=3&Sort=10&TripType=OneWay&ProductType=air&eapid=0-1&ServiceVersion=V5&MessageGuid=80f50380-34fa-11e9-9415-0a6b914daa30&langid=1033&piid=v5-sos-42b700553889490c9e966329ac528b67-3-1~0.S~AQoCCAESBwjUBBABGAEgASAMIAcgDSAJKAJYAQ~AQoiCiAIzpYBEgM5NTQYi5ABIOVaKLSouwEwxqq7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI&Price=545.16&CurrencyCode=USD�cy=USD&DepartureTLA=L1:LAS&ArrivalTLA=L1:FLL&DepartureDate=L1:2021-11-01&ArrivalDate=L1:2021-11-02&RefundableFlightsOnly=N + SegmentIds: + - MTRfUHVibGlzaGVk + OfferPrice: + TotalPrice: + Value: "545.16" + Currency: USD + BasePrice: + Value: "453.92" + Currency: USD + TotalTaxes: + Value: "91.24" + Currency: USD + TotalTaxesAndFees: + Value: "91.24" + Currency: USD + AveragePricePerTicket: + Value: "136.29" + Currency: USD + Count: 4 + PricePerPassengerCategory: + - Category: ADULT + Count: 1 + TotalPrice: + Value: "136.29" + Currency: USD + BasePrice: + Value: "113.48" + Currency: USD + TotalTaxes: + Value: "22.81" + Currency: USD + - Category: CHILD + Count: 2 + TotalPrice: + Value: "136.29" + Currency: USD + BasePrice: + Value: "113.48" + Currency: USD + TotalTaxes: + Value: "22.81" + Currency: USD + - Category: SENIOR + Count: 1 + TotalPrice: + Value: "136.29" + Currency: USD + BasePrice: + Value: "113.48" + Currency: USD + TotalTaxes: + Value: "22.81" + Currency: USD + Refundable: false + RefundPenalty: + - SegmentIds: + - MTRfUHVibGlzaGVk + PreTripChange: + Allow: YES + International: false + TicketType: ETicket + SearchCities: + - Code: FLL + City: Fort Lauderdale + Province: FL + Country: USA + ValidFormsOfPayment: + UG9pbnRzRXhwZWRpYVJld2FyZHMwLjAw: + - PaymentMethod: CREDITCARD + Name: AMERICANEXPRESS + Fee: "0.00" + Currency: USD + TransactionId: 80f50380-34fa-11e9-9415-0a6b914daa30 + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + /flights/details/{offerToken}: + get: + tags: + - Flight Details + description: |- + The Flight Details API will return validated pricing on the itinerary passed in on the request. + It's a GET request with the transaction secured over HTTPS. + This message supports response in JSON and XML format. + operationId: get-flight-details + parameters: + - name: offerToken + in: path + description: a valid offerToken from the Flight Search API + required: true + schema: + type: string + example: v5-sos-41e0c0266d6b4329a76e5d04f82c200a-23-39-2~2.S~AQoECL-kBBIICNQEEAEYwB8gASAMIAcgDSgCWAJwAA~AQoqCigIwYIBEgQyNzg1GIu4ASCLkAEo383sATCmzuwBOFFAAFgBagRNQUlOCioKKAjBggESBDI0NzkYi5ABIIu4ASiBgu0BMNWC7QE4UUAAWAFqBE1BSU4SCggCEAEYAioCQUEYASIECAEQASgCKAwoAygEMAI + - name: price + in: query + description: Included to determine whether there is a price change between the original search and the details response. + schema: + type: string + example: "94.8" + - name: locale + in: query + description: Defines request language and country for response. + schema: + type: string + example: en_US + - name: agent + in: query + description: True means that a telesales agent is involved and the response should include a telesales fee. + schema: + type: boolean + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-ID + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: 123456-798101112 + - name: Accept + in: header + description: Accept header for the request. + required: true + schema: + type: string + example: application/vnd.exp-flight.v3+json + - name: Accept-Encoding + in: header + description: Accept encoding for the request. + required: false + schema: + type: string + example: gzip + responses: + '409': + description: Flight not available. The request flight is not longer available + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: FLIGHT_NOT_AVAILABLE + Description: Requested flight is not available. + TransactionId: d15e3738-c4ce-436f-a1a5-7033856981c4 + '500': + description: 'Server side error, An error has occurred while processing + the request. There is a server-side issue that has resulted in a failure. ' + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: SERVER_ERROR + Description: No flights solutions found for the request. + TransactionId: cf4bc542-1f0f-4312-a20e-b99926e25946 + '400': + description: Invalid accept header. Please provide a valid Accept header, The accept header provided is not as per the documentation. + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_ACCEPT_HEADER + Description: Please provide a valid Accept header + TransactionId: 5737a450-4a04-4b16-b803-54ca5f651093 + '200': + description: Successful response from server. Include warning in some cases like price change + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/FlightDetailsResponse' + example: + Warnings: + - Code: PRICE_DECREASE + Description: A price change was detected + OriginalPrice: + Value: "127.59" + Currency: USD + NewPrice: + Value: "120.60" + Currency: USD + ChangedAmount: + Value: "6.99" + Currency: USD + Segments: + - SegmentId: UFVCTElTSEVEU0VBUEhYMjAyMS0wNS0xNVQxNjoxMDowMC4wMDAtMDc6MDAyMDIxLTA1LTE1VDE5OjEwOjAwLjAwMC0wNzowMDcxMEFBUFQzSFFFQ09OT01ZUVZBSFpTTjVQSFhMQVMyMDIxLTA1LTE1VDE5OjQ2OjAwLjAwMC0wNzowMDIwMjEtMDUtMTVUMjA6NTk6MDAuMDAwLTA3OjAwMjEwNkFBUFQxSDEzTVFFQ09OT01ZUVZBSFpTTjU= + FlightDuration: PT4H49M + TotalStops: 1 + DepartureArrivalDayDifference: 0 + AirportChange: false + FareType: PUBLISHED + Links: + ApiBaggageFees: + Accept: application/vnd.exp-flight.v1+json + Method: GET + Href: https://apim.expedia.com/flights/baggagefees/Cl8KAkFBEgJBQRoXMjAyMS0wNS0xNVQxNjoxMDowMC4wMDAiA1NFQSoXMjAyMS0wNS0xNVQxOToxMDowMC4wMDAyA1BIWDoBUUIIUVZBSFpTTjVKB0VDT05PTVlSAzcxMApgCgJBQRICQUEaFzIwMjEtMDUtMTVUMTk6NDY6MDAuMDAwIgNQSFgqFzIwMjEtMDUtMTVUMjA6NTk6MDAuMDAwMgNMQVM6AVFCCFFWQUhaU041SgdFQ09OT01ZUgQyMTA2GgJLRw + Price: + TotalPrice: + Value: "57.20" + Currency: USD + BasePrice: + Value: "31.63" + Currency: USD + TotalTaxes: + Value: "25.57" + Currency: USD + TotalTaxesAndFees: + Value: "25.57" + Currency: USD + AveragePricePerTicket: + Value: "57.20" + Currency: USD + Count: 1 + PricePerPassengerCategory: + - Category: ADULT + Count: 1 + TotalPrice: + Value: "57.20" + Currency: USD + BasePrice: + Value: "31.63" + Currency: USD + TotalTaxes: + Value: "25.57" + Currency: USD + Legs: + - Links: + ApiSeatMap: + Accept: application/vnd.exp-flight.v2+json + Method: GET + Href: https://apim.expedia.com/flights/seatmaps/CgFREgNTRUEaAkFBIhFBbWVyaWNhbiBBaXJsaW5lcyoLQWlyYnVzIEEzMjEyAzMyMTodMjAyMS0wNS0xNVQxOToxMDowMC4wMDAtMDc6MDBCHTIwMjEtMDUtMTVUMTY6MTA6MDAuMDAwLTA3OjAwSgM3MTBSA1BIWFoHRUNPTk9NWWICQUE + DepartureAirport: + Code: SEA + Name: Seattle - Tacoma Intl. + City: Seattle + Province: WA + Country: USA + Latitude: "47.44363" + Longitude: "-122.30175" + ArrivalAirport: + Code: PHX + Name: Sky Harbor Intl. + City: Phoenix + Province: AZ + Country: USA + Latitude: "33.43512" + Longitude: "-112.01034" + DepartureDateTime: 2021-05-15T16:10:00-07:00 + ArrivalDateTime: 2021-05-15T19:10:00-07:00 + FlightNumber: "710" + MarketingAirlineCode: AA + MarketingAirlineName: American Airlines + OperatingAirlineCode: AA + OperatingAirlineName: American Airlines + EquipmentCode: "321" + EquipmentName: Airbus A321 + FlightDuration: PT3H + ConnectionTime: PT0H36M + SeatMapAvailable: false + FlightDistance: + Value: "1108" + Unit: MI + BookingCode: Q + CabinClass: ECONOMY + LoungeKeys: + - SEACENTURION + FareBasisCode: QVAHZSN5 + - Links: + ApiSeatMap: + Accept: application/vnd.exp-flight.v2+json + Method: GET + Href: https://apim.expedia.com/flights/seatmaps/CgFREgNQSFgaAkFBIhFBbWVyaWNhbiBBaXJsaW5lcyoOQm9laW5nIDczNy04MDAyAzczODodMjAyMS0wNS0xNVQyMDo1OTowMC4wMDAtMDc6MDBCHTIwMjEtMDUtMTVUMTk6NDY6MDAuMDAwLTA3OjAwSgQyMTA2UgNMQVNaB0VDT05PTVliAkFB + DepartureAirport: + Code: PHX + Name: Sky Harbor Intl. + City: Phoenix + Province: AZ + Country: USA + Latitude: "33.43512" + Longitude: "-112.01034" + ArrivalAirport: + Code: LAS + Name: McCarran Intl. + City: Las Vegas + Province: NV + Country: USA + Latitude: "36.085393" + Longitude: "-115.150098" + DepartureDateTime: 2021-05-15T19:46:00-07:00 + ArrivalDateTime: 2021-05-15T20:59:00-07:00 + FlightNumber: "2106" + MarketingAirlineCode: AA + MarketingAirlineName: American Airlines + OperatingAirlineCode: AA + OperatingAirlineName: American Airlines + EquipmentCode: "738" + EquipmentName: Boeing 737-800 + FlightDuration: PT1H13M + SeatMapAvailable: false + FlightDistance: + Value: "247" + Unit: MI + BookingCode: Q + CabinClass: ECONOMY + EquipmentChange: true + LoungeKeys: + - PHXCENTURION + FareBasisCode: QVAHZSN5 + - SegmentId: UFVCTElTSEVETEFTU0VBMjAyMS0wNS0yMFQxODoyNTowMC4wMDAtMDc6MDAyMDIxLTA1LTIwVDIxOjEwOjAwLjAwMC0wNzowMDQ3NURMUFQySDQ1TVZFQ09OT01ZVkFWU0EwTTE= + FlightDuration: PT2H45M + TotalStops: 0 + DepartureArrivalDayDifference: 0 + AirportChange: false + FareType: PUBLISHED + Links: + ApiBaggageFees: + Accept: application/vnd.exp-flight.v1+json + Method: GET + Href: https://apim.expedia.com/flights/baggagefees/Cl8KAkRMEgJETBoXMjAyMS0wNS0yMFQxODoyNTowMC4wMDAiA0xBUyoXMjAyMS0wNS0yMFQyMToxMDowMC4wMDAyA1NFQToBVkIIVkFWU0EwTTFKB0VDT05PTVlSAzQ3NRoCS0c + Price: + TotalPrice: + Value: "63.40" + Currency: USD + BasePrice: + Value: "45.58" + Currency: USD + TotalTaxes: + Value: "17.82" + Currency: USD + TotalTaxesAndFees: + Value: "17.82" + Currency: USD + AveragePricePerTicket: + Value: "63.40" + Currency: USD + Count: 1 + PricePerPassengerCategory: + - Category: ADULT + Count: 1 + TotalPrice: + Value: "63.40" + Currency: USD + BasePrice: + Value: "45.58" + Currency: USD + TotalTaxes: + Value: "17.82" + Currency: USD + Legs: + - Links: + ApiSeatMap: + Accept: application/vnd.exp-flight.v2+json + Method: GET + Href: https://apim.expedia.com/flights/seatmaps/CgFWEgNMQVMaAkRMIgVEZWx0YSoLQWlyYnVzIEEzMjAyAzMyMDodMjAyMS0wNS0yMFQyMToxMDowMC4wMDAtMDc6MDBCHTIwMjEtMDUtMjBUMTg6MjU6MDAuMDAwLTA3OjAwSgM0NzVSA1NFQVoHRUNPTk9NWWICREw + DepartureAirport: + Code: LAS + Name: McCarran Intl. + City: Las Vegas + Province: NV + Country: USA + Latitude: "36.085393" + Longitude: "-115.150098" + ArrivalAirport: + Code: SEA + Name: Seattle - Tacoma Intl. + City: Seattle + Province: WA + Country: USA + Latitude: "47.44363" + Longitude: "-122.30175" + DepartureDateTime: 2021-05-20T18:25:00-07:00 + ArrivalDateTime: 2021-05-20T21:10:00-07:00 + FlightNumber: "475" + MarketingAirlineCode: DL + MarketingAirlineName: Delta + OperatingAirlineCode: DL + OperatingAirlineName: Delta + EquipmentCode: "320" + FlightOnTimePercentage: "90" + EquipmentName: Airbus A320 + FlightDuration: PT2H45M + SeatMapAvailable: false + FlightDistance: + Value: "875" + Unit: MI + BookingCode: V + CabinClass: ECONOMY + LoungeKeys: + - LASCENTURION + FareBasisCode: VAVSA0M1 + Offer: + offerToken: 4c3d825f95074cbdbdf1daecc4fa3011-0-1-st-4309de795593486e99dfa6e3bc2e9280-0-1~2.D~AQoECL-kBBIICNQEEAEYwB8gASgCWAJwAHAA~AQpSCiYIwYIBEgM3MTAYkgEg77kBKM7M7AEwgs7sAThRQABYAWoETUFJTgooCMGCARIEMjEwNhjvuQEgi5ABKKbO7AEw787sAThRQAFYAWoETUFJThIKCAEQARgBKgJBQRgBIgQIARABKAIoAygEMAI.AQotCisIxJgBEgM0NzUYi5ABIJIBKPWF7QEwmoftAThWQABYAWoJTUFJTkNBQklOEgoIARABGAEqAkRMGAEiBAgBEAEoAigDKAQwAg + SplitTicket: true + OpaqueFlight: false + Free24HourCancellation: true + MerchantName: Delta*American Airlines + Links: + ApiFareRules: + Accept: application/vnd.exp-flight.v1+json + Method: GET + Href: https://apim.expedia.com/flights/farerules/CgVjb2FjaBoJUHVibGlzaGVkIgd1bmtub3duKgl1bml2ZXJzYWwyAkFBQksIARIZMjAyMS0wNS0xNVQxNjoxMDowMC0wNzowMBoDUEhYIgNTRUEqAkFBMghRVkFIWlNONUIGU0VBTEFTSgVTYWJyZWoFQURVTFRCSwgCEhkyMDIxLTA1LTE1VDE5OjQ2OjAwLTA3OjAwGgNMQVMiA1BIWCoCQUEyCFFWQUhaU041QgZTRUFMQVNKBVNhYnJlagVBRFVMVA+CgVjb2FjaBoJUHVibGlzaGVkIgd1bmtub3duKgl1bml2ZXJzYWwyAkRMQksIARIZMjAyMS0wNS0yMFQxODoyNTowMC0wNzowMBoDU0VBIgNMQVMqAkRMMghWQVZTQTBNMUIGTEFTU0VBSgVTYWJyZWoFQURVTFQ + ApiBooking: + Accept: application/vnd.exp-flight.v3+json + Method: POST + Href: https://apim.expedia.com/flights/bookings/4c3d825f95074cbdbdf1daecc4fa3011-0-1-st-4309de795593486e99dfa6e3bc2e9280-0-1~2.D~AQoECL-kBBIICNQEEAEYwB8gASgCWAJwAHAA~AQpSCiYIwYIBEgM3MTAYkgEg77kBKM7M7AEwgs7sAThRQABYAWoETUFJTgooCMGCARIEMjEwNhjvuQEgi5ABKKbO7AEw787sAThRQAFYAWoETUFJThIKCAEQARgBKgJBQRgBIgQIARABKAIoAygEMAI.AQotCisIxJgBEgM0NzUYi5ABIJIBKPWF7QEwmoftAThWQABYAWoJTUFJTkNBQklOEgoIARABGAEqAkRMGAEiBAgBEAEoAigDKAQwAg?price=120.60¤cy=USD + SegmentIds: + - UFVCTElTSEVEU0VBUEhYMjAyMS0wNS0xNVQxNjoxMDowMC4wMDAtMDc6MDAyMDIxLTA1LTE1VDE5OjEwOjAwLjAwMC0wNzowMDcxMEFBUFQzSFFFQ09OT01ZUVZBSFpTTjVQSFhMQVMyMDIxLTA1LTE1VDE5OjQ2OjAwLjAwMC0wNzowMDIwMjEtMDUtMTVUMjA6NTk6MDAuMDAwLTA3OjAwMjEwNkFBUFQxSDEzTVFFQ09OT01ZUVZBSFpTTjU= + - UFVCTElTSEVETEFTU0VBMjAyMS0wNS0yMFQxODoyNTowMC4wMDAtMDc6MDAyMDIxLTA1LTIwVDIxOjEwOjAwLjAwMC0wNzowMDQ3NURMUFQySDQ1TVZFQ09OT01ZVkFWU0EwTTE= + OfferPrice: + TotalPrice: + Value: "120.60" + Currency: USD + BasePrice: + Value: "77.21" + Currency: USD + Fees: + - Value: "0.00" + Currency: USD + Name: Service + TotalTaxes: + Value: "43.39" + Currency: USD + TotalTaxesAndFees: + Value: "43.39" + Currency: USD + AveragePricePerTicket: + Value: "120.60" + Currency: USD + Count: 1 + PricePerPassengerCategory: + - Category: ADULT + Count: 1 + TotalPrice: + Value: "120.60" + Currency: USD + BasePrice: + Value: "77.21" + Currency: USD + TotalTaxes: + Value: "43.39" + Currency: USD + Refundable: false + RefundPenalty: + - SegmentIds: + - UFVCTElTSEVEU0VBUEhYMjAyMS0wNS0xNVQxNjoxMDowMC4wMDAtMDc6MDAyMDIxLTA1LTE1VDE5OjEwOjAwLjAwMC0wNzowMDcxMEFBUFQzSFFFQ09OT01ZUVZBSFpTTjVQSFhMQVMyMDIxLTA1LTE1VDE5OjQ2OjAwLjAwMC0wNzowMDIwMjEtMDUtMTVUMjA6NTk6MDAuMDAwLTA3OjAwMjEwNkFBUFQxSDEzTVFFQ09OT01ZUVZBSFpTTjU= + PreTripChange: + Allow: YES + Penalty: + Value: "0.00" + Currency: USD + PreTripCancel: + Allow: NO + EnrouteChange: + Allow: YES + Penalty: + Value: "0.00" + Currency: USD + EnrouteCancel: + Allow: NO + Transferable: NO + NameChangeAllowed: NO + - SegmentIds: + - UFVCTElTSEVETEFTU0VBMjAyMS0wNS0yMFQxODoyNTowMC4wMDAtMDc6MDAyMDIxLTA1LTIwVDIxOjEwOjAwLjAwMC0wNzowMDQ3NURMUFQySDQ1TVZFQ09OT01ZVkFWU0EwTTE= + PreTripChange: + Allow: YES + Penalty: + Value: "0.00" + Currency: USD + PreTripCancel: + Allow: NO + EnrouteChange: + Allow: NO + EnrouteCancel: + Allow: NO + Transferable: NO + NameChangeAllowed: NO + International: false + TicketType: ETicket + UndisclosedGenderSupported: false + UnspecifiedGenderSupported: false + FareOptions: + - FareName: Comfort+ + SegmentIds: + - UFVCTElTSEVEU0VBUEhYMjAyMS0wNS0xNVQxNjoxMDowMC4wMDAtMDc6MDAyMDIxLTA1LTE1VDE5OjEwOjAwLjAwMC0wNzowMDcxMEFBUFQzSFFFQ09OT01ZUVZBSFpTTjVQSFhMQVMyMDIxLTA1LTE1VDE5OjQ2OjAwLjAwMC0wNzowMDIwMjEtMDUtMTVUMjA6NTk6MDAuMDAwLTA3OjAwMjEwNkFBUFQxSDEzTVFFQ09OT01ZUVZBSFpTTjU= + - UFVCTElTSEVETEFTU0VBMjAyMS0wNS0yMFQxODoyNTowMC4wMDAtMDc6MDAyMDIxLTA1LTIwVDIxOjEwOjAwLjAwMC0wNzowMDQ3NURMUFQySDQ1TVZFQ09OT01ZVkFWU0EwTTE= + Included: + - CARRY_ON_BAG + FeeApplied: + - Meals + ValidFormsOfPayment: + - PaymentMethod: DebitCard + Name: Visa + Fee: "0.00" + Currency: USD + - PaymentMethod: CreditCard + Name: AmericanExpress + Fee: "0.00" + Currency: USD + - PaymentMethod: CreditCard + Name: MasterCard + Fee: "0.00" + Currency: USD + - PaymentMethod: DebitCard + Name: MasterCard + Fee: "0.00" + Currency: USD + - PaymentMethod: DebitCard + Name: AmericanExpress + Fee: "0.00" + Currency: USD + - PaymentMethod: CreditCard + Name: Visa + Fee: "0.00" + Currency: USD + Lounges: + PHXCENTURION: + - Name: The Centurion Lounge + IsConferenceRoomAvailable: false + PhoneNumber: N/A + Description: Terminal 4, across from Gate B22 on the upper level, 9 am - 5 pm + SEACENTURION: + - Name: The Centurion Lounge + IsConferenceRoomAvailable: false + PhoneNumber: N/A + Description: Concourse B, opposite Gate B3 + LASCENTURION: + - Name: The Centurion Lounge + IsConferenceRoomAvailable: true + PhoneNumber: N/A + Description: Concourse D opposite Gate D1, 5am to 11pm + TransactionId: e883fc9a-2cfa-4b13-b7b1-4bcee3a5dea6 + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + /flights/flexsearch: + get: + tags: + - Flight FlexSearch + description: request for flexsearch information + operationId: get-flight-flexsearch + parameters: + - name: segment1.origin + in: query + description: 3-letter IATA Airport code or location name from where the passenger is departing. + required: true + schema: + type: string + example: LAS + - name: segment1.destination + in: query + description: 3-letter IATA Airport code or location name to where the passenger is arriving. + required: true + schema: + type: string + example: LAX + - name: segment1.departureDate + in: query + description: Date, in ISO format [YYYY-MM-DD], on which customer wants to depart. + required: true + schema: + type: string + format: date + example: '2021-07-01' + - name: segment2.origin + in: query + description: 3-letter IATA Airport code or location name from where the passenger is departing. + schema: + type: string + - name: segment2.destination + in: query + description: 3-letter IATA Airport code or location name to where the passenger is arriving. + schema: + type: string + - name: segment2.departureDate + in: query + description: Date, in ISO format [YYYY-MM-DD], on which customer wants to depart. + schema: + type: string + - name: includeSegmentDetails + in: query + description: |- + If included, the response will included all segment and leg details. + By default, the value of this parameter will be false. + schema: + type: boolean + example: true + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-ID + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: 123456-798101112 + - name: Accept + in: header + description: Accept header for the request. + required: true + schema: + type: string + example: application/vnd.exp-flight.v3+json + - name: Accept-Encoding + in: header + description: Accept encoding for the request. + required: false + schema: + type: string + example: gzip + responses: + '200': + description: flexsearch information returned successfully + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/FlexSearchResponse' + example: + Offers: + - DepartureDates: + - 2021-03-31 + OfferPrice: + TotalPrice: + Value: "100.39" + Currency: USD + - DepartureDates: + - 2021-04-01 + OfferPrice: + TotalPrice: + Value: "100.39" + Currency: USD + - DepartureDates: + - 2021-04-02 + OfferPrice: + TotalPrice: + Value: "95.39" + Currency: USD + - DepartureDates: + - 2021-04-03 + OfferPrice: + TotalPrice: + Value: "95.39" + Currency: USD + - DepartureDates: + - 2021-04-04 + OfferPrice: + TotalPrice: + Value: "100.39" + Currency: USD + - DepartureDates: + - 2021-04-05 + OfferPrice: + TotalPrice: + Value: "105.39" + Currency: USD + - DepartureDates: + - 2021-04-06 + OfferPrice: + TotalPrice: + Value: "95.39" + Currency: USD + TransactionId: 75989c80-7299-11ea-81fa-aad83eab0074 + '500': + description: No flights solutions found for the request. + content: + application/vnd.exp-flight.v3+json: + schema: + type: object + required: + - Errors + - TransactionId + properties: + Errors: + type: array + description: Container for error list. + items: + type: object + properties: + Error: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + LocationOptions: + type: array + description: Container for list of matching locations corresponding to the value entered in the location keyword search. + items: + type: object + properties: + LocationOption: + required: + - Locations + - RequestedLocation + type: object + properties: + RequestedLocation: + type: string + description: Location used in partner request. + example: Paris + Locations: + type: array + description: Container for list of possible locations that could be used to disambiguate the query. + items: + type: object + properties: + Location: + required: + - LocationId + - Name + type: object + properties: + Type: + type: string + description: The type of location code (MULTICITY | METROCODE). + example: MULTICITY + Id: + type: string + description: Expedia Region ID of the specified airport. + example: "6139103" + Name: + type: string + description: Location Name + example: Seattle-Tacoma International Airport + Code: + type: string + description: Location Code + example: SEA + Address: + type: string + description: Street address of the location (if available) + example: Paris, France (PAR-All Airports) + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + Country: + type: object + properties: + Country: + type: object + properties: + Code: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + description: Container for list of possible locations that could be used to disambiguate the query. + description: 'List for possible locations from which the customer must choose + the best one to be re-submitted in the request. ' + description: Container for error list. + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + example: + Errors: + - Code: SERVER_ERROR + Description: No flights solutions found for the request. + TransactionId: 68bce810-5af7-40c1-bea7-07a823b6f1f0 + '400': + description: Disambiguation Response + content: + application/vnd.exp-flight.v3+json: + schema: + type: object + required: + - Errors + - TransactionId + properties: + Errors: + type: array + description: Container for error list. + items: + type: object + properties: + Error: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + LocationOptions: + type: array + description: Container for list of matching locations corresponding to the value entered in the location keyword search. + items: + type: object + properties: + LocationOption: + required: + - Locations + - RequestedLocation + type: object + properties: + RequestedLocation: + type: string + description: Location used in partner request. + example: Paris + Locations: + type: array + description: Container for list of possible locations that could be used to disambiguate the query. + items: + type: object + properties: + Location: + required: + - LocationId + - Name + type: object + properties: + Type: + type: string + description: The type of location code (MULTICITY | METROCODE). + example: MULTICITY + Id: + type: string + description: Expedia Region ID of the specified airport. + example: "6139103" + Name: + type: string + description: Location Name + example: Seattle-Tacoma International Airport + Code: + type: string + description: Location Code + example: SEA + Address: + type: string + description: Street address of the location (if available) + example: Paris, France (PAR-All Airports) + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + Country: + type: object + properties: + Country: + type: object + properties: + Code: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + description: Container for list of possible locations that could be used to disambiguate the query. + description: 'List for possible locations from which the customer must choose + the best one to be re-submitted in the request. ' + description: Container for error list. + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + example: + Errors: + - Code: MULTIPLE_AMBIGUOUS_LOCATION + Description: No or multiple available airport(s) was found which match your city name, please check the details. + TransactionId: aedfd328-797a-43c9-9584-e901ea1f589d + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out + /flights/farecalendar: + get: + tags: + - Flight FareCalendar + description: API that will return the lowest fares for multiple days so that the same can be displayed as a booking widget calendar. + operationId: get-flights-farecalendar + parameters: + - name: segment1.origin + in: query + description: 3-letter IATA Airport code or location name from where the passenger is departing. + required: true + schema: + type: string + example: LAS + - name: segment1.destination + in: query + description: 3-letter IATA Airport code or location name from where the passenger is arriving. + required: true + schema: + type: string + example: LAX + - name: segment2.origin + in: query + description: 3-letter IATA Airport code or location name from where the passenger is departing in the second segment. + schema: + type: string + - name: segment2.destination + in: query + description: 3-letter IATA Airport code or location name from where the passenger is arriving in the second segment. + schema: + type: string + - name: departureDate + in: query + description: |- + Designates the date which decides the fare calendar response. + For One Way trips, the response shows offers with price from departureDate till departureDate + 60 days + For RoundTrip, + If the trip=outbound, then the response shows offers with price from departureDate of outbound segment till departureDate + 60 days. + If the trip=inbound, then the response shows offers with price from departureDate of inbound segment till departureDate + 14 days. + required: true + schema: + type: string + format: date + example: '2021-10-01' + - name: trip + in: query + description: | + Required for RoundTrip for identifying whether we are requesting for inbound or outbound. + Possible values : + inbound + outbound + schema: + type: string + - name: includeSegmentDetails + in: query + description: If the user wants to know the segment details of the offer then they can send this param as true and will get the segment and leg level details in the response. By default this will be set as false. + schema: + type: boolean + - name: Key + in: header + description: |- + Unique identifier assigned to partner. + Required for all requests. + Obtained from Expedia Account Manager or representative. + required: true + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999X + - name: Partner-Transaction-ID + in: header + description: Partner-generated identifier. + required: true + schema: + type: string + example: 123456-798101112 + - name: Accept + in: header + description: Accept header for the request. + required: true + schema: + type: string + example: application/vnd.exp-flight.v3+json + - name: Accept-Encoding + in: header + description: Accept encoding for the request. + required: false + schema: + type: string + example: gzip + responses: + '400': + description: Bad request from client. + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: ORIGIN_REQUIRED + Description: Origin Airport is not set properly + TransactionId: 05d400eb-3601-418c-9830-591014e39182 + '500': + description: Either supply or EWSAir failed to provide fare calendar response due to internal failure. + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: AMBIGUOUS_LOCATION + DetailCode: NO_AIRPORT_RETURNED + Description: No or multiple available airport(s) was found which match your city name, please check the details. + LocationOptions: + - RequestedLocation: BLGQW + TransactionId: d7203acc-b124-438d-9948-9ea95d81bb1d + '200': + description: Farecalendar response returned successfully. + content: + application/vnd.exp-flight.v3+json: + schema: + $ref: '#/components/schemas/FareCalendarResponse' + example: + Offers: + - DepartureDate: 2021-05-24T09:12:28Z + OfferPrice: + TotalPrice: + Value: "128.39" + Currency: USD + - DepartureDate: 2021-05-25T09:12:28Z + OfferPrice: + TotalPrice: + Value: "202.19" + Currency: USD + - DepartureDate: 2021-05-26T09:12:28Z + OfferPrice: + TotalPrice: + Value: "137.19" + Currency: USD + - DepartureDate: 2021-05-27T09:12:28Z + OfferPrice: + TotalPrice: + Value: "123.41" + Currency: USD + TransactionId: 0f2bc850-62bd-11ea-9e71-0aae9a66c99a + '404': + description: No Route matched + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: |- + { + "message": "no Route matched with those values" + } + '429': + description: API rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: |- + { + "message": "API rate limit exceeded" + } + '401': + description: Unauthorized or Invalid authentication credentials + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: |- + { + "message": "Unauthorized" + } + Invalid authentication credentials: + value: |- + { + "message": "Invalid authentication credentials" + } + '403': + description: cannot consume this service + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: |- + { + "message": "You cannot consume this service" + } + '503': + description: name resolution failed + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + name resolution failed: + value: |- + { + "message": "name resolution failed" + } + '504': + description: upstream server is timing out + content: + text/plain: + examples: + upstream server is timing out: + value: The upstream server is timing out +components: + securitySchemes: + basicAuth: + type: http + scheme: basic + schemas: + Country: + required: + - Name + type: object + properties: + Name: + type: string + description: country name + example: Ireland + Code: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + Error: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + DetailCode: + type: string + description: Detailed error code describing the issue. + example: MULTIPLE_AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: 'Multiple pickup locations found. ' + LocationOptions: + type: array + description: 'List for possible locations from which the customer must choose + the best one to be re-submitted in the request. ' + items: + $ref: '#/components/schemas/LocationOption' + description: Container for error list. + Errors: + required: + - Errors + - TransactionId + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: '#/components/schemas/Error' + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: ErrorResponse + GeoLocation: + required: + - Latitude + - Longitude + type: object + properties: + Latitude: + type: string + description: Latitude of the location. + example: "38.184978" + Longitude: + type: string + description: Longitude of the location. + example: "85.7412" + description: Container for Geo location. + Location: + type: object + properties: + Type: + type: string + description: The type of location code (MULTICITY | METROCODE). + example: MULTICITY + Id: + type: string + description: Expedia Region ID of the specified airport. + example: "6139103" + Name: + type: string + description: Location Name + example: Seattle-Tacoma International Airport + Code: + type: string + description: Location Code + example: SEA + Address: + type: string + description: Street address of the location (if available) + example: Paris, France (PAR-All Airports) + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + Country: + $ref: '#/components/schemas/Country' + description: Container for list of possible locations that could be used to disambiguate the query. + LocationOption: + required: + - Locations + - RequestedLocation + type: object + properties: + RequestedLocation: + type: string + description: Location used in partner request. + example: Paris + Locations: + type: array + description: Container for list of possible locations that could be used to disambiguate the query. + items: + $ref: '#/components/schemas/Location' + description: 'List for possible locations from which the customer must choose + the best one to be re-submitted in the request. ' + AirValidFormsOfPayment: + required: + - Currency + - Fee + - Name + - PaymentMethod + type: object + properties: + PaymentMethod: + type: string + description: Method of payment + example: CreditCard + Name: + type: string + description: Name of Payment Method. + example: AmericanExpress + Fee: + type: string + description: The amount of the payment fee. + example: "4.25" + Currency: + type: string + description: Currency of the fee in ISO 4217 format + example: USD + description: Container for fees that are charged for using certain payment methods. Since the method of payment is not known until time of booking, these fees are returned separately and not included in the total price + Airport: + required: + - Code + type: object + properties: + Code: + type: string + description: Three-letter IATA airport code for departure location + example: SFO + Name: + type: string + description: Name of departure airport + example: San Francisco International Airport + City: + type: string + description: City where departure airport resides + example: San Francisco + Province: + type: string + description: Province or State where departure airport resides + example: CA + Country: + type: string + description: Country where departure airport resides + example: USA + Latitude: + type: string + description: Latitude where departure airport resides + example: "33.641" + Longitude: + type: string + description: Longitude where departure airport resides + example: "84.4429" + description: Container for list of Information about each search locations + xml: + name: Airport + Amenities: + type: object + properties: + Entertainment: + $ref: '#/components/schemas/Entertainment' + Wifi: + $ref: '#/components/schemas/Wifi' + Power: + $ref: '#/components/schemas/Power' + description: List of specific amenities available for each flight leg. + AveragePricePerTicket: + required: + - Count + - Currency + - Value + type: object + properties: + Value: + type: string + description: Average price per ticket, excluding infant + example: "100.0" + Currency: + type: string + description: Currency in ISO 4217 format + example: USD + Count: + type: integer + description: Indicates how many tickets were used to determine the average + format: int32 + example: 1 + description: |- + Container for average pricing information per ticket. + If any passenger type (such as Infant in Lap or Seat) has a $0 total price there will be no ticket, so those passengers would not be included in the count. + BaggageFee: + required: + - BagType + type: object + properties: + BagType: + type: string + description: Specifies the type of baggage. + example: FIRST_BAG + enum: + - PREPAID_CARRY_ON + - PREPAID_FIRST_BAG + - PREPAID_SECOND_BAG + - CARRY_ON + - FIRST_BAG + - SECOND_BAG + WeightUnit: + type: string + description: Specifies weight unit for this bagType. This will always be kilograms. + example: kg + Weight: + type: string + description: Weight of the bag. + example: "23" + Application: + type: string + description: This element specifies descriptive text useful in displaying baggage fees. + example: per + enum: + - upto + - per + FixedCharge: + $ref: '#/components/schemas/Fee' + MaxCharge: + $ref: '#/components/schemas/Fee' + MinCharge: + $ref: '#/components/schemas/Fee' + description: Container for baggage fee information of each bag type. The baggage fee can vary for each bag type. The amount can be zero, fixed amount or will be in a range. + xml: + name: BaggageFees + Distance: + required: + - Unit + - Value + type: object + properties: + Value: + type: string + description: The number of miles/kilometers of the distance (specified by the Unit). + example: "75" + Unit: + type: string + description: The unit (KM or MI) for the distance. + example: KM + Direction: + type: string + description: 'The direction of the location from the search ''center''.Possible + values are: N,S,W,E,NW,NE,SW,SE' + example: N + description: Container for distance of flight. + Entertainment: + type: object + properties: + Available: + type: string + description: Indication of whether this amenity is available. + example: YES + enum: + - YES + - NO + - UNKNOWN + Types: + type: array + description: Type of entertainment + example: [LIVE_TV] + items: + type: string + description: Type of entertainment + example: LIVE_TV + xml: + name: Types + enum: + - LIVE_TV + - ON_DEMAND + - STREAMING + description: Container for entertainment amenities available in this flight leg + Fee: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: '#/components/schemas/Money' + Name: + type: string + description: This is used when a fee range is returned. It specifies the highest value of bag fee. + FlightSearchResponse: + required: + - Offers + - SearchCities + - TransactionId + type: object + properties: + Insights: + $ref: '#/components/schemas/Insights' + Warnings: + type: array + description: Container for warning messages. + items: + $ref: '#/components/schemas/Warning' + Segments: + type: array + description: |- + Container of information about each flight offer + (Less information shown if the offer is and opaque flight offer) + Flights (the complete journey to your final destination by air) are made up of: + Segments (the trip from one stopping place to another) are made up of: + Legs (take off at one airport and land at another) + items: + $ref: '#/components/schemas/Segment' + Offers: + type: array + description: Container for list of air offers. An offer gives total trip details including flight and pricing information. + items: + $ref: '#/components/schemas/Offer' + SearchCities: + type: array + description: Container for list of Information about each search locations + items: + $ref: '#/components/schemas/Airport' + ValidFormsOfPayment: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/AirValidFormsOfPayment' + description: Container for fees that are charged for using certain payment methods. Since the method of payment is not known until time of booking, these fees are returned separately and not included in the total price + Lounges: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/Lounge' + description: List of lounges + TransactionId: + type: string + description: Unique Id to identify one individual API response. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + xml: + name: FlightSearchResponse + Insights: + required: + - AverageCheapestPrice + - CheapestOfferId + - MedianCheapestPrice + - PercentageOfFaresHigher + - SearchComparisonCount + type: object + properties: + CheapestOfferId: + type: string + description: Container for insights response. + example: v5-d58bdd504a70495078a796b218315815-1-1-2~0.S~AQoGCAEQ9LsCEgcI1AQQARgBIAEgDCAHIA0oAlgCcAA + AverageCheapestPrice: + $ref: '#/components/schemas/Money' + MedianCheapestPrice: + $ref: '#/components/schemas/Money' + SearchComparisonCount: + type: integer + description: Number of searches compared to build the insights information for the given search. + format: int32 + example: 1200 + PercentageOfFaresHigher: + type: integer + description: Percentage value that defines where the cheapest fare of the current search result stand comparing the prices for similar searches for nearby dates. + format: int32 + example: 70 + PriceTrend: + type: string + description: Shows how the price trends + enum: + - TRENDING_UP + - TRENDING_DOWN + - NEUTRAL + PastPerDayMedianCheapestPrices: + type: array + description: List of median of cheapest prices for the specifc search criteria for last 21 days. List will be in the order starting from 21 days ago till yesterday. + example: ['120.9', '121.8', '122.7'] + items: + type: string + xml: + name: PastPerDayMedianCheapestPrices + Message: + type: string + description: Shows a custom message in the respective language corresponding to the locale requested. + example: Expedia searched 3,415 results and this fare is cheaper than 70% of the prices seen + description: Container for insights response. + xml: + name: Insights + Leg: + required: + - ArrivalAirport + - ArrivalDateTime + - BookingCode + - CabinClass + - DepartureAirport + - DepartureDateTime + - FlightDuration + - FlightNumber + - MarketingAirlineCode + - SeatMapAvailable + type: object + properties: + StatusCode: + type: string + description: Air segment status. + example: HX + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: Container for deeplink URL information. + DepartureAirport: + $ref: '#/components/schemas/Airport' + ArrivalAirport: + $ref: '#/components/schemas/Airport' + DepartureDateTime: + type: string + description: Flight departure date and time in ISO 8601 format + format: date-time + example: 2021-07-05T07:15:00-06:00 + ArrivalDateTime: + type: string + description: Flight landing date and time in ISO 8601 format + format: date-time + example: 2021-07-05T10:15:00-06:00 + FlightNumber: + type: string + description: Flight Number assigned by Carrier. + example: "2537" + MarketingAirlineCode: + type: string + description: The two-letter code of the Airline that is marketing the flight. + example: AA + MarketingAirlineName: + type: string + description: The display name of the Airline that is marketing the flight. + example: American Airlines + OperatingAirlineCode: + type: string + description: The two-letter code of the Airline actually operating the plane. + example: UA + OperatingAirlineName: + type: string + description: The display name of the airline actually operating the plane. + example: United Airlines + EquipmentCode: + type: string + description: IATA Equipment type codes. + example: 73J + FlightOnTimePercentage: + type: string + description: Percentage of time that this flight on time. + example: "100" + EquipmentName: + type: string + description: The name of equipment that is scheduled for the flight. + example: Airbus 123 + FlightDuration: + type: string + description: The total travel duration for this leg, expressed in ISO 8601 standard. + example: PT3H58M + ConnectionTime: + type: string + description: Connection time between current leg flight landed time to next flight departure time, expressed in ISO 8601 standard. + example: PT1H4M + SeatMapAvailable: + type: boolean + description: If True seat map is available + OperationalDisclosure: + type: string + description: OperationalDisclosure. + FlightDistance: + $ref: '#/components/schemas/Distance' + BookingCode: + type: string + description: Carrier-specific code used for booking (class of service). + example: Y + CabinClass: + type: string + description: Class of service for the air leg. + example: ECONOMY + enum: + - ECONOMY + - FIRST + - BUSINESS + - PREMIUM_ECONOMY + EquipmentChange: + type: boolean + description: True if the upcoming travel Leg will have different equipment (airplane) compared to the previous Leg. + LoungeKeys: + type: array + description: List of keys referring to lounge details for the particular leg. + items: + type: string + description: List of keys referring to lounge details for the particular leg. + xml: + name: LoungeKeys + FareBasisCode: + type: string + description: Fare Basis Code for the corresponding Leg of Flight Offer. + example: T21DVN5 + MealOptions: + type: array + description: Different meal options available in this particular Leg. + example: [FOOD_FOR_PURCHASE] + items: + type: string + description: Different meal options available in this particular Leg. + example: FOOD_FOR_PURCHASE + xml: + name: MealOptions + Amenities: + $ref: '#/components/schemas/Amenities' + description: Container information on each flight leg. + xml: + name: Leg + Link: + required: + - Href + - Method + type: object + properties: + Accept: + type: string + description: Accept header. + Method: + type: string + description: HTTP method to connect. + example: GET + Href: + type: string + description: HATEOAS URL to fetch details. + description: Container for deeplink URL information. + Lounge: + required: + - Name + type: object + properties: + Name: + type: string + description: Name of the lounge corresponding to a lounge key + example: The Centurion Lounge + IsConferenceRoomAvailable: + type: boolean + description: Indicates whether the lounge has a conference room. + PhoneNumber: + type: string + description: Phone number of the lounge (if available) + example: NA + Description: + type: string + description: Free text field with any extra information about the lounge + example: Terminal B on the third level, pre-security, 5:30 am ? 8 pm (Sunday ? Friday), 5:30 am ? 6:30 pm (Saturday) + description: List of lounges + xml: + name: Lounge + Money: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + description: Container for price information. + Offer: + required: + - International + - Links + - offerToken + - OfferPrice + - Refundable + - SegmentIds + - SplitTicket + type: object + properties: + offerToken: + type: string + description: Unique key to identify each offer. + example: v5-21c33c9b411f87e895f9dfa8df82b535-38-1-st-v5-7b789d5a41dd7490c9ffbeaead2aa37a-3 + ReferenceId: + type: string + description: Unique key to identify matching private fares. + example: Flight_Reference_key_67890 + SplitTicket: + type: boolean + description: |- + True if more that one ticket will be issued for this offer per passenger. + False if only one ticket will be issued per passenger. + MetaApiBook: + type: boolean + description: To indicate meta partners whether the air product is available for TAAS instant book. + OpaqueFlight: + type: boolean + description: |- + Indicate whether the air product is a opaque flight product or not. + If true, then there will be no Segments node for this air product. + Free24HourCancellation: + type: boolean + description: True if Booking can be cancelled within 24 hours of booking. + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: Container for deeplink URL information. + SegmentIds: + type: array + description: |- + Container for list of segment ids in a particular offer. + For Opaque flight, no segment will be present. + example: + - 2816ed613aedd7513c953c33367df2e4 + - MjNfUHVibGlzaGVk + items: + type: string + xml: + name: SegmentIds + OfferPrice: + $ref: '#/components/schemas/OfferPrice' + VfopKey: + type: string + description: Key generated for Valid form of payment + example: VFOP-AA + Refundable: + type: boolean + description: |- + True if flight is refundable, + False if it's not refundable. + RefundPenalty: + type: array + description: Contains refund penalty information + items: + type: object + properties: + RefundPenalty: + required: + - SegmentIds + type: object + properties: + SegmentIds: + type: array + description: Contains a list of segment Ids + example: [2816ed613aedd7513c953c33367df2e4] + items: + type: string + description: Contains a list of segment Ids + example: 2816ed613aedd7513c953c33367df2e4 + xml: + name: SegmentIds + PreTripChange: + $ref: '#/components/schemas/RefundPenaltyDetail' + description: Contains refund penalty information + International: + type: boolean + description: |- + True, if flight is international. + False, if flight departs and arrives within the same country + TicketType: + type: string + description: Type of ticket being issued + example: E-Ticket + description: Container for list of air offers. An offer gives total trip details including flight and pricing information. + xml: + name: Offer + OfferPrice: + required: + - AveragePricePerTicket + - BasePrice + - PricePerPassengerCategory + - TotalPrice + - TotalTaxesAndFees + type: object + properties: + TotalPrice: + $ref: '#/components/schemas/Money' + TotalRefund: + $ref: '#/components/schemas/Money' + BasePrice: + $ref: '#/components/schemas/Money' + TotalFees: + $ref: '#/components/schemas/Money' + Fees: + type: array + description: Container for list of fees charged + items: + $ref: '#/components/schemas/Fee' + TotalTaxes: + $ref: '#/components/schemas/Money' + TotalTaxesAndFees: + $ref: '#/components/schemas/Money' + Discount: + $ref: '#/components/schemas/Money' + AveragePricePerTicket: + $ref: '#/components/schemas/AveragePricePerTicket' + PricePerPassengerCategory: + type: array + description: |- + Container for pricing information for each passenger category. + (note that passengers are grouped into standard categories based on the age ranges standardized by the airlines) + items: + $ref: '#/components/schemas/PricePerPassengerCategory' + description: |- + The total price of the package if purchased as a standalone hotel and a standalone flight. + (base price + taxes and fees) + xml: + name: OfferPrice + Power: + type: object + properties: + Available: + type: string + description: Indication of the availability of Power amenity. + enum: + - YES + - NO + - UNKNOWN + description: Container for power amenities available in this flight leg + PricePerPassengerCategory: + required: + - BasePrice + - Count + - Category + type: object + properties: + Category: + type: string + description: Passenger category + example: ADULT + enum: + - ADULT + - SENIOR + - ADULT_CHILD + - CHILD + - INFANT_IN_SEAT + - INFANT_IN_LAP + Count: + type: integer + description: Total number of travelers of the same passenger category + format: int32 + example: 2 + TotalPrice: + $ref: '#/components/schemas/Money' + BasePrice: + $ref: '#/components/schemas/Money' + TotalTaxes: + $ref: '#/components/schemas/Money' + Fees: + type: array + description: List of fees per passenger category + items: + $ref: '#/components/schemas/Fee' + description: |- + Container for pricing information for each passenger category. + (note that passengers are grouped into standard categories based on the age ranges standardized by the airlines) + xml: + name: PricePerPassengerCategory + RefundPenaltyDetail: + required: + - Allow + type: object + properties: + Allow: + type: string + description: Status of penalty information + example: YES + enum: + - YES + - NO + - UNKNOWN + Penalty: + $ref: '#/components/schemas/Money' + description: Container for en route change/cancellations and pre-trip change/cancellations + Segment: + required: + - DepartureArrivalDayDifference + - SegmentId + type: object + properties: + SegmentId: + type: string + description: |- + Unique identifier for a single flight segment. + Shown in case of opaque flight offer as well. + Can be alphanumeric or numeric. + example: 2816ed613aedd7513c953c33367df2e4 + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: Container for deeplink URL information. + Price: + $ref: '#/components/schemas/OfferPrice' + IncludesNonFlightLeg: + type: boolean + description: True if any Leg associated with this Segment is via a non-flight type of transit (Bus, Train or Boat) + Legs: + type: array + description: Container information on each flight leg. + items: + $ref: '#/components/schemas/Leg' + BaggageFees: + type: array + description: Container for baggage fee information of each bag type. The baggage fee can vary for each bag type. The amount can be zero, fixed amount or will be in a range. + items: + $ref: '#/components/schemas/BaggageFee' + AccountCode: + type: string + description: Lists any Account Code that has been applied to this segment. + example: RRR11 + BasicEconomy: + type: boolean + description: True if the corresponding fare ticket type associated with the segment is Basic Economy + example: false + SeatsLeft: + type: integer + description: Remaining number of seats available for this segment offer. + format: int32 + example: 9 + FareType: + type: string + description: Type of fare. + example: PUBLISHED + enum: + - NET + - PUBLISHED + - WEB + DepartureArrivalDayDifference: + type: integer + description: This is an indicator (can have values of -1, 0, 1, 2, etc.) which depends on the relative difference between the arrival and departure dates. + format: int32 + example: 0 + AirportChange: + type: boolean + description: True if there the Segment is having a different Departure airport compared to the Arrival airport of previous Segment. + TotalStops: + type: integer + description: The total number of stops in this segment(Nullable in case of Opaque Flights) + format: int32 + example: 1 + FlightDuration: + type: string + description: |- + Total duration of the flight segment + (Nullable in case of Opaque Flights) + example: PT9H0M + OpaqueDepartureTime: + type: string + description: Contains the name of the Fare tagged against the specific fare options. + example: Comfort+ + OpaqueNumberOfStops: + type: string + description: Departure time range will be shown only for opaque flight offers. + example: 12AM_TO_7:59AM + description: |- + Container of information about each flight offer + (Less information shown if the offer is and opaque flight offer) + Flights (the complete journey to your final destination by air) are made up of: + Segments (the trip from one stopping place to another) are made up of: + Legs (take off at one airport and land at another) + xml: + name: Segment + Warning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Warning message code. + example: NO_RESULTS_FOUND + Description: + type: string + description: Warning message description + example: No flights solutions found for the request. + description: Container for warning messages. + Wifi: + type: object + properties: + Available: + type: string + description: Indication of the availability of WIFI amenity. + enum: + - YES + - NO + - UNKNOWN + description: Container for WiFi amenities available in this flight leg + APIMError: + title: APIMError + description: Container for error responses from APIM + properties: + message: + type: string + FlightLinksRequest: + type: object + required: + - Flights + - Passengers + properties: + Flights: + type: array + items: + $ref: "#/components/schemas/Flight" + Passengers: + type: object + items: + $ref: "#/components/schemas/PassengerDetails" + Links: + type: array + items: + type: string + Flight: + type: object + required: + - FlightId + - Segments + properties: + FlightId: + type: string + example: "abc" + Segments: + type: array + items: + type: object + properties: + Segment: + type: object + required: + - FareType + - Provider + - Legs + properties: + FareType: + type: string + enum: + - PUBLISHED + - NET + - WEB + Provider: + type: string + example: "Sabre" + LowCost: + type: boolean + Legs: + type: array + items: + type: object + required: + - DepartureAirport + - ArrivalAirport + - DepartureDateTime + - ArrivalDateTime + - FlightNumber + - MarketingAirlineCode + - BookingCode + - CabinClass + properties: + DepartureAirport: + type: object + properties: + Airport: + type: object + required: + - Code + properties: + Code: + type: string + example: "LAS" + ArrivalAirport: + type: object + properties: + Airport: + type: object + required: + - Code + properties: + Code: + type: string + example: "SEA" + DepartureDateTime: + type: string + format: date-time + example: "2021-07-05T07:15:00.000-06:00" + ArrivalDateTime: + type: string + format: date-time + example: "2021-07-05T09:13:00.000-08:00" + FlightNumber: + type: string + example: "2537" + MarketingAirlineCode: + type: string + example: "AA" + BookingCode: + type: string + example: "Y" + CabinClass: + type: string + enum: + - ECONOMY + - FIRST + - BUSINESS + - PREMIUM_ECONOMY + TotalPrice: + type: object + required: + - Value + - Currency + properties: + Value: + type: string + example: "300.00" + Currency: + type: string + example: "USD" + PassengerDetails: + type: object + required: + - Adult + - Senior + properties: + Adult: + type: string + example: "1" + Senior: + type: string + example: "1" + ChildrenAges: + type: string + example: "4,5" + InfantInSeat: + type: string + example: "1" + InfantInLap: + type: string + example: "1" + FlightLinksResponse: + type: object + required: + - TransactionId + properties: + Warnings: + type: array + items: + type: object + required: + - Code + - Description + properties: + Code: + type: string + example: "FLIGHT_LINKS_MISSING" + Description: + type: string + example: "1 of the link(s) requested found missing in the response" + Links: + type: array + items: + type: object + required: + - FlightId + properties: + FlightId: + type: string + example: "abc" + WebDetails: + type: object + required: + - Method + - Href + properties: + Method: + type: string + example: "GET" + Href: + type: string + example: "https://www.expedia.com/go/udp?CCheck=1&piid=~null.S~AQoCCAESBwjUBBABGAEgASAMIAcgDSgC~AQpCCh8I0aQBEgM1MTcYwlMgwzsozdvrATDb3esBOFdAAFgBCh8I0aQBEgM3MjUYwzsgrhwont_rATDr5esBOFdAAFgBEgYIARABGAEYBCIECAMQASIECAIQASIECAEQAigCMAE&Price=2576.68&CurrencyCode=USD¤cy=USD&DepartureTLA=L1:COK&ArrivalTLA=L1:ORD&DepartureDate=L1:2021-05-06&ArrivalDate=L1:2021-05-06&NumAdult=1&NumSenior=1&NumChild=2&ChildrenAges=2|14&Sort=10&TripType=OneWay&ProductType=air&eapid=0-1&ServiceVersion=V5&MessageGuid=c8912c1f-269b-4ca0-97d3-2ab4a62ea14a&langid=1033" + ApiDetails: + type: object + required: + - Accept + - Method + - Href + properties: + Accept: + type: string + example: "application/vnd.exp-flight.v3+json" + Method: + type: string + example: "GET" + Href: + type: string + example: "https://apim.expedia.com/flights/details/~null.S~AQoCCAESBwjUBBABGAEgASAMIAcgDSgC~AQpCCh8I0aQBEgM1MTcYwlMgwzsozdvrATDb3esBOFdAAFgBCh8I0aQBEgM3MjUYwzsgrhwont_rATDr5esBOFdAAFgBEgYIARABGAEYBCIECAMQASIECAIQASIECAEQAigCMAE?price=2576.68&childrenAges=2%2C14" + TransactionId: + type: string + example: "a9e371c4-89d9-4f9c-8df7-df105830e7fe" + ErrorResponse: + type: object + required: + - TransactionId + - Errors + properties: + TransactionId: + type: string + example: "a9e371c4-89d9-4f9c-8df7-df105830e7fe" + Errors: + type: array + items: + type: object + required: + - Code + - Description + properties: + Code: + type: string + example: "ERROR_CODE" + Description: + type: string + example: "Error Description" + Address: + required: + - Address1 + - City + - Country + type: object + properties: + Address1: + type: string + description: Street Number, Street Name, or PO Box + example: 724 Pine St + Address2: + type: string + description: 'Apartment, Floor, Suite, Bldg # or more specific information + about Address1.' + example: Second Floor + City: + type: string + description: The city + example: New York + Province: + type: string + description: The state or province + example: NY + Country: + type: string + description: 3-letter code for the country + example: USA + PostalCode: + type: string + description: Zip/postal code + example: "98004" + AgeClassRestriction: + type: object + properties: + AgeClass: + type: string + description: Categories for hotel guests, based on age. + example: Senior + enum: + - All Ages + - Senior + - Adult + - Child + - Infant + - Other + AgeMinimum: + type: integer + description: The minimum age defined in a particular AgeClass. + format: int32 + example: 2 + AgeMaximum: + type: integer + description: |- + The maximum age defined in a particular AgeClass. + If not specified, the AgeClass has no upper bound. + format: int32 + example: 17 + MaxGuestCount: + type: integer + description: The max guest count allowed in a particular AgeClass. + format: int32 + example: 3 + description: Container for room occupancy rules based on the age of the guests. + Amenity: + type: object + properties: + SeatChoice: + $ref: '#/components/schemas/SeatChoice' + CarryOnBag: + $ref: '#/components/schemas/Bag' + CheckedBag: + type: array + description: List of Checked Bag Amenity. + items: + $ref: '#/components/schemas/Bag' + Change: + $ref: '#/components/schemas/AmenityInfo' + Free24HrCancellation: + type: boolean + description: True if booking can be cancelled with in 24 hours after booking. + Refund: + $ref: '#/components/schemas/AmenityInfo' + PersonalItem: + $ref: '#/components/schemas/AmenityInfo' + Upgrade: + $ref: '#/components/schemas/AmenityInfo' + BoardingGroup: + type: array + description: List of available BoardingGroup Amenity. + example: [BASED_ON_SEAT_LOCATION] + items: + type: string + description: List of available BoardingGroup Amenity. + example: BASED_ON_SEAT_LOCATION + xml: + name: BoardingGroup + enum: + - LAST + - PRIORITY + - BASED_ON_SEAT_LOCATION + - PAY_TO_UPGRADE + description: Container for various amenities included in a particular segment. + xml: + name: Amenities + AmenityInfo: + type: object + properties: + Availability: + type: string + description: Availability of Amenity + example: INCLUDED + enum: + - INCLUDED + - NOT_AVAILABLE + - AVAILABLE_FOR_FEE + description: |- + Availability of Passenger Temperature Check. + Possible values: INCLUDED, NOT_AVAILABLE + xml: + name: AmenityInfo + Bag: + type: object + properties: + BagNumber: + type: integer + description: Bag number of CarryOnBag amenity for which the Availability applies. + format: int32 + example: 1 + Availability: + type: string + description: Availability of Amenity + example: INCLUDED + enum: + - INCLUDED + - NOT_AVAILABLE + - AVAILABLE_FOR_FEE + description: List of Checked Bag Amenity. + xml: + name: Bag + CrossSell: + required: + - HotelCount + - Hotels + - NumberOfNights + - NumberOfRooms + - Occupants + - Offers + - StayDates + type: object + properties: + HotelCount: + type: integer + description: | + Number of hotels available. + format: int32 + StayDates: + $ref: '#/components/schemas/StayDates' + NumberOfRooms: + type: integer + description: | + Number of rooms requested. + format: int32 + default: 1 + NumberOfNights: + type: integer + description: | + Number of nights guest staying in the hotel. + format: int32 + Occupants: + type: array + description: | + Container for occupants list. + items: + $ref: '#/components/schemas/Occupant' + Hotels: + type: array + description: | + Container for information on each hotel offer. + items: + $ref: '#/components/schemas/Hotel' + Offers: + type: array + description: | + Container for information about the hotel used in this package offer. + items: + $ref: '#/components/schemas/PackageOffers' + description: Container for cross sell information + xml: + name: CrossSell + Description: + type: object + properties: + LocationTeaser: + type: string + description: A description of the property's location. + example: Built on the original site of the University of Washington + HotelTeaser: + type: string + description: A description of the features and amenities of the property itself. + example: A top-notch fitness club and spa features a pool + RoomTeaser: + type: string + description: The common description for all of the rooms in the property. + example: Renovated in May 2016, guest rooms feature upholstered chairs + description: Container for information of the descriptions of the hotel. + FareOptions: + required: + - FareName + - FeeApplied + - Included + - SegmentIds + type: object + properties: + FareName: + type: string + description: Contains the name of the Fare tagged against the specific fare options. + example: Comfort+ + SegmentIds: + type: array + description: Contains list of segment Ids to which these FareOptions are provided. + example: [MTEx] + items: + type: string + description: Contains list of segment Ids to which these FareOptions are provided. + example: MTEx + xml: + name: SegmentIds + Included: + type: array + description: Contains list of options that are already included. + example: [CARRY_ON_BAG] + items: + type: string + description: Contains list of options that are already included. + example: CARRY_ON_BAG + xml: + name: Included + FeeApplied: + type: array + description: Contains list of options that are fee applied. + example: [Meals] + items: + type: string + description: Contains list of options that are fee applied. + example: Meals + xml: + name: FeeApplied + NotAvailable: + type: array + description: Contains list of options that are unavailable. + example: [CANCELLATION] + items: + type: string + description: Contains list of options that are unavailable. + example: CANCELLATION + xml: + name: NotAvailable + Amenities: + $ref: '#/components/schemas/Amenity' + description: Contains list of fare options + xml: + name: FareOptions + FlightDetailsResponse: + required: + - Lounges + - Offer + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for Warning Codes. + items: + $ref: '#/components/schemas/FlightDetailsWarning' + Segments: + type: array + description: Container for flight segments. + items: + $ref: '#/components/schemas/Segment' + Offer: + $ref: '#/components/schemas/FlightDetailsOffer' + AllOffers: + type: array + description: Contains list of all the available alternate fare upsell/downsell offers. + items: + $ref: '#/components/schemas/FlightDetailsOffer' + ValidFormsOfPayment: + type: array + description: Container for fees that are charged for using certain payment methods. + items: + $ref: '#/components/schemas/AirValidFormsOfPayment' + Lounges: + type: object + additionalProperties: + type: array + description: Container showing list of keys and its related lounge information. This key name can change based on the keys defined. + items: + $ref: '#/components/schemas/Lounge' + CrossSell: + $ref: '#/components/schemas/CrossSell' + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + xml: + name: FlightDetailsResponse + Hotel: + required: + - Id + - Name + - LocalCurrencyCode + - Location + - Distance + - Description + - Status + - ThumbnailUrl + - StarRating + - IsOfficialRating + - GuestRating + - GuestReviewCount + - Links + - RoomTypes + - Policies + - HotelAmenities + - RoomAmenities + type: object + properties: + Id: + type: string + description: The unique, Expedia-specific hotel property identifier used to designate a single hotel. + example: "14747" + Name: + type: string + description: The common name of the hotel + example: Four Seasons Hotel Seattle + LocalCurrencyCode: + type: string + description: The Local Currency Code for Hotel (which will be used for any fees that must be paid at the hotel) + example: USD + Location: + required: + - Address + - PointOfInterest + - GeoLocation + type: object + properties: + Address: + $ref: '#/components/schemas/Address' + PointOfInterest: + type: string + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + description: Hotel address information + Distance: + $ref: '#/components/schemas/Distance' + Description: + $ref: '#/components/schemas/Description' + Status: + type: string + description: "\t\nIndicates whether there are available offers at the property\ + \ during the dates requested, as well as information as to why.\nNote\ + \ that pricing will only be present in the API response for a status of\ + \ 'AVAILABLE'.\nIf there are no rooms available at the property for the\ + \ dates requested, then 'NOT_AVAILABLE' will be returned.\nIf there are\ + \ available rooms, but none that meet the specific parameters of the search\ + \ request, then one of the other messages will be returned" + example: AVAILABLE + enum: + - AVAILABLE + - NOT_AVAILABLE + - ERROR + - NUMBER_OF_ADULTS_NOT_ACCEPTED + - NUMBER_OF_CHILDREN_NOT_ACCEPTED + - NUMBER_OF_INFANTS_NOT_ACCEPTED + - NUMBER_OF_PERSONS_NOT_ACCEPTED + - CHECK_IN_AGE_NOT_ACCEPTED + ThumbnailUrl: + type: string + description: URL of the thumbnail image of the hotel.Note that other images sizes are available - You can find a link to the complete list of Supported Hotel Image Sizes in the Related Links section at the bottom of the page + example: https://images.trvl-media.com/hotels/3000000/2170000/2163100/2163007/2163007_15_t.jpg + StarRating: + type: string + description: Star rating value of the hotel property. + example: "5.0" + enum: + - "1.0" + - "1.5" + - "2.0" + - "2.5" + - "3.0" + - "3.5" + - "4.0" + - "4.5" + - "5.0" + IsOfficialRating: + type: boolean + description: |- + Official rating value indicates if the hotel is certified or official. + (Required in Australia Point of Sale) + example: true + GuestRating: + type: string + description: |- + Average overall guest rating of the hotel. + The value is between 1.0 and 5.0 in 0.1 increments. + Higher is better. + example: "4.5" + GuestReviewCount: + type: integer + description: The total count of guest reviews used to create the average GuestRating above. + format: int32 + example: 240 + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: Container for list of HATEOAS links to Expedia/partner website to complete booking. + Policies: + $ref: '#/components/schemas/HotelPolicies' + Media: + type: array + description: Container for hotel images + items: + $ref: '#/components/schemas/Media' + HotelAmenities: + type: array + description: Container for all hotel amenities. + items: + $ref: '#/components/schemas/LodgingAmenity' + RoomAmenities: + type: array + description: Container for all room amenities. + items: + $ref: '#/components/schemas/LodgingAmenity' + Accessibility: + type: array + description: The accessibility options available for the room. + example: ['Accessible path of travel', 'Accessible bathroom', 'Roll-in shower', 'Handicapped parking', 'In-room accessibility', 'Accessibility equipment for the deaf', 'Braille or raised signage'] + items: + type: string + description: The accessibility options available for the room. + example: Handicapped parking + xml: + name: Accessibility + RoomTypes: + type: array + description: Container for all of available room types. + items: + $ref: '#/components/schemas/RoomType' + description: Container for information on each offered hotel. + HotelPolicies: + type: object + properties: + CheckInStartTime: + type: string + description: Beginning of the standard check-in window on the check in date, stated in the local time of the property. + example: 3 PM + CheckInEndTime: + type: string + description: End of the standard check-in window on the check in date, stated in the local time of the property. + example: 5 PM + CheckOutTime: + type: string + description: Customers must check out before this time on the check out date, expressed in the local time of the property. + example: noon + PetPolicies: + type: array + description: The policy of the property toward having pets stay with guests. + example: + - Pets allowed, Up to 20 lb + items: + type: string + description: The policy of the property toward having pets stay with guests. + example: '["Pets allowed, Up to 20 lb"]' + xml: + name: PetPolicies + ChildrenAndExtraBedsPolicies: + type: array + description: The policy of the property for having children stay at the property, as well as for including extra beds in the room. + example: [Children are welcome, Cribs/infant beds (surcharge)] + items: + type: string + description: The policy of the property for having children stay at the property, as well as for including extra beds in the room. + example: Children are welcome, Cribs/infant beds (surcharge) + xml: + name: ChildrenAndExtraBedsPolicies + description: Container for Hotel policy information. + HotelReference: + required: + - HotelId + - RoomKey + type: object + properties: + HotelId: + type: string + description: Unique id to represent a hotel + example: "2163007" + RoomKey: + type: string + description: Unique id to represent Room + example: CgUyMDIzMBIuCgkyMDEzMDQ1OTcSCTIwNjMyNzYwMRoCMjQqCDIwMTcwNzI1MggyMDE3MDcyNioDCgEy + description: Container for Hotel Reference information + LodgingAmenity: + required: + - Id + - Name + type: object + properties: + Id: + type: string + description: The identification of a property amenity. + example: "2065" + Name: + type: string + description: The description of a property amenity. + example: Business center + description: The amenities of the rateplan. + Media: + type: object + properties: + Type: + type: string + description: |- + type of the media. So far there is only one option: + 1: Image + example: "1" + Title: + type: string + description: Image title + example: Guestroom + Size: + type: string + description: |- + Image size + You can find a link to the complete list of Supported Images Sizes in the Related Links section at the bottom of the page. + example: t + Url: + type: string + description: Image URL + example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg + description: Container for hotel images + Occupant: + type: object + properties: + Adults: + type: integer + description: | + The number of adults in a room. + format: int32 + example: 1 + ChildAges: + type: array + description: | + The ages of children in a room. + example: + - 2 + - 3 + - 5 + items: + type: integer + description: | + The ages of children in a room. + format: int32 + xml: + name: ChildAges + description: Container of occupants. It is an array including occupants of each room. + FlightDetailsOffer: + required: + - International + - Links + - MerchantName + - offerToken + - FareOptions + - OpaqueFlight + - OfferPrice + - Refundable + - SplitTicket + - TicketType + - UndisclosedGenderSupported + - UnspecifiedGenderSupported + type: object + properties: + offerToken: + type: string + description: Unique key to identify each offer. + example: v5-21c33c9b411f87e895f9dfa8df82b535-38-1-st-v5-7b789d5a41dd7490c9ffbeaead2aa37a-3 + ReferenceId: + type: string + description: Key that allows the user to create a package using this flight. + example: Flight_Reference_key_67890 + SplitTicket: + type: boolean + description: |- + True if more that one ticket will be issued for this offer per passenger. + False if only one ticket will be issued per passenger. + MetaApiBook: + type: boolean + description: To indicate meta partners whether the air product is available for TAAS instant book. + OpaqueFlight: + type: boolean + description: |- + Indicate whether the air product is a opaque flight product or not. + If true, then there will be no Segments node for this air product. + Free24HourCancellation: + type: boolean + description: True if Booking can be cancelled within 24 hours of booking. + MerchantName: + type: string + description: All Merchant name appending them together with a ?*? + example: Spirit Airlines*Frontier Airlines + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: Container for deeplink URL information. + SegmentIds: + type: array + description: |- + Container for list of segment ids in a particular offer. + For Opaque flight, no segment will be present. + example: + - 2816ed613aedd7513c953c33367df2e4 + - MjNfUHVibGlzaGVk + items: + type: string + description: |- + Container for list of segment ids in a particular offer. + For Opaque flight, no segment will be present. + example: 2816ed613aedd7513c953c33367df2e4 + xml: + name: SegmentIds + OfferPrice: + $ref: '#/components/schemas/OfferPrice' + VfopKey: + type: string + description: Key generated for Valid form of payment + example: VFOP-AA + Refundable: + type: boolean + description: |- + True if flight is refundable, + False if it's not refundable. + RefundPenalty: + type: array + description: Contains refund penalty information + items: + $ref: '#/components/schemas/FlightDetailsRefundPenalty' + International: + type: boolean + description: |- + True, if flight is international. + False, if flight departs and arrives within the same country + TicketType: + type: string + description: Type of ticket being issued + example: E-Ticket + FareOptions: + type: array + description: Contains list of fare options + items: + $ref: '#/components/schemas/FareOptions' + UndisclosedGenderSupported: + type: boolean + description: |- + Whether to support undisclosed gender? + True = support + False = not support + UnspecifiedGenderSupported: + type: boolean + description: |- + Whether to support unspecified gender? + True = support + False = not support + description: Contains list of all the available alternate fare upsell/downsell offers. + xml: + name: Offer + PackageOffers: + required: + - Links + - PackagedOffer + - Price + type: object + properties: + Price: + $ref: '#/components/schemas/PackagePrice' + Links: + type: object + additionalProperties: + $ref: '#/components/schemas/Link' + description: Container for HATEOAS links to websites and/or API's. + PackagedOffer: + $ref: '#/components/schemas/PackagedOffer' + description: | + Container for information about the hotel used in this package offer. + PackagePrice: + required: + - AverageCostPerPerson + - Fees + - PackageBasePrice + - PackageTaxesAndFees + - PackageTotalPrice + - Savings + - StandAloneTotalPrice + type: object + properties: + PackageBasePrice: + $ref: '#/components/schemas/Money' + PackageTotalPrice: + $ref: '#/components/schemas/Money' + PackageTaxesAndFees: + $ref: '#/components/schemas/Money' + StandAloneTotalPrice: + $ref: '#/components/schemas/Money' + Fees: + type: array + description: |- + Special fees attached to the package (for example, Air Service Fees). + This amount is not included in PackageTaxesAndFees. + items: + $ref: '#/components/schemas/Fee' + TotalHotelMandatoryFees: + $ref: '#/components/schemas/Fee' + Savings: + $ref: '#/components/schemas/PackageSavings' + AverageCostPerPerson: + $ref: '#/components/schemas/Money' + description: Container for package price information + PackageSavings: + required: + - Currency + - Value + type: object + description: The amount of money that the traveler is saving by booking a package over booking the same offers as standalone products. + allOf: + - $ref: '#/components/schemas/Money' + - type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: '#/components/schemas/Money' + Type: + type: string + description: Savings type + example: HotelDeal + Description: + type: string + description: Description of savings + example: Book this and save $55 (7%) + PackagedOffer: + required: + - FlightReferenceId + - HotelReference + type: object + properties: + HotelReference: + type: array + description: Container for Hotel Reference information + items: + $ref: '#/components/schemas/HotelReference' + FlightReferenceId: + type: string + description: Flight offer id + example: v587889e324c42342ec2ab7a8ecddc8a88 + StayDates: + $ref: '#/components/schemas/StayDates' + NumberOfNights: + type: integer + description: Number of nights guest staying in the hotel + format: int32 + example: 4 + description: Container for Package Offer + Promotion: + type: object + properties: + Type: + type: string + description: 'Promotion type, possible values: PO | FN' + example: PO + Description: + type: string + description: The description of the promotion. + example: 20%Off + Value: + type: number + format: double + RatePlan: + required: + - InventorySourceId + - RatePlanId + - RoomTypeId + type: object + properties: + RoomTypeId: + type: string + description: The room type identifier. + example: "200287452" + RatePlanId: + type: string + description: The rate plan identifier. + example: "201714191" + RateRuleId: + type: string + description: The identifier of rate rule. + example: "213544817" + InventorySourceId: + type: string + description: The identification number of the source that provides the rate plan. + example: "24" + InventorySourceCode: + type: string + description: The source name that provided the rate plan. + example: JT + StayDates: + $ref: '#/components/schemas/StayDates' + RemainingCount: + type: integer + description: |- + The number of rooms remaining through Expedia for this room type. + NOTE: This value does NOT represent the total number of rooms remaining at the hotel property, only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's inventory. When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel through other channels. + CMA Compliance Note (UK): websites in the UK that display remainingCount should make it clear to consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number remaining at the property. + format: int32 + example: 3 + FreeInternet: + type: boolean + description: |- + Indicates whether the price of the room includes free Internet. + (either wireless or wired) + example: true + FreeWiFi: + type: boolean + description: Indicates whether the price of the room includes free wireless Internet access. + example: true + FreeInternetDetails: + type: array + description: The localized details for the free internet amenity (only shown when FreeInternet = true). + example: + - Free Wireless Internet, Wired high-speed Internet-comp + items: + type: string + description: The localized details for the free internet amenity (only shown when FreeInternet = true). + example: '["Free Wireless Internet, Wired high-speed Internet-comp"]' + xml: + name: FreeInternetDetails + FreeParking: + type: boolean + description: Indicates whether the price of the room includes free parking. + example: true + FreeBreakfast: + type: boolean + description: Indicates whether the price of the room includes free breakfast. + example: true + FreeBreakfastDetails: + type: array + description: The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). + example: + - Full Breakfast + - Full Board + items: + type: string + description: The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). + example: '["Full Breakfast","Full Board"]' + xml: + name: FreeBreakfastDetails + Amenities: + type: array + description: The amenities of the rateplan. + items: + $ref: '#/components/schemas/LodgingAmenity' + description: Container for rate plan information. + FlightDetailsRefundPenalty: + required: + - SegmentIds + type: object + properties: + SegmentIds: + type: array + description: Contains a list of segment Ids + example: [2816ed613aedd7513c953c33367df2e4] + items: + type: string + description: Contains a list of segment Ids + example: 2816ed613aedd7513c953c33367df2e4 + xml: + name: SegmentIds + PreTripChange: + $ref: '#/components/schemas/RefundPenaltyDetail' + PreTripCancel: + $ref: '#/components/schemas/RefundPenaltyDetail' + EnrouteChange: + $ref: '#/components/schemas/RefundPenaltyDetail' + EnrouteCancel: + $ref: '#/components/schemas/RefundPenaltyDetail' + Transferable: + type: string + enum: + - YES + - NO + - UNKNOWN + NameChangeAllowed: + type: string + enum: + - YES + - NO + - UNKNOWN + description: Contains refund penalty information + RoomOccupancyPolicy: + required: + - MaxGuestCount + - MinCheckInAge + type: object + properties: + MaxGuestCount: + type: integer + description: The maximum number of guests allowed to stay in a room. + format: int32 + example: 3 + AgeClassRestrictions: + type: array + description: Container for room occupancy rules based on the age of the guests. + items: + $ref: '#/components/schemas/AgeClassRestriction' + description: Room occupancy policy. + RoomType: + required: + - offerToken + - RatePlanType + - RatePlans + - Traveler + type: object + properties: + Description: + type: string + description: Text description of the room type. + example: Room, 1 King Bed, City View (Seattle V) + RatePlans: + type: array + description: Container for rate plan information. + items: + $ref: '#/components/schemas/RatePlan' + Promotions: + type: array + items: + $ref: '#/components/schemas/Promotion' + SmokingOption: + type: string + description: |- + The smoking options available for the room type. + Options could be: + SmokingOrNonSmoking + Smoking + NonSmoking + example: SmokingOrNonSmoking + enum: + - SmokingOrNonSmoking + - Smoking + - NonSmoking + RoomOccupancyPolicy: + $ref: '#/components/schemas/RoomOccupancyPolicy' + Amenities: + type: array + description: Container for all room amenities. + items: + $ref: '#/components/schemas/LodgingAmenity' + Media: + type: array + description: Container for hotel images + items: + $ref: '#/components/schemas/Media' + SeatChoice: + type: object + properties: + Availability: + type: string + description: Availability of Amenity + example: INCLUDED + enum: + - INCLUDED + - NOT_AVAILABLE + - AVAILABLE_FOR_FEE + Restriction: + type: string + description: Restriction if any on SeatChoice Amenity. + example: ONLY_AT_CHECKIN + enum: + - ONLY_AT_CHECKIN + description: Contains seat choice information. + xml: + name: SeatChoice + StayDates: + required: + - CheckInDate + - CheckOutDate + type: object + properties: + CheckInDate: + type: string + description: The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + format: date + CheckOutDate: + type: string + description: The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + format: date + description: Container for Dates of Stay information + FlightDetailsWarning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Standardized warning code. + example: PRICE_INCREASE + Description: + type: string + description: Standardized warning description message. + example: A price change was detected. + OriginalPrice: + $ref: '#/components/schemas/Money' + NewPrice: + $ref: '#/components/schemas/Money' + ChangedAmount: + $ref: '#/components/schemas/Money' + FlexSearchResponse: + required: + - Offers + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for Warning Codes. + items: + type: object + properties: + Warning: + required: + - Code + - Description + type: object + properties: + Code: + type: string + description: Warning message code. + example: NO_RESULTS_FOUND + Description: + type: string + description: Warning message description. + example: No flights solutions found for the request. + description: Container for Warning Codes. + Offers: + type: array + description: |- + Container for list of air offers. + An offer gives trip details including flight and pricing information. + items: + type: object + properties: + Offer: + required: + - DepartureDates + - OfferPrice + type: object + properties: + DepartureDates: + type: array + description: Container for the list of departure dates for the first Leg in each segment in chronological order. + example: [2021-02-19T09:12:28Z] + items: + type: string + description: Container for the list of departure dates for the first Leg in each segment in chronological order. + format: date-time + xml: + name: DepartureDates + OfferPrice: + required: + - TotalPrice + - TotalTaxesAndFees + type: object + properties: + TotalPrice: + type: object + properties: + Money: + required: + - Currency + - Value + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + description: Container for Taxes per passenger category + description: |- + Container for price information corresponding to a particular segment + (Nullable in case of Opaque Flights) + xml: + name: OfferPrice + Segments: + type: array + description: |- + Container of information about each flight offer + Segments (the trip from one stopping place to another) are made up of Legs. + This will be given back in response if includeSegmentDetails=true + items: + type: object + properties: + Segment: + required: + - DepartureArrivalDayDifference + - Legs + type: object + properties: + DepartureArrivalDayDifference: + type: integer + description: This is an indicator (can have values of -1, 0, 1, 2, etc.) which depends on the relative difference between the arrival and departure dates. + format: int32 + example: 0 + AirportChange: + type: boolean + description: True if there the Segment is having a different Departure airport compared to the Arrival airport of previous Segment. + Legs: + type: array + description: Container information on each flight leg. + items: + type: object + properties: + Leg: + required: + - ArrivalAirport + - ArrivalDateTime + - BookingCode + - CabinClass + - DepartureAirport + - DepartureDateTime + - FlightDuration + - FlightNumber + - MarketingAirlineCode + - SeatMapAvailable + type: object + properties: + DepartureAirport: + type: object + properties: + Airport: + required: + - Code + type: object + properties: + Code: + type: string + description: Three-letter IATA airport code for departure location + example: SFO + description: Container for information on the arrival airport. + xml: + name: Airport + ArrivalAirport: + type: object + properties: + Airport: + required: + - Code + type: object + properties: + Code: + type: string + description: Three-letter IATA airport code for departure location + example: SFO + description: Container for information on the arrival airport. + xml: + name: Airport + DepartureDateTime: + type: string + description: Flight departure date and time in ISO 8601 format + format: date-time + example: 2021-07-05T07:15:00-06:00 + ArrivalDateTime: + type: string + description: Flight landing date and time in ISO 8601 format + format: date-time + example: 2021-07-05T10:15:00-06:00 + FlightNumber: + type: string + description: Flight Number assigned by Carrier. + example: "2537" + MarketingAirlineCode: + type: string + description: The two-letter code of the Airline that is marketing the flight. + example: AA + OperatingAirlineCode: + type: string + description: The two-letter code of the Airline actually operating the plane. + example: UA + FlightDuration: + type: string + description: The total travel duration for this leg, expressed in ISO 8601 standard. + example: PT3H58M + CabinClass: + type: string + description: Class of service for the air leg. + example: ECONOMY + enum: + - ECONOMY + - FIRST + - BUSINESS + - PREMIUM_ECONOMY + description: Container information on each flight leg. + xml: + name: Leg + description: |- + Container of information about each flight offer + Segments (the trip from one stopping place to another) are made up of Legs. + This will be given back in response if includeSegmentDetails=true + xml: + name: Segment + description: |- + Container for list of air offers. + An offer gives trip details including flight and pricing information. + xml: + name: Offer + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + xml: + name: FlexSearchResponse + FareCalendarResponse: + required: + - Offers + - TransactionId + type: object + properties: + Warnings: + type: array + description: Container for Warning Codes. + items: + $ref: '#/components/schemas/Warning' + Offers: + type: array + description: |- + Container for list of air offers. + An offer gives total trip details including flight and pricing information. + items: + required: + - DepartureDate + - OfferPrice + type: object + properties: + DepartureDate: + type: string + description: Flight departure date in ISO 8601 format. + format: date-time + OfferPrice: + required: + - TotalPrice + type: object + properties: + TotalPrice: + $ref: '#/components/schemas/Money' + description: |- + Container for offer price information. + Segments: + type: array + description: |- + Container of information about each flight offer + Segments (the trip from one stopping place to another) are made up of Legs + This will be given back in response if includeSegmentDetails=true + items: + required: + - Legs + type: object + properties: + Legs: + type: array + description: Container information on each flight leg. + items: + required: + - ArrivalAirport + - ArrivalDateTime + - CabinClass + - DepartureAirport + - DepartureDateTime + - FlightNumber + type: object + properties: + DepartureAirport: + required: + - Code + type: object + properties: + Code: + type: string + description: Three-letter IATA airport code for departure location + example: SFO + description: Container for information on the arrival airport. + ArrivalAirport: + required: + - Code + type: object + properties: + Code: + type: string + description: Three-letter IATA airport code for departure location + example: SFO + description: Container for information on the arrival airport. + DepartureDateTime: + type: string + description: Flight departure date and time in ISO 8601 format + format: date-time + example: 2021-07-05T07:15:00-06:00 + ArrivalDateTime: + type: string + description: Flight landing date and time in ISO 8601 format + format: date-time + example: 2021-07-05T10:15:00-06:00 + FlightNumber: + type: string + description: Flight Number assigned by Carrier. + example: "2537" + MarketingAirlineCode: + type: string + description: The two-letter code of the Airline that is marketing the flight. + example: AA + OperatingAirlineCode: + type: string + description: The two-letter code of the Airline actually operating the plane. + example: UA + CabinClass: + type: string + description: Class of service for the air leg. + example: ECONOMY + enum: + - ECONOMY + - FIRST + - BUSINESS + - PREMIUM_ECONOMY + description: Container information on each flight leg. + description: |- + Container of information about each flight offer + Segments (the trip from one stopping place to another) are made up of Legs + This will be given back in response if includeSegmentDetails=true + description: |- + Container for list of air offers. + An offer gives total trip details including flight and pricing information. + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 +security: + - basicAuth: [] diff --git a/specs/xap-hotel.specs.yaml b/specs/xap-hotel.specs.yaml new file mode 100644 index 000000000..978fed259 --- /dev/null +++ b/specs/xap-hotel.specs.yaml @@ -0,0 +1,3394 @@ +openapi: 3.0.1 +info: + title: EWSHotel API + description: | + The XAP Lodging Search APIs can be used by partners both booking via an Expedia website, or by partners that + will be booking via the XAP APIs. Each API also provides pre-configured links to the Expedia website, + the XAP Booking API, or both. + contact: + name: PartnerAPIs + url: https://confluence.expedia.biz/display/EWS/EWSHotel + email: dreamweaver@expedia.com + version: v3 + x-eg-lifecycle: LIVE + x-eg-tags: ["Partner", "EWS", "XAP", "EWSHotel", "Hotel", "Lodging", "LodgingListings", "LodgingDetails", "LodgingRateCalendar"] +tags: + - name: Lodging Listing + - name: Lodging Details + - name: Lodging Rate Calendar +servers: + - url: 'https://apim.expedia.com' + description: Production Server +paths: + /hotels/details/{offerToken}: + get: + tags: + - Lodging Details + summary: Get Extended information with a single property offer + description: Extended information about the rate, charges, fees, and financial terms associated with booking a single lodging rate plan offer. + operationId: get-lodging-details + parameters: + - name: Key + in: header + description: | + The partner API key is a case-sensitive, alphanumeric string that looks something like this: + + **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** + + The API Key is assigned and configured as part of the API on-boarding process. + It will be sent to the partner by their Expedia Account Manager or representative. + required: true + schema: + type: string + - name: Partner-Transaction-Id + in: header + description: | + The `Partner-Transaction-ID` is a required API request header element that is not consumed + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + back to the partner in the corresponding API response header. + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: offerToken + in: path + description: | + A Hotel Natural Key from the Lodging Search API -> Hotels -> RoomTypes -> OfferId. It is a concatenated + string of multiple values that defines a hotel offer. + required: true + schema: + type: string + - name: price + in: query + description: | + The total price of the selected property. + + This value will be used to determine if there is a price change between the details and booking request. + + The `price` element will be automatically included in the ApiDetails HATEOAS link which is returned + along with the Lodging Details API response. + schema: + type: string + - name: currency + in: query + description: | + Value should be a standard ISO 3 letter currency code. + + The currency code that is associated to the `TotalPrice` element for the selected property's rate plan from + the Lodging Listing API response. + + The `currency` element will be automatically included in the ApiDetails HATEOAS link which is returned + along with the Lodging Details response. + schema: + type: string + - name: locale + in: query + description: | + `locale` is composed of language identifier and region identifier, connected by "_" that specifies the + language in which the response will be returned. + + The `locale` value used in the Lodging Details API query should match the `locale` value that was used in + the Lodging Search API query. + schema: + type: string + - name: imageSizes + in: query + description: | + Indicate what size of image will be returned. + + The available image sizes are: + - t : Thumbnail + - s : Small + - b : Big + - y : 500x500v + - z : 1000x1000v + + Resolution from smallest to largest is t < s < b < y < z. + + If no `imageSizes` is specified, the t size images will be returned. + + If an image is missing in one size, we will try to fall back to the same image with lower resolution. + + (If image "_z" is not available, we will try to return image "_y", and if it is also unavailable, we will return image "_b", and so on.) + + Only one image size is allowed. + schema: + type: string + enum: + - t + - s + - b + - y + - z + default: t + - name: groupedAmenities + in: query + description: | + Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` + node will be returned in response, otherwise `Amenities` node will be returned. + schema: + type: boolean + responses: + "200": + description: Normal Response + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/HotelDetailsResponse' + "400": + description: User Fault + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_NATURAL_KEY + Description: Invalid natural key. Malformed hotel natural key detected. + TransactionId: e883f530-9776-4011-a14d-3cc089feb6cf + "500": + description: Service Error + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: 1f497fa0-a996-4796-b97e-3ad269bf7624 + "401": + description: Invalid authentication credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Unauthorized + "403": + description: You cannot consume this service. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: API rate limit exceeded. + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Name resolution failed. + "504": + description: API time out. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: The upstream server is timing out + security: + - Authorization: [] + /hotels/listings: + get: + tags: + - Lodging Listing + summary: Search lodging inventory + description: | + Search Expedia lodging inventory by Location Keyword, Region ID, Lat/Long, or Hotel ID(s) and return + up to 1,000 offers in response. + + Provides deeplink to Expedia site to book, or rate plan info to enable API booking. + operationId: get-lodging-listings + parameters: + - name: Key + in: header + description: | + The partner API key is a case-sensitive, alphanumeric string that looks something like this: + + **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** + + The API Key is assigned and configured as part of the API on-boarding process. + It will be sent to the partner by their Expedia Account Manager or representative. + required: true + schema: + type: string + - name: Partner-Transaction-Id + in: header + description: | + The `Partner-Transaction-ID` is a required API request header element that is not consumed + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + back to the partner in the corresponding API response header. + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: ecomHotelIds + in: query + description: Comma-separated list of Expedia hotel IDs. There can be no spaces + between parameters. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + example: + - 28082 + - 11133 + - name: hcomHotelIds + in: query + description: Comma-separated list of Hotels.com hotel IDs. There can be no spaces + between parameters. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: geoLocation + in: query + description: | + The latitude and longitude values identifying the center point of a search radius (circle). + + North latitude will be represented by a positive value. South latitude by a negative value. + + East longitude will be represented by a positive value. West longitude by a negative value. + + The latitude and longitude values are joined together with a comma (,) character. + There can be no spaces between parameters. + + This parameter should be used in combination with the radius and unit parameters below. + schema: + type: string + - name: radius + in: query + description: | + The size of the search radius around a specified point when searching by + `geoLocation`, `locationKeyword`, or `regionids`. + + `radius` is optional and the default value is 25 km for `geoLocation` and `locationKeyword` + if not specified. `radius` must be less than 200 km or 124 mi. + + This parameter should be used in combination with the `unit` and `geoLocation`, `locationKeyword`, + or `regionids` parameters." + schema: + type: integer + format: int64 + default: 25 + - name: unit + in: query + description: | + The unit of measure for searches performed via `geoLocation`, `locationKeyword`, or `regionids`. + + Valid units are `km` and `mi`. + + This parameter should be used in combination with the `radius` and `geoLocation`, `locationKeyword`, + or `regionids`. + schema: + type: string + default: km + enum: + - km + - mi + - name: locationKeyword + in: query + description: | + A keyword search for a location. The keyword can be a city, address, airport or a landmark. + + This parameter should be used in combination with the `radius` and `unit` parameters above to define + a circle around the landmark. + + The default radius value is 25 if not specified. + + Combined search is not supported, if more than one search method is included in the request, an error + will be returned. + schema: + type: string + - name: regionIds + in: query + description: | + Comma-separated list of Expedia Region IDs. There can be no spaces between parameters. + Search returns set of all hotels in the combined regions. + + You may search using a string of 1 - 10 Region ID's. + More than 10 Region ID's are not supported and will generate and error. + + You can get the complete list of Expedia Region IDs from + [Static Data Platform ALL_REGIONS file](https://developers.expediagroup.com/xap/products/xap/static-data-platform/download-url-api/download-url-api-v1). + + This parameter could be used in combination with the `radius` and `unit` parameters above to define + a circle around the `regionIds`. The default radius value is 0 if not specified. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: checkIn + in: query + description: | + Check-in date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + + This parameter should be used in combination with the `checkOut` parameter. + + If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns + a `Featured Offer` for each of the hotels found. + + If one of `checkIn` and `checkOut` is not included, an error will be returned. + + The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + schema: + type: string + format: date + example: '2023-09-12' + - name: checkOut + in: query + description: | + Checkout date for hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + + This parameter should be used in combination with the `checkIn` parameter. + + If `checkIn` and `checkOut` are not included, a dateless search will be conducted which returns + a `Featured Offer` for each of the hotels found. + + If one of `checkIn` and `checkOut` is not included, an error will be returned. + + The maximum advanced search window is 500 days in the future, and the maximum length of stay is 28. + schema: + type: string + format: date + example: '2023-09-14' + - name: locale + in: query + description: | + `locale` is composed of language identifier and region identifier, connected by "_" that specifies + the language in which the response will be returned. + + You can find a link to the complete list of `locales` along with the Point of Sale List in [Supported Points of Sale](https://developers.expediagroup.com/xap/products/xap/lodging/references/supported-points-of-sale). Note that even though the Listings API supports localization for all `locales` listed in the list, all `locales` are not valid for all Points of Sale. + + For example, Ecom US POS supports `en_US`, `es_MX` and `zh_CN`. For Ecom US POS, the Listings API will respond with content in Spanish for requests with either `locale=es_MX` or `es_US`. However, only the deeplinks for `locale=es_MX` should work properly and switch the website to Spanish, while the ones for locale=es_US will be fallen back to English. + + If not specified in the query, the native language for that POS will be returned. + And if more than one language is supported, the response will be returned in the first language + depending on the language setting of the POS. + schema: + type: string + example: en_US + - name: currency + in: query + description: Value should be a standard ISO 3 letter currency code. + schema: + type: string + example: USD + - name: source + in: query + description: Indicate the source where the request is coming from. + schema: + type: string + enum: + - browser + - mobileapp + default: browser + - name: travelWithPets + in: query + description: | + Indicates if the search should include pet-friendly properties. + + If set to "True" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. + + The parameter is only applicable to the Vrbo brand. + schema: + type: boolean + default: false + - name: contentDetails + in: query + description: | + This parameter is optional and can be specified as the following values. + - lowest + - low (default) + - medium + - high + + ### *lowest* + Returns the absolute minimum response for up to 1,000 hotels: + - Count(Count of hotels that are actually returned) + - TotalHotelCount(Count of hotels that are requested) + - TransactionId + - StayDates + - LengthOfStay + - NumberOfRooms + - Occupants + - ***Hotels*** + - Id + - Status + - Links + - ***RoomTypes*** + - RoomKey [Deprecated] + - OfferId + - RatePlanType + - ***RatePlans*** + - RoomTypeId + - RatePlanId + - RateRuleId + - InventorySourceId + - RemainingCount + - Price + - MemberOnlyDeal + - Promotions + - PaymentMethod + - FullDepositUponBooking + - PaymentSchedule + - CancellationPolicy + - Price + - BaseRate + - TaxesAndFees + - TotalPrice + - TotalStrikeOutPrice + - AvgNightlyRate + - AvgNightlyStrikeOutRate + - AvgNightlyRateWithFees + - AvgNightlyStrikeOutRateWithFees + - HotelMandatoryFees + - TotalPriceWithHotelFees + - NightlyRates + - TaxesAndFeesDetails + - RefundableDamageDeposit + + This minimal response is the best for partners that store static hotel location data locally, + and who would like to have the smallest and fastest API response. + + ### *low* + Returns basic hotel information in response for up to 1,000 hotels. + + Includes all elements returned when `contentDetails=lowest` plus: + - ***Hotels*** + - Name + - PropertyType + - PropertyDetails + - LocalCurrencyCode + - Location + - Distance + - Description(may not be localized) + - ChainAndBrandInfo + - ThumbnailUrl + - StarRating + - GuestRating + - GuestReviewCount + - PetFriendly + - LgbtqiaFriendly + - ImportantNotices + - ***RoomTypes*** + - Description + - ***RatePlans*** + - InventorySourceCode + - PaymentTime + - ReserveWithDeposit + - FreeInternet + - FreeWiFi + - FreeParking + - FreeBreakfast + + ### *medium* + Returns more complete hotel information in response for up to 200 hotels. + + Includes all elements returned when `contentDetails=low` plus: + - ***Hotels*** + - HotelAmenities + - RoomAmenities + - ***RoomTypes*** + - ***RatePlans*** + - FreeInternetDetails + - FreeBreakfastDetails + - Amenities + - Amenities + + **Note**: Setting the `contentDetails` to `medium` will automatically limit your response size to 200 hotels. + + ### *high* + Returns extended hotel information in response for up to 5 hotels. + + Includes all elements returned when `contentDetails=medium` plus: + - ***Hotels*** + - RenovationsAndClosures + - Policies + - OptionalExtras + - Media + - Accessibility + - ***RoomTypes*** + - SmokingOption + - BedTypeOptions + - RoomOccupancyPolicy + - Media + + **Note**: Setting the `contentDetails` to `high` will automatically limit your response size to 5 hotels. + schema: + type: string + enum: + - lowest + - low + - medium + - high + default: low + - name: allRoomTypes + in: query + description: | + Returns all available rate plans for the selected hotels. + + This parameter requires that a `checkIn` date and `checkOut` date be supplied, as the API cannot return additional room rates on a dateless search. + + Including `allRoomTypes=true` in your query will automatically limit your response size to no more than 200 hotels. + + Including `allRoomTypes=true` and `contentDetails=high` will limit your response size to no more than 5 hotels. + schema: + type: boolean + default: false + - name: links + in: query + description: | + + Comma-separated list to specify the types of deep links. + - WD (link to Web Details site) + - WS (link to Web Search Result page) + - AD (link for Details API) + - RC (link for RateCalendar API) + - WEB (include all website links) + - API (links for Details and RateCalendar API) + + There are two level of links returned in the API response: Property-level deeplinks and room-level deeplinks. + + When requesting API deeplinks you will receive both a RateCalendar API link at the property level, + and Details API links at the room level, since the Lodging Details API only displays information + on rate plan offers. + + When requesting AD deeplinks, you will only receive Details API links at the room level. + `Links` node in property-level will be omitted. + + If you are looking for more complete details on a single property via the API, you should do another search + in the Lodging API for the single Hotel ID, with `contentDetails=high` to get all details back in return + (note that you can only get back a maximum of 5 hotels when `contentDetails` is set to `high`). + + **NOTE**: dateless searches will not return Details API links, since the Lodging Details API will only + return details on a specific room offer for specific dates. + explode: false + schema: + type: array + items: + type: string + enum: + - WD + - WS + - AD + - RC + - WEB + - API + - name: minStarRating + in: query + description: The minimum star rating for hotels returned in the response. + schema: + type: string + enum: + - "1.0" + - "1.5" + - "2.0" + - "2.5" + - "3.0" + - "3.5" + - "4.0" + - "4.5" + - "5.0" + - name: maxStarRating + in: query + description: The maximum star rating for hotels returned in the response. + schema: + type: string + enum: + - "1.0" + - "1.5" + - "2.0" + - "2.5" + - "3.0" + - "3.5" + - "4.0" + - "4.5" + - "5.0" + - name: limit + in: query + description: | + The maximum number of hotels returned in the response. Must be an integer greater than 0. + + If the value is greater than 1000, only the first 1000 hotels are returned. + + Settings on `contentDetails` and `allRoomTypes` parameters may cause this value to be overridden + and a lower number of hotels to be returned. + + The `limit` parameter is intended to be used to control the response size, but partners should be careful + about combining it with other filter parameters, as each parameter that you add will shrink the response, + even to the point where you may even get a "no hotel found" error if none of the hotels in the base response + meet the combined filter requirements. + + Filters are cumulative in effect, and results must meet all filter requirements to be displayed. + schema: + type: integer + format: int64 + - name: queryText + in: query + description: | + Query text is used for a full text search of hotel data. + + Text search based on hotel name, description, address, promotion description, amenities description. + schema: + type: string + - name: availOnly + in: query + description: | + Specifies whether to return only available hotels in the search results. + + If the value of this parameter is true, the search results will only return hotels that have availability + during the requested dates. + + If there are no hotels with availability in your search then an empty record set will be returned. + + This parameter is ignored for dateless searches. + schema: + type: boolean + - name: smokingPreference + in: query + description: Specifies smoking preference. + schema: + type: string + enum: + - smoking + - nonsmoking + - both + - name: rateType + in: query + description: Indicate which type of `paymentMethod` for each room will be returned. + schema: + type: string + enum: + - payonline + - payhotel + - all + - name: imageSizes + in: query + description: | + Indicates what size images will be displayed for `hotelPhotos` and `roomPhotos` are returned when + `contentDetails=high`. + + The available image sizes are: + - t : Thumbnail + - s : Small + - b : Big + - y : 500x500v + - z : 1000x1000v + + Resolution from smallest to largest is t < s < b < y < z. + + If no `imageSizes` is specified, the t size images will be returned. + + If an image is missing in one size, we will try to fall back to the same image with lower resolution. + + (If image "_z" is not available, we will try to return image "_y", and if it is also unavailable, we will return image "_b", and so on.) + + Only one image size is allowed. + schema: + type: string + enum: + - t + - s + - b + - y + - z + - name: thumbnailImageSize + in: query + description: | + Indicate what size of image will be used for the single `thumbnail` image that is returned when + `contentDetails` is set to `low`, `medium` or `high`. + + The available thumbnail image sizes are: + - t : Thumbnail + - s : Small + - b : Big + - y : 500x500v + - z : 1000x1000v + + Resolution from smallest to largest is t < s < b < y < z. + + If no `thumbnailImageSize` is specified, the t size images will be returned. + + if no thumbnail image found, it would not return thumbnail image. + + Only one thumbnail image size is allowed. + schema: + type: string + enum: + - t + - s + - b + - y + - z + - name: includedPropertyTypeIds + in: query + description: | + Only return hotels where the `PropertyType` ID is one of the IDs in the `includedPropertyTypeIds` field. + + If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not + be returned in the response. Even in this case, the filtering is still being applied, even though there is + no `PropertyType` parameter in the response with which to validate. + + `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that + each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not + contain **both** of the parameters. + + A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: excludedPropertyTypeIds + in: query + description: | + Return all hotels **except** those whose `PropertyType` ID is in the `excludedPropertyTypeIds` field. + + If the API query includes the parameter `contentDetail=lowest` the `PropertyType` parameter will not + be returned in the response. Even in this case, the filtering is still being applied, even though there is + no `PropertyType` parameter in the response with which to validate. + + `includedPropertyTypeIds` and `excludedPropertyTypeIds` fields are mutually exclusive - which means that + each query may contain **one** of the parameters, or **neither** of the parameters, but the query may not + contain **both** of the parameters. + + A complete list of supported Expedia Property Types can be found in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: includedInventorySourceIds + in: query + description: | + Querying with no `includedInventorySourceIds` parameter will return listings from all available inventory + sources. + + Query with the `includedInventorySourceIds` parameter included will only return listings from the requested + inventory sources. All others will be left out. + + `includedInventorySourceId=24` will return only Expedia lodging inventory. + + `includedInventorySourceId=83` will return only Vrbo lodging inventory. + + `includedInventorySourceId=24,83` will return both Expedia and Vrbo lodging inventory. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: freeCancellation + in: query + description: | + Specifies whether to return only free cancelable room rates in the search results. + + If the value of this parameter is true, the search results will only return hotels that have free cancelable room rates during the requested dates. + + If there are no hotels with free cancelable room rates in your search then an empty record set will be returned. + + Default value is false, if query without this parameter or the value of this parameter is false, all available room rates will be returned. + + This parameter is ignored for dateless searches. + schema: + type: boolean + - name: groupedAmenities + in: query + description: | + Specifies whether to return the grouped amenities. If `groupedAmenities` is true, `DescriptiveAmenities` + node will be returned in response, otherwise `Amenities` node will be returned. + schema: + type: boolean + - name: blockFullDepositRateplan + in: query + description: | + Specifies whether to return `rateplan` with `FullDepositUponBooking` as true. + + If `blockFullDepositRateplans` is true, the search results will not return `rateplan` with `FullDepositUponBooking` as true. + + The default value is false, if query without this parameter or the value of this parameter is false, all available rateplan will be returned. + + This parameter is ignored for dateless search. + schema: + type: boolean + default: false + - name: ratePlanType + in: query + description: | + **Note**: This parameter is visible to partners only by configuration. Please contact your Expedia Account + Manager if you need this parameter. + + To specify the desired rate plan types. The options are: + - standalone : Ask for standalone rates + - package : Ask for package rates, but standalone rate also may be returned if available. + + Otherwise only standalone rate plans will be returned. + + `WebSearchResult` and `WebDetails` links won't be returned for package rate. + schema: + type: string + enum: + - standalone + - package + - name: sortType + in: query + description: | + Specifies the field that the search results will be ordered by. + + To be used in conjunction with sortOrder parameter below. + + **CMA Compliance Note (UK)**: partners doing business in the UK should be sorting their search results using + the `totalpricewithfees` parameter in their query string so that the sorting complies with CMA regulations. + schema: + type: string + enum: + - price + - starrating + - avgrate + - deals + - guestrating + - hotelname + - distance + - totalpricewithfees + - name: sortOrder + in: query + description: | + Specifies the sort order of search results. + + If no sort order is specified, the default is `asc`. But for deals sorting, it only supports `desc`. + + To be used in conjunction with the `sortType` parameter above. + schema: + type: string + enum: + - asc + - desc + default: asc + - name: room1.adults + in: query + description: | + Specifies the number of adults staying in a specific room. + + Default value is one room with 2 adults. + + Example: `room1.adults` is used to specify the number of adults in the first room. + schema: + type: integer + format: int64 + example: 2 + - name: room1.childAges + in: query + description: | + Comma-separated list that specifies the age(s) for each of the children in each of the rooms. + + Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. + + Children must be accompanied by an adult. + explode: false + schema: + type: array + items: + type: string + example: + - 8 + - 10 + - name: room2.adults + in: query + description: Specifies the number of adults staying in second room. + schema: + type: integer + format: int64 + - name: room2.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in second room. + explode: false + schema: + type: array + items: + type: string + - name: room3.adults + in: query + description: Specifies the number of adults staying in third room. + schema: + type: integer + format: int64 + - name: room3.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in third room. + explode: false + schema: + type: array + items: + type: string + - name: room4.adults + in: query + description: Specifies the number of adults staying in fourth room. + schema: + type: integer + format: int64 + - name: room4.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in fourth room. + explode: false + schema: + type: array + items: + type: string + - name: room5.adults + in: query + description: Specifies the number of adults staying in fifth room. + schema: + type: integer + format: int64 + - name: room5.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in fifth room. + explode: false + schema: + type: array + items: + type: string + - name: room6.adults + in: query + description: Specifies the number of adults staying in sixth room. + schema: + type: integer + format: int64 + - name: room6.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in sixth room. + explode: false + schema: + type: array + items: + type: string + - name: room7.adults + in: query + description: Specifies the number of adults staying in seventh room. + schema: + type: integer + format: int64 + - name: room7.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in seventh room. + explode: false + schema: + type: array + items: + type: string + - name: room8.adults + in: query + description: Specifies the number of adults staying in eighth room. + schema: + type: integer + format: int64 + - name: room8.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in eighth room. + explode: false + schema: + type: array + items: + type: string + responses: + "200": + description: Normal Response + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/HotelListingsResponse' + "400": + description: User Fault or DisambiguationResponse Fault + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/Errors' + examples: + DisambiguationResponse: + description: DisambiguationResponse + value: + TransactionId: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + Errors: + - Code: AMBIGUOUS_LOCATION + DetailCode: MULTIPLE_AMBIGUOUS_LOCATION + Description: More than one location found + LocationKeyword: dublin + LocationOptions: + - Type: MULTICITY + RegionID: 178256 + ShortName: Dublin (and vicinity) + AirportCode: DUB + Address: Dublin (and vicinity), Ireland + Country: + Name: Ireland + IsoCode2: IE + IsoCode3: IRL + GeoLocation: + Latitude: 53.34402 + Longitude: -6.26146 + - Type: POI + RegionID: 553248621563220238 + ShortName: Market On Madison + AirportCode: MCN + Address: Market On Madison, Dublin, Georgia, United States of America + Country: + Name: United States of America + IsoCode2: US + IsoCode3: USA + GeoLocation: + Latitude: 32.539313 + Longitude: -82.902537 + UserFault: + description: UserFault + value: + Errors: + - Code: COMBINED_HOTEL_SELECT_CRITERIA + Description: | + Combined hotel search is not supported. Please specify either one of the following search + criteria: [geoLocation, regionIds, ecomHotelIds, hcomHotelIds, locationKeyword, hnk, offerId]. + TransactionId: 242d7a77-4063-439b-a9d0-12da0ff5116e + "500": + description: Service Error + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: 1490a74b-4c90-4e78-983d-4ede360ce52a + "401": + description: Invalid authentication credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Unauthorized + "403": + description: You cannot consume this service. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: API rate limit exceeded. + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: name resolution failed + "504": + description: API time out. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: The upstream server is timing out + security: + - Authorization: [] + /hotels/rateCalendar: + get: + tags: + - Lodging Rate Calendar + summary: Get rate calendar of a property + description: The Rate Calendar API will return the lowest rate plan for a range of days for one selected Expedia lodging property. + operationId: get-lodging-rate-calendar + parameters: + - name: Key + in: header + description: | + The partner API key is a case-sensitive, alphanumeric string that looks something like this: + + **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** + + The API Key is assigned and configured as part of the API on-boarding process. + It will be sent to the partner by their Expedia Account Manager or representative. + required: true + schema: + type: string + - name: Partner-Transaction-Id + in: header + description: | + The `Partner-Transaction-ID` is a required API request header element that is not consumed + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + back to the partner in the corresponding API response header. + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: ecomHotelId + in: query + description: | + The Expedia hotel ID for which the calendar is being requested. + + **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. + You may use one or the other, but not both. + schema: + type: string + - name: hcomHotelId + in: query + description: | + The Hotel.com hotel ID for which the calendar is being requested. + + **Note**: Either an Expedia Hotel ID or a Hotels.com Hotel ID must be included in the request. + You may use one or the other, but not both. + schema: + type: string + - name: startDate + in: query + description: | + Start date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. + + **Note**: The start date may not be in the past. + required: true + schema: + type: string + format: date + example: 2022-09-12 + - name: endDate + in: query + description: | + End date for check-in search range in an ISO 8601 Date format [YYYY-MM-DD]. + + **Note**: The end date must be after the start date. The maximum supported search range is 180 days. + required: true + schema: + type: string + format: date + example: 2022-09-14 + - name: lengthOfStay + in: query + description: The length of stay to retrieve the lowest price for. + schema: + type: integer + format: int32 + default: 1 + - name: currency + in: query + description: The requested currency expressed according to ISO 4217. + schema: + type: string + responses: + "200": + description: Normal Response + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/RateCalendarResponse' + "400": + description: User Fault + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_HCOMHOTELID + Description: The hcomHotelId is invalid. Please specify correct + Hcom hotel id. + TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 + "409": + description: NO_RESULTS_FOUND + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: NO_RESULTS_FOUND + Description: | + Sorry, your query appears to be correctly formatted, but the inventory for which you are seeking + details is now unavailable. + TransactionId: 2423025a-916f-4994-972a-68ee2e6b1e92 + "500": + description: Service Error + content: + application/vnd.exp-hotel.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b + "401": + description: Invalid authentication credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Unauthorized + "403": + description: You cannot consume this service. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: API rate limit exceeded. + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Name resolution failed. + "504": + description: API time out. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: The upstream server is timing out. + security: + - Authorization: [] +components: + schemas: + Address: + type: object + properties: + Address1: + type: string + description: Street Number, Street Name, or PO Box + example: 724 Pine St + Address2: + type: string + description: Apartment, Floor, Suite, Bldg or more specific information about Address1. + example: Second Floor + City: + type: string + description: The city + example: New York + Province: + type: string + description: The state or province + example: NY + Country: + type: string + description: 3-letter code for the country + example: USA + PostalCode: + type: string + description: Zip/postal code + example: "98004" + description: The address information of the location. + AgeClassRestriction: + type: object + properties: + AgeClass: + type: string + description: Categories for hotel guests, based on age. + example: Senior + enum: + - All Ages + - Senior + - Adult + - Child + - Infant + - Other + AgeMinimum: + type: integer + description: The minimum age defined in a particular `AgeClass`. + format: int32 + example: 2 + AgeMaximum: + type: integer + description: | + The maximum age defined in a particular `AgeClass`. + + If not specified, the `AgeClass` has no upper bound. + format: int32 + example: 17 + MaxGuestCount: + type: integer + description: The max guest count allowed in a particular `AgeClass`. + format: int32 + example: 3 + description: Container for room occupancy rules based on the age of the guests. + BedType: + type: object + properties: + Id: + type: string + description: The bed type ID + example: "40" + Description: + type: string + description: The bed type description. + example: 1 bed + description: | + Statement of bed types available for this offer. A room may have several bed type options available. + + **NOTE**: due to the large number of bed type options available, we no longer publish a list of available + bed types. More information is available in + [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + CancellationPenaltyRule: + type: object + properties: + PenaltyNightCount: + type: integer + description: | + Specifies the per-stay cancellation fee charged in terms of the cost of the number of nights listed, in + addition to any other penalties. The rate charged is based on the earliest night(s) of the stay. + format: int32 + example: 1 + PenaltyPercentOfStay: + type: string + description: | + Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other + penalties listed. + example: "100" + PenaltyPrice: + allOf: + - $ref: '#/components/schemas/Money' + - description: Specifies the cancellation fee in terms of a set fee, in addition to any other penalties listed. + PenaltyStartDateTime: + type: string + description: | + The beginning of the window of time when the `CancellationPenaltyRule` is in effect. + + The date and time are expressed in ISO 8601 International Date format, and local to the hotel. + format: date-time + example: 2022-07-23T15:00:00-08:00 + PenaltyEndDateTime: + type: string + description: | + The end of the window of time when the `CancellationPenaltyRule` is in effect. + + The date and time are expressed in ISO 8601 International Date format, and local to the hotel. + format: date-time + example: 2022-07-25T15:00:00-08:00 + WaiverPolicy: + type: object + properties: + WaiverPolicyDescription: + type: string + description: | + The localized waiver policy description, which could be put in front of cancellation policy description. + example: | + You can cancel for a full refund up to 24 hours after booking (not applicable to bookings made within 72 hours of check-in time). After 24 hours: + CancellationPolicy: + type: object + properties: + WaiverPolicy: + $ref: '#/components/schemas/WaiverPolicy' + CancellableOnline: + type: boolean + description: "Boolean value to identify if the reservation can be cancelled\ + \ online.\nIf false, the customer will only be able to cancel a refundable\ + \ room by calling Expedia Customer Service." + example: true + Refundable: + type: boolean + description: Indicate whether the rate is refundable or not. + example: true + FreeCancellation: + type: boolean + description: Indicate whether the room can be cancelled free of charge. + example: true + FreeCancellationEndDateTime: + type: string + description: | + The date and time until which the room can be cancelled free of charge. + + This is expressed in the local time of the Hotel. + format: date-time + CancellationPenaltyRules: + type: array + description: Container for cancellation penalty details. + items: + $ref: '#/components/schemas/CancellationPenaltyRule' + CancelPolicyDescription: + type: string + description: Additional cancellation policy information available as static text. + example: Free cancellation available before 2022-07-18T16:00:00-08:00 + NonRefundableDateRanges: + type: array + description: | + A list of dates ranges that are non-refundable. + + **Note**: The stay dates in those date ranges will always be charged whenever there is any cancellation + penalty rule. + items: + $ref: '#/components/schemas/NonRefundableDateRange' + description: Container for room cancellation policy. + ChainAndBrandInfo: + type: object + properties: + ChainId: + type: integer + description: The chain id. + format: int32 + example: -5 + ChainName: + type: string + description: The name of the chain. + example: Hilton Worldwide + BrandId: + type: integer + description: The brand id. + format: int32 + example: 33 + BrandName: + type: string + description: The name of the brand. + example: Doubletree + description: | + The chain and brand information of hotel. + + Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + Country: + type: object + properties: + Name: + type: string + description: country name + example: Ireland + IsoCode2: + type: string + description: 2-letter code for the country + example: IE + IsoCode3: + type: string + description: 3-letter code for the country + example: IRL + description: Container for disambiguation country information + DepositDetail: + type: object + properties: + Type: + type: string + description: |- + Should be one of the following values: + PERCENT + The deposit amount is calculated as a percentage of the total booking cost. + NIGHT + The deposit amount is calculated in terms of nights plus tax. + AMOUNT + The deposit amount in USD. + REMAINDER + The deposit amount is equal to the booking cost minus any deposits that have been made before this point. + example: NIGHT + enum: + - PERCENT + - NIGHT + - AMOUNT + - REMAINDER + Value: + type: string + description: Value to indicate how many/much of the type listed above is + going to be charged as a deposit. + example: "1" + When: + $ref: '#/components/schemas/When' + description: Container for deposit policy details + DepositPolicy: + type: object + properties: + Description: + type: array + items: + type: string + Details: + type: array + description: Container for deposit policy details + items: + $ref: '#/components/schemas/DepositDetail' + description: Container for deposit policy details + Description: + type: object + properties: + LocationTeaser: + type: string + description: A description of the property's location. + example: Built on the original site of the University of Washington + HotelTeaser: + type: string + description: A description of the features and amenities of the property itself. + example: A top-notch fitness club and spa features a pool + RoomTeaser: + type: string + description: The common description for all of the rooms in the property. + example: "Renovated in May 2016, guest rooms feature upholstered chairs" + description: Container for the descriptions of the property. + Distance: + type: object + properties: + Value: + type: string + description: The distance between the center of the search and the hotel. + example: "75" + Unit: + type: string + description: The unit of distance. + example: km + enum: + - km + - mi + Direction: + type: string + description: The direction to the hotel from the center point of the search. + example: "N" + enum: + - N + - S + - W + - E + - NW + - NE + - SW + - SE + description: | + Container for distance information. + + Only returned for city/address search or `geoLocation` search or single `regionId` search. + GeoLocation: + type: object + properties: + Latitude: + type: string + description: Latitude of the location. + example: "38.184978" + Longitude: + type: string + description: Longitude of the location. + example: "85.7412" + Obfuscated: + type: boolean + description: Container for Geo location. + Hotel: + type: object + properties: + Id: + type: string + description: The unique, Expedia-specific hotel property identifier used to designate a single hotel. + example: "14747" + HcomId: + type: string + description: | + The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. + + This will only be returned if searching via hcomHotelIds in request. + example: "10532" + Name: + type: string + description: The common name of the hotel + example: Four Seasons Hotel Seattle + PropertyType: + $ref: '#/components/schemas/HotelPropertyType' + PropertyDetails: + $ref: '#/components/schemas/PropertyDetails' + LocalCurrencyCode: + type: string + description: The Local Currency Code for Hotel (which will be used for any + fees that must be paid at the hotel) + example: USD + Location: + allOf: + - $ref: '#/components/schemas/Location' + - description: Container for information about the location of the hotel. + PhoneInfos: + type: array + description: | + Container for property phone numbers. + + Note: PhoneInfos section will not return for Vrbo Vacation Rental properties. + items: + $ref: '#/components/schemas/Phone' + Distance: + $ref: '#/components/schemas/Distance' + Description: + $ref: '#/components/schemas/Description' + Status: + type: string + description: | + Indicates whether there are available offers at the property during the dates requested, as well as + information as to why. + + Note that pricing will only be present in the API response for a status of `AVAILABLE`. + + If there are no rooms available at the property for the dates requested, then `NOT_AVAILABLE` will be + returned. + + If there are available rooms, but none that meet the specific parameters of the search request, + then one of the other messages will be returned. + example: AVAILABLE + enum: + - AVAILABLE + - NOT_AVAILABLE + - ERROR + - NUMBER_OF_ADULTS_NOT_ACCEPTED + - NUMBER_OF_CHILDREN_NOT_ACCEPTED + - NUMBER_OF_INFANTS_NOT_ACCEPTED + - NUMBER_OF_PERSONS_NOT_ACCEPTED + - CHECK_IN_AGE_NOT_ACCEPTED + RenovationsAndClosures: + type: array + description: The information about renovations and closures + example: + - The following facilities are closed seasonally each year... + items: + type: string + description: The information about renovations and closures + example: The following facilities are closed seasonally each year... + ChainAndBrandInfo: + $ref: '#/components/schemas/ChainAndBrandInfo' + ThumbnailUrl: + type: string + description: | + URL of the thumbnail image of the hotel. + + Note that other images sizes are available - You can find a link to the complete list of Supported + Hotel Image Sizes in [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + example: https://images.trvl-media.com/hotels/3000000/2170000/2163100/2163007/2163007_15_t.jpg + StarRating: + type: string + description: Star rating value of the hotel property. + example: "5.0" + enum: + - "1.0" + - "1.5" + - "2.0" + - "2.5" + - "3.0" + - "3.5" + - "4.0" + - "4.5" + - "5.0" + GuestRating: + type: string + description: | + Average overall guest rating of the hotel. + + The value is between 1.0 and 5.0 in 0.1 increments. + + Higher is better. + example: "4.5" + GuestReviewCount: + type: integer + description: The total count of guest reviews used to create the average + `GuestRating` above. + format: int32 + example: 240 + PetFriendly: + type: boolean + description: | + Indicates whether the property allows certain pets under certain circumstances. + + Prior to booking, guests should review the PetPolicies information in the Lodging Details API to find out + whether a particular pet will be permitted to stay at the property. + example: true + LgbtqiaFriendly: + type: boolean + description: This value is returned if the property owner has specifically + designated this property as LGBTQIA-friendly. + example: true + Links: + type: object + properties: + WebSearchResult: + allOf: + - $ref: '#/components/schemas/Link' + - description: Link to web search result page. + ApiRateCalendar: + allOf: + - $ref: '#/components/schemas/Link' + - description: Link for Rate Calendar API. + additionalProperties: + $ref: '#/components/schemas/Link' + description: | + Container for list of **HATEOAS** links to Expedia website to complete booking. + + This links section will only return a deeplink to the Website Search Results page by default. + + If you have selected AD deeplinks they will only appear within the `RoomTypes` section of the + response, as the Lodging Details API returns details at the room offer level, and not at the property level. + Policies: + $ref: '#/components/schemas/HotelPolicies' + CleanlinessAndSafety: + type: object + additionalProperties: + type: array + items: + type: string + description: | + Container for all cleanliness and safety measures. + + The key is the measures category, the values are the information. The category will be: + - CLEANLINESS + - SOCIAL_DISTANCING + - SAFETY + - DISCLAIMER + example: + CLEANLINESS: + - Disinfectant is used to clean the property + - High-touch surfaces are cleaned and disinfected + - Sheets and towels are washed at 60°C/140°F or hotter + SOCIAL_DISTANCING: + - Contactless check-in and check-out + - Social distancing measures in place + OptionalExtras: + type: array + description: The optional extras info. + items: + type: string + description: The optional extras info. + ImportantNotices: + type: array + description: The important notices for hotel. + example: + - >- + This property can only accept bookings for essential travel or stays. + You may be asked to provide evidence of this on arrival. + For more information, check local advisories before you book. + items: + type: string + description: The important notices for hotel. + example: >- + This property can only accept bookings for essential travel or stays. + You may be asked to provide evidence of this on arrival. + For more information, check local advisories before you book. + Media: + type: array + description: Container for hotel images + items: + $ref: '#/components/schemas/Media' + HotelAmenities: + type: array + description: Container for all hotel amenities. + items: + allOf: + - $ref: '#/components/schemas/LodgingAmenity' + - description: Container for all hotel amenities. + - properties: + Id: + description: The identification number for a hotel amenity. + Name: + description: The description of a hotel amenity. + HotelDescriptiveAmenities: + type: object + additionalProperties: + type: array + items: + type: string + description: | + Container for all hotel amenities in group. + + The key is amenity category, the values are the amenity information. The category for grouped amenities in hotel level for conventional lodging hotel will be: + - PARKING + - FOOD_AND_DRINK + - INTERNET + - THINGS_TO_DO + - FAMILY_FRIENDLY + - CONVENIENCES + - GUEST_SERVICES + - BUSINESS_SERVICE + - OUTDOOR + - ACCESSIBILITY + - SPA + - ACTIVITIES_NEARBY + - LANGS_SPOKEN + - MORE + + The category for grouped amenities in hotel level for Vacation Rental hotel will be: + - BEACH + - SKI + - POOL/SPA + - INTERNET + - PARKING + - FAMILY_FRIENDLY + - KITCHEN + - DINING + - BEDROOM + - BATHROOMS + - LIVING_SPACES + - ENTERTAINMENT + - OUTDOORS + - LAUNDRY + - WORKSPACES + - CLIMATE_CONTROL + - PETS + - SUITABILITY/ACCESSIBILITY + - SERVICES_AND_CONVENIENCES + - LOCATION_HIGHLIGHTS + - THINGS_TO_DO + - GENERAL + - SAFETY + example: + FAMILY_FRIENDLY: + - Refrigerator + GUEST_SERVICES: + - 24-hour front desk + - Housekeeping (on request) + - Luggage storage + - Multilingual staff + MORE: + - At least 80% lighting from LEDs + - Communal living room + - Comprehensive food waste policy + RoomAmenities: + type: array + description: Container for all room amenities. + items: + allOf: + - $ref: '#/components/schemas/LodgingAmenity' + - description: Container for all room amenities. + - properties: + Id: + description: The identification number for a room amenity. + Name: + description: The description of a room amenity. + RoomDescriptiveAmenities: + type: object + additionalProperties: + type: array + items: + type: string + description: | + Container for all common room amenities in group. + + The key is amenity category, the values are the amenity information. The category for grouped amenities in common room level will be: + - BEDROOM + - BATHROOM + - FOOD_AND_DRINK + - ENTERTAINMENT + - OUTDOOR_SPACE + - MORE + example: + ENTERTAINMENT: + - Flat-screen TV + - iPad + - iPod dock + - Satellite channels + FOOD_AND_DRINK: + - Free bottled water + - Refrigerator + MORE: + - Desk + - Eco-friendly cleaning products provided + - Energy-saving switches + Accessibility: + type: array + description: | + The accessibility options available for the room. + + Possible accessibility include: + - Accessible path of travel + - Accessible bathroom + - Roll-in shower + - Handicapped parking + - In-room accessibility + - Accessibility equipment for the deaf + - Braille or raised signage + example: + - Wheelchair-accessible on-site restaurant + - Wheelchair-accessible lounge + - Well-lit path to entrance + - Stair-free path to entrance + - Wheelchair accessible (may have limitations) + - Wheelchair accessible path of travel + - Accessible bathroom (in select rooms) + - Wheelchair-accessible public washroom + - In-room accessibility (in select rooms) + - Wheelchair-accessible registration desk + - Wheelchair-accessible fitness center + - Wheelchair-accessible meeting spaces/business center + items: + type: string + description: The accessibility options available for the room. + example: Wheelchair-accessible on-site restaurant + MemberOnlyDealAvailable: + type: boolean + description: Indicates whether the property has member only deal rates available. + example: true + RoomTypes: + type: array + description: Container for all of available room types. + items: + $ref: '#/components/schemas/RoomType' + description: Container for information on each offered hotel. + HotelDetailsResponse: + type: object + properties: + Warnings: + type: array + description: | + There were some errors or events during the transaction, but the API has still returned a response. + + Container for all warnings. + items: + allOf: + - $ref: '#/components/schemas/Warning' + - properties: + Code: + description: | + The code of the warning. + + Available values are: + - PRICE_DECREASED: The price decreased after shopping. + - PRICE_INCREASED: The price increased after shopping. + - CURRENCY_CHANGE: You will be charged in a different currency. + OriginalPrice: + description: The original price from the Lodging Search API response. + NewPrice: + description: The new price. + ChangedAmount: + description: The difference between `OriginalPrice` and `NewPrice`. + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + StayDates: + allOf: + - $ref: '#/components/schemas/StayDates' + - description: Dates of the requested property stay. + - properties: + CheckInDate: + description: | + Check-in date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. + + This parameter should be used in combination with the `checkOut` parameter. + + The maximum advanced search window is 330 days in the future. + + The maximum length of stay is 28 days. + CheckOutDate: + description: | + Checkout date for property stay in an ISO 8601 Date format [YYYY-MM-DD]. + + This parameter should be used in combination with the `checkIn` parameter. + + The maximum advanced search window is 330 days in the future. + + The maximum length of stay is 28 days. + LengthOfStay: + type: integer + description: The number of stay nights. + format: int32 + example: 3 + NumberOfRooms: + type: integer + description: Number of rooms requested. + format: int32 + example: 3 + Occupants: + type: array + description: | + Container for the list of rooms requested by the traveler. + + Occupancy for each room is specified in this node. + items: + allOf: + - $ref: '#/components/schemas/Occupant' + - description: | + Container for the list of rooms requested by the traveler. + + Occupancy for each room is specified in this node. + - properties: + Adults: + description: Specifies the number of adults staying in each room. + ChildAges: + description: Specifies the age(s) of each of the children staying in the room, as well as the number of children in the room. + ValidFormsOfPayment: + type: array + description: Container for payment information. + items: + $ref: '#/components/schemas/ValidFormsOfPayment' + HotelDetails: + $ref: '#/components/schemas/Hotel' + HotelPolicies: + type: object + properties: + CheckInStartTime: + type: string + description: Beginning of the standard check-in window on the check in date, and in the local time of the hotel. + example: 3 PM + CheckInEndTime: + type: string + description: End of the standard check-in window on the check in date, and in the local time of the hotel. + example: 5 PM + SpecialCheckInInstructions: + type: array + description: Some special instructions needed care by customer when check in. + example: + - "Special Instructions: The check-in location differs from the property location. To check in, go to 301 N Water St." + items: + type: string + description: | + Any special instructions that the guest would need to know in order to check in. + + Particularly important in a vacation rental property, as many of these do not have a hosted front desk as + a hotel would. + example: "Special Instructions: The check-in location differs from the property location. To check in, go to 301 N Water St." + CheckOutTime: + type: string + description: Customers must check out before this time on the check out date, expressed in the local time of the hotel. + example: noon + PetPolicies: + type: array + description: The policy of the property toward having pets stay with guests. + example: + - Pets allowed, Up to 20 lb + items: + type: string + description: The policy of the property toward having pets stay with guests. + example: Pets allowed, Up to 20 lb + ChildrenAndExtraBedsPolicies: + type: array + description: The policy of the hotel for having children stay at the hotel, as well as for including extra beds in the room. + example: + - Children are welcome, Cribs/infant beds (surcharge) + items: + type: string + description: Container for Hotel policy information. + HotelPropertyType: + type: object + properties: + Id: + type: integer + description: The id of hotel property type. + format: int32 + example: 13 + Name: + type: string + description: The name of hotel property type. + example: Ranch + description: | + Container for information on hotel property type. + + You can find a complete list of Lodging Property Types in [Lodging Property Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/property-types). + Link: + type: object + properties: + Accept: + type: string + description: The Accept request header (for API queries only - not included for page URLs). + Method: + type: string + description: Method of request. + Href: + type: string + description: The URL of the destination web page or API query. + Location: + type: object + properties: + Address: + $ref: '#/components/schemas/Address' + GeoLocation: + allOf: + - $ref: '#/components/schemas/GeoLocation' + - description: Container for information on the geographic location of the hotel. + - properties: + Latitude: + type: string + description: | + The geographic coordinates of the hotel property, based on a horizontal angular measurement relative to The Equator. + + North latitude will be represented by a positive value. + + South latitude will be represented by a negative value. + example: "38.184978" + Longitude: + type: string + description: | + The geographic coordinates of the hotel property, based on a vertical angular measurement relative to the universal Prime Meridian (Royal Observatory, Greenwich). + + East longitude will be represented by a positive value. + + West longitude will be represented by a negative value. + example: "85.7412" + Obfuscated: + type: boolean + description: | + Indicates whether the displayed Latitude/Longitude information is obfuscated. + + Note: Exact Lat/Long values for Vacation Rental properties will not be shown in either XAPv3 Search + or Details responses to respect the security of the homeowner. Instead an 'obfuscated' Lat/Long + value will be returned that will indicate the general area within which the property is located, + but not the exact location of the property itself. + Neighborhood: + $ref: '#/components/schemas/Neighborhood' + description: Container for list of possible locations that could be used to + disambiguate the query. + LodgingAmenity: + type: object + properties: + Id: + type: string + example: "2065" + Name: + type: string + example: Business center + MandatoryFeesDetail: + type: object + properties: + Type: + type: string + description: Type of mandatory fee. + enum: + - City_LocalTax_Amt + - City_LocalTax_Pcnt + - CleaningFee_Amt + - CleaningFee_Pcnt + - ClubCardAdult + - ClubCardChild + - DestinationFee_Amt + - DestinationFee_Pcnt + - GalaDinnerAdult + - GalaDinnerChild + - GalaDinnerChineseNYAdult + - GalaDinnerChineseNYChild + - GalaDinnerNYDayAdult + - GalaDinnerNYDayChild + - GalaDinnerNYEveAdult + - GalaDinnerNYEveChild + - GalaDinnerValentinesDayAdult + - GalaDinnerValentinesDayChild + - GalaDinnerXMASDayAdult + - GalaDinnerXMASDayChild + - GalaDinnerXMASEveAdult + - GalaDinnerXMASEveChild + - ResortFee_Amt + - ResortFee_Pcnt + - SanitationFee + - SeasonalHeatingFee + - TourismFee_Amt + - TourismFee_Pcnt + - TowelSheetsFee_Amt + - TransferFee_Amt_Adult + - TransferFee_Amt_Child + - UtilitySurcharge + example: TransferFee_Amt_Child + Amount: + allOf: + - $ref: '#/components/schemas/Money' + - description: Value of hotel mandatory fee. + description: The breakdown for the taxes and fees that must be paid at the property. + Media: + type: object + properties: + Type: + type: string + description: | + Supported type of media. + + 1=Image. + + Only 1 is supported now. + example: "1" + enum: + - 1 + Title: + type: string + description: Image title + example: Guestroom + Size: + type: string + description: | + Image size. + You can find a link to the complete list of Supported Images Sizes in + [Lodging Image Captions, IDs, and Sizes](https://developers.expediagroup.com/xap/products/xap/lodging/references/image-captions-ids-and-sizes). + example: t + Url: + type: string + description: Image URL + example: https://images.trvl-media.com/hotels/1000000/30000/20300/20230/20230_159_t.jpg + description: Container for hotel images + Money: + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + LocalCurrencyPrice: + $ref: '#/components/schemas/Money' + description: Pricing information of the stat date + Neighborhood: + type: object + properties: + Id: + type: string + description: Neighborhood id. + example: "6160232" + Name: + type: string + description: Neighborhood name. + example: Le Pharo + description: Geography entities which are typically contained within a city. + This includes the categories neighborhood and point of interest. Low level + regions are not a formally defined concept in the geography model. + NightlyRates: + type: object + properties: + StayDate: + type: string + format: date + example: 2022-07-19 + BaseRate: + $ref: '#/components/schemas/Money' + NonRefundableDateRange: + type: object + properties: + StartDate: + type: string + description: Start date of a non-refundable date range. + format: date + example: 2022-07-04 + EndDate: + type: string + description: End date of a non-refundable date range. + format: date + example: 2022-07-05 + Occupant: + type: object + properties: + Adults: + type: integer + description: | + The number of adults in a room. + format: int32 + example: 1 + ChildAges: + type: array + description: | + The ages of children in a room. + example: + - 2 + - 3 + - 5 + items: + type: integer + description: | + The age of children in a room. + format: int32 + description: Container for the list of room occupants. + PaymentSchedule: + type: object + properties: + Due: + type: string + description: Date/Time stamp when this installment/deposit should be paid by. + format: date + example: 2022-09-03 + Price: + allOf: + - $ref: '#/components/schemas/Money' + - description: The monetary amount of the install/deposit required to book the hotel and product. + description: Contains information on the payment schedule. + Phone: + type: object + properties: + CountryCode: + type: string + description: The designated country calling code. + example: "1" + AreaCode: + type: string + description: The phone's area code. + example: "614" + Number: + type: string + description: The phone's local number. + example: "9288472" + ExtensionNumber: + type: string + description: Optional extension number, if required to reach the hotel. + example: "3114" + Promotion: + type: object + properties: + Description: + type: string + description: The description of the promotion. + example: 20%Off + Amount: + allOf: + - $ref: '#/components/schemas/Money' + - description: | + The value of the promotion. + + **CMA Compliance Note (UK)**: Both standard room rates and promotional rates are set and managed by the + hoteliers and not Expedia. + PropertyDetails: + type: object + properties: + PropertyRegistryNumber: + type: string + description: The registry number of property. + example: P-20131 + HostLanguages: + type: array + description: The languages the host of property will speak. + example: ["English","Chinese"] + items: + type: string + MaxOccupancy: + type: integer + description: The maximum number of guests allowed to stay in the property. + format: int32 + example: 12 + NumberOfBedrooms: + type: integer + description: The number of bedrooms in the property. + format: int32 + example: 4 + NumberOfBathrooms: + type: integer + description: The number of bathrooms in the property. + format: int32 + example: 1 + SquareFeet: + type: string + description: Property area in square feet. + example: "123.5" + PropertyManager: + $ref: '#/components/schemas/PropertyManager' + description: | + Container for information about the hotel property detail. It will be shown for Vacation Rental hotel only. + PropertyManager: + type: object + properties: + Name: + type: string + description: The name of the property manager. + example: Mike + CalendarLastUpdated: + type: string + description: The latest updated date. + format: date + PhotoUrl: + type: string + description: The URL for property manager's photo. + example: https://imagesus-ssl.homeaway.com/mda01/ff30bc14-157c-43fc-ad8c-d2ce36bc7e83.4.1 + description: Container for information about the property manager. It will be shown for Vacation Rental hotel only. + RatePlan: + type: object + properties: + RoomTypeId: + type: string + description: The room type identifier. + example: "200287452" + RatePlanId: + type: string + description: The rate plan identifier. + example: "201714191" + RateRuleId: + type: string + description: The identifier of rate rule. + example: "213544817" + InventorySourceId: + type: string + description: The identification number of the source that provides the rate plan. + example: "24" + InventorySourceCode: + type: string + description: The source name that provided the rate plan. + example: JT + StayDates: + $ref: '#/components/schemas/StayDates' + RemainingCount: + type: integer + description: | + The number of rooms remaining through Expedia for this room type. + + **NOTE**: This value does NOT represent the total number of rooms remaining at the hotel property, + only the number of rooms allocated to Expedia for sale by the property that currently remain in Expedia's + inventory. + + When a hotel is listed as 'sold out' by Expedia there may still be rooms available for sale by the hotel + through other channels. + + Also note that the `RemainingCount` response element has a maximum returned value of 100, even if there are + more than 100 rooms available within bookable Expedia inventory. + + **CMA Compliance Note (UK)**: websites in the UK that display `remainingCount` should make it clear to + consumers that this count refers to the number of rooms remaining within Expedia inventory - NOT the number + remaining at the property. + format: int32 + example: 3 + Price: + type: object + description: Container for all price components of the rate plan. + properties: + BaseRate: + allOf: + - $ref: '#/components/schemas/Money' + description: The price of the rate plan for all occupants, excluding taxes and fees. + TaxesAndFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total rate of taxes and fees of the rate plan for all occupants. + TotalPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. + Hotel mandatory fees are not included in this value as these are paid at the hotel at checkout. + Promotion amount have been deducted from the `TotalPrice` value. + TotalStrikeOutPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total amount to strikeout price. This value is the sum of the pre-discount `BaseRate` + the + pre-discount `TaxesAndFees`. + AvgNightlyRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` + divided by `StayDates` and by `room number`. + AvgNightlyStrikeOutRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average nightly strike out price per night per room of the rate plan, which is equal to the + strike out of `BaseRate` divided by `StayDates` and by `room number`. + HotelMandatoryFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total mandatory fees which will be charged at the hotel for the rate plan. + RefundableDamageDeposit: + allOf: + - $ref: '#/components/schemas/Money' + description: The refundable damage deposit. + NightlyRates: + type: array + items: + allOf: + - $ref: '#/components/schemas/NightlyRates' + - properties: + StayDate: + description: A single night during the requested stay. + BaseRate: + description: Container for nightly base rate. + description: Nightly base rate of the rate plan. + TaxesAndFeesDetails: + type: array + items: + allOf: + - $ref: '#/components/schemas/TaxesAndFeesDetail' + - properties: + CategoryCode: + description: Category ID of this specific tax or fee. + Amount: + description: The value of this specific tax or fee. + description: | + Container for taxes and fees detail information. + Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + RoomRates: + type: array + items: + allOf: + - $ref: '#/components/schemas/RoomRates' + description: Container for the rate information of all rooms. This is only returned in Lodging Details API. + MemberOnlyDeal: + type: boolean + description: | + Indicates whether the rate is for member only. + + Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + example: true + Promotions: + type: array + description: All promotion information of the `ratePlan`. + items: + $ref: '#/components/schemas/Promotion' + StandalonePrice: + type: object + description: | + The corresponded standalone price to the package rate plan (to show the `strikethrough`). + + Only returned when the returned `rateplan` is being used as part of a package. + properties: + BaseRate: + allOf: + - $ref: '#/components/schemas/Money' + description: The standalone price of the rate plan for all occupants, excluding taxes and fees. + StrikeOutBaseRate: + allOf: + - $ref: '#/components/schemas/Money' + description: The base rate strikeout in the standalone shopping path. + TaxesAndFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total standalone rate of taxes and fees of the rate plan for all occupants. + StrikeOutTaxesAndFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The taxes and fees strikeout in the standalone shopping path. + TotalPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. + Hotel mandatory fees are not included as these are paid at the hotel at checkout. + TotalStrikeOutPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + AvgNightlyRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average standalone nightly base rate per night per room of the rate plan, which is equal to the + `BaseRate` divided by `StayDates` and by `room number`. + AvgNightlyStrikeOutRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to + `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + HotelMandatoryFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total standalone mandatory fees. + StrikeOutHotelMandatoryFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The strikeout of the mandatory fees in the standalone shopping path. + TaxesAndFeesInclusive: + type: boolean + description: Indicates whether taxes and fees are included in base rate. + example: false + GuaranteeText: + type: string + description: Text description for any deposit information provide by the + property (if applicable). + example: Price Guarantee + PaymentMethod: + type: string + description: | + Room payment information. The available options are: + - Online: Pay at the time of booking + - Hotel: Could either be paid at the hotel during the time of stay or paid at the time indicated by `PaymentTime` and `PaymentSchedule` + example: Online + enum: + - Online + - Hotel + PaymentTime: + type: string + description: | + The time when the booking amount will be charged on the traveler’s credit card. Valid values are as follows: + - UponBooking + - PayLater + - SupplierDiscretion + example: PayLater + enum: + - UponBooking + - PayLater + - SupplierDiscretion + FullDepositUponBooking: + type: boolean + description: | + It will be true if PaymentSchedule has one installment and the value of "Due" is booking date, otherwise, + it will be false. + example: true + PaymentSchedule: + type: array + description: Contains information on the payment schedule. + items: + $ref: '#/components/schemas/PaymentSchedule' + ReserveWithDeposit: + type: boolean + description: Indicates whether this rate plan need deposit to reserve. + example: true + FreeInternet: + type: boolean + description: Indicates whether the price of the room includes free Internet. (either wireless or wired) + example: true + FreeWiFi: + type: boolean + description: Indicates whether the price of the room includes free wireless Internet access. + example: true + FreeInternetDetails: + type: array + description: | + The localized details for the free internet amenity (only shown when FreeInternet = true). + + You can find a link to the complete list of Free Internet Details in + [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + example: + - "Free Wireless Internet, Wired high-speed Internet-comp" + items: + type: string + description: The localized details for the free internet amenity (only shown when FreeInternet = true). + example: Free Wireless Internet, Wired high-speed Internet-comp + FreeParking: + type: boolean + description: Indicates whether the price of the room includes free parking. + example: true + FreeBreakfast: + type: boolean + description: Indicates whether the price of the room includes free breakfast. + example: true + FreeBreakfastDetails: + type: array + description: | + The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). + + You can find a link to the complete list of Free Breakfast Details in + [Lodging Free Breakfast and Internet Details](https://developers.expediagroup.com/xap/products/xap/lodging/references/free-breakfast-and-internet-details). + example: + - Full Breakfast + - Full Board + items: + type: string + description: The localized details for the free breakfast amenity (only shown when FreeBreakfast = true). + example: Full Breakfast + HcomRewardsEarn: + type: boolean + description: Indicate whether the room qualifies for Hcom Rewards Earn. (Hotels.com partners only) + example: true + HcomRewardsBurn: + type: boolean + description: Indicate whether the room qualifies for Hcom Rewards Burn. (Hotels.com partners only) + example: true + CancellationPolicy: + $ref: '#/components/schemas/CancellationPolicy' + Amenities: + type: array + description: The amenities of the `rateplan`. + items: + allOf: + - $ref: '#/components/schemas/LodgingAmenity' + - description: The amenities of the `rateplan`. + - properties: + Id: + description: Amenity ID. + Name: + description: Amenity Name. + description: Container for information on each rate plan. + RoomOccupancyPolicy: + type: object + properties: + MaxGuestCount: + type: integer + description: The maximum number of guests allowed to stay in a room. + format: int32 + example: 3 + MinCheckInAge: + type: integer + description: The minimum age required for check-in. + format: int32 + example: 19 + IncludedGuestCount: + type: integer + description: The number of guests included in base rate. + format: int32 + example: 2 + MinGuestAge: + type: integer + description: The minimum age required for any guest staying in the room. + format: int32 + example: 0 + AgeClassRestrictions: + type: array + description: Container for room occupancy rules based on the age of the guests. + items: + $ref: '#/components/schemas/AgeClassRestriction' + description: Room occupancy policy. + RoomPreference: + type: object + properties: + Type: + type: string + description: |- + The type of preference. Options are: + SmokingPreference + Bed + example: SmokingPreference + enum: + - SmokingPreference + - Bed + Value: + type: string + description: "The value of the room preference.\n\nFor SmokingPreference,\ + \ options are\n\nSmokingOrNonSmoking\nSmoking\nNonSmoking\nFor supported\ + \ Bed Types, please refer to the Related Links section at the bottom of\ + \ the page." + example: NonSmoking + description: Container for room preferences. + RoomRates: + type: object + properties: + RoomIndex: + type: integer + description: Index of which of the requested rooms this entry refers to. + format: int32 + example: 1 + BaseRate: + allOf: + - $ref: '#/components/schemas/Money' + - description: The price of the room, excluding taxes and fees. + TaxesAndFees: + allOf: + - $ref: '#/components/schemas/Money' + - description: The total rate of taxes and fees of the room. + TotalPrice: + allOf: + - $ref: '#/components/schemas/Money' + - description: | + The total price of the room, which is equal to the sum of the `BaseRate` and `TaxesAndFees`. + + Hotel mandatory fees are not included as these are paid at the property at checkout. + TotalStrikeOutPrice: + allOf: + - $ref: '#/components/schemas/Money' + - description: | + The total strike out price of the room, which is equal to the sum of the `BaseRate`'s totalStrikeOut + and `TaxesAndFees`'s totalStrikeOut. + TaxesAndFeesDetails: + type: array + description: | + The breakdown for taxes and fees for this room for the entire stay. + + Only visible by configuration. Please contact your Expedia Account Manager if you need this node. + items: + allOf: + - $ref: '#/components/schemas/TaxesAndFeesDetail' + - properties: + CategoryCode: + description: Tax or fee category code. + Amount: + description: Tax or fee value. + MandatoryFeesDetails: + type: array + description: The breakdown for the taxes and fees that must be paid at the property. + items: + $ref: '#/components/schemas/MandatoryFeesDetail' + NightlyRates: + type: array + description: Container for the nightly rate of current room. + items: + allOf: + - $ref: '#/components/schemas/NightlyRates' + - description: Container for the nightly rate of current room. + - properties: + StayDate: + description: One date of the property stay + BaseRate: + description: Nightly Base Rate for the selected date of stay. + RoomType: + type: object + properties: + Description: + type: string + description: Text description of the room type. + example: "Room, 1 King Bed, City View (Seattle V)" + RoomKey: + type: string + description: | + An encrypted string which includes the information that could be used to address the current room type. + + `RoomKey` has been renamed as `OfferId`. + deprecated: true + OfferId: + type: string + description: An encrypted string which includes the information that could + be used to address the current room type. + example: wMRoCMjQqCDIwMTcwN + MerchantName: + type: string + description: Name of Merchant that did the initial Authentication. + example: EXPEDIA + RatePlanType: + type: string + description: | + Indicate the room type is sold as package or standalone. + example: package + enum: + - standalone + - package + - wholesale + RatePlans: + type: array + description: Container for rate plan information. + items: + $ref: '#/components/schemas/RatePlan' + Price: + type: object + description: Container of all price components of the room. + properties: + BaseRate: + allOf: + - $ref: '#/components/schemas/Money' + description: The price of the rate plan for all occupants, excluding taxes and fees. + TaxesAndFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total rate of taxes and fees of the rate plan for all occupants. + TotalPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. Hotel + mandatory fees are not included as these are paid at the hotel at checkout. + TotalStrikeOutPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total strike out price of the rate plan, which is equal to the sum of `BaseRate`'s + `totalStrikeOut` and `TaxesAndFees`'s `totalStrikeOut`. + AvgNightlyRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average nightly base rate per night per room of the room type, which is equal to the `BaseRate` + divided by `StayDates` and by `room number`. + AvgNightlyStrikeOutRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average nightly strike out rate per night per room of the room type, which is equal to the + strike out of `BaseRate` divided by `StayDates` and by `room number`. + AvgNightlyRateWithFees: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + AvgNightlyStrikeoutRateWithFees: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average nightly strike out rate per night per room of the room type, including all fees except those imposed by the government. + HotelMandatoryFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total mandatory fees which will be charged at the hotel for the rate plan. + TotalPriceWithHotelFees: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total combined price that includes `TotalPrice` that will be charged by Expedia (`BaseRate` + + `TaxesAndFees`) combined with any `HotelMandatoryFees` that will be charged at hotel. + **NOTE**: Since UK regulations require that `HotelMandatoryFees` be included in this price, the + quoted price will only be accurate for the day of quote. This is due to the fact that + currency exchange fluctuations will change the exact amount of any `HotelMandatoryFees` that are to + be collected at the hotel during the guest's stay if the cost is converted into any other currency. + **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to + be compliant with CMA requirements. + RefundableDamageDeposit: + allOf: + - $ref: '#/components/schemas/Money' + description: The refundable damage deposit for the rate plan. + StandalonePrice: + type: object + description: | + The corresponded standalone price to the package rate plan (to show the `strikethrough`). + + Only returned when this is a package rate plan. + properties: + BaseRate: + allOf: + - $ref: '#/components/schemas/Money' + description: The standalone price of the rate plan for all occupants, excluding taxes and fees. + StrikeOutBaseRate: + allOf: + - $ref: '#/components/schemas/Money' + description: The base rate strikeout in the standalone shopping path. + TaxesAndFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total standalone rate of taxes and fees of the rate plan for all occupants. + StrikeOutTaxesAndFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The taxes and fees strikeout in the standalone shopping path. + TotalPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total standalone price of the rate plan, which is equal to the sum of `BaseRate` and `TaxesAndFees`. + Hotel mandatory fees are not included as these are paid at the hotel at checkout. + TotalStrikeOutPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total strikeout in the standalone shopping path, which is equal to the sum of `StrikeOutBaseRate` and `StrikeOutTaxesAndFees`. + AvgNightlyRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average standalone nightly base rate per night per room of the rate plan, which is equal to the + `BaseRate` divided by `StayDates` and by `room number`. + AvgNightlyStrikeOutRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average strikeout of the base rate in the standalone shopping path, which is per night per room and is equal to + `StrikeOutBaseRate` divided by `StayDates` and by `room number`. + HotelMandatoryFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total standalone mandatory fees. + StrikeOutHotelMandatoryFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The strikeout of the mandatory fees in the standalone shopping path. + Promotions [deprecated]: + type: array + description: | + All promotion information of the room. + + **Note**: The node has been moved to `RatePlan` node, and will be deprecated soon. + deprecated: true + items: + $ref: '#/components/schemas/Promotion' + Links: + type: object + properties: + WebSearchResult: + allOf: + - $ref: '#/components/schemas/Link' + - description: Link to web search result page. + WebDetails: + allOf: + - $ref: '#/components/schemas/Link' + - description: Link to web infosite. + ApiDetails: + allOf: + - $ref: '#/components/schemas/Link' + - description: Link for details API. + additionalProperties: + $ref: '#/components/schemas/Link' + description: | + Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking + of the selected offer. + + Which links are returned in this section are defined by the `links` parameter in the Search API query. + + Available links are: + - WebSearchResult (link to web search result page) + - WebDetails (link to web infosite) + - ApiDetails (link for details API) + SmokingOption: + type: string + description: The smoking options available for the room type. + example: SmokingOrNonSmoking + enum: + - SmokingOrNonSmoking + - Smoking + - NonSmoking + BedTypeOptions: + type: array + description: | + Statement of bed types available for this offer. A room may have several bed type options available. + + **NOTE**: due to the large number of bed type options available, we no longer publish a list of available + bed types. More information is available in + [Lodging Bed Types](https://developers.expediagroup.com/xap/products/xap/lodging/references/bed-types). + items: + $ref: '#/components/schemas/BedType' + RoomOccupancyPolicy: + $ref: '#/components/schemas/RoomOccupancyPolicy' + Amenities: + type: array + description: Container for all room amenities. + items: + allOf: + - $ref: '#/components/schemas/LodgingAmenity' + - description: The amenity of the room. + - properties: + Id: + description: Amenity id + Name: + description: Amenity name + DescriptiveAmenities: + type: object + additionalProperties: + type: array + items: + type: string + description: | + Container for all room amenities in group. + + The key is amenity category, the values are the amenity information. The category for grouped amenities in room level will be: + - ACCESSIBILITY + - BATHROOM + - BEDROOM + - CLUB_EXEC + - FAMILY_FRIENDLY + - ENTERTAINMENT + - FOOD_AND_DRINK + - INTERNET + - MORE + - OUTDOOR_SPACE + - SAFETY + example: + FOOD_AND_DRINK: + - "2 restaurants" + - "Coffee/tea in common area(s)" + Media: + type: array + description: Container for Media elements. + items: + allOf: + - $ref: '#/components/schemas/Media' + - description: Media elements. + StayDates: + type: object + properties: + CheckInDate: + type: string + description: The initial day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + format: date + CheckOutDate: + type: string + description: The final day of the hotel stay in an ISO 8601 Date format [YYYY-MM-DD]. + format: date + description: Container for information for the stay dates of the rate plan. + TaxesAndFeesDetail: + type: object + properties: + CategoryCode: + type: string + example: "401" + Amount: + $ref: '#/components/schemas/Money' + ValidFormsOfPayment: + type: object + properties: + PaymentMethod: + type: string + description: The payment method. + example: DebitCard + Name: + type: string + description: The brand name of the payment sub-method to be displayed to the customer. + example: Visa + PaymentSubMethod: + type: string + description: The payment sub-method. + example: Visa + deprecated: true + BrandName: + type: string + description: | + The brand name of the payment sub-method to be displayed to the customer. + + In many cases it will be the same as the payment sub-method, but "Visa/Carte Blanche" and "Visa/Delta" are some of the exceptions. + example: Visa + deprecated: true + description: Container for hotel supported payment information. + Warning: + type: object + properties: + Code: + type: string + description: The code of a warning. + example: INVALID_CORPORATE_DISCOUNT_CODE + Description: + type: string + description: A detail information of what happened. + example: The Corporate DiscountCode '811490' is unavailable, but we found other rates for you. + OriginalPrice: + $ref: '#/components/schemas/Money' + NewPrice: + $ref: '#/components/schemas/Money' + ChangedAmount: + $ref: '#/components/schemas/Money' + ChangedPercentage: + type: string + description: |- + The changed percentage. + In the sample 2.97 means the changed percentage is 2.97%. + example: "2.97" + description: | + There were some errors or events during the transaction, but the API has still returned a response. + + Container for all warnings. + When: + type: object + properties: + Type: + type: string + description: |- + Indicates the time of the deposit collection. + Options are: + UPON_BOOKING + The customer must pay the deposit when booking the property. + DAYS_PRIOR + The customer must pay the deposit a number of days before arriving at the property. + UPON_ARRIVAL + The customer must pay the deposit upon arriving at the property. + example: UPON_BOOKING + enum: + - UPON_BOOKING + - DAYS_PRIOR + - UPON_ARRIVAL + Value: + type: string + description: This value will only be shown when Deposit Type is DAYS_PRIOR + to indicate the number of days prior to check in when the deposit will + be collected. + example: "1" + description: Indicate when to pay. + Error: + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + DetailCode: + type: string + description: Detailed error code describing the issue. + example: MULTIPLE_AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: More than one location found + LocationKeyword: + type: string + description: The requested location that caused the error. + example: Portland + LocationOptions: + type: array + description: Container for possible matches to your ambiguous `locationKeyword` query. + items: + $ref: '#/components/schemas/LocationOption' + description: Container for error list. + Errors: + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: '#/components/schemas/Error' + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + LocationOption: + type: object + properties: + Type: + type: string + description: Type of the location. + example: TRAINSTATION + RegionId: + type: string + description: RegionId the location resides in. + example: "6200275" + ShortName: + type: string + description: The name of the location which matches the location keyword. + example: Dublin Connolly Station + AirportCode: + type: string + description: Indicates the nearest major airport to the location. + example: DUB + Address: + type: string + description: The address of the location. + example: "Dublin Connolly Station, Ireland" + Country: + $ref: '#/components/schemas/Country' + GeoLocation: + $ref: '#/components/schemas/GeoLocation' + description: Container for possible matches to your ambiguous `locationKeyword` query. + APIGatewayError: + type: object + properties: + message: + type: string + HotelListingsResponse: + type: object + properties: + Warnings: + type: array + description: | + There were some errors or events during the transaction, but the API has still returned a response. + + Container for all warnings. + items: + $ref: '#/components/schemas/Warning' + Count: + type: integer + description: The number of hotels actually returned in the response. + format: int32 + example: 99 + TotalHotelCount: + type: integer + description: The number of hotels present in the location. + format: int32 + example: 230 + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + StayDates: + allOf: + - $ref: '#/components/schemas/StayDates' + - description: Container for requested dates of stay. + LengthOfStay: + type: integer + description: The number of stay nights. + format: int32 + example: 3 + NumberOfRooms: + type: integer + description: The number of the rooms requested on behalf of the user. + format: int32 + example: 3 + Occupants: + type: array + description: Container of occupants. It is an array including occupants of each room. + items: + $ref: '#/components/schemas/Occupant' + Hotels: + type: array + description: Container for all hotels. + items: + $ref: '#/components/schemas/Hotel' + HotelRateCalendar: + type: object + properties: + EcomHotelId: + type: string + description: The unique, Expedia-specific hotel property identifier used to designate a single hotel. + example: "14747" + HcomHotelId: + type: string + description: | + The unique, Hotels.com-specific hotel property identifier used to designate a single hotel. + + This will be returned if searching via `hcomHotelId` in request or the request is coming from Hcom partner. + example: "10532" + RateCalendar: + type: array + description: Container for all rate calendar data. + items: + $ref: '#/components/schemas/RateCalendar' + description: Container for all hotel rate calendar data. + RateCalendar: + type: object + properties: + StayDate: + type: string + description: Stay date for which the price is returned. + format: date + example: 2022-09-02 + Price: + allOf: + - $ref: '#/components/schemas/Money' + - description: Container for pricing information. + - properties: + Value: + description: The total price of the corresponding date. + Currency: + description: | + The ISO 4217 Currency Code that the Value is expressed in. + + See [Global Currency Codes](https://developers.expediagroup.com/xap/products/xap/lodging/references/global-currency-codes) + for a full list of supported currencies. + PriceLevel: + type: string + description: | + Indicates how that day's price compares to the other lowest price for that hotel over the searched date + range. Prices will be bucketed into LOW/MEDIUM/HIGH. Here are the details for each `PriceLevel`: + - HIGH: 65th percentile+ + - MEDIUM: 30th Percentile+ + - LOW: Anything lower than 30th percentile + example: MEDIUM + enum: + - HIGH + - MEDIUM + - LOW + Status: + type: string + description: Represents whether the offer is currently available. + enum: + - AVAILABLE + - NOT_AVAILABLE + example: AVAILABLE + description: The lowest rate information of requested days + RateCalendarResponse: + type: object + properties: + Warnings: + type: array + description: | + There were some errors or events during the transaction, but the API has still returned a response. + + Container for all warnings. + items: + $ref: '#/components/schemas/Warning' + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + RateCalendars: + type: array + description: Container for all hotel rate calendar data. + items: + $ref: '#/components/schemas/HotelRateCalendar' + securitySchemes: + Authorization: + type: http + scheme: basic diff --git a/specs/xap-lodging.specs.yaml b/specs/xap-lodging.specs.yaml new file mode 100644 index 000000000..5d919d589 --- /dev/null +++ b/specs/xap-lodging.specs.yaml @@ -0,0 +1,998 @@ +openapi: 3.0.1 +info: + title: EWSHotel API + description: | + The XAP Lodging Search APIs can be used by partners both booking via an Expedia website, or by partners that + will be booking via the XAP APIs. Each API also provides pre-configured links to the Expedia website, + the XAP Booking API, or both. + contact: + name: PartnerAPIs + url: https://confluence.expedia.biz/display/EWS/EWSHotel + email: dreamweaver@expedia.com + version: v3 + x-eg-lifecycle: LIVE + x-eg-tags: ["Partner", "EWS", "XAP", "EWSHotel", "Hotel", "Lodging", "LodgingQuotes","LodgingAvailabilityCalendar"] +tags: + - name: Lodging Quotes + - name: Lodging Availability Calendars +servers: + - url: 'https://apim.expedia.com' + description: Production Server +paths: + /lodging/quotes: + get: + tags: + - Lodging Quotes + summary: Get properties price and availability information + description: | + The Lodging Quotes API will return the price and availability information for given Expedia lodging property ID(s). + operationId: get-lodging-quotes + parameters: + - name: Key + in: header + description: | + The partner API key is a case-sensitive, alphanumeric string that looks something like this: + + **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** + + The API Key is assigned and configured as part of the API on-boarding process. + It will be sent to the partner by their Expedia Account Manager or representative. + required: true + schema: + type: string + - name: Partner-Transaction-Id + in: header + description: | + The `Partner-Transaction-ID` is a required API request header element that is not consumed + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + back to the partner in the corresponding API response header. + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: propertyIds + in: query + description: | + Comma-separated list of Expedia Property IDs. + + ***NOTE**: This API supports Expedia property IDs only by design – HCOM and Vrbo property IDs are + not supported.* + + *For optimal performance, limiting your request to a maximum of 200 properties is recommended.* + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + - name: checkIn + in: query + description: | + Check-in date for property stay in an ISO 8601 Date format. + + This parameter should be used in combination with the checkOut parameter. + + The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. + schema: + type: string + format: date + example: '2023-10-12' + - name: checkOut + in: query + description: | + Check-out date for property stay in an ISO 8601 Date format + + This parameter should be used in combination with the checkIn parameter. + + The maximum advanced search window is 1000 days in the future, and the maximum length of stay is 732. + schema: + type: string + format: date + example: '2023-10-14' + - name: currency + in: query + description: | + The requested currency expressed according to ISO 4217. + + PoS default currency will be passed if another currency is not specified in the request. + schema: + type: string + - name: links + in: query + description: | + Comma-separated list to specify the types of deep links. + - WD (link to web infosite) + - WS (link to web search result page) + - WEB (include all website links) + explode: false + schema: + type: array + items: + type: string + enum: + - WD + - WS + - WEB + - name: travelWithPets + in: query + description: | + Indicates if the search should include pet-friendly properties. + + If set to "True" only properties that allow pets are returned. Pet fees, if available, are included in TaxesAndFees. + + The parameter is only applicable to the Vrbo brand. + schema: + type: boolean + default: false + - name: room1.adults + in: query + description: | + Specifies the number of adults staying in a specific room. + + Example: `room1.adults` is used to specify the number of adults in the first room. + + ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo + properties should only include one room. e.g. 3 adults in room 1 and 3 in room 2, "room1.adults" is 6. + schema: + type: integer + format: int64 + example: 2 + - name: room1.childAges + in: query + description: | + Comma-separated list that specifies the age(s) for each of the children in each of the rooms. + + Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. + + Children must be accompanied by an adult. + + Total number of children is indicated by the number of childAges included. + + If there are no children in the party then this value should not be included. + + ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo + properties should include the ages of all the children in the first room. e.g. 1 child age 10 in room #1 + and 1 child age 11 in room #2, "room1.childAges" is 10,11. + explode: false + schema: + type: array + items: + type: string + example: + - 8 + - 10 + - name: room2.adults + in: query + description: Specifies the number of adults staying in second room. + schema: + type: integer + format: int64 + - name: room2.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in second room. + explode: false + schema: + type: array + items: + type: string + - name: room3.adults + in: query + description: Specifies the number of adults staying in third room. + schema: + type: integer + format: int64 + - name: room3.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in third room. + explode: false + schema: + type: array + items: + type: string + - name: room4.adults + in: query + description: Specifies the number of adults staying in fourth room. + schema: + type: integer + format: int64 + - name: room4.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in fourth room. + explode: false + schema: + type: array + items: + type: string + - name: room5.adults + in: query + description: Specifies the number of adults staying in fifth room. + schema: + type: integer + format: int64 + - name: room5.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in fifth room. + explode: false + schema: + type: array + items: + type: string + - name: room6.adults + in: query + description: Specifies the number of adults staying in sixth room. + schema: + type: integer + format: int64 + - name: room6.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in sixth room. + explode: false + schema: + type: array + items: + type: string + - name: room7.adults + in: query + description: Specifies the number of adults staying in seventh room. + schema: + type: integer + format: int64 + - name: room7.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in seventh room. + explode: false + schema: + type: array + items: + type: string + - name: room8.adults + in: query + description: Specifies the number of adults staying in eighth room. + schema: + type: integer + format: int64 + - name: room8.childAges + in: query + description: Comma-separated list that specifies the age(s) for each of the + children in eighth room. + explode: false + schema: + type: array + items: + type: string + responses: + "200": + description: Normal Response + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: '#/components/schemas/LodgingQuotesResponse' + examples: + Lodging Quotes Response: + value: |- + { + "Count": 1, + "TotalPropertyCount": 1, + "TransactionId": "0e1d7193-2289-481c-bdf9-b7ac0b0b3bfe", + "StayDates": { + "CheckInDate": "2024-11-29", + "CheckOutDate": "2024-12-04" + }, + "LengthOfStay": 5, + "Occupants": [ + { + "Adults": 2 + } + ], + "Properties": [ + { + "Id": "87704892", + "Status": "AVAILABLE", + "RoomTypes": [ + { + "RatePlans": [ + { + "CancellationPolicy": { + "Refundable": true, + "FreeCancellation": true, + "FreeCancellationEndDateTime": "2024-11-15T23:59:00-08:00", + "CancellationPenaltyRules": [ + { + "PenaltyPercentOfStay": "50.00", + "PenaltyStartDateTime": "2024-11-15T23:59:00-08:00", + "PenaltyEndDateTime": "2024-11-22T23:59:00-08:00" + }, + { + "PenaltyPercentOfStay": "100", + "PenaltyStartDateTime": "2024-11-22T23:59:00-08:00", + "PenaltyEndDateTime": "2024-11-29T00:00:00-08:00" + } + ] + } + } + ], + "Price": { + "BaseRate": { + "Value": "790.00", + "Currency": "USD" + }, + "TaxesAndFees": { + "Value": "348.48", + "Currency": "USD" + }, + "TotalPrice": { + "Value": "1138.48", + "Currency": "USD" + }, + "AvgNightlyRate": { + "Value": "158.00", + "Currency": "USD" + }, + "AvgNightlyRateWithFees": { + "Value": "198.80", + "Currency": "USD" + }, + "TotalPriceWithPropertyFees": { + "Value": "1138.48", + "Currency": "USD" + } + }, + "Links": { + "WebSearchResult": { + "Method": "GET", + "Href": "https://www.vrbo.com/search?selected=87704892&startDate=2024-11-29&endDate=2024-12-04&adults=2&tpid=9001&eapid=1&mpa=790.00&mpb=348.48&mpd=USD&mctc=15" + }, + "WebDetails": { + "Method": "GET", + "Href": "https://www.vrbo.com/3032772?adults=2&startDate=2024-11-29&endDate=2024-12-04&mpa=790.00&mpb=348.48&mpd=USD&mpe=1721730597" + } + } + } + ] + } + ] + } + "400": + description: User Fault + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_PROPERTYID + Description: The PropertyIds is invalid. Which should be comma separated list of property IDs. + TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 + "500": + description: Service Error + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b + "401": + description: Invalid authentication credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Unauthorized + "403": + description: You cannot consume this service. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: API rate limit exceeded. + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Name resolution failed. + "504": + description: API time out. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: The upstream server is timing out. + security: + - Authorization: [] + /lodging/availabilityCalendars: + get: + tags: + - Lodging Availability Calendars + summary: Get availability calendars of properties + description: "Returns the availability of each day for a range of dates for given Expedia lodging properties." + operationId: get-lodging-availability-calendars + parameters: + - name: Key + in: header + description: | + The partner API key is a case-sensitive, alphanumeric string that looks something like this: + + **X99X9X9-99XX-9XX9-X999-99XX99X9X999X** + + The API Key is assigned and configured as part of the API on-boarding process. + It will be sent to the partner by their Expedia Account Manager or representative. + required: true + schema: + type: string + - name: Partner-Transaction-Id + in: header + description: | + The `Partner-Transaction-ID` is a required API request header element that is not consumed + by Expedia. It will be required in all XAP v3 API request headers and will be mirrored + back to the partner in the corresponding API response header. + + The `Partner-Transaction-ID` may be any alphanumeric string of the partner's choosing. + required: true + schema: + type: string + example: Partner123 + - name: propertyIds + in: query + description: | + Comma-separated list of Expedia Property IDs. + + The API request supports a maximum of 50 Property IDs in a single request. + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + responses: + "200": + description: Normal Response + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: '#/components/schemas/AvailabilityCalendarResponse' + "400": + description: User Fault + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: INVALID_PROPERTYIDS + Description: The propertyIds is invalid. Which should be comma separated list of Expedia property IDs. + TransactionId: 97da7aa5-175e-4fdf-8bbd-32e997b6faa8 + "500": + description: Service Error + content: + application/vnd.exp-lodging.v3+json: + schema: + $ref: '#/components/schemas/Errors' + example: + Errors: + - Code: APPLICATION_ERROR + Description: Application error. + TransactionId: b2f16375-9fe3-43e3-b524-fb5e0498460b + "401": + description: Unauthorized or Invalid authentication credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Unauthorized + "403": + description: cannot consume this service. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: You cannot consume this service + "429": + description: API rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: API rate limit exceeded. + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: Name resolution failed. + "504": + description: API time out. + content: + application/json: + schema: + $ref: '#/components/schemas/APIGatewayError' + example: + message: The upstream server is timing out. + security: + - Authorization: [] +components: + schemas: + CancellationPenaltyRule: + type: object + properties: + PenaltyPercentOfStay: + type: string + description: | + Specifies the per-stay cancellation fee charged as a percentage of the total rate, in addition to any other + penalties listed. + example: "100" + PenaltyStartDateTime: + type: string + description: | + The beginning of the window of time when the `CancellationPenaltyRule` is in effect. + + The date and time are expressed in ISO 8601 International Date format, and local to the property. + format: date-time + example: 2022-07-23T15:00:00-08:00 + PenaltyEndDateTime: + type: string + description: | + The end of the window of time when the `CancellationPenaltyRule` is in effect. + + The date and time are expressed in ISO 8601 International Date format, and local to the property. + format: date-time + example: 2022-07-25T15:00:00-08:00 + description: Container for cancellation penalty details. + CancellationPolicy: + type: object + properties: + Refundable: + type: boolean + description: Indicate whether the rate is refundable or not. + example: true + FreeCancellation: + type: boolean + description: Indicate whether the room can be cancelled free of charge. + example: true + FreeCancellationEndDateTime: + type: string + description: The date and time until which the room can be cancelled free of charge. + format: date-time + CancellationPenaltyRules: + type: array + description: Container for Cancellation Penalty Rules information. + items: + $ref: '#/components/schemas/CancellationPenaltyRule' + description: Container for Cancellation Policy information. + Property: + type: object + properties: + Id: + type: string + description: The unique property identifier used to designate a single property. + example: "14747" + Status: + type: string + description: Represents whether the offer is currently available. + example: AVAILABLE + enum: + - AVAILABLE + - NOT_AVAILABLE + - ERROR + - NUMBER_OF_ADULTS_NOT_ACCEPTED + - NUMBER_OF_CHILDREN_NOT_ACCEPTED + - NUMBER_OF_INFANTS_NOT_ACCEPTED + - NUMBER_OF_PERSONS_NOT_ACCEPTED + - CHECK_IN_AGE_NOT_ACCEPTED + RoomTypes: + type: array + description: Container for all of available room types. + items: + $ref: '#/components/schemas/RoomType' + description: Container for information on each offered hotel. + Link: + type: object + properties: + Accept: + type: string + description: | + The Accept request header for API queries only. + + Note: this value will only be returned if the link is an API query, as website URLs do not require an + `Accept` header. + Method: + type: string + description: Method of request. + example: GET + Href: + type: string + description: The URL of the destination web page or API query. + Money: + type: object + properties: + Value: + type: string + description: The value of the element being defined. + example: "21.9" + Currency: + type: string + description: The ISO 4217 Currency Code that the value is expressed in. + example: USD + description: Pricing information of the stat date + Occupant: + type: object + properties: + Adults: + type: integer + description: The number of adults in a room. + format: int32 + example: 1 + ChildAges: + type: array + description: The ages of children in a room. + example: + - 2 + - 3 + - 5 + items: + type: integer + format: int32 + Promotion: + type: object + properties: + Description: + type: string + description: The description of the promotion. + example: 20%Off + Amount: + $ref: '#/components/schemas/Money' + RatePlan: + type: object + properties: + CancellationPolicy: + $ref: '#/components/schemas/CancellationPolicy' + Promotions: + type: array + description: All promotion information of the ratePlan. + items: + $ref: '#/components/schemas/Promotion' + description: Container for rate plan information. + RoomType: + type: object + properties: + RatePlans: + type: array + description: Container for rate plan information. + items: + $ref: '#/components/schemas/RatePlan' + Price: + type: object + properties: + BaseRate: + allOf: + - $ref: '#/components/schemas/Money' + description: The price of the rate plan for all occupants, excluding taxes and fees. + TaxesAndFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total amount of taxes and fees of the rate plan for all occupants. + TotalPrice: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total price of the rate plan, which is equal to the sum of `BaseRate` + `TaxesAndFees`. + Property mandatory fees are not included in this value as these are paid at the property at + checkout. + AvgNightlyRate: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average nightly base rate per night per room of the rate plan, which is equal to the `BaseRate` + divided by `StayDates` and by `room number`. + AvgNightlyRateWithFees: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The average nightly rate per night per room of the room type, including all fees except those imposed by the government. + PropertyMandatoryFees: + allOf: + - $ref: '#/components/schemas/Money' + description: The total mandatory fees which will be charged at the property for the rate plan. + TotalPriceWithPropertyFees: + allOf: + - $ref: '#/components/schemas/Money' + description: | + The total price of the rate plan include property mandatory fees, which is equal to the sum of + `BaseRate` + `TaxesAndFees` + `PropertyMandatoryFees`. + **NOTE**: Since UK regulations require that `PropertyMandatoryFees` be included in this price, the + quoted price will only be accurate for the day of quote. This is due to the fact that + currency exchange fluctuations will change the exact amount of any `PropertyMandatoryFees` that are to + be collected at the hotel during the guest's stay if the cost is converted into any other currency. + **CMA Compliance Note (UK)**: Websites doing business in the UK should be displaying this value to + be compliant with CMA requirements. + RefundableDamageDeposit: + allOf: + - $ref: '#/components/schemas/Money' + description: The refundable damage deposit. + description: Container for Price information. + Links: + type: object + properties: + WebSearchResult: + allOf: + - $ref: '#/components/schemas/Link' + - description: Link to web search result page. + WebDetails: + allOf: + - $ref: '#/components/schemas/Link' + - description: Link to web infosite. + additionalProperties: + $ref: '#/components/schemas/Link' + description: | + Container for list of HATEOAS links to either Expedia website or additional Expedia APIs to complete booking of the selected offer. + + Which links are returned in this section are defined by the links parameter in the Search API query. + Available links are: + - WebDetails (link to web infosite) + - WebSearchResult (link to web search result page) + StayDates: + type: object + properties: + CheckInDate: + type: string + description: The initial day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. + format: date + CheckOutDate: + type: string + description: The final day of the property stay in an ISO 8601 Date format [YYYY-MM-DD]. + format: date + description: | + Container for requested dates of stay. + Warning: + type: object + properties: + Code: + type: string + description: The code of a warning. + example: NO_RESULTS_FOUND + Description: + type: string + description: A description of what caused the issues. + example: | + Sorry, your query completed successfully, but did not return any inventory. Please adjust your + search parameters and try again. + Error: + type: object + properties: + Code: + type: string + description: Error code describing the issue + example: AMBIGUOUS_LOCATION + Description: + type: string + description: A simple description of what the error is. + example: 'Multiple pickup locations found. ' + description: Container for error list. + Errors: + type: object + properties: + Errors: + type: array + description: Container for error list. + items: + $ref: '#/components/schemas/Error' + TransactionId: + type: string + description: A unique identifier for the transaction. + example: a9e371c4-89d9-4f9c-8df7-df105830e7fe + APIGatewayError: + type: object + properties: + message: + type: string + LodgingQuotesResponse: + type: object + properties: + Warnings: + type: array + description: | + There were some errors or events during the transaction, but the API has still returned a response. + + Container for all warnings. + items: + $ref: '#/components/schemas/Warning' + Count: + type: integer + description: The number of properties actually returned in the response. + format: int32 + example: 99 + TotalPropertyCount: + type: integer + description: The number of properties requested. + format: int32 + example: 230 + TransactionId: + type: string + description: Unique identifier for the API transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + StayDates: + $ref: '#/components/schemas/StayDates' + LengthOfStay: + type: integer + description: The number of stay nights. + format: int32 + example: 3 + Occupants: + type: array + description: Container for the list of room occupants. + items: + $ref: '#/components/schemas/Occupant' + Properties: + type: array + description: Container for all properties. + items: + $ref: '#/components/schemas/Property' + DateRange: + type: object + description: The actual date range for the shown availability. + properties: + StartDate: + type: string + description: The initial day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. + example: "2022-07-05" + format: date + EndDate: + type: string + description: The final day of the date range in an ISO 8601 Date format [YYYY-MM-DD]. + example: "2023-07-05" + format: date + AvailabilityCalendar: + type: object + properties: + PropertyId: + type: string + description: The unique property identifier that designates a single property. + example: "74041788" + DateRange: + $ref: '#/components/schemas/DateRange' + Availability: + type: string + description: | + A string of codes that shows property availability, one for every day in the specified date range. + + Valid values include Y (available) and N (unavailable). + + ***Note**: The first code stands for availability on the `StartDate` in the `DateRange` and the last one stands + for the `EndDate`.* + example: "YYYYYYNNNNNN" + ChangeOver: + type: string + description: | + A string of codes that shows changeover action, one for every day in the specified date range. + + Valid values include + - X (no action possible) + - C (check-in, checkout) + - O (checkout only) + - I (check-in only) + ***Note**: The first code stands for possible action on the `StartDate` in the `DateRange` and the last one + stands for the `EndDate`. All actions are possible if not returned.* + example: "XXIIICCCOOCC" + MinPriorNotify: + type: string + description: | + A comma-separated list of numbers that shows how many days before a reservation the booking must occur, one + for every day in the specified date range. Valid values include 0-999, and 0 indicates no prior notification + required for a given day. The unit is always day. + + ***Note**: The first number stands for the minimum advance booking days on the `StartDate` in the `DateRange` + and the last one stands for the `EndDate`. No limitation if not returned.* + example: "1,1,1,1,1,1,1,1,1,1,1,1,1" + MinStay: + type: string + description: | + A comma-separated list of numbers that show the minimum number of days a traveler can stay, one for every + day in the specified date range. + + Valid values include 0-999, and 0 indicates no minimum for a given day. The unit is always day. + + ***Note**: The first number stands for the minimum stay on the `StartDate` in the `DateRange` and the last + one stands for the `EndDate`. No limitation if not returned.* + example: "0,0,0,3,3,3,3,3,3,7,7,7,7,7,21,21,21" + MaxStay: + type: string + description: | + A comma-separated list of numbers that show the maximum number of days a traveler can stay, one for every + day in the specified date range. + + Valid values include 0-999, and 0 indicates no maximum for a given day. The unit is always day. + + ***Note**: The first number stands for the maximum stay on the `StartDate` in the `DateRange` and the + last one stands for the `EndDate`. No limitation if not returned. + example: "0,0,0,31,31,31,371,370" + AvailabilityCalendarResponse: + type: object + properties: + Warnings: + type: array + description: | + There were some errors or events during the transaction, but the API has still returned a response. + + Container for all warnings. + items: + $ref: '#/components/schemas/Warning' + TransactionId: + type: string + description: Unique identifier for the transaction. + example: f06edfa3-27f4-44e6-838c-b8dd3d0a3210 + AvailabilityCalendars: + type: array + description: A list of the calendar entities. + items: + $ref: '#/components/schemas/AvailabilityCalendar' + example: |- + { + "TransactionId": "f06edfa3-27f4-44e6-838c-b8dd3d0a3210", + "AvailabilityCalendars": [ + { + "PropertyId": "74041788", + "DateRange": { + "StartDate": "2022-02-25", + "EndDate": "2025-02-24" + }, + "Availability":"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", + "ChangeOver": "OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "MinStay": "3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3", + "MaxStay": "379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,731,730,729,728,727,726,725,724,723,722,721,720,719,718,717,716,715,714,713,712,711,710,709,708,707,706,705,704,703,702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,539,538,537,536,535,534,533,532,531,530,529,528,527,526,525,524,523,522,521,520,519,518,517,516,515,514,513,512,511,510,509,508,507,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,450,449,448,447,446,445,444,443,442,441,440,439,438,437,436,435,434,433,432,431,430,429,428,427,426,425,424,423,422,421,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,399,398,397,396,395,394,393,392,391,390,389,388,387,386,385,384,383,382,381,380,379,378,377,376,375,374,373,372,371,370,369,368,367,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", + "MinPriorNotify": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" + }, + { + "PropertyId": "1", + "DateRange": { + "StartDate": "2022-02-27", + "EndDate": "2023-11-04" + }, + "Availability": "NNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" + }, + { + "PropertyId": "123", + "DateRange": { + "StartDate": "2022-02-27", + "EndDate": "2023-11-04" + }, + "Availability": "NNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", + "ChangeOver": "XXXXXXIIICCCCCCCCCCCCCCCCCCCCXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOXXXXXIIICCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCXXXXXXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOO", + "MinStay": "0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,7,6,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,5,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,9,8,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0", + "MaxStay": "0,0,0,0,0,0,21,21,20,19,18,17,16,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,20,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,0,0,0,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,20,19,18,17,16,15,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,0,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,0,0,0", + "MinPriorNotify": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" + } + ] + } + securitySchemes: + Authorization: + type: http + scheme: basic diff --git a/specs/xap-sdp-v1.specs.yaml b/specs/xap-sdp-v1.specs.yaml new file mode 100644 index 000000000..d53498ad8 --- /dev/null +++ b/specs/xap-sdp-v1.specs.yaml @@ -0,0 +1,392 @@ +openapi: 3.0.1 +info: + title: EWS-Feed-Service APIs specification + version: v1 + description: OpenAPI Spec for EWS Feed Service APIs + contact: + name: Partner APIs + url: https://confluence.expedia.biz/display/EWS/EWS-feed-service + email: skywalker@expedia.com + x-eg-lifecycle: LIVE + x-eg-tags: ["ews", "feeds", "presignedurl", "downloadurl", "sdp", "staticInfo"] +servers: + - url: 'https://apim.expedia.com' + description: Production Server +paths: + /feed/v1/download-url: + get: + tags: + - download-url + operationId: get-feed-download-url + description: >- + Get the Download URL and other details of the static files. + parameters: + - name: Key + in: header + description: >- + Indicates a unique identifier assigned to every user of this API. + This attribute will help uniquely identify the caller. + required: true + deprecated: false + schema: + type: string + example: X99X9X9-99XX-9XX9-X999-99XX99X9X999 + - name: type + in: query + description: >- + The type of file, used to get files by type. + deprecated: false + required: true + schema: + type: string + enum: + - DESTINATION + - VENDORLOGO + - SUMMARY + - LISTINGS + - IMAGES + - AMENITIES + - LOCATIONS + - DESCRIPTIONS + - POLICIES + - GUEST_REVIEW + - VACATION_RENTAL + - ALL_REGIONS + - BOUNDING_POLYGON + - HOTEL_TO_REGION_HIERARCHY + - ROOM_DETAILS + example: SUMMARY + - name: locale + in: query + description: >- + Follow ISO-3166 Country Codes and ISO-639 Language Codes, format: "{LanguageCode}-{CountryCode}".Support multiple values, for the feed files that support localization, Use this parameter to help filter out the localization files you want to download. If not using this parameter, then this API will return all locales files for specified type. If the specified type of file is not supported localization, there is no file will be returned. + deprecated: false + required: false + schema: + type: string + example: en-US + - name: pointOfSupply + in: query + description: >- + The point of supply means a country generally. The downloadable files provided after specifying will only contain properties' information for that country. + deprecated: false + required: false + schema: + type: string + enum: + - US + - AT + - BR + - CA + - FR + - DE + - GR + - IT + - JA + - KR + - MX + - PT + - ES + - TR + - AE + - GB + example: AT + - name: lodgingType + in: query + description: >- + The lodging type also means structure type, it only can be `CL`(Conventional Lodging) and `VR`(Vacation Rental). The downloadable files provided after specifying will only contain property information for that lodging type. + deprecated: false + required: false + schema: + type: string + enum: + - CL + - VR + example: CL + - name: brand + in: query + description: >- + The downloadable files provided after specifying will only contain property information for that brand. + deprecated: false + required: false + schema: + type: string + enum: + - VRBO + responses: + '200': + content: + application/vnd.exp-lodging.v1+json: + schema: + $ref: '#/components/schemas/PresignedUrlResponse' + examples: + SDP-Summary: + value: + transactionId: c12dcd5d-4d05-42ed-8119-0e97e11f7deb + bestMatchedFile: + fileContentType: Summary + locale: de-DE + fileName: expedia-lodging-summary-en_us-all.jsonl.zip + fileSize: + unit: MB + value: 198.12 + fileLastUpdated: Tue Mar 28 08:38:14 UTC 2023 + downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/expedia-lodging-summary-en_us-all.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=58714cc22181faea3243d689741ba0e7f1a43ae8cab172984778ca5f8b963f1f + downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 + otherFileOptions: + - fileContentType: Summary + locale: en-US + fileName: expedia-lodging-summary_filtered_by_canada_en_us.jsonl.zip + fileSize: + unit: MB + value: 18.12 + fileLastUpdated: Tue Mar 28 06:37:36 UTC 2023 + downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/filtered/expedia-lodging-summary_filtered_by_canada_en_us.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=ac4389b81d4b9e6563fd234b16dafceaab5fcbe2931454da2fe9956b1e3f5919 + filterConditions: + pointOfSupply: CA + bestMatchedLink: + href: https://localhost:8443/feed/v1/download-url?type=SUMMARY&pointOfSupply=CA + method: GET + - fileContentType: Summary + locale: en-US + fileName: expedia-lodging-summary_filtered_by_conventional_en_us.jsonl.zip + fileSize: + unit: MB + value: 98.12 + fileLastUpdated: Tue Mar 28 06:38:11 UTC 2023 + downloadUrl: https://lpdp-data-test.s3.us-west-2.amazonaws.com/hotels/common/summary/filtered/expedia-lodging-summary_filtered_by_conventional_en_us.jsonl.zip?X-Client-Key=DD0CFD5B-4CE6-474C-934C-C2ABC250D72B&X-Amz-Security-Token=FwoGZXIvYXdzEJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDDgCq3hfh2uzzkVrdiL0AbJ2Mr51BioDJbfW66%2F7QGFKQ5PPAcq3TprAoBGMBJVeafZ%2BvsrkKOdAUrxDGnheLNwmRBlE%2B2HS7f3pK6rE3XnnY6rEJKLe1EE2DmmNe3qIarJVVogurZumYcZ9SDPBvWwX4IGsNolFS5Qu8vtyur93xqg5%2BHnoPxLEJsP1yztRMGAiWKz9O1V79C6ZiFI5HtVOt4jYXSXdvtPKz9E6DA0ebXTpbAsm4T8PIvl30I5nNBdesXv8ap4Uie2fE6ALtUgWyJrKs%2Fy333aT6iV8Kau%2BNX3V3NW3LHh7rECgTtr5nySSxMJ2UFfQx8w7e9K8aAm098covbOPoQYyK5UIm%2BjPE%2FMbJqmroHqhzbKwbn7JFK5NnkXRmpPuGxn%2Bxmt%2Fe8Bg327adJ0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230329T063549Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=ASIASWURL3BTL5JH6TPD%2F20230329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=9364ec533e909c2cb3331f16a449feee41a968492e61bcdd5761e56e7bbad73a + downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 + filterConditions: + structureType: CONVENTIONAL + bestMatchedLink: + href: https://localhost:8443/feed/v1/download-url?type=SUMMARY&loadgingType=CL + method: GET + VendorLogo: + value: + transactionId: c12dcd5d-4d05-42ed-8119-0e97e11f7deb + bestMatchedFile: + fileName: VendorLogos.json + fileSize: + unit: MB + value: 1.32 + fileLastUpdated: Tue Mar 28 06:38:11 UTC 2023 + downloadUrl: https://ews-generated-feeds-prod-p.s3.us-west-2.amazonaws.com/vendor-logos/VendorLogos.json?response-content-disposition=inline&X-Amz-Security-Token=XXX + downloadUrlExpires: Wed Mar 29 07:35:49 UTC 2023 + description: Download URLs successfully generated for the feed files. + '400': + content: + application/vnd.exp-lodging.v1+json: + schema: + $ref: '#/components/schemas/PresignedUrlResponse' + example: + transactionId: 38dc7269-12b1-58c9-a381-4963c274cdfe + error: + code: INVALID_TYPE_ATTR + description: Invalid type provided. + description: Invalid request from the client. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + unauthorized: + value: + message: Unauthorized + Invalid authentication credentials: + value: + message: Invalid authentication credentials + description: Unauthorized or Invalid authentication credentials. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + cannot consume this service: + value: + message: You cannot consume this service + description: Cannot consume this service. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + no Route matched: + value: + message: no Route matched with those values + description: No Route matched. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + API rate limit exceeded: + value: + message: API rate limit exceeded + description: API rate limit exceeded. + '500': + content: + application/vnd.exp-lodging.v1+json: + schema: + $ref: '#/components/schemas/PresignedUrlResponse' + example: + transactionId: 38dc7269-12b1-58c9-a381-4963c274cdfe + error: + code: SERVER_ERROR + description: An error has occurred while processing the request. + description: >- + Server side error like backend service has some issues or some + issues in EWS Feed service. The Error code is SERVER_ERROR. + '503': + content: + application/json: + schema: + $ref: '#/components/schemas/APIMError' + examples: + service unavailable: + value: + message: name resolution failed + description: Service unavailable. +components: + schemas: + PresignedUrlResponse: + type: object + properties: + transactionId: + type: string + description: Unique identifier for each API response. + error: + $ref: '#/components/schemas/Fault' + warning: + $ref: '#/components/schemas/Fault' + bestMatchedFile: + $ref: '#/components/schemas/FileInfo' + otherFileOptions: + type: array + items: + $ref: '#/components/schemas/FileInfo' + description: >- + Container for file Pre-signed download URL and informations. + FileInfo: + type: object + properties: + partner: + nullable: true + type: string + description: >- + The partner associated with the file. List of partners: `Bing`, + `Criteo`, `Facebook`, `Google`, `Retarget`, `Snapchat`. + brand: + nullable: true + type: string + description: >- + The brand associated with the file content. List of brand: + `Expedia`, `Hotels`, `Hotwire`, `Vrbo`, `HomeAway`, `Abritel`, + `Bookabach`, `Stayz`, `Ebbokers`, `Travalocity`, `Orbitz`, `Wotif`. + fileContentType: + nullable: true + type: string + description: >- + The type associated with the file content. List of types: + `Amenities`, `Descriptions`, `Images`, `Listings`, `Locations`, + `Policies`, `Regions`, `Reviews`, `Summary`, `VacationRental` + locale: + nullable: true + type: string + description: The locale associated with the file content. + fileName: + type: string + description: File name. + size: + $ref: '#/components/schemas/FileSize' + fileLastUpdated: + type: string + description: >- + The time about the file last updated. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX + downloadUrl: + type: string + description: >- + Pre-signed URL is a self signed URL generated for a resource in S3 + with a set expiration time. + downloadUrlExpires: + type: string + description: >- + The time about the download Url expires. The format is uuuu-MM-dd'T'HH:mm:ss.SSSX + filterConditions: + $ref: '#/components/schemas/FilterConditions' + bestMatchedLink: + $ref: '#/components/schemas/Link' + Fault: + type: object + description: API returned information. + properties: + code: + type: string + description: Fault code. + description: + type: string + description: Fault description. + FileSize: + type: object + description: The information about the file size. + properties: + unit: + type: string + enum: + - KB + - MB + - GB + description: The unit about the file size. + value: + type: integer + format: int64 + description: The value about the file size. + FilterConditions: + nullable: true + type: object + description: Container filter condition for the filtered file. [Filters](https://confluence.expedia.biz/display/EWS/Filtered+Feed+File+Generation+Schedule+and+Access#FilteredFeedFileGenerationScheduleandAccess-Filters) + properties: + pointOfSupply: + type: string + description: >- + List of filter condition for PointOfSupplies: `US`, + `AT`,`BR`,`CA`,`FR`,`DE`,`GR`,`IT`, + `JP`,`KR`,`MX`,`PT`,`ES`,`TR`, + `AE`,`GB`. + brand: + type: string + description: >- + List of filter condition for Brands: `VRBO`. + structureType: + type: string + description: >- + List of filter condition for StructureTypes: `VR`, `CONVENTIONAL`. + Link: + nullable: true + type: object + description: Contains link information, including link address, request method. Only provided if FileInfo is in OtherFileOptions. + properties: + href: + type: string + description: a link address. + method: + type: string + description: Request method, it will support `GET`, `POST`, `DELETE` and `PUT` etc... + APIMError: + type: object + description: Error from the APIM. + properties: + message: + type: string + description: Error from the APIM. + securitySchemes: + BasicAuth: + type: http + scheme: basic +security: + - BasicAuth: [] +tags: + - name: download-url diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index 6d97ca939..db533c357 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - kotlin("jvm") + kotlin("jvm") version "2.1.10" id("java") id("signing") id("maven-publish") @@ -69,24 +69,6 @@ signing { sign(publishing.publications) } -group = "com.expediagroup.sdk" -version = "1.0.0-SNAPSHOT" - - -//nexusPublishing { -// repositories { -// sonatype { -// username.set(System.getenv("SONATYPE_USERNAME")) -// password.set(System.getenv("SONATYPE_PASSWORD")) -// } -// } -// -// transitionCheckOptions { -// maxRetries.set(60) -// delayBetween.set(Duration.ofMillis(5000)) -// } -//} - dependencies { testImplementation(kotlin("test")) api("com.expediagroup:expediagroup-sdk-rest:0.0.1-beta-SNAPSHOT") From 9b39279cb5a8c579af3c0b1ddfc379ff558fdea4 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sat, 22 Mar 2025 01:25:52 +0300 Subject: [PATCH 09/40] chore: refactor build scripts and add prepareSpecs task --- build.gradle.kts | 8 +------- generator/build.gradle.kts | 6 +++--- gradle-tasks/specs.gradle.kts | 11 +++++++++++ settings.gradle.kts | 1 - xap-sdk/build.gradle.kts | 7 ++++--- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 242743660..5b5ef4153 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ -import java.time.Duration import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import java.time.Duration plugins { kotlin("jvm") version "2.1.10" @@ -63,10 +63,4 @@ kotlin { jvmToolchain(21) } -tasks.register("prepareSpecs") { - dependsOn("mergeSpecs", "transformSpecs") - - File("$rootDir", "specs/specs.yaml") -} - apply("gradle-tasks/specs.gradle.kts") diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index 9f7f9bdc7..d7610fe1a 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -1,5 +1,5 @@ import org.openapitools.codegen.CodegenConstants -import com.expediagroup.sdk.xap.generator.mustache.AllowedMediaTypesLambda +// import com.expediagroup.sdk.xap.generator.mustache.AllowedMediaTypesLambda plugins { `kotlin-dsl` @@ -43,8 +43,8 @@ openApiGenerate { configFile = "$projectDir/src/main/resources/generator-config.yaml" outputDir = "$rootDir/xap-sdk/src/main/kotlin" - additionalProperties.put(CodegenConstants.ENUM_PROPERTY_NAMING, "UPPERCASE") - additionalProperties.put("allowedMediaTypes", AllowedMediaTypesLambda()) + additionalProperties.put(CodegenConstants.ENUM_PROPERTY_NAMING.toString(), "UPPERCASE") +// additionalProperties.put("allowedMediaTypes", AllowedMediaTypesLambda()) configOptions.put("sourceFolder", "") diff --git a/gradle-tasks/specs.gradle.kts b/gradle-tasks/specs.gradle.kts index 82c8083a3..6b16f260c 100644 --- a/gradle-tasks/specs.gradle.kts +++ b/gradle-tasks/specs.gradle.kts @@ -13,7 +13,18 @@ tasks.register("transformSpecs") { exec { commandLine( "npx --yes -p @expediagroup/spec-transformer cli --headers --operationIdsToTags -i specs.yaml -o specs.yaml" + .split(" ") ) workingDir = File(rootDir, "specs") } } + +tasks.register("prepareSpecs") { + dependsOn("mergeSpecs", "transformSpecs") + + doLast { + File("$rootDir", "specs/specs.yaml").copyTo( + File("$rootDir", "generator/src/main/resources/specs-copied.yaml"), + ) + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 1e1c0e7cf..0fa5ec081 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,7 +8,6 @@ pluginManagement { } } - plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index db533c357..fcbb13959 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -118,9 +118,10 @@ gradle.taskGraph.whenReady { } tasks.register("publishSnapshots") { - val snapshotModules = rootProject.subprojects.filter { project -> - project.version.toString().contains("-SNAPSHOT") && project.tasks.names.contains("publish") - } + val snapshotModules = + rootProject.subprojects.filter { project -> + project.version.toString().contains("-SNAPSHOT") && project.tasks.names.contains("publish") + } if (snapshotModules.isNotEmpty()) { dependsOn(snapshotModules.map { ":${it.name}:publish" }) From f451438dd7730644e5ad6ad6c4764a760ed85fca Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sat, 22 Mar 2025 23:26:50 +0300 Subject: [PATCH 10/40] chore: update build configuration and add publishing tasks --- .github/workflows/generate-publish-sdk.yaml | 26 +++++--- build.gradle.kts | 6 +- generator/build.gradle.kts | 6 +- gradle-tasks/publish.gradle.kts | 44 +++++++++++++ gradle-tasks/signing.gradle.kts | 9 +++ gradle-tasks/snapshot.gradle.kts | 23 +++++++ xap-sdk/build.gradle.kts | 70 +++------------------ 7 files changed, 110 insertions(+), 74 deletions(-) create mode 100644 gradle-tasks/publish.gradle.kts create mode 100644 gradle-tasks/signing.gradle.kts create mode 100644 gradle-tasks/snapshot.gradle.kts diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index 2cfc2bcd9..c63e08729 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -11,8 +11,13 @@ jobs: - name: Set Up JDK uses: actions/setup-java@v3 with: - distribution: 'temurin' - java-version: '17' + distribution: 'corretto' + java-version: '21' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + with: + gradle-version: "8.13" - name: Install Post Processor working-directory: generator/src/main/resources/post-processor @@ -22,12 +27,13 @@ jobs: working-directory: generator run: | export KOTLIN_POST_PROCESS_FILE="npm run --prefix src/main/resources/post-processor process" - + gradle openApiGenerate - - name: Publish Snapshots - env: - GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} - GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - run: ./gradlew publishSnapshots +# - name: Publish Snapshots +# working-directory: xap-sdk +# env: +# GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} +# GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }} +# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} +# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} +# run: gradle publishSnapshots diff --git a/build.gradle.kts b/build.gradle.kts index 5b5ef4153..545cf7e5f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,12 +3,14 @@ import java.time.Duration plugins { kotlin("jvm") version "2.1.10" + id("signing") + id("maven-publish") id("org.jlleitschuh.gradle.ktlint") version "12.1.2" id("io.github.gradle-nexus.publish-plugin") version "2.0.0" } group = "com.expediagroup.sdk" -version = "1.0-SNAPSHOT" +version = "1.0.0-SNAPSHOT" repositories { mavenCentral() @@ -19,6 +21,8 @@ repositories { } subprojects { + apply(plugin = "signing") + apply(plugin = "maven-publish") apply(plugin = "org.jlleitschuh.gradle.ktlint") apply(plugin = "org.jetbrains.kotlin.jvm") diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index d7610fe1a..592e1b386 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -1,5 +1,5 @@ +import com.expediagroup.sdk.xap.generator.mustache.AllowedMediaTypesLambda import org.openapitools.codegen.CodegenConstants -// import com.expediagroup.sdk.xap.generator.mustache.AllowedMediaTypesLambda plugins { `kotlin-dsl` @@ -43,8 +43,8 @@ openApiGenerate { configFile = "$projectDir/src/main/resources/generator-config.yaml" outputDir = "$rootDir/xap-sdk/src/main/kotlin" - additionalProperties.put(CodegenConstants.ENUM_PROPERTY_NAMING.toString(), "UPPERCASE") -// additionalProperties.put("allowedMediaTypes", AllowedMediaTypesLambda()) + additionalProperties.put(CodegenConstants.ENUM_PROPERTY_NAMING, "UPPERCASE") + additionalProperties.put("allowedMediaTypes", AllowedMediaTypesLambda()) configOptions.put("sourceFolder", "") diff --git a/gradle-tasks/publish.gradle.kts b/gradle-tasks/publish.gradle.kts new file mode 100644 index 000000000..555f4ff5c --- /dev/null +++ b/gradle-tasks/publish.gradle.kts @@ -0,0 +1,44 @@ +project.extensions.configure { + publications { + create("mavenJava") { + from(components["java"]) + artifactId = project.property("ARTIFACT_NAME") as String + groupId = project.property("GROUP_ID") as String + version = if (project.findProperty("SNAPSHOT_VERSION") != null) { + project.findProperty("SNAPSHOT_VERSION") as String + } else { + project.property("VERSION") as String + } + description = project.findProperty("DESCRIPTION") as String? + + pom { + name.set(project.property("ARTIFACT_NAME") as String) + description.set(project.findProperty("DESCRIPTION") as String?) + url.set(project.property("POM_URL") as String) + + licenses { + license { + name.set(project.property("LICENSE_NAME") as String) + url.set(project.property("LICENSE_URL") as String) + distribution.set(project.property("LICENSE_DISTRIBUTION") as String) + comments.set(project.property("LICENSE_COMMENTS") as String) + } + } + + developers { + developer { + name.set(project.property("DEVELOPER_NAME") as String) + organization.set(project.property("DEVELOPER_ORG") as String) + organizationUrl.set(project.property("DEVELOPER_ORG_URL") as String) + } + } + + scm { + url.set(project.property("POM_SCM_URL") as String) + connection.set(project.property("POM_SCM_CONNECTION") as String) + developerConnection.set(project.property("POM_SCM_DEVELOPER_CONNECTION") as String) + } + } + } + } +} diff --git a/gradle-tasks/signing.gradle.kts b/gradle-tasks/signing.gradle.kts new file mode 100644 index 000000000..f388425f4 --- /dev/null +++ b/gradle-tasks/signing.gradle.kts @@ -0,0 +1,9 @@ +extensions.configure { + val signingKey = System.getenv("GPG_SECRET") + val signingPassword = System.getenv("GPG_PASSPHRASE") + + useInMemoryPgpKeys(signingKey, signingPassword) + + val publishing = project.extensions.getByType() + sign(publishing.publications) +} diff --git a/gradle-tasks/snapshot.gradle.kts b/gradle-tasks/snapshot.gradle.kts new file mode 100644 index 000000000..135fe1922 --- /dev/null +++ b/gradle-tasks/snapshot.gradle.kts @@ -0,0 +1,23 @@ +tasks.register("publishSnapshot") { + val artifactId = project.property("ARTIFACT_NAME") as String + val version = if (project.findProperty("SNAPSHOT_VERSION") != null) { + project.findProperty("SNAPSHOT_VERSION") as String + } else { + project.property("VERSION") as String + } + + require(project.tasks.names.contains("publish")) { + "Publish task must be present to publish a $artifactId snapshot" + } + + require(project.version.toString().contains("-SNAPSHOT")) { + "$artifactId version must contain -SNAPSHOT to publish snapshots." + } + + dependsOn("${project.name}:publish") + doLast { + val url = "https://oss.sonatype.org/content/repositories/snapshots/com/expediagroup/$artifactId/$version/" + println("📦 Successfully published $artifactId:$version snapshot.") + println("🌱 Snapshot available at: $url") + } +} diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index fcbb13959..a50ad9335 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -15,59 +15,6 @@ repositories { } } -publishing { - publications { - create("mavenJava") { - from(components["java"]) - artifactId = project.property("ARTIFACT_NAME").toString() - groupId = project.property("GROUP_ID").toString() - version = - if (project.hasProperty("SNAPSHOT_VERSION")) { - project.property("SNAPSHOT_VERSION").toString() - } else { - project.property("VERSION").toString() - } - description = project.findProperty("DESCRIPTION")?.toString() - - pom { - name.set(project.property("ARTIFACT_NAME").toString()) - description.set(project.findProperty("DESCRIPTION")?.toString()) - url.set(project.property("POM_URL").toString()) - - licenses { - license { - name.set(project.property("LICENSE_NAME").toString()) - url.set(project.property("LICENSE_URL").toString()) - distribution.set(project.property("LICENSE_DISTRIBUTION").toString()) - comments.set(project.property("LICENSE_COMMENTS").toString()) - } - } - - developers { - developer { - name.set(project.property("DEVELOPER_NAME").toString()) - organization.set(project.property("DEVELOPER_ORG").toString()) - organizationUrl.set(project.property("DEVELOPER_ORG_URL").toString()) - } - } - - scm { - url.set(project.property("POM_SCM_URL").toString()) - connection.set(project.property("POM_SCM_CONNECTION").toString()) - developerConnection.set(project.property("POM_SCM_DEVELOPER_CONNECTION").toString()) - } - } - } - } -} - -signing { - val signingKey = System.getenv("GPG_SECRET") - val signingPassword = System.getenv("GPG_PASSPHRASE") - - useInMemoryPgpKeys(signingKey, signingPassword) - sign(publishing.publications) -} dependencies { testImplementation(kotlin("test")) @@ -110,13 +57,6 @@ ktlint { ) } -gradle.taskGraph.whenReady { - if (hasTask(":publishSnapshots")) { - rootProject.version = "1.0.0-SNAPSHOT" - println("📌 Setting root project version to 1.0.0-SNAPSHOT for publishSnapshots task") - } -} - tasks.register("publishSnapshots") { val snapshotModules = rootProject.subprojects.filter { project -> @@ -135,3 +75,13 @@ tasks.register("publishSnapshots") { } } } + +apply("$rootDir/gradle-tasks/publish.gradle.kts") +apply("$rootDir/gradle-tasks/signing.gradle.kts") +apply("$rootDir/gradle-tasks/snapshot.gradle.kts") +tasks.register("testVersion") { + println("Version: ${project.version}") + println(project.version) + println("Version: ${project.property("VERSION")}") + println("Version: ${project.findProperty("SNAPSHOT_VERSION")}") +} From 694cf4fe212c9539ff6e71c213af2bfc2e864b02 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sat, 22 Mar 2025 23:29:41 +0300 Subject: [PATCH 11/40] chore: update build configuration and add publishing tasks --- .github/workflows/generate-publish-sdk.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index c63e08729..960825cf6 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -23,6 +23,9 @@ jobs: working-directory: generator/src/main/resources/post-processor run: npm ci && npm run clean && npm run compile + - name: Build Project + run: gradle build + - name: Generate SDK working-directory: generator run: | From 458ba012afd400bfbd68197a7b83fba81e487586 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sat, 22 Mar 2025 23:36:09 +0300 Subject: [PATCH 12/40] chore: add build gradle kts for kotlin dsl and dependencies --- buildSrc/build.gradle.kts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 buildSrc/build.gradle.kts diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 000000000..26bd73184 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,15 @@ +repositories { + mavenCentral() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + } +} + +plugins { + `kotlin-dsl` +} + +dependencies { + api("org.openapitools:openapi-generator:7.11.0") + implementation("com.samskivert:jmustache:1.15") +} From afb1bae2962575f9ea9d4c4987c84c049dbd7a05 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sat, 22 Mar 2025 23:55:05 +0300 Subject: [PATCH 13/40] chore: update build configuration and add publishing tasks --- generator/build.gradle.kts | 11 ++ xap-sdk/build.gradle.kts | 7 - .../models/ActivitiesCancellationPolicy.kt | 6 +- .../sdk/xap/models/AvailableTimeSlot.kt | 6 +- .../sdk/xap/models/CarsCancellationPolicy.kt | 6 +- .../xap/models/NonCancellableDateTimeRange.kt | 12 +- .../sdk/xap/models/PenaltyRule.kt | 12 +- .../sdk/xap/models/VendorLocationDetails.kt | 6 +- .../GetCarsListingsOperationParams.kt | 12 +- .../GetLodgingListingsOperationParams.kt | 143 +++++++++++++----- .../GetLodgingQuotesOperationParams.kt | 143 +++++++++++++----- 11 files changed, 247 insertions(+), 117 deletions(-) diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index 592e1b386..0b1e8ced1 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -50,3 +50,14 @@ openApiGenerate { globalProperties.put("supportingFiles", "Room.kt") } + +tasks.named("openApiGenerate").configure { + doLast { + exec { + commandLine( + "../gradlew ktlintFormat".split(" ") + ) + workingDir = File("$rootDir/xap-sdk").absoluteFile + } + } +} diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index a50ad9335..fd197fc60 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -15,7 +15,6 @@ repositories { } } - dependencies { testImplementation(kotlin("test")) api("com.expediagroup:expediagroup-sdk-rest:0.0.1-beta-SNAPSHOT") @@ -79,9 +78,3 @@ tasks.register("publishSnapshots") { apply("$rootDir/gradle-tasks/publish.gradle.kts") apply("$rootDir/gradle-tasks/signing.gradle.kts") apply("$rootDir/gradle-tasks/snapshot.gradle.kts") -tasks.register("testVersion") { - println("Version: ${project.version}") - println(project.version) - println("Version: ${project.property("VERSION")}") - println("Version: ${project.findProperty("SNAPSHOT_VERSION")}") -} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt index 6871c127b..3ab91d823 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt @@ -36,7 +36,7 @@ data class ActivitiesCancellationPolicy( val freeCancellationMinHours: kotlin.Int? = null, // The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. @JsonProperty("FreeCancellationEndDateTime") - val freeCancellationEndDateTime: java.time.LocalDateTime? = null, + val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, ) { init { require(freeCancellation != null) { "freeCancellation must not be null" } @@ -51,7 +51,7 @@ data class ActivitiesCancellationPolicy( private var freeCancellation: kotlin.Boolean? = null, private var cancelPolicyDescription: kotlin.String? = null, private var freeCancellationMinHours: kotlin.Int? = null, - private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, + private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, ) { fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } @@ -59,7 +59,7 @@ data class ActivitiesCancellationPolicy( fun freeCancellationMinHours(freeCancellationMinHours: kotlin.Int?) = apply { this.freeCancellationMinHours = freeCancellationMinHours } - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } fun build(): ActivitiesCancellationPolicy { val instance = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt index 70a55cf16..723e4ae88 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt @@ -29,7 +29,7 @@ import com.fasterxml.jackson.annotation.JsonProperty data class AvailableTimeSlot( // The date and time when the activity happens. @JsonProperty("DateTime") - val dateTime: java.time.LocalDateTime, + val dateTime: java.time.OffsetDateTime, // Indicates whether the activity is an all-day activity. @JsonProperty("AllDayActivity") val allDayActivity: kotlin.Boolean, @@ -58,12 +58,12 @@ data class AvailableTimeSlot( } class Builder( - private var dateTime: java.time.LocalDateTime? = null, + private var dateTime: java.time.OffsetDateTime? = null, private var allDayActivity: kotlin.Boolean? = null, private var cancellationPolicy: ActivitiesCancellationPolicy? = null, private var tickets: kotlin.collections.List? = null, ) { - fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } + fun dateTime(dateTime: java.time.OffsetDateTime) = apply { this.dateTime = dateTime } fun allDayActivity(allDayActivity: kotlin.Boolean) = apply { this.allDayActivity = allDayActivity } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt index 8612c6a72..94d6db249 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt @@ -36,7 +36,7 @@ data class CarsCancellationPolicy( val freeCancellation: kotlin.Boolean? = null, // Indicates the latest time that the car can be cancelled for free. @JsonProperty("FreeCancellationEndDateTime") - val freeCancellationEndDateTime: java.time.LocalDateTime? = null, + val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, // Container for penalty rules @JsonProperty("PenaltyRules") val penaltyRules: kotlin.collections.List? = null, @@ -54,7 +54,7 @@ data class CarsCancellationPolicy( class Builder( private var cancellable: kotlin.Boolean? = null, private var freeCancellation: kotlin.Boolean? = null, - private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, + private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, private var penaltyRules: kotlin.collections.List? = null, private var nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null, ) { @@ -62,7 +62,7 @@ data class CarsCancellationPolicy( fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } fun penaltyRules(penaltyRules: kotlin.collections.List?) = apply { this.penaltyRules = penaltyRules } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt index 605c5401a..0fb4cc91a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt @@ -25,10 +25,10 @@ import com.fasterxml.jackson.annotation.JsonProperty data class NonCancellableDateTimeRange( // The time of this non-cancellable window starts @JsonProperty("StartDateTime") - val startDateTime: java.time.LocalDateTime, + val startDateTime: java.time.OffsetDateTime, // The time of this non-cancellable window ends @JsonProperty("EndDateTime") - val endDateTime: java.time.LocalDateTime, + val endDateTime: java.time.OffsetDateTime, ) { init { require(startDateTime != null) { "startDateTime must not be null" } @@ -42,12 +42,12 @@ data class NonCancellableDateTimeRange( } class Builder( - private var startDateTime: java.time.LocalDateTime? = null, - private var endDateTime: java.time.LocalDateTime? = null, + private var startDateTime: java.time.OffsetDateTime? = null, + private var endDateTime: java.time.OffsetDateTime? = null, ) { - fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } + fun startDateTime(startDateTime: java.time.OffsetDateTime) = apply { this.startDateTime = startDateTime } - fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } + fun endDateTime(endDateTime: java.time.OffsetDateTime) = apply { this.endDateTime = endDateTime } fun build(): NonCancellableDateTimeRange { val instance = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt index 8323846fb..ab859fa84 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt @@ -29,10 +29,10 @@ data class PenaltyRule( val penalty: PenaltyType, // The time when this penalty window starts @JsonProperty("StartDateTime") - val startDateTime: java.time.LocalDateTime, + val startDateTime: java.time.OffsetDateTime, // The time when this penalty window ends @JsonProperty("EndDateTime") - val endDateTime: java.time.LocalDateTime, + val endDateTime: java.time.OffsetDateTime, ) { init { require(penalty != null) { "penalty must not be null" } @@ -49,14 +49,14 @@ data class PenaltyRule( class Builder( private var penalty: PenaltyType? = null, - private var startDateTime: java.time.LocalDateTime? = null, - private var endDateTime: java.time.LocalDateTime? = null, + private var startDateTime: java.time.OffsetDateTime? = null, + private var endDateTime: java.time.OffsetDateTime? = null, ) { fun penalty(penalty: PenaltyType) = apply { this.penalty = penalty } - fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } + fun startDateTime(startDateTime: java.time.OffsetDateTime) = apply { this.startDateTime = startDateTime } - fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } + fun endDateTime(endDateTime: java.time.OffsetDateTime) = apply { this.endDateTime = endDateTime } fun build(): PenaltyRule { val instance = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt index 98a6da5ee..151fcb924 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt @@ -31,7 +31,7 @@ import com.fasterxml.jackson.annotation.JsonProperty data class VendorLocationDetails( // Pickup date and time. @JsonProperty("DateTime") - val dateTime: java.time.LocalDateTime, + val dateTime: java.time.OffsetDateTime, @JsonProperty("Location") val location: CarsLocation, // The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. @@ -55,13 +55,13 @@ data class VendorLocationDetails( } class Builder( - private var dateTime: java.time.LocalDateTime? = null, + private var dateTime: java.time.OffsetDateTime? = null, private var location: CarsLocation? = null, private var shuttleCategory: kotlin.String? = null, private var distance: CarsDistance? = null, private var openSchedule: kotlin.collections.List? = null, ) { - fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } + fun dateTime(dateTime: java.time.OffsetDateTime) = apply { this.dateTime = dateTime } fun location(location: CarsLocation) = apply { this.location = location } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt index 6494b3e79..cdc10c257 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt @@ -60,8 +60,8 @@ data class GetCarsListingsOperationParams( null, val dropOffRadius: kotlin.Int? = null, - val pickupTime: java.time.LocalDateTime, - val dropOffTime: java.time.LocalDateTime, + val pickupTime: java.time.OffsetDateTime, + val dropOffTime: java.time.OffsetDateTime, val sortType: GetCarsListingsOperationParams.SortType? = null, val sortOrder: GetCarsListingsOperationParams.SortOrder? = @@ -171,8 +171,8 @@ data class GetCarsListingsOperationParams( @JsonProperty("dropOff.address") private var dropOffAddress: kotlin.String? = null, @JsonProperty("dropOff.geoLocation") private var dropOffGeoLocation: kotlin.String? = null, @JsonProperty("dropOff.radius") private var dropOffRadius: kotlin.Int? = null, - @JsonProperty("pickupTime") private var pickupTime: java.time.LocalDateTime? = null, - @JsonProperty("dropOffTime") private var dropOffTime: java.time.LocalDateTime? = null, + @JsonProperty("pickupTime") private var pickupTime: java.time.OffsetDateTime? = null, + @JsonProperty("dropOffTime") private var dropOffTime: java.time.OffsetDateTime? = null, @JsonProperty("sortType") private var sortType: GetCarsListingsOperationParams.SortType? = null, @JsonProperty("sortOrder") private var sortOrder: GetCarsListingsOperationParams.SortOrder? = null, @JsonProperty("limit") private var limit: kotlin.Int? = null, @@ -257,12 +257,12 @@ data class GetCarsListingsOperationParams( /** * @param pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) */ - fun pickupTime(pickupTime: java.time.LocalDateTime) = apply { this.pickupTime = pickupTime } + fun pickupTime(pickupTime: java.time.OffsetDateTime) = apply { this.pickupTime = pickupTime } /** * @param dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. */ - fun dropOffTime(dropOffTime: java.time.LocalDateTime) = apply { this.dropOffTime = dropOffTime } + fun dropOffTime(dropOffTime: java.time.OffsetDateTime) = apply { this.dropOffTime = dropOffTime } /** * @param sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt index aa7a37249..df9864a77 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt @@ -614,54 +614,117 @@ data class GetLodgingListingsOperationParams( */ fun sortOrder(sortOrder: GetLodgingListingsOperationParams.SortOrder) = apply { this.sortOrder = sortOrder } - fun rooms(rooms: List) = - apply { - if (rooms.size > 8) { - throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( - constraintViolations = listOf("rooms: size must be between 0 and 8"), - ) - } + /** + * @param room1Adults Specifies the number of adults staying in a specific room. Default value is one room with 2 adults. Example: `room1.adults` is used to specify the number of adults in the first room. + */ + fun room1Adults(room1Adults: kotlin.Long) = apply { this.room1Adults = room1Adults } - rooms.elementAtOrNull(0)?.let { - this.room1Adults = it.adults - this.room1ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room1ChildAges Comma-separated list that specifies the age(s) for each of the children in each of the rooms. Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. Children must be accompanied by an adult. + */ + fun room1ChildAges( + room1ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room1ChildAges = room1ChildAges } - rooms.elementAtOrNull(1)?.let { - this.room2Adults = it.adults - this.room2ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room2Adults Specifies the number of adults staying in second room. + */ + fun room2Adults(room2Adults: kotlin.Long) = apply { this.room2Adults = room2Adults } - rooms.elementAtOrNull(2)?.let { - this.room3Adults = it.adults - this.room3ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room2ChildAges Comma-separated list that specifies the age(s) for each of the children in second room. + */ + fun room2ChildAges( + room2ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room2ChildAges = room2ChildAges } - rooms.elementAtOrNull(3)?.let { - this.room4Adults = it.adults - this.room4ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room3Adults Specifies the number of adults staying in third room. + */ + fun room3Adults(room3Adults: kotlin.Long) = apply { this.room3Adults = room3Adults } - rooms.elementAtOrNull(4)?.let { - this.room5Adults = it.adults - this.room5ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room3ChildAges Comma-separated list that specifies the age(s) for each of the children in third room. + */ + fun room3ChildAges( + room3ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room3ChildAges = room3ChildAges } - rooms.elementAtOrNull(5)?.let { - this.room6Adults = it.adults - this.room6ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room4Adults Specifies the number of adults staying in fourth room. + */ + fun room4Adults(room4Adults: kotlin.Long) = apply { this.room4Adults = room4Adults } - rooms.elementAtOrNull(6)?.let { - this.room7Adults = it.adults - this.room7ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room4ChildAges Comma-separated list that specifies the age(s) for each of the children in fourth room. + */ + fun room4ChildAges( + room4ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room4ChildAges = room4ChildAges } - rooms.elementAtOrNull(7)?.let { - this.room8Adults = it.adults - this.room8ChildAges = it.childAges?.map { item -> item.toString() } - } - } + /** + * @param room5Adults Specifies the number of adults staying in fifth room. + */ + fun room5Adults(room5Adults: kotlin.Long) = apply { this.room5Adults = room5Adults } + + /** + * @param room5ChildAges Comma-separated list that specifies the age(s) for each of the children in fifth room. + */ + fun room5ChildAges( + room5ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room5ChildAges = room5ChildAges } + + /** + * @param room6Adults Specifies the number of adults staying in sixth room. + */ + fun room6Adults(room6Adults: kotlin.Long) = apply { this.room6Adults = room6Adults } + + /** + * @param room6ChildAges Comma-separated list that specifies the age(s) for each of the children in sixth room. + */ + fun room6ChildAges( + room6ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room6ChildAges = room6ChildAges } + + /** + * @param room7Adults Specifies the number of adults staying in seventh room. + */ + fun room7Adults(room7Adults: kotlin.Long) = apply { this.room7Adults = room7Adults } + + /** + * @param room7ChildAges Comma-separated list that specifies the age(s) for each of the children in seventh room. + */ + fun room7ChildAges( + room7ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room7ChildAges = room7ChildAges } + + /** + * @param room8Adults Specifies the number of adults staying in eighth room. + */ + fun room8Adults(room8Adults: kotlin.Long) = apply { this.room8Adults = room8Adults } + + /** + * @param room8ChildAges Comma-separated list that specifies the age(s) for each of the children in eighth room. + */ + fun room8ChildAges( + room8ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room8ChildAges = room8ChildAges } fun build(): GetLodgingListingsOperationParams { val params = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt index d87668e83..34025b58b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt @@ -205,54 +205,117 @@ data class GetLodgingQuotesOperationParams( */ fun travelWithPets(travelWithPets: kotlin.Boolean) = apply { this.travelWithPets = travelWithPets } - fun rooms(rooms: List) = - apply { - if (rooms.size > 8) { - throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( - constraintViolations = listOf("rooms: size must be between 0 and 8"), - ) - } + /** + * @param room1Adults Specifies the number of adults staying in a specific room. Example: `room1.adults` is used to specify the number of adults in the first room. ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo properties should only include one room. e.g. 3 adults in room 1 and 3 in room 2, \"room1.adults\" is 6. + */ + fun room1Adults(room1Adults: kotlin.Long) = apply { this.room1Adults = room1Adults } - rooms.elementAtOrNull(0)?.let { - this.room1Adults = it.adults - this.room1ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room1ChildAges Comma-separated list that specifies the age(s) for each of the children in each of the rooms. Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. Children must be accompanied by an adult. Total number of children is indicated by the number of childAges included. If there are no children in the party then this value should not be included. ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo properties should include the ages of all the children in the first room. e.g. 1 child age 10 in room #1 and 1 child age 11 in room #2, \"room1.childAges\" is 10,11. + */ + fun room1ChildAges( + room1ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room1ChildAges = room1ChildAges } - rooms.elementAtOrNull(1)?.let { - this.room2Adults = it.adults - this.room2ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room2Adults Specifies the number of adults staying in second room. + */ + fun room2Adults(room2Adults: kotlin.Long) = apply { this.room2Adults = room2Adults } - rooms.elementAtOrNull(2)?.let { - this.room3Adults = it.adults - this.room3ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room2ChildAges Comma-separated list that specifies the age(s) for each of the children in second room. + */ + fun room2ChildAges( + room2ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room2ChildAges = room2ChildAges } - rooms.elementAtOrNull(3)?.let { - this.room4Adults = it.adults - this.room4ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room3Adults Specifies the number of adults staying in third room. + */ + fun room3Adults(room3Adults: kotlin.Long) = apply { this.room3Adults = room3Adults } - rooms.elementAtOrNull(4)?.let { - this.room5Adults = it.adults - this.room5ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room3ChildAges Comma-separated list that specifies the age(s) for each of the children in third room. + */ + fun room3ChildAges( + room3ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room3ChildAges = room3ChildAges } - rooms.elementAtOrNull(5)?.let { - this.room6Adults = it.adults - this.room6ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room4Adults Specifies the number of adults staying in fourth room. + */ + fun room4Adults(room4Adults: kotlin.Long) = apply { this.room4Adults = room4Adults } - rooms.elementAtOrNull(6)?.let { - this.room7Adults = it.adults - this.room7ChildAges = it.childAges?.map { item -> item.toString() } - } + /** + * @param room4ChildAges Comma-separated list that specifies the age(s) for each of the children in fourth room. + */ + fun room4ChildAges( + room4ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room4ChildAges = room4ChildAges } - rooms.elementAtOrNull(7)?.let { - this.room8Adults = it.adults - this.room8ChildAges = it.childAges?.map { item -> item.toString() } - } - } + /** + * @param room5Adults Specifies the number of adults staying in fifth room. + */ + fun room5Adults(room5Adults: kotlin.Long) = apply { this.room5Adults = room5Adults } + + /** + * @param room5ChildAges Comma-separated list that specifies the age(s) for each of the children in fifth room. + */ + fun room5ChildAges( + room5ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room5ChildAges = room5ChildAges } + + /** + * @param room6Adults Specifies the number of adults staying in sixth room. + */ + fun room6Adults(room6Adults: kotlin.Long) = apply { this.room6Adults = room6Adults } + + /** + * @param room6ChildAges Comma-separated list that specifies the age(s) for each of the children in sixth room. + */ + fun room6ChildAges( + room6ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room6ChildAges = room6ChildAges } + + /** + * @param room7Adults Specifies the number of adults staying in seventh room. + */ + fun room7Adults(room7Adults: kotlin.Long) = apply { this.room7Adults = room7Adults } + + /** + * @param room7ChildAges Comma-separated list that specifies the age(s) for each of the children in seventh room. + */ + fun room7ChildAges( + room7ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room7ChildAges = room7ChildAges } + + /** + * @param room8Adults Specifies the number of adults staying in eighth room. + */ + fun room8Adults(room8Adults: kotlin.Long) = apply { this.room8Adults = room8Adults } + + /** + * @param room8ChildAges Comma-separated list that specifies the age(s) for each of the children in eighth room. + */ + fun room8ChildAges( + room8ChildAges: kotlin.collections.List< + kotlin.String, + >, + ) = apply { this.room8ChildAges = room8ChildAges } fun build(): GetLodgingQuotesOperationParams { val params = From 3d408f0cbce3bcebecf89989fc00f7d9c1977bcc Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sat, 22 Mar 2025 23:58:15 +0300 Subject: [PATCH 14/40] chore: lint --- generator/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index 0b1e8ced1..26c0be944 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -55,7 +55,7 @@ tasks.named("openApiGenerate").configure { doLast { exec { commandLine( - "../gradlew ktlintFormat".split(" ") + "../gradlew ktlintFormat".split(" "), ) workingDir = File("$rootDir/xap-sdk").absoluteFile } From 4a8dd84147ca06384c24f9d6bda81cc021d50f3a Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 00:03:39 +0300 Subject: [PATCH 15/40] chore: enable snapshot publishing and update version to 2.0.1-alpha-SNAPSHOT --- .github/workflows/generate-publish-sdk.yaml | 16 ++++++++-------- xap-sdk/gradle.properties | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index 960825cf6..adbf5e2b1 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -32,11 +32,11 @@ jobs: export KOTLIN_POST_PROCESS_FILE="npm run --prefix src/main/resources/post-processor process" gradle openApiGenerate -# - name: Publish Snapshots -# working-directory: xap-sdk -# env: -# GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} -# GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }} -# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} -# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} -# run: gradle publishSnapshots + - name: Publish Snapshots + working-directory: xap-sdk + env: + GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} + GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + run: gradle publishSnapshots diff --git a/xap-sdk/gradle.properties b/xap-sdk/gradle.properties index 3408c83c6..e3bcef3d8 100644 --- a/xap-sdk/gradle.properties +++ b/xap-sdk/gradle.properties @@ -2,5 +2,5 @@ ARTIFACT_NAME=xap-sdk DESCRIPTION=The Expedia API Platform (XAP) SDK # x-release-please-start-version -VERSION=2.0.0-alpha-SNAPSHOT +VERSION=2.0.1-alpha-SNAPSHOT # x-release-please-end From d7894b9efe76f24febff26c076fb4b9431837622 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 00:14:42 +0300 Subject: [PATCH 16/40] chore: add KDoc documentation for API-related classes and methods --- .github/workflows/generate-publish-sdk.yaml | 4 +- generator/tasks/lambdas.gradle.kts | 2 - xap-sdk/build.gradle.kts | 19 ---- .../sdk/xap/client/AsyncXapClient.kt | 27 ++++++ .../expediagroup/sdk/xap/client/XapClient.kt | 27 ++++++ .../sdk/xap/configuration/ApiEndpoint.kt | 5 + .../xap/configuration/ClientEnvironment.kt | 4 + .../sdk/xap/configuration/EndpointProvider.kt | 10 ++ .../sdk/xap/configuration/XapApiEndpoint.kt | 6 ++ .../configuration/XapClientConfiguration.kt | 96 +++++++++++++++++++ .../configuration/XapJacksonObjectMapper.kt | 5 + .../sdk/xap/core/ApiKeyHeaderStep.kt | 11 +++ .../sdk/xap/core/AsyncRequestExecutor.kt | 8 ++ .../sdk/xap/core/RequestExecutor.kt | 8 ++ 14 files changed, 209 insertions(+), 23 deletions(-) delete mode 100644 generator/tasks/lambdas.gradle.kts diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index adbf5e2b1..b18af8554 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -32,11 +32,11 @@ jobs: export KOTLIN_POST_PROCESS_FILE="npm run --prefix src/main/resources/post-processor process" gradle openApiGenerate - - name: Publish Snapshots + - name: Publish Snapshot working-directory: xap-sdk env: GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - run: gradle publishSnapshots + run: gradle publishSnapshot diff --git a/generator/tasks/lambdas.gradle.kts b/generator/tasks/lambdas.gradle.kts deleted file mode 100644 index 139597f9c..000000000 --- a/generator/tasks/lambdas.gradle.kts +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index fd197fc60..185375ba6 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -56,25 +56,6 @@ ktlint { ) } -tasks.register("publishSnapshots") { - val snapshotModules = - rootProject.subprojects.filter { project -> - project.version.toString().contains("-SNAPSHOT") && project.tasks.names.contains("publish") - } - - if (snapshotModules.isNotEmpty()) { - dependsOn(snapshotModules.map { ":${it.name}:publish" }) - } - - doLast { - if (snapshotModules.isEmpty()) { - println("❌ No snapshot modules to publish.") - } else { - println("📦 Successfully published snapshots for: ${snapshotModules.map { it.name }}") - } - } -} - apply("$rootDir/gradle-tasks/publish.gradle.kts") apply("$rootDir/gradle-tasks/signing.gradle.kts") apply("$rootDir/gradle-tasks/snapshot.gradle.kts") diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt index 448cd7044..ff92e92f8 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt @@ -13,6 +13,12 @@ import com.expediagroup.sdk.xap.configuration.XAP_OBJECT_MAPPER import com.expediagroup.sdk.xap.core.AsyncRequestExecutor import java.util.concurrent.CompletableFuture +/** + * Asynchronous client for XAP API. + * + * @property apiEndpoint The API endpoint for XAP. + * @property restExecutor The executor for handling REST operations. + */ class AsyncXapClient private constructor( config: AsyncXapClientConfiguration, ) : AsyncRestClient() { @@ -25,15 +31,36 @@ class AsyncXapClient private constructor( requestExecutor = AsyncRequestExecutor(configuration = config), ) + /** + * Executes an operation that does not expect a response body. + * + * @param operation The operation to execute. + * @return A CompletableFuture containing the response. + */ fun execute(operation: OperationNoResponseBodyTrait): CompletableFuture> = restExecutor.execute(operation) + /** + * Executes an operation that expects a response body. + * + * @param T The type of the response body. + * @param operation The operation to execute. + * @return A CompletableFuture containing the response. + */ fun execute(operation: JacksonModelOperationResponseBodyTrait): CompletableFuture> = restExecutor.execute(operation) companion object { + /** + * Builder for creating an instance of [AsyncXapClient]. + */ class Builder : AsyncClientBuilder() { override fun build(): AsyncXapClient = AsyncXapClient(buildConfig()) } + /** + * Creates a new builder for [AsyncXapClient]. + * + * @return A new [Builder] instance. + */ @JvmStatic fun builder() = Builder() } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt index e4c9d83b4..fbdd32369 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt @@ -13,6 +13,12 @@ import com.expediagroup.sdk.xap.configuration.XAP_OBJECT_MAPPER import com.expediagroup.sdk.xap.configuration.XapClientConfiguration import com.expediagroup.sdk.xap.core.RequestExecutor +/** + * Synchronous client for XAP API. + * + * @property apiEndpoint The API endpoint for XAP. + * @property restExecutor The executor for handling REST operations. + */ class XapClient private constructor( config: XapClientConfiguration, ) : RestClient() { @@ -34,15 +40,36 @@ class XapClient private constructor( ), ) + /** + * Executes an operation that does not expect a response body. + * + * @param operation The operation to execute. + * @return The response of the operation. + */ fun execute(operation: OperationNoResponseBodyTrait): Response = restExecutor.execute(operation) + /** + * Executes an operation that expects a response body. + * + * @param T The type of the response body. + * @param operation The operation to execute. + * @return The response of the operation. + */ fun execute(operation: JacksonModelOperationResponseBodyTrait): Response = restExecutor.execute(operation) companion object { + /** + * Builder for creating an instance of [XapClient]. + */ class Builder : ClientBuilder() { override fun build(): XapClient = XapClient(buildConfig()) } + /** + * Creates a new builder for [XapClient]. + * + * @return A new [Builder] instance. + */ @JvmStatic fun builder() = Builder() } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt index 6c732d207..1655aa96b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt @@ -1,5 +1,10 @@ package com.expediagroup.sdk.xap.configuration +/** + * Data class representing an API endpoint. + * + * @property endpoint The URL of the API endpoint. + */ data class ApiEndpoint( val endpoint: String, ) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt index 8b19ace85..f5b3e59f9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt @@ -1,5 +1,9 @@ package com.expediagroup.sdk.xap.configuration +/** + * Enum representing the client environment. + */ enum class ClientEnvironment { + /** Production environment. */ PROD, } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt index 371bd8498..1ea8ca76b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt @@ -2,7 +2,17 @@ package com.expediagroup.sdk.xap.configuration import com.expediagroup.sdk.core.exception.client.ExpediaGroupConfigurationException +/** + * Provides API endpoints based on the client environment. + */ internal object EndpointProvider { + /** + * Retrieves the API endpoint for the given environment. + * + * @param environment The client environment. Defaults to [ClientEnvironment.PROD] if not specified. + * @return The [ApiEndpoint] for the specified environment. + * @throws ExpediaGroupConfigurationException If the environment is unsupported. + */ fun getXapApiEndpoint(environment: ClientEnvironment? = null): ApiEndpoint { val env = environment ?: ClientEnvironment.PROD diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt index b26a35c0a..074b6bd02 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt @@ -1,7 +1,13 @@ package com.expediagroup.sdk.xap.configuration +/** + * Enum representing the XAP API endpoints. + * + * @property url The URL of the API endpoint. + */ enum class XapApiEndpoint( val url: String, ) { + /** Production environment endpoint. */ PROD("https://apim.expedia.com"), } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt index 17a98ff5a..cd1d77411 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt @@ -5,6 +5,14 @@ import com.expediagroup.sdk.core.transport.Transport import com.expediagroup.sdk.rest.AsyncRestClient import com.expediagroup.sdk.rest.RestClient +/** + * Configuration data class for XAP client. + * + * @property key The API key. + * @property secret The API secret. + * @property environment The client environment. Defaults to null. + * @property transport The transport mechanism. Defaults to null. + */ data class XapClientConfiguration( val key: String, val secret: String, @@ -12,6 +20,14 @@ data class XapClientConfiguration( val transport: Transport? = null, ) +/** + * Configuration data class for asynchronous XAP client. + * + * @property key The API key. + * @property secret The API secret. + * @property environment The client environment. Defaults to null. + * @property asyncTransport The asynchronous transport mechanism. Defaults to null. + */ data class AsyncXapClientConfiguration( val key: String, val secret: String, @@ -19,22 +35,62 @@ data class AsyncXapClientConfiguration( val asyncTransport: AsyncTransport? = null, ) +/** + * Abstract builder class for creating instances of [RestClient]. + * + * @param T The type of [RestClient] to build. + */ abstract class ClientBuilder { private var key: String? = null private var secret: String? = null private var environment: ClientEnvironment? = null private var transport: Transport? = null + /** + * Sets the API key. + * + * @param key The API key. + * @return The builder instance. + */ fun key(key: String) = apply { this.key = key } + /** + * Sets the API secret. + * + * @param secret The API secret. + * @return The builder instance. + */ fun secret(secret: String) = apply { this.secret = secret } + /** + * Sets the client environment. + * + * @param environment The client environment. + * @return The builder instance. + */ fun environment(environment: ClientEnvironment) = apply { this.environment = environment } + /** + * Sets the transport mechanism. + * + * @param transport The transport mechanism. + * @return The builder instance. + */ fun transport(transport: Transport) = apply { this.transport = transport } + /** + * Builds the [RestClient] instance. + * + * @return The built [RestClient] instance. + */ abstract fun build(): T + /** + * Builds the configuration for the XAP client. + * + * @return The built [XapClientConfiguration] instance. + * @throws IllegalArgumentException If the key or secret is not provided. + */ protected fun buildConfig(): XapClientConfiguration { require(key != null) { "key is required" @@ -53,22 +109,62 @@ abstract class ClientBuilder { } } +/** + * Abstract builder class for creating instances of [AsyncRestClient]. + * + * @param T The type of [AsyncRestClient] to build. + */ abstract class AsyncClientBuilder { private var key: String? = null private var secret: String? = null private var environment: ClientEnvironment? = null private var asyncTransport: AsyncTransport? = null + /** + * Sets the API key. + * + * @param key The API key. + * @return The builder instance. + */ fun key(key: String) = apply { this.key = key } + /** + * Sets the API secret. + * + * @param secret The API secret. + * @return The builder instance. + */ fun secret(secret: String) = apply { this.secret = secret } + /** + * Sets the client environment. + * + * @param environment The client environment. + * @return The builder instance. + */ fun environment(environment: ClientEnvironment) = apply { this.environment = environment } + /** + * Sets the asynchronous transport mechanism. + * + * @param asyncTransport The asynchronous transport mechanism. + * @return The builder instance. + */ fun asyncTransport(asyncTransport: AsyncTransport) = apply { this.asyncTransport = asyncTransport } + /** + * Builds the [AsyncRestClient] instance. + * + * @return The built [AsyncRestClient] instance. + */ abstract fun build(): T + /** + * Builds the configuration for the asynchronous XAP client. + * + * @return The built [AsyncXapClientConfiguration] instance. + * @throws IllegalArgumentException If the key or secret is not provided. + */ protected fun buildConfig(): AsyncXapClientConfiguration { require(key != null) { "key is required" diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt index 5d2174bc8..02677229b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt @@ -3,6 +3,11 @@ package com.expediagroup.sdk.xap.configuration import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder +/** + * Singleton instance of [ObjectMapper] configured for XAP. + * + * This instance is built using `jacksonMapperBuilder` and automatically registers all available modules. + */ val XAP_OBJECT_MAPPER: ObjectMapper = jacksonMapperBuilder { }.build().findAndRegisterModules() diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt index e7d30fa9b..d5744f593 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt @@ -3,9 +3,20 @@ package com.expediagroup.sdk.xap.core import com.expediagroup.sdk.core.http.Request import com.expediagroup.sdk.core.pipeline.RequestPipelineStep +/** + * A pipeline step that adds an API key header to the request. + * + * @property apiKey The API key to be added to the request header. + */ class ApiKeyHeaderStep( private val apiKey: String, ) : RequestPipelineStep { + /** + * Adds the API key header to the request. + * + * @param request The original request. + * @return The modified request with the API key header added. + */ override fun invoke(request: Request): Request = request .newBuilder() diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt index e9541d93e..de1a12786 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt @@ -12,6 +12,11 @@ import com.expediagroup.sdk.core.transport.AbstractAsyncRequestExecutor import com.expediagroup.sdk.xap.configuration.AsyncXapClientConfiguration import org.slf4j.LoggerFactory +/** + * Executor for handling asynchronous requests with XAP client configuration. + * + * @param configuration The configuration for the asynchronous XAP client. + */ class AsyncRequestExecutor( configuration: AsyncXapClientConfiguration, ) : AbstractAsyncRequestExecutor(configuration.asyncTransport) { @@ -20,6 +25,9 @@ class AsyncRequestExecutor( credentials = Credentials(configuration.key, configuration.secret), ) + /** + * The execution pipeline for processing requests and responses. + */ override val executionPipeline = ExecutionPipeline( requestPipeline = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt index 600008909..7a0b101d6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt @@ -12,6 +12,11 @@ import com.expediagroup.sdk.core.transport.AbstractRequestExecutor import com.expediagroup.sdk.xap.configuration.XapClientConfiguration import org.slf4j.LoggerFactory +/** + * Executor for handling synchronous requests with XAP client configuration. + * + * @param configuration The configuration for the XAP client. + */ class RequestExecutor( configuration: XapClientConfiguration, ) : AbstractRequestExecutor(configuration.transport) { @@ -20,6 +25,9 @@ class RequestExecutor( credentials = Credentials(configuration.key, configuration.secret), ) + /** + * The execution pipeline for processing requests and responses. + */ override val executionPipeline = ExecutionPipeline( requestPipeline = From 0703b052a63ca26774283838cc4efe8fae766358 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 00:20:32 +0300 Subject: [PATCH 17/40] chore: improve version check message for snapshot publishing --- gradle-tasks/snapshot.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle-tasks/snapshot.gradle.kts b/gradle-tasks/snapshot.gradle.kts index 135fe1922..2ade77b5f 100644 --- a/gradle-tasks/snapshot.gradle.kts +++ b/gradle-tasks/snapshot.gradle.kts @@ -10,8 +10,8 @@ tasks.register("publishSnapshot") { "Publish task must be present to publish a $artifactId snapshot" } - require(project.version.toString().contains("-SNAPSHOT")) { - "$artifactId version must contain -SNAPSHOT to publish snapshots." + require(version.contains("-SNAPSHOT")) { + "$artifactId:$version version must contain -SNAPSHOT to publish snapshots." } dependsOn("${project.name}:publish") From 8600ef79b0d25cc58206a0b69894ebdd0f4857cc Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 00:30:48 +0300 Subject: [PATCH 18/40] chore: improve version check message for snapshot publishing --- gradle-tasks/snapshot.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle-tasks/snapshot.gradle.kts b/gradle-tasks/snapshot.gradle.kts index 2ade77b5f..db00c15b7 100644 --- a/gradle-tasks/snapshot.gradle.kts +++ b/gradle-tasks/snapshot.gradle.kts @@ -14,7 +14,7 @@ tasks.register("publishSnapshot") { "$artifactId:$version version must contain -SNAPSHOT to publish snapshots." } - dependsOn("${project.name}:publish") + dependsOn(":${project.name}:publish") doLast { val url = "https://oss.sonatype.org/content/repositories/snapshots/com/expediagroup/$artifactId/$version/" println("📦 Successfully published $artifactId:$version snapshot.") From 30b0410b2cca36c0f2aea47d961695738ccba335 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 00:53:55 +0300 Subject: [PATCH 19/40] chore: update publish workflow to include snapshot input and PR creation --- .github/workflows/generate-publish-sdk.yaml | 28 ++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index b18af8554..bfb3f30d6 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -1,5 +1,11 @@ on: - push: + workflow_dispatch: + inputs: + snapshot: + type: checkbox + description: "Is a snapshot release?" + required: true + default: true jobs: generate-and-publish: @@ -32,11 +38,27 @@ jobs: export KOTLIN_POST_PROCESS_FILE="npm run --prefix src/main/resources/post-processor process" gradle openApiGenerate - - name: Publish Snapshot + - name: Open PR + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_PAT }} + commit-message: "chore: publishing docs for version ${{ env.NEW_DOCS_VERSION }}" + body: "This PR adds the reference documentation for version ${{ env.NEW_DOCS_VERSION }}." + title: "chore: reference docs update for version ${{ env.NEW_DOCS_VERSION }}" + branch: "docs-update-${{ env.NEW_DOCS_VERSION }}-$(date +'%Y%m%d%H%M%S')" + add-paths: . + + - name: Publish SDK working-directory: xap-sdk env: GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - run: gradle publishSnapshot + run: | + if [ -z "${{ github.event.inputs.snapshot }}" ]; then + gradle publishToSonatype closeAndReleaseSonatypeStagingRepository + else + exit 1 +# ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository + fi From ac7ec5f9d91016095c0217afb379fc8415fab6c1 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 00:57:59 +0300 Subject: [PATCH 20/40] chore: update publish workflow to include snapshot input and PR creation --- .github/workflows/generate-publish-sdk.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index bfb3f30d6..aedb3fba6 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -40,12 +40,12 @@ jobs: - name: Open PR uses: peter-evans/create-pull-request@v7 + working-directory: xap-sdk with: token: ${{ secrets.GITHUB_PAT }} - commit-message: "chore: publishing docs for version ${{ env.NEW_DOCS_VERSION }}" - body: "This PR adds the reference documentation for version ${{ env.NEW_DOCS_VERSION }}." - title: "chore: reference docs update for version ${{ env.NEW_DOCS_VERSION }}" - branch: "docs-update-${{ env.NEW_DOCS_VERSION }}-$(date +'%Y%m%d%H%M%S')" + commit-message: "chore: publishing code for sdk release $(date +'%Y%m%d%H%M%S')" + title: "chore: code update on $(date +'%Y%m%d%H%M%S')" + branch: "xap-sdk-code-update-$(date +'%Y%m%d%H%M%S')" add-paths: . - name: Publish SDK From 5c12fff06609533fa1b5c2f1bfb737de03e2c22b Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 00:59:28 +0300 Subject: [PATCH 21/40] chore: fix publish workflow to execute Gradle command for snapshot input --- .github/workflows/generate-publish-sdk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index aedb3fba6..19ea6e255 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -59,6 +59,6 @@ jobs: if [ -z "${{ github.event.inputs.snapshot }}" ]; then gradle publishToSonatype closeAndReleaseSonatypeStagingRepository else - exit 1 -# ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository + exit 1 + gradle publishToSonatype closeAndReleaseSonatypeStagingRepository fi From 234d23db1dc1ca22346f6ca0c94e7836d8d94e43 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 01:05:28 +0300 Subject: [PATCH 22/40] chore: fix publish workflow to execute Gradle command for snapshot input --- .github/workflows/generate-publish-sdk.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index 19ea6e255..39cfa05cb 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -1,3 +1,4 @@ +id: generate-publish-sdk-new on: workflow_dispatch: inputs: From 7073bd8ab9b6e18889e03b466d92cc977c61d50b Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Sun, 23 Mar 2025 01:31:40 +0300 Subject: [PATCH 23/40] chore: update date-time types from OffsetDateTime to LocalDateTime in various models --- .github/workflows/generate-publish-sdk.yaml | 2 +- .../models/ActivitiesCancellationPolicy.kt | 6 +- .../sdk/xap/models/AvailableTimeSlot.kt | 6 +- .../sdk/xap/models/CarsCancellationPolicy.kt | 6 +- .../xap/models/NonCancellableDateTimeRange.kt | 12 +- .../sdk/xap/models/PenaltyRule.kt | 12 +- .../sdk/xap/models/VendorLocationDetails.kt | 6 +- .../GetCarsListingsOperationParams.kt | 12 +- .../GetLodgingListingsOperationParams.kt | 143 +++++------------- .../GetLodgingQuotesOperationParams.kt | 143 +++++------------- 10 files changed, 111 insertions(+), 237 deletions(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index 39cfa05cb..986deb607 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -58,7 +58,7 @@ jobs: SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} run: | if [ -z "${{ github.event.inputs.snapshot }}" ]; then - gradle publishToSonatype closeAndReleaseSonatypeStagingRepository + gradle publishSnapshot else exit 1 gradle publishToSonatype closeAndReleaseSonatypeStagingRepository diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt index 3ab91d823..6871c127b 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesCancellationPolicy.kt @@ -36,7 +36,7 @@ data class ActivitiesCancellationPolicy( val freeCancellationMinHours: kotlin.Int? = null, // The date and time after which the activity will not be able to be cancelled for free, stated in the local time to where the activity takes place. @JsonProperty("FreeCancellationEndDateTime") - val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + val freeCancellationEndDateTime: java.time.LocalDateTime? = null, ) { init { require(freeCancellation != null) { "freeCancellation must not be null" } @@ -51,7 +51,7 @@ data class ActivitiesCancellationPolicy( private var freeCancellation: kotlin.Boolean? = null, private var cancelPolicyDescription: kotlin.String? = null, private var freeCancellationMinHours: kotlin.Int? = null, - private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, ) { fun freeCancellation(freeCancellation: kotlin.Boolean) = apply { this.freeCancellation = freeCancellation } @@ -59,7 +59,7 @@ data class ActivitiesCancellationPolicy( fun freeCancellationMinHours(freeCancellationMinHours: kotlin.Int?) = apply { this.freeCancellationMinHours = freeCancellationMinHours } - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } fun build(): ActivitiesCancellationPolicy { val instance = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt index 723e4ae88..70a55cf16 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/AvailableTimeSlot.kt @@ -29,7 +29,7 @@ import com.fasterxml.jackson.annotation.JsonProperty data class AvailableTimeSlot( // The date and time when the activity happens. @JsonProperty("DateTime") - val dateTime: java.time.OffsetDateTime, + val dateTime: java.time.LocalDateTime, // Indicates whether the activity is an all-day activity. @JsonProperty("AllDayActivity") val allDayActivity: kotlin.Boolean, @@ -58,12 +58,12 @@ data class AvailableTimeSlot( } class Builder( - private var dateTime: java.time.OffsetDateTime? = null, + private var dateTime: java.time.LocalDateTime? = null, private var allDayActivity: kotlin.Boolean? = null, private var cancellationPolicy: ActivitiesCancellationPolicy? = null, private var tickets: kotlin.collections.List? = null, ) { - fun dateTime(dateTime: java.time.OffsetDateTime) = apply { this.dateTime = dateTime } + fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } fun allDayActivity(allDayActivity: kotlin.Boolean) = apply { this.allDayActivity = allDayActivity } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt index 94d6db249..8612c6a72 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/CarsCancellationPolicy.kt @@ -36,7 +36,7 @@ data class CarsCancellationPolicy( val freeCancellation: kotlin.Boolean? = null, // Indicates the latest time that the car can be cancelled for free. @JsonProperty("FreeCancellationEndDateTime") - val freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + val freeCancellationEndDateTime: java.time.LocalDateTime? = null, // Container for penalty rules @JsonProperty("PenaltyRules") val penaltyRules: kotlin.collections.List? = null, @@ -54,7 +54,7 @@ data class CarsCancellationPolicy( class Builder( private var cancellable: kotlin.Boolean? = null, private var freeCancellation: kotlin.Boolean? = null, - private var freeCancellationEndDateTime: java.time.OffsetDateTime? = null, + private var freeCancellationEndDateTime: java.time.LocalDateTime? = null, private var penaltyRules: kotlin.collections.List? = null, private var nonCancellableDateTimeRange: NonCancellableDateTimeRange? = null, ) { @@ -62,7 +62,7 @@ data class CarsCancellationPolicy( fun freeCancellation(freeCancellation: kotlin.Boolean?) = apply { this.freeCancellation = freeCancellation } - fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.OffsetDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } + fun freeCancellationEndDateTime(freeCancellationEndDateTime: java.time.LocalDateTime?) = apply { this.freeCancellationEndDateTime = freeCancellationEndDateTime } fun penaltyRules(penaltyRules: kotlin.collections.List?) = apply { this.penaltyRules = penaltyRules } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt index 0fb4cc91a..605c5401a 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/NonCancellableDateTimeRange.kt @@ -25,10 +25,10 @@ import com.fasterxml.jackson.annotation.JsonProperty data class NonCancellableDateTimeRange( // The time of this non-cancellable window starts @JsonProperty("StartDateTime") - val startDateTime: java.time.OffsetDateTime, + val startDateTime: java.time.LocalDateTime, // The time of this non-cancellable window ends @JsonProperty("EndDateTime") - val endDateTime: java.time.OffsetDateTime, + val endDateTime: java.time.LocalDateTime, ) { init { require(startDateTime != null) { "startDateTime must not be null" } @@ -42,12 +42,12 @@ data class NonCancellableDateTimeRange( } class Builder( - private var startDateTime: java.time.OffsetDateTime? = null, - private var endDateTime: java.time.OffsetDateTime? = null, + private var startDateTime: java.time.LocalDateTime? = null, + private var endDateTime: java.time.LocalDateTime? = null, ) { - fun startDateTime(startDateTime: java.time.OffsetDateTime) = apply { this.startDateTime = startDateTime } + fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } - fun endDateTime(endDateTime: java.time.OffsetDateTime) = apply { this.endDateTime = endDateTime } + fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } fun build(): NonCancellableDateTimeRange { val instance = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt index ab859fa84..8323846fb 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/PenaltyRule.kt @@ -29,10 +29,10 @@ data class PenaltyRule( val penalty: PenaltyType, // The time when this penalty window starts @JsonProperty("StartDateTime") - val startDateTime: java.time.OffsetDateTime, + val startDateTime: java.time.LocalDateTime, // The time when this penalty window ends @JsonProperty("EndDateTime") - val endDateTime: java.time.OffsetDateTime, + val endDateTime: java.time.LocalDateTime, ) { init { require(penalty != null) { "penalty must not be null" } @@ -49,14 +49,14 @@ data class PenaltyRule( class Builder( private var penalty: PenaltyType? = null, - private var startDateTime: java.time.OffsetDateTime? = null, - private var endDateTime: java.time.OffsetDateTime? = null, + private var startDateTime: java.time.LocalDateTime? = null, + private var endDateTime: java.time.LocalDateTime? = null, ) { fun penalty(penalty: PenaltyType) = apply { this.penalty = penalty } - fun startDateTime(startDateTime: java.time.OffsetDateTime) = apply { this.startDateTime = startDateTime } + fun startDateTime(startDateTime: java.time.LocalDateTime) = apply { this.startDateTime = startDateTime } - fun endDateTime(endDateTime: java.time.OffsetDateTime) = apply { this.endDateTime = endDateTime } + fun endDateTime(endDateTime: java.time.LocalDateTime) = apply { this.endDateTime = endDateTime } fun build(): PenaltyRule { val instance = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt index 151fcb924..98a6da5ee 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/VendorLocationDetails.kt @@ -31,7 +31,7 @@ import com.fasterxml.jackson.annotation.JsonProperty data class VendorLocationDetails( // Pickup date and time. @JsonProperty("DateTime") - val dateTime: java.time.OffsetDateTime, + val dateTime: java.time.LocalDateTime, @JsonProperty("Location") val location: CarsLocation, // The category of shuttle from the terminal to the rental car counter. Please find list of Shuttle Categories in the Related Links Section below. @@ -55,13 +55,13 @@ data class VendorLocationDetails( } class Builder( - private var dateTime: java.time.OffsetDateTime? = null, + private var dateTime: java.time.LocalDateTime? = null, private var location: CarsLocation? = null, private var shuttleCategory: kotlin.String? = null, private var distance: CarsDistance? = null, private var openSchedule: kotlin.collections.List? = null, ) { - fun dateTime(dateTime: java.time.OffsetDateTime) = apply { this.dateTime = dateTime } + fun dateTime(dateTime: java.time.LocalDateTime) = apply { this.dateTime = dateTime } fun location(location: CarsLocation) = apply { this.location = location } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt index cdc10c257..6494b3e79 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetCarsListingsOperationParams.kt @@ -60,8 +60,8 @@ data class GetCarsListingsOperationParams( null, val dropOffRadius: kotlin.Int? = null, - val pickupTime: java.time.OffsetDateTime, - val dropOffTime: java.time.OffsetDateTime, + val pickupTime: java.time.LocalDateTime, + val dropOffTime: java.time.LocalDateTime, val sortType: GetCarsListingsOperationParams.SortType? = null, val sortOrder: GetCarsListingsOperationParams.SortOrder? = @@ -171,8 +171,8 @@ data class GetCarsListingsOperationParams( @JsonProperty("dropOff.address") private var dropOffAddress: kotlin.String? = null, @JsonProperty("dropOff.geoLocation") private var dropOffGeoLocation: kotlin.String? = null, @JsonProperty("dropOff.radius") private var dropOffRadius: kotlin.Int? = null, - @JsonProperty("pickupTime") private var pickupTime: java.time.OffsetDateTime? = null, - @JsonProperty("dropOffTime") private var dropOffTime: java.time.OffsetDateTime? = null, + @JsonProperty("pickupTime") private var pickupTime: java.time.LocalDateTime? = null, + @JsonProperty("dropOffTime") private var dropOffTime: java.time.LocalDateTime? = null, @JsonProperty("sortType") private var sortType: GetCarsListingsOperationParams.SortType? = null, @JsonProperty("sortOrder") private var sortOrder: GetCarsListingsOperationParams.SortOrder? = null, @JsonProperty("limit") private var limit: kotlin.Int? = null, @@ -257,12 +257,12 @@ data class GetCarsListingsOperationParams( /** * @param pickupTime Requested car pickup date and time.Date should be ISO8601 Date format.The default TIME is 10:30:00.The supported search window is today to 330 days in the future.(Note that each rental counter has different hours of operation. If you select a time in the middle of the night there may be no inventory available as all locations may be closed.) */ - fun pickupTime(pickupTime: java.time.OffsetDateTime) = apply { this.pickupTime = pickupTime } + fun pickupTime(pickupTime: java.time.LocalDateTime) = apply { this.pickupTime = pickupTime } /** * @param dropOffTime Requested car drop off date and time. Date should be ISO8601 Date format.The supported search window is today to 330 days in the future.Note: The dropOffTime must be at least 2 hours later than the pickupTime for the request to be valid. */ - fun dropOffTime(dropOffTime: java.time.OffsetDateTime) = apply { this.dropOffTime = dropOffTime } + fun dropOffTime(dropOffTime: java.time.LocalDateTime) = apply { this.dropOffTime = dropOffTime } /** * @param sortType Method of sorting the car search results.Supported value: Price.If no value is present a sort by 'price' will be assumed. diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt index df9864a77..aa7a37249 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingListingsOperationParams.kt @@ -614,117 +614,54 @@ data class GetLodgingListingsOperationParams( */ fun sortOrder(sortOrder: GetLodgingListingsOperationParams.SortOrder) = apply { this.sortOrder = sortOrder } - /** - * @param room1Adults Specifies the number of adults staying in a specific room. Default value is one room with 2 adults. Example: `room1.adults` is used to specify the number of adults in the first room. - */ - fun room1Adults(room1Adults: kotlin.Long) = apply { this.room1Adults = room1Adults } - - /** - * @param room1ChildAges Comma-separated list that specifies the age(s) for each of the children in each of the rooms. Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. Children must be accompanied by an adult. - */ - fun room1ChildAges( - room1ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room1ChildAges = room1ChildAges } - - /** - * @param room2Adults Specifies the number of adults staying in second room. - */ - fun room2Adults(room2Adults: kotlin.Long) = apply { this.room2Adults = room2Adults } - - /** - * @param room2ChildAges Comma-separated list that specifies the age(s) for each of the children in second room. - */ - fun room2ChildAges( - room2ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room2ChildAges = room2ChildAges } - - /** - * @param room3Adults Specifies the number of adults staying in third room. - */ - fun room3Adults(room3Adults: kotlin.Long) = apply { this.room3Adults = room3Adults } - - /** - * @param room3ChildAges Comma-separated list that specifies the age(s) for each of the children in third room. - */ - fun room3ChildAges( - room3ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room3ChildAges = room3ChildAges } - - /** - * @param room4Adults Specifies the number of adults staying in fourth room. - */ - fun room4Adults(room4Adults: kotlin.Long) = apply { this.room4Adults = room4Adults } - - /** - * @param room4ChildAges Comma-separated list that specifies the age(s) for each of the children in fourth room. - */ - fun room4ChildAges( - room4ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room4ChildAges = room4ChildAges } + fun rooms(rooms: List) = + apply { + if (rooms.size > 8) { + throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( + constraintViolations = listOf("rooms: size must be between 0 and 8"), + ) + } - /** - * @param room5Adults Specifies the number of adults staying in fifth room. - */ - fun room5Adults(room5Adults: kotlin.Long) = apply { this.room5Adults = room5Adults } + rooms.elementAtOrNull(0)?.let { + this.room1Adults = it.adults + this.room1ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room5ChildAges Comma-separated list that specifies the age(s) for each of the children in fifth room. - */ - fun room5ChildAges( - room5ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room5ChildAges = room5ChildAges } + rooms.elementAtOrNull(1)?.let { + this.room2Adults = it.adults + this.room2ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room6Adults Specifies the number of adults staying in sixth room. - */ - fun room6Adults(room6Adults: kotlin.Long) = apply { this.room6Adults = room6Adults } + rooms.elementAtOrNull(2)?.let { + this.room3Adults = it.adults + this.room3ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room6ChildAges Comma-separated list that specifies the age(s) for each of the children in sixth room. - */ - fun room6ChildAges( - room6ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room6ChildAges = room6ChildAges } + rooms.elementAtOrNull(3)?.let { + this.room4Adults = it.adults + this.room4ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room7Adults Specifies the number of adults staying in seventh room. - */ - fun room7Adults(room7Adults: kotlin.Long) = apply { this.room7Adults = room7Adults } + rooms.elementAtOrNull(4)?.let { + this.room5Adults = it.adults + this.room5ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room7ChildAges Comma-separated list that specifies the age(s) for each of the children in seventh room. - */ - fun room7ChildAges( - room7ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room7ChildAges = room7ChildAges } + rooms.elementAtOrNull(5)?.let { + this.room6Adults = it.adults + this.room6ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room8Adults Specifies the number of adults staying in eighth room. - */ - fun room8Adults(room8Adults: kotlin.Long) = apply { this.room8Adults = room8Adults } + rooms.elementAtOrNull(6)?.let { + this.room7Adults = it.adults + this.room7ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room8ChildAges Comma-separated list that specifies the age(s) for each of the children in eighth room. - */ - fun room8ChildAges( - room8ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room8ChildAges = room8ChildAges } + rooms.elementAtOrNull(7)?.let { + this.room8Adults = it.adults + this.room8ChildAges = it.childAges?.map { item -> item.toString() } + } + } fun build(): GetLodgingListingsOperationParams { val params = diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt index 34025b58b..d87668e83 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/operations/GetLodgingQuotesOperationParams.kt @@ -205,117 +205,54 @@ data class GetLodgingQuotesOperationParams( */ fun travelWithPets(travelWithPets: kotlin.Boolean) = apply { this.travelWithPets = travelWithPets } - /** - * @param room1Adults Specifies the number of adults staying in a specific room. Example: `room1.adults` is used to specify the number of adults in the first room. ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo properties should only include one room. e.g. 3 adults in room 1 and 3 in room 2, \"room1.adults\" is 6. - */ - fun room1Adults(room1Adults: kotlin.Long) = apply { this.room1Adults = room1Adults } - - /** - * @param room1ChildAges Comma-separated list that specifies the age(s) for each of the children in each of the rooms. Example: `room2.childAges=1,3` means two children (1-year old and 3-year old) are staying in room #2. Children must be accompanied by an adult. Total number of children is indicated by the number of childAges included. If there are no children in the party then this value should not be included. ***NOTE***: multiple room request is only supported for conventional lodging hotels. Request for Vrbo properties should include the ages of all the children in the first room. e.g. 1 child age 10 in room #1 and 1 child age 11 in room #2, \"room1.childAges\" is 10,11. - */ - fun room1ChildAges( - room1ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room1ChildAges = room1ChildAges } - - /** - * @param room2Adults Specifies the number of adults staying in second room. - */ - fun room2Adults(room2Adults: kotlin.Long) = apply { this.room2Adults = room2Adults } - - /** - * @param room2ChildAges Comma-separated list that specifies the age(s) for each of the children in second room. - */ - fun room2ChildAges( - room2ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room2ChildAges = room2ChildAges } - - /** - * @param room3Adults Specifies the number of adults staying in third room. - */ - fun room3Adults(room3Adults: kotlin.Long) = apply { this.room3Adults = room3Adults } - - /** - * @param room3ChildAges Comma-separated list that specifies the age(s) for each of the children in third room. - */ - fun room3ChildAges( - room3ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room3ChildAges = room3ChildAges } - - /** - * @param room4Adults Specifies the number of adults staying in fourth room. - */ - fun room4Adults(room4Adults: kotlin.Long) = apply { this.room4Adults = room4Adults } - - /** - * @param room4ChildAges Comma-separated list that specifies the age(s) for each of the children in fourth room. - */ - fun room4ChildAges( - room4ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room4ChildAges = room4ChildAges } + fun rooms(rooms: List) = + apply { + if (rooms.size > 8) { + throw com.expediagroup.sdk.rest.exception.client.PropertyConstraintViolationException( + constraintViolations = listOf("rooms: size must be between 0 and 8"), + ) + } - /** - * @param room5Adults Specifies the number of adults staying in fifth room. - */ - fun room5Adults(room5Adults: kotlin.Long) = apply { this.room5Adults = room5Adults } + rooms.elementAtOrNull(0)?.let { + this.room1Adults = it.adults + this.room1ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room5ChildAges Comma-separated list that specifies the age(s) for each of the children in fifth room. - */ - fun room5ChildAges( - room5ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room5ChildAges = room5ChildAges } + rooms.elementAtOrNull(1)?.let { + this.room2Adults = it.adults + this.room2ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room6Adults Specifies the number of adults staying in sixth room. - */ - fun room6Adults(room6Adults: kotlin.Long) = apply { this.room6Adults = room6Adults } + rooms.elementAtOrNull(2)?.let { + this.room3Adults = it.adults + this.room3ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room6ChildAges Comma-separated list that specifies the age(s) for each of the children in sixth room. - */ - fun room6ChildAges( - room6ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room6ChildAges = room6ChildAges } + rooms.elementAtOrNull(3)?.let { + this.room4Adults = it.adults + this.room4ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room7Adults Specifies the number of adults staying in seventh room. - */ - fun room7Adults(room7Adults: kotlin.Long) = apply { this.room7Adults = room7Adults } + rooms.elementAtOrNull(4)?.let { + this.room5Adults = it.adults + this.room5ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room7ChildAges Comma-separated list that specifies the age(s) for each of the children in seventh room. - */ - fun room7ChildAges( - room7ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room7ChildAges = room7ChildAges } + rooms.elementAtOrNull(5)?.let { + this.room6Adults = it.adults + this.room6ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room8Adults Specifies the number of adults staying in eighth room. - */ - fun room8Adults(room8Adults: kotlin.Long) = apply { this.room8Adults = room8Adults } + rooms.elementAtOrNull(6)?.let { + this.room7Adults = it.adults + this.room7ChildAges = it.childAges?.map { item -> item.toString() } + } - /** - * @param room8ChildAges Comma-separated list that specifies the age(s) for each of the children in eighth room. - */ - fun room8ChildAges( - room8ChildAges: kotlin.collections.List< - kotlin.String, - >, - ) = apply { this.room8ChildAges = room8ChildAges } + rooms.elementAtOrNull(7)?.let { + this.room8Adults = it.adults + this.room8ChildAges = it.childAges?.map { item -> item.toString() } + } + } fun build(): GetLodgingQuotesOperationParams { val params = From e0e1083f1f66031f2538f38a142be12b8d7de335 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 20:37:26 +0300 Subject: [PATCH 24/40] chore: add architecture documentation for xap sdk --- ARCHITECTURE.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 ARCHITECTURE.md diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 000000000..edfa0b502 --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,43 @@ +# XAP SDK Architecture +## Overview +The XAP (Expedia Affiliate Platform) SDK is structured as a multi-module Gradle project designed to generate a Kotlin/Java SDK from OpenAPI specifications. The architecture follows a code generation approach, where API client code is automatically generated and then published to repositories for consumption by developers. + +The repository contains the following key components: +- **OpenAPI Specifications**: Defines the API endpoints, request/response models, and data types. +- **Code Generation**: Utilizes OpenAPI Generator to create the SDK code based on the specifications. +- **Core Integration**: Integrates with the Expedia Group's SDK platform core libraries and frameworks. +- **Post-Processing**: Enhances the generated code with additional features, optimizations, and customizations. +- **Publishing**: Automates the release process to make the SDK available for developers. +- **Examples**: Provides sample applications demonstrating how to use the generated SDK. +- **Documentation**: Contains guides and references for developers to understand and utilize the SDK effectively. +- **Testing**: Includes unit, integration and end-to-end tests to ensure the correctness and reliability of the generated SDK. + +## Technology Stack +- **Languages**: Kotlin (primary), Java (compatibility) +- **Build System**: Gradle with Kotlin DSL +- **Code Generation**: OpenAPI Generator +- **Post-Processing**: TypeScript/JavaScript (Node.js) +- **CI/CD**: GitHub Actions +- **Testing Frameworks**: JUnit, MockK, AssertJ +- **Documentation**: Markdown, KDoc +- **Version Control**: Git +- **Package Management**: Maven Central, Sonatype Nexus +- **Dependency Management**: Gradle Kotlin DSL +- **Code Quality**: Ktlint +- **Code Coverage**: Kover + +## Modules +The project is organized into several modules, each serving a specific purpose. The main modules include: + +### `generator` module +This module is responsible for the core functionality of the SDK generation process. It consumes the OpenAPI specifications and generates the initial SDK code using OpenAPI Generator. It also integrates with the `expediagroup-sdk-openapi-plugin`. The module contains the following components: +- **OpenAPI Generator Configurations**: The core library that generates the SDK code from OpenAPI specifications. Lives in the `build.gradle.kts` file. +- **Custom Templates**: Custom templates for generating Kotlin/Java code. Lives in the `src/main/resources/templates` directory. +- **Post-Processing**: Enhancements and optimizations applied to the generated code. Lives in the `src/main/resources/post-processing` directory. + +The generation process can be executed through the `openApiGenerate` Gradle task, which triggers the OpenAPI Generator with the specified configurations. The `openApiGenerate` gradle task workflow is as follows: +1. Locates the OpenAPI specification file through the `inputSpec` environment variable, falling back to `generator/src/main/resources/specs.yaml` if not found. +2. Consumes the OpenAPI specification file to generates code into the `xap-sdk/src/main/kotlin` directory. +3. Generated code overrides the code present `xap-sdk/src/main/kotlin` directory, affecting only the `operations` and `models` packages. +4. The generated code is then post-processed to apply additional customizations and optimizations. +5. Finally, the code is formatted and linted using Ktlint to ensure code quality and consistency. From cb72e2975e5097cd4e474f50f3d4c5e43135fe72 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 20:39:21 +0300 Subject: [PATCH 25/40] chore: add architecture documentation for xap sdk --- ARCHITECTURE.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index edfa0b502..8f68f6a02 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1,6 +1,5 @@ -# XAP SDK Architecture -## Overview -The XAP (Expedia Affiliate Platform) SDK is structured as a multi-module Gradle project designed to generate a Kotlin/Java SDK from OpenAPI specifications. The architecture follows a code generation approach, where API client code is automatically generated and then published to repositories for consumption by developers. +# Overview +The XAP (Expedia API Platform) SDK is structured as a multi-module Gradle project designed to generate a Kotlin/Java SDK from OpenAPI specifications. The architecture follows a code generation approach, where API client code is automatically generated and then published to repositories for consumption by developers. The repository contains the following key components: - **OpenAPI Specifications**: Defines the API endpoints, request/response models, and data types. @@ -12,7 +11,7 @@ The repository contains the following key components: - **Documentation**: Contains guides and references for developers to understand and utilize the SDK effectively. - **Testing**: Includes unit, integration and end-to-end tests to ensure the correctness and reliability of the generated SDK. -## Technology Stack +# Technology Stack - **Languages**: Kotlin (primary), Java (compatibility) - **Build System**: Gradle with Kotlin DSL - **Code Generation**: OpenAPI Generator @@ -26,10 +25,10 @@ The repository contains the following key components: - **Code Quality**: Ktlint - **Code Coverage**: Kover -## Modules +# Modules The project is organized into several modules, each serving a specific purpose. The main modules include: -### `generator` module +## `generator` module This module is responsible for the core functionality of the SDK generation process. It consumes the OpenAPI specifications and generates the initial SDK code using OpenAPI Generator. It also integrates with the `expediagroup-sdk-openapi-plugin`. The module contains the following components: - **OpenAPI Generator Configurations**: The core library that generates the SDK code from OpenAPI specifications. Lives in the `build.gradle.kts` file. - **Custom Templates**: Custom templates for generating Kotlin/Java code. Lives in the `src/main/resources/templates` directory. From 890b32ca8896933c52f8d4d2ceda1011724d0ec7 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 21:08:25 +0300 Subject: [PATCH 26/40] chore: enhance architecture documentation for XAP SDK with detailed component descriptions --- ARCHITECTURE.md | 69 ++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 8f68f6a02..c3791b88a 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1,40 +1,57 @@ # Overview + The XAP (Expedia API Platform) SDK is structured as a multi-module Gradle project designed to generate a Kotlin/Java SDK from OpenAPI specifications. The architecture follows a code generation approach, where API client code is automatically generated and then published to repositories for consumption by developers. The repository contains the following key components: -- **OpenAPI Specifications**: Defines the API endpoints, request/response models, and data types. -- **Code Generation**: Utilizes OpenAPI Generator to create the SDK code based on the specifications. -- **Core Integration**: Integrates with the Expedia Group's SDK platform core libraries and frameworks. -- **Post-Processing**: Enhances the generated code with additional features, optimizations, and customizations. -- **Publishing**: Automates the release process to make the SDK available for developers. -- **Examples**: Provides sample applications demonstrating how to use the generated SDK. -- **Documentation**: Contains guides and references for developers to understand and utilize the SDK effectively. -- **Testing**: Includes unit, integration and end-to-end tests to ensure the correctness and reliability of the generated SDK. + +| Component | Description | +|----------------------------|----------------------------------------------------------------------------------------------------------------| +| **OpenAPI Specifications** | Defines the API endpoints, request/response models, and data types | +| **Code Generation** | Utilizes OpenAPI Generator to create the SDK code based on the specifications. | +| **Core Integration** | Integrates with the Expedia Group's SDK platform core libraries and frameworks | +| **Post-Processing** | Enhances the generated code with additional features, optimizations, and customizations | +| **Publishing Tasks** | Automates the release process to make the SDK available for developers | +| **Examples** | Provides sample applications demonstrating how to use the generated SDK | +| **Documentation** | Contains guides and references for developers to understand and utilize the SDK effectively | +| **Testing** | Includes unit, integration and end-to-end tests to ensure the correctness and reliability of the generated SDK | + # Technology Stack -- **Languages**: Kotlin (primary), Java (compatibility) -- **Build System**: Gradle with Kotlin DSL -- **Code Generation**: OpenAPI Generator -- **Post-Processing**: TypeScript/JavaScript (Node.js) -- **CI/CD**: GitHub Actions -- **Testing Frameworks**: JUnit, MockK, AssertJ -- **Documentation**: Markdown, KDoc -- **Version Control**: Git -- **Package Management**: Maven Central, Sonatype Nexus -- **Dependency Management**: Gradle Kotlin DSL -- **Code Quality**: Ktlint -- **Code Coverage**: Kover + +| Capability | Technology | +|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| +| Build System | [Gradle](https://docs.gradle.org/current/userguide/userguide.html) with [Kotlin DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html) | +| Code Generation | [OpenAPI Generator](https://openapi-generator.tech/) | +| CI/CD | GitHub Actions | +| Testing | [JUnit5](https://junit.org/junit5/) | +| Version Control | Git | +| Code Quality | [Kover](https://kotlin.github.io/kotlinx-kover/gradle-plugin/) | +| Programming Languages | Kotlin (JVM) | +| Documentation | [KDoc](https://kotlinlang.org/docs/kotlin-doc.html), [Dokka](https://kotlinlang.org/docs/dokka-introduction.html) | +| Target | [Java (LTS)](https://www.oracle.com/middleeast/java/technologies/java-se-support-roadmap.html) | # Modules + The project is organized into several modules, each serving a specific purpose. The main modules include: -## `generator` module -This module is responsible for the core functionality of the SDK generation process. It consumes the OpenAPI specifications and generates the initial SDK code using OpenAPI Generator. It also integrates with the `expediagroup-sdk-openapi-plugin`. The module contains the following components: -- **OpenAPI Generator Configurations**: The core library that generates the SDK code from OpenAPI specifications. Lives in the `build.gradle.kts` file. -- **Custom Templates**: Custom templates for generating Kotlin/Java code. Lives in the `src/main/resources/templates` directory. -- **Post-Processing**: Enhancements and optimizations applied to the generated code. Lives in the `src/main/resources/post-processing` directory. +## Generator Module + +The `generator` module is responsible for the core functionality of the SDK generation process. It consumes the OpenAPI specifications and generates the initial SDK code using OpenAPI Generator. It also integrates with the`expediagroup-sdk-openapi-plugin`. + +| Generator Component/Asset | Description | +|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------| +| **OpenAPI Generator Configurations** | The core library that generates the SDK code from OpenAPI specifications. Lives in the `build.gradle.kts` file | +| **Custom Templates** | Custom templates for generating Kotlin/Java code. Lives in the `src/main/resources/templates` directory | +| **Post-Processing** | Enhancements and optimizations applied to the generated code. Lives in the `src/main/resources/post-processing` directory | + +The generation process can be executed through the `openApiGenerate` Gradle task, which triggers the OpenAPI Generator with the specified configurations. +```shell +gradle clean build -The generation process can be executed through the `openApiGenerate` Gradle task, which triggers the OpenAPI Generator with the specified configurations. The `openApiGenerate` gradle task workflow is as follows: +cd generator +gradle openApiGenerate --stacktrace +``` +The `openApiGenerate` gradle task workflow is as follows: 1. Locates the OpenAPI specification file through the `inputSpec` environment variable, falling back to `generator/src/main/resources/specs.yaml` if not found. 2. Consumes the OpenAPI specification file to generates code into the `xap-sdk/src/main/kotlin` directory. 3. Generated code overrides the code present `xap-sdk/src/main/kotlin` directory, affecting only the `operations` and `models` packages. From 9ca62d6f048e1a72b77db9eea0a4d05cd9fd895f Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 21:32:32 +0300 Subject: [PATCH 27/40] chore: update architecture documentation for XAP SDK with additional module details and gradle tasks --- ARCHITECTURE.md | 82 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 22 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index c3791b88a..25d68db58 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1,20 +1,23 @@ # Overview -The XAP (Expedia API Platform) SDK is structured as a multi-module Gradle project designed to generate a Kotlin/Java SDK from OpenAPI specifications. The architecture follows a code generation approach, where API client code is automatically generated and then published to repositories for consumption by developers. +The XAP (Expedia API Platform) SDK is structured as a multi-module Gradle project designed to generate a Kotlin/Java SDK +from OpenAPI specifications. The architecture follows a code generation approach, where API client code is automatically +generated and then published to repositories for consumption by developers. The repository contains the following key components: -| Component | Description | -|----------------------------|----------------------------------------------------------------------------------------------------------------| -| **OpenAPI Specifications** | Defines the API endpoints, request/response models, and data types | -| **Code Generation** | Utilizes OpenAPI Generator to create the SDK code based on the specifications. | -| **Core Integration** | Integrates with the Expedia Group's SDK platform core libraries and frameworks | -| **Post-Processing** | Enhances the generated code with additional features, optimizations, and customizations | -| **Publishing Tasks** | Automates the release process to make the SDK available for developers | -| **Examples** | Provides sample applications demonstrating how to use the generated SDK | -| **Documentation** | Contains guides and references for developers to understand and utilize the SDK effectively | -| **Testing** | Includes unit, integration and end-to-end tests to ensure the correctness and reliability of the generated SDK | - +| Component | Description | +|---------------------------------|-----------------------------------------------------------------------------------------------------------------| +| **OpenAPI Specifications** | Defines the API endpoints, request/response models, and data types. | +| **Code Generation** | Utilizes OpenAPI Generator to create the SDK code based on the specifications. | +| **Core Integration** | Integrates with the Expedia Group's SDK platform core libraries and frameworks. | +| **Post-Processing** | Enhances the generated code with additional features, optimizations, and customizations. | +| **Publishing Tasks** | Automates the release process to make the SDK available for developers. | +| **Examples** | Provides sample applications demonstrating how to use the generated SDK. | +| **Documentation** | Contains guides and references for developers to understand and utilize the SDK effectively. | +| **Testing** | Includes unit, integration and end-to-end tests to ensure the correctness and reliability of the generated SDK. | +| **OpenAPI Specification Files** | OpenAPI definitions. Located at `specs` directory in the root of the repository. | +| **Gradle Helper Tasks** | Gradle tasks that automate common tasks. | # Technology Stack @@ -34,26 +37,61 @@ The repository contains the following key components: The project is organized into several modules, each serving a specific purpose. The main modules include: -## Generator Module +## Root Module + +The root module serves as the entry point for the project. It contains the overall project configuration, including +dependency management, build scripts, and common configurations shared across all modules. This module also includes the +`settings.gradle.kts` file, which defines the structure of the multi-module project. +The module defines custom gradle tasks that live in the `gradle-tasks` directory. The defined tasks handle OpenAPI +specification files pre-processing, publishing, as well as for generating and publishing the SDK to a remote repository. +It also includes configurations for code quality checks, such as Ktlint and Kover. All tasks are defined using kotlin +DSL. + +| Defined Gradle Task | Description | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `mergeSpecs` | Executes the openapi-merge-cli command using npx to merge OpenAPI specs. | +| `transformSpecs` | Executes the spec-transformer CLI command using npx to transform the OpenAPI specs. | +| `prepareSpecs` | A wrapper for the sequential execution of `mergeSpecs` and `transformSpecs`. Generates and copies a final specs.yaml file to the generator module's resources directory | + +## Generator Module + +The `generator` module is responsible for the core functionality of the SDK generation process. It consumes the OpenAPI +specifications and generates the initial SDK code using OpenAPI Generator. It also integrates with the +`expediagroup-sdk-openapi-plugin`. -The `generator` module is responsible for the core functionality of the SDK generation process. It consumes the OpenAPI specifications and generates the initial SDK code using OpenAPI Generator. It also integrates with the`expediagroup-sdk-openapi-plugin`. +| Generator Component/Asset | Description | +|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------| +| **OpenAPI Generator Configurations** | The core library that generates the SDK code from OpenAPI specifications. Lives in the `build.gradle.kts` file. | +| **Custom Templates** | Custom templates for generating Kotlin/Java code. Lives in the `src/main/resources/templates` directory. | +| **Post-Processing** | Enhancements and optimizations applied to the generated code. Lives in the `src/main/resources/post-processing` directory. | -| Generator Component/Asset | Description | -|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------| -| **OpenAPI Generator Configurations** | The core library that generates the SDK code from OpenAPI specifications. Lives in the `build.gradle.kts` file | -| **Custom Templates** | Custom templates for generating Kotlin/Java code. Lives in the `src/main/resources/templates` directory | -| **Post-Processing** | Enhancements and optimizations applied to the generated code. Lives in the `src/main/resources/post-processing` directory | +The generation process can be executed through the `openApiGenerate` Gradle task, which triggers the OpenAPI Generator +with the specified configurations. -The generation process can be executed through the `openApiGenerate` Gradle task, which triggers the OpenAPI Generator with the specified configurations. ```shell gradle clean build cd generator gradle openApiGenerate --stacktrace ``` + The `openApiGenerate` gradle task workflow is as follows: -1. Locates the OpenAPI specification file through the `inputSpec` environment variable, falling back to `generator/src/main/resources/specs.yaml` if not found. + +1. Locates the OpenAPI specification file through the `inputSpec` environment variable, falling back to + `generator/src/main/resources/specs.yaml` if not found. 2. Consumes the OpenAPI specification file to generates code into the `xap-sdk/src/main/kotlin` directory. -3. Generated code overrides the code present `xap-sdk/src/main/kotlin` directory, affecting only the `operations` and `models` packages. +3. Generated code overrides the code present `xap-sdk/src/main/kotlin` directory, affecting only the `operations` and + `models` packages. 4. The generated code is then post-processed to apply additional customizations and optimizations. 5. Finally, the code is formatted and linted using Ktlint to ensure code quality and consistency. + +## Build-Logic Module + +The `buildSrc` module is +a [Gradle build logic module](https://docs.gradle.org/current/userguide/sharing_build_logic_between_subprojects.html#sec:using_buildsrc) +that contains custom Gradle plugins and shared build logic used across the project. It allows for better organization +and reusability of build scripts and configurations. + +The `buildSrc` module is used to define OpenAPI Generator customizations, such as custom mustache lambdas. This module +can be used to define custom Gradle tasks, plugins, and other build-related logic that can be reused across the project. +It is automatically included in the build process and can be used to extend the functionality of Gradle. From b448641b1b725fa92185cff9a40582dc94d8a289 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 21:53:22 +0300 Subject: [PATCH 28/40] chore: update architecture documentation for XAP SDK with additional details on Gradle tasks and module structure --- ARCHITECTURE.md | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 25d68db58..d9796a2ef 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -21,17 +21,17 @@ The repository contains the following key components: # Technology Stack -| Capability | Technology | -|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| -| Build System | [Gradle](https://docs.gradle.org/current/userguide/userguide.html) with [Kotlin DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html) | -| Code Generation | [OpenAPI Generator](https://openapi-generator.tech/) | -| CI/CD | GitHub Actions | -| Testing | [JUnit5](https://junit.org/junit5/) | -| Version Control | Git | -| Code Quality | [Kover](https://kotlin.github.io/kotlinx-kover/gradle-plugin/) | -| Programming Languages | Kotlin (JVM) | -| Documentation | [KDoc](https://kotlinlang.org/docs/kotlin-doc.html), [Dokka](https://kotlinlang.org/docs/dokka-introduction.html) | -| Target | [Java (LTS)](https://www.oracle.com/middleeast/java/technologies/java-se-support-roadmap.html) | +| Capability | Technology | +|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| +| **Build System** | [Gradle](https://docs.gradle.org/current/userguide/userguide.html) with [Kotlin DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html) | +| **Code Generation** | [OpenAPI Generator](https://openapi-generator.tech/) | +| **CI/CD** | GitHub Actions | +| **Testing** | [JUnit5](https://junit.org/junit5/) | +| **Version Control** | Git | +| **Code Quality** | [Kover](https://kotlin.github.io/kotlinx-kover/gradle-plugin/) | +| **Programming Languages** | Kotlin (JVM) | +| **Documentation** | [KDoc](https://kotlinlang.org/docs/kotlin-doc.html), [Dokka](https://kotlinlang.org/docs/dokka-introduction.html) | +| **Target** | [Java (LTS)](https://www.oracle.com/middleeast/java/technologies/java-se-support-roadmap.html) | # Modules @@ -47,11 +47,12 @@ specification files pre-processing, publishing, as well as for generating and pu It also includes configurations for code quality checks, such as Ktlint and Kover. All tasks are defined using kotlin DSL. -| Defined Gradle Task | Description | -|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `mergeSpecs` | Executes the openapi-merge-cli command using npx to merge OpenAPI specs. | -| `transformSpecs` | Executes the spec-transformer CLI command using npx to transform the OpenAPI specs. | -| `prepareSpecs` | A wrapper for the sequential execution of `mergeSpecs` and `transformSpecs`. Generates and copies a final specs.yaml file to the generator module's resources directory | +| Defined Gradle Task | Description | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `mergeSpecs` | Executes the openapi-merge-cli command using npx to merge OpenAPI specs. | +| `transformSpecs` | Executes the spec-transformer CLI command using npx to transform the OpenAPI specs. | +| `prepareSpecs` | A wrapper for the sequential execution of `mergeSpecs` and `transformSpecs`. Generates and copies a final specs.yaml file to the generator module's resources directory | +| `publishSnapshot` | Triggers the execution of the `publish` task. It verifies the artifact has a valid snapshot version suffix, ensures the publish task exists, executes the publish task, and outputs confirmation messages with the repository URL where the artifact can be accessed. | ## Generator Module @@ -95,3 +96,16 @@ and reusability of build scripts and configurations. The `buildSrc` module is used to define OpenAPI Generator customizations, such as custom mustache lambdas. This module can be used to define custom Gradle tasks, plugins, and other build-related logic that can be reused across the project. It is automatically included in the build process and can be used to extend the functionality of Gradle. + +## XAP SDK Module + +The `xap-sdk` module is the main module that contains the generated SDK code. It includes the generated API client code, +along with SDK specific configurations and SDK core libraries integrations. The module is structured as follows: + +| Package | Generated | Description | +|-----------------|-----------|----------------------------------------------------------------------------------------------------| +| `core` | **No** | SDK core libraries integrations. Defines the workflow for sync and async operations execution. | +| `configuration` | **No** | SDK specific configurations such as endpoints, jackson configurations and others. | +| `client` | **No** | API clients that are responsible for executing operations. | +| `operations` | **YES** | Representations of available API requests. Generated based on the OpenAPI spec defined operations. | +| `models` | **YES** | Representation of API models. Generated based on the OpenAPI spec defined schemas | From 51e4be5996d8ead2aaf1b00c3eff4d7cc379fd1e Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 21:55:59 +0300 Subject: [PATCH 29/40] chore: update architecture documentation for XAP SDK with additional module descriptions --- ARCHITECTURE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index d9796a2ef..93e6054fa 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -36,6 +36,10 @@ The repository contains the following key components: # Modules The project is organized into several modules, each serving a specific purpose. The main modules include: +* Root Module: The root of the repository. +* Generator Module: Located at the `generator` directory. +* Build-Logic Module: Located at the `buildSrc` directory. +* XAP SDK Module: Located at the `xap-sdk` directory. ## Root Module From 3637c6d516b2f58b746dc03113183e1df771130b Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 21:57:21 +0300 Subject: [PATCH 30/40] chore: update architecture documentation for XAP SDK to clarify key functionalities --- ARCHITECTURE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 93e6054fa..b170c638f 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -4,7 +4,7 @@ The XAP (Expedia API Platform) SDK is structured as a multi-module Gradle projec from OpenAPI specifications. The architecture follows a code generation approach, where API client code is automatically generated and then published to repositories for consumption by developers. -The repository contains the following key components: +The repository embraces the following key functionalities: | Component | Description | |---------------------------------|-----------------------------------------------------------------------------------------------------------------| From 0235fa06c43b82ff65a5f2550c9f71d38877a056 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 22:39:41 +0300 Subject: [PATCH 31/40] chore: update architecture documentation for XAP SDK to clarify key components and functionalities --- ARCHITECTURE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index b170c638f..f7ab94bd1 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -4,7 +4,7 @@ The XAP (Expedia API Platform) SDK is structured as a multi-module Gradle projec from OpenAPI specifications. The architecture follows a code generation approach, where API client code is automatically generated and then published to repositories for consumption by developers. -The repository embraces the following key functionalities: +The repository embraces the following key components and functionalities: | Component | Description | |---------------------------------|-----------------------------------------------------------------------------------------------------------------| From aba32e26fd8037a12dd94958812cab60b03020f5 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 22:44:44 +0300 Subject: [PATCH 32/40] chore: add auto-approval workflow for Dependabot and Renovate PRs --- .github/workflows/pr-auto-approve.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/pr-auto-approve.yaml diff --git a/.github/workflows/pr-auto-approve.yaml b/.github/workflows/pr-auto-approve.yaml new file mode 100644 index 000000000..99bdeaf2b --- /dev/null +++ b/.github/workflows/pr-auto-approve.yaml @@ -0,0 +1,16 @@ +name: Auto First Approval for Bot PRs +on: pull_request + +jobs: + auto-first-approve: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read + if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]' + steps: + - name: Provide first approval + uses: hmarr/auto-approve-action@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + review-message: "Renovate and Dependabot PRs are automatically approved. Still requires human review." From 20496bbef746f7d485a8d7a6496dbbc2c4fb09d8 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 23:01:47 +0300 Subject: [PATCH 33/40] chore: update publish workflow to use version input for releases --- .github/workflows/generate-publish-sdk.yaml | 22 +++++++++------------ 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index 986deb607..b9affda83 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -2,9 +2,9 @@ id: generate-publish-sdk-new on: workflow_dispatch: inputs: - snapshot: - type: checkbox - description: "Is a snapshot release?" + version: + type: string + description: "Version to publish. For snapshot releases, add `-SNAPSHOT` suffix to the version. For example, `1.0.0-SNAPSHOT`." required: true default: true @@ -12,17 +12,14 @@ jobs: generate-and-publish: runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set Up JDK - uses: actions/setup-java@v3 + - uses: actions/setup-java@v3 with: distribution: 'corretto' java-version: '21' - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + - uses: gradle/actions/setup-gradle@v4 with: gradle-version: "8.13" @@ -30,8 +27,7 @@ jobs: working-directory: generator/src/main/resources/post-processor run: npm ci && npm run clean && npm run compile - - name: Build Project - run: gradle build + - run: gradle build - name: Generate SDK working-directory: generator @@ -57,9 +53,9 @@ jobs: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} run: | - if [ -z "${{ github.event.inputs.snapshot }}" ]; then + version="${{ github.event.inputs.version }}" + if [[ "${v// /}" == *"-SNAPSHOT" ]]; then gradle publishSnapshot else - exit 1 gradle publishToSonatype closeAndReleaseSonatypeStagingRepository fi From 4371b762537cd7a718eb04f62b0e32f22b990292 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 24 Mar 2025 23:35:16 +0300 Subject: [PATCH 34/40] chore: update publish SDK workflow to pass version input for snapshot and release tasks --- .github/workflows/generate-publish-sdk.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index b9affda83..a7083af8c 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -1,4 +1,3 @@ -id: generate-publish-sdk-new on: workflow_dispatch: inputs: @@ -55,7 +54,7 @@ jobs: run: | version="${{ github.event.inputs.version }}" if [[ "${v// /}" == *"-SNAPSHOT" ]]; then - gradle publishSnapshot + gradle publishSnapshot -PVERSION="${version}" else - gradle publishToSonatype closeAndReleaseSonatypeStagingRepository + gradle publishToSonatype closeAndReleaseSonatypeStagingRepository -PVERSION="${version}" fi From 07776d4423674dd49fd18d01c0b37d60c87ced82 Mon Sep 17 00:00:00 2001 From: Omar Aljarrah <50204418+OmarAlJarrah@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:49:09 +0300 Subject: [PATCH 35/40] chore: add examples (#96) Co-authored-by: mdwairi --- .gitignore | 2 + examples/build.gradle.kts | 18 + .../sdk/xap/examples/XapSdkDemoTestRun.java | 60 +++ .../xap/examples/scenarios/XapScenario.java | 28 ++ .../car/CarDetailsQuickStartScenario.java | 262 ++++++++++ .../car/CarListingsQuickStartScenario.java | 176 +++++++ ...ailabilityCalendarsQuickStartScenario.java | 94 ++++ .../HotelIdsSearchEndToEndScenario.java | 335 ++++++++++++ .../lodging/ListingsQuickStartScenario.java | 194 +++++++ .../lodging/QuotesQuickStartScenario.java | 145 ++++++ .../VrboPropertySearchEndToEndScenario.java | 476 ++++++++++++++++++ .../scenarios/lodging/VrboScenario.java | 28 ++ examples/src/main/resources/log4j2.xml | 29 ++ settings.gradle.kts | 1 + 14 files changed, 1848 insertions(+) create mode 100644 examples/build.gradle.kts create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/XapSdkDemoTestRun.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/HotelIdsSearchEndToEndScenario.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java create mode 100644 examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java create mode 100644 examples/src/main/resources/log4j2.xml diff --git a/.gitignore b/.gitignore index b1dff0dd9..8ecd06695 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .gradle +.idea + build/ !gradle/wrapper/gradle-wrapper.jar !**/src/main/**/build/ diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts new file mode 100644 index 000000000..afaa45e65 --- /dev/null +++ b/examples/build.gradle.kts @@ -0,0 +1,18 @@ +plugins { + id("java") +} + +group = project.property("GROUP_ID") as String + +repositories { + mavenCentral() +} + +dependencies { + implementation(project(":xap-sdk")) + + implementation("org.apache.logging.log4j:log4j-api:2.24.3") + implementation("org.apache.logging.log4j:log4j-slf4j2-impl:2.24.3") + implementation("com.fasterxml.jackson.core:jackson-databind:2.18.3") + implementation("org.apache.commons:commons-lang3:3.17.0") +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/XapSdkDemoTestRun.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/XapSdkDemoTestRun.java new file mode 100644 index 000000000..270adc9c8 --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/XapSdkDemoTestRun.java @@ -0,0 +1,60 @@ +package com.expediagroup.sdk.xap.examples; + + +import com.expediagroup.sdk.xap.examples.scenarios.car.CarDetailsQuickStartScenario; +import com.expediagroup.sdk.xap.examples.scenarios.car.CarListingsQuickStartScenario; +import com.expediagroup.sdk.xap.examples.scenarios.lodging.AvailabilityCalendarsQuickStartScenario; +import com.expediagroup.sdk.xap.examples.scenarios.lodging.HotelIdsSearchEndToEndScenario; +import com.expediagroup.sdk.xap.examples.scenarios.lodging.ListingsQuickStartScenario; +import com.expediagroup.sdk.xap.examples.scenarios.lodging.VrboPropertySearchEndToEndScenario; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This is an aggregation runner for all the scenarios for test purposes. + * For reference, see the individual scenarios in the scenarios package. + */ +public class XapSdkDemoTestRun { + private static final Logger logger = LoggerFactory.getLogger(XapSdkDemoTestRun.class); + + /** + * Main method. + */ + public static void main(String[] args) { + + logger.info( + "============================== Running Lodging Scenarios ============================="); + + AvailabilityCalendarsQuickStartScenario availabilityCalendarsQuickStartScenario = + new AvailabilityCalendarsQuickStartScenario(); + availabilityCalendarsQuickStartScenario.run(); + + ListingsQuickStartScenario listingsQuickStartScenario = new ListingsQuickStartScenario(); + listingsQuickStartScenario.run(); + + HotelIdsSearchEndToEndScenario hotelIdsSearchEndToEndScenario = + new HotelIdsSearchEndToEndScenario(); + hotelIdsSearchEndToEndScenario.run(); + + VrboPropertySearchEndToEndScenario vrboPropertySearchEndToEndScenario = + new VrboPropertySearchEndToEndScenario(); + vrboPropertySearchEndToEndScenario.run(); + + logger.info( + "=============================== End of Lodging Scenarios =============================="); + + logger.info( + "============================== Running Car Scenarios ============================="); + CarListingsQuickStartScenario carListingsQuickStartScenario = + new CarListingsQuickStartScenario(); + + carListingsQuickStartScenario.run(); + + CarDetailsQuickStartScenario carDetailsQuickStartScenario = new CarDetailsQuickStartScenario(); + carDetailsQuickStartScenario.run(); + logger.info( + "=============================== End of Car Scenarios =============================="); + + System.exit(0); + } +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java new file mode 100644 index 000000000..8c3ff007c --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java @@ -0,0 +1,28 @@ +package com.expediagroup.sdk.xap.examples.scenarios; + +import com.expediagroup.sdk.xap.client.XapClient; + +/** + * Interface for scenarios. + */ +public interface XapScenario { + + String PARTNER_TRANSACTION_ID = "xap-java-sdk-examples"; + + void run(); + + /** + * Create a client. + * + * @return XapClient + */ + default XapClient createClient() { + String key = System.getProperty("com.expediagroup.xapjavasdk.apikey"); + String secret = System.getProperty("com.expediagroup.xapjavasdk.apisecret"); + return XapClient + .builder() + .key(key) + .secret(secret) + .build(); + } +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java new file mode 100644 index 000000000..12d9ec00e --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarDetailsQuickStartScenario.java @@ -0,0 +1,262 @@ +package com.expediagroup.sdk.xap.examples.scenarios.car; + +import com.expediagroup.sdk.rest.model.Response; +import com.expediagroup.sdk.xap.client.XapClient; +import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; +import com.expediagroup.sdk.xap.models.CarDetails; +import com.expediagroup.sdk.xap.models.CarDetailsResponse; +import com.expediagroup.sdk.xap.models.CarListingsResponse; +import com.expediagroup.sdk.xap.models.VehicleDetails; +import com.expediagroup.sdk.xap.operations.GetCarDetailsOperation; +import com.expediagroup.sdk.xap.operations.GetCarDetailsOperationParams; +import com.expediagroup.sdk.xap.operations.GetCarsListingsOperation; +import com.expediagroup.sdk.xap.operations.GetCarsListingsOperationParams; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This example demonstrates how to retrieve CarDetails information using the Car Details DeepLink + * obtained from the car listing. + */ +public class CarDetailsQuickStartScenario implements XapScenario { + + private static final Logger LOGGER = LoggerFactory.getLogger(CarDetailsQuickStartScenario.class); + + /** + * Summary: main function. + */ + public static void main(String[] args) { + new CarListingsQuickStartScenario().run(); + new CarDetailsQuickStartScenario().run(); + System.exit(0); + } + + /** + * Summary: split URL into components. + */ + public static String[] splitUrl(String url) { + String[] parts = url.split("\\?"); + String base = parts[0]; + String query = parts[1]; + + String offerToken = base.substring(base.lastIndexOf("/") + 1); + String[] queryParams = query.split("&"); + String price = queryParams[0].split("=")[1]; + String currency = queryParams[1].split("=")[1]; + + return new String[] {offerToken, price, currency}; + } + + @Override + public void run() { + LOGGER.info("========== Start QuickStartScenario =========="); + + LOGGER.info("========== Car Listing Start =========="); + + // This example demonstrates how to obtain the Car Details Deep Link from the CarListing. + // For information on using car search, refer to + // car/shopping/listings/ListingsQuickStartExample. + List linksList = new ArrayList<>(); + linksList.add(GetCarsListingsOperationParams.Links.AD); + linksList.add(GetCarsListingsOperationParams.Links.WS); + linksList.add(GetCarsListingsOperationParams.Links.WD); + GetCarsListingsOperationParams getCarsListingsOperationParams = + GetCarsListingsOperationParams.builder() + .partnerTransactionId("EWSCar_Automation") + .dropOffAirport("MCO") + .pickupAirport("MCO") + .pickupTime( + LocalDateTime.now() + .withNano(0) + .withSecond(0) + .withHour(10) + .plusDays(10) + .plusMonths(1) + ) + .dropOffTime( + LocalDateTime.now() + .withNano(0) + .withSecond(0) + .withHour(10) + .plusDays(15) + .plusMonths(1) + ) + .limit(1) + .links(linksList) + .build(); + + XapClient xapClient = createClient(); + GetCarsListingsOperation getCarsListingsOperation = + new GetCarsListingsOperation(getCarsListingsOperationParams); + Response carListingsResponse = xapClient.execute(getCarsListingsOperation); + + LOGGER.info("========== Car Listing Property End =========="); + + // Iterate through the car listings and retrieve the Car Details Deep Link. + LOGGER.info("========== Car Details Start =========="); + Objects.requireNonNull(carListingsResponse.getData().getCars()).forEach(car -> { + if (!car.getLinks().get("ApiDetails").getHref().isEmpty()) { + // Retrieve the Car Details Deep Link from the car listing. + LOGGER.info("Car Details Deep Link: " + car.getLinks().get("ApiDetails").getHref()); + String[] strings = splitUrl(car.getLinks().get("ApiDetails").getHref()); + + // Retrieve the Car Details information using the Car Details Deep Link, which + // includes (offerToken, price, currency) + GetCarDetailsOperationParams getCarDetailsOperationParams = + GetCarDetailsOperationParams.builder().partnerTransactionId("EWSCar_Automation") + .offerToken(strings[0]).price(strings[1]).currency(strings[2]).build(); + + // Execute the operation and get the CarDetailsResponse + LOGGER.info("========== Executing GetCarDetailsOperation =========="); + CarDetailsResponse carDetailsResponse = xapClient.execute( + new GetCarDetailsOperation(getCarDetailsOperationParams)).getData(); + LOGGER.info("========== GetCarDetailsOperation Executed =========="); + + if (carDetailsResponse == null || carDetailsResponse.getLinks() == null) { + throw new IllegalStateException("No car found."); + } + + LOGGER.info("========== Car Properties Start =========="); + + // The CarDetailsResponse contains a transaction ID for troubleshooting + LOGGER.info("Transaction ID: {}", carDetailsResponse.getTransactionId()); + + // List Container for warning messages + if (carDetailsResponse.getWarnings() != null) { + LOGGER.info("Warnings: {}", carDetailsResponse.getWarnings()); + } + + // Details of requested car. + // Details refer to the CarDetails Section table below. + if (carDetailsResponse.getValidFormsOfPayment() != null) { + LOGGER.info("Valid Forms Of Payment: {}", carDetailsResponse.getValidFormsOfPayment()); + } + + // A map of links to other Car APIs. + if (carDetailsResponse.getLinks() != null) { + LOGGER.info("Links: {}", carDetailsResponse.getLinks()); + } + + // Specific information for a car. + CarDetails carDetails = carDetailsResponse.getCarDetails(); + VehicleDetails vehicleDetails = carDetails.getVehicleDetails(); + if (vehicleDetails.getMake() != null) { + //Car manufacturer and model. + LOGGER.info("Make: {}", vehicleDetails.getMake()); + } + + // Car category and type. + LOGGER.info("Car Class: {}", vehicleDetails.getCarClass()); + + // Minimal car door count. + if (vehicleDetails.getMinDoors() != null) { + LOGGER.info("Min Doors: {}", vehicleDetails.getMinDoors()); + } + + // Maximum car door count. + if (vehicleDetails.getMaxDoors() != null) { + LOGGER.info("Max Doors: {}", vehicleDetails.getMaxDoors()); + } + + // Car fuel information. + if (vehicleDetails.getFuelLevel() != null) { + // Fuel level of the car. + LOGGER.info("Fuel Level: {}", vehicleDetails.getFuelLevel()); + } + + // Car category. + LOGGER.info("Car Category: {}", vehicleDetails.getCarCategory()); + + // Car type. + LOGGER.info("Car Type: {}", vehicleDetails.getCarType()); + + // Car transmission and drive. + LOGGER.info("Transmission Drive: {}", vehicleDetails.getTransmissionDrive()); + + // Car fuel type and whether Air Conditioning is included. + LOGGER.info("Fuel AC: {}", vehicleDetails.getFuelAC()); + + // Capacity for car's properties, which include AdultCount, ChildCount, SmallLuggageCount + // and LargeLuggageCount. + if (vehicleDetails.getCapacity() != null) { + LOGGER.info("Capacity: {}", vehicleDetails.getCapacity()); + } + + // Car rental supplier. + LOGGER.info(" : {}", carDetails.getSupplier()); + + // Pickup information + LOGGER.info("Pickup Details: {}", carDetails.getPickupDetails()); + + // Drop off information, include drop off date time and drop off location information. + LOGGER.info("Drop Off Details: {}", carDetails.getDropOffDetails()); + + // The rate information for a car product. + LOGGER.info("Rate Details: {}", carDetails.getRateDetails()); + + // Base price per rate period. + LOGGER.info("Price: {}", carDetails.getPrice()); + + // List of TaxesAndFees Details. + if (carDetails.getTaxesAndFeesDetails() != null) { + LOGGER.info("Taxes And Fees Details: {}", carDetails.getTaxesAndFeesDetails()); + } + + // List of ExtraFeesDetails + if (carDetails.getExtraFeesDetails() != null) { + LOGGER.info("Extra Fees Details: {}", carDetails.getExtraFeesDetails()); + } + + // ReferencePrice is the totalPrice for the comparable standalone car, when there is + // a discounted car or need to show strike through pricing. + if (carDetails.getReferencePrice() != null) { + LOGGER.info("Reference Price: {}", carDetails.getReferencePrice()); + } + + // List of additional fees including both mandatory and optional fees such as young driver + // fee/drop off fee /CollisionDamageWaiver. + if (carDetails.getAdditionalFees() != null) { + LOGGER.info("Additional Fees: {}", carDetails.getAdditionalFees()); + } + + // Description and costs of any optional special equipment that may be rented with the car. + if (carDetails.getSpecialEquipments() != null) { + LOGGER.info("Special Equipments: {}", carDetails.getSpecialEquipments()); + } + + // Limitations that are part of this rental agreement. + if (carDetails.getRentalLimits() != null) { + LOGGER.info("Rental Limits: {}", carDetails.getRentalLimits()); + } + + // Cancellation Policy Container. + LOGGER.info("Cancellation Policy: {}", carDetails.getCancellationPolicy()); + + // Container for no show penalty + if (carDetails.getNoShowPenalty() != null) { + LOGGER.info("No Show Penalty: {}", carDetails.getNoShowPenalty()); + } + + // A list of policies that apply to this car rental. + if (carDetails.getCarPolicies() != null) { + LOGGER.info("Policies: {}", carDetails.getCarPolicies()); + } + + // List of image resources of the car product. + if (carDetails.getImages() != null) { + LOGGER.info("Images: {}", carDetails.getImages()); + } + + LOGGER.info("========== Property End =========="); + } + + }); + + LOGGER.info("========== End QuickStartExample =========="); + } + +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java new file mode 100644 index 000000000..4851f2d45 --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/car/CarListingsQuickStartScenario.java @@ -0,0 +1,176 @@ +package com.expediagroup.sdk.xap.examples.scenarios.car; + +import com.expediagroup.sdk.xap.client.XapClient; +import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; +import com.expediagroup.sdk.xap.models.CarListingsResponse; +import com.expediagroup.sdk.xap.operations.GetCarsListingsOperation; +import com.expediagroup.sdk.xap.operations.GetCarsListingsOperationParams; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This example demonstrates how to search for car properties with an Airport keyword with filters + * applied. + */ +public class CarListingsQuickStartScenario implements XapScenario { + + private static final Logger LOGGER = LoggerFactory.getLogger(CarListingsQuickStartScenario.class); + + /** + * Summary: main function. + */ + public static void main(String[] args) { + new CarListingsQuickStartScenario().run(); + System.exit(0); + } + + @Override + public void run() { + LOGGER.info( + "========================= Running CarListingsQuickStartScenario ========================"); + + LOGGER.info( + "======================== Executing GetCarsListingsOperation ======================="); + // This example will search for properties based on the following criteria: + // 1. The pickup airport is MCO, and the drop-off airport is MCO; + // 2. The pickup time is "2025-01-15T11:00", and the drop-off time is "2025-01-19T11:00"; + // 3. The results should include API details, web search, and web details link; + // 4. Limit the results to 5; + + // Create a list to store the types of links to be returned. + // The added link types include(API details link, Web search link, and Web details link). + List linksList = new ArrayList<>(); + linksList.add(GetCarsListingsOperationParams.Links.AD); + linksList.add(GetCarsListingsOperationParams.Links.WS); + linksList.add(GetCarsListingsOperationParams.Links.WD); + + GetCarsListingsOperationParams getCarsListingsOperationParams = + GetCarsListingsOperationParams.builder().partnerTransactionId("EWSCar_Automation") + //Three letter code for the airport at which the customer would like to pick up the car. + //Supported values: standard 3 letter IATA Airport Code. + //Cannot coexist with other pickup parameters, only one pickup parameter is allowed per + //request. + .pickupAirport("MCO") + //Three letter code for the airport at which the customer would like to drop off the + //car. + //Supported values: standard 3 letter IATA Airport Code. + //Cannot coexist with other drop off parameters, only one drop off parameter is allowed + //per request. + //If no drop off location is specified, it is assumed that the customer will be dropping + //the car off at the same location at which they picked it up. + .dropOffAirport("MCO") + //Requested car pickup date and time. + //Date should be ISO8601 Date format.The supported search window is today to 330 days in + //the future. + //(Note that each rental counter has different hours of operation. If you select a time + //in the middle of the night there may be no inventory available as all locations may be + //closed.) + .pickupTime( + LocalDateTime.now() + .withNano(0) + .withSecond(0) + .withHour(10) + .plusDays(10) + .plusMonths(1) + ) + //Requested car drop off date and time. + //Date should be ISO8601 Date format.The supported search window is today to 330 days in + //the future. + //The drop-off datetime should occur at least 2 hours after the pickup datetime. + .dropOffTime( + LocalDateTime.now() + .withNano(0) + .withSecond(0) + .withHour(10) + .plusDays(15) + .plusMonths(1) + ) + .pickupRadius(10) + .dropOffRadius(10) + //The maximum number of search results that will be returned by the query. + .limit(5) + .partnerTransactionId("BestTravel-123456-798101112") + .links(linksList) + .build(); + + XapClient xapClient = createClient(); + + // Execute the operation and get the CarListingsResponse + CarListingsResponse carListingsResponse = + xapClient.execute(new GetCarsListingsOperation(getCarsListingsOperationParams)).getData(); + LOGGER.info( + "======================== GetCarsListingsOperation Executed ========================"); + + if (carListingsResponse == null || carListingsResponse.getCars() == null + || carListingsResponse.getCars().isEmpty()) { + throw new IllegalStateException("No cars found."); + } + + // The CarListingsResponse contains a transaction ID for troubleshooting + LOGGER.info("Transaction ID: {}", carListingsResponse.getTransactionId()); + // To get the total number of car found + LOGGER.info("Car Count: {}", carListingsResponse.getCarCount()); + + // To access the properties, iterate through the list of car properties + carListingsResponse.getCars().forEach(car -> { + LOGGER.info("======================== Car Properties Start ========================"); + + // Uniquely identifies a Car Offer. + LOGGER.info("Car Id: {}", car.getId()); + + // Specific information for a car. + LOGGER.info("Car VehicleDetails: {}", car.getVehicleDetails()); + + // The supplier of the car being offered. + LOGGER.info("Car Supplier: {}", car.getSupplier()); + + // Get Pickup information of the car. + LOGGER.info("Pick up Details: {}", car.getPickupDetails()); + + // Get Drop off information of the car. + LOGGER.info("Drop Off Details: {}", car.getDropOffDetails()); + + // Get the API details link, web search link, and web details link from the links collection. + if (!car.getLinks().isEmpty()) { + if (car.getLinks().get("ApiDetails") != null) { + LOGGER.info("ApiDetails Link: {}", car.getLinks().get("ApiDetails")); + } + if (car.getLinks().get("WebSearch") != null) { + LOGGER.info("WebSearch Link: {}", car.getLinks().get("WebSearch")); + } + if (car.getLinks().get("WebDetails") != null) { + LOGGER.info("WebDetails Link: {}", car.getLinks().get("WebDetails")); + } + } + + // The rate detail information for a car offer. + if (car.getRateDetails() != null) { + LOGGER.info("Rate Details: {}", car.getRateDetails()); + } + + // Get the detailed pricing information for the rental of the car offer, + LOGGER.info("Car Price: {}", car.getPrice()); + + + // Get a list of additional fees, including both mandatory and optional fees. + if (car.getAdditionalFees() != null) { + LOGGER.info("Additional Fees: {}", car.getAdditionalFees()); + } + + // Get the cancellation policy for the car offer, + LOGGER.info("Cancellation Policy: {}", car.getCancellationPolicy()); + + // Container for no show penalty element. + if (car.getNoShowPenalty() != null) { + LOGGER.info("No Show Penalty: {}", car.getNoShowPenalty()); + } + + LOGGER.info("======================== Property End ========================"); + }); + LOGGER.info( + "======================== End CarListingsQuickStartScenario ========================"); + } +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java new file mode 100644 index 000000000..a3fe7f9e1 --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java @@ -0,0 +1,94 @@ +package com.expediagroup.sdk.xap.examples.scenarios.lodging; + + +import com.expediagroup.sdk.xap.client.XapClient; +import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse; +import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperation; +import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperationParams; +import java.util.Arrays; +import java.util.HashSet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This example demonstrates how to use Availability Calendar api with simple search. + * In terms of how to get property ids, you can refer to {@link VrboPropertySearchEndToEndScenario}. + * + *

Note: this is a Vrbo scenario. You need a key that is enabled for Vrbo brand to run this. + */ +public class AvailabilityCalendarsQuickStartScenario implements VrboScenario { + + private static final Logger LOGGER = + LoggerFactory.getLogger(AvailabilityCalendarsQuickStartScenario.class); + + public static void main(String[] args) { + new AvailabilityCalendarsQuickStartScenario().run(); + System.exit(0); + } + + @Override + public void run() { + // This example returns the availability of each day for a range of dates for given Expedia + // lodging properties. + + LOGGER.info( + "=================== Running AvailabilityCalendarsQuickStartScenario ==================="); + + LOGGER.info( + "================= Executing GetLodgingAvailabilityCalendars Operation ================"); + + + // Build the query parameters with GetLodgingAvailabilityCalendarsOperationParams + GetLodgingAvailabilityCalendarsOperationParams availabilityCalendarsOperationParams = + GetLodgingAvailabilityCalendarsOperationParams.builder() + .partnerTransactionId(PARTNER_TRANSACTION_ID) + // Set of Expedia Property IDs. + .propertyIds(new HashSet<>(Arrays.asList("87704892", "36960201"))) + .build(); + + XapClient xapClient = createClient(); + + // Execute the operation and get the AvailabilityCalendarsResponse + AvailabilityCalendarResponse availabilityCalendarResponse = + xapClient.execute(new GetLodgingAvailabilityCalendarsOperation( + availabilityCalendarsOperationParams)).getData(); + + // If you want to use the async method, you can use the following code: + // --------------------------------------------------------------- + // CompletableFuture> completableFuture = + // xapClient.executeAsync( + // new GetLodgingAvailabilityCalendarsOperation(availabilityCalendarsOperationParams)); + // completableFuture.thenAccept(availCalendarResponse -> { + // // Your code here + // }); + // --------------------------------------------------------------- + + LOGGER.info( + "================== GetLodgingAvailabilityCalendarsOperation Executed ================="); + + if (availabilityCalendarResponse == null + || availabilityCalendarResponse.getAvailabilityCalendars() == null + || availabilityCalendarResponse.getAvailabilityCalendars().isEmpty()) { + throw new IllegalStateException("No properties found."); + } + + // The AvailabilityCalendarsResponse contains a transaction ID for troubleshooting + LOGGER.info("Transaction ID: {}", availabilityCalendarResponse.getTransactionId()); + + // To access the properties, iterate through the list of properties + availabilityCalendarResponse.getAvailabilityCalendars().forEach(availCalendar -> { + LOGGER.info("========== Property:{} Start ==========", availCalendar.getPropertyId()); + + // Availability of property: A string of codes that shows property availability, one for every + // day in the specified date range. + // Valid values include Y (available) and N (unavailable). + LOGGER.info("Availability: {}", availCalendar.getAvailability()); + + LOGGER.info( + "==================================== Property End ==================================="); + + LOGGER.info( + "===================== End AvailabilityCalendarsQuickStartScenario ===================="); + }); + } +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/HotelIdsSearchEndToEndScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/HotelIdsSearchEndToEndScenario.java new file mode 100644 index 000000000..e055888f1 --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/HotelIdsSearchEndToEndScenario.java @@ -0,0 +1,335 @@ +package com.expediagroup.sdk.xap.examples.scenarios.lodging; + + +import com.expediagroup.sdk.rest.model.Response; +import com.expediagroup.sdk.xap.client.XapClient; +import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; +import com.expediagroup.sdk.xap.models.Hotel; +import com.expediagroup.sdk.xap.models.HotelListingsResponse; +import com.expediagroup.sdk.xap.models.PresignedUrlResponse; +import com.expediagroup.sdk.xap.models.RoomType; +import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperation; +import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperationParams; +import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperation; +import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperationParams; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This example demonstrates how to retrieve accessible property ids from SDP DownloadURL API and + * then get the content and prices of these properties using the Lodging Listings API. + * + *

This is a common scenario for meta site partners. In practice, you can build a cache with the + * property id list, content and prices to improve respond time of your pages. + */ +public class HotelIdsSearchEndToEndScenario implements XapScenario { + + private final XapClient client = createClient(); + + private static final Logger LOGGER = + LoggerFactory.getLogger(HotelIdsSearchEndToEndScenario.class); + + /** + * This field limits the number of line to read from the SDP DownloadURL API Listings file to + * reduce time to run the example. + * If the first 20 properties from the file are not accessible OR available when you run this + * example, it may end with "No accessible property ids found." OR NO_RESULT_FOUND. In that case, + * you can adjust the property count to get more properties. + */ + private static final int SAMPLE_ITEMS_RESTRICTION = 20; + + public static void main(String[] args) { + new HotelIdsSearchEndToEndScenario().run(); + System.exit(0); + } + + @Override + public void run() { + LOGGER.info( + "======================== Running HotelIdsSearchEndToEndScenario ======================="); + + List propertyIds = getPropertyIdsFromDownloadUrl(); + HotelListingsResponse hotelListingsResponse = getPropertiesFromLodgingListings(propertyIds); + displayResult(hotelListingsResponse); + + LOGGER.info( + "========================== End HotelIdsSearchEndToEndScenario ========================="); + } + + /** + * Retrieve accessible property ids from SDP DownloadURL API. + * + * @return property ids + */ + private List getPropertyIdsFromDownloadUrl() { + LOGGER.info( + "==================== Executing Step I: getPropertyIdsFromDownloadUrl ==================="); + + GetFeedDownloadUrlOperationParams getPropertyIdListParams = + GetFeedDownloadUrlOperationParams.builder() + // Use the type LISTINGS to get the list of accessible property ids. + .type(GetFeedDownloadUrlOperationParams.Type.LISTINGS) + // Without any filters, this operation will return the information of all lodging + // properties in en_US by default. + .build(); + + Response downloadUrlListingsResponse = + client.execute(new GetFeedDownloadUrlOperation(getPropertyIdListParams)); + + if (downloadUrlListingsResponse.getData() == null + || downloadUrlListingsResponse.getData().getBestMatchedFile() == null) { + throw new IllegalStateException("No listings file found"); + } + + // The download URL points to a zip file containing various jsonl files. + // Each line in the jsonl files contains a json object representing a property. + // For demonstration purposes, we will only read a few properties from the file without + // downloading the entire file. + String listingsDownloadUrl = downloadUrlListingsResponse.getData() + .getBestMatchedFile() + .getDownloadUrl(); + LOGGER.info("Listings Download URL: {}", listingsDownloadUrl); + + // Read property ids from the file. + List propertyIds = getPropertyIdsFromListingsFile(listingsDownloadUrl); + + if (propertyIds.isEmpty()) { + throw new IllegalStateException("No accessible property ids found."); + } + LOGGER.info("Accessible Property Ids: {}", propertyIds); + + LOGGER.info( + "==================== Step I: getPropertyIdsFromDownloadUrl Executed ===================="); + return propertyIds; + } + + /** + * Get prices of the properties using the Lodging Listings API. + * + * @param propertyIds The property ids to get the prices. + * @return The response of the Lodging Listings API. + */ + private HotelListingsResponse getPropertiesFromLodgingListings(List propertyIds) { + LOGGER.info( + "================ Step II: Executing getPropertiesFromLodgingListings ==============="); + + GetLodgingListingsOperationParams getLodgingListingsOperationParams = + GetLodgingListingsOperationParams.builder() + .partnerTransactionId(PARTNER_TRANSACTION_ID) + // Use the property ids read from the file + .ecomHotelIds(new HashSet<>(propertyIds)) + // The links to return, WEB includes WS (Web Search Result Page) + // and WD (Web Details Page) + .links(Collections.singletonList(GetLodgingListingsOperationParams.Links.WEB)) + // Check-in 5 days from now + .checkIn(LocalDate.now().plusDays(5)) + // Check-out 10 days from now + .checkOut(LocalDate.now().plusDays(10)) + // Filter the properties that are available only + .availOnly(true) + // Use the default occupancy: 2 adults in one room + .build(); + + HotelListingsResponse hotelListingsResponse = + client.execute(new GetLodgingListingsOperation(getLodgingListingsOperationParams)) + .getData(); + + LOGGER.info( + "================ Step II: getPropertiesFromLodgingListings Executed ================"); + return hotelListingsResponse; + } + + /** + * Reads given number of property ids from the file pointed by the download URL. + * + * @param downloadUrl The download URL of the zip file containing the property information. + * @return A list of property ids read from the file. + */ + private List getPropertyIdsFromListingsFile(String downloadUrl) { + List propertyIds = new ArrayList<>(); + HttpURLConnection connection = null; + try { + // Open a connection to the URL + URL url = new URL(downloadUrl); + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + connection.setDoInput(true); + + try (ZipInputStream zipStream = new ZipInputStream(connection.getInputStream())) { + ZipEntry entry; + while ((entry = zipStream.getNextEntry()) != null) { + if (entry.getName().endsWith(".jsonl")) { + LOGGER.info("Reading property ids from file: {}", entry.getName()); + try (BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream))) { + String line; + ObjectMapper objectMapper = new ObjectMapper(); + while ((line = reader.readLine()) != null + && propertyIds.size() < SAMPLE_ITEMS_RESTRICTION) { + // Parse the property id from the json object + // An example json line from the jsonl file: + /* + { + "propertyId": { + "expedia": "1234567", + "hcom": "123456789", + "vrbo": "123.1234567.7654321" + }, + "bookable": { + "expedia": true, + "hcom": true, + "vrbo": true + }, + "propertyType": { + "id": 16, + "name": "Apartment" + }, + "lastUpdated": "10-27-2024 13:41:16", + "country": "France", + "inventorySource": "vrbo", + "referencePrice": { + "value": "89.52", + "currency": "USD" + }, + "vrboPropertyType": { + "instantBook": true + } + } + */ + JsonNode jsonNode = objectMapper.readTree(line); + // Check if the property is accessible from Lodging Listings API + // (Vrbo properties that are not instantBookable are not accessible for now) + if (!jsonNode.get("propertyId").get("vrbo").asText().isEmpty() + && jsonNode.has("vrboPropertyType") + && !jsonNode.get("vrboPropertyType").get("instantBook").asBoolean() + ) { + // Skip the property if it is not an instant bookable Vrbo property + continue; + } else { + // Get the Expedia property id for the Lodging Listings API + propertyIds.add(jsonNode.get("propertyId").get("expedia").asText()); + } + } + } + } + } + } + + } catch (IOException e) { + LOGGER.error("Error reading property ids from download URL", e); + } finally { + if (connection != null) { + connection.disconnect(); + } + } + return propertyIds; + } + + /** + * Display the result of the operations. + * + * @param hotelListingsResponse The response of the Lodging Listings API. + */ + private static void displayResult(HotelListingsResponse hotelListingsResponse) { + LOGGER.info("====================== Executing Step III: DisplayResult ======================="); + if (hotelListingsResponse == null || hotelListingsResponse.getHotels() == null + || hotelListingsResponse.getHotels().isEmpty()) { + throw new IllegalStateException("No properties found."); + } + + // The HotelListingsResponse contains a transaction ID for troubleshooting + LOGGER.info("Transaction ID: {}", hotelListingsResponse.getTransactionId()); + + // To access the properties, iterate through the list of hotel properties + hotelListingsResponse.getHotels().forEach(hotel -> { + // Check if the property is available + if (Hotel.Status.AVAILABLE != hotel.getStatus()) { + LOGGER.info("Property {} is not available.", hotel.getId()); + return; + } + LOGGER.info( + "=================================== Property Start ==================================="); + // To get the property name + if (StringUtils.isNotEmpty(hotel.getName())) { + LOGGER.info("Property Name: {}", hotel.getName()); + } + // To get the property address + if (hotel.getLocation() != null) { + LOGGER.info("Property Address: {}", hotel.getLocation().getAddress()); + } + // To get the property thumbnail URL + if (StringUtils.isNotEmpty(hotel.getThumbnailUrl())) { + LOGGER.info("Thumbnail URL: {}", hotel.getThumbnailUrl()); + } + // To get the star rating of the property. The value is between 1.0 and 5.0 + // in a 0.5 increment. + if (hotel.getStarRating() != null) { + LOGGER.info("Star Rating: {}", hotel.getStarRating().getValue()); + } + // To get the guest rating of the property. The value is between 1.0 and 5.0 + // in a 0.1 increment. + if (StringUtils.isNotEmpty(hotel.getGuestRating())) { + LOGGER.info("Guest Rating: {}", hotel.getGuestRating()); + } + // To get the total number of reviews for the property + if (hotel.getGuestReviewCount() != null) { + LOGGER.info("Review Count: {}", hotel.getGuestReviewCount()); + } + if (hotel.getRoomTypes() != null && !hotel.getRoomTypes().isEmpty()) { + // To get the first room type information + RoomType roomType = hotel.getRoomTypes().get(0); + if (StringUtils.isNotEmpty(roomType.getDescription())) { + LOGGER.info("Room Type: {}", roomType.getDescription()); + } + if (roomType.getPrice() != null) { + // To get the total price of the room type + if (roomType.getPrice().getTotalPrice() != null) { + LOGGER.info("Price: {}, Currency: {}", + roomType.getPrice().getTotalPrice().getValue(), + roomType.getPrice().getTotalPrice().getCurrency()); + } + // To get the average nightly rate of the room type + if (roomType.getPrice().getAvgNightlyRate() != null) { + LOGGER.info("Average Nightly Rate: {}, Currency: {}", + roomType.getPrice().getAvgNightlyRate().getValue(), + roomType.getPrice().getAvgNightlyRate().getCurrency()); + } + } + // To get the free cancellation flag of the selected room + if (roomType.getRatePlans() != null && !roomType.getRatePlans().isEmpty() + && roomType.getRatePlans().get(0).getCancellationPolicy() != null) { + LOGGER.info("Free Cancellation: {}", + roomType.getRatePlans().get(0).getCancellationPolicy().getFreeCancellation()); + } + if (roomType.getLinks() != null) { + // To get the deeplink to the Expedia Web Search Result Page + if (roomType.getLinks().getWebSearchResult() != null) { + LOGGER.info("WebSearchResult Link: {}", + roomType.getLinks().getWebSearchResult().getHref()); + } + // To get the deeplink to the Expedia Web Details Page + if (roomType.getLinks().getWebDetails() != null) { + LOGGER.info("WebDetails Link: {}", roomType.getLinks().getWebDetails().getHref()); + } + } + } + LOGGER.info( + "==================================== Property End ===================================="); + }); + LOGGER.info("====================== Step III: DisplayResult Executed ========================"); + } +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java new file mode 100644 index 000000000..55bae46c7 --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsQuickStartScenario.java @@ -0,0 +1,194 @@ +package com.expediagroup.sdk.xap.examples.scenarios.lodging; + + +import com.expediagroup.sdk.xap.client.XapClient; +import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; +import com.expediagroup.sdk.xap.models.Hotel; +import com.expediagroup.sdk.xap.models.HotelListingsResponse; +import com.expediagroup.sdk.xap.models.Room; +import com.expediagroup.sdk.xap.models.RoomType; +import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperation; +import com.expediagroup.sdk.xap.operations.GetLodgingListingsOperationParams; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Collections; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This example demonstrates how to search for properties with a location keyword with filters + * applied. + */ +public class ListingsQuickStartScenario implements XapScenario { + + private static final Logger LOGGER = LoggerFactory.getLogger(ListingsQuickStartScenario.class); + + public static void main(String[] args) { + new ListingsQuickStartScenario().run(); + System.exit(0); + } + + @Override + public void run() { + // This example will search for properties with the following criteria: + // 1. Occupancy of 1 adult in the first room and 2 adults and 2 children (10 and 12 years old) + // in the second room; + // 2. Properties located within 10 km of the Space Needle in Seattle; + // 3. Check-in date 5 days from now, check-out date 10 days from now; + // 4. Return web links to Expedia website; + // 5. Limit the results to 5 properties; + // 6. Order the results by price in ascending order. + + LOGGER.info( + "========================== Running ListingsQuickStartScenario ========================="); + + LOGGER.info( + "======================== Executing GetLodgingListingsOperation ======================="); + + // Build the occupancy + ArrayList rooms = new ArrayList<>(); + // The first room, with 1 adult + rooms.add(Room.builder().adults(1L).build()); + // The second room, with 2 adults and 2 children + ArrayList childrenAges = new ArrayList<>(); + childrenAges.add(10L); + childrenAges.add(12L); + rooms.add(Room.builder().adults(2L).childAges(childrenAges).build()); + + // Build the query parameters with GetLodgingListingsOperationParams + GetLodgingListingsOperationParams getLodgingListingsOperationParams = + GetLodgingListingsOperationParams.builder() + .partnerTransactionId(PARTNER_TRANSACTION_ID) + // The location keyword can be a city, address, airport or a landmark. + .locationKeyword("Space Needle, Seattle") + // The radius specifies the size of search area around the location keyword. + // The default value is 25. + .radius(10) + // The unit specifies the unit of the radius. The default value is KM. + .unit(GetLodgingListingsOperationParams.Unit.KM) + // Check-in 5 days from now + .checkIn(LocalDate.now().plusDays(5)) + // Check-out 10 days from now + .checkOut(LocalDate.now().plusDays(10)) + // The occupancy + .rooms(rooms) + // The links to return, WEB includes WS (Web Search Result Page) + // and WD (Web Details Page) + .links(Collections.singletonList(GetLodgingListingsOperationParams.Links.WEB)) + // Limit the results to 5 properties + .limit(5) + // Order the results by price in ascending order + .sortType(GetLodgingListingsOperationParams.SortType.PRICE) + .sortOrder(GetLodgingListingsOperationParams.SortOrder.ASC) + .build(); + + XapClient xapClient = createClient(); + + // Execute the operation and get the HotelListingsResponse + HotelListingsResponse hotelListingsResponse = + xapClient.execute(new GetLodgingListingsOperation(getLodgingListingsOperationParams)) + .getData(); + + // If you want to use the async method, you can use the following code: + // --------------------------------------------------------------- + // CompletableFuture> completableFuture = + // xapClient.executeAsync( + // new GetLodgingListingsOperation(getLodgingListingsOperationParams)); + // completableFuture.thenAccept(hotelListingsResponse -> { + // // Your code here + // }); + // --------------------------------------------------------------- + + LOGGER.info( + "======================== GetLodgingListingsOperation Executed ========================"); + + if (hotelListingsResponse == null || hotelListingsResponse.getHotels() == null + || hotelListingsResponse.getHotels().isEmpty()) { + throw new IllegalStateException("No properties found."); + } + + // The HotelListingsResponse contains a transaction ID for troubleshooting + LOGGER.info("Transaction ID: {}", hotelListingsResponse.getTransactionId()); + + // To access the properties, iterate through the list of hotel properties + hotelListingsResponse.getHotels().forEach(hotel -> { + // Check if the property is available + if (Hotel.Status.AVAILABLE != hotel.getStatus()) { + LOGGER.info("Property {} is not available.", hotel.getId()); + return; + } + LOGGER.info( + "=================================== Property Start ==================================="); + // To get the property name + if (StringUtils.isNotEmpty(hotel.getName())) { + LOGGER.info("Property Name: {}", hotel.getName()); + } + // To get the property address + if (hotel.getLocation() != null) { + LOGGER.info("Property Address: {}", hotel.getLocation().getAddress()); + } + // To get the property thumbnail URL + if (StringUtils.isNotEmpty(hotel.getThumbnailUrl())) { + LOGGER.info("Thumbnail URL: {}", hotel.getThumbnailUrl()); + } + // To get the star rating of the property. The value is between 1.0 and 5.0 + // in a 0.5 increment. + if (hotel.getStarRating() != null) { + LOGGER.info("Star Rating: {}", hotel.getStarRating().getValue()); + } + // To get the guest rating of the property. The value is between 1.0 and 5.0 + // in a 0.1 increment. + if (StringUtils.isNotEmpty(hotel.getGuestRating())) { + LOGGER.info("Guest Rating: {}", hotel.getGuestRating()); + } + // To get the total number of reviews for the property + if (hotel.getGuestReviewCount() != null) { + LOGGER.info("Review Count: {}", hotel.getGuestReviewCount()); + } + if (hotel.getRoomTypes() != null && !hotel.getRoomTypes().isEmpty()) { + // To get the first room type information + RoomType roomType = hotel.getRoomTypes().get(0); + if (StringUtils.isNotEmpty(roomType.getDescription())) { + LOGGER.info("Room Type: {}", roomType.getDescription()); + } + if (roomType.getPrice() != null) { + // To get the total price of the room type + if (roomType.getPrice().getTotalPrice() != null) { + LOGGER.info("Price: {}, Currency: {}", + roomType.getPrice().getTotalPrice().getValue(), + roomType.getPrice().getTotalPrice().getCurrency()); + } + // To get the average nightly rate of the room type + if (roomType.getPrice().getAvgNightlyRate() != null) { + LOGGER.info("Average Nightly Rate: {}, Currency: {}", + roomType.getPrice().getAvgNightlyRate().getValue(), + roomType.getPrice().getAvgNightlyRate().getCurrency()); + } + } + // To get the free cancellation flag of the selected room + if (roomType.getRatePlans() != null && !roomType.getRatePlans().isEmpty() + && roomType.getRatePlans().get(0).getCancellationPolicy() != null) { + LOGGER.info("Free Cancellation: {}", + roomType.getRatePlans().get(0).getCancellationPolicy().getFreeCancellation()); + } + if (roomType.getLinks() != null) { + // To get the deeplink to the Expedia Web Search Result Page + if (roomType.getLinks().getWebSearchResult() != null) { + LOGGER.info("WebSearchResult Link: {}", + roomType.getLinks().getWebSearchResult().getHref()); + } + // To get the deeplink to the Expedia Web Details Page + if (roomType.getLinks().getWebDetails() != null) { + LOGGER.info("WebDetails Link: {}", roomType.getLinks().getWebDetails().getHref()); + } + } + } + LOGGER.info( + "==================================== Property End ===================================="); + }); + + LOGGER.info( + "============================ End ListingsQuickStartScenario ==========================="); + } +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java new file mode 100644 index 000000000..a89db04ae --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java @@ -0,0 +1,145 @@ +package com.expediagroup.sdk.xap.examples.scenarios.lodging; + +import com.expediagroup.sdk.xap.client.XapClient; +import com.expediagroup.sdk.xap.models.LodgingQuotesResponse; +import com.expediagroup.sdk.xap.models.LodgingRoomType; +import com.expediagroup.sdk.xap.models.Property; +import com.expediagroup.sdk.xap.models.Room; +import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperation; +import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperationParams; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This example demonstrates how to search for property quotes with property IDs in + * Lodging Quotes API. + * Note: this is a Vrbo scenario. You need a key that is enabled for Vrbo brand to run this. + */ +public class QuotesQuickStartScenario implements VrboScenario { + + private static final Logger LOGGER = LoggerFactory.getLogger(QuotesQuickStartScenario.class); + + public static void main(String[] args) { + new QuotesQuickStartScenario().run(); + System.exit(0); + } + + @Override + public void run() { + // This example will get quotes response for mentioned Expedia properties with the following + // criteria: + // 1. Occupancy of 1 adult in the first room and 2 adults and 2 children (10 and 12 years old) + // in the second room; + // 3. Check-in date 5 days from now, check-out date 10 days from now; + // 4. Return web links to Expedia website; + + LOGGER.info( + "============================ Running QuotesQuickStartScenario =========================="); + + LOGGER.info( + "========================= Executing GetLodgingQuotesOperation ========================="); + + // Build the occupancy + ArrayList rooms = new ArrayList<>(); + // The first room, with 2 adult + rooms.add(Room.builder().adults(2L).childAges(null).build()); + + // Build the query parameters with GetLodgingQuotesOperationParams + GetLodgingQuotesOperationParams quotesOperationParams = + GetLodgingQuotesOperationParams.builder() + .partnerTransactionId(PARTNER_TRANSACTION_ID) + // Check-in 5 days from now + .checkIn(LocalDate.now().plusDays(5)) + // Check-out 10 days from now + .checkOut(LocalDate.now().plusDays(10)) + // Set of Expedia Property IDs. + .propertyIds(new HashSet<>(Arrays.asList("87704892", "36960201"))) + // The links to return, WEB includes WS (Web Search Result Page) and + // WD (Web Details Page) + .links(Collections.singletonList(GetLodgingQuotesOperationParams.Links.WEB)) + .rooms(rooms) + .build(); + + XapClient xapClient = createClient(); + + // Execute the operation and get the QuotesResponse + LodgingQuotesResponse quotesResponse = + xapClient.execute(new GetLodgingQuotesOperation(quotesOperationParams)).getData(); + + // If you want to use the async method, you can use the following code: + // --------------------------------------------------------------- + // CompletableFuture> completableFuture = + // xapClient.executeAsync( + // new GetLodgingQuotesOperation(quotesOperationParams)); + // completableFuture.thenAccept(quotesResponse -> { + // // Your code here + // }); + // --------------------------------------------------------------- + + LOGGER.info( + "========================== GetLodgingQuotesOperation Executed ========================="); + + if (quotesResponse == null || quotesResponse.getProperties() == null + || quotesResponse.getProperties().isEmpty()) { + throw new IllegalStateException("No properties found."); + } + + // The LodgingQuotesResponse contains a transaction ID for troubleshooting + LOGGER.info("Transaction ID: {}", quotesResponse.getTransactionId()); + + // To access the properties, iterate through the list of properties + quotesResponse.getProperties().forEach(quote -> { + LOGGER.info("========== Property:{} Start ==========", quote.getId()); + if (Property.Status.AVAILABLE != quote.getStatus()) { + LOGGER.info("Property is not available."); + return; + } + if (quote.getRoomTypes() != null && !quote.getRoomTypes().isEmpty()) { + // To get the first room type information + LodgingRoomType roomType = quote.getRoomTypes().get(0); + + if (roomType.getPrice() != null) { + // To get the total price of the room type + if (roomType.getPrice().getTotalPrice() != null) { + LOGGER.info("Price: {}, Currency: {}", + roomType.getPrice().getTotalPrice().getValue(), + roomType.getPrice().getTotalPrice().getCurrency()); + } + // To get the average nightly rate of the room type + if (roomType.getPrice().getAvgNightlyRate() != null) { + LOGGER.info("Average Nightly Rate: {}, Currency: {}", + roomType.getPrice().getAvgNightlyRate().getValue(), + roomType.getPrice().getAvgNightlyRate().getCurrency()); + } + } + // To get the free cancellation flag of the selected room + if (roomType.getRatePlans() != null && !roomType.getRatePlans().isEmpty() + && roomType.getRatePlans().get(0).getCancellationPolicy() != null) { + LOGGER.info("Free Cancellation: {}", + roomType.getRatePlans().get(0).getCancellationPolicy().getFreeCancellation()); + } + if (roomType.getLinks() != null) { + // To get the deeplink to the Expedia Web Search Result Page + if (roomType.getLinks().getWebSearchResult() != null) { + LOGGER.info("WebSearchResult Link: {}", + roomType.getLinks().getWebSearchResult().getHref()); + } + // To get the deeplink to the Expedia Web Details Page + if (roomType.getLinks().getWebDetails() != null) { + LOGGER.info("WebDetails Link: {}", roomType.getLinks().getWebDetails().getHref()); + } + } + } + LOGGER.info( + "=================================== Property End ==================================="); + }); + + LOGGER.info( + "============================= End QuotesQuickStartScenario ============================"); + } +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java new file mode 100644 index 000000000..ba5659835 --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboPropertySearchEndToEndScenario.java @@ -0,0 +1,476 @@ +package com.expediagroup.sdk.xap.examples.scenarios.lodging; + + +import com.expediagroup.sdk.rest.model.Response; +import com.expediagroup.sdk.xap.client.XapClient; +import com.expediagroup.sdk.xap.models.LodgingQuotesResponse; +import com.expediagroup.sdk.xap.models.LodgingRoomType; +import com.expediagroup.sdk.xap.models.PresignedUrlResponse; +import com.expediagroup.sdk.xap.models.Property; +import com.expediagroup.sdk.xap.models.Room; +import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperation; +import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperationParams; +import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperation; +import com.expediagroup.sdk.xap.operations.GetLodgingQuotesOperationParams; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This example demonstrates how to retrieve accessible Vrbo property ids and location content from + * SDP DownloadURL API and then get the prices of these properties using the Lodging Quotes API. + * + *

This is a common scenario for Vrbo partners. In practice, you can cache the property id + * list along with content that does not change frequently (name, description, address, amenities, + * etc.) to reduce heavy API calls and get only the prices of these properties in real-time from + * the Lodging Quotes API. + * + *

Note: this is a Vrbo scenario. You need a key that is enabled for Vrbo brand to run this. + */ +public class VrboPropertySearchEndToEndScenario implements VrboScenario { + + private final XapClient client = createClient(); + + private static final Logger LOGGER = + LoggerFactory.getLogger(VrboPropertySearchEndToEndScenario.class); + + /** + * This field limits the number of line to read from the SDP DownloadURL API Listings file to + * reduce time to run the example. + * If the first 20 properties from the file are not accessible OR available when you run this + * example, it may end with "No accessible property ids found." OR NO_RESULT_FOUND. In that case, + * you can adjust the property count to get more properties. + */ + private static final int SAMPLE_ITEMS_RESTRICTION = 20; + + /** + * A property id to location map. This mocks a cache in this example to store the static content + * of the properties. + */ + private static final Map PROPERTY_ID_AND_LOCATION_CACHE = new HashMap<>(); + + public static void main(String[] args) { + new VrboPropertySearchEndToEndScenario().run(); + System.exit(0); + } + + @Override + public void run() { + LOGGER.info( + "====================== Running VrboPropertySearchEndToEndScenario ======================"); + + List propertyIds = getPropertyIdsFromDownloadUrl(); + cachePropertyLocationFromDownloadUrl(propertyIds); + LodgingQuotesResponse lodgingQuotesResponse = getPropertyPriceFromLodgingQuotes(propertyIds); + displayResult(lodgingQuotesResponse); + + LOGGER.info( + "======================= End VrboPropertySearchEndToEndScenario ========================="); + } + + private List getPropertyIdsFromDownloadUrl() { + LOGGER.info( + "==================== Executing Step I: getPropertyIdsFromDownloadUrl ==================="); + + GetFeedDownloadUrlOperationParams getPropertyIdListParams = + GetFeedDownloadUrlOperationParams.builder() + // Use the type VACATION_RENTAL to get the list of accessible Vrbo property ids. + .type(GetFeedDownloadUrlOperationParams.Type.VACATION_RENTAL) + // Without any filters, this operation will return the information of all Vrbo + // properties in en_US by default. + .build(); + + Response downloadUrlListingsResponse = + client.execute(new GetFeedDownloadUrlOperation(getPropertyIdListParams)); + + if (downloadUrlListingsResponse.getData() == null + || downloadUrlListingsResponse.getData().getBestMatchedFile() == null) { + throw new IllegalStateException("No vacation rental file found"); + } + + // The download URL points to a zip file containing various jsonl files. + // Each line in the jsonl files contains a json object representing a Vrbo property. + // For demonstration purposes, we will only read a few properties from the file without + // downloading the entire file. + String vacationRentalDownloadUrl = downloadUrlListingsResponse.getData() + .getBestMatchedFile() + .getDownloadUrl(); + LOGGER.info("Vacation Rental Download URL: {}", vacationRentalDownloadUrl); + + // Read property ids from the file. + List propertyIds = getPropertyIdsFromVacationRentalFile(vacationRentalDownloadUrl + ); + + if (propertyIds.isEmpty()) { + throw new IllegalStateException("No accessible Vrbo property ids found."); + } + LOGGER.info("Accessible Vrbo Property Ids: {}", propertyIds); + + LOGGER.info( + "==================== Step I: getPropertyIdsFromDownloadUrl Executed ===================="); + return propertyIds; + } + + /** + * Cache the location content from SDP DownloadURL API. + * + * @param propertyIds The property ids that need the location content. + */ + private void cachePropertyLocationFromDownloadUrl(List propertyIds) { + LOGGER.info( + "================ Executing Step II: CachePropertyLocationFromDownloadUrl ==============="); + GetFeedDownloadUrlOperationParams getPropertyLocationParams = + GetFeedDownloadUrlOperationParams.builder() + // Use the type LOCATIONS to get the address of accessible properties. + .type(GetFeedDownloadUrlOperationParams.Type.LOCATIONS) + // Filter the properties by brand. + .brand(GetFeedDownloadUrlOperationParams.Brand.VRBO) + .build(); + + Response downloadUrlLocationsResponse = + client.execute(new GetFeedDownloadUrlOperation(getPropertyLocationParams)); + + if (downloadUrlLocationsResponse.getData() == null + || downloadUrlLocationsResponse.getData().getBestMatchedFile() == null) { + throw new IllegalStateException("No location file found"); + } + + String locationsDownloadUrl = downloadUrlLocationsResponse.getData() + .getBestMatchedFile() + .getDownloadUrl(); + LOGGER.info("Locations Download URL: {}", locationsDownloadUrl); + + // Read and cache property locations from the file. + cachePropertyLocationFromLocationsFile(locationsDownloadUrl, propertyIds); + + LOGGER.info( + "================= Step II: CachePropertyLocationFromDownloadUrl Executed ==============="); + } + + /** + * Get prices of the properties using the Lodging Quotes API. + * + * @param propertyIds The property ids to get the prices. + * @return The response of the Lodging Quotes API. + */ + private LodgingQuotesResponse getPropertyPriceFromLodgingQuotes(List propertyIds) { + LOGGER.info( + "================= Executing Step III: GetPropertyPriceFromLodgingQuotes ================"); + + // Build the occupancy + ArrayList rooms = new ArrayList<>(); + // The first room, with 2 adult + rooms.add(Room.builder().adults(2L).childAges(null).build()); + + // Build the query parameters with GetLodgingQuotesOperationParams + GetLodgingQuotesOperationParams quotesOperationParams = + GetLodgingQuotesOperationParams.builder() + .partnerTransactionId(PARTNER_TRANSACTION_ID) + // Check-in 5 days from now + .checkIn(LocalDate.now().plusDays(5)) + // Check-out 10 days from now + .checkOut(LocalDate.now().plusDays(10)) + // Set of Expedia Property IDs. + .propertyIds(new HashSet<>(propertyIds)) + // The links to return, WEB includes WS (Web Search Result Page) and + // WD (Web Details Page) + .links(Collections.singletonList(GetLodgingQuotesOperationParams.Links.WEB)) + .rooms(rooms) + .build(); + + LodgingQuotesResponse lodgingQuotesResponse = + client.execute(new GetLodgingQuotesOperation(quotesOperationParams)) + .getData(); + + LOGGER.info( + "================= Step III: GetPropertyPriceFromLodgingQuotes Executed ================="); + return lodgingQuotesResponse; + } + + /** + * Reads given number of property ids from the file pointed by the download URL. + * + * @param downloadUrl The download URL of the zip file containing the property information. + * @return A list of property ids read from the file. + */ + private List getPropertyIdsFromVacationRentalFile(String downloadUrl) { + List propertyIds = new ArrayList<>(); + HttpURLConnection connection = null; + try { + // Open a connection to the URL + URL url = new URL(downloadUrl); + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + connection.setDoInput(true); + + try (ZipInputStream zipStream = new ZipInputStream(connection.getInputStream())) { + ZipEntry entry; + while ((entry = zipStream.getNextEntry()) != null) { + if (entry.getName().endsWith(".jsonl")) { + LOGGER.info("Reading property ids from file: {}", entry.getName()); + try (BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream))) { + String line; + ObjectMapper objectMapper = new ObjectMapper(); + while ((line = reader.readLine()) != null + && propertyIds.size() < SAMPLE_ITEMS_RESTRICTION) { + // Parse the property id from the json object + // An example json line from the jsonl file: + /* + { + "propertyId": { + "expedia": "1234567", + "hcom": "987654321", + "vrbo": "123.1234567.7654321" + }, + "country": "France", + "propertySize": { + "measurement": 441, + "units": "SQUARE_FEET" + }, + "maxOccupancy": 4, + "bathrooms": { + "numberOfBathrooms": 1 + }, + "bedrooms": { + "numberOfBedrooms": 2 + }, + "houseRules": { + "partyOrEventRules": { + "partiesOrEventsPermitted": false, + "ownerPartyFreeText": "No events allowed" + }, + "smokingRules": { + "smokingPermitted": false, + "ownerSmokingFreeText": "Smoking is not permitted" + }, + "petRules": { + "petsPermitted": true, + "ownerPetsFreeText": "Pets allowed" + }, + "childRules": { + "childrenPermitted": true, + "ownerChildrenFreeText": "Children allowed: ages 0-17 " + } + }, + "propertyManager": { + "name": "Résidences Louis", + "hostType": "Professional" + }, + "premierHost": true, + "propertyLiveDate": "2022-05-31" + } + */ + JsonNode jsonNode = objectMapper.readTree(line); + propertyIds.add(jsonNode.get("propertyId").get("expedia").asText()); + } + } + } + } + } + + } catch (IOException e) { + LOGGER.error("Error reading property ids from download URL", e); + } finally { + if (connection != null) { + connection.disconnect(); + } + } + return propertyIds; + } + + /** + * Caches the location content of the properties from the file pointed by the download URL. + * + * @param locationsDownloadUrl The download URL of the zip file containing the property locations. + * @param propertyIds The property ids to get the location content. + */ + private void cachePropertyLocationFromLocationsFile(String locationsDownloadUrl, + List propertyIds) { + HttpURLConnection connection = null; + try { + // Open a connection to the URL + URL url = new URL(locationsDownloadUrl); + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + connection.setDoInput(true); + + try (ZipInputStream zipStream = new ZipInputStream(connection.getInputStream())) { + ZipEntry entry; + while ((entry = zipStream.getNextEntry()) != null) { + if (entry.getName().endsWith(".jsonl")) { + LOGGER.info("Reading property locations from file: {}", entry.getName()); + try (BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream))) { + String line; + ObjectMapper objectMapper = new ObjectMapper(); + while ((line = reader.readLine()) != null + && PROPERTY_ID_AND_LOCATION_CACHE.size() < propertyIds.size()) { + // Parse the property location from the json object + // An example json line from the jsonl file: + /* + { + "propertyId": { + "expedia": "1234567", + "hcom": "987654321", + "vrbo": "123.1234567.1234567" + }, + "propertyType": { + "id": 16, + "name": "Apartment" + }, + "propertyName": "Vrbo Property Name", + "address1": "", + "address2": "", + "city": "Newark", + "province": "Delaware", + "country": "United States", + "postalCode": "19711", + "geoLocation": { + "latitude": "10.999999", + "longitude": "-10.999999", + "obfuscated": false + }, + "locationAttribute": { + "neighborhood": { + "id": "553248635976468695", + "name": "Westmoreland" + }, + "city": { + "id": "8946", + "name": "Newark" + }, + "region": { + "id": "6055689", + "name": "North Wilmington" + }, + "airport": { + "id": "6028579", + "code": "ILG", + "name": "Wilmington, DE (ILG-New Castle)", + "distance": "13.17", + "unit": "km" + }, + "distanceFromCityCenter": { + "distance": "1.24", + "unit": "km" + } + } + } + */ + JsonNode jsonNode = objectMapper.readTree(line); + // Check if the property id is in the list + if (propertyIds.contains(jsonNode.get("propertyId").get("expedia").asText())) { + // Get the location content of the property + String location = jsonNode.get("propertyName").asText() + ", " + + jsonNode.get("city").asText() + ", " + + jsonNode.get("province").asText() + ", " + + jsonNode.get("country").asText(); + // Store the location content in the cache + PROPERTY_ID_AND_LOCATION_CACHE.put( + jsonNode.get("propertyId") + .get("expedia") + .asText(), + location); + } + } + } + } + } + } + + } catch (IOException e) { + LOGGER.error("Error reading property locations from download URL", e); + } finally { + if (connection != null) { + connection.disconnect(); + } + } + } + + /** + * Display the result of the operations. + * + * @param lodgingQuotesResponse The response of the Lodging Quotes API. + */ + private static void displayResult(LodgingQuotesResponse lodgingQuotesResponse) { + LOGGER.info("======================= Executing Step IV: DisplayResult ======================="); + if (lodgingQuotesResponse == null || lodgingQuotesResponse.getProperties() == null + || lodgingQuotesResponse.getProperties().isEmpty()) { + throw new IllegalStateException("No properties found."); + } + + // The HotelListingsResponse contains a transaction ID for troubleshooting + LOGGER.info("Transaction ID: {}", lodgingQuotesResponse.getTransactionId()); + + // To access the properties, iterate through the list of hotel properties + lodgingQuotesResponse.getProperties().forEach(property -> { + // Check if the property is available + if (Property.Status.AVAILABLE != property.getStatus()) { + LOGGER.info("Property {} is not available.", property.getId()); + return; + } + LOGGER.info( + "=================================== Property Start ==================================="); + String propertyId = property.getId(); + + // Get the location content of the property from the cache + LOGGER.info("Property Id: {}", propertyId); + LOGGER.info("Cached Property Location: {}", PROPERTY_ID_AND_LOCATION_CACHE.get(propertyId)); + + // Get the price of the property from the room type + if (property.getRoomTypes() != null && !property.getRoomTypes().isEmpty()) { + // To get the first room type information + LodgingRoomType roomType = property.getRoomTypes().get(0); + + if (roomType.getPrice() != null) { + // To get the total price of the room type + if (roomType.getPrice().getTotalPrice() != null) { + LOGGER.info("Price: {}, Currency: {}", + roomType.getPrice().getTotalPrice().getValue(), + roomType.getPrice().getTotalPrice().getCurrency()); + } + // To get the average nightly rate of the room type + if (roomType.getPrice().getAvgNightlyRate() != null) { + LOGGER.info("Average Nightly Rate: {}, Currency: {}", + roomType.getPrice().getAvgNightlyRate().getValue(), + roomType.getPrice().getAvgNightlyRate().getCurrency()); + } + } + // To get the free cancellation flag of the selected room + if (roomType.getRatePlans() != null && !roomType.getRatePlans().isEmpty() + && roomType.getRatePlans().get(0).getCancellationPolicy() != null) { + LOGGER.info("Free Cancellation: {}", + roomType.getRatePlans().get(0).getCancellationPolicy().getFreeCancellation()); + } + if (roomType.getLinks() != null) { + // To get the deeplink to the website Search Result Page + if (roomType.getLinks().getWebSearchResult() != null) { + LOGGER.info("WebSearchResult Link: {}", + roomType.getLinks().getWebSearchResult().getHref()); + } + // To get the deeplink to the website Details Page + if (roomType.getLinks().getWebDetails() != null) { + LOGGER.info("WebDetails Link: {}", roomType.getLinks().getWebDetails().getHref()); + } + } + } + LOGGER.info( + "==================================== Property End ===================================="); + }); + LOGGER.info("======================= Step IV: DisplayResult Executed ========================"); + } +} diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java new file mode 100644 index 000000000..11ce6bbd4 --- /dev/null +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java @@ -0,0 +1,28 @@ +package com.expediagroup.sdk.xap.examples.scenarios.lodging; + +import com.expediagroup.sdk.xap.client.XapClient; +import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; + +/** + * Interface for Vrbo scenarios. Scenarios that implement this interface would need a key + * that is enabled for Vrbo brand to run. + */ +public interface VrboScenario extends XapScenario { + + /** + * Create a client with Vrbo key and secret. + * + * @return XapClient + */ + @Override + default XapClient createClient() { + String key = System.getProperty("com.expediagroup.xapjavasdk.vrbokey"); + String secret = System.getProperty("com.expediagroup.xapjavasdk.vrbosecret"); + return XapClient + .builder() + .key(key) + .secret(secret) + .build(); + } + +} diff --git a/examples/src/main/resources/log4j2.xml b/examples/src/main/resources/log4j2.xml new file mode 100644 index 000000000..950475ab9 --- /dev/null +++ b/examples/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + diff --git a/settings.gradle.kts b/settings.gradle.kts index 0fa5ec081..a2686a1f1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,3 +15,4 @@ plugins { rootProject.name = "xap-java-sdk" include("xap-sdk") include("generator") +include("examples") From 0d450d3d9f6c260c963843aea4f039de720afe0c Mon Sep 17 00:00:00 2001 From: Mohammad Dwairi <49045447+Mohammad-Dwairi@users.noreply.github.com> Date: Wed, 26 Mar 2025 18:05:21 +0300 Subject: [PATCH 36/40] feat: support OAuth (#97) --- .editorconfig | 18 +++ build.gradle.kts | 74 +++++++----- buildSrc/build.gradle.kts | 11 +- examples/build.gradle.kts | 12 +- .../xap/examples/scenarios/XapScenario.java | 14 ++- .../scenarios/lodging/VrboScenario.java | 15 ++- generator/build.gradle.kts | 15 +-- gradle-tasks/sdk-properties.gradle.kts | 20 ++++ gradle-tasks/snapshot.gradle | 27 +++++ gradle-tasks/snapshot.gradle.kts | 23 ---- xap-sdk/build.gradle.kts | 52 +------- xap-sdk/gradle.properties | 4 +- .../sdk/xap/client/AsyncXapClient.kt | 24 +++- .../expediagroup/sdk/xap/client/XapClient.kt | 36 +++--- .../sdk/xap/configuration/ApiEndpoint.kt | 10 -- .../xap/configuration/ClientEnvironment.kt | 9 -- .../sdk/xap/configuration/Constant.kt | 22 ++++ .../sdk/xap/configuration/EndpointProvider.kt | 32 ----- .../sdk/xap/configuration/XapApiEndpoint.kt | 13 -- .../configuration/XapClientConfiguration.kt | 111 ++++++------------ .../configuration/XapJacksonObjectMapper.kt | 24 +++- .../sdk/xap/core/ApiKeyHeaderStep.kt | 16 +++ .../sdk/xap/core/AsyncRequestExecutor.kt | 85 +++++++++++--- .../sdk/xap/core/RequestExecutor.kt | 86 +++++++++++--- 24 files changed, 412 insertions(+), 341 deletions(-) create mode 100644 .editorconfig create mode 100644 gradle-tasks/sdk-properties.gradle.kts create mode 100644 gradle-tasks/snapshot.gradle delete mode 100644 gradle-tasks/snapshot.gradle.kts delete mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt delete mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt create mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/Constant.kt delete mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt delete mode 100644 xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..86098916d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ + +# Configuration file for EditorConfig: http://editorconfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true + +# space indentation for JSON and YML +[*.{json,json5,yml,yaml}] +indent_size = 2 + +[*.kt] +ktlint_standard_enum-entry-name-case = disabled \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 545cf7e5f..b41d9b375 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,51 +1,75 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.plugin.KotlinBasePluginWrapper +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import java.time.Duration plugins { - kotlin("jvm") version "2.1.10" - id("signing") - id("maven-publish") + id("java") + id("org.jetbrains.kotlin.jvm") version "2.1.10" id("org.jlleitschuh.gradle.ktlint") version "12.1.2" id("io.github.gradle-nexus.publish-plugin") version "2.0.0" } -group = "com.expediagroup.sdk" -version = "1.0.0-SNAPSHOT" +group = project.property("GROUP_ID") as String -repositories { - mavenCentral() - gradlePluginPortal() - maven { - url = uri("https://oss.sonatype.org/content/repositories/snapshots/") +apply("gradle-tasks/specs.gradle.kts") +apply("$rootDir/gradle-tasks/snapshot.gradle") + +allprojects { + repositories { + mavenCentral() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + } } } subprojects { - apply(plugin = "signing") - apply(plugin = "maven-publish") - apply(plugin = "org.jlleitschuh.gradle.ktlint") + apply(plugin = "java") apply(plugin = "org.jetbrains.kotlin.jvm") + apply(plugin = "org.jlleitschuh.gradle.ktlint") - repositories { - mavenCentral() - gradlePluginPortal() - maven { - url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + plugins.withId("org.jetbrains.kotlin.jvm") { + kotlin { + jvmToolchain(8) } } - kotlin { - jvmToolchain(21) - target { + plugins.withType().configureEach { + tasks.withType().configureEach { compilerOptions { - jvmTarget = JvmTarget.JVM_1_8 + jvmTarget.set(JvmTarget.JVM_1_8) } } } java { + withSourcesJar() + withJavadocJar() + sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 + + // Gradle 7+ Java toolchain approach (also sets 1.8) + toolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + } + } + + ktlint { + debug.set(true) + version.set("1.5.0") + verbose.set(true) + + additionalEditorconfig.set( + mapOf( + "max_line_length" to "200", + "indent_style" to "space", + "indent_size" to "4", + "insert_final_newline" to "true", + "end_of_line" to "lf", + ), + ) } } @@ -62,9 +86,3 @@ nexusPublishing { delayBetween.set(Duration.ofMillis(5000)) } } - -kotlin { - jvmToolchain(21) -} - -apply("gradle-tasks/specs.gradle.kts") diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 26bd73184..3921a96b5 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,14 +1,11 @@ -repositories { - mavenCentral() - maven { - url = uri("https://oss.sonatype.org/content/repositories/snapshots/") - } -} - plugins { `kotlin-dsl` } +repositories { + mavenCentral() +} + dependencies { api("org.openapitools:openapi-generator:7.11.0") implementation("com.samskivert:jmustache:1.15") diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index afaa45e65..17290e473 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -1,15 +1,9 @@ -plugins { - id("java") -} - group = project.property("GROUP_ID") as String -repositories { - mavenCentral() -} - dependencies { - implementation(project(":xap-sdk")) + api(project(":xap-sdk")) + + implementation("com.expediagroup:expediagroup-sdk-transport-okhttp:0.0.4-alpha") implementation("org.apache.logging.log4j:log4j-api:2.24.3") implementation("org.apache.logging.log4j:log4j-slf4j2-impl:2.24.3") diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java index 8c3ff007c..abb8a1a6f 100644 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java @@ -1,5 +1,6 @@ package com.expediagroup.sdk.xap.examples.scenarios; +import com.expediagroup.sdk.core.auth.basic.BasicCredentials; import com.expediagroup.sdk.xap.client.XapClient; /** @@ -19,10 +20,15 @@ public interface XapScenario { default XapClient createClient() { String key = System.getProperty("com.expediagroup.xapjavasdk.apikey"); String secret = System.getProperty("com.expediagroup.xapjavasdk.apisecret"); + + BasicCredentials credentials = new BasicCredentials(key, secret); + + // Or enable OAuth by passing OAuthCredentials instead: + // OAuthCredentials credentials = new OAuthCredentials("api-key", "api-secret"); + return XapClient - .builder() - .key(key) - .secret(secret) - .build(); + .builder() + .credentials(credentials) + .build(); } } diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java index 11ce6bbd4..dc37eca7d 100644 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java @@ -1,5 +1,7 @@ package com.expediagroup.sdk.xap.examples.scenarios.lodging; +import com.expediagroup.sdk.core.auth.basic.BasicCredentials; +import com.expediagroup.sdk.core.auth.oauth.OAuthCredentials; import com.expediagroup.sdk.xap.client.XapClient; import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; @@ -18,11 +20,16 @@ public interface VrboScenario extends XapScenario { default XapClient createClient() { String key = System.getProperty("com.expediagroup.xapjavasdk.vrbokey"); String secret = System.getProperty("com.expediagroup.xapjavasdk.vrbosecret"); + + BasicCredentials credentials = new BasicCredentials(key, secret); + + // Or enable OAuth by passing OAuthCredentials instead: + // OAuthCredentials credentials = new OAuthCredentials("api-key", "api-secret"); + return XapClient - .builder() - .key(key) - .secret(secret) - .build(); + .builder() + .credentials(credentials) + .build(); } } diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index 26c0be944..3b09870a3 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -2,26 +2,13 @@ import com.expediagroup.sdk.xap.generator.mustache.AllowedMediaTypesLambda import org.openapitools.codegen.CodegenConstants plugins { - `kotlin-dsl` - kotlin("jvm") version "2.1.10" id("com.expediagroup.sdk.openapigenerator") version "0.0.3-beta-SNAPSHOT" - id("org.jlleitschuh.gradle.ktlint") version "12.1.2" } -group = "com.expediagroup.sdk" -version = "1.0-SNAPSHOT" +group = project.property("GROUP_ID") as String dependencies { api("org.openapitools:openapi-generator:7.11.0") - testImplementation(kotlin("test")) -} - -tasks.test { - useJUnitPlatform() -} - -kotlin { - jvmToolchain(8) } openApiGenerate { diff --git a/gradle-tasks/sdk-properties.gradle.kts b/gradle-tasks/sdk-properties.gradle.kts new file mode 100644 index 000000000..074ea6ad2 --- /dev/null +++ b/gradle-tasks/sdk-properties.gradle.kts @@ -0,0 +1,20 @@ +import org.gradle.language.jvm.tasks.ProcessResources + +// Retrieve properties from the Gradle project +val artifactName = project.property("ARTIFACT_NAME") as String +val version = project.property("VERSION") as String +val groupId = project.property("GROUP_ID") as String + +// Prepare the content for sdk.properties +val sdkPropertiesContent = """ + artifactName=$artifactName + version=$version + groupId=$groupId +""".trimIndent() + +// Configure the processResources task to include sdk.properties +tasks.named("processResources") { + from(project.resources.text.fromString(sdkPropertiesContent)) { + rename { "sdk.properties" } + } +} \ No newline at end of file diff --git a/gradle-tasks/snapshot.gradle b/gradle-tasks/snapshot.gradle new file mode 100644 index 000000000..d74a0b2e9 --- /dev/null +++ b/gradle-tasks/snapshot.gradle @@ -0,0 +1,27 @@ +// Nexus publishing plugin relies on the root project version to determine which repository to use (releases | snapshots) +// We're setting the root project to a dummy version (1.0.0-SNAPSHOT) to instruct the plugin to use the snapshot repo. +// This version won't be published. The publishSnapshots task will publish submodules with the defined version in their gradle.properties +gradle.taskGraph.whenReady { taskGraph -> + if (taskGraph.hasTask(":publishSnapshots")) { + rootProject.version = "1.0.0-SNAPSHOT" + println "📌 Setting root project version to 1.0.0-SNAPSHOT for publishSnapshots task" + } +} + +tasks.register("publishSnapshots") { + def snapshotModules = rootProject.subprojects.findAll { project -> + project.version.toString().contains("-SNAPSHOT") && project.tasks.named("publish") != null + } + + if (!snapshotModules.isEmpty()) { + dependsOn snapshotModules.collect { ":${it.name}:publish" } + } + + doLast { + if (snapshotModules.isEmpty()) { + println "❌ No snapshot modules to publish." + } else { + println "📦 Successfully published snapshots for: ${snapshotModules*.name}" + } + } +} diff --git a/gradle-tasks/snapshot.gradle.kts b/gradle-tasks/snapshot.gradle.kts deleted file mode 100644 index db00c15b7..000000000 --- a/gradle-tasks/snapshot.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -tasks.register("publishSnapshot") { - val artifactId = project.property("ARTIFACT_NAME") as String - val version = if (project.findProperty("SNAPSHOT_VERSION") != null) { - project.findProperty("SNAPSHOT_VERSION") as String - } else { - project.property("VERSION") as String - } - - require(project.tasks.names.contains("publish")) { - "Publish task must be present to publish a $artifactId snapshot" - } - - require(version.contains("-SNAPSHOT")) { - "$artifactId:$version version must contain -SNAPSHOT to publish snapshots." - } - - dependsOn(":${project.name}:publish") - doLast { - val url = "https://oss.sonatype.org/content/repositories/snapshots/com/expediagroup/$artifactId/$version/" - println("📦 Successfully published $artifactId:$version snapshot.") - println("🌱 Snapshot available at: $url") - } -} diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index 185375ba6..d6303589a 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -1,61 +1,19 @@ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget - plugins { - kotlin("jvm") version "2.1.10" - id("java") id("signing") id("maven-publish") - id("org.jlleitschuh.gradle.ktlint") version "12.1.2" } -repositories { - mavenCentral() - maven { - url = uri("https://oss.sonatype.org/content/repositories/snapshots/") - } -} +group = property("GROUP_ID") as String +version = property("VERSION") as String dependencies { - testImplementation(kotlin("test")) - api("com.expediagroup:expediagroup-sdk-rest:0.0.1-beta-SNAPSHOT") - implementation("com.expediagroup:expediagroup-sdk-transport-okhttp:0.0.1-beta-SNAPSHOT") + api("com.expediagroup:expediagroup-sdk-rest:0.0.5-alpha-SNAPSHOT") implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2") - implementation("org.slf4j:slf4j-simple:2.0.16") runtimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2") -} - -tasks.test { - useJUnitPlatform() -} - -kotlin { - jvmToolchain(21) - compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8) -} - -java { - withSourcesJar() - targetCompatibility = JavaVersion.VERSION_1_8 - sourceCompatibility = JavaVersion.VERSION_1_8 -} - -ktlint { - debug = true - version = "1.5.0" - verbose = true - - additionalEditorconfig = - mapOf( - "max_line_length" to "200", - "indent_style" to "space", - "indent_size" to "4", - "insert_final_newline" to "true", - "end_of_line" to "lf", - "ktlint_standard_enum-entry-name-case" to "disabled", - ) + implementation("org.slf4j:slf4j-api:2.0.17") } apply("$rootDir/gradle-tasks/publish.gradle.kts") apply("$rootDir/gradle-tasks/signing.gradle.kts") -apply("$rootDir/gradle-tasks/snapshot.gradle.kts") +apply("$rootDir/gradle-tasks/sdk-properties.gradle.kts") diff --git a/xap-sdk/gradle.properties b/xap-sdk/gradle.properties index e3bcef3d8..28dd895c5 100644 --- a/xap-sdk/gradle.properties +++ b/xap-sdk/gradle.properties @@ -1,6 +1,4 @@ ARTIFACT_NAME=xap-sdk DESCRIPTION=The Expedia API Platform (XAP) SDK -# x-release-please-start-version -VERSION=2.0.1-alpha-SNAPSHOT -# x-release-please-end +VERSION=2.0.0-SNAPSHOT diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt index ff92e92f8..55c563947 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2025 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. + */ + package com.expediagroup.sdk.xap.client import com.expediagroup.sdk.rest.AsyncRestClient @@ -5,10 +21,9 @@ import com.expediagroup.sdk.rest.AsyncRestExecutor import com.expediagroup.sdk.rest.model.Response import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait import com.expediagroup.sdk.rest.trait.operation.OperationNoResponseBodyTrait -import com.expediagroup.sdk.xap.configuration.ApiEndpoint import com.expediagroup.sdk.xap.configuration.AsyncClientBuilder import com.expediagroup.sdk.xap.configuration.AsyncXapClientConfiguration -import com.expediagroup.sdk.xap.configuration.EndpointProvider +import com.expediagroup.sdk.xap.configuration.Constant.ENDPOINT import com.expediagroup.sdk.xap.configuration.XAP_OBJECT_MAPPER import com.expediagroup.sdk.xap.core.AsyncRequestExecutor import java.util.concurrent.CompletableFuture @@ -16,18 +31,15 @@ import java.util.concurrent.CompletableFuture /** * Asynchronous client for XAP API. * - * @property apiEndpoint The API endpoint for XAP. * @property restExecutor The executor for handling REST operations. */ class AsyncXapClient private constructor( config: AsyncXapClientConfiguration, ) : AsyncRestClient() { - private val apiEndpoint: ApiEndpoint = EndpointProvider.getXapApiEndpoint(config.environment) - override val restExecutor: AsyncRestExecutor = AsyncRestExecutor( mapper = XAP_OBJECT_MAPPER, - serverUrl = apiEndpoint.endpoint, + serverUrl = ENDPOINT, requestExecutor = AsyncRequestExecutor(configuration = config), ) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt index fbdd32369..be8bbecae 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2025 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. + */ + package com.expediagroup.sdk.xap.client import com.expediagroup.sdk.rest.RestClient @@ -5,10 +21,8 @@ import com.expediagroup.sdk.rest.RestExecutor import com.expediagroup.sdk.rest.model.Response import com.expediagroup.sdk.rest.trait.operation.JacksonModelOperationResponseBodyTrait import com.expediagroup.sdk.rest.trait.operation.OperationNoResponseBodyTrait -import com.expediagroup.sdk.xap.configuration.ApiEndpoint import com.expediagroup.sdk.xap.configuration.ClientBuilder -import com.expediagroup.sdk.xap.configuration.ClientEnvironment -import com.expediagroup.sdk.xap.configuration.EndpointProvider +import com.expediagroup.sdk.xap.configuration.Constant.ENDPOINT import com.expediagroup.sdk.xap.configuration.XAP_OBJECT_MAPPER import com.expediagroup.sdk.xap.configuration.XapClientConfiguration import com.expediagroup.sdk.xap.core.RequestExecutor @@ -16,28 +30,16 @@ import com.expediagroup.sdk.xap.core.RequestExecutor /** * Synchronous client for XAP API. * - * @property apiEndpoint The API endpoint for XAP. * @property restExecutor The executor for handling REST operations. */ class XapClient private constructor( config: XapClientConfiguration, ) : RestClient() { - private val apiEndpoint: ApiEndpoint = EndpointProvider.getXapApiEndpoint(config.environment) - override val restExecutor: RestExecutor = RestExecutor( mapper = XAP_OBJECT_MAPPER, - serverUrl = apiEndpoint.endpoint, - requestExecutor = - RequestExecutor( - configuration = - XapClientConfiguration( - key = config.key, - secret = config.secret, - environment = ClientEnvironment.PROD, - transport = config.transport, - ), - ), + serverUrl = ENDPOINT, + requestExecutor = RequestExecutor(config), ) /** diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt deleted file mode 100644 index 1655aa96b..000000000 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ApiEndpoint.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.expediagroup.sdk.xap.configuration - -/** - * Data class representing an API endpoint. - * - * @property endpoint The URL of the API endpoint. - */ -data class ApiEndpoint( - val endpoint: String, -) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt deleted file mode 100644 index f5b3e59f9..000000000 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/ClientEnvironment.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.expediagroup.sdk.xap.configuration - -/** - * Enum representing the client environment. - */ -enum class ClientEnvironment { - /** Production environment. */ - PROD, -} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/Constant.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/Constant.kt new file mode 100644 index 000000000..f70e720d8 --- /dev/null +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/Constant.kt @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2025 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. + */ + +package com.expediagroup.sdk.xap.configuration + +internal object Constant { + const val ENDPOINT = "https://apim.expedia.com" + const val AUTH_ENDPOINT = "https://api.expediagroup.com/identity/oauth2/v3/token" +} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt deleted file mode 100644 index 1ea8ca76b..000000000 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.expediagroup.sdk.xap.configuration - -import com.expediagroup.sdk.core.exception.client.ExpediaGroupConfigurationException - -/** - * Provides API endpoints based on the client environment. - */ -internal object EndpointProvider { - /** - * Retrieves the API endpoint for the given environment. - * - * @param environment The client environment. Defaults to [ClientEnvironment.PROD] if not specified. - * @return The [ApiEndpoint] for the specified environment. - * @throws ExpediaGroupConfigurationException If the environment is unsupported. - */ - fun getXapApiEndpoint(environment: ClientEnvironment? = null): ApiEndpoint { - val env = environment ?: ClientEnvironment.PROD - - return try { - ApiEndpoint( - XapApiEndpoint.valueOf(env.name).url, - ) - } catch (e: IllegalArgumentException) { - throw ExpediaGroupConfigurationException( - """ - Unsupported environment [$environment] for Supply API. - Supported environments are [${XapApiEndpoint.entries.joinToString(", ")}] - """, - ) - } - } -} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt deleted file mode 100644 index 074b6bd02..000000000 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapApiEndpoint.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.expediagroup.sdk.xap.configuration - -/** - * Enum representing the XAP API endpoints. - * - * @property url The URL of the API endpoint. - */ -enum class XapApiEndpoint( - val url: String, -) { - /** Production environment endpoint. */ - PROD("https://apim.expedia.com"), -} diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt index cd1d77411..91ca93aea 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt @@ -1,5 +1,22 @@ +/* + * Copyright (C) 2025 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. + */ + package com.expediagroup.sdk.xap.configuration +import com.expediagroup.sdk.core.auth.common.Credentials import com.expediagroup.sdk.core.transport.AsyncTransport import com.expediagroup.sdk.core.transport.Transport import com.expediagroup.sdk.rest.AsyncRestClient @@ -8,30 +25,20 @@ import com.expediagroup.sdk.rest.RestClient /** * Configuration data class for XAP client. * - * @property key The API key. - * @property secret The API secret. - * @property environment The client environment. Defaults to null. * @property transport The transport mechanism. Defaults to null. */ data class XapClientConfiguration( - val key: String, - val secret: String, - val environment: ClientEnvironment? = null, + val credentials: Credentials, val transport: Transport? = null, ) /** * Configuration data class for asynchronous XAP client. * - * @property key The API key. - * @property secret The API secret. - * @property environment The client environment. Defaults to null. * @property asyncTransport The asynchronous transport mechanism. Defaults to null. */ data class AsyncXapClientConfiguration( - val key: String, - val secret: String, - val environment: ClientEnvironment? = null, + val credentials: Credentials, val asyncTransport: AsyncTransport? = null, ) @@ -41,34 +48,16 @@ data class AsyncXapClientConfiguration( * @param T The type of [RestClient] to build. */ abstract class ClientBuilder { - private var key: String? = null - private var secret: String? = null - private var environment: ClientEnvironment? = null + private var credentials: Credentials? = null private var transport: Transport? = null /** - * Sets the API key. - * - * @param key The API key. - * @return The builder instance. - */ - fun key(key: String) = apply { this.key = key } - - /** - * Sets the API secret. - * - * @param secret The API secret. - * @return The builder instance. - */ - fun secret(secret: String) = apply { this.secret = secret } - - /** - * Sets the client environment. + * Sets the credentials used to authenticate with the API. * - * @param environment The client environment. + * @param credentials * @return The builder instance. */ - fun environment(environment: ClientEnvironment) = apply { this.environment = environment } + fun credentials(credentials: Credentials) = apply { this.credentials = credentials } /** * Sets the transport mechanism. @@ -89,21 +78,15 @@ abstract class ClientBuilder { * Builds the configuration for the XAP client. * * @return The built [XapClientConfiguration] instance. - * @throws IllegalArgumentException If the key or secret is not provided. + * @throws IllegalArgumentException If the credentials type is unsupported */ protected fun buildConfig(): XapClientConfiguration { - require(key != null) { - "key is required" - } - - require(secret != null) { - "secret is required" + require(credentials != null) { + "credentials is required" } return XapClientConfiguration( - key = key!!, - secret = secret!!, - environment = environment, + credentials = credentials!!, transport = transport, ) } @@ -115,34 +98,16 @@ abstract class ClientBuilder { * @param T The type of [AsyncRestClient] to build. */ abstract class AsyncClientBuilder { - private var key: String? = null - private var secret: String? = null - private var environment: ClientEnvironment? = null + private var credentials: Credentials? = null private var asyncTransport: AsyncTransport? = null /** - * Sets the API key. - * - * @param key The API key. - * @return The builder instance. - */ - fun key(key: String) = apply { this.key = key } - - /** - * Sets the API secret. + * Sets the credentials used to authenticate with the API. * - * @param secret The API secret. + * @param credentials * @return The builder instance. */ - fun secret(secret: String) = apply { this.secret = secret } - - /** - * Sets the client environment. - * - * @param environment The client environment. - * @return The builder instance. - */ - fun environment(environment: ClientEnvironment) = apply { this.environment = environment } + fun credentials(credentials: Credentials) = apply { this.credentials = credentials } /** * Sets the asynchronous transport mechanism. @@ -163,21 +128,15 @@ abstract class AsyncClientBuilder { * Builds the configuration for the asynchronous XAP client. * * @return The built [AsyncXapClientConfiguration] instance. - * @throws IllegalArgumentException If the key or secret is not provided. + * @throws IllegalArgumentException If the credentials type is unsupported */ protected fun buildConfig(): AsyncXapClientConfiguration { - require(key != null) { - "key is required" - } - - require(secret != null) { - "secret is required" + require(credentials != null) { + "credentials is required" } return AsyncXapClientConfiguration( - key = key!!, - secret = secret!!, - environment = environment, + credentials = credentials!!, asyncTransport = asyncTransport, ) } diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt index 02677229b..467ad4016 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapJacksonObjectMapper.kt @@ -1,5 +1,22 @@ +/* + * Copyright (C) 2025 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. + */ + package com.expediagroup.sdk.xap.configuration +import com.fasterxml.jackson.databind.DeserializationFeature import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder @@ -9,5 +26,8 @@ import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder * This instance is built using `jacksonMapperBuilder` and automatically registers all available modules. */ val XAP_OBJECT_MAPPER: ObjectMapper = - jacksonMapperBuilder { - }.build().findAndRegisterModules() + jacksonMapperBuilder() + .enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .build() + .findAndRegisterModules() diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt index d5744f593..58326ff93 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2025 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. + */ + package com.expediagroup.sdk.xap.core import com.expediagroup.sdk.core.http.Request diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt index de1a12786..531d7a329 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt @@ -1,15 +1,39 @@ +/* + * Copyright (C) 2025 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. + */ + package com.expediagroup.sdk.xap.core -import com.expediagroup.sdk.core.authentication.basic.BasicAuthenticationManager -import com.expediagroup.sdk.core.authentication.common.Credentials +import com.expediagroup.sdk.core.auth.basic.BasicAuthManager +import com.expediagroup.sdk.core.auth.basic.BasicCredentials +import com.expediagroup.sdk.core.auth.oauth.OAuthAsyncManager +import com.expediagroup.sdk.core.auth.oauth.OAuthCredentials +import com.expediagroup.sdk.core.exception.client.ExpediaGroupConfigurationException import com.expediagroup.sdk.core.logging.LoggerDecorator +import com.expediagroup.sdk.core.logging.masking.MaskHeaders import com.expediagroup.sdk.core.pipeline.ExecutionPipeline -import com.expediagroup.sdk.core.pipeline.step.BasicAuthenticationStep +import com.expediagroup.sdk.core.pipeline.RequestPipelineStep +import com.expediagroup.sdk.core.pipeline.ResponsePipelineStep +import com.expediagroup.sdk.core.pipeline.step.BasicAuthStep +import com.expediagroup.sdk.core.pipeline.step.OAuthStep import com.expediagroup.sdk.core.pipeline.step.RequestHeadersStep import com.expediagroup.sdk.core.pipeline.step.RequestLoggingStep import com.expediagroup.sdk.core.pipeline.step.ResponseLoggingStep import com.expediagroup.sdk.core.transport.AbstractAsyncRequestExecutor import com.expediagroup.sdk.xap.configuration.AsyncXapClientConfiguration +import com.expediagroup.sdk.xap.configuration.Constant.AUTH_ENDPOINT import org.slf4j.LoggerFactory /** @@ -18,28 +42,53 @@ import org.slf4j.LoggerFactory * @param configuration The configuration for the asynchronous XAP client. */ class AsyncRequestExecutor( - configuration: AsyncXapClientConfiguration, + private val configuration: AsyncXapClientConfiguration, ) : AbstractAsyncRequestExecutor(configuration.asyncTransport) { - private val authManager = - BasicAuthenticationManager( - credentials = Credentials(configuration.key, configuration.secret), - ) - /** - * The execution pipeline for processing requests and responses. - */ + private val headersMask = MaskHeaders(listOf("authorization")) + override val executionPipeline = ExecutionPipeline( - requestPipeline = + requestPipeline = getRequestPipeline(), + responsePipeline = getResponsePipeline(), + ) + + private fun getRequestPipeline(): List = + when (configuration.credentials) { + is BasicCredentials -> listOf( RequestHeadersStep(), - BasicAuthenticationStep(authManager), - RequestLoggingStep(logger), - ), - responsePipeline = + ApiKeyHeaderStep(configuration.credentials.username), + BasicAuthStep(BasicAuthManager(configuration.credentials)), + RequestLoggingStep( + logger = logger, + maskHeaders = headersMask + ), + ) + + is OAuthCredentials -> listOf( - ResponseLoggingStep(logger), - ), + RequestHeadersStep(), + ApiKeyHeaderStep(configuration.credentials.key), + OAuthStep( + OAuthAsyncManager( + credentials = configuration.credentials, + asyncTransport = asyncTransport, + authUrl = AUTH_ENDPOINT, + ), + ), + RequestLoggingStep( + logger = logger, + maskHeaders = headersMask + ), + ) + + else -> throw ExpediaGroupConfigurationException("Unsupported credentials type: ${configuration.credentials.javaClass.name}") + } + + private fun getResponsePipeline(): List = + listOf( + ResponseLoggingStep(logger), ) companion object { diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt index 7a0b101d6..114c6e9c9 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt @@ -1,14 +1,38 @@ +/* + * Copyright (C) 2025 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. + */ + package com.expediagroup.sdk.xap.core -import com.expediagroup.sdk.core.authentication.basic.BasicAuthenticationManager -import com.expediagroup.sdk.core.authentication.common.Credentials +import com.expediagroup.sdk.core.auth.basic.BasicAuthManager +import com.expediagroup.sdk.core.auth.basic.BasicCredentials +import com.expediagroup.sdk.core.auth.oauth.OAuthCredentials +import com.expediagroup.sdk.core.auth.oauth.OAuthManager +import com.expediagroup.sdk.core.exception.client.ExpediaGroupConfigurationException import com.expediagroup.sdk.core.logging.LoggerDecorator +import com.expediagroup.sdk.core.logging.masking.MaskHeaders import com.expediagroup.sdk.core.pipeline.ExecutionPipeline -import com.expediagroup.sdk.core.pipeline.step.BasicAuthenticationStep +import com.expediagroup.sdk.core.pipeline.RequestPipelineStep +import com.expediagroup.sdk.core.pipeline.ResponsePipelineStep +import com.expediagroup.sdk.core.pipeline.step.BasicAuthStep +import com.expediagroup.sdk.core.pipeline.step.OAuthStep import com.expediagroup.sdk.core.pipeline.step.RequestHeadersStep import com.expediagroup.sdk.core.pipeline.step.RequestLoggingStep import com.expediagroup.sdk.core.pipeline.step.ResponseLoggingStep import com.expediagroup.sdk.core.transport.AbstractRequestExecutor +import com.expediagroup.sdk.xap.configuration.Constant.AUTH_ENDPOINT import com.expediagroup.sdk.xap.configuration.XapClientConfiguration import org.slf4j.LoggerFactory @@ -18,29 +42,53 @@ import org.slf4j.LoggerFactory * @param configuration The configuration for the XAP client. */ class RequestExecutor( - configuration: XapClientConfiguration, + private val configuration: XapClientConfiguration, ) : AbstractRequestExecutor(configuration.transport) { - private val authManager = - BasicAuthenticationManager( - credentials = Credentials(configuration.key, configuration.secret), - ) - /** - * The execution pipeline for processing requests and responses. - */ + private val headersMask = MaskHeaders(listOf("authorization")) + override val executionPipeline = ExecutionPipeline( - requestPipeline = + requestPipeline = getRequestPipeline(), + responsePipeline = getResponsePipeline(), + ) + + private fun getRequestPipeline(): List = + when (configuration.credentials) { + is BasicCredentials -> listOf( RequestHeadersStep(), - ApiKeyHeaderStep(configuration.key), - BasicAuthenticationStep(authManager), - RequestLoggingStep(logger), - ), - responsePipeline = + ApiKeyHeaderStep(configuration.credentials.username), + BasicAuthStep(BasicAuthManager(configuration.credentials)), + RequestLoggingStep( + logger = logger, + maskHeaders = headersMask + ), + ) + + is OAuthCredentials -> listOf( - ResponseLoggingStep(logger), - ), + RequestHeadersStep(), + ApiKeyHeaderStep(configuration.credentials.key), + OAuthStep( + OAuthManager( + credentials = configuration.credentials, + transport = transport, + authUrl = AUTH_ENDPOINT, + ), + ), + RequestLoggingStep( + logger = logger, + maskHeaders = headersMask + ), + ) + + else -> throw ExpediaGroupConfigurationException("Unsupported credentials type: ${configuration.credentials.javaClass.name}") + } + + private fun getResponsePipeline(): List = + listOf( + ResponseLoggingStep(logger), ) companion object { From a6cbb4870ac7437125e4139628ee467eea8db42f Mon Sep 17 00:00:00 2001 From: mdwairi Date: Wed, 26 Mar 2025 18:34:21 +0300 Subject: [PATCH 37/40] chore: code format --- .../com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt | 5 ++--- .../kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt index 531d7a329..98991da2e 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt @@ -44,7 +44,6 @@ import org.slf4j.LoggerFactory class AsyncRequestExecutor( private val configuration: AsyncXapClientConfiguration, ) : AbstractAsyncRequestExecutor(configuration.asyncTransport) { - private val headersMask = MaskHeaders(listOf("authorization")) override val executionPipeline = @@ -62,7 +61,7 @@ class AsyncRequestExecutor( BasicAuthStep(BasicAuthManager(configuration.credentials)), RequestLoggingStep( logger = logger, - maskHeaders = headersMask + maskHeaders = headersMask, ), ) @@ -79,7 +78,7 @@ class AsyncRequestExecutor( ), RequestLoggingStep( logger = logger, - maskHeaders = headersMask + maskHeaders = headersMask, ), ) diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt index 114c6e9c9..8f18be394 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt @@ -44,7 +44,6 @@ import org.slf4j.LoggerFactory class RequestExecutor( private val configuration: XapClientConfiguration, ) : AbstractRequestExecutor(configuration.transport) { - private val headersMask = MaskHeaders(listOf("authorization")) override val executionPipeline = @@ -62,7 +61,7 @@ class RequestExecutor( BasicAuthStep(BasicAuthManager(configuration.credentials)), RequestLoggingStep( logger = logger, - maskHeaders = headersMask + maskHeaders = headersMask, ), ) @@ -79,7 +78,7 @@ class RequestExecutor( ), RequestLoggingStep( logger = logger, - maskHeaders = headersMask + maskHeaders = headersMask, ), ) From 44bfde2d90a75996c9649d625ffd161262e46d42 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Wed, 26 Mar 2025 20:27:41 +0300 Subject: [PATCH 38/40] chore: fix variable name for version in publish SDK workflow --- .github/workflows/generate-publish-sdk.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index a7083af8c..76604143e 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -53,7 +53,7 @@ jobs: SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} run: | version="${{ github.event.inputs.version }}" - if [[ "${v// /}" == *"-SNAPSHOT" ]]; then + if [[ "${version// /}" == *"-SNAPSHOT" ]]; then gradle publishSnapshot -PVERSION="${version}" else gradle publishToSonatype closeAndReleaseSonatypeStagingRepository -PVERSION="${version}" From 583849df4cef1d7ba260ec1b5d353184d29ab969 Mon Sep 17 00:00:00 2001 From: mdwairi Date: Fri, 28 Mar 2025 01:12:42 +0300 Subject: [PATCH 39/40] fix: rename BasicCredential --- .../expediagroup/sdk/xap/examples/scenarios/XapScenario.java | 4 ++-- .../sdk/xap/examples/scenarios/lodging/VrboScenario.java | 5 ++--- xap-sdk/build.gradle.kts | 2 +- .../com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt | 4 ++-- .../kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java index abb8a1a6f..852016cf3 100644 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/XapScenario.java @@ -1,6 +1,6 @@ package com.expediagroup.sdk.xap.examples.scenarios; -import com.expediagroup.sdk.core.auth.basic.BasicCredentials; +import com.expediagroup.sdk.core.auth.basic.BasicAuthCredentials; import com.expediagroup.sdk.xap.client.XapClient; /** @@ -21,7 +21,7 @@ default XapClient createClient() { String key = System.getProperty("com.expediagroup.xapjavasdk.apikey"); String secret = System.getProperty("com.expediagroup.xapjavasdk.apisecret"); - BasicCredentials credentials = new BasicCredentials(key, secret); + BasicAuthCredentials credentials = new BasicAuthCredentials(key, secret); // Or enable OAuth by passing OAuthCredentials instead: // OAuthCredentials credentials = new OAuthCredentials("api-key", "api-secret"); diff --git a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java index dc37eca7d..da9443399 100644 --- a/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java +++ b/examples/src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/VrboScenario.java @@ -1,7 +1,6 @@ package com.expediagroup.sdk.xap.examples.scenarios.lodging; -import com.expediagroup.sdk.core.auth.basic.BasicCredentials; -import com.expediagroup.sdk.core.auth.oauth.OAuthCredentials; +import com.expediagroup.sdk.core.auth.basic.BasicAuthCredentials; import com.expediagroup.sdk.xap.client.XapClient; import com.expediagroup.sdk.xap.examples.scenarios.XapScenario; @@ -21,7 +20,7 @@ default XapClient createClient() { String key = System.getProperty("com.expediagroup.xapjavasdk.vrbokey"); String secret = System.getProperty("com.expediagroup.xapjavasdk.vrbosecret"); - BasicCredentials credentials = new BasicCredentials(key, secret); + BasicAuthCredentials credentials = new BasicAuthCredentials(key, secret); // Or enable OAuth by passing OAuthCredentials instead: // OAuthCredentials credentials = new OAuthCredentials("api-key", "api-secret"); diff --git a/xap-sdk/build.gradle.kts b/xap-sdk/build.gradle.kts index d6303589a..e86aa4124 100644 --- a/xap-sdk/build.gradle.kts +++ b/xap-sdk/build.gradle.kts @@ -7,7 +7,7 @@ group = property("GROUP_ID") as String version = property("VERSION") as String dependencies { - api("com.expediagroup:expediagroup-sdk-rest:0.0.5-alpha-SNAPSHOT") + api("com.expediagroup:expediagroup-sdk-rest:0.0.6-alpha") implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2") runtimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2") diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt index 98991da2e..5c809bc1d 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt @@ -16,8 +16,8 @@ package com.expediagroup.sdk.xap.core +import com.expediagroup.sdk.core.auth.basic.BasicAuthCredentials import com.expediagroup.sdk.core.auth.basic.BasicAuthManager -import com.expediagroup.sdk.core.auth.basic.BasicCredentials import com.expediagroup.sdk.core.auth.oauth.OAuthAsyncManager import com.expediagroup.sdk.core.auth.oauth.OAuthCredentials import com.expediagroup.sdk.core.exception.client.ExpediaGroupConfigurationException @@ -54,7 +54,7 @@ class AsyncRequestExecutor( private fun getRequestPipeline(): List = when (configuration.credentials) { - is BasicCredentials -> + is BasicAuthCredentials -> listOf( RequestHeadersStep(), ApiKeyHeaderStep(configuration.credentials.username), diff --git a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt index 8f18be394..0d989ebc6 100644 --- a/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt +++ b/xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/RequestExecutor.kt @@ -16,8 +16,8 @@ package com.expediagroup.sdk.xap.core +import com.expediagroup.sdk.core.auth.basic.BasicAuthCredentials import com.expediagroup.sdk.core.auth.basic.BasicAuthManager -import com.expediagroup.sdk.core.auth.basic.BasicCredentials import com.expediagroup.sdk.core.auth.oauth.OAuthCredentials import com.expediagroup.sdk.core.auth.oauth.OAuthManager import com.expediagroup.sdk.core.exception.client.ExpediaGroupConfigurationException @@ -54,7 +54,7 @@ class RequestExecutor( private fun getRequestPipeline(): List = when (configuration.credentials) { - is BasicCredentials -> + is BasicAuthCredentials -> listOf( RequestHeadersStep(), ApiKeyHeaderStep(configuration.credentials.username), From 21e73d57da0f61036202f95421dd61a41e350b48 Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 7 Apr 2025 12:33:07 +0300 Subject: [PATCH 40/40] chore: trim whitespace from version input in publish SDK workflow --- .github/workflows/generate-publish-sdk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-publish-sdk.yaml b/.github/workflows/generate-publish-sdk.yaml index 76604143e..9dd1e286e 100644 --- a/.github/workflows/generate-publish-sdk.yaml +++ b/.github/workflows/generate-publish-sdk.yaml @@ -5,7 +5,6 @@ on: type: string description: "Version to publish. For snapshot releases, add `-SNAPSHOT` suffix to the version. For example, `1.0.0-SNAPSHOT`." required: true - default: true jobs: generate-and-publish: @@ -53,7 +52,8 @@ jobs: SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} run: | version="${{ github.event.inputs.version }}" - if [[ "${version// /}" == *"-SNAPSHOT" ]]; then + version="${version// /}" + if [[ "$version" == *"-SNAPSHOT" ]]; then gradle publishSnapshot -PVERSION="${version}" else gradle publishToSonatype closeAndReleaseSonatypeStagingRepository -PVERSION="${version}"