![JAR search and dependency download from the Maven repository](/logo.png)
travel.wink.sdk.booking.engine.model.MerchantBookingRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of booking-engine-sdk-java Show documentation
Show all versions of booking-engine-sdk-java Show documentation
Java SDK for the wink Booking Engine API
/*
* Wink API
* ## APIs Not every integrator needs every APIs. For that reason, we have separated APIs into context. - [Affiliate](/docs?api=affiliate): All APIs related to selling travel inventory as an affiliate. - [Extranet](/docs?api=extranet): All APIs related to managing travel inventory and suppliers. - [Booking Engine](/docs?api=booking-engine): All APIs related to searching for travel inventory and creating bookings. - [Channel Manager](https://integration.wink.travel/docs?api=channel-manager): All APIs related to channel managers who want to integrate with our payment. ## SDKs We are actively working on supporting the most used languages out there. If you don't see your language here, reach out to us with a request to officially add your language. In the meantime, if you want to roll your own SDK, you can do so by downloading the OpenAPI spec and using one of the many available OpenAPI generators available: [https://openapi-generator.tech/docs/generators](https://openapi-generator.tech/docs/generators). - Java SDK [https://github.com/wink-travel/wink-sdk-java](https://github.com/wink-travel/wink-sdk-java) ## Usage These features are made available to you via a [REST API](https://en.wikipedia.org/wiki/Representational_state_transfer). This API is language agnostic. ## Versioning We chose to version our endpoints in a way that we hope affects your integration with us the least. You request the version of our API you wish to work with via the `Accept` header and by using our custom JSON mime type. When it's time for you to upgrade, you only have to change the version number to get access to our updated endpoints. You can also choose to always work with the latest major version release by accepting application/json. We recommend the former. Example: application/vnd.payment-v`1`+json. ## Release history - 2022-05-08: v1 - Exposed channel manager API - 2021-07-01: v1 - Initial release # Booking Engine API Welcome to the Booking Engine API - A programmer-friendly way to search for bespoke travel inventory and create bookings for you or your customers. We take great care in only working with properties that have quality, curated content and ways to bundle and cross sell customers with ancillary products and experiences. Suppliers have the ability to make their inventory look great and be searchable in a wide variety of ways. You can work with suppliers directly or receive payment-level pricing available to all our integration partners. # Intended Audience Programmers are a requirement to start integrating with wink. You will benefit from an API integration if you are new or existing travel related company that want easy access to great inventory. Examples: - Hotel brands / chains that want to make their own booking engine - Travel tech companies that want to create the next hot mobile travel app - Destination sites that want to make their own booking engine - OTAs that want access direct relationships with suppliers and better quality hotel inventory
*
* The version of the OpenAPI document: 20.3.2-SNAPSHOT
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package travel.wink.sdk.booking.engine.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import travel.wink.sdk.booking.engine.model.AncillaryRequest;
import travel.wink.sdk.booking.engine.model.BookingUserRequest;
import travel.wink.sdk.booking.engine.model.RoomConfiguration;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import javax.validation.constraints.*;
import javax.validation.Valid;
import org.hibernate.validator.constraints.*;
/**
* List of room configuration booking requests. Each entry is a separately booked room.
*/
@ApiModel(description = "List of room configuration booking requests. Each entry is a separately booked room.")
@JsonPropertyOrder({
MerchantBookingRequest.JSON_PROPERTY_HOTEL_IDENTIFIER,
MerchantBookingRequest.JSON_PROPERTY_START_DATE,
MerchantBookingRequest.JSON_PROPERTY_END_DATE,
MerchantBookingRequest.JSON_PROPERTY_ROOM_CONFIGURATION,
MerchantBookingRequest.JSON_PROPERTY_PROMOTIONAL_CODES,
MerchantBookingRequest.JSON_PROPERTY_ROOM_RATE_IDENTIFIER,
MerchantBookingRequest.JSON_PROPERTY_BED_TYPE,
MerchantBookingRequest.JSON_PROPERTY_PACKAGE_OFFERS,
MerchantBookingRequest.JSON_PROPERTY_ADD_ON_OFFERS,
MerchantBookingRequest.JSON_PROPERTY_ANCILLARIES,
MerchantBookingRequest.JSON_PROPERTY_SPECIAL_REQUESTS,
MerchantBookingRequest.JSON_PROPERTY_USER,
MerchantBookingRequest.JSON_PROPERTY_TRACE_ID,
MerchantBookingRequest.JSON_PROPERTY_PAYMENT_IDENTIFIER
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-06-29T13:20:36.800596+07:00[Asia/Bangkok]")
public class MerchantBookingRequest {
public static final String JSON_PROPERTY_HOTEL_IDENTIFIER = "hotelIdentifier";
private String hotelIdentifier;
public static final String JSON_PROPERTY_START_DATE = "startDate";
private LocalDate startDate;
public static final String JSON_PROPERTY_END_DATE = "endDate";
private LocalDate endDate;
public static final String JSON_PROPERTY_ROOM_CONFIGURATION = "roomConfiguration";
private RoomConfiguration roomConfiguration;
public static final String JSON_PROPERTY_PROMOTIONAL_CODES = "promotionalCodes";
private List promotionalCodes = null;
public static final String JSON_PROPERTY_ROOM_RATE_IDENTIFIER = "roomRateIdentifier";
private String roomRateIdentifier;
public static final String JSON_PROPERTY_BED_TYPE = "bedType";
private String bedType;
public static final String JSON_PROPERTY_PACKAGE_OFFERS = "packageOffers";
private List packageOffers = null;
public static final String JSON_PROPERTY_ADD_ON_OFFERS = "addOnOffers";
private List addOnOffers = null;
public static final String JSON_PROPERTY_ANCILLARIES = "ancillaries";
private List ancillaries = null;
public static final String JSON_PROPERTY_SPECIAL_REQUESTS = "specialRequests";
private String specialRequests;
public static final String JSON_PROPERTY_USER = "user";
private BookingUserRequest user;
public static final String JSON_PROPERTY_TRACE_ID = "traceId";
private String traceId;
public static final String JSON_PROPERTY_PAYMENT_IDENTIFIER = "paymentIdentifier";
private String paymentIdentifier;
public MerchantBookingRequest() {
}
public MerchantBookingRequest hotelIdentifier(String hotelIdentifier) {
this.hotelIdentifier = hotelIdentifier;
return this;
}
/**
* Unique hotel record identifier.
* @return hotelIdentifier
**/
@javax.annotation.Nonnull
@NotNull
@ApiModelProperty(example = "hotel-1", required = true, value = "Unique hotel record identifier.")
@JsonProperty(JSON_PROPERTY_HOTEL_IDENTIFIER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getHotelIdentifier() {
return hotelIdentifier;
}
@JsonProperty(JSON_PROPERTY_HOTEL_IDENTIFIER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setHotelIdentifier(String hotelIdentifier) {
this.hotelIdentifier = hotelIdentifier;
}
public MerchantBookingRequest startDate(LocalDate startDate) {
this.startDate = startDate;
return this;
}
/**
* Date when guest arrives on the premises.
* @return startDate
**/
@javax.annotation.Nonnull
@NotNull
@Valid
@ApiModelProperty(example = "Sun Jan 31 07:00:00 ICT 2021", required = true, value = "Date when guest arrives on the premises.")
@JsonProperty(JSON_PROPERTY_START_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public LocalDate getStartDate() {
return startDate;
}
@JsonProperty(JSON_PROPERTY_START_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setStartDate(LocalDate startDate) {
this.startDate = startDate;
}
public MerchantBookingRequest endDate(LocalDate endDate) {
this.endDate = endDate;
return this;
}
/**
* Date when guest departs the premises.
* @return endDate
**/
@javax.annotation.Nonnull
@NotNull
@Valid
@ApiModelProperty(example = "Sun Feb 07 07:00:00 ICT 2021", required = true, value = "Date when guest departs the premises.")
@JsonProperty(JSON_PROPERTY_END_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public LocalDate getEndDate() {
return endDate;
}
@JsonProperty(JSON_PROPERTY_END_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setEndDate(LocalDate endDate) {
this.endDate = endDate;
}
public MerchantBookingRequest roomConfiguration(RoomConfiguration roomConfiguration) {
this.roomConfiguration = roomConfiguration;
return this;
}
/**
* Get roomConfiguration
* @return roomConfiguration
**/
@javax.annotation.Nonnull
@NotNull
@Valid
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_ROOM_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public RoomConfiguration getRoomConfiguration() {
return roomConfiguration;
}
@JsonProperty(JSON_PROPERTY_ROOM_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setRoomConfiguration(RoomConfiguration roomConfiguration) {
this.roomConfiguration = roomConfiguration;
}
public MerchantBookingRequest promotionalCodes(List promotionalCodes) {
this.promotionalCodes = promotionalCodes;
return this;
}
public MerchantBookingRequest addPromotionalCodesItem(String promotionalCodesItem) {
if (this.promotionalCodes == null) {
this.promotionalCodes = new ArrayList<>();
}
this.promotionalCodes.add(promotionalCodesItem);
return this;
}
/**
* List of promotional codes the user entered to to activate a promotion.
* @return promotionalCodes
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[\"promo-1\",\"promo-2\"]", value = "List of promotional codes the user entered to to activate a promotion.")
@JsonProperty(JSON_PROPERTY_PROMOTIONAL_CODES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getPromotionalCodes() {
return promotionalCodes;
}
@JsonProperty(JSON_PROPERTY_PROMOTIONAL_CODES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPromotionalCodes(List promotionalCodes) {
this.promotionalCodes = promotionalCodes;
}
public MerchantBookingRequest roomRateIdentifier(String roomRateIdentifier) {
this.roomRateIdentifier = roomRateIdentifier;
return this;
}
/**
* The unique master rate that made the guest room / rate plan available for sale.
* @return roomRateIdentifier
**/
@javax.annotation.Nonnull
@NotNull
@ApiModelProperty(example = "master-rate-1", required = true, value = "The unique master rate that made the guest room / rate plan available for sale.")
@JsonProperty(JSON_PROPERTY_ROOM_RATE_IDENTIFIER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getRoomRateIdentifier() {
return roomRateIdentifier;
}
@JsonProperty(JSON_PROPERTY_ROOM_RATE_IDENTIFIER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setRoomRateIdentifier(String roomRateIdentifier) {
this.roomRateIdentifier = roomRateIdentifier;
}
public MerchantBookingRequest bedType(String bedType) {
this.bedType = bedType;
return this;
}
/**
* Guest can optionally request a specific bed type if the room type is set up with multiple bed type choices. Example: 9 is a `Single`. Taken from the `BED` OTA specification.
* @return bedType
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "9", value = "Guest can optionally request a specific bed type if the room type is set up with multiple bed type choices. Example: 9 is a `Single`. Taken from the `BED` OTA specification.")
@JsonProperty(JSON_PROPERTY_BED_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBedType() {
return bedType;
}
@JsonProperty(JSON_PROPERTY_BED_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBedType(String bedType) {
this.bedType = bedType;
}
public MerchantBookingRequest packageOffers(List packageOffers) {
this.packageOffers = packageOffers;
return this;
}
public MerchantBookingRequest addPackageOffersItem(String packageOffersItem) {
if (this.packageOffers == null) {
this.packageOffers = new ArrayList<>();
}
this.packageOffers.add(packageOffersItem);
return this;
}
/**
* Unique package identifiers guest wants added to her booking. Note: these add-ons must be available as part of the room type to be able to add them to a booking.
* @return packageOffers
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[\"package-1\"]", value = "Unique package identifiers guest wants added to her booking. Note: these add-ons must be available as part of the room type to be able to add them to a booking.")
@JsonProperty(JSON_PROPERTY_PACKAGE_OFFERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getPackageOffers() {
return packageOffers;
}
@JsonProperty(JSON_PROPERTY_PACKAGE_OFFERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPackageOffers(List packageOffers) {
this.packageOffers = packageOffers;
}
public MerchantBookingRequest addOnOffers(List addOnOffers) {
this.addOnOffers = addOnOffers;
return this;
}
public MerchantBookingRequest addAddOnOffersItem(String addOnOffersItem) {
if (this.addOnOffers == null) {
this.addOnOffers = new ArrayList<>();
}
this.addOnOffers.add(addOnOffersItem);
return this;
}
/**
* Unique add-on identifiers guest wants added to her booking. Note: these add-ons must be available as part of the room type to be able to add them to a booking.
* @return addOnOffers
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[\"add-on-1\"]", value = "Unique add-on identifiers guest wants added to her booking. Note: these add-ons must be available as part of the room type to be able to add them to a booking.")
@JsonProperty(JSON_PROPERTY_ADD_ON_OFFERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getAddOnOffers() {
return addOnOffers;
}
@JsonProperty(JSON_PROPERTY_ADD_ON_OFFERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAddOnOffers(List addOnOffers) {
this.addOnOffers = addOnOffers;
}
public MerchantBookingRequest ancillaries(List ancillaries) {
this.ancillaries = ancillaries;
return this;
}
public MerchantBookingRequest addAncillariesItem(AncillaryRequest ancillariesItem) {
if (this.ancillaries == null) {
this.ancillaries = new ArrayList<>();
}
this.ancillaries.add(ancillariesItem);
return this;
}
/**
* Extra reservations of spas, meeting rooms etc that should accompany the room type booking.
* @return ancillaries
**/
@javax.annotation.Nullable
@Valid
@ApiModelProperty(value = "Extra reservations of spas, meeting rooms etc that should accompany the room type booking.")
@JsonProperty(JSON_PROPERTY_ANCILLARIES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getAncillaries() {
return ancillaries;
}
@JsonProperty(JSON_PROPERTY_ANCILLARIES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAncillaries(List ancillaries) {
this.ancillaries = ancillaries;
}
public MerchantBookingRequest specialRequests(String specialRequests) {
this.specialRequests = specialRequests;
return this;
}
/**
* A guest can send a special request to the hotel in free-text here.
* @return specialRequests
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "Can I please have rose petals on my pillows when I arrive?", value = "A guest can send a special request to the hotel in free-text here.")
@JsonProperty(JSON_PROPERTY_SPECIAL_REQUESTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSpecialRequests() {
return specialRequests;
}
@JsonProperty(JSON_PROPERTY_SPECIAL_REQUESTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSpecialRequests(String specialRequests) {
this.specialRequests = specialRequests;
}
public MerchantBookingRequest user(BookingUserRequest user) {
this.user = user;
return this;
}
/**
* Get user
* @return user
**/
@javax.annotation.Nonnull
@NotNull
@Valid
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_USER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public BookingUserRequest getUser() {
return user;
}
@JsonProperty(JSON_PROPERTY_USER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setUser(BookingUserRequest user) {
this.user = user;
}
public MerchantBookingRequest traceId(String traceId) {
this.traceId = traceId;
return this;
}
/**
* traceId is a way to track multiple booking contracts
* @return traceId
**/
@javax.annotation.Nonnull
@NotNull
@ApiModelProperty(example = "trace-1", required = true, value = "traceId is a way to track multiple booking contracts")
@JsonProperty(JSON_PROPERTY_TRACE_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTraceId() {
return traceId;
}
@JsonProperty(JSON_PROPERTY_TRACE_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTraceId(String traceId) {
this.traceId = traceId;
}
public MerchantBookingRequest paymentIdentifier(String paymentIdentifier) {
this.paymentIdentifier = paymentIdentifier;
return this;
}
/**
* Identifier generated by TripPay.
* @return paymentIdentifier
**/
@javax.annotation.Nonnull
@NotNull
@ApiModelProperty(example = "trip-pay-1", required = true, value = "Identifier generated by TripPay.")
@JsonProperty(JSON_PROPERTY_PAYMENT_IDENTIFIER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPaymentIdentifier() {
return paymentIdentifier;
}
@JsonProperty(JSON_PROPERTY_PAYMENT_IDENTIFIER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setPaymentIdentifier(String paymentIdentifier) {
this.paymentIdentifier = paymentIdentifier;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MerchantBookingRequest merchantBookingRequest = (MerchantBookingRequest) o;
return Objects.equals(this.hotelIdentifier, merchantBookingRequest.hotelIdentifier) &&
Objects.equals(this.startDate, merchantBookingRequest.startDate) &&
Objects.equals(this.endDate, merchantBookingRequest.endDate) &&
Objects.equals(this.roomConfiguration, merchantBookingRequest.roomConfiguration) &&
Objects.equals(this.promotionalCodes, merchantBookingRequest.promotionalCodes) &&
Objects.equals(this.roomRateIdentifier, merchantBookingRequest.roomRateIdentifier) &&
Objects.equals(this.bedType, merchantBookingRequest.bedType) &&
Objects.equals(this.packageOffers, merchantBookingRequest.packageOffers) &&
Objects.equals(this.addOnOffers, merchantBookingRequest.addOnOffers) &&
Objects.equals(this.ancillaries, merchantBookingRequest.ancillaries) &&
Objects.equals(this.specialRequests, merchantBookingRequest.specialRequests) &&
Objects.equals(this.user, merchantBookingRequest.user) &&
Objects.equals(this.traceId, merchantBookingRequest.traceId) &&
Objects.equals(this.paymentIdentifier, merchantBookingRequest.paymentIdentifier);
}
@Override
public int hashCode() {
return Objects.hash(hotelIdentifier, startDate, endDate, roomConfiguration, promotionalCodes, roomRateIdentifier, bedType, packageOffers, addOnOffers, ancillaries, specialRequests, user, traceId, paymentIdentifier);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MerchantBookingRequest {\n");
sb.append(" hotelIdentifier: ").append(toIndentedString(hotelIdentifier)).append("\n");
sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
sb.append(" roomConfiguration: ").append(toIndentedString(roomConfiguration)).append("\n");
sb.append(" promotionalCodes: ").append(toIndentedString(promotionalCodes)).append("\n");
sb.append(" roomRateIdentifier: ").append(toIndentedString(roomRateIdentifier)).append("\n");
sb.append(" bedType: ").append(toIndentedString(bedType)).append("\n");
sb.append(" packageOffers: ").append(toIndentedString(packageOffers)).append("\n");
sb.append(" addOnOffers: ").append(toIndentedString(addOnOffers)).append("\n");
sb.append(" ancillaries: ").append(toIndentedString(ancillaries)).append("\n");
sb.append(" specialRequests: ").append(toIndentedString(specialRequests)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n");
sb.append(" paymentIdentifier: ").append(toIndentedString(paymentIdentifier)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy