Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
package com.checkout.handlepaymentsandpayouts.setups.entities.industry;

import com.checkout.common.Address;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.List;

/**
* Accommodation industry-specific data for hotel and cruise bookings and related payments.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public final class AccommodationData {

/**
* For lodging, the lodging name that appears on the storefront and customer receipts.
* For cruise, the ship name booked for the cruise.
* [Optional]
*/
private String name;

/**
* A unique identifier for the booking.
* [Optional]
*/
private String bookingReference;

/**
* For lodging bookings, the customer's check-in date.
* For cruise bookings, the cruise departure date (sail date).
* [Optional]
* Format: yyyy-MM-dd
*/
private LocalDate checkInDate;

/**
* For lodging bookings, the customer's check-out date.
* For cruise bookings, the cruise return date.
* [Optional]
* Format: yyyy-MM-dd
*/
private LocalDate checkOutDate;

/**
* The accommodation's address.
* [Optional]
*/
private Address address;

/**
* The total number of rooms booked for the accommodation.
* [Optional]
*/
private Long numberOfRooms;

/**
* The list of guests staying at the accommodation.
* [Optional]
*/
private List<AccommodationGuest> guests;

/**
* The list of rooms booked by the customer.
* [Optional]
*/
private List<AccommodationRoom> room;

/**
* The total number of guests on the booking.
* [Optional]
*/
private Long totalNumberOfGuests;

/**
* Specifies whether the booking is refundable.
* [Optional]
*/
private Boolean refundable;

/**
* The recipient the booking confirmation is delivered to.
* [Optional]
*/
private String deliveryRecipient;

/**
* Details about the host of the accommodation.
* [Optional]
*/
private AccommodationHost host;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.checkout.handlepaymentsandpayouts.setups.entities.industry;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

/**
* A guest staying at the accommodation.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public final class AccommodationGuest {

/**
* The first name of the guest.
* [Optional]
*/
private String firstName;

/**
* The last name of the guest.
* [Optional]
*/
private String lastName;

/**
* The date of birth of the guest.
* [Optional]
* Format: yyyy-MM-dd
*/
private LocalDate dateOfBirth;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.checkout.handlepaymentsandpayouts.setups.entities.industry;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

/**
* Details about the host of the accommodation.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public final class AccommodationHost {

/**
* The date the host registered.
* [Optional]
* Format: yyyy-MM-dd
*/
private LocalDate registrationDate;

/**
* The total number of reservations made by the host.
* [Optional]
*/
private Long totalReservationCount;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.checkout.handlepaymentsandpayouts.setups.entities.industry;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* A room booked by the customer as part of an accommodation booking.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public final class AccommodationRoom {

/**
* The rate of the room.
* [Optional]
*/
private Double rate;

/**
* The number of nights booked at this room rate.
* [Optional]
*/
private Long numberOfNights;

/**
* The type of room, for example "deluxe".
* [Optional]
*/
private String type;
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,46 @@ public final class AirlineData {
* Details of each leg of the flight journey
*/
private List<PaymentContextsFlightLegDetails> flightLegDetails;

/**
* The total number of passengers on the booking.
* [Optional]
*/
private Long totalNumberOfPassengers;

/**
* The type of travel, for example "international" or "domestic".
* [Optional]
*/
private String travelType;

/**
* The type of trip, for example "one_way" or "round_trip".
* [Optional]
*/
private String tripType;

/**
* Specifies whether the booking is refundable.
* [Optional]
*/
private Boolean refundable;

/**
* The recipient the ticket is delivered to.
* [Optional]
*/
private String deliveryRecipient;

/**
* Any additional add-ons purchased with the booking, for example "extra_baggage".
* [Optional]
*/
private String ancillaries;

/**
* Details about the travel insurance purchased with the booking.
* [Optional]
*/
private AirlineInsurance insurance;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.checkout.handlepaymentsandpayouts.setups.entities.industry;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* Details about the travel insurance purchased with the booking.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public final class AirlineInsurance {

/**
* The type of insurance purchased.
* [Optional]
*/
private String type;

/**
* The name of the insurance company.
* [Optional]
*/
private String company;

/**
* The price of the insurance.
* [Optional]
*/
private AirlineInsurancePrice price;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.checkout.handlepaymentsandpayouts.setups.entities.industry;

import com.checkout.common.Currency;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* The price of the travel insurance purchased with the booking.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public final class AirlineInsurancePrice {

/**
* The insurance amount.
* [Optional]
*/
private Double amount;

/**
* The 3-letter ISO currency code of the insurance amount.
* [Optional]
*/
private Currency currency;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.checkout.handlepaymentsandpayouts.setups.entities.industry;

import com.checkout.payments.contexts.PaymentContextsAccommodationData;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -20,10 +20,12 @@ public final class Industry {
/**
* Airline industry-specific data for flight bookings and related payments
*/
@SerializedName("airline")
private AirlineData airlineData;

/**
* Accommodation industry-specific data for hotel bookings and related payments
* Accommodation industry-specific data for hotel and cruise bookings and related payments
*/
private List<PaymentContextsAccommodationData> accommodationData;
@SerializedName("accommodation")
private List<AccommodationData> accommodationData;
}
Loading
Loading