diff --git a/sdk-generation-log/checkout.json b/sdk-generation-log/checkout.json index 1840fa469..7698d7972 100644 --- a/sdk-generation-log/checkout.json +++ b/sdk-generation-log/checkout.json @@ -1,8 +1,8 @@ { "service": "checkout", "project": "java", - "generatedAt": "2026-07-15T15:00:12Z", - "openapiCommitSha": "8ca5e35a2df8646fbed1793daeba735ebfcb821b", - "automationCommitSha": "4b2dac5566f32cf509a82276044edb353e0a3945", - "libraryCommitSha": "296425916478c4062b8f99f79b75ed0ebc526180" + "generatedAt": "2026-07-22T11:25:22Z", + "openapiCommitSha": "c6f0131e5551226fd523852ff6f5ad1df6c72ee2", + "automationCommitSha": "0c108bd8050cf480d2710b78b770afdfbdd89397", + "libraryCommitSha": "913f166177824e57c26c5f0543b46144219ca6af" } diff --git a/src/main/java/com/adyen/model/checkout/Agency.java b/src/main/java/com/adyen/model/checkout/Agency.java index 64bd97317..96251ebf5 100644 --- a/src/main/java/com/adyen/model/checkout/Agency.java +++ b/src/main/java/com/adyen/model/checkout/Agency.java @@ -44,10 +44,12 @@ public Agency() {} /** * The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 - * character * maxLength: 6 characters + * character * maxLength: 6 characters * **additionalData key:** + * `airline.agency_invoice_number` * * @param invoiceNumber The reference number for the invoice, issued by the agency. * Encoding: - * ASCII * minLength: 1 character * maxLength: 6 characters + * ASCII * minLength: 1 character * maxLength: 6 characters * **additionalData key:** + * `airline.agency_invoice_number` * @return the current {@code Agency} instance, allowing for method chaining */ public Agency invoiceNumber(String invoiceNumber) { @@ -58,10 +60,12 @@ public Agency invoiceNumber(String invoiceNumber) { /** * The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 - * character * maxLength: 6 characters + * character * maxLength: 6 characters * **additionalData key:** + * `airline.agency_invoice_number` * * @return invoiceNumber The reference number for the invoice, issued by the agency. * Encoding: - * ASCII * minLength: 1 character * maxLength: 6 characters + * ASCII * minLength: 1 character * maxLength: 6 characters * **additionalData key:** + * `airline.agency_invoice_number` */ @JsonProperty(JSON_PROPERTY_INVOICE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -71,10 +75,12 @@ public String getInvoiceNumber() { /** * The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 - * character * maxLength: 6 characters + * character * maxLength: 6 characters * **additionalData key:** + * `airline.agency_invoice_number` * * @param invoiceNumber The reference number for the invoice, issued by the agency. * Encoding: - * ASCII * minLength: 1 character * maxLength: 6 characters + * ASCII * minLength: 1 character * maxLength: 6 characters * **additionalData key:** + * `airline.agency_invoice_number` */ @JsonProperty(JSON_PROPERTY_INVOICE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -85,10 +91,11 @@ public void setInvoiceNumber(String invoiceNumber) { /** * The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: - * 2 characters + * 2 characters * **additionalData key:** `airline.agency_plan_name` * * @param planName The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 - * characters * maxLength: 2 characters + * characters * maxLength: 2 characters * **additionalData key:** + * `airline.agency_plan_name` * @return the current {@code Agency} instance, allowing for method chaining */ public Agency planName(String planName) { @@ -99,10 +106,11 @@ public Agency planName(String planName) { /** * The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: - * 2 characters + * 2 characters * **additionalData key:** `airline.agency_plan_name` * * @return planName The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 - * characters * maxLength: 2 characters + * characters * maxLength: 2 characters * **additionalData key:** + * `airline.agency_plan_name` */ @JsonProperty(JSON_PROPERTY_PLAN_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -112,10 +120,11 @@ public String getPlanName() { /** * The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: - * 2 characters + * 2 characters * **additionalData key:** `airline.agency_plan_name` * * @param planName The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 - * characters * maxLength: 2 characters + * characters * maxLength: 2 characters * **additionalData key:** + * `airline.agency_plan_name` */ @JsonProperty(JSON_PROPERTY_PLAN_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/Airline.java b/src/main/java/com/adyen/model/checkout/Airline.java index b469d652e..0bfc68398 100644 --- a/src/main/java/com/adyen/model/checkout/Airline.java +++ b/src/main/java/com/adyen/model/checkout/Airline.java @@ -164,11 +164,13 @@ public void setAgency(Agency agency) { /** * The amount charged for boarding the plane, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 character * maxLength: 11 characters + * minLength: 1 character * maxLength: 11 characters * **additionalData key:** + * `airline.boarding_fee` * * @param boardingFee The amount charged for boarding the plane, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 character * maxLength: 11 characters + * minLength: 1 character * maxLength: 11 characters * **additionalData key:** + * `airline.boarding_fee` * @return the current {@code Airline} instance, allowing for method chaining */ public Airline boardingFee(Long boardingFee) { @@ -180,11 +182,13 @@ public Airline boardingFee(Long boardingFee) { /** * The amount charged for boarding the plane, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 character * maxLength: 11 characters + * minLength: 1 character * maxLength: 11 characters * **additionalData key:** + * `airline.boarding_fee` * * @return boardingFee The amount charged for boarding the plane, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 character * maxLength: 11 characters + * minLength: 1 character * maxLength: 11 characters * **additionalData key:** + * `airline.boarding_fee` */ @JsonProperty(JSON_PROPERTY_BOARDING_FEE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -195,11 +199,13 @@ public Long getBoardingFee() { /** * The amount charged for boarding the plane, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 character * maxLength: 11 characters + * minLength: 1 character * maxLength: 11 characters * **additionalData key:** + * `airline.boarding_fee` * * @param boardingFee The amount charged for boarding the plane, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 character * maxLength: 11 characters + * minLength: 1 character * maxLength: 11 characters * **additionalData key:** + * `airline.boarding_fee` */ @JsonProperty(JSON_PROPERTY_BOARDING_FEE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -212,12 +218,13 @@ public void setBoardingFee(Long boardingFee) { * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that * identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** `airline.airline_code` * * @param code The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code * (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: * KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.airline_code` * @return the current {@code Airline} instance, allowing for method chaining */ public Airline code(String code) { @@ -230,12 +237,13 @@ public Airline code(String code) { * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that * identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** `airline.airline_code` * * @return code The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code * (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: * KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.airline_code` */ @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -247,12 +255,13 @@ public String getCode() { * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that * identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** `airline.airline_code` * * @param code The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code * (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: * KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.airline_code` */ @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -264,12 +273,13 @@ public void setCode(String code) { /** * The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the * reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 - * characters + * characters * **additionalData key:** `airline.computerized_reservation_system` * * @param computerizedReservationSystem The * [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the * reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * - * maxLength: 4 characters + * maxLength: 4 characters * **additionalData key:** + * `airline.computerized_reservation_system` * @return the current {@code Airline} instance, allowing for method chaining */ public Airline computerizedReservationSystem(String computerizedReservationSystem) { @@ -281,12 +291,13 @@ public Airline computerizedReservationSystem(String computerizedReservationSyste /** * The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the * reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 - * characters + * characters * **additionalData key:** `airline.computerized_reservation_system` * * @return computerizedReservationSystem The * [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the * reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * - * maxLength: 4 characters + * maxLength: 4 characters * **additionalData key:** + * `airline.computerized_reservation_system` */ @JsonProperty(JSON_PROPERTY_COMPUTERIZED_RESERVATION_SYSTEM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -297,12 +308,13 @@ public String getComputerizedReservationSystem() { /** * The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the * reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 - * characters + * characters * **additionalData key:** `airline.computerized_reservation_system` * * @param computerizedReservationSystem The * [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the * reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * - * maxLength: 4 characters + * maxLength: 4 characters * **additionalData key:** + * `airline.computerized_reservation_system` */ @JsonProperty(JSON_PROPERTY_COMPUTERIZED_RESERVATION_SYSTEM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -314,11 +326,13 @@ public void setComputerizedReservationSystem(String computerizedReservationSyste /** * The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If * you send more than 20 characters, the customer reference number is truncated * Must not start - * with a space or be all spaces. + * with a space or be all spaces. * **additionalData key:** + * `airline.customer_reference_number` * * @param customerReferenceNumber The alphanumeric customer reference number. * Encoding: ASCII * * maxLength: 20 characters * If you send more than 20 characters, the customer reference - * number is truncated * Must not start with a space or be all spaces. + * number is truncated * Must not start with a space or be all spaces. * **additionalData + * key:** `airline.customer_reference_number` * @return the current {@code Airline} instance, allowing for method chaining */ public Airline customerReferenceNumber(String customerReferenceNumber) { @@ -330,11 +344,13 @@ public Airline customerReferenceNumber(String customerReferenceNumber) { /** * The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If * you send more than 20 characters, the customer reference number is truncated * Must not start - * with a space or be all spaces. + * with a space or be all spaces. * **additionalData key:** + * `airline.customer_reference_number` * * @return customerReferenceNumber The alphanumeric customer reference number. * Encoding: ASCII * * maxLength: 20 characters * If you send more than 20 characters, the customer reference - * number is truncated * Must not start with a space or be all spaces. + * number is truncated * Must not start with a space or be all spaces. * **additionalData + * key:** `airline.customer_reference_number` */ @JsonProperty(JSON_PROPERTY_CUSTOMER_REFERENCE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -345,11 +361,13 @@ public String getCustomerReferenceNumber() { /** * The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If * you send more than 20 characters, the customer reference number is truncated * Must not start - * with a space or be all spaces. + * with a space or be all spaces. * **additionalData key:** + * `airline.customer_reference_number` * * @param customerReferenceNumber The alphanumeric customer reference number. * Encoding: ASCII * * maxLength: 20 characters * If you send more than 20 characters, the customer reference - * number is truncated * Must not start with a space or be all spaces. + * number is truncated * Must not start with a space or be all spaces. * **additionalData + * key:** `airline.customer_reference_number` */ @JsonProperty(JSON_PROPERTY_CUSTOMER_REFERENCE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -361,12 +379,13 @@ public void setCustomerReferenceNumber(String customerReferenceNumber) { /** * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that * identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * - * maxLength: 2 characters * Must not start with a space or be all spaces. + * maxLength: 2 characters * Must not start with a space or be all spaces. * **additionalData + * key:** `airline.airline_designator_code` * * @param designatorCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter * accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = * KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be - * all spaces. + * all spaces. * **additionalData key:** `airline.airline_designator_code` * @return the current {@code Airline} instance, allowing for method chaining */ public Airline designatorCode(String designatorCode) { @@ -378,12 +397,13 @@ public Airline designatorCode(String designatorCode) { /** * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that * identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * - * maxLength: 2 characters * Must not start with a space or be all spaces. + * maxLength: 2 characters * Must not start with a space or be all spaces. * **additionalData + * key:** `airline.airline_designator_code` * * @return designatorCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter * accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = * KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be - * all spaces. + * all spaces. * **additionalData key:** `airline.airline_designator_code` */ @JsonProperty(JSON_PROPERTY_DESIGNATOR_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -394,12 +414,13 @@ public String getDesignatorCode() { /** * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that * identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * - * maxLength: 2 characters * Must not start with a space or be all spaces. + * maxLength: 2 characters * Must not start with a space or be all spaces. * **additionalData + * key:** `airline.airline_designator_code` * * @param designatorCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter * accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = * KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be - * all spaces. + * all spaces. * **additionalData key:** `airline.airline_designator_code` */ @JsonProperty(JSON_PROPERTY_DESIGNATOR_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -411,11 +432,13 @@ public void setDesignatorCode(String designatorCode) { /** * A code that identifies the type of item bought. The description of the code can appear on * credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 - * characters * maxLength: 2 characters + * characters * maxLength: 2 characters * **additionalData key:** + * `airline.document_type` * * @param documentType A code that identifies the type of item bought. The description of the code * can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = - * 01 * minLength: 2 characters * maxLength: 2 characters + * 01 * minLength: 2 characters * maxLength: 2 characters * **additionalData key:** + * `airline.document_type` * @return the current {@code Airline} instance, allowing for method chaining */ public Airline documentType(String documentType) { @@ -427,11 +450,13 @@ public Airline documentType(String documentType) { /** * A code that identifies the type of item bought. The description of the code can appear on * credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 - * characters * maxLength: 2 characters + * characters * maxLength: 2 characters * **additionalData key:** + * `airline.document_type` * * @return documentType A code that identifies the type of item bought. The description of the * code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket - * = 01 * minLength: 2 characters * maxLength: 2 characters + * = 01 * minLength: 2 characters * maxLength: 2 characters * **additionalData key:** + * `airline.document_type` */ @JsonProperty(JSON_PROPERTY_DOCUMENT_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -442,11 +467,13 @@ public String getDocumentType() { /** * A code that identifies the type of item bought. The description of the code can appear on * credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 - * characters * maxLength: 2 characters + * characters * maxLength: 2 characters * **additionalData key:** + * `airline.document_type` * * @param documentType A code that identifies the type of item bought. The description of the code * can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = - * 01 * minLength: 2 characters * maxLength: 2 characters + * 01 * minLength: 2 characters * maxLength: 2 characters * **additionalData key:** + * `airline.document_type` */ @JsonProperty(JSON_PROPERTY_DOCUMENT_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -458,11 +485,13 @@ public void setDocumentType(String documentType) { /** * The flight departure date. Time is optional. * Format for date only: `yyyy-MM-dd` * * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local time of departure airport. * - * minLength: 10 characters * maxLength: 16 characters + * minLength: 10 characters * maxLength: 16 characters * **additionalData key:** + * `airline.flight_date` * * @param flightDate The flight departure date. Time is optional. * Format for date only: * `yyyy-MM-dd` * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local - * time of departure airport. * minLength: 10 characters * maxLength: 16 characters + * time of departure airport. * minLength: 10 characters * maxLength: 16 characters * + * **additionalData key:** `airline.flight_date` * @return the current {@code Airline} instance, allowing for method chaining */ public Airline flightDate(OffsetDateTime flightDate) { @@ -474,11 +503,13 @@ public Airline flightDate(OffsetDateTime flightDate) { /** * The flight departure date. Time is optional. * Format for date only: `yyyy-MM-dd` * * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local time of departure airport. * - * minLength: 10 characters * maxLength: 16 characters + * minLength: 10 characters * maxLength: 16 characters * **additionalData key:** + * `airline.flight_date` * * @return flightDate The flight departure date. Time is optional. * Format for date only: * `yyyy-MM-dd` * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local - * time of departure airport. * minLength: 10 characters * maxLength: 16 characters + * time of departure airport. * minLength: 10 characters * maxLength: 16 characters * + * **additionalData key:** `airline.flight_date` */ @JsonProperty(JSON_PROPERTY_FLIGHT_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -489,11 +520,13 @@ public OffsetDateTime getFlightDate() { /** * The flight departure date. Time is optional. * Format for date only: `yyyy-MM-dd` * * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local time of departure airport. * - * minLength: 10 characters * maxLength: 16 characters + * minLength: 10 characters * maxLength: 16 characters * **additionalData key:** + * `airline.flight_date` * * @param flightDate The flight departure date. Time is optional. * Format for date only: * `yyyy-MM-dd` * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local - * time of departure airport. * minLength: 10 characters * maxLength: 16 characters + * time of departure airport. * minLength: 10 characters * maxLength: 16 characters * + * **additionalData key:** `airline.flight_date` */ @JsonProperty(JSON_PROPERTY_FLIGHT_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -549,12 +582,13 @@ public void setLegs(List legs) { * The passenger's name, initials, and title. * Format: last name + first name or initials + * title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you * send more than 20 characters, the name is truncated * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** `airline.passenger_name` * * @param passengerName The passenger's name, initials, and title. * Format: last name + first * name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: * 20 characters * If you send more than 20 characters, the name is truncated * Must not start - * with a space or be all spaces. * Must not be all zeros. + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.passenger_name` * @return the current {@code Airline} instance, allowing for method chaining */ public Airline passengerName(String passengerName) { @@ -567,12 +601,13 @@ public Airline passengerName(String passengerName) { * The passenger's name, initials, and title. * Format: last name + first name or initials + * title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you * send more than 20 characters, the name is truncated * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** `airline.passenger_name` * * @return passengerName The passenger's name, initials, and title. * Format: last name + * first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `airline.passenger_name` */ @JsonProperty(JSON_PROPERTY_PASSENGER_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -584,12 +619,13 @@ public String getPassengerName() { * The passenger's name, initials, and title. * Format: last name + first name or initials + * title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you * send more than 20 characters, the name is truncated * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** `airline.passenger_name` * * @param passengerName The passenger's name, initials, and title. * Format: last name + first * name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: * 20 characters * If you send more than 20 characters, the name is truncated * Must not start - * with a space or be all spaces. * Must not be all zeros. + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.passenger_name` */ @JsonProperty(JSON_PROPERTY_PASSENGER_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/AuPayDetails.java b/src/main/java/com/adyen/model/checkout/AuPayDetails.java new file mode 100644 index 000000000..a65512839 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/AuPayDetails.java @@ -0,0 +1,447 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.Arrays; +import java.util.logging.Logger; + +/** AuPayDetails */ +@JsonPropertyOrder({ + AuPayDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + AuPayDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, + AuPayDetails.JSON_PROPERTY_SDK_DATA, + AuPayDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID, + AuPayDetails.JSON_PROPERTY_TYPE +}) +public class AuPayDetails { + public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId"; + private String checkoutAttemptId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCheckoutAttemptId = false; + + public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference"; + /* deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead. */ + @Deprecated private String recurringDetailReference; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRecurringDetailReference = false; + + public static final String JSON_PROPERTY_SDK_DATA = "sdkData"; + private String sdkData; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSdkData = false; + + public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId"; + private String storedPaymentMethodId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetStoredPaymentMethodId = false; + + /** **aupay** */ + public enum TypeEnum { + AUPAY(String.valueOf("aupay")); + + private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName()); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "TypeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(TypeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetType = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public AuPayDetails() {} + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId The checkout attempt identifier. + * @return the current {@code AuPayDetails} instance, allowing for method chaining + */ + public AuPayDetails checkoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + isSetCheckoutAttemptId = true; // mark as set + return this; + } + + /** + * The checkout attempt identifier. + * + * @return checkoutAttemptId The checkout attempt identifier. + */ + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCheckoutAttemptId() { + return checkoutAttemptId; + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId The checkout attempt identifier. + */ + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + isSetCheckoutAttemptId = true; // mark as set + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @param recurringDetailReference This is the `recurringDetailReference` returned in + * the response when you created the token. + * @return the current {@code AuPayDetails} instance, allowing for method chaining + * @deprecated since Adyen Checkout API v49 Use `storedPaymentMethodId` instead. + */ + @Deprecated + public AuPayDetails recurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + isSetRecurringDetailReference = true; // mark as set + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @return recurringDetailReference This is the `recurringDetailReference` returned in + * the response when you created the token. + * @deprecated since Adyen Checkout API v49 Use `storedPaymentMethodId` instead. + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRecurringDetailReference() { + return recurringDetailReference; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @param recurringDetailReference This is the `recurringDetailReference` returned in + * the response when you created the token. + * @deprecated since Adyen Checkout API v49 Use `storedPaymentMethodId` instead. + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + isSetRecurringDetailReference = true; // mark as set + } + + /** + * Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @param sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * @return the current {@code AuPayDetails} instance, allowing for method chaining + */ + public AuPayDetails sdkData(String sdkData) { + this.sdkData = sdkData; + isSetSdkData = true; // mark as set + return this; + } + + /** + * Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return sdkData Base64-encoded JSON object containing SDK related parameters required by the + * SDK + */ + @JsonProperty(JSON_PROPERTY_SDK_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSdkData() { + return sdkData; + } + + /** + * Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @param sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + */ + @JsonProperty(JSON_PROPERTY_SDK_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdkData(String sdkData) { + this.sdkData = sdkData; + isSetSdkData = true; // mark as set + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @param storedPaymentMethodId This is the `recurringDetailReference` returned in the + * response when you created the token. + * @return the current {@code AuPayDetails} instance, allowing for method chaining + */ + public AuPayDetails storedPaymentMethodId(String storedPaymentMethodId) { + this.storedPaymentMethodId = storedPaymentMethodId; + isSetStoredPaymentMethodId = true; // mark as set + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @return storedPaymentMethodId This is the `recurringDetailReference` returned in the + * response when you created the token. + */ + @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStoredPaymentMethodId() { + return storedPaymentMethodId; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @param storedPaymentMethodId This is the `recurringDetailReference` returned in the + * response when you created the token. + */ + @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoredPaymentMethodId(String storedPaymentMethodId) { + this.storedPaymentMethodId = storedPaymentMethodId; + isSetStoredPaymentMethodId = true; // mark as set + } + + /** + * **aupay** + * + * @param type **aupay** + * @return the current {@code AuPayDetails} instance, allowing for method chaining + */ + public AuPayDetails type(TypeEnum type) { + this.type = type; + isSetType = true; // mark as set + return this; + } + + /** + * **aupay** + * + * @return type **aupay** + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * **aupay** + * + * @param type **aupay** + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + isSetType = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public AuPayDetails includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this AuPayDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuPayDetails auPayDetails = (AuPayDetails) o; + return Objects.equals(this.checkoutAttemptId, auPayDetails.checkoutAttemptId) + && Objects.equals(this.isSetCheckoutAttemptId, auPayDetails.isSetCheckoutAttemptId) + && Objects.equals(this.recurringDetailReference, auPayDetails.recurringDetailReference) + && Objects.equals( + this.isSetRecurringDetailReference, auPayDetails.isSetRecurringDetailReference) + && Objects.equals(this.sdkData, auPayDetails.sdkData) + && Objects.equals(this.isSetSdkData, auPayDetails.isSetSdkData) + && Objects.equals(this.storedPaymentMethodId, auPayDetails.storedPaymentMethodId) + && Objects.equals(this.isSetStoredPaymentMethodId, auPayDetails.isSetStoredPaymentMethodId) + && Objects.equals(this.type, auPayDetails.type) + && Objects.equals(this.isSetType, auPayDetails.isSetType); + } + + @Override + public int hashCode() { + return Objects.hash( + checkoutAttemptId, + isSetCheckoutAttemptId, + recurringDetailReference, + isSetRecurringDetailReference, + sdkData, + isSetSdkData, + storedPaymentMethodId, + isSetStoredPaymentMethodId, + type, + isSetType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuPayDetails {\n"); + sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n"); + sb.append(" recurringDetailReference: ") + .append(toIndentedString(recurringDetailReference)) + .append("\n"); + sb.append(" sdkData: ").append(toIndentedString(sdkData)).append("\n"); + sb.append(" storedPaymentMethodId: ") + .append(toIndentedString(storedPaymentMethodId)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetCheckoutAttemptId) { + addIfNull(nulls, JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, this.checkoutAttemptId); + } + if (isSetRecurringDetailReference) { + addIfNull(nulls, JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, this.recurringDetailReference); + } + if (isSetSdkData) { + addIfNull(nulls, JSON_PROPERTY_SDK_DATA, this.sdkData); + } + if (isSetStoredPaymentMethodId) { + addIfNull(nulls, JSON_PROPERTY_STORED_PAYMENT_METHOD_ID, this.storedPaymentMethodId); + } + if (isSetType) { + addIfNull(nulls, JSON_PROPERTY_TYPE, this.type); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of AuPayDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuPayDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to AuPayDetails + */ + public static AuPayDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AuPayDetails.class); + } + + /** + * Convert an instance of AuPayDetails to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/CarRental.java b/src/main/java/com/adyen/model/checkout/CarRental.java new file mode 100644 index 000000000..b74111471 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/CarRental.java @@ -0,0 +1,883 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.Arrays; +import java.util.logging.Logger; + +/** CarRental */ +@JsonPropertyOrder({ + CarRental.JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER, + CarRental.JSON_PROPERTY_NO_SHOW, + CarRental.JSON_PROPERTY_PICKUP_INFO, + CarRental.JSON_PROPERTY_RATE_TYPE, + CarRental.JSON_PROPERTY_RENTAL_AGREEMENT_NUMBER, + CarRental.JSON_PROPERTY_RENTAL_CLASS_ID, + CarRental.JSON_PROPERTY_RENTAL_DAYS, + CarRental.JSON_PROPERTY_RENTAL_RATE, + CarRental.JSON_PROPERTY_RENTAL_SURCHARGES, + CarRental.JSON_PROPERTY_RENTER_NAME, + CarRental.JSON_PROPERTY_RETURN_INFO, + CarRental.JSON_PROPERTY_TAX_EXEMPT +}) +public class CarRental { + public static final String JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER = + "customerServicePhoneNumber"; + private String customerServicePhoneNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCustomerServicePhoneNumber = false; + + public static final String JSON_PROPERTY_NO_SHOW = "noShow"; + private Boolean noShow; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNoShow = false; + + public static final String JSON_PROPERTY_PICKUP_INFO = "pickupInfo"; + private PickupInfo pickupInfo; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPickupInfo = false; + + /** + * Indicates whether the rental rate is daily or weekly. * **additionalData key:** + * `carRental.rateIndicator` + */ + public enum RateTypeEnum { + DAILY(String.valueOf("daily")), + + WEEKLY(String.valueOf("weekly")); + + private static final Logger LOG = Logger.getLogger(RateTypeEnum.class.getName()); + + private String value; + + RateTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RateTypeEnum fromValue(String value) { + for (RateTypeEnum b : RateTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "RateTypeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(RateTypeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_RATE_TYPE = "rateType"; + private RateTypeEnum rateType; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRateType = false; + + public static final String JSON_PROPERTY_RENTAL_AGREEMENT_NUMBER = "rentalAgreementNumber"; + private String rentalAgreementNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRentalAgreementNumber = false; + + public static final String JSON_PROPERTY_RENTAL_CLASS_ID = "rentalClassId"; + private String rentalClassId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRentalClassId = false; + + public static final String JSON_PROPERTY_RENTAL_DAYS = "rentalDays"; + private Integer rentalDays; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRentalDays = false; + + public static final String JSON_PROPERTY_RENTAL_RATE = "rentalRate"; + private Long rentalRate; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRentalRate = false; + + public static final String JSON_PROPERTY_RENTAL_SURCHARGES = "rentalSurcharges"; + private RentalSurcharges rentalSurcharges; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRentalSurcharges = false; + + public static final String JSON_PROPERTY_RENTER_NAME = "renterName"; + private String renterName; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRenterName = false; + + public static final String JSON_PROPERTY_RETURN_INFO = "returnInfo"; + private ReturnInfo returnInfo; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReturnInfo = false; + + public static final String JSON_PROPERTY_TAX_EXEMPT = "taxExempt"; + private Boolean taxExempt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTaxExempt = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public CarRental() {} + + /** + * The customer service phone number of the car rental company. * Format: Alphanumeric * + * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not contain any + * special characters such as + or - * Must not start with a space or be all spaces. * Must not be + * all zeros. * **additionalData key:** `carRental.customerServiceTollFreeNumber` + * + * @param customerServicePhoneNumber The customer service phone number of the car rental company. + * * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in + * length * Must not contain any special characters such as + or - * Must not start with a + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.customerServiceTollFreeNumber` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental customerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + isSetCustomerServicePhoneNumber = true; // mark as set + return this; + } + + /** + * The customer service phone number of the car rental company. * Format: Alphanumeric * + * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not contain any + * special characters such as + or - * Must not start with a space or be all spaces. * Must not be + * all zeros. * **additionalData key:** `carRental.customerServiceTollFreeNumber` + * + * @return customerServicePhoneNumber The customer service phone number of the car rental company. + * * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in + * length * Must not contain any special characters such as + or - * Must not start with a + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.customerServiceTollFreeNumber` + */ + @JsonProperty(JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerServicePhoneNumber() { + return customerServicePhoneNumber; + } + + /** + * The customer service phone number of the car rental company. * Format: Alphanumeric * + * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not contain any + * special characters such as + or - * Must not start with a space or be all spaces. * Must not be + * all zeros. * **additionalData key:** `carRental.customerServiceTollFreeNumber` + * + * @param customerServicePhoneNumber The customer service phone number of the car rental company. + * * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in + * length * Must not contain any special characters such as + or - * Must not start with a + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.customerServiceTollFreeNumber` + */ + @JsonProperty(JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + isSetCustomerServicePhoneNumber = true; // mark as set + } + + /** + * Indicates if the customer didn't pick up their rental car. * **additionalData key:** + * `carRental.noShowIndicator` + * + * @param noShow Indicates if the customer didn't pick up their rental car. * **additionalData + * key:** `carRental.noShowIndicator` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental noShow(Boolean noShow) { + this.noShow = noShow; + isSetNoShow = true; // mark as set + return this; + } + + /** + * Indicates if the customer didn't pick up their rental car. * **additionalData key:** + * `carRental.noShowIndicator` + * + * @return noShow Indicates if the customer didn't pick up their rental car. * + * **additionalData key:** `carRental.noShowIndicator` + */ + @JsonProperty(JSON_PROPERTY_NO_SHOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNoShow() { + return noShow; + } + + /** + * Indicates if the customer didn't pick up their rental car. * **additionalData key:** + * `carRental.noShowIndicator` + * + * @param noShow Indicates if the customer didn't pick up their rental car. * **additionalData + * key:** `carRental.noShowIndicator` + */ + @JsonProperty(JSON_PROPERTY_NO_SHOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNoShow(Boolean noShow) { + this.noShow = noShow; + isSetNoShow = true; // mark as set + } + + /** + * pickupInfo + * + * @param pickupInfo + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental pickupInfo(PickupInfo pickupInfo) { + this.pickupInfo = pickupInfo; + isSetPickupInfo = true; // mark as set + return this; + } + + /** + * Get pickupInfo + * + * @return pickupInfo + */ + @JsonProperty(JSON_PROPERTY_PICKUP_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PickupInfo getPickupInfo() { + return pickupInfo; + } + + /** + * pickupInfo + * + * @param pickupInfo + */ + @JsonProperty(JSON_PROPERTY_PICKUP_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPickupInfo(PickupInfo pickupInfo) { + this.pickupInfo = pickupInfo; + isSetPickupInfo = true; // mark as set + } + + /** + * Indicates whether the rental rate is daily or weekly. * **additionalData key:** + * `carRental.rateIndicator` + * + * @param rateType Indicates whether the rental rate is daily or weekly. * **additionalData key:** + * `carRental.rateIndicator` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental rateType(RateTypeEnum rateType) { + this.rateType = rateType; + isSetRateType = true; // mark as set + return this; + } + + /** + * Indicates whether the rental rate is daily or weekly. * **additionalData key:** + * `carRental.rateIndicator` + * + * @return rateType Indicates whether the rental rate is daily or weekly. * **additionalData + * key:** `carRental.rateIndicator` + */ + @JsonProperty(JSON_PROPERTY_RATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RateTypeEnum getRateType() { + return rateType; + } + + /** + * Indicates whether the rental rate is daily or weekly. * **additionalData key:** + * `carRental.rateIndicator` + * + * @param rateType Indicates whether the rental rate is daily or weekly. * **additionalData key:** + * `carRental.rateIndicator` + */ + @JsonProperty(JSON_PROPERTY_RATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRateType(RateTypeEnum rateType) { + this.rateType = rateType; + isSetRateType = true; // mark as set + } + + /** + * The rental agreement number for the car rental. * Format: ASCII * maxLength: 9 characters * + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.rentalAgreementNumber` + * + * @param rentalAgreementNumber The rental agreement number for the car rental. * Format: ASCII * + * maxLength: 9 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.rentalAgreementNumber` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental rentalAgreementNumber(String rentalAgreementNumber) { + this.rentalAgreementNumber = rentalAgreementNumber; + isSetRentalAgreementNumber = true; // mark as set + return this; + } + + /** + * The rental agreement number for the car rental. * Format: ASCII * maxLength: 9 characters * + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.rentalAgreementNumber` + * + * @return rentalAgreementNumber The rental agreement number for the car rental. * Format: ASCII * + * maxLength: 9 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.rentalAgreementNumber` + */ + @JsonProperty(JSON_PROPERTY_RENTAL_AGREEMENT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRentalAgreementNumber() { + return rentalAgreementNumber; + } + + /** + * The rental agreement number for the car rental. * Format: ASCII * maxLength: 9 characters * + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.rentalAgreementNumber` + * + * @param rentalAgreementNumber The rental agreement number for the car rental. * Format: ASCII * + * maxLength: 9 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.rentalAgreementNumber` + */ + @JsonProperty(JSON_PROPERTY_RENTAL_AGREEMENT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRentalAgreementNumber(String rentalAgreementNumber) { + this.rentalAgreementNumber = rentalAgreementNumber; + isSetRentalAgreementNumber = true; // mark as set + } + + /** + * The classification of the rental car. * Format: Alphanumeric * maxLength: 4 characters * Must + * not start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.rentalClassId` + * + * @param rentalClassId The classification of the rental car. * Format: Alphanumeric * maxLength: + * 4 characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `carRental.rentalClassId` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental rentalClassId(String rentalClassId) { + this.rentalClassId = rentalClassId; + isSetRentalClassId = true; // mark as set + return this; + } + + /** + * The classification of the rental car. * Format: Alphanumeric * maxLength: 4 characters * Must + * not start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.rentalClassId` + * + * @return rentalClassId The classification of the rental car. * Format: Alphanumeric * maxLength: + * 4 characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `carRental.rentalClassId` + */ + @JsonProperty(JSON_PROPERTY_RENTAL_CLASS_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRentalClassId() { + return rentalClassId; + } + + /** + * The classification of the rental car. * Format: Alphanumeric * maxLength: 4 characters * Must + * not start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.rentalClassId` + * + * @param rentalClassId The classification of the rental car. * Format: Alphanumeric * maxLength: + * 4 characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `carRental.rentalClassId` + */ + @JsonProperty(JSON_PROPERTY_RENTAL_CLASS_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRentalClassId(String rentalClassId) { + this.rentalClassId = rentalClassId; + isSetRentalClassId = true; // mark as set + } + + /** + * The number of days the car is rented for. * Format: Numeric * Max value: 9999 * + * **additionalData key:** `carRental.daysRented` + * + * @param rentalDays The number of days the car is rented for. * Format: Numeric * Max value: 9999 + * * **additionalData key:** `carRental.daysRented` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental rentalDays(Integer rentalDays) { + this.rentalDays = rentalDays; + isSetRentalDays = true; // mark as set + return this; + } + + /** + * The number of days the car is rented for. * Format: Numeric * Max value: 9999 * + * **additionalData key:** `carRental.daysRented` + * + * @return rentalDays The number of days the car is rented for. * Format: Numeric * Max value: + * 9999 * **additionalData key:** `carRental.daysRented` + */ + @JsonProperty(JSON_PROPERTY_RENTAL_DAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRentalDays() { + return rentalDays; + } + + /** + * The number of days the car is rented for. * Format: Numeric * Max value: 9999 * + * **additionalData key:** `carRental.daysRented` + * + * @param rentalDays The number of days the car is rented for. * Format: Numeric * Max value: 9999 + * * **additionalData key:** `carRental.daysRented` + */ + @JsonProperty(JSON_PROPERTY_RENTAL_DAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRentalDays(Integer rentalDays) { + this.rentalDays = rentalDays; + isSetRentalDays = true; // mark as set + } + + /** + * Rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * + * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * Frequency of + * the rental rate is specified in the rateType field. * **additionalData key:** + * `carRental.rate` + * + * @param rentalRate Rental rate, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * Frequency of the rental + * rate is specified in the rateType field. * **additionalData key:** + * `carRental.rate` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental rentalRate(Long rentalRate) { + this.rentalRate = rentalRate; + isSetRentalRate = true; // mark as set + return this; + } + + /** + * Rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * + * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * Frequency of + * the rental rate is specified in the rateType field. * **additionalData key:** + * `carRental.rate` + * + * @return rentalRate Rental rate, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * Frequency of the rental + * rate is specified in the rateType field. * **additionalData key:** + * `carRental.rate` + */ + @JsonProperty(JSON_PROPERTY_RENTAL_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRentalRate() { + return rentalRate; + } + + /** + * Rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * + * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * Frequency of + * the rental rate is specified in the rateType field. * **additionalData key:** + * `carRental.rate` + * + * @param rentalRate Rental rate, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * Frequency of the rental + * rate is specified in the rateType field. * **additionalData key:** + * `carRental.rate` + */ + @JsonProperty(JSON_PROPERTY_RENTAL_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRentalRate(Long rentalRate) { + this.rentalRate = rentalRate; + isSetRentalRate = true; // mark as set + } + + /** + * rentalSurcharges + * + * @param rentalSurcharges + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental rentalSurcharges(RentalSurcharges rentalSurcharges) { + this.rentalSurcharges = rentalSurcharges; + isSetRentalSurcharges = true; // mark as set + return this; + } + + /** + * Get rentalSurcharges + * + * @return rentalSurcharges + */ + @JsonProperty(JSON_PROPERTY_RENTAL_SURCHARGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RentalSurcharges getRentalSurcharges() { + return rentalSurcharges; + } + + /** + * rentalSurcharges + * + * @param rentalSurcharges + */ + @JsonProperty(JSON_PROPERTY_RENTAL_SURCHARGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRentalSurcharges(RentalSurcharges rentalSurcharges) { + this.rentalSurcharges = rentalSurcharges; + isSetRentalSurcharges = true; // mark as set + } + + /** + * The name of the person renting the car. * Format: ASCII * Must not start with a space or be all + * spaces. * Must not be all zeros. * **additionalData key:** `carRental.renterName` + * + * @param renterName The name of the person renting the car. * Format: ASCII * Must not start with + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.renterName` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental renterName(String renterName) { + this.renterName = renterName; + isSetRenterName = true; // mark as set + return this; + } + + /** + * The name of the person renting the car. * Format: ASCII * Must not start with a space or be all + * spaces. * Must not be all zeros. * **additionalData key:** `carRental.renterName` + * + * @return renterName The name of the person renting the car. * Format: ASCII * Must not start + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.renterName` + */ + @JsonProperty(JSON_PROPERTY_RENTER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRenterName() { + return renterName; + } + + /** + * The name of the person renting the car. * Format: ASCII * Must not start with a space or be all + * spaces. * Must not be all zeros. * **additionalData key:** `carRental.renterName` + * + * @param renterName The name of the person renting the car. * Format: ASCII * Must not start with + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.renterName` + */ + @JsonProperty(JSON_PROPERTY_RENTER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRenterName(String renterName) { + this.renterName = renterName; + isSetRenterName = true; // mark as set + } + + /** + * returnInfo + * + * @param returnInfo + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental returnInfo(ReturnInfo returnInfo) { + this.returnInfo = returnInfo; + isSetReturnInfo = true; // mark as set + return this; + } + + /** + * Get returnInfo + * + * @return returnInfo + */ + @JsonProperty(JSON_PROPERTY_RETURN_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ReturnInfo getReturnInfo() { + return returnInfo; + } + + /** + * returnInfo + * + * @param returnInfo + */ + @JsonProperty(JSON_PROPERTY_RETURN_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnInfo(ReturnInfo returnInfo) { + this.returnInfo = returnInfo; + isSetReturnInfo = true; // mark as set + } + + /** + * Indicates if the goods or services were tax-exempt, or if tax was not collected. * + * **additionalData key:** `carRental.taxExemptIndicator` + * + * @param taxExempt Indicates if the goods or services were tax-exempt, or if tax was not + * collected. * **additionalData key:** `carRental.taxExemptIndicator` + * @return the current {@code CarRental} instance, allowing for method chaining + */ + public CarRental taxExempt(Boolean taxExempt) { + this.taxExempt = taxExempt; + isSetTaxExempt = true; // mark as set + return this; + } + + /** + * Indicates if the goods or services were tax-exempt, or if tax was not collected. * + * **additionalData key:** `carRental.taxExemptIndicator` + * + * @return taxExempt Indicates if the goods or services were tax-exempt, or if tax was not + * collected. * **additionalData key:** `carRental.taxExemptIndicator` + */ + @JsonProperty(JSON_PROPERTY_TAX_EXEMPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTaxExempt() { + return taxExempt; + } + + /** + * Indicates if the goods or services were tax-exempt, or if tax was not collected. * + * **additionalData key:** `carRental.taxExemptIndicator` + * + * @param taxExempt Indicates if the goods or services were tax-exempt, or if tax was not + * collected. * **additionalData key:** `carRental.taxExemptIndicator` + */ + @JsonProperty(JSON_PROPERTY_TAX_EXEMPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTaxExempt(Boolean taxExempt) { + this.taxExempt = taxExempt; + isSetTaxExempt = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public CarRental includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this CarRental object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CarRental carRental = (CarRental) o; + return Objects.equals(this.customerServicePhoneNumber, carRental.customerServicePhoneNumber) + && Objects.equals( + this.isSetCustomerServicePhoneNumber, carRental.isSetCustomerServicePhoneNumber) + && Objects.equals(this.noShow, carRental.noShow) + && Objects.equals(this.isSetNoShow, carRental.isSetNoShow) + && Objects.equals(this.pickupInfo, carRental.pickupInfo) + && Objects.equals(this.isSetPickupInfo, carRental.isSetPickupInfo) + && Objects.equals(this.rateType, carRental.rateType) + && Objects.equals(this.isSetRateType, carRental.isSetRateType) + && Objects.equals(this.rentalAgreementNumber, carRental.rentalAgreementNumber) + && Objects.equals(this.isSetRentalAgreementNumber, carRental.isSetRentalAgreementNumber) + && Objects.equals(this.rentalClassId, carRental.rentalClassId) + && Objects.equals(this.isSetRentalClassId, carRental.isSetRentalClassId) + && Objects.equals(this.rentalDays, carRental.rentalDays) + && Objects.equals(this.isSetRentalDays, carRental.isSetRentalDays) + && Objects.equals(this.rentalRate, carRental.rentalRate) + && Objects.equals(this.isSetRentalRate, carRental.isSetRentalRate) + && Objects.equals(this.rentalSurcharges, carRental.rentalSurcharges) + && Objects.equals(this.isSetRentalSurcharges, carRental.isSetRentalSurcharges) + && Objects.equals(this.renterName, carRental.renterName) + && Objects.equals(this.isSetRenterName, carRental.isSetRenterName) + && Objects.equals(this.returnInfo, carRental.returnInfo) + && Objects.equals(this.isSetReturnInfo, carRental.isSetReturnInfo) + && Objects.equals(this.taxExempt, carRental.taxExempt) + && Objects.equals(this.isSetTaxExempt, carRental.isSetTaxExempt); + } + + @Override + public int hashCode() { + return Objects.hash( + customerServicePhoneNumber, + isSetCustomerServicePhoneNumber, + noShow, + isSetNoShow, + pickupInfo, + isSetPickupInfo, + rateType, + isSetRateType, + rentalAgreementNumber, + isSetRentalAgreementNumber, + rentalClassId, + isSetRentalClassId, + rentalDays, + isSetRentalDays, + rentalRate, + isSetRentalRate, + rentalSurcharges, + isSetRentalSurcharges, + renterName, + isSetRenterName, + returnInfo, + isSetReturnInfo, + taxExempt, + isSetTaxExempt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CarRental {\n"); + sb.append(" customerServicePhoneNumber: ") + .append(toIndentedString(customerServicePhoneNumber)) + .append("\n"); + sb.append(" noShow: ").append(toIndentedString(noShow)).append("\n"); + sb.append(" pickupInfo: ").append(toIndentedString(pickupInfo)).append("\n"); + sb.append(" rateType: ").append(toIndentedString(rateType)).append("\n"); + sb.append(" rentalAgreementNumber: ") + .append(toIndentedString(rentalAgreementNumber)) + .append("\n"); + sb.append(" rentalClassId: ").append(toIndentedString(rentalClassId)).append("\n"); + sb.append(" rentalDays: ").append(toIndentedString(rentalDays)).append("\n"); + sb.append(" rentalRate: ").append(toIndentedString(rentalRate)).append("\n"); + sb.append(" rentalSurcharges: ").append(toIndentedString(rentalSurcharges)).append("\n"); + sb.append(" renterName: ").append(toIndentedString(renterName)).append("\n"); + sb.append(" returnInfo: ").append(toIndentedString(returnInfo)).append("\n"); + sb.append(" taxExempt: ").append(toIndentedString(taxExempt)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetCustomerServicePhoneNumber) { + addIfNull( + nulls, JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER, this.customerServicePhoneNumber); + } + if (isSetNoShow) { + addIfNull(nulls, JSON_PROPERTY_NO_SHOW, this.noShow); + } + if (isSetPickupInfo) { + addIfNull(nulls, JSON_PROPERTY_PICKUP_INFO, this.pickupInfo); + } + if (isSetRateType) { + addIfNull(nulls, JSON_PROPERTY_RATE_TYPE, this.rateType); + } + if (isSetRentalAgreementNumber) { + addIfNull(nulls, JSON_PROPERTY_RENTAL_AGREEMENT_NUMBER, this.rentalAgreementNumber); + } + if (isSetRentalClassId) { + addIfNull(nulls, JSON_PROPERTY_RENTAL_CLASS_ID, this.rentalClassId); + } + if (isSetRentalDays) { + addIfNull(nulls, JSON_PROPERTY_RENTAL_DAYS, this.rentalDays); + } + if (isSetRentalRate) { + addIfNull(nulls, JSON_PROPERTY_RENTAL_RATE, this.rentalRate); + } + if (isSetRentalSurcharges) { + addIfNull(nulls, JSON_PROPERTY_RENTAL_SURCHARGES, this.rentalSurcharges); + } + if (isSetRenterName) { + addIfNull(nulls, JSON_PROPERTY_RENTER_NAME, this.renterName); + } + if (isSetReturnInfo) { + addIfNull(nulls, JSON_PROPERTY_RETURN_INFO, this.returnInfo); + } + if (isSetTaxExempt) { + addIfNull(nulls, JSON_PROPERTY_TAX_EXEMPT, this.taxExempt); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of CarRental given an JSON string + * + * @param jsonString JSON string + * @return An instance of CarRental + * @throws JsonProcessingException if the JSON string is invalid with respect to CarRental + */ + public static CarRental fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CarRental.class); + } + + /** + * Convert an instance of CarRental to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/CardBrandDetails.java b/src/main/java/com/adyen/model/checkout/CardBrandDetails.java index fec8ecf15..16a58282f 100644 --- a/src/main/java/com/adyen/model/checkout/CardBrandDetails.java +++ b/src/main/java/com/adyen/model/checkout/CardBrandDetails.java @@ -20,8 +20,18 @@ import java.util.*; /** CardBrandDetails */ -@JsonPropertyOrder({CardBrandDetails.JSON_PROPERTY_SUPPORTED, CardBrandDetails.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + CardBrandDetails.JSON_PROPERTY_HEALTHCARE, + CardBrandDetails.JSON_PROPERTY_SUPPORTED, + CardBrandDetails.JSON_PROPERTY_TYPE +}) public class CardBrandDetails { + public static final String JSON_PROPERTY_HEALTHCARE = "healthcare"; + private Boolean healthcare; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetHealthcare = false; + public static final String JSON_PROPERTY_SUPPORTED = "supported"; private Boolean supported; @@ -42,6 +52,41 @@ public class CardBrandDetails { public CardBrandDetails() {} + /** + * Indicates if the card supports FSA/HSA healthcare payments. + * + * @param healthcare Indicates if the card supports FSA/HSA healthcare payments. + * @return the current {@code CardBrandDetails} instance, allowing for method chaining + */ + public CardBrandDetails healthcare(Boolean healthcare) { + this.healthcare = healthcare; + isSetHealthcare = true; // mark as set + return this; + } + + /** + * Indicates if the card supports FSA/HSA healthcare payments. + * + * @return healthcare Indicates if the card supports FSA/HSA healthcare payments. + */ + @JsonProperty(JSON_PROPERTY_HEALTHCARE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHealthcare() { + return healthcare; + } + + /** + * Indicates if the card supports FSA/HSA healthcare payments. + * + * @param healthcare Indicates if the card supports FSA/HSA healthcare payments. + */ + @JsonProperty(JSON_PROPERTY_HEALTHCARE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHealthcare(Boolean healthcare) { + this.healthcare = healthcare; + isSetHealthcare = true; // mark as set + } + /** * Indicates if you support the card brand. * @@ -142,7 +187,9 @@ public boolean equals(Object o) { return false; } CardBrandDetails cardBrandDetails = (CardBrandDetails) o; - return Objects.equals(this.supported, cardBrandDetails.supported) + return Objects.equals(this.healthcare, cardBrandDetails.healthcare) + && Objects.equals(this.isSetHealthcare, cardBrandDetails.isSetHealthcare) + && Objects.equals(this.supported, cardBrandDetails.supported) && Objects.equals(this.isSetSupported, cardBrandDetails.isSetSupported) && Objects.equals(this.type, cardBrandDetails.type) && Objects.equals(this.isSetType, cardBrandDetails.isSetType); @@ -150,13 +197,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(supported, isSetSupported, type, isSetType); + return Objects.hash(healthcare, isSetHealthcare, supported, isSetSupported, type, isSetType); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CardBrandDetails {\n"); + sb.append(" healthcare: ").append(toIndentedString(healthcare)).append("\n"); sb.append(" supported: ").append(toIndentedString(supported)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); @@ -183,6 +231,9 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetHealthcare) { + addIfNull(nulls, JSON_PROPERTY_HEALTHCARE, this.healthcare); + } if (isSetSupported) { addIfNull(nulls, JSON_PROPERTY_SUPPORTED, this.supported); } diff --git a/src/main/java/com/adyen/model/checkout/CheckoutErrorResponseEntity.java b/src/main/java/com/adyen/model/checkout/CheckoutErrorResponseEntity.java new file mode 100644 index 000000000..799935e72 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/CheckoutErrorResponseEntity.java @@ -0,0 +1,381 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** CheckoutErrorResponseEntity */ +@JsonPropertyOrder({ + CheckoutErrorResponseEntity.JSON_PROPERTY_ERROR_CODE, + CheckoutErrorResponseEntity.JSON_PROPERTY_ERROR_TYPE, + CheckoutErrorResponseEntity.JSON_PROPERTY_MESSAGE, + CheckoutErrorResponseEntity.JSON_PROPERTY_PSP_REFERENCE, + CheckoutErrorResponseEntity.JSON_PROPERTY_STATUS +}) +public class CheckoutErrorResponseEntity { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private String errorCode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetErrorCode = false; + + public static final String JSON_PROPERTY_ERROR_TYPE = "errorType"; + private String errorType; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetErrorType = false; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMessage = false; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPspReference = false; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetStatus = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public CheckoutErrorResponseEntity() {} + + /** + * errorCode + * + * @param errorCode + * @return the current {@code CheckoutErrorResponseEntity} instance, allowing for method chaining + */ + public CheckoutErrorResponseEntity errorCode(String errorCode) { + this.errorCode = errorCode; + isSetErrorCode = true; // mark as set + return this; + } + + /** + * Get errorCode + * + * @return errorCode + */ + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorCode() { + return errorCode; + } + + /** + * errorCode + * + * @param errorCode + */ + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + isSetErrorCode = true; // mark as set + } + + /** + * errorType + * + * @param errorType + * @return the current {@code CheckoutErrorResponseEntity} instance, allowing for method chaining + */ + public CheckoutErrorResponseEntity errorType(String errorType) { + this.errorType = errorType; + isSetErrorType = true; // mark as set + return this; + } + + /** + * Get errorType + * + * @return errorType + */ + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorType() { + return errorType; + } + + /** + * errorType + * + * @param errorType + */ + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorType(String errorType) { + this.errorType = errorType; + isSetErrorType = true; // mark as set + } + + /** + * message + * + * @param message + * @return the current {@code CheckoutErrorResponseEntity} instance, allowing for method chaining + */ + public CheckoutErrorResponseEntity message(String message) { + this.message = message; + isSetMessage = true; // mark as set + return this; + } + + /** + * Get message + * + * @return message + */ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + /** + * message + * + * @param message + */ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + isSetMessage = true; // mark as set + } + + /** + * pspReference + * + * @param pspReference + * @return the current {@code CheckoutErrorResponseEntity} instance, allowing for method chaining + */ + public CheckoutErrorResponseEntity pspReference(String pspReference) { + this.pspReference = pspReference; + isSetPspReference = true; // mark as set + return this; + } + + /** + * Get pspReference + * + * @return pspReference + */ + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPspReference() { + return pspReference; + } + + /** + * pspReference + * + * @param pspReference + */ + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + isSetPspReference = true; // mark as set + } + + /** + * status + * + * @param status + * @return the current {@code CheckoutErrorResponseEntity} instance, allowing for method chaining + */ + public CheckoutErrorResponseEntity status(Integer status) { + this.status = status; + isSetStatus = true; // mark as set + return this; + } + + /** + * Get status + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getStatus() { + return status; + } + + /** + * status + * + * @param status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + isSetStatus = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public CheckoutErrorResponseEntity includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this CheckoutErrorResponseEntity object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckoutErrorResponseEntity checkoutErrorResponseEntity = (CheckoutErrorResponseEntity) o; + return Objects.equals(this.errorCode, checkoutErrorResponseEntity.errorCode) + && Objects.equals(this.isSetErrorCode, checkoutErrorResponseEntity.isSetErrorCode) + && Objects.equals(this.errorType, checkoutErrorResponseEntity.errorType) + && Objects.equals(this.isSetErrorType, checkoutErrorResponseEntity.isSetErrorType) + && Objects.equals(this.message, checkoutErrorResponseEntity.message) + && Objects.equals(this.isSetMessage, checkoutErrorResponseEntity.isSetMessage) + && Objects.equals(this.pspReference, checkoutErrorResponseEntity.pspReference) + && Objects.equals(this.isSetPspReference, checkoutErrorResponseEntity.isSetPspReference) + && Objects.equals(this.status, checkoutErrorResponseEntity.status) + && Objects.equals(this.isSetStatus, checkoutErrorResponseEntity.isSetStatus); + } + + @Override + public int hashCode() { + return Objects.hash( + errorCode, + isSetErrorCode, + errorType, + isSetErrorType, + message, + isSetMessage, + pspReference, + isSetPspReference, + status, + isSetStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckoutErrorResponseEntity {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetErrorCode) { + addIfNull(nulls, JSON_PROPERTY_ERROR_CODE, this.errorCode); + } + if (isSetErrorType) { + addIfNull(nulls, JSON_PROPERTY_ERROR_TYPE, this.errorType); + } + if (isSetMessage) { + addIfNull(nulls, JSON_PROPERTY_MESSAGE, this.message); + } + if (isSetPspReference) { + addIfNull(nulls, JSON_PROPERTY_PSP_REFERENCE, this.pspReference); + } + if (isSetStatus) { + addIfNull(nulls, JSON_PROPERTY_STATUS, this.status); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of CheckoutErrorResponseEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of CheckoutErrorResponseEntity + * @throws JsonProcessingException if the JSON string is invalid with respect to + * CheckoutErrorResponseEntity + */ + public static CheckoutErrorResponseEntity fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CheckoutErrorResponseEntity.class); + } + + /** + * Convert an instance of CheckoutErrorResponseEntity to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java index 3fb574a37..a391ab24b 100644 --- a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java @@ -281,6 +281,32 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c log.log(Level.FINER, "Input data does not match schema 'ApplePayDetails'", e); } + // deserialize AuPayDetails + try { + boolean attemptParsing = true; + if (attemptParsing) { + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(AuPayDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } + + if (typeMatch) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AuPayDetails.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AuPayDetails'"); + } + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AuPayDetails'", e); + } + // deserialize BacsDirectDebitDetails try { boolean attemptParsing = true; @@ -437,6 +463,32 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c log.log(Level.FINER, "Input data does not match schema 'CellulantDetails'", e); } + // deserialize DBaraiDetails + try { + boolean attemptParsing = true; + if (attemptParsing) { + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(DBaraiDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } + + if (typeMatch) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DBaraiDetails.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'DBaraiDetails'"); + } + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DBaraiDetails'", e); + } + // deserialize DirectDebitAuDetails try { boolean attemptParsing = true; @@ -1653,6 +1705,11 @@ public CheckoutPaymentMethod(ApplePayDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(AuPayDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(BacsDirectDebitDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1683,6 +1740,11 @@ public CheckoutPaymentMethod(CellulantDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(DBaraiDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(DirectDebitAuDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1912,12 +1974,14 @@ public CheckoutPaymentMethod(ZipDetails o) { schemas.put("AncvDetails", new GenericType() {}); schemas.put("AndroidPayDetails", new GenericType() {}); schemas.put("ApplePayDetails", new GenericType() {}); + schemas.put("AuPayDetails", new GenericType() {}); schemas.put("BacsDirectDebitDetails", new GenericType() {}); schemas.put("BillDeskDetails", new GenericType() {}); schemas.put("BlikDetails", new GenericType() {}); schemas.put("CardDetails", new GenericType() {}); schemas.put("CashAppDetails", new GenericType() {}); schemas.put("CellulantDetails", new GenericType() {}); + schemas.put("DBaraiDetails", new GenericType() {}); schemas.put("DirectDebitAuDetails", new GenericType() {}); schemas.put("DokuDetails", new GenericType() {}); schemas.put("DragonpayDetails", new GenericType() {}); @@ -1966,6 +2030,311 @@ public CheckoutPaymentMethod(ZipDetails o) { schemas.put("WeChatPayMiniProgramDetails", new GenericType() {}); schemas.put("ZipDetails", new GenericType() {}); JSON.registerDescendants(CheckoutPaymentMethod.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + mappings.put("ach", AchDetails.class); + mappings.put("ach_plaid", AchDetails.class); + mappings.put("affirm", AffirmDetails.class); + mappings.put("affirm_pos", PaymentDetails.class); + mappings.put("afterpay_b2b", AfterpayDetails.class); + mappings.put("afterpay_default", AfterpayDetails.class); + mappings.put("afterpay_directdebit", OpenInvoiceDetails.class); + mappings.put("afterpaytouch", AfterpayDetails.class); + mappings.put("afterpaytouch_pos", AfterpayDetails.class); + mappings.put("alipay", PaymentDetails.class); + mappings.put("alipay_hk", PaymentDetails.class); + mappings.put("alipay_hk_wap", PaymentDetails.class); + mappings.put("alipay_hk_web", PaymentDetails.class); + mappings.put("alipay_plus", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_alipay_cn", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_alipay_hk", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_dana", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_gcash", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_kakaopay", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_kplus", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_naverpay", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_rabbitlinepay", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_tosspay", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_touchngo", StoredPaymentMethodDetails.class); + mappings.put("alipay_plus_truemoney", StoredPaymentMethodDetails.class); + mappings.put("alipay_wap", PaymentDetails.class); + mappings.put("alliancedata", CardDetails.class); + mappings.put("alma", AlmaDetails.class); + mappings.put("altId", CardDetails.class); + mappings.put("amazonpay", AmazonPayDetails.class); + mappings.put("ancv", AncvDetails.class); + mappings.put("androidpay", AndroidPayDetails.class); + mappings.put("applepay", ApplePayDetails.class); + mappings.put("atome", PaymentDetails.class); + mappings.put("atome_pos", OpenInvoiceDetails.class); + mappings.put("aupay", AuPayDetails.class); + mappings.put("balanceplatform", PaymentDetails.class); + mappings.put("bankTransfer", PaymentDetails.class); + mappings.put("bankTransfer_IBAN", PaymentDetails.class); + mappings.put("bcmc", CardDetails.class); + mappings.put("bcmc_mobile", StoredPaymentMethodDetails.class); + mappings.put("bcmc_mobile_QR", StoredPaymentMethodDetails.class); + mappings.put("bcmc_mobile_app", StoredPaymentMethodDetails.class); + mappings.put("benefit", PaymentDetails.class); + mappings.put("billdesk_online", BillDeskDetails.class); + mappings.put("billdesk_wallet", BillDeskDetails.class); + mappings.put("bizum", PaymentDetails.class); + mappings.put("blik", BlikDetails.class); + mappings.put("boletobancario", PaymentDetails.class); + mappings.put("boletobancario_bancodobrasil", PaymentDetails.class); + mappings.put("boletobancario_bradesco", PaymentDetails.class); + mappings.put("boletobancario_hsbc", PaymentDetails.class); + mappings.put("boletobancario_itau", PaymentDetails.class); + mappings.put("boletobancario_santander", PaymentDetails.class); + mappings.put("card", CardDetails.class); + mappings.put("cashapp", CashAppDetails.class); + mappings.put("cashticket", PaymentDetails.class); + mappings.put("cellulant", CellulantDetails.class); + mappings.put("clearpay", AfterpayDetails.class); + mappings.put("dana", StoredPaymentMethodDetails.class); + mappings.put("dbarai", DBaraiDetails.class); + mappings.put("directEbanking", PaymentDetails.class); + mappings.put("directdebit_AU", DirectDebitAuDetails.class); + mappings.put("directdebit_GB", BacsDirectDebitDetails.class); + mappings.put("doku", DokuDetails.class); + mappings.put("doku_alfamart", DokuDetails.class); + mappings.put("doku_atm_mandiri_va", DokuDetails.class); + mappings.put("doku_atm_mandiri_va_lite", DokuDetails.class); + mappings.put("doku_bca_klikpay", DokuDetails.class); + mappings.put("doku_bca_va", DokuDetails.class); + mappings.put("doku_bni", DokuDetails.class); + mappings.put("doku_bni_va", DokuDetails.class); + mappings.put("doku_bri_va", DokuDetails.class); + mappings.put("doku_briepay", DokuDetails.class); + mappings.put("doku_card", DokuDetails.class); + mappings.put("doku_cimb_va", DokuDetails.class); + mappings.put("doku_danamon_va", DokuDetails.class); + mappings.put("doku_indomaret", DokuDetails.class); + mappings.put("doku_mandiri_clickpay", DokuDetails.class); + mappings.put("doku_mandiri_multipayment", DokuDetails.class); + mappings.put("doku_mandiri_multipayment_lite", DokuDetails.class); + mappings.put("doku_mandiri_va", DokuDetails.class); + mappings.put("doku_ovo", DokuDetails.class); + mappings.put("doku_paymentmethods", DokuDetails.class); + mappings.put("doku_permata_atm", DokuDetails.class); + mappings.put("doku_permata_lite_atm", DokuDetails.class); + mappings.put("doku_sinarmas_va", DokuDetails.class); + mappings.put("doku_wallet", DokuDetails.class); + mappings.put("dragonpay_ebanking", DragonpayDetails.class); + mappings.put("dragonpay_otc_banking", DragonpayDetails.class); + mappings.put("dragonpay_otc_non_banking", DragonpayDetails.class); + mappings.put("dragonpay_otc_philippines", DragonpayDetails.class); + mappings.put("duitnow", PaymentDetails.class); + mappings.put("ebanking_FI", EBankingFinlandDetails.class); + mappings.put("econtext", EcontextVoucherDetails.class); + mappings.put("econtext_atm", EcontextVoucherDetails.class); + mappings.put("econtext_online", EcontextVoucherDetails.class); + mappings.put("econtext_seven_eleven", EcontextVoucherDetails.class); + mappings.put("econtext_stores", EcontextVoucherDetails.class); + mappings.put("eft_directdebit_CA", EftDetails.class); + mappings.put("eps", GenericIssuerPaymentMethodDetails.class); + mappings.put("externalToken", ExternalTokenDetails.class); + mappings.put("facilypay", PaymentDetails.class); + mappings.put("facilypay_10x", PaymentDetails.class); + mappings.put("facilypay_12x", PaymentDetails.class); + mappings.put("facilypay_3x", PaymentDetails.class); + mappings.put("facilypay_4x", PaymentDetails.class); + mappings.put("facilypay_6x", PaymentDetails.class); + mappings.put("fastlane", FastlaneDetails.class); + mappings.put("fawry", PaymentDetails.class); + mappings.put("fpx_agrobank", PaymentDetails.class); + mappings.put("gcash", StoredPaymentMethodDetails.class); + mappings.put("giftcard", CardDetails.class); + mappings.put("googlepay", GooglePayDetails.class); + mappings.put("gopay_wallet", PaymentDetails.class); + mappings.put("grabpay_ID", StoredPaymentMethodDetails.class); + mappings.put("grabpay_MY", StoredPaymentMethodDetails.class); + mappings.put("grabpay_PH", StoredPaymentMethodDetails.class); + mappings.put("grabpay_SG", StoredPaymentMethodDetails.class); + mappings.put("grabpay_TH", StoredPaymentMethodDetails.class); + mappings.put("grabpay_VN", StoredPaymentMethodDetails.class); + mappings.put("ideal", IdealDetails.class); + mappings.put("ikano", PaymentDetails.class); + mappings.put("iris", PaymentDetails.class); + mappings.put("kakaopay", StoredPaymentMethodDetails.class); + mappings.put("karenmillen", PaymentDetails.class); + mappings.put("kcp_banktransfer", PaymentDetails.class); + mappings.put("kcp_creditcard", PaymentDetails.class); + mappings.put("kcp_naverpay", PaymentDetails.class); + mappings.put("kcp_payco", PaymentDetails.class); + mappings.put("klarna", KlarnaDetails.class); + mappings.put("klarna_account", KlarnaDetails.class); + mappings.put("klarna_b2b", KlarnaDetails.class); + mappings.put("klarna_network", KlarnaNetworkDetails.class); + mappings.put("klarna_paynow", KlarnaDetails.class); + mappings.put("klarnapayments", KlarnaDetails.class); + mappings.put("klarnapayments_account", KlarnaDetails.class); + mappings.put("klarnapayments_b2b", KlarnaDetails.class); + mappings.put("knet", PaymentDetails.class); + mappings.put("konbini", PaymentDetails.class); + mappings.put("mada", PaymentDetails.class); + mappings.put("masterpass", MasterpassDetails.class); + mappings.put("maybank2u_mae", PaymentDetails.class); + mappings.put("mbway", MbwayDetails.class); + mappings.put("mobilepay", MobilePayDetails.class); + mappings.put("molpay_affin_epg", PaymentDetails.class); + mappings.put("molpay_amb", PaymentDetails.class); + mappings.put("molpay_bangkokbank", MolPayDetails.class); + mappings.put("molpay_bankislam", PaymentDetails.class); + mappings.put("molpay_boost", PaymentDetails.class); + mappings.put("molpay_cimb", PaymentDetails.class); + mappings.put("molpay_ebanking_MY", PaymentDetails.class); + mappings.put("molpay_ebanking_TH", MolPayDetails.class); + mappings.put("molpay_ebanking_VN", PaymentDetails.class); + mappings.put("molpay_ebanking_direct_MY", PaymentDetails.class); + mappings.put("molpay_ebanking_fpx_MY", MolPayDetails.class); + mappings.put("molpay_fpx", PaymentDetails.class); + mappings.put("molpay_hlb", PaymentDetails.class); + mappings.put("molpay_kbank", MolPayDetails.class); + mappings.put("molpay_krungsribank", MolPayDetails.class); + mappings.put("molpay_krungthaibank", MolPayDetails.class); + mappings.put("molpay_maybank2u", PaymentDetails.class); + mappings.put("molpay_publicbank", PaymentDetails.class); + mappings.put("molpay_rhb", PaymentDetails.class); + mappings.put("molpay_siamcommercialbank", MolPayDetails.class); + mappings.put("momo_wallet", StoredPaymentMethodDetails.class); + mappings.put("momo_wallet_app", StoredPaymentMethodDetails.class); + mappings.put("multibanco", PaymentDetails.class); + mappings.put("naps", PaymentDetails.class); + mappings.put("networkToken", CardDetails.class); + mappings.put("nordea", PaymentDetails.class); + mappings.put("oasis", PaymentDetails.class); + mappings.put("omannet", PaymentDetails.class); + mappings.put("oney", PaymentDetails.class); + mappings.put("onlineBanking_CZ", GenericIssuerPaymentMethodDetails.class); + mappings.put("onlineBanking_PL", GenericIssuerPaymentMethodDetails.class); + mappings.put("onlineBanking_SK", GenericIssuerPaymentMethodDetails.class); + mappings.put("onlinebanking_IN", GenericIssuerPaymentMethodDetails.class); + mappings.put("openinvoice", OpenInvoiceDetails.class); + mappings.put("oxxo", StoredPaymentMethodDetails.class); + mappings.put("paybybank", PayByBankDetails.class); + mappings.put("paybybank_AIS_DD", PayByBankAISDirectDebitDetails.class); + mappings.put("paybybank_pix", PixPayByBankDetails.class); + mappings.put("paymaya_wallet", StoredPaymentMethodDetails.class); + mappings.put("payme", PaymentDetails.class); + mappings.put("payme_pos", PaymentDetails.class); + mappings.put("paynow", PaymentDetails.class); + mappings.put("paypal", PayPalDetails.class); + mappings.put("paypay", PayPayDetails.class); + mappings.put("paypo", PaymentDetails.class); + mappings.put("paysafecard", StoredPaymentMethodDetails.class); + mappings.put("paytm", PaymentDetails.class); + mappings.put("payto", PayToDetails.class); + mappings.put("payu_IN_cashcard", PaymentDetails.class); + mappings.put("payu_IN_nb", PaymentDetails.class); + mappings.put("payu_IN_upi", PayUUpiDetails.class); + mappings.put("paywithgoogle", PayWithGoogleDetails.class); + mappings.put("pix", PixDetails.class); + mappings.put("primeiropay_boleto", PaymentDetails.class); + mappings.put("promptpay", PaymentDetails.class); + mappings.put("pse_payulatam", PseDetails.class); + mappings.put("rakutenpay", RakutenPayDetails.class); + mappings.put("ratepay", RatepayDetails.class); + mappings.put("ratepay_directdebit", RatepayDetails.class); + mappings.put("riverty", RivertyDetails.class); + mappings.put("riverty_account", RivertyDetails.class); + mappings.put("riverty_installments", RivertyDetails.class); + mappings.put("samsungpay", SamsungPayDetails.class); + mappings.put("scalapay", PaymentDetails.class); + mappings.put("scalapay_3x", PaymentDetails.class); + mappings.put("scalapay_4x", PaymentDetails.class); + mappings.put("scheme", CardDetails.class); + mappings.put("sepadirectdebit", SepaDirectDebitDetails.class); + mappings.put("sepadirectdebit_amazonpay", SepaDirectDebitDetails.class); + mappings.put("sepadirectdebit_riverty", RivertyDetails.class); + mappings.put("swish", PaymentDetails.class); + mappings.put("touchngo", PaymentDetails.class); + mappings.put("truemoney", StoredPaymentMethodDetails.class); + mappings.put("trustly", PaymentDetails.class); + mappings.put("trustlyvector", PaymentDetails.class); + mappings.put("twint", TwintDetails.class); + mappings.put("twint_pos", PaymentDetails.class); + mappings.put("unionpay", PaymentDetails.class); + mappings.put("upi_collect", UpiCollectDetails.class); + mappings.put("upi_intent", UpiIntentDetails.class); + mappings.put("upi_qr", UpiQrDetails.class); + mappings.put("vipps", VippsDetails.class); + mappings.put("visacheckout", VisaCheckoutDetails.class); + mappings.put("wallet_IN", PaymentDetails.class); + mappings.put("walley", PaymentDetails.class); + mappings.put("walley_b2b", PaymentDetails.class); + mappings.put("warehouse", PaymentDetails.class); + mappings.put("wechatpay", WeChatPayDetails.class); + mappings.put("wechatpayMiniProgram", WeChatPayMiniProgramDetails.class); + mappings.put("wechatpayQR", PaymentDetails.class); + mappings.put("wechatpaySDK", PaymentDetails.class); + mappings.put("wechatpayWeb", PaymentDetails.class); + mappings.put("wechatpay_pos", WeChatPayDetails.class); + mappings.put("wero", PaymentDetails.class); + mappings.put("zip", ZipDetails.class); + mappings.put("zip_pos", ZipDetails.class); + mappings.put("AchDetails", AchDetails.class); + mappings.put("AffirmDetails", AffirmDetails.class); + mappings.put("AfterpayDetails", AfterpayDetails.class); + mappings.put("AlmaDetails", AlmaDetails.class); + mappings.put("AmazonPayDetails", AmazonPayDetails.class); + mappings.put("AncvDetails", AncvDetails.class); + mappings.put("AndroidPayDetails", AndroidPayDetails.class); + mappings.put("ApplePayDetails", ApplePayDetails.class); + mappings.put("AuPayDetails", AuPayDetails.class); + mappings.put("BacsDirectDebitDetails", BacsDirectDebitDetails.class); + mappings.put("BillDeskDetails", BillDeskDetails.class); + mappings.put("BlikDetails", BlikDetails.class); + mappings.put("CardDetails", CardDetails.class); + mappings.put("CashAppDetails", CashAppDetails.class); + mappings.put("CellulantDetails", CellulantDetails.class); + mappings.put("DBaraiDetails", DBaraiDetails.class); + mappings.put("DirectDebitAuDetails", DirectDebitAuDetails.class); + mappings.put("DokuDetails", DokuDetails.class); + mappings.put("DragonpayDetails", DragonpayDetails.class); + mappings.put("EBankingFinlandDetails", EBankingFinlandDetails.class); + mappings.put("EcontextVoucherDetails", EcontextVoucherDetails.class); + mappings.put("EftDetails", EftDetails.class); + mappings.put("ExternalTokenDetails", ExternalTokenDetails.class); + mappings.put("FastlaneDetails", FastlaneDetails.class); + mappings.put("GenericIssuerPaymentMethodDetails", GenericIssuerPaymentMethodDetails.class); + mappings.put("GooglePayDetails", GooglePayDetails.class); + mappings.put("IdealDetails", IdealDetails.class); + mappings.put("KlarnaDetails", KlarnaDetails.class); + mappings.put("KlarnaNetworkDetails", KlarnaNetworkDetails.class); + mappings.put("MasterpassDetails", MasterpassDetails.class); + mappings.put("MbwayDetails", MbwayDetails.class); + mappings.put("MobilePayDetails", MobilePayDetails.class); + mappings.put("MolPayDetails", MolPayDetails.class); + mappings.put("OpenInvoiceDetails", OpenInvoiceDetails.class); + mappings.put("PayByBankAISDirectDebitDetails", PayByBankAISDirectDebitDetails.class); + mappings.put("PayByBankDetails", PayByBankDetails.class); + mappings.put("PayPalDetails", PayPalDetails.class); + mappings.put("PayPayDetails", PayPayDetails.class); + mappings.put("PayToDetails", PayToDetails.class); + mappings.put("PayUUpiDetails", PayUUpiDetails.class); + mappings.put("PayWithGoogleDetails", PayWithGoogleDetails.class); + mappings.put("PaymentDetails", PaymentDetails.class); + mappings.put("PixDetails", PixDetails.class); + mappings.put("PixPayByBankDetails", PixPayByBankDetails.class); + mappings.put("PseDetails", PseDetails.class); + mappings.put("RakutenPayDetails", RakutenPayDetails.class); + mappings.put("RatepayDetails", RatepayDetails.class); + mappings.put("RivertyDetails", RivertyDetails.class); + mappings.put("SamsungPayDetails", SamsungPayDetails.class); + mappings.put("SepaDirectDebitDetails", SepaDirectDebitDetails.class); + mappings.put("StoredPaymentMethodDetails", StoredPaymentMethodDetails.class); + mappings.put("TwintDetails", TwintDetails.class); + mappings.put("UpiCollectDetails", UpiCollectDetails.class); + mappings.put("UpiIntentDetails", UpiIntentDetails.class); + mappings.put("UpiQrDetails", UpiQrDetails.class); + mappings.put("VippsDetails", VippsDetails.class); + mappings.put("VisaCheckoutDetails", VisaCheckoutDetails.class); + mappings.put("WeChatPayDetails", WeChatPayDetails.class); + mappings.put("WeChatPayMiniProgramDetails", WeChatPayMiniProgramDetails.class); + mappings.put("ZipDetails", ZipDetails.class); + mappings.put("CheckoutPaymentMethod", CheckoutPaymentMethod.class); + JSON.registerDiscriminator(CheckoutPaymentMethod.class, "type", mappings); } @Override @@ -1976,18 +2345,18 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid * against the oneOf child schemas: AchDetails, AffirmDetails, AfterpayDetails, AlmaDetails, - * AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, - * BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, - * DirectDebitAuDetails, DokuDetails, DragonpayDetails, EBankingFinlandDetails, - * EcontextVoucherDetails, EftDetails, ExternalTokenDetails, FastlaneDetails, - * GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, KlarnaDetails, - * KlarnaNetworkDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, - * OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, - * PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PixDetails, - * PixPayByBankDetails, PseDetails, RakutenPayDetails, RatepayDetails, RivertyDetails, - * SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, - * UpiCollectDetails, UpiIntentDetails, UpiQrDetails, VippsDetails, VisaCheckoutDetails, - * WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, AuPayDetails, + * BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, + * CellulantDetails, DBaraiDetails, DirectDebitAuDetails, DokuDetails, DragonpayDetails, + * EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, ExternalTokenDetails, + * FastlaneDetails, GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, + * KlarnaDetails, KlarnaNetworkDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, + * MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, + * PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, + * PaymentDetails, PixDetails, PixPayByBankDetails, PseDetails, RakutenPayDetails, RatepayDetails, + * RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, + * TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails, VippsDetails, + * VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). @@ -2034,6 +2403,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(AuPayDetails.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(BacsDirectDebitDetails.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; @@ -2064,6 +2438,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(DBaraiDetails.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(DirectDebitAuDetails.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; @@ -2285,37 +2664,38 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( - "Invalid instance type. Must be AchDetails, AffirmDetails, AfterpayDetails, AlmaDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DirectDebitAuDetails, DokuDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, ExternalTokenDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, KlarnaDetails, KlarnaNetworkDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PixDetails, PixPayByBankDetails, PseDetails, RakutenPayDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); + "Invalid instance type. Must be AchDetails, AffirmDetails, AfterpayDetails, AlmaDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, AuPayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DBaraiDetails, DirectDebitAuDetails, DokuDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, ExternalTokenDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, KlarnaDetails, KlarnaNetworkDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PixDetails, PixPayByBankDetails, PseDetails, RakutenPayDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); } /** * Get the actual instance, which can be the following: AchDetails, AffirmDetails, * AfterpayDetails, AlmaDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, - * ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, - * CashAppDetails, CellulantDetails, DirectDebitAuDetails, DokuDetails, DragonpayDetails, - * EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, ExternalTokenDetails, - * FastlaneDetails, GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, - * KlarnaDetails, KlarnaNetworkDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, - * MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, - * PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, - * PaymentDetails, PixDetails, PixPayByBankDetails, PseDetails, RakutenPayDetails, RatepayDetails, - * RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, - * TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails, VippsDetails, - * VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * ApplePayDetails, AuPayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, + * CardDetails, CashAppDetails, CellulantDetails, DBaraiDetails, DirectDebitAuDetails, + * DokuDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, + * ExternalTokenDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GooglePayDetails, + * IdealDetails, KlarnaDetails, KlarnaNetworkDetails, MasterpassDetails, MbwayDetails, + * MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, + * PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, + * PayWithGoogleDetails, PaymentDetails, PixDetails, PixPayByBankDetails, PseDetails, + * RakutenPayDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, + * StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails, + * VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails * * @return The actual instance (AchDetails, AffirmDetails, AfterpayDetails, AlmaDetails, - * AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, - * BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, - * DirectDebitAuDetails, DokuDetails, DragonpayDetails, EBankingFinlandDetails, - * EcontextVoucherDetails, EftDetails, ExternalTokenDetails, FastlaneDetails, - * GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, KlarnaDetails, - * KlarnaNetworkDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, - * OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, - * PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, - * PixDetails, PixPayByBankDetails, PseDetails, RakutenPayDetails, RatepayDetails, - * RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, - * TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails, VippsDetails, - * VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) + * AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, AuPayDetails, + * BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, + * CellulantDetails, DBaraiDetails, DirectDebitAuDetails, DokuDetails, DragonpayDetails, + * EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, ExternalTokenDetails, + * FastlaneDetails, GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, + * KlarnaDetails, KlarnaNetworkDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, + * MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, + * PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, + * PaymentDetails, PixDetails, PixPayByBankDetails, PseDetails, RakutenPayDetails, + * RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, + * StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, + * UpiQrDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, + * WeChatPayMiniProgramDetails, ZipDetails) */ @Override public Object getActualInstance() { @@ -2410,6 +2790,17 @@ public ApplePayDetails getApplePayDetails() throws ClassCastException { return (ApplePayDetails) super.getActualInstance(); } + /** + * Get the actual instance of `AuPayDetails`. If the actual instance is not `AuPayDetails`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `AuPayDetails` + * @throws ClassCastException if the instance is not `AuPayDetails` + */ + public AuPayDetails getAuPayDetails() throws ClassCastException { + return (AuPayDetails) super.getActualInstance(); + } + /** * Get the actual instance of `BacsDirectDebitDetails`. If the actual instance is not * `BacsDirectDebitDetails`, the ClassCastException will be thrown. @@ -2476,6 +2867,17 @@ public CellulantDetails getCellulantDetails() throws ClassCastException { return (CellulantDetails) super.getActualInstance(); } + /** + * Get the actual instance of `DBaraiDetails`. If the actual instance is not `DBaraiDetails`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `DBaraiDetails` + * @throws ClassCastException if the instance is not `DBaraiDetails` + */ + public DBaraiDetails getDBaraiDetails() throws ClassCastException { + return (DBaraiDetails) super.getActualInstance(); + } + /** * Get the actual instance of `DirectDebitAuDetails`. If the actual instance is not * `DirectDebitAuDetails`, the ClassCastException will be thrown. diff --git a/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java b/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java index 53509b2bf..ef16be34f 100644 --- a/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java +++ b/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java @@ -71,6 +71,7 @@ CreateCheckoutSessionRequest.JSON_PROPERTY_REFERENCE, CreateCheckoutSessionRequest.JSON_PROPERTY_RETURN_URL, CreateCheckoutSessionRequest.JSON_PROPERTY_RISK_DATA, + CreateCheckoutSessionRequest.JSON_PROPERTY_SHOPPER_CONVERSION_ID, CreateCheckoutSessionRequest.JSON_PROPERTY_SHOPPER_EMAIL, CreateCheckoutSessionRequest.JSON_PROPERTY_SHOPPER_I_P, CreateCheckoutSessionRequest.JSON_PROPERTY_SHOPPER_INTERACTION, @@ -89,6 +90,7 @@ CreateCheckoutSessionRequest.JSON_PROPERTY_STORE_PAYMENT_METHOD_MODE, CreateCheckoutSessionRequest.JSON_PROPERTY_TELEPHONE_NUMBER, CreateCheckoutSessionRequest.JSON_PROPERTY_THEME_ID, + CreateCheckoutSessionRequest.JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO, CreateCheckoutSessionRequest.JSON_PROPERTY_THREE_D_S2_REQUEST_DATA, CreateCheckoutSessionRequest.JSON_PROPERTY_THREE_D_S_AUTHENTICATION_ONLY, CreateCheckoutSessionRequest.JSON_PROPERTY_TRUSTED_SHOPPER @@ -480,6 +482,12 @@ public static RecurringProcessingModelEnum fromValue(String value) { /** Mark when the attribute has been explicitly set. */ private boolean isSetRiskData = false; + public static final String JSON_PROPERTY_SHOPPER_CONVERSION_ID = "shopperConversionId"; + private String shopperConversionId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetShopperConversionId = false; + public static final String JSON_PROPERTY_SHOPPER_EMAIL = "shopperEmail"; private String shopperEmail; @@ -744,6 +752,13 @@ public static StorePaymentMethodModeEnum fromValue(String value) { /** Mark when the attribute has been explicitly set. */ private boolean isSetThemeId = false; + public static final String JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO = + "thirdPartyTokenRedundancyInfo"; + private ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetThirdPartyTokenRedundancyInfo = false; + public static final String JSON_PROPERTY_THREE_D_S2_REQUEST_DATA = "threeDS2RequestData"; private CheckoutSessionThreeDS2RequestData threeDS2RequestData; @@ -2600,6 +2615,62 @@ public void setRiskData(RiskData riskData) { isSetRiskData = true; // mark as set } + /** + * Use this if you made a `/paymentMethods` request to get the payment methods for the + * shopper's checkout session. A unique ID to [connect the shopper to a single checkout + * session](https://docs.adyen.com/online-payments/checkout-settings#checkout-shopper-conversion-id) + * that uses multiple API requests. You can use this to get insights into conversion rates. + * + * @param shopperConversionId Use this if you made a `/paymentMethods` request to get + * the payment methods for the shopper's checkout session. A unique ID to [connect the + * shopper to a single checkout + * session](https://docs.adyen.com/online-payments/checkout-settings#checkout-shopper-conversion-id) + * that uses multiple API requests. You can use this to get insights into conversion rates. + * @return the current {@code CreateCheckoutSessionRequest} instance, allowing for method chaining + */ + public CreateCheckoutSessionRequest shopperConversionId(String shopperConversionId) { + this.shopperConversionId = shopperConversionId; + isSetShopperConversionId = true; // mark as set + return this; + } + + /** + * Use this if you made a `/paymentMethods` request to get the payment methods for the + * shopper's checkout session. A unique ID to [connect the shopper to a single checkout + * session](https://docs.adyen.com/online-payments/checkout-settings#checkout-shopper-conversion-id) + * that uses multiple API requests. You can use this to get insights into conversion rates. + * + * @return shopperConversionId Use this if you made a `/paymentMethods` request to get + * the payment methods for the shopper's checkout session. A unique ID to [connect the + * shopper to a single checkout + * session](https://docs.adyen.com/online-payments/checkout-settings#checkout-shopper-conversion-id) + * that uses multiple API requests. You can use this to get insights into conversion rates. + */ + @JsonProperty(JSON_PROPERTY_SHOPPER_CONVERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getShopperConversionId() { + return shopperConversionId; + } + + /** + * Use this if you made a `/paymentMethods` request to get the payment methods for the + * shopper's checkout session. A unique ID to [connect the shopper to a single checkout + * session](https://docs.adyen.com/online-payments/checkout-settings#checkout-shopper-conversion-id) + * that uses multiple API requests. You can use this to get insights into conversion rates. + * + * @param shopperConversionId Use this if you made a `/paymentMethods` request to get + * the payment methods for the shopper's checkout session. A unique ID to [connect the + * shopper to a single checkout + * session](https://docs.adyen.com/online-payments/checkout-settings#checkout-shopper-conversion-id) + * that uses multiple API requests. You can use this to get insights into conversion rates. + */ + @JsonProperty(JSON_PROPERTY_SHOPPER_CONVERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShopperConversionId(String shopperConversionId) { + this.shopperConversionId = shopperConversionId; + isSetShopperConversionId = true; // mark as set + } + /** * The shopper's email address. * @@ -3566,6 +3637,43 @@ public void setThemeId(String themeId) { isSetThemeId = true; // mark as set } + /** + * thirdPartyTokenRedundancyInfo + * + * @param thirdPartyTokenRedundancyInfo + * @return the current {@code CreateCheckoutSessionRequest} instance, allowing for method chaining + */ + public CreateCheckoutSessionRequest thirdPartyTokenRedundancyInfo( + ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo) { + this.thirdPartyTokenRedundancyInfo = thirdPartyTokenRedundancyInfo; + isSetThirdPartyTokenRedundancyInfo = true; // mark as set + return this; + } + + /** + * Get thirdPartyTokenRedundancyInfo + * + * @return thirdPartyTokenRedundancyInfo + */ + @JsonProperty(JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThirdPartyTokenRedundancyInfo getThirdPartyTokenRedundancyInfo() { + return thirdPartyTokenRedundancyInfo; + } + + /** + * thirdPartyTokenRedundancyInfo + * + * @param thirdPartyTokenRedundancyInfo + */ + @JsonProperty(JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setThirdPartyTokenRedundancyInfo( + ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo) { + this.thirdPartyTokenRedundancyInfo = thirdPartyTokenRedundancyInfo; + isSetThirdPartyTokenRedundancyInfo = true; // mark as set + } + /** * threeDS2RequestData * @@ -3840,6 +3948,10 @@ public boolean equals(Object o) { && Objects.equals(this.isSetReturnUrl, createCheckoutSessionRequest.isSetReturnUrl) && Objects.equals(this.riskData, createCheckoutSessionRequest.riskData) && Objects.equals(this.isSetRiskData, createCheckoutSessionRequest.isSetRiskData) + && Objects.equals( + this.shopperConversionId, createCheckoutSessionRequest.shopperConversionId) + && Objects.equals( + this.isSetShopperConversionId, createCheckoutSessionRequest.isSetShopperConversionId) && Objects.equals(this.shopperEmail, createCheckoutSessionRequest.shopperEmail) && Objects.equals(this.isSetShopperEmail, createCheckoutSessionRequest.isSetShopperEmail) && Objects.equals(this.shopperIP, createCheckoutSessionRequest.shopperIP) @@ -3898,6 +4010,12 @@ public boolean equals(Object o) { this.isSetTelephoneNumber, createCheckoutSessionRequest.isSetTelephoneNumber) && Objects.equals(this.themeId, createCheckoutSessionRequest.themeId) && Objects.equals(this.isSetThemeId, createCheckoutSessionRequest.isSetThemeId) + && Objects.equals( + this.thirdPartyTokenRedundancyInfo, + createCheckoutSessionRequest.thirdPartyTokenRedundancyInfo) + && Objects.equals( + this.isSetThirdPartyTokenRedundancyInfo, + createCheckoutSessionRequest.isSetThirdPartyTokenRedundancyInfo) && Objects.equals( this.threeDS2RequestData, createCheckoutSessionRequest.threeDS2RequestData) && Objects.equals( @@ -3995,6 +4113,8 @@ public int hashCode() { isSetReturnUrl, riskData, isSetRiskData, + shopperConversionId, + isSetShopperConversionId, shopperEmail, isSetShopperEmail, shopperIP, @@ -4031,6 +4151,8 @@ public int hashCode() { isSetTelephoneNumber, themeId, isSetThemeId, + thirdPartyTokenRedundancyInfo, + isSetThirdPartyTokenRedundancyInfo, threeDS2RequestData, isSetThreeDS2RequestData, threeDSAuthenticationOnly, @@ -4097,6 +4219,9 @@ public String toString() { sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" returnUrl: ").append(toIndentedString(returnUrl)).append("\n"); sb.append(" riskData: ").append(toIndentedString(riskData)).append("\n"); + sb.append(" shopperConversionId: ") + .append(toIndentedString(shopperConversionId)) + .append("\n"); sb.append(" shopperEmail: ").append(toIndentedString(shopperEmail)).append("\n"); sb.append(" shopperIP: ").append(toIndentedString(shopperIP)).append("\n"); sb.append(" shopperInteraction: ").append(toIndentedString(shopperInteraction)).append("\n"); @@ -4127,6 +4252,9 @@ public String toString() { .append("\n"); sb.append(" telephoneNumber: ").append(toIndentedString(telephoneNumber)).append("\n"); sb.append(" themeId: ").append(toIndentedString(themeId)).append("\n"); + sb.append(" thirdPartyTokenRedundancyInfo: ") + .append(toIndentedString(thirdPartyTokenRedundancyInfo)) + .append("\n"); sb.append(" threeDS2RequestData: ") .append(toIndentedString(threeDS2RequestData)) .append("\n"); @@ -4278,6 +4406,9 @@ public Map getExplicitNulls() { if (isSetRiskData) { addIfNull(nulls, JSON_PROPERTY_RISK_DATA, this.riskData); } + if (isSetShopperConversionId) { + addIfNull(nulls, JSON_PROPERTY_SHOPPER_CONVERSION_ID, this.shopperConversionId); + } if (isSetShopperEmail) { addIfNull(nulls, JSON_PROPERTY_SHOPPER_EMAIL, this.shopperEmail); } @@ -4335,6 +4466,12 @@ public Map getExplicitNulls() { if (isSetThemeId) { addIfNull(nulls, JSON_PROPERTY_THEME_ID, this.themeId); } + if (isSetThirdPartyTokenRedundancyInfo) { + addIfNull( + nulls, + JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO, + this.thirdPartyTokenRedundancyInfo); + } if (isSetThreeDS2RequestData) { addIfNull(nulls, JSON_PROPERTY_THREE_D_S2_REQUEST_DATA, this.threeDS2RequestData); } diff --git a/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java b/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java index 574f71ebf..f92b61552 100644 --- a/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java +++ b/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java @@ -90,6 +90,7 @@ CreateCheckoutSessionResponse.JSON_PROPERTY_STORE_PAYMENT_METHOD_MODE, CreateCheckoutSessionResponse.JSON_PROPERTY_TELEPHONE_NUMBER, CreateCheckoutSessionResponse.JSON_PROPERTY_THEME_ID, + CreateCheckoutSessionResponse.JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO, CreateCheckoutSessionResponse.JSON_PROPERTY_THREE_D_S2_REQUEST_DATA, CreateCheckoutSessionResponse.JSON_PROPERTY_THREE_D_S_AUTHENTICATION_ONLY, CreateCheckoutSessionResponse.JSON_PROPERTY_TRUSTED_SHOPPER, @@ -758,6 +759,13 @@ public static StorePaymentMethodModeEnum fromValue(String value) { /** Mark when the attribute has been explicitly set. */ private boolean isSetThemeId = false; + public static final String JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO = + "thirdPartyTokenRedundancyInfo"; + private ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetThirdPartyTokenRedundancyInfo = false; + public static final String JSON_PROPERTY_THREE_D_S2_REQUEST_DATA = "threeDS2RequestData"; private CheckoutSessionThreeDS2RequestData threeDS2RequestData; @@ -3698,6 +3706,44 @@ public void setThemeId(String themeId) { isSetThemeId = true; // mark as set } + /** + * thirdPartyTokenRedundancyInfo + * + * @param thirdPartyTokenRedundancyInfo + * @return the current {@code CreateCheckoutSessionResponse} instance, allowing for method + * chaining + */ + public CreateCheckoutSessionResponse thirdPartyTokenRedundancyInfo( + ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo) { + this.thirdPartyTokenRedundancyInfo = thirdPartyTokenRedundancyInfo; + isSetThirdPartyTokenRedundancyInfo = true; // mark as set + return this; + } + + /** + * Get thirdPartyTokenRedundancyInfo + * + * @return thirdPartyTokenRedundancyInfo + */ + @JsonProperty(JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThirdPartyTokenRedundancyInfo getThirdPartyTokenRedundancyInfo() { + return thirdPartyTokenRedundancyInfo; + } + + /** + * thirdPartyTokenRedundancyInfo + * + * @param thirdPartyTokenRedundancyInfo + */ + @JsonProperty(JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setThirdPartyTokenRedundancyInfo( + ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo) { + this.thirdPartyTokenRedundancyInfo = thirdPartyTokenRedundancyInfo; + isSetThirdPartyTokenRedundancyInfo = true; // mark as set + } + /** * threeDS2RequestData * @@ -4080,6 +4126,12 @@ public boolean equals(Object o) { this.isSetTelephoneNumber, createCheckoutSessionResponse.isSetTelephoneNumber) && Objects.equals(this.themeId, createCheckoutSessionResponse.themeId) && Objects.equals(this.isSetThemeId, createCheckoutSessionResponse.isSetThemeId) + && Objects.equals( + this.thirdPartyTokenRedundancyInfo, + createCheckoutSessionResponse.thirdPartyTokenRedundancyInfo) + && Objects.equals( + this.isSetThirdPartyTokenRedundancyInfo, + createCheckoutSessionResponse.isSetThirdPartyTokenRedundancyInfo) && Objects.equals( this.threeDS2RequestData, createCheckoutSessionResponse.threeDS2RequestData) && Objects.equals( @@ -4219,6 +4271,8 @@ public int hashCode() { isSetTelephoneNumber, themeId, isSetThemeId, + thirdPartyTokenRedundancyInfo, + isSetThirdPartyTokenRedundancyInfo, threeDS2RequestData, isSetThreeDS2RequestData, threeDSAuthenticationOnly, @@ -4319,6 +4373,9 @@ public String toString() { .append("\n"); sb.append(" telephoneNumber: ").append(toIndentedString(telephoneNumber)).append("\n"); sb.append(" themeId: ").append(toIndentedString(themeId)).append("\n"); + sb.append(" thirdPartyTokenRedundancyInfo: ") + .append(toIndentedString(thirdPartyTokenRedundancyInfo)) + .append("\n"); sb.append(" threeDS2RequestData: ") .append(toIndentedString(threeDS2RequestData)) .append("\n"); @@ -4534,6 +4591,12 @@ public Map getExplicitNulls() { if (isSetThemeId) { addIfNull(nulls, JSON_PROPERTY_THEME_ID, this.themeId); } + if (isSetThirdPartyTokenRedundancyInfo) { + addIfNull( + nulls, + JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO, + this.thirdPartyTokenRedundancyInfo); + } if (isSetThreeDS2RequestData) { addIfNull(nulls, JSON_PROPERTY_THREE_D_S2_REQUEST_DATA, this.threeDS2RequestData); } diff --git a/src/main/java/com/adyen/model/checkout/DBaraiDetails.java b/src/main/java/com/adyen/model/checkout/DBaraiDetails.java new file mode 100644 index 000000000..85663768f --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/DBaraiDetails.java @@ -0,0 +1,447 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.Arrays; +import java.util.logging.Logger; + +/** DBaraiDetails */ +@JsonPropertyOrder({ + DBaraiDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + DBaraiDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, + DBaraiDetails.JSON_PROPERTY_SDK_DATA, + DBaraiDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID, + DBaraiDetails.JSON_PROPERTY_TYPE +}) +public class DBaraiDetails { + public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId"; + private String checkoutAttemptId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCheckoutAttemptId = false; + + public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference"; + /* deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead. */ + @Deprecated private String recurringDetailReference; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRecurringDetailReference = false; + + public static final String JSON_PROPERTY_SDK_DATA = "sdkData"; + private String sdkData; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSdkData = false; + + public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId"; + private String storedPaymentMethodId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetStoredPaymentMethodId = false; + + /** **dbarai** */ + public enum TypeEnum { + DBARAI(String.valueOf("dbarai")); + + private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName()); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "TypeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(TypeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetType = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public DBaraiDetails() {} + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId The checkout attempt identifier. + * @return the current {@code DBaraiDetails} instance, allowing for method chaining + */ + public DBaraiDetails checkoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + isSetCheckoutAttemptId = true; // mark as set + return this; + } + + /** + * The checkout attempt identifier. + * + * @return checkoutAttemptId The checkout attempt identifier. + */ + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCheckoutAttemptId() { + return checkoutAttemptId; + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId The checkout attempt identifier. + */ + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + isSetCheckoutAttemptId = true; // mark as set + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @param recurringDetailReference This is the `recurringDetailReference` returned in + * the response when you created the token. + * @return the current {@code DBaraiDetails} instance, allowing for method chaining + * @deprecated since Adyen Checkout API v49 Use `storedPaymentMethodId` instead. + */ + @Deprecated + public DBaraiDetails recurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + isSetRecurringDetailReference = true; // mark as set + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @return recurringDetailReference This is the `recurringDetailReference` returned in + * the response when you created the token. + * @deprecated since Adyen Checkout API v49 Use `storedPaymentMethodId` instead. + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRecurringDetailReference() { + return recurringDetailReference; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @param recurringDetailReference This is the `recurringDetailReference` returned in + * the response when you created the token. + * @deprecated since Adyen Checkout API v49 Use `storedPaymentMethodId` instead. + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + isSetRecurringDetailReference = true; // mark as set + } + + /** + * Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @param sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * @return the current {@code DBaraiDetails} instance, allowing for method chaining + */ + public DBaraiDetails sdkData(String sdkData) { + this.sdkData = sdkData; + isSetSdkData = true; // mark as set + return this; + } + + /** + * Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return sdkData Base64-encoded JSON object containing SDK related parameters required by the + * SDK + */ + @JsonProperty(JSON_PROPERTY_SDK_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSdkData() { + return sdkData; + } + + /** + * Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @param sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + */ + @JsonProperty(JSON_PROPERTY_SDK_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdkData(String sdkData) { + this.sdkData = sdkData; + isSetSdkData = true; // mark as set + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @param storedPaymentMethodId This is the `recurringDetailReference` returned in the + * response when you created the token. + * @return the current {@code DBaraiDetails} instance, allowing for method chaining + */ + public DBaraiDetails storedPaymentMethodId(String storedPaymentMethodId) { + this.storedPaymentMethodId = storedPaymentMethodId; + isSetStoredPaymentMethodId = true; // mark as set + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @return storedPaymentMethodId This is the `recurringDetailReference` returned in the + * response when you created the token. + */ + @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStoredPaymentMethodId() { + return storedPaymentMethodId; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the + * token. + * + * @param storedPaymentMethodId This is the `recurringDetailReference` returned in the + * response when you created the token. + */ + @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoredPaymentMethodId(String storedPaymentMethodId) { + this.storedPaymentMethodId = storedPaymentMethodId; + isSetStoredPaymentMethodId = true; // mark as set + } + + /** + * **dbarai** + * + * @param type **dbarai** + * @return the current {@code DBaraiDetails} instance, allowing for method chaining + */ + public DBaraiDetails type(TypeEnum type) { + this.type = type; + isSetType = true; // mark as set + return this; + } + + /** + * **dbarai** + * + * @return type **dbarai** + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * **dbarai** + * + * @param type **dbarai** + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + isSetType = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public DBaraiDetails includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this DBaraiDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DBaraiDetails dbaraiDetails = (DBaraiDetails) o; + return Objects.equals(this.checkoutAttemptId, dbaraiDetails.checkoutAttemptId) + && Objects.equals(this.isSetCheckoutAttemptId, dbaraiDetails.isSetCheckoutAttemptId) + && Objects.equals(this.recurringDetailReference, dbaraiDetails.recurringDetailReference) + && Objects.equals( + this.isSetRecurringDetailReference, dbaraiDetails.isSetRecurringDetailReference) + && Objects.equals(this.sdkData, dbaraiDetails.sdkData) + && Objects.equals(this.isSetSdkData, dbaraiDetails.isSetSdkData) + && Objects.equals(this.storedPaymentMethodId, dbaraiDetails.storedPaymentMethodId) + && Objects.equals(this.isSetStoredPaymentMethodId, dbaraiDetails.isSetStoredPaymentMethodId) + && Objects.equals(this.type, dbaraiDetails.type) + && Objects.equals(this.isSetType, dbaraiDetails.isSetType); + } + + @Override + public int hashCode() { + return Objects.hash( + checkoutAttemptId, + isSetCheckoutAttemptId, + recurringDetailReference, + isSetRecurringDetailReference, + sdkData, + isSetSdkData, + storedPaymentMethodId, + isSetStoredPaymentMethodId, + type, + isSetType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DBaraiDetails {\n"); + sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n"); + sb.append(" recurringDetailReference: ") + .append(toIndentedString(recurringDetailReference)) + .append("\n"); + sb.append(" sdkData: ").append(toIndentedString(sdkData)).append("\n"); + sb.append(" storedPaymentMethodId: ") + .append(toIndentedString(storedPaymentMethodId)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetCheckoutAttemptId) { + addIfNull(nulls, JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, this.checkoutAttemptId); + } + if (isSetRecurringDetailReference) { + addIfNull(nulls, JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, this.recurringDetailReference); + } + if (isSetSdkData) { + addIfNull(nulls, JSON_PROPERTY_SDK_DATA, this.sdkData); + } + if (isSetStoredPaymentMethodId) { + addIfNull(nulls, JSON_PROPERTY_STORED_PAYMENT_METHOD_ID, this.storedPaymentMethodId); + } + if (isSetType) { + addIfNull(nulls, JSON_PROPERTY_TYPE, this.type); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of DBaraiDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of DBaraiDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to DBaraiDetails + */ + public static DBaraiDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DBaraiDetails.class); + } + + /** + * Convert an instance of DBaraiDetails to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/DefaultErrorResponseEntity.java b/src/main/java/com/adyen/model/checkout/DefaultErrorResponseEntity.java deleted file mode 100644 index a949a9605..000000000 --- a/src/main/java/com/adyen/model/checkout/DefaultErrorResponseEntity.java +++ /dev/null @@ -1,547 +0,0 @@ -/* - * Adyen Checkout API - * - * The version of the OpenAPI document: 72 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.adyen.model.checkout; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.util.*; -import java.util.ArrayList; -import java.util.List; - -/** Standardized error response following RFC-7807 format */ -@JsonPropertyOrder({ - DefaultErrorResponseEntity.JSON_PROPERTY_DETAIL, - DefaultErrorResponseEntity.JSON_PROPERTY_ERROR_CODE, - DefaultErrorResponseEntity.JSON_PROPERTY_INSTANCE, - DefaultErrorResponseEntity.JSON_PROPERTY_INVALID_FIELDS, - DefaultErrorResponseEntity.JSON_PROPERTY_REQUEST_ID, - DefaultErrorResponseEntity.JSON_PROPERTY_STATUS, - DefaultErrorResponseEntity.JSON_PROPERTY_TITLE, - DefaultErrorResponseEntity.JSON_PROPERTY_TYPE -}) -public class DefaultErrorResponseEntity { - public static final String JSON_PROPERTY_DETAIL = "detail"; - private String detail; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetDetail = false; - - public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; - private String errorCode; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetErrorCode = false; - - public static final String JSON_PROPERTY_INSTANCE = "instance"; - private String instance; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetInstance = false; - - public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; - private List invalidFields; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetInvalidFields = false; - - public static final String JSON_PROPERTY_REQUEST_ID = "requestId"; - private String requestId; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetRequestId = false; - - public static final String JSON_PROPERTY_STATUS = "status"; - private Integer status; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetStatus = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetTitle = false; - - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetType = false; - - /** - * Sets whether attributes with null values should be explicitly included in the JSON payload. - * Default is false. - */ - @JsonIgnore private boolean includeNullValues = false; - - public DefaultErrorResponseEntity() {} - - /** - * A human-readable explanation specific to this occurrence of the problem. - * - * @param detail A human-readable explanation specific to this occurrence of the problem. - * @return the current {@code DefaultErrorResponseEntity} instance, allowing for method chaining - */ - public DefaultErrorResponseEntity detail(String detail) { - this.detail = detail; - isSetDetail = true; // mark as set - return this; - } - - /** - * A human-readable explanation specific to this occurrence of the problem. - * - * @return detail A human-readable explanation specific to this occurrence of the problem. - */ - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetail() { - return detail; - } - - /** - * A human-readable explanation specific to this occurrence of the problem. - * - * @param detail A human-readable explanation specific to this occurrence of the problem. - */ - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetail(String detail) { - this.detail = detail; - isSetDetail = true; // mark as set - } - - /** - * Unique business error code. - * - * @param errorCode Unique business error code. - * @return the current {@code DefaultErrorResponseEntity} instance, allowing for method chaining - */ - public DefaultErrorResponseEntity errorCode(String errorCode) { - this.errorCode = errorCode; - isSetErrorCode = true; // mark as set - return this; - } - - /** - * Unique business error code. - * - * @return errorCode Unique business error code. - */ - @JsonProperty(JSON_PROPERTY_ERROR_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getErrorCode() { - return errorCode; - } - - /** - * Unique business error code. - * - * @param errorCode Unique business error code. - */ - @JsonProperty(JSON_PROPERTY_ERROR_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setErrorCode(String errorCode) { - this.errorCode = errorCode; - isSetErrorCode = true; // mark as set - } - - /** - * A URI that identifies the specific occurrence of the problem if applicable. - * - * @param instance A URI that identifies the specific occurrence of the problem if applicable. - * @return the current {@code DefaultErrorResponseEntity} instance, allowing for method chaining - */ - public DefaultErrorResponseEntity instance(String instance) { - this.instance = instance; - isSetInstance = true; // mark as set - return this; - } - - /** - * A URI that identifies the specific occurrence of the problem if applicable. - * - * @return instance A URI that identifies the specific occurrence of the problem if applicable. - */ - @JsonProperty(JSON_PROPERTY_INSTANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInstance() { - return instance; - } - - /** - * A URI that identifies the specific occurrence of the problem if applicable. - * - * @param instance A URI that identifies the specific occurrence of the problem if applicable. - */ - @JsonProperty(JSON_PROPERTY_INSTANCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstance(String instance) { - this.instance = instance; - isSetInstance = true; // mark as set - } - - /** - * Array of fields with validation errors when applicable. - * - * @param invalidFields Array of fields with validation errors when applicable. - * @return the current {@code DefaultErrorResponseEntity} instance, allowing for method chaining - */ - public DefaultErrorResponseEntity invalidFields(List invalidFields) { - this.invalidFields = invalidFields; - isSetInvalidFields = true; // mark as set - return this; - } - - public DefaultErrorResponseEntity addInvalidFieldsItem(InvalidField invalidFieldsItem) { - if (this.invalidFields == null) { - this.invalidFields = new ArrayList<>(); - } - this.invalidFields.add(invalidFieldsItem); - return this; - } - - /** - * Array of fields with validation errors when applicable. - * - * @return invalidFields Array of fields with validation errors when applicable. - */ - @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getInvalidFields() { - return invalidFields; - } - - /** - * Array of fields with validation errors when applicable. - * - * @param invalidFields Array of fields with validation errors when applicable. - */ - @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvalidFields(List invalidFields) { - this.invalidFields = invalidFields; - isSetInvalidFields = true; // mark as set - } - - /** - * The unique reference for the request. - * - * @param requestId The unique reference for the request. - * @return the current {@code DefaultErrorResponseEntity} instance, allowing for method chaining - */ - public DefaultErrorResponseEntity requestId(String requestId) { - this.requestId = requestId; - isSetRequestId = true; // mark as set - return this; - } - - /** - * The unique reference for the request. - * - * @return requestId The unique reference for the request. - */ - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestId() { - return requestId; - } - - /** - * The unique reference for the request. - * - * @param requestId The unique reference for the request. - */ - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestId(String requestId) { - this.requestId = requestId; - isSetRequestId = true; // mark as set - } - - /** - * The HTTP status code. - * - * @param status The HTTP status code. - * @return the current {@code DefaultErrorResponseEntity} instance, allowing for method chaining - */ - public DefaultErrorResponseEntity status(Integer status) { - this.status = status; - isSetStatus = true; // mark as set - return this; - } - - /** - * The HTTP status code. - * - * @return status The HTTP status code. - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getStatus() { - return status; - } - - /** - * The HTTP status code. - * - * @param status The HTTP status code. - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(Integer status) { - this.status = status; - isSetStatus = true; // mark as set - } - - /** - * A short, human-readable summary of the problem type. - * - * @param title A short, human-readable summary of the problem type. - * @return the current {@code DefaultErrorResponseEntity} instance, allowing for method chaining - */ - public DefaultErrorResponseEntity title(String title) { - this.title = title; - isSetTitle = true; // mark as set - return this; - } - - /** - * A short, human-readable summary of the problem type. - * - * @return title A short, human-readable summary of the problem type. - */ - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - /** - * A short, human-readable summary of the problem type. - * - * @param title A short, human-readable summary of the problem type. - */ - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - isSetTitle = true; // mark as set - } - - /** - * A URI that identifies the validation error type. It points to human-readable documentation for - * the problem type. - * - * @param type A URI that identifies the validation error type. It points to human-readable - * documentation for the problem type. - * @return the current {@code DefaultErrorResponseEntity} instance, allowing for method chaining - */ - public DefaultErrorResponseEntity type(String type) { - this.type = type; - isSetType = true; // mark as set - return this; - } - - /** - * A URI that identifies the validation error type. It points to human-readable documentation for - * the problem type. - * - * @return type A URI that identifies the validation error type. It points to human-readable - * documentation for the problem type. - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - /** - * A URI that identifies the validation error type. It points to human-readable documentation for - * the problem type. - * - * @param type A URI that identifies the validation error type. It points to human-readable - * documentation for the problem type. - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - isSetType = true; // mark as set - } - - /** - * Configures whether null values are explicitly serialized in the JSON payload. Default is false. - */ - public DefaultErrorResponseEntity includeNullValues(boolean includeNullValues) { - this.includeNullValues = includeNullValues; - return this; - } - - /** Returns whether null values are explicitly serialized in the JSON payload. */ - public boolean isIncludeNullValues() { - return includeNullValues; - } - - /** - * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. - */ - public void setIncludeNullValues(boolean includeNullValues) { - this.includeNullValues = includeNullValues; - } - - /** Return true if this DefaultErrorResponseEntity object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DefaultErrorResponseEntity defaultErrorResponseEntity = (DefaultErrorResponseEntity) o; - return Objects.equals(this.detail, defaultErrorResponseEntity.detail) - && Objects.equals(this.isSetDetail, defaultErrorResponseEntity.isSetDetail) - && Objects.equals(this.errorCode, defaultErrorResponseEntity.errorCode) - && Objects.equals(this.isSetErrorCode, defaultErrorResponseEntity.isSetErrorCode) - && Objects.equals(this.instance, defaultErrorResponseEntity.instance) - && Objects.equals(this.isSetInstance, defaultErrorResponseEntity.isSetInstance) - && Objects.equals(this.invalidFields, defaultErrorResponseEntity.invalidFields) - && Objects.equals(this.isSetInvalidFields, defaultErrorResponseEntity.isSetInvalidFields) - && Objects.equals(this.requestId, defaultErrorResponseEntity.requestId) - && Objects.equals(this.isSetRequestId, defaultErrorResponseEntity.isSetRequestId) - && Objects.equals(this.status, defaultErrorResponseEntity.status) - && Objects.equals(this.isSetStatus, defaultErrorResponseEntity.isSetStatus) - && Objects.equals(this.title, defaultErrorResponseEntity.title) - && Objects.equals(this.isSetTitle, defaultErrorResponseEntity.isSetTitle) - && Objects.equals(this.type, defaultErrorResponseEntity.type) - && Objects.equals(this.isSetType, defaultErrorResponseEntity.isSetType); - } - - @Override - public int hashCode() { - return Objects.hash( - detail, - isSetDetail, - errorCode, - isSetErrorCode, - instance, - isSetInstance, - invalidFields, - isSetInvalidFields, - requestId, - isSetRequestId, - status, - isSetStatus, - title, - isSetTitle, - type, - isSetType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DefaultErrorResponseEntity {\n"); - sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); - sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); - sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).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 "); - } - - /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ - @JsonInclude(JsonInclude.Include.ALWAYS) - @JsonAnyGetter - public Map getExplicitNulls() { - if (!this.includeNullValues) { - return Collections.emptyMap(); - } - - Map nulls = new HashMap<>(); - - if (isSetDetail) { - addIfNull(nulls, JSON_PROPERTY_DETAIL, this.detail); - } - if (isSetErrorCode) { - addIfNull(nulls, JSON_PROPERTY_ERROR_CODE, this.errorCode); - } - if (isSetInstance) { - addIfNull(nulls, JSON_PROPERTY_INSTANCE, this.instance); - } - if (isSetInvalidFields) { - addIfNull(nulls, JSON_PROPERTY_INVALID_FIELDS, this.invalidFields); - } - if (isSetRequestId) { - addIfNull(nulls, JSON_PROPERTY_REQUEST_ID, this.requestId); - } - if (isSetStatus) { - addIfNull(nulls, JSON_PROPERTY_STATUS, this.status); - } - if (isSetTitle) { - addIfNull(nulls, JSON_PROPERTY_TITLE, this.title); - } - if (isSetType) { - addIfNull(nulls, JSON_PROPERTY_TYPE, this.type); - } - - return nulls; - } - - // add to map when value is null - private void addIfNull(Map map, String key, Object value) { - if (value == null) { - map.put(key, null); - } - } - - /** - * Create an instance of DefaultErrorResponseEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of DefaultErrorResponseEntity - * @throws JsonProcessingException if the JSON string is invalid with respect to - * DefaultErrorResponseEntity - */ - public static DefaultErrorResponseEntity fromJson(String jsonString) - throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, DefaultErrorResponseEntity.class); - } - - /** - * Convert an instance of DefaultErrorResponseEntity to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/model/checkout/Destination.java b/src/main/java/com/adyen/model/checkout/Destination.java index 3f9b8a2f7..2a8ab6509 100644 --- a/src/main/java/com/adyen/model/checkout/Destination.java +++ b/src/main/java/com/adyen/model/checkout/Destination.java @@ -56,12 +56,14 @@ public Destination() {} * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or * three-letter [ISO 3166-1 alpha-3 country * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * - * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters + * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters * **additionalData key:** + * `enhancedSchemeData.destinationCountryCode` * * @param countryCode The two-letter [ISO 3166-1 * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 * alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination - * address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters + * address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters * + * **additionalData key:** `enhancedSchemeData.destinationCountryCode` * @return the current {@code Destination} instance, allowing for method chaining */ public Destination countryCode(String countryCode) { @@ -74,12 +76,14 @@ public Destination countryCode(String countryCode) { * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or * three-letter [ISO 3166-1 alpha-3 country * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * - * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters + * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters * **additionalData key:** + * `enhancedSchemeData.destinationCountryCode` * * @return countryCode The two-letter [ISO 3166-1 * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 * alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination - * address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters + * address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters * + * **additionalData key:** `enhancedSchemeData.destinationCountryCode` */ @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -91,12 +95,14 @@ public String getCountryCode() { * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or * three-letter [ISO 3166-1 alpha-3 country * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * - * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters + * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters * **additionalData key:** + * `enhancedSchemeData.destinationCountryCode` * * @param countryCode The two-letter [ISO 3166-1 * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 * alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination - * address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters + * address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters * + * **additionalData key:** `enhancedSchemeData.destinationCountryCode` */ @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -109,12 +115,13 @@ public void setCountryCode(String countryCode) { * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * * Must not start with a space. * For the US, it must be in five or nine digits format. For * example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B - * 1G5. + * 1G5. * **additionalData key:** `enhancedSchemeData.destinationPostalCode` * * @param postalCode The postal code of the destination address. * Encoding: ASCII * Max length: * 10 characters * Must not start with a space. * For the US, it must be in five or nine * digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits - * format. For example, M4B 1G5. + * format. For example, M4B 1G5. * **additionalData key:** + * `enhancedSchemeData.destinationPostalCode` * @return the current {@code Destination} instance, allowing for method chaining */ public Destination postalCode(String postalCode) { @@ -127,12 +134,13 @@ public Destination postalCode(String postalCode) { * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * * Must not start with a space. * For the US, it must be in five or nine digits format. For * example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B - * 1G5. + * 1G5. * **additionalData key:** `enhancedSchemeData.destinationPostalCode` * * @return postalCode The postal code of the destination address. * Encoding: ASCII * Max length: * 10 characters * Must not start with a space. * For the US, it must be in five or nine * digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits - * format. For example, M4B 1G5. + * format. For example, M4B 1G5. * **additionalData key:** + * `enhancedSchemeData.destinationPostalCode` */ @JsonProperty(JSON_PROPERTY_POSTAL_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -144,12 +152,13 @@ public String getPostalCode() { * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * * Must not start with a space. * For the US, it must be in five or nine digits format. For * example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B - * 1G5. + * 1G5. * **additionalData key:** `enhancedSchemeData.destinationPostalCode` * * @param postalCode The postal code of the destination address. * Encoding: ASCII * Max length: * 10 characters * Must not start with a space. * For the US, it must be in five or nine * digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits - * format. For example, M4B 1G5. + * format. For example, M4B 1G5. * **additionalData key:** + * `enhancedSchemeData.destinationPostalCode` */ @JsonProperty(JSON_PROPERTY_POSTAL_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -160,10 +169,12 @@ public void setPostalCode(String postalCode) { /** * The state or province code of the destination address. * Encoding: ASCII * Max length: 3 - * characters * Must not start with a space. + * characters * Must not start with a space. * **additionalData key:** + * `enhancedSchemeData.destinationStateProvinceCode` * * @param stateOrProvince The state or province code of the destination address. * Encoding: ASCII - * * Max length: 3 characters * Must not start with a space. + * * Max length: 3 characters * Must not start with a space. * **additionalData key:** + * `enhancedSchemeData.destinationStateProvinceCode` * @return the current {@code Destination} instance, allowing for method chaining */ public Destination stateOrProvince(String stateOrProvince) { @@ -174,10 +185,12 @@ public Destination stateOrProvince(String stateOrProvince) { /** * The state or province code of the destination address. * Encoding: ASCII * Max length: 3 - * characters * Must not start with a space. + * characters * Must not start with a space. * **additionalData key:** + * `enhancedSchemeData.destinationStateProvinceCode` * * @return stateOrProvince The state or province code of the destination address. * Encoding: - * ASCII * Max length: 3 characters * Must not start with a space. + * ASCII * Max length: 3 characters * Must not start with a space. * **additionalData key:** + * `enhancedSchemeData.destinationStateProvinceCode` */ @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -187,10 +200,12 @@ public String getStateOrProvince() { /** * The state or province code of the destination address. * Encoding: ASCII * Max length: 3 - * characters * Must not start with a space. + * characters * Must not start with a space. * **additionalData key:** + * `enhancedSchemeData.destinationStateProvinceCode` * * @param stateOrProvince The state or province code of the destination address. * Encoding: ASCII - * * Max length: 3 characters * Must not start with a space. + * * Max length: 3 characters * Must not start with a space. * **additionalData key:** + * `enhancedSchemeData.destinationStateProvinceCode` */ @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java b/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java index ca430805d..df1c19b50 100644 --- a/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java @@ -261,6 +261,22 @@ public DonationPaymentMethod(PayWithGoogleDonations o) { schemas.put("IdealDonations", new GenericType() {}); schemas.put("PayWithGoogleDonations", new GenericType() {}); JSON.registerDescendants(DonationPaymentMethod.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + mappings.put("applepay", ApplePayDonations.class); + mappings.put("card", CardDonations.class); + mappings.put("googlepay", GooglePayDonations.class); + mappings.put("ideal", IdealDonations.class); + mappings.put("networkToken", CardDonations.class); + mappings.put("paywithgoogle", PayWithGoogleDonations.class); + mappings.put("scheme", CardDonations.class); + mappings.put("ApplePayDonations", ApplePayDonations.class); + mappings.put("CardDonations", CardDonations.class); + mappings.put("GooglePayDonations", GooglePayDonations.class); + mappings.put("IdealDonations", IdealDonations.class); + mappings.put("PayWithGoogleDonations", PayWithGoogleDonations.class); + mappings.put("DonationPaymentMethod", DonationPaymentMethod.class); + JSON.registerDiscriminator(DonationPaymentMethod.class, "type", mappings); } @Override diff --git a/src/main/java/com/adyen/model/checkout/EnhancedSchemeData.java b/src/main/java/com/adyen/model/checkout/EnhancedSchemeData.java index a09574079..55eb0b828 100644 --- a/src/main/java/com/adyen/model/checkout/EnhancedSchemeData.java +++ b/src/main/java/com/adyen/model/checkout/EnhancedSchemeData.java @@ -22,7 +22,11 @@ /** EnhancedSchemeData */ @JsonPropertyOrder({ EnhancedSchemeData.JSON_PROPERTY_AIRLINE, - EnhancedSchemeData.JSON_PROPERTY_LEVEL_TWO_THREE + EnhancedSchemeData.JSON_PROPERTY_CAR_RENTAL, + EnhancedSchemeData.JSON_PROPERTY_HEALTHCARE, + EnhancedSchemeData.JSON_PROPERTY_LEVEL_TWO_THREE, + EnhancedSchemeData.JSON_PROPERTY_LODGING, + EnhancedSchemeData.JSON_PROPERTY_TEMPORARY_SERVICES }) public class EnhancedSchemeData { public static final String JSON_PROPERTY_AIRLINE = "airline"; @@ -31,12 +35,36 @@ public class EnhancedSchemeData { /** Mark when the attribute has been explicitly set. */ private boolean isSetAirline = false; + public static final String JSON_PROPERTY_CAR_RENTAL = "carRental"; + private CarRental carRental; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCarRental = false; + + public static final String JSON_PROPERTY_HEALTHCARE = "healthcare"; + private Healthcare healthcare; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetHealthcare = false; + public static final String JSON_PROPERTY_LEVEL_TWO_THREE = "levelTwoThree"; private LevelTwoThree levelTwoThree; /** Mark when the attribute has been explicitly set. */ private boolean isSetLevelTwoThree = false; + public static final String JSON_PROPERTY_LODGING = "lodging"; + private Lodging lodging; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLodging = false; + + public static final String JSON_PROPERTY_TEMPORARY_SERVICES = "temporaryServices"; + private TemporaryServices temporaryServices; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTemporaryServices = false; + /** * Sets whether attributes with null values should be explicitly included in the JSON payload. * Default is false. @@ -80,6 +108,76 @@ public void setAirline(Airline airline) { isSetAirline = true; // mark as set } + /** + * carRental + * + * @param carRental + * @return the current {@code EnhancedSchemeData} instance, allowing for method chaining + */ + public EnhancedSchemeData carRental(CarRental carRental) { + this.carRental = carRental; + isSetCarRental = true; // mark as set + return this; + } + + /** + * Get carRental + * + * @return carRental + */ + @JsonProperty(JSON_PROPERTY_CAR_RENTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CarRental getCarRental() { + return carRental; + } + + /** + * carRental + * + * @param carRental + */ + @JsonProperty(JSON_PROPERTY_CAR_RENTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCarRental(CarRental carRental) { + this.carRental = carRental; + isSetCarRental = true; // mark as set + } + + /** + * healthcare + * + * @param healthcare + * @return the current {@code EnhancedSchemeData} instance, allowing for method chaining + */ + public EnhancedSchemeData healthcare(Healthcare healthcare) { + this.healthcare = healthcare; + isSetHealthcare = true; // mark as set + return this; + } + + /** + * Get healthcare + * + * @return healthcare + */ + @JsonProperty(JSON_PROPERTY_HEALTHCARE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Healthcare getHealthcare() { + return healthcare; + } + + /** + * healthcare + * + * @param healthcare + */ + @JsonProperty(JSON_PROPERTY_HEALTHCARE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHealthcare(Healthcare healthcare) { + this.healthcare = healthcare; + isSetHealthcare = true; // mark as set + } + /** * levelTwoThree * @@ -115,6 +213,76 @@ public void setLevelTwoThree(LevelTwoThree levelTwoThree) { isSetLevelTwoThree = true; // mark as set } + /** + * lodging + * + * @param lodging + * @return the current {@code EnhancedSchemeData} instance, allowing for method chaining + */ + public EnhancedSchemeData lodging(Lodging lodging) { + this.lodging = lodging; + isSetLodging = true; // mark as set + return this; + } + + /** + * Get lodging + * + * @return lodging + */ + @JsonProperty(JSON_PROPERTY_LODGING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Lodging getLodging() { + return lodging; + } + + /** + * lodging + * + * @param lodging + */ + @JsonProperty(JSON_PROPERTY_LODGING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLodging(Lodging lodging) { + this.lodging = lodging; + isSetLodging = true; // mark as set + } + + /** + * temporaryServices + * + * @param temporaryServices + * @return the current {@code EnhancedSchemeData} instance, allowing for method chaining + */ + public EnhancedSchemeData temporaryServices(TemporaryServices temporaryServices) { + this.temporaryServices = temporaryServices; + isSetTemporaryServices = true; // mark as set + return this; + } + + /** + * Get temporaryServices + * + * @return temporaryServices + */ + @JsonProperty(JSON_PROPERTY_TEMPORARY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TemporaryServices getTemporaryServices() { + return temporaryServices; + } + + /** + * temporaryServices + * + * @param temporaryServices + */ + @JsonProperty(JSON_PROPERTY_TEMPORARY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemporaryServices(TemporaryServices temporaryServices) { + this.temporaryServices = temporaryServices; + isSetTemporaryServices = true; // mark as set + } + /** * Configures whether null values are explicitly serialized in the JSON payload. Default is false. */ @@ -147,13 +315,33 @@ public boolean equals(Object o) { EnhancedSchemeData enhancedSchemeData = (EnhancedSchemeData) o; return Objects.equals(this.airline, enhancedSchemeData.airline) && Objects.equals(this.isSetAirline, enhancedSchemeData.isSetAirline) + && Objects.equals(this.carRental, enhancedSchemeData.carRental) + && Objects.equals(this.isSetCarRental, enhancedSchemeData.isSetCarRental) + && Objects.equals(this.healthcare, enhancedSchemeData.healthcare) + && Objects.equals(this.isSetHealthcare, enhancedSchemeData.isSetHealthcare) && Objects.equals(this.levelTwoThree, enhancedSchemeData.levelTwoThree) - && Objects.equals(this.isSetLevelTwoThree, enhancedSchemeData.isSetLevelTwoThree); + && Objects.equals(this.isSetLevelTwoThree, enhancedSchemeData.isSetLevelTwoThree) + && Objects.equals(this.lodging, enhancedSchemeData.lodging) + && Objects.equals(this.isSetLodging, enhancedSchemeData.isSetLodging) + && Objects.equals(this.temporaryServices, enhancedSchemeData.temporaryServices) + && Objects.equals(this.isSetTemporaryServices, enhancedSchemeData.isSetTemporaryServices); } @Override public int hashCode() { - return Objects.hash(airline, isSetAirline, levelTwoThree, isSetLevelTwoThree); + return Objects.hash( + airline, + isSetAirline, + carRental, + isSetCarRental, + healthcare, + isSetHealthcare, + levelTwoThree, + isSetLevelTwoThree, + lodging, + isSetLodging, + temporaryServices, + isSetTemporaryServices); } @Override @@ -161,7 +349,11 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnhancedSchemeData {\n"); sb.append(" airline: ").append(toIndentedString(airline)).append("\n"); + sb.append(" carRental: ").append(toIndentedString(carRental)).append("\n"); + sb.append(" healthcare: ").append(toIndentedString(healthcare)).append("\n"); sb.append(" levelTwoThree: ").append(toIndentedString(levelTwoThree)).append("\n"); + sb.append(" lodging: ").append(toIndentedString(lodging)).append("\n"); + sb.append(" temporaryServices: ").append(toIndentedString(temporaryServices)).append("\n"); sb.append("}"); return sb.toString(); } @@ -189,9 +381,21 @@ public Map getExplicitNulls() { if (isSetAirline) { addIfNull(nulls, JSON_PROPERTY_AIRLINE, this.airline); } + if (isSetCarRental) { + addIfNull(nulls, JSON_PROPERTY_CAR_RENTAL, this.carRental); + } + if (isSetHealthcare) { + addIfNull(nulls, JSON_PROPERTY_HEALTHCARE, this.healthcare); + } if (isSetLevelTwoThree) { addIfNull(nulls, JSON_PROPERTY_LEVEL_TWO_THREE, this.levelTwoThree); } + if (isSetLodging) { + addIfNull(nulls, JSON_PROPERTY_LODGING, this.lodging); + } + if (isSetTemporaryServices) { + addIfNull(nulls, JSON_PROPERTY_TEMPORARY_SERVICES, this.temporaryServices); + } return nulls; } diff --git a/src/main/java/com/adyen/model/checkout/Folio.java b/src/main/java/com/adyen/model/checkout/Folio.java new file mode 100644 index 000000000..d11074770 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/Folio.java @@ -0,0 +1,255 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** Folio */ +@JsonPropertyOrder({Folio.JSON_PROPERTY_CASH_ADVANCES, Folio.JSON_PROPERTY_NUMBER}) +public class Folio { + public static final String JSON_PROPERTY_CASH_ADVANCES = "cashAdvances"; + private Long cashAdvances; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCashAdvances = false; + + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNumber = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public Folio() {} + + /** + * The folio cash advances, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.folioCashAdvances` + * + * @param cashAdvances The folio cash advances, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.folioCashAdvances` + * @return the current {@code Folio} instance, allowing for method chaining + */ + public Folio cashAdvances(Long cashAdvances) { + this.cashAdvances = cashAdvances; + isSetCashAdvances = true; // mark as set + return this; + } + + /** + * The folio cash advances, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.folioCashAdvances` + * + * @return cashAdvances The folio cash advances, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.folioCashAdvances` + */ + @JsonProperty(JSON_PROPERTY_CASH_ADVANCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getCashAdvances() { + return cashAdvances; + } + + /** + * The folio cash advances, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.folioCashAdvances` + * + * @param cashAdvances The folio cash advances, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.folioCashAdvances` + */ + @JsonProperty(JSON_PROPERTY_CASH_ADVANCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashAdvances(Long cashAdvances) { + this.cashAdvances = cashAdvances; + isSetCashAdvances = true; // mark as set + } + + /** + * The card acceptor's internal invoice or billing ID reference number. * Format: Alphanumeric + * * Must not start with a space * Must not contain any special characters * Must not be all + * zeros. * **additionalData key:** `lodging.folioNumber` + * + * @param number The card acceptor's internal invoice or billing ID reference number. * + * Format: Alphanumeric * Must not start with a space * Must not contain any special + * characters * Must not be all zeros. * **additionalData key:** + * `lodging.folioNumber` + * @return the current {@code Folio} instance, allowing for method chaining + */ + public Folio number(String number) { + this.number = number; + isSetNumber = true; // mark as set + return this; + } + + /** + * The card acceptor's internal invoice or billing ID reference number. * Format: Alphanumeric + * * Must not start with a space * Must not contain any special characters * Must not be all + * zeros. * **additionalData key:** `lodging.folioNumber` + * + * @return number The card acceptor's internal invoice or billing ID reference number. * + * Format: Alphanumeric * Must not start with a space * Must not contain any special + * characters * Must not be all zeros. * **additionalData key:** + * `lodging.folioNumber` + */ + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNumber() { + return number; + } + + /** + * The card acceptor's internal invoice or billing ID reference number. * Format: Alphanumeric + * * Must not start with a space * Must not contain any special characters * Must not be all + * zeros. * **additionalData key:** `lodging.folioNumber` + * + * @param number The card acceptor's internal invoice or billing ID reference number. * + * Format: Alphanumeric * Must not start with a space * Must not contain any special + * characters * Must not be all zeros. * **additionalData key:** + * `lodging.folioNumber` + */ + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumber(String number) { + this.number = number; + isSetNumber = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public Folio includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this Folio object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Folio folio = (Folio) o; + return Objects.equals(this.cashAdvances, folio.cashAdvances) + && Objects.equals(this.isSetCashAdvances, folio.isSetCashAdvances) + && Objects.equals(this.number, folio.number) + && Objects.equals(this.isSetNumber, folio.isSetNumber); + } + + @Override + public int hashCode() { + return Objects.hash(cashAdvances, isSetCashAdvances, number, isSetNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Folio {\n"); + sb.append(" cashAdvances: ").append(toIndentedString(cashAdvances)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetCashAdvances) { + addIfNull(nulls, JSON_PROPERTY_CASH_ADVANCES, this.cashAdvances); + } + if (isSetNumber) { + addIfNull(nulls, JSON_PROPERTY_NUMBER, this.number); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of Folio given an JSON string + * + * @param jsonString JSON string + * @return An instance of Folio + * @throws JsonProcessingException if the JSON string is invalid with respect to Folio + */ + public static Folio fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Folio.class); + } + + /** + * Convert an instance of Folio to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/Healthcare.java b/src/main/java/com/adyen/model/checkout/Healthcare.java new file mode 100644 index 000000000..d3f85a2d0 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/Healthcare.java @@ -0,0 +1,444 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** Healthcare */ +@JsonPropertyOrder({ + Healthcare.JSON_PROPERTY_DENTAL_VALUE, + Healthcare.JSON_PROPERTY_OTHER_MEDICAL_VALUE, + Healthcare.JSON_PROPERTY_PRESCRIPTION_VALUE, + Healthcare.JSON_PROPERTY_TOTAL_HEALTHCARE_VALUE, + Healthcare.JSON_PROPERTY_VISION_PRESCRIPTION_VALUE +}) +public class Healthcare { + public static final String JSON_PROPERTY_DENTAL_VALUE = "dentalValue"; + private Long dentalValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDentalValue = false; + + public static final String JSON_PROPERTY_OTHER_MEDICAL_VALUE = "otherMedicalValue"; + private Long otherMedicalValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetOtherMedicalValue = false; + + public static final String JSON_PROPERTY_PRESCRIPTION_VALUE = "prescriptionValue"; + private Long prescriptionValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPrescriptionValue = false; + + public static final String JSON_PROPERTY_TOTAL_HEALTHCARE_VALUE = "totalHealthcareValue"; + private Long totalHealthcareValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTotalHealthcareValue = false; + + public static final String JSON_PROPERTY_VISION_PRESCRIPTION_VALUE = "visionPrescriptionValue"; + private Long visionPrescriptionValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetVisionPrescriptionValue = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public Healthcare() {} + + /** + * The dental amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param dentalValue The dental amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * @return the current {@code Healthcare} instance, allowing for method chaining + */ + public Healthcare dentalValue(Long dentalValue) { + this.dentalValue = dentalValue; + isSetDentalValue = true; // mark as set + return this; + } + + /** + * The dental amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return dentalValue The dental amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_DENTAL_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDentalValue() { + return dentalValue; + } + + /** + * The dental amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param dentalValue The dental amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_DENTAL_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDentalValue(Long dentalValue) { + this.dentalValue = dentalValue; + isSetDentalValue = true; // mark as set + } + + /** + * The other medical amount not covered by the specific categories, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param otherMedicalValue The other medical amount not covered by the specific categories, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * @return the current {@code Healthcare} instance, allowing for method chaining + */ + public Healthcare otherMedicalValue(Long otherMedicalValue) { + this.otherMedicalValue = otherMedicalValue; + isSetOtherMedicalValue = true; // mark as set + return this; + } + + /** + * The other medical amount not covered by the specific categories, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return otherMedicalValue The other medical amount not covered by the specific categories, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_OTHER_MEDICAL_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOtherMedicalValue() { + return otherMedicalValue; + } + + /** + * The other medical amount not covered by the specific categories, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param otherMedicalValue The other medical amount not covered by the specific categories, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_OTHER_MEDICAL_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherMedicalValue(Long otherMedicalValue) { + this.otherMedicalValue = otherMedicalValue; + isSetOtherMedicalValue = true; // mark as set + } + + /** + * The prescription/Rx amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param prescriptionValue The prescription/Rx amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * @return the current {@code Healthcare} instance, allowing for method chaining + */ + public Healthcare prescriptionValue(Long prescriptionValue) { + this.prescriptionValue = prescriptionValue; + isSetPrescriptionValue = true; // mark as set + return this; + } + + /** + * The prescription/Rx amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return prescriptionValue The prescription/Rx amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_PRESCRIPTION_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPrescriptionValue() { + return prescriptionValue; + } + + /** + * The prescription/Rx amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param prescriptionValue The prescription/Rx amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_PRESCRIPTION_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrescriptionValue(Long prescriptionValue) { + this.prescriptionValue = prescriptionValue; + isSetPrescriptionValue = true; // mark as set + } + + /** + * The total healthcare amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param totalHealthcareValue The total healthcare amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * @return the current {@code Healthcare} instance, allowing for method chaining + */ + public Healthcare totalHealthcareValue(Long totalHealthcareValue) { + this.totalHealthcareValue = totalHealthcareValue; + isSetTotalHealthcareValue = true; // mark as set + return this; + } + + /** + * The total healthcare amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return totalHealthcareValue The total healthcare amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_TOTAL_HEALTHCARE_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalHealthcareValue() { + return totalHealthcareValue; + } + + /** + * The total healthcare amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param totalHealthcareValue The total healthcare amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_TOTAL_HEALTHCARE_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalHealthcareValue(Long totalHealthcareValue) { + this.totalHealthcareValue = totalHealthcareValue; + isSetTotalHealthcareValue = true; // mark as set + } + + /** + * The vision/optical prescription amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param visionPrescriptionValue The vision/optical prescription amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * @return the current {@code Healthcare} instance, allowing for method chaining + */ + public Healthcare visionPrescriptionValue(Long visionPrescriptionValue) { + this.visionPrescriptionValue = visionPrescriptionValue; + isSetVisionPrescriptionValue = true; // mark as set + return this; + } + + /** + * The vision/optical prescription amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return visionPrescriptionValue The vision/optical prescription amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_VISION_PRESCRIPTION_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getVisionPrescriptionValue() { + return visionPrescriptionValue; + } + + /** + * The vision/optical prescription amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @param visionPrescriptionValue The vision/optical prescription amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + */ + @JsonProperty(JSON_PROPERTY_VISION_PRESCRIPTION_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVisionPrescriptionValue(Long visionPrescriptionValue) { + this.visionPrescriptionValue = visionPrescriptionValue; + isSetVisionPrescriptionValue = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public Healthcare includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this Healthcare object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Healthcare healthcare = (Healthcare) o; + return Objects.equals(this.dentalValue, healthcare.dentalValue) + && Objects.equals(this.isSetDentalValue, healthcare.isSetDentalValue) + && Objects.equals(this.otherMedicalValue, healthcare.otherMedicalValue) + && Objects.equals(this.isSetOtherMedicalValue, healthcare.isSetOtherMedicalValue) + && Objects.equals(this.prescriptionValue, healthcare.prescriptionValue) + && Objects.equals(this.isSetPrescriptionValue, healthcare.isSetPrescriptionValue) + && Objects.equals(this.totalHealthcareValue, healthcare.totalHealthcareValue) + && Objects.equals(this.isSetTotalHealthcareValue, healthcare.isSetTotalHealthcareValue) + && Objects.equals(this.visionPrescriptionValue, healthcare.visionPrescriptionValue) + && Objects.equals( + this.isSetVisionPrescriptionValue, healthcare.isSetVisionPrescriptionValue); + } + + @Override + public int hashCode() { + return Objects.hash( + dentalValue, + isSetDentalValue, + otherMedicalValue, + isSetOtherMedicalValue, + prescriptionValue, + isSetPrescriptionValue, + totalHealthcareValue, + isSetTotalHealthcareValue, + visionPrescriptionValue, + isSetVisionPrescriptionValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Healthcare {\n"); + sb.append(" dentalValue: ").append(toIndentedString(dentalValue)).append("\n"); + sb.append(" otherMedicalValue: ").append(toIndentedString(otherMedicalValue)).append("\n"); + sb.append(" prescriptionValue: ").append(toIndentedString(prescriptionValue)).append("\n"); + sb.append(" totalHealthcareValue: ") + .append(toIndentedString(totalHealthcareValue)) + .append("\n"); + sb.append(" visionPrescriptionValue: ") + .append(toIndentedString(visionPrescriptionValue)) + .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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetDentalValue) { + addIfNull(nulls, JSON_PROPERTY_DENTAL_VALUE, this.dentalValue); + } + if (isSetOtherMedicalValue) { + addIfNull(nulls, JSON_PROPERTY_OTHER_MEDICAL_VALUE, this.otherMedicalValue); + } + if (isSetPrescriptionValue) { + addIfNull(nulls, JSON_PROPERTY_PRESCRIPTION_VALUE, this.prescriptionValue); + } + if (isSetTotalHealthcareValue) { + addIfNull(nulls, JSON_PROPERTY_TOTAL_HEALTHCARE_VALUE, this.totalHealthcareValue); + } + if (isSetVisionPrescriptionValue) { + addIfNull(nulls, JSON_PROPERTY_VISION_PRESCRIPTION_VALUE, this.visionPrescriptionValue); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of Healthcare given an JSON string + * + * @param jsonString JSON string + * @return An instance of Healthcare + * @throws JsonProcessingException if the JSON string is invalid with respect to Healthcare + */ + public static Healthcare fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Healthcare.class); + } + + /** + * Convert an instance of Healthcare to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/InvalidField.java b/src/main/java/com/adyen/model/checkout/InvalidField.java deleted file mode 100644 index c0bbc91e9..000000000 --- a/src/main/java/com/adyen/model/checkout/InvalidField.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Adyen Checkout API - * - * The version of the OpenAPI document: 72 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.adyen.model.checkout; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.util.*; - -/** InvalidField */ -@JsonPropertyOrder({ - InvalidField.JSON_PROPERTY_MESSAGE, - InvalidField.JSON_PROPERTY_NAME, - InvalidField.JSON_PROPERTY_VALUE -}) -public class InvalidField { - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetMessage = false; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetName = false; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetValue = false; - - /** - * Sets whether attributes with null values should be explicitly included in the JSON payload. - * Default is false. - */ - @JsonIgnore private boolean includeNullValues = false; - - public InvalidField() {} - - /** - * Description of the validation error. - * - * @param message Description of the validation error. - * @return the current {@code InvalidField} instance, allowing for method chaining - */ - public InvalidField message(String message) { - this.message = message; - isSetMessage = true; // mark as set - return this; - } - - /** - * Description of the validation error. - * - * @return message Description of the validation error. - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - /** - * Description of the validation error. - * - * @param message Description of the validation error. - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - isSetMessage = true; // mark as set - } - - /** - * The field that has an invalid value. - * - * @param name The field that has an invalid value. - * @return the current {@code InvalidField} instance, allowing for method chaining - */ - public InvalidField name(String name) { - this.name = name; - isSetName = true; // mark as set - return this; - } - - /** - * The field that has an invalid value. - * - * @return name The field that has an invalid value. - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - /** - * The field that has an invalid value. - * - * @param name The field that has an invalid value. - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - isSetName = true; // mark as set - } - - /** - * The invalid value. - * - * @param value The invalid value. - * @return the current {@code InvalidField} instance, allowing for method chaining - */ - public InvalidField value(String value) { - this.value = value; - isSetValue = true; // mark as set - return this; - } - - /** - * The invalid value. - * - * @return value The invalid value. - */ - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - /** - * The invalid value. - * - * @param value The invalid value. - */ - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - isSetValue = true; // mark as set - } - - /** - * Configures whether null values are explicitly serialized in the JSON payload. Default is false. - */ - public InvalidField includeNullValues(boolean includeNullValues) { - this.includeNullValues = includeNullValues; - return this; - } - - /** Returns whether null values are explicitly serialized in the JSON payload. */ - public boolean isIncludeNullValues() { - return includeNullValues; - } - - /** - * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. - */ - public void setIncludeNullValues(boolean includeNullValues) { - this.includeNullValues = includeNullValues; - } - - /** Return true if this InvalidField object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InvalidField invalidField = (InvalidField) o; - return Objects.equals(this.message, invalidField.message) - && Objects.equals(this.isSetMessage, invalidField.isSetMessage) - && Objects.equals(this.name, invalidField.name) - && Objects.equals(this.isSetName, invalidField.isSetName) - && Objects.equals(this.value, invalidField.value) - && Objects.equals(this.isSetValue, invalidField.isSetValue); - } - - @Override - public int hashCode() { - return Objects.hash(message, isSetMessage, name, isSetName, value, isSetValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InvalidField {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).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 "); - } - - /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ - @JsonInclude(JsonInclude.Include.ALWAYS) - @JsonAnyGetter - public Map getExplicitNulls() { - if (!this.includeNullValues) { - return Collections.emptyMap(); - } - - Map nulls = new HashMap<>(); - - if (isSetMessage) { - addIfNull(nulls, JSON_PROPERTY_MESSAGE, this.message); - } - if (isSetName) { - addIfNull(nulls, JSON_PROPERTY_NAME, this.name); - } - if (isSetValue) { - addIfNull(nulls, JSON_PROPERTY_VALUE, this.value); - } - - return nulls; - } - - // add to map when value is null - private void addIfNull(Map map, String key, Object value) { - if (value == null) { - map.put(key, null); - } - } - - /** - * Create an instance of InvalidField given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvalidField - * @throws JsonProcessingException if the JSON string is invalid with respect to InvalidField - */ - public static InvalidField fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, InvalidField.class); - } - - /** - * Convert an instance of InvalidField to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} diff --git a/src/main/java/com/adyen/model/checkout/ItemDetailLine.java b/src/main/java/com/adyen/model/checkout/ItemDetailLine.java index 272139058..4277367ab 100644 --- a/src/main/java/com/adyen/model/checkout/ItemDetailLine.java +++ b/src/main/java/com/adyen/model/checkout/ItemDetailLine.java @@ -94,7 +94,8 @@ public ItemDetailLine() {} * codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity * codes](https://www.census.gov/naics/) * [NAPCS commodity * codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `enhancedSchemeData.itemDetailLine[N].commodityCode` * * @param commodityCode The code that identifies the item in a standardized commodity coding * scheme. There are different commodity coding schemes: * [UNSPSC commodity @@ -102,7 +103,8 @@ public ItemDetailLine() {} * codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity * codes](https://www.census.gov/naics/) * [NAPCS commodity * codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `enhancedSchemeData.itemDetailLine[N].commodityCode` * @return the current {@code ItemDetailLine} instance, allowing for method chaining */ public ItemDetailLine commodityCode(String commodityCode) { @@ -118,7 +120,8 @@ public ItemDetailLine commodityCode(String commodityCode) { * codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity * codes](https://www.census.gov/naics/) * [NAPCS commodity * codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `enhancedSchemeData.itemDetailLine[N].commodityCode` * * @return commodityCode The code that identifies the item in a standardized commodity coding * scheme. There are different commodity coding schemes: * [UNSPSC commodity @@ -126,7 +129,8 @@ public ItemDetailLine commodityCode(String commodityCode) { * codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity * codes](https://www.census.gov/naics/) * [NAPCS commodity * codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `enhancedSchemeData.itemDetailLine[N].commodityCode` */ @JsonProperty(JSON_PROPERTY_COMMODITY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -141,7 +145,8 @@ public String getCommodityCode() { * codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity * codes](https://www.census.gov/naics/) * [NAPCS commodity * codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `enhancedSchemeData.itemDetailLine[N].commodityCode` * * @param commodityCode The code that identifies the item in a standardized commodity coding * scheme. There are different commodity coding schemes: * [UNSPSC commodity @@ -149,7 +154,8 @@ public String getCommodityCode() { * codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity * codes](https://www.census.gov/naics/) * [NAPCS commodity * codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `enhancedSchemeData.itemDetailLine[N].commodityCode` */ @JsonProperty(JSON_PROPERTY_COMMODITY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -164,14 +170,16 @@ public void setCommodityCode(String commodityCode) { * consist only of common words like \"product\", or \"service\". * Encoding: * ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must * not be all special characters. * Must not start with a space or be all spaces. * Must not be - * all zeros. + * all zeros. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].description` * * @param description A description of the item, that provides details about the purchase. For * Visa transactions with level 3 ESD, the description must not be the same or very similar to * your merchant name, or, consist only of common words like \"product\", or * \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single * character. * Must not be blank. * Must not be all special characters. * Must not start with - * a space or be all spaces. * Must not be all zeros. + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].description` * @return the current {@code ItemDetailLine} instance, allowing for method chaining */ public ItemDetailLine description(String description) { @@ -186,14 +194,16 @@ public ItemDetailLine description(String description) { * consist only of common words like \"product\", or \"service\". * Encoding: * ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must * not be all special characters. * Must not start with a space or be all spaces. * Must not be - * all zeros. + * all zeros. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].description` * * @return description A description of the item, that provides details about the purchase. For * Visa transactions with level 3 ESD, the description must not be the same or very similar to * your merchant name, or, consist only of common words like \"product\", or * \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single * character. * Must not be blank. * Must not be all special characters. * Must not start with - * a space or be all spaces. * Must not be all zeros. + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].description` */ @JsonProperty(JSON_PROPERTY_DESCRIPTION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -207,14 +217,16 @@ public String getDescription() { * consist only of common words like \"product\", or \"service\". * Encoding: * ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must * not be all special characters. * Must not start with a space or be all spaces. * Must not be - * all zeros. + * all zeros. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].description` * * @param description A description of the item, that provides details about the purchase. For * Visa transactions with level 3 ESD, the description must not be the same or very similar to * your merchant name, or, consist only of common words like \"product\", or * \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single * character. * Must not be blank. * Must not be all special characters. * Must not start with - * a space or be all spaces. * Must not be all zeros. + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].description` */ @JsonProperty(JSON_PROPERTY_DESCRIPTION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -226,11 +238,13 @@ public void setDescription(String description) { /** * The discount amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].discountAmount` * * @param discountAmount The discount amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].discountAmount` * @return the current {@code ItemDetailLine} instance, allowing for method chaining */ public ItemDetailLine discountAmount(Long discountAmount) { @@ -242,11 +256,13 @@ public ItemDetailLine discountAmount(Long discountAmount) { /** * The discount amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].discountAmount` * * @return discountAmount The discount amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].discountAmount` */ @JsonProperty(JSON_PROPERTY_DISCOUNT_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -257,11 +273,13 @@ public Long getDiscountAmount() { /** * The discount amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].discountAmount` * * @param discountAmount The discount amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].discountAmount` */ @JsonProperty(JSON_PROPERTY_DISCOUNT_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -273,11 +291,13 @@ public void setDiscountAmount(Long discountAmount) { /** * The product code. Must be a unique product code associated with the item or service. This can * be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * - * Max length: 12 characters + * Max length: 12 characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].productCode` * * @param productCode The product code. Must be a unique product code associated with the item or * service. This can be your unique code for the item, or the manufacturer's product code. - * * Encoding: ASCII. * Max length: 12 characters + * * Encoding: ASCII. * Max length: 12 characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].productCode` * @return the current {@code ItemDetailLine} instance, allowing for method chaining */ public ItemDetailLine productCode(String productCode) { @@ -289,11 +309,13 @@ public ItemDetailLine productCode(String productCode) { /** * The product code. Must be a unique product code associated with the item or service. This can * be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * - * Max length: 12 characters + * Max length: 12 characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].productCode` * * @return productCode The product code. Must be a unique product code associated with the item or * service. This can be your unique code for the item, or the manufacturer's product code. - * * Encoding: ASCII. * Max length: 12 characters + * * Encoding: ASCII. * Max length: 12 characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].productCode` */ @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -304,11 +326,13 @@ public String getProductCode() { /** * The product code. Must be a unique product code associated with the item or service. This can * be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * - * Max length: 12 characters + * Max length: 12 characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].productCode` * * @param productCode The product code. Must be a unique product code associated with the item or * service. This can be your unique code for the item, or the manufacturer's product code. - * * Encoding: ASCII. * Max length: 12 characters + * * Encoding: ASCII. * Max length: 12 characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].productCode` */ @JsonProperty(JSON_PROPERTY_PRODUCT_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -319,10 +343,11 @@ public void setProductCode(String productCode) { /** * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: - * 9999 + * 9999 * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].quantity` * * @param quantity The number of items. Must be an integer greater than zero. * Encoding: Numeric - * * Max value: 9999 + * * Max value: 9999 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].quantity` * @return the current {@code ItemDetailLine} instance, allowing for method chaining */ public ItemDetailLine quantity(Long quantity) { @@ -333,10 +358,11 @@ public ItemDetailLine quantity(Long quantity) { /** * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: - * 9999 + * 9999 * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].quantity` * * @return quantity The number of items. Must be an integer greater than zero. * Encoding: Numeric - * * Max value: 9999 + * * Max value: 9999 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].quantity` */ @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -346,10 +372,11 @@ public Long getQuantity() { /** * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: - * 9999 + * 9999 * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].quantity` * * @param quantity The number of items. Must be an integer greater than zero. * Encoding: Numeric - * * Max value: 9999 + * * Max value: 9999 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].quantity` */ @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -363,14 +390,16 @@ public void setQuantity(Long quantity) { * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means * USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 * ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) - * to learn more about how to calculate the line item total. + * to learn more about how to calculate the line item total. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].totalAmount` * * @param totalAmount The total amount for the line item, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for * level 2/3 * ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) - * to learn more about how to calculate the line item total. + * to learn more about how to calculate the line item total. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].totalAmount` * @return the current {@code ItemDetailLine} instance, allowing for method chaining */ public ItemDetailLine totalAmount(Long totalAmount) { @@ -384,14 +413,16 @@ public ItemDetailLine totalAmount(Long totalAmount) { * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means * USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 * ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) - * to learn more about how to calculate the line item total. + * to learn more about how to calculate the line item total. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].totalAmount` * * @return totalAmount The total amount for the line item, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for * level 2/3 * ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) - * to learn more about how to calculate the line item total. + * to learn more about how to calculate the line item total. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].totalAmount` */ @JsonProperty(JSON_PROPERTY_TOTAL_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -404,14 +435,16 @@ public Long getTotalAmount() { * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means * USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 * ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) - * to learn more about how to calculate the line item total. + * to learn more about how to calculate the line item total. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].totalAmount` * * @param totalAmount The total amount for the line item, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for * level 2/3 * ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) - * to learn more about how to calculate the line item total. + * to learn more about how to calculate the line item total. * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].totalAmount` */ @JsonProperty(JSON_PROPERTY_TOTAL_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -421,10 +454,12 @@ public void setTotalAmount(Long totalAmount) { } /** - * The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters + * The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters * + * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].unitOfMeasure` * * @param unitOfMeasure The unit of measurement for an item. * Encoding: ASCII * Max length: 3 - * characters + * characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].unitOfMeasure` * @return the current {@code ItemDetailLine} instance, allowing for method chaining */ public ItemDetailLine unitOfMeasure(String unitOfMeasure) { @@ -434,10 +469,12 @@ public ItemDetailLine unitOfMeasure(String unitOfMeasure) { } /** - * The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters + * The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters * + * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].unitOfMeasure` * * @return unitOfMeasure The unit of measurement for an item. * Encoding: ASCII * Max length: 3 - * characters + * characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].unitOfMeasure` */ @JsonProperty(JSON_PROPERTY_UNIT_OF_MEASURE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -446,10 +483,12 @@ public String getUnitOfMeasure() { } /** - * The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters + * The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters * + * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].unitOfMeasure` * * @param unitOfMeasure The unit of measurement for an item. * Encoding: ASCII * Max length: 3 - * characters + * characters * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].unitOfMeasure` */ @JsonProperty(JSON_PROPERTY_UNIT_OF_MEASURE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -460,11 +499,13 @@ public void setUnitOfMeasure(String unitOfMeasure) { /** * The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - * * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * + * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].unitPrice` * * @param unitPrice The unit price, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].unitPrice` * @return the current {@code ItemDetailLine} instance, allowing for method chaining */ public ItemDetailLine unitPrice(Long unitPrice) { @@ -475,11 +516,13 @@ public ItemDetailLine unitPrice(Long unitPrice) { /** * The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - * * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * + * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].unitPrice` * * @return unitPrice The unit price, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].unitPrice` */ @JsonProperty(JSON_PROPERTY_UNIT_PRICE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -489,11 +532,13 @@ public Long getUnitPrice() { /** * The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - * * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * + * **additionalData key:** `enhancedSchemeData.itemDetailLine[N].unitPrice` * * @param unitPrice The unit price, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.itemDetailLine[N].unitPrice` */ @JsonProperty(JSON_PROPERTY_UNIT_PRICE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/KlarnaDetails.java b/src/main/java/com/adyen/model/checkout/KlarnaDetails.java index 2703e4e28..beedcec6c 100644 --- a/src/main/java/com/adyen/model/checkout/KlarnaDetails.java +++ b/src/main/java/com/adyen/model/checkout/KlarnaDetails.java @@ -28,6 +28,7 @@ KlarnaDetails.JSON_PROPERTY_BILLING_ADDRESS, KlarnaDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, KlarnaDetails.JSON_PROPERTY_DELIVERY_ADDRESS, + KlarnaDetails.JSON_PROPERTY_MERCHANT_DATA, KlarnaDetails.JSON_PROPERTY_PERSONAL_DETAILS, KlarnaDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, KlarnaDetails.JSON_PROPERTY_SDK_DATA, @@ -54,6 +55,12 @@ public class KlarnaDetails { /** Mark when the attribute has been explicitly set. */ private boolean isSetDeliveryAddress = false; + public static final String JSON_PROPERTY_MERCHANT_DATA = "merchantData"; + private String merchantData; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMerchantData = false; + public static final String JSON_PROPERTY_PERSONAL_DETAILS = "personalDetails"; private String personalDetails; @@ -255,6 +262,44 @@ public void setDeliveryAddress(String deliveryAddress) { isSetDeliveryAddress = true; // mark as set } + /** + * Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Klarna at authorization. + * + * @param merchantData Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Klarna + * at authorization. + * @return the current {@code KlarnaDetails} instance, allowing for method chaining + */ + public KlarnaDetails merchantData(String merchantData) { + this.merchantData = merchantData; + isSetMerchantData = true; // mark as set + return this; + } + + /** + * Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Klarna at authorization. + * + * @return merchantData Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Klarna + * at authorization. + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMerchantData() { + return merchantData; + } + + /** + * Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Klarna at authorization. + * + * @param merchantData Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Klarna + * at authorization. + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantData(String merchantData) { + this.merchantData = merchantData; + isSetMerchantData = true; // mark as set + } + /** * Shopper name, date of birth, phone number, and email address. * @@ -520,6 +565,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetCheckoutAttemptId, klarnaDetails.isSetCheckoutAttemptId) && Objects.equals(this.deliveryAddress, klarnaDetails.deliveryAddress) && Objects.equals(this.isSetDeliveryAddress, klarnaDetails.isSetDeliveryAddress) + && Objects.equals(this.merchantData, klarnaDetails.merchantData) + && Objects.equals(this.isSetMerchantData, klarnaDetails.isSetMerchantData) && Objects.equals(this.personalDetails, klarnaDetails.personalDetails) && Objects.equals(this.isSetPersonalDetails, klarnaDetails.isSetPersonalDetails) && Objects.equals(this.recurringDetailReference, klarnaDetails.recurringDetailReference) @@ -544,6 +591,8 @@ public int hashCode() { isSetCheckoutAttemptId, deliveryAddress, isSetDeliveryAddress, + merchantData, + isSetMerchantData, personalDetails, isSetPersonalDetails, recurringDetailReference, @@ -565,6 +614,7 @@ public String toString() { sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n"); sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n"); sb.append(" deliveryAddress: ").append(toIndentedString(deliveryAddress)).append("\n"); + sb.append(" merchantData: ").append(toIndentedString(merchantData)).append("\n"); sb.append(" personalDetails: ").append(toIndentedString(personalDetails)).append("\n"); sb.append(" recurringDetailReference: ") .append(toIndentedString(recurringDetailReference)) @@ -608,6 +658,9 @@ public Map getExplicitNulls() { if (isSetDeliveryAddress) { addIfNull(nulls, JSON_PROPERTY_DELIVERY_ADDRESS, this.deliveryAddress); } + if (isSetMerchantData) { + addIfNull(nulls, JSON_PROPERTY_MERCHANT_DATA, this.merchantData); + } if (isSetPersonalDetails) { addIfNull(nulls, JSON_PROPERTY_PERSONAL_DETAILS, this.personalDetails); } diff --git a/src/main/java/com/adyen/model/checkout/Leg.java b/src/main/java/com/adyen/model/checkout/Leg.java index 53be21565..b0d5ddad3 100644 --- a/src/main/java/com/adyen/model/checkout/Leg.java +++ b/src/main/java/com/adyen/model/checkout/Leg.java @@ -99,12 +99,14 @@ public Leg() {} * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that * identifies the carrier. This field is required if the airline data includes leg details. * * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start - * with a space or be all spaces. * Must not be all zeros. + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].carrier_code` * * @param carrierCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter * accounting code (PAX) that identifies the carrier. This field is required if the airline * data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: - * 2 characters * Must not start with a space or be all spaces. * Must not be all zeros. + * 2 characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].carrier_code` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg carrierCode(String carrierCode) { @@ -117,12 +119,14 @@ public Leg carrierCode(String carrierCode) { * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that * identifies the carrier. This field is required if the airline data includes leg details. * * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start - * with a space or be all spaces. * Must not be all zeros. + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].carrier_code` * * @return carrierCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter * accounting code (PAX) that identifies the carrier. This field is required if the airline * data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: - * 2 characters * Must not start with a space or be all spaces. * Must not be all zeros. + * 2 characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].carrier_code` */ @JsonProperty(JSON_PROPERTY_CARRIER_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -134,12 +138,14 @@ public String getCarrierCode() { * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that * identifies the carrier. This field is required if the airline data includes leg details. * * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start - * with a space or be all spaces. * Must not be all zeros. + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].carrier_code` * * @param carrierCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter * accounting code (PAX) that identifies the carrier. This field is required if the airline * data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: - * 2 characters * Must not start with a space or be all spaces. * Must not be all zeros. + * 2 characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].carrier_code` */ @JsonProperty(JSON_PROPERTY_CARRIER_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -152,11 +158,13 @@ public void setCarrierCode(String carrierCode) { * A one-letter travel class identifier. The following are common: * F: first class * J: business * class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * * maxLength: 1 character * Must not start with a space or be all spaces. * Must not be all zeros. + * * **additionalData key:** `airline.leg[N].class_of_travel` * * @param classOfTravel A one-letter travel class identifier. The following are common: * F: first * class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * * minLength: 1 character * maxLength: 1 character * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].class_of_travel` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg classOfTravel(String classOfTravel) { @@ -169,11 +177,13 @@ public Leg classOfTravel(String classOfTravel) { * A one-letter travel class identifier. The following are common: * F: first class * J: business * class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * * maxLength: 1 character * Must not start with a space or be all spaces. * Must not be all zeros. + * * **additionalData key:** `airline.leg[N].class_of_travel` * * @return classOfTravel A one-letter travel class identifier. The following are common: * F: * first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * * minLength: 1 character * maxLength: 1 character * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].class_of_travel` */ @JsonProperty(JSON_PROPERTY_CLASS_OF_TRAVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -185,11 +195,13 @@ public String getClassOfTravel() { * A one-letter travel class identifier. The following are common: * F: first class * J: business * class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * * maxLength: 1 character * Must not start with a space or be all spaces. * Must not be all zeros. + * * **additionalData key:** `airline.leg[N].class_of_travel` * * @param classOfTravel A one-letter travel class identifier. The following are common: * F: first * class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * * minLength: 1 character * maxLength: 1 character * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].class_of_travel` */ @JsonProperty(JSON_PROPERTY_CLASS_OF_TRAVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -200,10 +212,12 @@ public void setClassOfTravel(String classOfTravel) { /** * Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use local time of departure - * airport. * minLength: 16 characters * maxLength: 16 characters + * airport. * minLength: 16 characters * maxLength: 16 characters * **additionalData key:** + * `airline.leg[N].date_of_travel` * * @param dateOfTravel Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use local - * time of departure airport. * minLength: 16 characters * maxLength: 16 characters + * time of departure airport. * minLength: 16 characters * maxLength: 16 characters * + * **additionalData key:** `airline.leg[N].date_of_travel` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg dateOfTravel(OffsetDateTime dateOfTravel) { @@ -214,10 +228,12 @@ public Leg dateOfTravel(OffsetDateTime dateOfTravel) { /** * Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use local time of departure - * airport. * minLength: 16 characters * maxLength: 16 characters + * airport. * minLength: 16 characters * maxLength: 16 characters * **additionalData key:** + * `airline.leg[N].date_of_travel` * * @return dateOfTravel Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use - * local time of departure airport. * minLength: 16 characters * maxLength: 16 characters + * local time of departure airport. * minLength: 16 characters * maxLength: 16 characters * + * **additionalData key:** `airline.leg[N].date_of_travel` */ @JsonProperty(JSON_PROPERTY_DATE_OF_TRAVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -227,10 +243,12 @@ public OffsetDateTime getDateOfTravel() { /** * Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use local time of departure - * airport. * minLength: 16 characters * maxLength: 16 characters + * airport. * minLength: 16 characters * maxLength: 16 characters * **additionalData key:** + * `airline.leg[N].date_of_travel` * * @param dateOfTravel Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use local - * time of departure airport. * minLength: 16 characters * maxLength: 16 characters + * time of departure airport. * minLength: 16 characters * maxLength: 16 characters * + * **additionalData key:** `airline.leg[N].date_of_travel` */ @JsonProperty(JSON_PROPERTY_DATE_OF_TRAVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -243,13 +261,14 @@ public void setDateOfTravel(OffsetDateTime dateOfTravel) { * The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the * departure airport. This field is required if the airline data includes leg details. * Encoding: * ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `airline.leg[N].depart_airport` * * @param departureAirportCode The [IATA](https://www.iata.org/services/pages/codes.aspx) * three-letter airport code of the departure airport. This field is required if the airline * data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 * characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must - * not be all zeros. + * not be all zeros. * **additionalData key:** `airline.leg[N].depart_airport` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg departureAirportCode(String departureAirportCode) { @@ -262,13 +281,14 @@ public Leg departureAirportCode(String departureAirportCode) { * The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the * departure airport. This field is required if the airline data includes leg details. * Encoding: * ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `airline.leg[N].depart_airport` * * @return departureAirportCode The [IATA](https://www.iata.org/services/pages/codes.aspx) * three-letter airport code of the departure airport. This field is required if the airline * data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 * characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must - * not be all zeros. + * not be all zeros. * **additionalData key:** `airline.leg[N].depart_airport` */ @JsonProperty(JSON_PROPERTY_DEPARTURE_AIRPORT_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -280,13 +300,14 @@ public String getDepartureAirportCode() { * The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the * departure airport. This field is required if the airline data includes leg details. * Encoding: * ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `airline.leg[N].depart_airport` * * @param departureAirportCode The [IATA](https://www.iata.org/services/pages/codes.aspx) * three-letter airport code of the departure airport. This field is required if the airline * data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 * characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must - * not be all zeros. + * not be all zeros. * **additionalData key:** `airline.leg[N].depart_airport` */ @JsonProperty(JSON_PROPERTY_DEPARTURE_AIRPORT_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -298,11 +319,13 @@ public void setDepartureAirportCode(String departureAirportCode) { /** * The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 * maxLength: 11 * Must not be all zeros. + * minLength: 1 * maxLength: 11 * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].depart_tax` * * @param departureTax The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) * charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * - * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros. + * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].depart_tax` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg departureTax(Long departureTax) { @@ -314,11 +337,13 @@ public Leg departureTax(Long departureTax) { /** * The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 * maxLength: 11 * Must not be all zeros. + * minLength: 1 * maxLength: 11 * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].depart_tax` * * @return departureTax The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) * charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * - * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros. + * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].depart_tax` */ @JsonProperty(JSON_PROPERTY_DEPARTURE_TAX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -329,11 +354,13 @@ public Long getDepartureTax() { /** * The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * - * minLength: 1 * maxLength: 11 * Must not be all zeros. + * minLength: 1 * maxLength: 11 * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].depart_tax` * * @param departureTax The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) * charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * - * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros. + * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].depart_tax` */ @JsonProperty(JSON_PROPERTY_DEPARTURE_TAX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -346,13 +373,14 @@ public void setDepartureTax(Long departureTax) { * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the * destination airport. This field is required if the airline data includes leg details. * * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].destination_code` * * @param destinationAirportCode The [IATA](https://www.iata.org/services/pages/codes.aspx) * 3-letter airport code of the destination airport. This field is required if the airline * data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 * characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must - * not be all zeros. + * not be all zeros. * **additionalData key:** `airline.leg[N].destination_code` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg destinationAirportCode(String destinationAirportCode) { @@ -365,13 +393,14 @@ public Leg destinationAirportCode(String destinationAirportCode) { * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the * destination airport. This field is required if the airline data includes leg details. * * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].destination_code` * * @return destinationAirportCode The [IATA](https://www.iata.org/services/pages/codes.aspx) * 3-letter airport code of the destination airport. This field is required if the airline * data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 * characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must - * not be all zeros. + * not be all zeros. * **additionalData key:** `airline.leg[N].destination_code` */ @JsonProperty(JSON_PROPERTY_DESTINATION_AIRPORT_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -383,13 +412,14 @@ public String getDestinationAirportCode() { * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the * destination airport. This field is required if the airline data includes leg details. * * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.leg[N].destination_code` * * @param destinationAirportCode The [IATA](https://www.iata.org/services/pages/codes.aspx) * 3-letter airport code of the destination airport. This field is required if the airline * data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 * characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must - * not be all zeros. + * not be all zeros. * **additionalData key:** `airline.leg[N].destination_code` */ @JsonProperty(JSON_PROPERTY_DESTINATION_AIRPORT_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -401,11 +431,13 @@ public void setDestinationAirportCode(String destinationAirportCode) { /** * The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].fare_base_code` * * @param fareBasisCode The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), * alphanumeric. * minLength: 1 character * maxLength: 15 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].fare_base_code` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg fareBasisCode(String fareBasisCode) { @@ -417,11 +449,13 @@ public Leg fareBasisCode(String fareBasisCode) { /** * The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].fare_base_code` * * @return fareBasisCode The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), * alphanumeric. * minLength: 1 character * maxLength: 15 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].fare_base_code` */ @JsonProperty(JSON_PROPERTY_FARE_BASIS_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -432,11 +466,13 @@ public String getFareBasisCode() { /** * The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all - * spaces. * Must not be all zeros. + * spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].fare_base_code` * * @param fareBasisCode The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), * alphanumeric. * minLength: 1 character * maxLength: 15 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].fare_base_code` */ @JsonProperty(JSON_PROPERTY_FARE_BASIS_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -447,10 +483,12 @@ public void setFareBasisCode(String fareBasisCode) { /** * The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not start with - * a space or be all spaces. * Must not be all zeros. + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].flight_number` * * @param flightNumber The flight identifier. * minLength: 1 character * maxLength: 5 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `airline.leg[N].flight_number` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg flightNumber(String flightNumber) { @@ -461,10 +499,12 @@ public Leg flightNumber(String flightNumber) { /** * The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not start with - * a space or be all spaces. * Must not be all zeros. + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].flight_number` * * @return flightNumber The flight identifier. * minLength: 1 character * maxLength: 5 characters - * * Must not start with a space or be all spaces. * Must not be all zeros. + * * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `airline.leg[N].flight_number` */ @JsonProperty(JSON_PROPERTY_FLIGHT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -474,10 +514,12 @@ public String getFlightNumber() { /** * The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not start with - * a space or be all spaces. * Must not be all zeros. + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.leg[N].flight_number` * * @param flightNumber The flight identifier. * minLength: 1 character * maxLength: 5 characters * - * Must not start with a space or be all spaces. * Must not be all zeros. + * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `airline.leg[N].flight_number` */ @JsonProperty(JSON_PROPERTY_FLIGHT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -489,11 +531,13 @@ public void setFlightNumber(String flightNumber) { /** * A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a * space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: - * ASCII * minLength: 1 character * maxLength: 1 character + * ASCII * minLength: 1 character * maxLength: 1 character * **additionalData key:** + * `airline.leg[N].stop_over_code` * * @param stopOverCode A one-letter code that indicates whether the passenger is entitled to make * a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they - * are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character + * are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * + * **additionalData key:** `airline.leg[N].stop_over_code` * @return the current {@code Leg} instance, allowing for method chaining */ public Leg stopOverCode(String stopOverCode) { @@ -505,11 +549,13 @@ public Leg stopOverCode(String stopOverCode) { /** * A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a * space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: - * ASCII * minLength: 1 character * maxLength: 1 character + * ASCII * minLength: 1 character * maxLength: 1 character * **additionalData key:** + * `airline.leg[N].stop_over_code` * * @return stopOverCode A one-letter code that indicates whether the passenger is entitled to make * a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they - * are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character + * are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * + * **additionalData key:** `airline.leg[N].stop_over_code` */ @JsonProperty(JSON_PROPERTY_STOP_OVER_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -520,11 +566,13 @@ public String getStopOverCode() { /** * A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a * space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: - * ASCII * minLength: 1 character * maxLength: 1 character + * ASCII * minLength: 1 character * maxLength: 1 character * **additionalData key:** + * `airline.leg[N].stop_over_code` * * @param stopOverCode A one-letter code that indicates whether the passenger is entitled to make * a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they - * are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character + * are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * + * **additionalData key:** `airline.leg[N].stop_over_code` */ @JsonProperty(JSON_PROPERTY_STOP_OVER_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/LevelTwoThree.java b/src/main/java/com/adyen/model/checkout/LevelTwoThree.java index 6b4b69e58..05a016b86 100644 --- a/src/main/java/com/adyen/model/checkout/LevelTwoThree.java +++ b/src/main/java/com/adyen/model/checkout/LevelTwoThree.java @@ -92,11 +92,13 @@ public LevelTwoThree() {} /** * The reference number to identify the customer and their order. * Format: ASCII * Max length: 25 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.customerReference` * * @param customerReferenceNumber The reference number to identify the customer and their order. * * Format: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. * - * Must not be all zeros. + * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.customerReference` * @return the current {@code LevelTwoThree} instance, allowing for method chaining */ public LevelTwoThree customerReferenceNumber(String customerReferenceNumber) { @@ -107,11 +109,13 @@ public LevelTwoThree customerReferenceNumber(String customerReferenceNumber) { /** * The reference number to identify the customer and their order. * Format: ASCII * Max length: 25 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.customerReference` * * @return customerReferenceNumber The reference number to identify the customer and their order. * * Format: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. - * * Must not be all zeros. + * * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.customerReference` */ @JsonProperty(JSON_PROPERTY_CUSTOMER_REFERENCE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -121,11 +125,13 @@ public String getCustomerReferenceNumber() { /** * The reference number to identify the customer and their order. * Format: ASCII * Max length: 25 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.customerReference` * * @param customerReferenceNumber The reference number to identify the customer and their order. * * Format: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. * - * Must not be all zeros. + * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.customerReference` */ @JsonProperty(JSON_PROPERTY_CUSTOMER_REFERENCE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -172,11 +178,13 @@ public void setDestination(Destination destination) { /** * The duty tax amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.dutyAmount` * * @param dutyAmount The duty tax amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.dutyAmount` * @return the current {@code LevelTwoThree} instance, allowing for method chaining */ public LevelTwoThree dutyAmount(Long dutyAmount) { @@ -188,11 +196,13 @@ public LevelTwoThree dutyAmount(Long dutyAmount) { /** * The duty tax amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.dutyAmount` * * @return dutyAmount The duty tax amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.dutyAmount` */ @JsonProperty(JSON_PROPERTY_DUTY_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -203,11 +213,13 @@ public Long getDutyAmount() { /** * The duty tax amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.dutyAmount` * * @param dutyAmount The duty tax amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.dutyAmount` */ @JsonProperty(JSON_PROPERTY_DUTY_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -219,11 +231,13 @@ public void setDutyAmount(Long dutyAmount) { /** * The shipping amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.freightAmount` * * @param freightAmount The shipping amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.freightAmount` * @return the current {@code LevelTwoThree} instance, allowing for method chaining */ public LevelTwoThree freightAmount(Long freightAmount) { @@ -235,11 +249,13 @@ public LevelTwoThree freightAmount(Long freightAmount) { /** * The shipping amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.freightAmount` * * @return freightAmount The shipping amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.freightAmount` */ @JsonProperty(JSON_PROPERTY_FREIGHT_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -250,11 +266,13 @@ public Long getFreightAmount() { /** * The shipping amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means - * USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.freightAmount` * * @param freightAmount The shipping amount, in [minor * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 - * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.freightAmount` */ @JsonProperty(JSON_PROPERTY_FREIGHT_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -308,10 +326,12 @@ public void setItemDetailLines(List itemDetailLines) { /** * The date of the order. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO - * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.orderDate` * * @param orderDate The date of the order. * Min Length: 10 characters * Max Length: 10 characters - * * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData + * key:** `enhancedSchemeData.orderDate` * @return the current {@code LevelTwoThree} instance, allowing for method chaining */ public LevelTwoThree orderDate(LocalDate orderDate) { @@ -322,10 +342,12 @@ public LevelTwoThree orderDate(LocalDate orderDate) { /** * The date of the order. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO - * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.orderDate` * * @return orderDate The date of the order. * Min Length: 10 characters * Max Length: 10 - * characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `enhancedSchemeData.orderDate` */ @JsonProperty(JSON_PROPERTY_ORDER_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -335,10 +357,12 @@ public LocalDate getOrderDate() { /** * The date of the order. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO - * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.orderDate` * * @param orderDate The date of the order. * Min Length: 10 characters * Max Length: 10 characters - * * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData + * key:** `enhancedSchemeData.orderDate` */ @JsonProperty(JSON_PROPERTY_ORDER_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -350,12 +374,14 @@ public void setOrderDate(LocalDate orderDate) { /** * The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: * 10 characters * For the US, it must be in five or nine digits format. For example, 10001 or - * 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. + * 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. * + * **additionalData key:** `enhancedSchemeData.shipFromPostalCode` * * @param shipFromPostalCode The postal code of the address where the item is shipped from. * * Encoding: ASCII * Max length: 10 characters * For the US, it must be in five or nine digits * format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For - * example, M4B 1G5. + * example, M4B 1G5. * **additionalData key:** + * `enhancedSchemeData.shipFromPostalCode` * @return the current {@code LevelTwoThree} instance, allowing for method chaining */ public LevelTwoThree shipFromPostalCode(String shipFromPostalCode) { @@ -367,12 +393,14 @@ public LevelTwoThree shipFromPostalCode(String shipFromPostalCode) { /** * The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: * 10 characters * For the US, it must be in five or nine digits format. For example, 10001 or - * 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. + * 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. * + * **additionalData key:** `enhancedSchemeData.shipFromPostalCode` * * @return shipFromPostalCode The postal code of the address where the item is shipped from. * * Encoding: ASCII * Max length: 10 characters * For the US, it must be in five or nine digits * format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For - * example, M4B 1G5. + * example, M4B 1G5. * **additionalData key:** + * `enhancedSchemeData.shipFromPostalCode` */ @JsonProperty(JSON_PROPERTY_SHIP_FROM_POSTAL_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -383,12 +411,14 @@ public String getShipFromPostalCode() { /** * The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: * 10 characters * For the US, it must be in five or nine digits format. For example, 10001 or - * 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. + * 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. * + * **additionalData key:** `enhancedSchemeData.shipFromPostalCode` * * @param shipFromPostalCode The postal code of the address where the item is shipped from. * * Encoding: ASCII * Max length: 10 characters * For the US, it must be in five or nine digits * format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For - * example, M4B 1G5. + * example, M4B 1G5. * **additionalData key:** + * `enhancedSchemeData.shipFromPostalCode` */ @JsonProperty(JSON_PROPERTY_SHIP_FROM_POSTAL_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -402,13 +432,15 @@ public void setShipFromPostalCode(String shipFromPostalCode) { * amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), * in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * For L2 data: must not be - * all zeroes. * For L3 data: can be zero. + * all zeroes. * For L3 data: can be zero. * **additionalData key:** + * `enhancedSchemeData.totalTaxAmount` * * @param totalTaxAmount The amount of state or provincial [tax included in the total transaction * amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), * in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For * example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * For L2 data: - * must not be all zeroes. * For L3 data: can be zero. + * must not be all zeroes. * For L3 data: can be zero. * **additionalData key:** + * `enhancedSchemeData.totalTaxAmount` * @return the current {@code LevelTwoThree} instance, allowing for method chaining */ public LevelTwoThree totalTaxAmount(Long totalTaxAmount) { @@ -422,13 +454,15 @@ public LevelTwoThree totalTaxAmount(Long totalTaxAmount) { * amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), * in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * For L2 data: must not be - * all zeroes. * For L3 data: can be zero. + * all zeroes. * For L3 data: can be zero. * **additionalData key:** + * `enhancedSchemeData.totalTaxAmount` * * @return totalTaxAmount The amount of state or provincial [tax included in the total transaction * amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), * in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For * example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * For L2 data: - * must not be all zeroes. * For L3 data: can be zero. + * must not be all zeroes. * For L3 data: can be zero. * **additionalData key:** + * `enhancedSchemeData.totalTaxAmount` */ @JsonProperty(JSON_PROPERTY_TOTAL_TAX_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -441,13 +475,15 @@ public Long getTotalTaxAmount() { * amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), * in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * For L2 data: must not be - * all zeroes. * For L3 data: can be zero. + * all zeroes. * For L3 data: can be zero. * **additionalData key:** + * `enhancedSchemeData.totalTaxAmount` * * @param totalTaxAmount The amount of state or provincial [tax included in the total transaction * amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), * in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For * example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * For L2 data: - * must not be all zeroes. * For L3 data: can be zero. + * must not be all zeroes. * For L3 data: can be zero. * **additionalData key:** + * `enhancedSchemeData.totalTaxAmount` */ @JsonProperty(JSON_PROPERTY_TOTAL_TAX_AMOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/LineItem.java b/src/main/java/com/adyen/model/checkout/LineItem.java index d9f77a7fc..f9ba85b3a 100644 --- a/src/main/java/com/adyen/model/checkout/LineItem.java +++ b/src/main/java/com/adyen/model/checkout/LineItem.java @@ -34,10 +34,17 @@ LineItem.JSON_PROPERTY_PRODUCT_URL, LineItem.JSON_PROPERTY_QUANTITY, LineItem.JSON_PROPERTY_RECEIVER_EMAIL, + LineItem.JSON_PROPERTY_RETURN_SHIPPING_COMPANY, + LineItem.JSON_PROPERTY_RETURN_TRACKING_NUMBER, + LineItem.JSON_PROPERTY_RETURN_TRACKING_URI, + LineItem.JSON_PROPERTY_SHIPPING_COMPANY, + LineItem.JSON_PROPERTY_SHIPPING_METHOD, LineItem.JSON_PROPERTY_SIZE, LineItem.JSON_PROPERTY_SKU, LineItem.JSON_PROPERTY_TAX_AMOUNT, LineItem.JSON_PROPERTY_TAX_PERCENTAGE, + LineItem.JSON_PROPERTY_TRACKING_NUMBER, + LineItem.JSON_PROPERTY_TRACKING_URI, LineItem.JSON_PROPERTY_UPC }) public class LineItem { @@ -119,6 +126,36 @@ public class LineItem { /** Mark when the attribute has been explicitly set. */ private boolean isSetReceiverEmail = false; + public static final String JSON_PROPERTY_RETURN_SHIPPING_COMPANY = "returnShippingCompany"; + private String returnShippingCompany; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReturnShippingCompany = false; + + public static final String JSON_PROPERTY_RETURN_TRACKING_NUMBER = "returnTrackingNumber"; + private String returnTrackingNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReturnTrackingNumber = false; + + public static final String JSON_PROPERTY_RETURN_TRACKING_URI = "returnTrackingUri"; + private String returnTrackingUri; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReturnTrackingUri = false; + + public static final String JSON_PROPERTY_SHIPPING_COMPANY = "shippingCompany"; + private String shippingCompany; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetShippingCompany = false; + + public static final String JSON_PROPERTY_SHIPPING_METHOD = "shippingMethod"; + private String shippingMethod; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetShippingMethod = false; + public static final String JSON_PROPERTY_SIZE = "size"; private String size; @@ -143,6 +180,18 @@ public class LineItem { /** Mark when the attribute has been explicitly set. */ private boolean isSetTaxPercentage = false; + public static final String JSON_PROPERTY_TRACKING_NUMBER = "trackingNumber"; + private String trackingNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTrackingNumber = false; + + public static final String JSON_PROPERTY_TRACKING_URI = "trackingUri"; + private String trackingUri; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTrackingUri = false; + public static final String JSON_PROPERTY_UPC = "upc"; private String upc; @@ -627,6 +676,181 @@ public void setReceiverEmail(String receiverEmail) { isSetReceiverEmail = true; // mark as set } + /** + * Shipping company handling the return of the item. + * + * @param returnShippingCompany Shipping company handling the return of the item. + * @return the current {@code LineItem} instance, allowing for method chaining + */ + public LineItem returnShippingCompany(String returnShippingCompany) { + this.returnShippingCompany = returnShippingCompany; + isSetReturnShippingCompany = true; // mark as set + return this; + } + + /** + * Shipping company handling the return of the item. + * + * @return returnShippingCompany Shipping company handling the return of the item. + */ + @JsonProperty(JSON_PROPERTY_RETURN_SHIPPING_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReturnShippingCompany() { + return returnShippingCompany; + } + + /** + * Shipping company handling the return of the item. + * + * @param returnShippingCompany Shipping company handling the return of the item. + */ + @JsonProperty(JSON_PROPERTY_RETURN_SHIPPING_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnShippingCompany(String returnShippingCompany) { + this.returnShippingCompany = returnShippingCompany; + isSetReturnShippingCompany = true; // mark as set + } + + /** + * Tracking number for the return of the item. + * + * @param returnTrackingNumber Tracking number for the return of the item. + * @return the current {@code LineItem} instance, allowing for method chaining + */ + public LineItem returnTrackingNumber(String returnTrackingNumber) { + this.returnTrackingNumber = returnTrackingNumber; + isSetReturnTrackingNumber = true; // mark as set + return this; + } + + /** + * Tracking number for the return of the item. + * + * @return returnTrackingNumber Tracking number for the return of the item. + */ + @JsonProperty(JSON_PROPERTY_RETURN_TRACKING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReturnTrackingNumber() { + return returnTrackingNumber; + } + + /** + * Tracking number for the return of the item. + * + * @param returnTrackingNumber Tracking number for the return of the item. + */ + @JsonProperty(JSON_PROPERTY_RETURN_TRACKING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnTrackingNumber(String returnTrackingNumber) { + this.returnTrackingNumber = returnTrackingNumber; + isSetReturnTrackingNumber = true; // mark as set + } + + /** + * Tracking URI for the return of the item. + * + * @param returnTrackingUri Tracking URI for the return of the item. + * @return the current {@code LineItem} instance, allowing for method chaining + */ + public LineItem returnTrackingUri(String returnTrackingUri) { + this.returnTrackingUri = returnTrackingUri; + isSetReturnTrackingUri = true; // mark as set + return this; + } + + /** + * Tracking URI for the return of the item. + * + * @return returnTrackingUri Tracking URI for the return of the item. + */ + @JsonProperty(JSON_PROPERTY_RETURN_TRACKING_URI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReturnTrackingUri() { + return returnTrackingUri; + } + + /** + * Tracking URI for the return of the item. + * + * @param returnTrackingUri Tracking URI for the return of the item. + */ + @JsonProperty(JSON_PROPERTY_RETURN_TRACKING_URI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnTrackingUri(String returnTrackingUri) { + this.returnTrackingUri = returnTrackingUri; + isSetReturnTrackingUri = true; // mark as set + } + + /** + * Shipping company handling the delivery of the item. + * + * @param shippingCompany Shipping company handling the delivery of the item. + * @return the current {@code LineItem} instance, allowing for method chaining + */ + public LineItem shippingCompany(String shippingCompany) { + this.shippingCompany = shippingCompany; + isSetShippingCompany = true; // mark as set + return this; + } + + /** + * Shipping company handling the delivery of the item. + * + * @return shippingCompany Shipping company handling the delivery of the item. + */ + @JsonProperty(JSON_PROPERTY_SHIPPING_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getShippingCompany() { + return shippingCompany; + } + + /** + * Shipping company handling the delivery of the item. + * + * @param shippingCompany Shipping company handling the delivery of the item. + */ + @JsonProperty(JSON_PROPERTY_SHIPPING_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShippingCompany(String shippingCompany) { + this.shippingCompany = shippingCompany; + isSetShippingCompany = true; // mark as set + } + + /** + * Shipping method used to deliver the item. + * + * @param shippingMethod Shipping method used to deliver the item. + * @return the current {@code LineItem} instance, allowing for method chaining + */ + public LineItem shippingMethod(String shippingMethod) { + this.shippingMethod = shippingMethod; + isSetShippingMethod = true; // mark as set + return this; + } + + /** + * Shipping method used to deliver the item. + * + * @return shippingMethod Shipping method used to deliver the item. + */ + @JsonProperty(JSON_PROPERTY_SHIPPING_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getShippingMethod() { + return shippingMethod; + } + + /** + * Shipping method used to deliver the item. + * + * @param shippingMethod Shipping method used to deliver the item. + */ + @JsonProperty(JSON_PROPERTY_SHIPPING_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShippingMethod(String shippingMethod) { + this.shippingMethod = shippingMethod; + isSetShippingMethod = true; // mark as set + } + /** * Size of the item. * @@ -785,6 +1009,76 @@ public void setTaxPercentage(Long taxPercentage) { isSetTaxPercentage = true; // mark as set } + /** + * Tracking number for the delivery of the item. + * + * @param trackingNumber Tracking number for the delivery of the item. + * @return the current {@code LineItem} instance, allowing for method chaining + */ + public LineItem trackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + isSetTrackingNumber = true; // mark as set + return this; + } + + /** + * Tracking number for the delivery of the item. + * + * @return trackingNumber Tracking number for the delivery of the item. + */ + @JsonProperty(JSON_PROPERTY_TRACKING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTrackingNumber() { + return trackingNumber; + } + + /** + * Tracking number for the delivery of the item. + * + * @param trackingNumber Tracking number for the delivery of the item. + */ + @JsonProperty(JSON_PROPERTY_TRACKING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTrackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + isSetTrackingNumber = true; // mark as set + } + + /** + * Tracking URI for the delivery of the item. + * + * @param trackingUri Tracking URI for the delivery of the item. + * @return the current {@code LineItem} instance, allowing for method chaining + */ + public LineItem trackingUri(String trackingUri) { + this.trackingUri = trackingUri; + isSetTrackingUri = true; // mark as set + return this; + } + + /** + * Tracking URI for the delivery of the item. + * + * @return trackingUri Tracking URI for the delivery of the item. + */ + @JsonProperty(JSON_PROPERTY_TRACKING_URI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTrackingUri() { + return trackingUri; + } + + /** + * Tracking URI for the delivery of the item. + * + * @param trackingUri Tracking URI for the delivery of the item. + */ + @JsonProperty(JSON_PROPERTY_TRACKING_URI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTrackingUri(String trackingUri) { + this.trackingUri = trackingUri; + isSetTrackingUri = true; // mark as set + } + /** * Universal Product Code. * @@ -876,6 +1170,16 @@ public boolean equals(Object o) { && Objects.equals(this.isSetQuantity, lineItem.isSetQuantity) && Objects.equals(this.receiverEmail, lineItem.receiverEmail) && Objects.equals(this.isSetReceiverEmail, lineItem.isSetReceiverEmail) + && Objects.equals(this.returnShippingCompany, lineItem.returnShippingCompany) + && Objects.equals(this.isSetReturnShippingCompany, lineItem.isSetReturnShippingCompany) + && Objects.equals(this.returnTrackingNumber, lineItem.returnTrackingNumber) + && Objects.equals(this.isSetReturnTrackingNumber, lineItem.isSetReturnTrackingNumber) + && Objects.equals(this.returnTrackingUri, lineItem.returnTrackingUri) + && Objects.equals(this.isSetReturnTrackingUri, lineItem.isSetReturnTrackingUri) + && Objects.equals(this.shippingCompany, lineItem.shippingCompany) + && Objects.equals(this.isSetShippingCompany, lineItem.isSetShippingCompany) + && Objects.equals(this.shippingMethod, lineItem.shippingMethod) + && Objects.equals(this.isSetShippingMethod, lineItem.isSetShippingMethod) && Objects.equals(this.size, lineItem.size) && Objects.equals(this.isSetSize, lineItem.isSetSize) && Objects.equals(this.sku, lineItem.sku) @@ -884,6 +1188,10 @@ public boolean equals(Object o) { && Objects.equals(this.isSetTaxAmount, lineItem.isSetTaxAmount) && Objects.equals(this.taxPercentage, lineItem.taxPercentage) && Objects.equals(this.isSetTaxPercentage, lineItem.isSetTaxPercentage) + && Objects.equals(this.trackingNumber, lineItem.trackingNumber) + && Objects.equals(this.isSetTrackingNumber, lineItem.isSetTrackingNumber) + && Objects.equals(this.trackingUri, lineItem.trackingUri) + && Objects.equals(this.isSetTrackingUri, lineItem.isSetTrackingUri) && Objects.equals(this.upc, lineItem.upc) && Objects.equals(this.isSetUpc, lineItem.isSetUpc); } @@ -917,6 +1225,16 @@ public int hashCode() { isSetQuantity, receiverEmail, isSetReceiverEmail, + returnShippingCompany, + isSetReturnShippingCompany, + returnTrackingNumber, + isSetReturnTrackingNumber, + returnTrackingUri, + isSetReturnTrackingUri, + shippingCompany, + isSetShippingCompany, + shippingMethod, + isSetShippingMethod, size, isSetSize, sku, @@ -925,6 +1243,10 @@ public int hashCode() { isSetTaxAmount, taxPercentage, isSetTaxPercentage, + trackingNumber, + isSetTrackingNumber, + trackingUri, + isSetTrackingUri, upc, isSetUpc); } @@ -948,10 +1270,21 @@ public String toString() { sb.append(" productUrl: ").append(toIndentedString(productUrl)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" receiverEmail: ").append(toIndentedString(receiverEmail)).append("\n"); + sb.append(" returnShippingCompany: ") + .append(toIndentedString(returnShippingCompany)) + .append("\n"); + sb.append(" returnTrackingNumber: ") + .append(toIndentedString(returnTrackingNumber)) + .append("\n"); + sb.append(" returnTrackingUri: ").append(toIndentedString(returnTrackingUri)).append("\n"); + sb.append(" shippingCompany: ").append(toIndentedString(shippingCompany)).append("\n"); + sb.append(" shippingMethod: ").append(toIndentedString(shippingMethod)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" sku: ").append(toIndentedString(sku)).append("\n"); sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n"); sb.append(" taxPercentage: ").append(toIndentedString(taxPercentage)).append("\n"); + sb.append(" trackingNumber: ").append(toIndentedString(trackingNumber)).append("\n"); + sb.append(" trackingUri: ").append(toIndentedString(trackingUri)).append("\n"); sb.append(" upc: ").append(toIndentedString(upc)).append("\n"); sb.append("}"); return sb.toString(); @@ -1016,6 +1349,21 @@ public Map getExplicitNulls() { if (isSetReceiverEmail) { addIfNull(nulls, JSON_PROPERTY_RECEIVER_EMAIL, this.receiverEmail); } + if (isSetReturnShippingCompany) { + addIfNull(nulls, JSON_PROPERTY_RETURN_SHIPPING_COMPANY, this.returnShippingCompany); + } + if (isSetReturnTrackingNumber) { + addIfNull(nulls, JSON_PROPERTY_RETURN_TRACKING_NUMBER, this.returnTrackingNumber); + } + if (isSetReturnTrackingUri) { + addIfNull(nulls, JSON_PROPERTY_RETURN_TRACKING_URI, this.returnTrackingUri); + } + if (isSetShippingCompany) { + addIfNull(nulls, JSON_PROPERTY_SHIPPING_COMPANY, this.shippingCompany); + } + if (isSetShippingMethod) { + addIfNull(nulls, JSON_PROPERTY_SHIPPING_METHOD, this.shippingMethod); + } if (isSetSize) { addIfNull(nulls, JSON_PROPERTY_SIZE, this.size); } @@ -1028,6 +1376,12 @@ public Map getExplicitNulls() { if (isSetTaxPercentage) { addIfNull(nulls, JSON_PROPERTY_TAX_PERCENTAGE, this.taxPercentage); } + if (isSetTrackingNumber) { + addIfNull(nulls, JSON_PROPERTY_TRACKING_NUMBER, this.trackingNumber); + } + if (isSetTrackingUri) { + addIfNull(nulls, JSON_PROPERTY_TRACKING_URI, this.trackingUri); + } if (isSetUpc) { addIfNull(nulls, JSON_PROPERTY_UPC, this.upc); } diff --git a/src/main/java/com/adyen/model/checkout/Lodging.java b/src/main/java/com/adyen/model/checkout/Lodging.java new file mode 100644 index 000000000..4d464ee85 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/Lodging.java @@ -0,0 +1,1063 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.time.LocalDate; +import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.logging.Logger; + +/** Lodging */ +@JsonPropertyOrder({ + Lodging.JSON_PROPERTY_CHECK_IN_DATE, + Lodging.JSON_PROPERTY_CHECK_OUT_DATE, + Lodging.JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER, + Lodging.JSON_PROPERTY_FIRE_SAFETY_COMPLIANCE, + Lodging.JSON_PROPERTY_FOLIO, + Lodging.JSON_PROPERTY_FOOD_BEVERAGE_CHARGES, + Lodging.JSON_PROPERTY_LODGING_CHARGE_TYPE, + Lodging.JSON_PROPERTY_NO_SHOW, + Lodging.JSON_PROPERTY_PREPAID_EXPENSES, + Lodging.JSON_PROPERTY_PROPERTY_PHONE_NUMBER, + Lodging.JSON_PROPERTY_RENTER_NAME, + Lodging.JSON_PROPERTY_ROOMS, + Lodging.JSON_PROPERTY_TOTAL_ROOM_TAX, + Lodging.JSON_PROPERTY_TOTAL_TAX +}) +public class Lodging { + public static final String JSON_PROPERTY_CHECK_IN_DATE = "checkInDate"; + private LocalDate checkInDate; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCheckInDate = false; + + public static final String JSON_PROPERTY_CHECK_OUT_DATE = "checkOutDate"; + private LocalDate checkOutDate; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCheckOutDate = false; + + public static final String JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER = + "customerServicePhoneNumber"; + private String customerServicePhoneNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCustomerServicePhoneNumber = false; + + public static final String JSON_PROPERTY_FIRE_SAFETY_COMPLIANCE = "fireSafetyCompliance"; + private Boolean fireSafetyCompliance; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFireSafetyCompliance = false; + + public static final String JSON_PROPERTY_FOLIO = "folio"; + private Folio folio; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFolio = false; + + public static final String JSON_PROPERTY_FOOD_BEVERAGE_CHARGES = "foodBeverageCharges"; + private Long foodBeverageCharges; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFoodBeverageCharges = false; + + /** + * The category of lodging charges for the payment. * **additionalData key:** + * `lodging.specialProgramCode` + */ + public enum LodgingChargeTypeEnum { + ADVANCEDEPOSIT(String.valueOf("advanceDeposit")), + + NOSHOW(String.valueOf("noShow")), + + STAY(String.valueOf("stay")); + + private static final Logger LOG = Logger.getLogger(LodgingChargeTypeEnum.class.getName()); + + private String value; + + LodgingChargeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LodgingChargeTypeEnum fromValue(String value) { + for (LodgingChargeTypeEnum b : LodgingChargeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "LodgingChargeTypeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(LodgingChargeTypeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_LODGING_CHARGE_TYPE = "lodgingChargeType"; + private LodgingChargeTypeEnum lodgingChargeType; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLodgingChargeType = false; + + public static final String JSON_PROPERTY_NO_SHOW = "noShow"; + private Boolean noShow; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNoShow = false; + + public static final String JSON_PROPERTY_PREPAID_EXPENSES = "prepaidExpenses"; + private Long prepaidExpenses; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPrepaidExpenses = false; + + public static final String JSON_PROPERTY_PROPERTY_PHONE_NUMBER = "propertyPhoneNumber"; + private String propertyPhoneNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPropertyPhoneNumber = false; + + public static final String JSON_PROPERTY_RENTER_NAME = "renterName"; + private String renterName; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRenterName = false; + + public static final String JSON_PROPERTY_ROOMS = "rooms"; + private List rooms; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRooms = false; + + public static final String JSON_PROPERTY_TOTAL_ROOM_TAX = "totalRoomTax"; + private Long totalRoomTax; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTotalRoomTax = false; + + public static final String JSON_PROPERTY_TOTAL_TAX = "totalTax"; + private Long totalTax; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTotalTax = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public Lodging() {} + + /** + * The check-in date. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `lodging.checkInDate` + * + * @param checkInDate The check-in date. * Min Length: 10 characters * Max Length: 10 characters * + * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData + * key:** `lodging.checkInDate` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging checkInDate(LocalDate checkInDate) { + this.checkInDate = checkInDate; + isSetCheckInDate = true; // mark as set + return this; + } + + /** + * The check-in date. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `lodging.checkInDate` + * + * @return checkInDate The check-in date. * Min Length: 10 characters * Max Length: 10 characters + * * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData + * key:** `lodging.checkInDate` + */ + @JsonProperty(JSON_PROPERTY_CHECK_IN_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalDate getCheckInDate() { + return checkInDate; + } + + /** + * The check-in date. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `lodging.checkInDate` + * + * @param checkInDate The check-in date. * Min Length: 10 characters * Max Length: 10 characters * + * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData + * key:** `lodging.checkInDate` + */ + @JsonProperty(JSON_PROPERTY_CHECK_IN_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckInDate(LocalDate checkInDate) { + this.checkInDate = checkInDate; + isSetCheckInDate = true; // mark as set + } + + /** + * The check-out date. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `lodging.checkOutDate` + * + * @param checkOutDate The check-out date. * Min Length: 10 characters * Max Length: 10 characters + * * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData + * key:** `lodging.checkOutDate` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging checkOutDate(LocalDate checkOutDate) { + this.checkOutDate = checkOutDate; + isSetCheckOutDate = true; // mark as set + return this; + } + + /** + * The check-out date. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `lodging.checkOutDate` + * + * @return checkOutDate The check-out date. * Min Length: 10 characters * Max Length: 10 + * characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `lodging.checkOutDate` + */ + @JsonProperty(JSON_PROPERTY_CHECK_OUT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalDate getCheckOutDate() { + return checkOutDate; + } + + /** + * The check-out date. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `lodging.checkOutDate` + * + * @param checkOutDate The check-out date. * Min Length: 10 characters * Max Length: 10 characters + * * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData + * key:** `lodging.checkOutDate` + */ + @JsonProperty(JSON_PROPERTY_CHECK_OUT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckOutDate(LocalDate checkOutDate) { + this.checkOutDate = checkOutDate; + isSetCheckOutDate = true; // mark as set + } + + /** + * The toll-free phone number for the lodging customer service. * Format: Alphanumeric * For US + * and CA numbers must be 10 characters in length * Must not start with a space * Must not contain + * any special characters such as + or - * Must not be all zeros. * **additionalData key:** + * `lodging.customerServiceTollFreeNumber` + * + * @param customerServicePhoneNumber The toll-free phone number for the lodging customer service. + * * Format: Alphanumeric * For US and CA numbers must be 10 characters in length * Must not + * start with a space * Must not contain any special characters such as + or - * Must not be + * all zeros. * **additionalData key:** `lodging.customerServiceTollFreeNumber` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging customerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + isSetCustomerServicePhoneNumber = true; // mark as set + return this; + } + + /** + * The toll-free phone number for the lodging customer service. * Format: Alphanumeric * For US + * and CA numbers must be 10 characters in length * Must not start with a space * Must not contain + * any special characters such as + or - * Must not be all zeros. * **additionalData key:** + * `lodging.customerServiceTollFreeNumber` + * + * @return customerServicePhoneNumber The toll-free phone number for the lodging customer service. + * * Format: Alphanumeric * For US and CA numbers must be 10 characters in length * Must not + * start with a space * Must not contain any special characters such as + or - * Must not be + * all zeros. * **additionalData key:** `lodging.customerServiceTollFreeNumber` + */ + @JsonProperty(JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerServicePhoneNumber() { + return customerServicePhoneNumber; + } + + /** + * The toll-free phone number for the lodging customer service. * Format: Alphanumeric * For US + * and CA numbers must be 10 characters in length * Must not start with a space * Must not contain + * any special characters such as + or - * Must not be all zeros. * **additionalData key:** + * `lodging.customerServiceTollFreeNumber` + * + * @param customerServicePhoneNumber The toll-free phone number for the lodging customer service. + * * Format: Alphanumeric * For US and CA numbers must be 10 characters in length * Must not + * start with a space * Must not contain any special characters such as + or - * Must not be + * all zeros. * **additionalData key:** `lodging.customerServiceTollFreeNumber` + */ + @JsonProperty(JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + isSetCustomerServicePhoneNumber = true; // mark as set + } + + /** + * Indicates that the facility complies with the Hotel and Motel Fire Safety Act of 1990. * + * **additionalData key:** `lodging.fireSafetyActIndicator` + * + * @param fireSafetyCompliance Indicates that the facility complies with the Hotel and Motel Fire + * Safety Act of 1990. * **additionalData key:** `lodging.fireSafetyActIndicator` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging fireSafetyCompliance(Boolean fireSafetyCompliance) { + this.fireSafetyCompliance = fireSafetyCompliance; + isSetFireSafetyCompliance = true; // mark as set + return this; + } + + /** + * Indicates that the facility complies with the Hotel and Motel Fire Safety Act of 1990. * + * **additionalData key:** `lodging.fireSafetyActIndicator` + * + * @return fireSafetyCompliance Indicates that the facility complies with the Hotel and Motel Fire + * Safety Act of 1990. * **additionalData key:** `lodging.fireSafetyActIndicator` + */ + @JsonProperty(JSON_PROPERTY_FIRE_SAFETY_COMPLIANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getFireSafetyCompliance() { + return fireSafetyCompliance; + } + + /** + * Indicates that the facility complies with the Hotel and Motel Fire Safety Act of 1990. * + * **additionalData key:** `lodging.fireSafetyActIndicator` + * + * @param fireSafetyCompliance Indicates that the facility complies with the Hotel and Motel Fire + * Safety Act of 1990. * **additionalData key:** `lodging.fireSafetyActIndicator` + */ + @JsonProperty(JSON_PROPERTY_FIRE_SAFETY_COMPLIANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFireSafetyCompliance(Boolean fireSafetyCompliance) { + this.fireSafetyCompliance = fireSafetyCompliance; + isSetFireSafetyCompliance = true; // mark as set + } + + /** + * folio + * + * @param folio + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging folio(Folio folio) { + this.folio = folio; + isSetFolio = true; // mark as set + return this; + } + + /** + * Get folio + * + * @return folio + */ + @JsonProperty(JSON_PROPERTY_FOLIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Folio getFolio() { + return folio; + } + + /** + * folio + * + * @param folio + */ + @JsonProperty(JSON_PROPERTY_FOLIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFolio(Folio folio) { + this.folio = folio; + isSetFolio = true; // mark as set + } + + /** + * Any charges for food and beverages associated with the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.foodBeverageCharges` + * + * @param foodBeverageCharges Any charges for food and beverages associated with the booking, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData + * key:** `lodging.foodBeverageCharges` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging foodBeverageCharges(Long foodBeverageCharges) { + this.foodBeverageCharges = foodBeverageCharges; + isSetFoodBeverageCharges = true; // mark as set + return this; + } + + /** + * Any charges for food and beverages associated with the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.foodBeverageCharges` + * + * @return foodBeverageCharges Any charges for food and beverages associated with the booking, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData + * key:** `lodging.foodBeverageCharges` + */ + @JsonProperty(JSON_PROPERTY_FOOD_BEVERAGE_CHARGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFoodBeverageCharges() { + return foodBeverageCharges; + } + + /** + * Any charges for food and beverages associated with the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.foodBeverageCharges` + * + * @param foodBeverageCharges Any charges for food and beverages associated with the booking, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData + * key:** `lodging.foodBeverageCharges` + */ + @JsonProperty(JSON_PROPERTY_FOOD_BEVERAGE_CHARGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFoodBeverageCharges(Long foodBeverageCharges) { + this.foodBeverageCharges = foodBeverageCharges; + isSetFoodBeverageCharges = true; // mark as set + } + + /** + * The category of lodging charges for the payment. * **additionalData key:** + * `lodging.specialProgramCode` + * + * @param lodgingChargeType The category of lodging charges for the payment. * **additionalData + * key:** `lodging.specialProgramCode` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging lodgingChargeType(LodgingChargeTypeEnum lodgingChargeType) { + this.lodgingChargeType = lodgingChargeType; + isSetLodgingChargeType = true; // mark as set + return this; + } + + /** + * The category of lodging charges for the payment. * **additionalData key:** + * `lodging.specialProgramCode` + * + * @return lodgingChargeType The category of lodging charges for the payment. * **additionalData + * key:** `lodging.specialProgramCode` + */ + @JsonProperty(JSON_PROPERTY_LODGING_CHARGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LodgingChargeTypeEnum getLodgingChargeType() { + return lodgingChargeType; + } + + /** + * The category of lodging charges for the payment. * **additionalData key:** + * `lodging.specialProgramCode` + * + * @param lodgingChargeType The category of lodging charges for the payment. * **additionalData + * key:** `lodging.specialProgramCode` + */ + @JsonProperty(JSON_PROPERTY_LODGING_CHARGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLodgingChargeType(LodgingChargeTypeEnum lodgingChargeType) { + this.lodgingChargeType = lodgingChargeType; + isSetLodgingChargeType = true; // mark as set + } + + /** + * Indicates if the customer didn't check in for their booking. * **additionalData key:** + * `lodging.noShowIndicator` + * + * @param noShow Indicates if the customer didn't check in for their booking. * + * **additionalData key:** `lodging.noShowIndicator` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging noShow(Boolean noShow) { + this.noShow = noShow; + isSetNoShow = true; // mark as set + return this; + } + + /** + * Indicates if the customer didn't check in for their booking. * **additionalData key:** + * `lodging.noShowIndicator` + * + * @return noShow Indicates if the customer didn't check in for their booking. * + * **additionalData key:** `lodging.noShowIndicator` + */ + @JsonProperty(JSON_PROPERTY_NO_SHOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNoShow() { + return noShow; + } + + /** + * Indicates if the customer didn't check in for their booking. * **additionalData key:** + * `lodging.noShowIndicator` + * + * @param noShow Indicates if the customer didn't check in for their booking. * + * **additionalData key:** `lodging.noShowIndicator` + */ + @JsonProperty(JSON_PROPERTY_NO_SHOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNoShow(Boolean noShow) { + this.noShow = noShow; + isSetNoShow = true; // mark as set + } + + /** + * The prepaid expenses for the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.prepaidExpenses` + * + * @param prepaidExpenses The prepaid expenses for the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.prepaidExpenses` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging prepaidExpenses(Long prepaidExpenses) { + this.prepaidExpenses = prepaidExpenses; + isSetPrepaidExpenses = true; // mark as set + return this; + } + + /** + * The prepaid expenses for the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.prepaidExpenses` + * + * @return prepaidExpenses The prepaid expenses for the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.prepaidExpenses` + */ + @JsonProperty(JSON_PROPERTY_PREPAID_EXPENSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPrepaidExpenses() { + return prepaidExpenses; + } + + /** + * The prepaid expenses for the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.prepaidExpenses` + * + * @param prepaidExpenses The prepaid expenses for the booking, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.prepaidExpenses` + */ + @JsonProperty(JSON_PROPERTY_PREPAID_EXPENSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrepaidExpenses(Long prepaidExpenses) { + this.prepaidExpenses = prepaidExpenses; + isSetPrepaidExpenses = true; // mark as set + } + + /** + * The lodging property location's phone number. * Format: Alphanumeric * Min length: 10 + * characters * For US and CA numbers must be 10 characters in length * Must not start with a + * space * Must not contain any special characters such as + or - * Must not be all zeros. * + * **additionalData key:** `lodging.propertyPhoneNumber` + * + * @param propertyPhoneNumber The lodging property location's phone number. * Format: + * Alphanumeric * Min length: 10 characters * For US and CA numbers must be 10 characters in + * length * Must not start with a space * Must not contain any special characters such as + or + * - * Must not be all zeros. * **additionalData key:** + * `lodging.propertyPhoneNumber` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging propertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + isSetPropertyPhoneNumber = true; // mark as set + return this; + } + + /** + * The lodging property location's phone number. * Format: Alphanumeric * Min length: 10 + * characters * For US and CA numbers must be 10 characters in length * Must not start with a + * space * Must not contain any special characters such as + or - * Must not be all zeros. * + * **additionalData key:** `lodging.propertyPhoneNumber` + * + * @return propertyPhoneNumber The lodging property location's phone number. * Format: + * Alphanumeric * Min length: 10 characters * For US and CA numbers must be 10 characters in + * length * Must not start with a space * Must not contain any special characters such as + or + * - * Must not be all zeros. * **additionalData key:** + * `lodging.propertyPhoneNumber` + */ + @JsonProperty(JSON_PROPERTY_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPropertyPhoneNumber() { + return propertyPhoneNumber; + } + + /** + * The lodging property location's phone number. * Format: Alphanumeric * Min length: 10 + * characters * For US and CA numbers must be 10 characters in length * Must not start with a + * space * Must not contain any special characters such as + or - * Must not be all zeros. * + * **additionalData key:** `lodging.propertyPhoneNumber` + * + * @param propertyPhoneNumber The lodging property location's phone number. * Format: + * Alphanumeric * Min length: 10 characters * For US and CA numbers must be 10 characters in + * length * Must not start with a space * Must not contain any special characters such as + or + * - * Must not be all zeros. * **additionalData key:** + * `lodging.propertyPhoneNumber` + */ + @JsonProperty(JSON_PROPERTY_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + isSetPropertyPhoneNumber = true; // mark as set + } + + /** + * The name of the person renting the room. * Format: ASCII * Must not start with a space or be + * all spaces. * Must not be all zeros. * **additionalData key:** `lodging.renterName` + * + * @param renterName The name of the person renting the room. * Format: ASCII * Must not start + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `lodging.renterName` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging renterName(String renterName) { + this.renterName = renterName; + isSetRenterName = true; // mark as set + return this; + } + + /** + * The name of the person renting the room. * Format: ASCII * Must not start with a space or be + * all spaces. * Must not be all zeros. * **additionalData key:** `lodging.renterName` + * + * @return renterName The name of the person renting the room. * Format: ASCII * Must not start + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `lodging.renterName` + */ + @JsonProperty(JSON_PROPERTY_RENTER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRenterName() { + return renterName; + } + + /** + * The name of the person renting the room. * Format: ASCII * Must not start with a space or be + * all spaces. * Must not be all zeros. * **additionalData key:** `lodging.renterName` + * + * @param renterName The name of the person renting the room. * Format: ASCII * Must not start + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `lodging.renterName` + */ + @JsonProperty(JSON_PROPERTY_RENTER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRenterName(String renterName) { + this.renterName = renterName; + isSetRenterName = true; // mark as set + } + + /** + * The list of rooms booked. + * + * @param rooms The list of rooms booked. + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging rooms(List rooms) { + this.rooms = rooms; + isSetRooms = true; // mark as set + return this; + } + + public Lodging addRoomsItem(Room roomsItem) { + if (this.rooms == null) { + this.rooms = new ArrayList<>(); + } + this.rooms.add(roomsItem); + return this; + } + + /** + * The list of rooms booked. + * + * @return rooms The list of rooms booked. + */ + @JsonProperty(JSON_PROPERTY_ROOMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRooms() { + return rooms; + } + + /** + * The list of rooms booked. + * + * @param rooms The list of rooms booked. + */ + @JsonProperty(JSON_PROPERTY_ROOMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRooms(List rooms) { + this.rooms = rooms; + isSetRooms = true; // mark as set + } + + /** + * The total room tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalRoomTax` + * + * @param totalRoomTax The total room tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalRoomTax` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging totalRoomTax(Long totalRoomTax) { + this.totalRoomTax = totalRoomTax; + isSetTotalRoomTax = true; // mark as set + return this; + } + + /** + * The total room tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalRoomTax` + * + * @return totalRoomTax The total room tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalRoomTax` + */ + @JsonProperty(JSON_PROPERTY_TOTAL_ROOM_TAX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalRoomTax() { + return totalRoomTax; + } + + /** + * The total room tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalRoomTax` + * + * @param totalRoomTax The total room tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalRoomTax` + */ + @JsonProperty(JSON_PROPERTY_TOTAL_ROOM_TAX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalRoomTax(Long totalRoomTax) { + this.totalRoomTax = totalRoomTax; + isSetTotalRoomTax = true; // mark as set + } + + /** + * The total tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalTax` + * + * @param totalTax The total tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalTax` + * @return the current {@code Lodging} instance, allowing for method chaining + */ + public Lodging totalTax(Long totalTax) { + this.totalTax = totalTax; + isSetTotalTax = true; // mark as set + return this; + } + + /** + * The total tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalTax` + * + * @return totalTax The total tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalTax` + */ + @JsonProperty(JSON_PROPERTY_TOTAL_TAX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalTax() { + return totalTax; + } + + /** + * The total tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalTax` + * + * @param totalTax The total tax amount, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.totalTax` + */ + @JsonProperty(JSON_PROPERTY_TOTAL_TAX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalTax(Long totalTax) { + this.totalTax = totalTax; + isSetTotalTax = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public Lodging includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this Lodging object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Lodging lodging = (Lodging) o; + return Objects.equals(this.checkInDate, lodging.checkInDate) + && Objects.equals(this.isSetCheckInDate, lodging.isSetCheckInDate) + && Objects.equals(this.checkOutDate, lodging.checkOutDate) + && Objects.equals(this.isSetCheckOutDate, lodging.isSetCheckOutDate) + && Objects.equals(this.customerServicePhoneNumber, lodging.customerServicePhoneNumber) + && Objects.equals( + this.isSetCustomerServicePhoneNumber, lodging.isSetCustomerServicePhoneNumber) + && Objects.equals(this.fireSafetyCompliance, lodging.fireSafetyCompliance) + && Objects.equals(this.isSetFireSafetyCompliance, lodging.isSetFireSafetyCompliance) + && Objects.equals(this.folio, lodging.folio) + && Objects.equals(this.isSetFolio, lodging.isSetFolio) + && Objects.equals(this.foodBeverageCharges, lodging.foodBeverageCharges) + && Objects.equals(this.isSetFoodBeverageCharges, lodging.isSetFoodBeverageCharges) + && Objects.equals(this.lodgingChargeType, lodging.lodgingChargeType) + && Objects.equals(this.isSetLodgingChargeType, lodging.isSetLodgingChargeType) + && Objects.equals(this.noShow, lodging.noShow) + && Objects.equals(this.isSetNoShow, lodging.isSetNoShow) + && Objects.equals(this.prepaidExpenses, lodging.prepaidExpenses) + && Objects.equals(this.isSetPrepaidExpenses, lodging.isSetPrepaidExpenses) + && Objects.equals(this.propertyPhoneNumber, lodging.propertyPhoneNumber) + && Objects.equals(this.isSetPropertyPhoneNumber, lodging.isSetPropertyPhoneNumber) + && Objects.equals(this.renterName, lodging.renterName) + && Objects.equals(this.isSetRenterName, lodging.isSetRenterName) + && Objects.equals(this.rooms, lodging.rooms) + && Objects.equals(this.isSetRooms, lodging.isSetRooms) + && Objects.equals(this.totalRoomTax, lodging.totalRoomTax) + && Objects.equals(this.isSetTotalRoomTax, lodging.isSetTotalRoomTax) + && Objects.equals(this.totalTax, lodging.totalTax) + && Objects.equals(this.isSetTotalTax, lodging.isSetTotalTax); + } + + @Override + public int hashCode() { + return Objects.hash( + checkInDate, + isSetCheckInDate, + checkOutDate, + isSetCheckOutDate, + customerServicePhoneNumber, + isSetCustomerServicePhoneNumber, + fireSafetyCompliance, + isSetFireSafetyCompliance, + folio, + isSetFolio, + foodBeverageCharges, + isSetFoodBeverageCharges, + lodgingChargeType, + isSetLodgingChargeType, + noShow, + isSetNoShow, + prepaidExpenses, + isSetPrepaidExpenses, + propertyPhoneNumber, + isSetPropertyPhoneNumber, + renterName, + isSetRenterName, + rooms, + isSetRooms, + totalRoomTax, + isSetTotalRoomTax, + totalTax, + isSetTotalTax); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Lodging {\n"); + sb.append(" checkInDate: ").append(toIndentedString(checkInDate)).append("\n"); + sb.append(" checkOutDate: ").append(toIndentedString(checkOutDate)).append("\n"); + sb.append(" customerServicePhoneNumber: ") + .append(toIndentedString(customerServicePhoneNumber)) + .append("\n"); + sb.append(" fireSafetyCompliance: ") + .append(toIndentedString(fireSafetyCompliance)) + .append("\n"); + sb.append(" folio: ").append(toIndentedString(folio)).append("\n"); + sb.append(" foodBeverageCharges: ") + .append(toIndentedString(foodBeverageCharges)) + .append("\n"); + sb.append(" lodgingChargeType: ").append(toIndentedString(lodgingChargeType)).append("\n"); + sb.append(" noShow: ").append(toIndentedString(noShow)).append("\n"); + sb.append(" prepaidExpenses: ").append(toIndentedString(prepaidExpenses)).append("\n"); + sb.append(" propertyPhoneNumber: ") + .append(toIndentedString(propertyPhoneNumber)) + .append("\n"); + sb.append(" renterName: ").append(toIndentedString(renterName)).append("\n"); + sb.append(" rooms: ").append(toIndentedString(rooms)).append("\n"); + sb.append(" totalRoomTax: ").append(toIndentedString(totalRoomTax)).append("\n"); + sb.append(" totalTax: ").append(toIndentedString(totalTax)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetCheckInDate) { + addIfNull(nulls, JSON_PROPERTY_CHECK_IN_DATE, this.checkInDate); + } + if (isSetCheckOutDate) { + addIfNull(nulls, JSON_PROPERTY_CHECK_OUT_DATE, this.checkOutDate); + } + if (isSetCustomerServicePhoneNumber) { + addIfNull( + nulls, JSON_PROPERTY_CUSTOMER_SERVICE_PHONE_NUMBER, this.customerServicePhoneNumber); + } + if (isSetFireSafetyCompliance) { + addIfNull(nulls, JSON_PROPERTY_FIRE_SAFETY_COMPLIANCE, this.fireSafetyCompliance); + } + if (isSetFolio) { + addIfNull(nulls, JSON_PROPERTY_FOLIO, this.folio); + } + if (isSetFoodBeverageCharges) { + addIfNull(nulls, JSON_PROPERTY_FOOD_BEVERAGE_CHARGES, this.foodBeverageCharges); + } + if (isSetLodgingChargeType) { + addIfNull(nulls, JSON_PROPERTY_LODGING_CHARGE_TYPE, this.lodgingChargeType); + } + if (isSetNoShow) { + addIfNull(nulls, JSON_PROPERTY_NO_SHOW, this.noShow); + } + if (isSetPrepaidExpenses) { + addIfNull(nulls, JSON_PROPERTY_PREPAID_EXPENSES, this.prepaidExpenses); + } + if (isSetPropertyPhoneNumber) { + addIfNull(nulls, JSON_PROPERTY_PROPERTY_PHONE_NUMBER, this.propertyPhoneNumber); + } + if (isSetRenterName) { + addIfNull(nulls, JSON_PROPERTY_RENTER_NAME, this.renterName); + } + if (isSetRooms) { + addIfNull(nulls, JSON_PROPERTY_ROOMS, this.rooms); + } + if (isSetTotalRoomTax) { + addIfNull(nulls, JSON_PROPERTY_TOTAL_ROOM_TAX, this.totalRoomTax); + } + if (isSetTotalTax) { + addIfNull(nulls, JSON_PROPERTY_TOTAL_TAX, this.totalTax); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of Lodging given an JSON string + * + * @param jsonString JSON string + * @return An instance of Lodging + * @throws JsonProcessingException if the JSON string is invalid with respect to Lodging + */ + public static Lodging fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Lodging.class); + } + + /** + * Convert an instance of Lodging to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/Passenger.java b/src/main/java/com/adyen/model/checkout/Passenger.java index 571a64676..c7a9cbc97 100644 --- a/src/main/java/com/adyen/model/checkout/Passenger.java +++ b/src/main/java/com/adyen/model/checkout/Passenger.java @@ -69,10 +69,11 @@ public Passenger() {} /** * The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: - * 10 + * 10 * **additionalData key:** `airline.passenger[N].date_of_birth` * * @param dateOfBirth The passenger's date of birth. * Format `yyyy-MM-dd` * - * minLength: 10 * maxLength: 10 + * minLength: 10 * maxLength: 10 * **additionalData key:** + * `airline.passenger[N].date_of_birth` * @return the current {@code Passenger} instance, allowing for method chaining */ public Passenger dateOfBirth(LocalDate dateOfBirth) { @@ -83,10 +84,11 @@ public Passenger dateOfBirth(LocalDate dateOfBirth) { /** * The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: - * 10 + * 10 * **additionalData key:** `airline.passenger[N].date_of_birth` * * @return dateOfBirth The passenger's date of birth. * Format `yyyy-MM-dd` * - * minLength: 10 * maxLength: 10 + * minLength: 10 * maxLength: 10 * **additionalData key:** + * `airline.passenger[N].date_of_birth` */ @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -96,10 +98,11 @@ public LocalDate getDateOfBirth() { /** * The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: - * 10 + * 10 * **additionalData key:** `airline.passenger[N].date_of_birth` * * @param dateOfBirth The passenger's date of birth. * Format `yyyy-MM-dd` * - * minLength: 10 * maxLength: 10 + * minLength: 10 * maxLength: 10 * **additionalData key:** + * `airline.passenger[N].date_of_birth` */ @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -110,10 +113,12 @@ public void setDateOfBirth(LocalDate dateOfBirth) { /** * The passenger's first name. > This field is required if the airline data includes - * passenger details or leg details. * Encoding: ASCII + * passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].first_name` * * @param firstName The passenger's first name. > This field is required if the airline - * data includes passenger details or leg details. * Encoding: ASCII + * data includes passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].first_name` * @return the current {@code Passenger} instance, allowing for method chaining */ public Passenger firstName(String firstName) { @@ -124,10 +129,12 @@ public Passenger firstName(String firstName) { /** * The passenger's first name. > This field is required if the airline data includes - * passenger details or leg details. * Encoding: ASCII + * passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].first_name` * * @return firstName The passenger's first name. > This field is required if the airline - * data includes passenger details or leg details. * Encoding: ASCII + * data includes passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].first_name` */ @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -137,10 +144,12 @@ public String getFirstName() { /** * The passenger's first name. > This field is required if the airline data includes - * passenger details or leg details. * Encoding: ASCII + * passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].first_name` * * @param firstName The passenger's first name. > This field is required if the airline - * data includes passenger details or leg details. * Encoding: ASCII + * data includes passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].first_name` */ @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -151,10 +160,12 @@ public void setFirstName(String firstName) { /** * The passenger's last name. > This field is required if the airline data includes - * passenger details or leg details. * Encoding: ASCII + * passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].last_name` * * @param lastName The passenger's last name. > This field is required if the airline data - * includes passenger details or leg details. * Encoding: ASCII + * includes passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].last_name` * @return the current {@code Passenger} instance, allowing for method chaining */ public Passenger lastName(String lastName) { @@ -165,10 +176,12 @@ public Passenger lastName(String lastName) { /** * The passenger's last name. > This field is required if the airline data includes - * passenger details or leg details. * Encoding: ASCII + * passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].last_name` * * @return lastName The passenger's last name. > This field is required if the airline data - * includes passenger details or leg details. * Encoding: ASCII + * includes passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].last_name` */ @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -178,10 +191,12 @@ public String getLastName() { /** * The passenger's last name. > This field is required if the airline data includes - * passenger details or leg details. * Encoding: ASCII + * passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].last_name` * * @param lastName The passenger's last name. > This field is required if the airline data - * includes passenger details or leg details. * Encoding: ASCII + * includes passenger details or leg details. * Encoding: ASCII * **additionalData key:** + * `airline.passenger[N].last_name` */ @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -193,11 +208,13 @@ public void setLastName(String lastName) { /** * The passenger's phone number, including country code. This is an alphanumeric field that * can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters - * * maxLength: 30 characters + * * maxLength: 30 characters * **additionalData key:** + * `airline.passenger[N].phone_number` * * @param phoneNumber The passenger's phone number, including country code. This is an * alphanumeric field that can include the '+' and '-' signs. * Encoding: - * ASCII * minLength: 3 characters * maxLength: 30 characters + * ASCII * minLength: 3 characters * maxLength: 30 characters * **additionalData key:** + * `airline.passenger[N].phone_number` * @return the current {@code Passenger} instance, allowing for method chaining */ public Passenger phoneNumber(String phoneNumber) { @@ -209,11 +226,13 @@ public Passenger phoneNumber(String phoneNumber) { /** * The passenger's phone number, including country code. This is an alphanumeric field that * can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters - * * maxLength: 30 characters + * * maxLength: 30 characters * **additionalData key:** + * `airline.passenger[N].phone_number` * * @return phoneNumber The passenger's phone number, including country code. This is an * alphanumeric field that can include the '+' and '-' signs. * Encoding: - * ASCII * minLength: 3 characters * maxLength: 30 characters + * ASCII * minLength: 3 characters * maxLength: 30 characters * **additionalData key:** + * `airline.passenger[N].phone_number` */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -224,11 +243,13 @@ public String getPhoneNumber() { /** * The passenger's phone number, including country code. This is an alphanumeric field that * can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters - * * maxLength: 30 characters + * * maxLength: 30 characters * **additionalData key:** + * `airline.passenger[N].phone_number` * * @param phoneNumber The passenger's phone number, including country code. This is an * alphanumeric field that can include the '+' and '-' signs. * Encoding: - * ASCII * minLength: 3 characters * maxLength: 30 characters + * ASCII * minLength: 3 characters * maxLength: 30 characters * **additionalData key:** + * `airline.passenger[N].phone_number` */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -239,10 +260,11 @@ public void setPhoneNumber(String phoneNumber) { /** * The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 - * characters + * characters * **additionalData key:** `airline.passenger[N].traveller_type` * * @param travellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 - * characters * maxLength: 6 characters + * characters * maxLength: 6 characters * **additionalData key:** + * `airline.passenger[N].traveller_type` * @return the current {@code Passenger} instance, allowing for method chaining */ public Passenger travellerType(String travellerType) { @@ -253,10 +275,11 @@ public Passenger travellerType(String travellerType) { /** * The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 - * characters + * characters * **additionalData key:** `airline.passenger[N].traveller_type` * * @return travellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 - * characters * maxLength: 6 characters + * characters * maxLength: 6 characters * **additionalData key:** + * `airline.passenger[N].traveller_type` */ @JsonProperty(JSON_PROPERTY_TRAVELLER_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -266,10 +289,11 @@ public String getTravellerType() { /** * The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 - * characters + * characters * **additionalData key:** `airline.passenger[N].traveller_type` * * @param travellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 - * characters * maxLength: 6 characters + * characters * maxLength: 6 characters * **additionalData key:** + * `airline.passenger[N].traveller_type` */ @JsonProperty(JSON_PROPERTY_TRAVELLER_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/PaymentDetails.java b/src/main/java/com/adyen/model/checkout/PaymentDetails.java index 31c23c33c..6ade94348 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentDetails.java +++ b/src/main/java/com/adyen/model/checkout/PaymentDetails.java @@ -52,8 +52,6 @@ public enum TypeEnum { BANKTRANSFER_IBAN(String.valueOf("bankTransfer_IBAN")), - PAYBRIGHT(String.valueOf("paybright")), - PAYNOW(String.valueOf("paynow")), AFFIRM_POS(String.valueOf("affirm_pos")), diff --git a/src/main/java/com/adyen/model/checkout/PaymentDetailsResponseAction.java b/src/main/java/com/adyen/model/checkout/PaymentDetailsResponseAction.java index 40f073feb..9df3c85f7 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentDetailsResponseAction.java +++ b/src/main/java/com/adyen/model/checkout/PaymentDetailsResponseAction.java @@ -137,6 +137,12 @@ public PaymentDetailsResponseAction(CheckoutThreeDS2Action o) { schemas.put("CheckoutThreeDS2Action", new GenericType() {}); JSON.registerDescendants( PaymentDetailsResponseAction.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + mappings.put("threeDS2", CheckoutThreeDS2Action.class); + mappings.put("CheckoutThreeDS2Action", CheckoutThreeDS2Action.class); + mappings.put("PaymentDetailsResponse_action", PaymentDetailsResponseAction.class); + JSON.registerDiscriminator(PaymentDetailsResponseAction.class, "type", mappings); } @Override diff --git a/src/main/java/com/adyen/model/checkout/PaymentRequest.java b/src/main/java/com/adyen/model/checkout/PaymentRequest.java index d103e85b8..0d59de3a5 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentRequest.java @@ -100,6 +100,7 @@ PaymentRequest.JSON_PROPERTY_SUB_MERCHANTS, PaymentRequest.JSON_PROPERTY_SURCHARGE, PaymentRequest.JSON_PROPERTY_TELEPHONE_NUMBER, + PaymentRequest.JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO, PaymentRequest.JSON_PROPERTY_THREE_D_S2_REQUEST_DATA, PaymentRequest.JSON_PROPERTY_THREE_D_S_AUTHENTICATION_ONLY, PaymentRequest.JSON_PROPERTY_TRUSTED_SHOPPER @@ -773,6 +774,13 @@ public static ShopperInteractionEnum fromValue(String value) { /** Mark when the attribute has been explicitly set. */ private boolean isSetTelephoneNumber = false; + public static final String JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO = + "thirdPartyTokenRedundancyInfo"; + private ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetThirdPartyTokenRedundancyInfo = false; + public static final String JSON_PROPERTY_THREE_D_S2_REQUEST_DATA = "threeDS2RequestData"; private ThreeDS2RequestFields threeDS2RequestData; @@ -4069,6 +4077,43 @@ public void setTelephoneNumber(String telephoneNumber) { isSetTelephoneNumber = true; // mark as set } + /** + * thirdPartyTokenRedundancyInfo + * + * @param thirdPartyTokenRedundancyInfo + * @return the current {@code PaymentRequest} instance, allowing for method chaining + */ + public PaymentRequest thirdPartyTokenRedundancyInfo( + ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo) { + this.thirdPartyTokenRedundancyInfo = thirdPartyTokenRedundancyInfo; + isSetThirdPartyTokenRedundancyInfo = true; // mark as set + return this; + } + + /** + * Get thirdPartyTokenRedundancyInfo + * + * @return thirdPartyTokenRedundancyInfo + */ + @JsonProperty(JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThirdPartyTokenRedundancyInfo getThirdPartyTokenRedundancyInfo() { + return thirdPartyTokenRedundancyInfo; + } + + /** + * thirdPartyTokenRedundancyInfo + * + * @param thirdPartyTokenRedundancyInfo + */ + @JsonProperty(JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setThirdPartyTokenRedundancyInfo( + ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo) { + this.thirdPartyTokenRedundancyInfo = thirdPartyTokenRedundancyInfo; + isSetThirdPartyTokenRedundancyInfo = true; // mark as set + } + /** * threeDS2RequestData * @@ -4375,6 +4420,11 @@ public boolean equals(Object o) { && Objects.equals(this.isSetSurcharge, paymentRequest.isSetSurcharge) && Objects.equals(this.telephoneNumber, paymentRequest.telephoneNumber) && Objects.equals(this.isSetTelephoneNumber, paymentRequest.isSetTelephoneNumber) + && Objects.equals( + this.thirdPartyTokenRedundancyInfo, paymentRequest.thirdPartyTokenRedundancyInfo) + && Objects.equals( + this.isSetThirdPartyTokenRedundancyInfo, + paymentRequest.isSetThirdPartyTokenRedundancyInfo) && Objects.equals(this.threeDS2RequestData, paymentRequest.threeDS2RequestData) && Objects.equals(this.isSetThreeDS2RequestData, paymentRequest.isSetThreeDS2RequestData) && Objects.equals(this.threeDSAuthenticationOnly, paymentRequest.threeDSAuthenticationOnly) @@ -4527,6 +4577,8 @@ public int hashCode() { isSetSurcharge, telephoneNumber, isSetTelephoneNumber, + thirdPartyTokenRedundancyInfo, + isSetThirdPartyTokenRedundancyInfo, threeDS2RequestData, isSetThreeDS2RequestData, threeDSAuthenticationOnly, @@ -4627,6 +4679,9 @@ public String toString() { sb.append(" subMerchants: ").append(toIndentedString(subMerchants)).append("\n"); sb.append(" surcharge: ").append(toIndentedString(surcharge)).append("\n"); sb.append(" telephoneNumber: ").append(toIndentedString(telephoneNumber)).append("\n"); + sb.append(" thirdPartyTokenRedundancyInfo: ") + .append(toIndentedString(thirdPartyTokenRedundancyInfo)) + .append("\n"); sb.append(" threeDS2RequestData: ") .append(toIndentedString(threeDS2RequestData)) .append("\n"); @@ -4868,6 +4923,12 @@ public Map getExplicitNulls() { if (isSetTelephoneNumber) { addIfNull(nulls, JSON_PROPERTY_TELEPHONE_NUMBER, this.telephoneNumber); } + if (isSetThirdPartyTokenRedundancyInfo) { + addIfNull( + nulls, + JSON_PROPERTY_THIRD_PARTY_TOKEN_REDUNDANCY_INFO, + this.thirdPartyTokenRedundancyInfo); + } if (isSetThreeDS2RequestData) { addIfNull(nulls, JSON_PROPERTY_THREE_D_S2_REQUEST_DATA, this.threeDS2RequestData); } diff --git a/src/main/java/com/adyen/model/checkout/PaymentResponseAction.java b/src/main/java/com/adyen/model/checkout/PaymentResponseAction.java index 6b1edd876..375f6d2b7 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentResponseAction.java +++ b/src/main/java/com/adyen/model/checkout/PaymentResponseAction.java @@ -401,6 +401,30 @@ public PaymentResponseAction(CheckoutVoucherAction o) { schemas.put("CheckoutThreeDS2Action", new GenericType() {}); schemas.put("CheckoutVoucherAction", new GenericType() {}); JSON.registerDescendants(PaymentResponseAction.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + mappings.put("await", CheckoutAwaitAction.class); + mappings.put("bankTransfer", CheckoutBankTransferAction.class); + mappings.put("delegatedAuthentication", CheckoutDelegatedAuthenticationAction.class); + mappings.put("nativeRedirect", CheckoutNativeRedirectAction.class); + mappings.put("qrCode", CheckoutQrCodeAction.class); + mappings.put("redirect", CheckoutRedirectAction.class); + mappings.put("sdk", CheckoutSDKAction.class); + mappings.put("threeDS2", CheckoutThreeDS2Action.class); + mappings.put("voucher", CheckoutVoucherAction.class); + mappings.put("wechatpaySDK", CheckoutSDKAction.class); + mappings.put("CheckoutAwaitAction", CheckoutAwaitAction.class); + mappings.put("CheckoutBankTransferAction", CheckoutBankTransferAction.class); + mappings.put( + "CheckoutDelegatedAuthenticationAction", CheckoutDelegatedAuthenticationAction.class); + mappings.put("CheckoutNativeRedirectAction", CheckoutNativeRedirectAction.class); + mappings.put("CheckoutQrCodeAction", CheckoutQrCodeAction.class); + mappings.put("CheckoutRedirectAction", CheckoutRedirectAction.class); + mappings.put("CheckoutSDKAction", CheckoutSDKAction.class); + mappings.put("CheckoutThreeDS2Action", CheckoutThreeDS2Action.class); + mappings.put("CheckoutVoucherAction", CheckoutVoucherAction.class); + mappings.put("PaymentResponse_action", PaymentResponseAction.class); + JSON.registerDiscriminator(PaymentResponseAction.class, "type", mappings); } @Override diff --git a/src/main/java/com/adyen/model/checkout/PaypalUpdateOrderRequest.java b/src/main/java/com/adyen/model/checkout/PaypalUpdateOrderRequest.java index 8e10a54d8..bb7f86fd7 100644 --- a/src/main/java/com/adyen/model/checkout/PaypalUpdateOrderRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaypalUpdateOrderRequest.java @@ -24,10 +24,13 @@ /** PaypalUpdateOrderRequest */ @JsonPropertyOrder({ PaypalUpdateOrderRequest.JSON_PROPERTY_AMOUNT, + PaypalUpdateOrderRequest.JSON_PROPERTY_DELIVERY_ADDRESS, PaypalUpdateOrderRequest.JSON_PROPERTY_DELIVERY_METHODS, + PaypalUpdateOrderRequest.JSON_PROPERTY_DISCOUNT_AMOUNT, PaypalUpdateOrderRequest.JSON_PROPERTY_PAYMENT_DATA, PaypalUpdateOrderRequest.JSON_PROPERTY_PSP_REFERENCE, PaypalUpdateOrderRequest.JSON_PROPERTY_SESSION_ID, + PaypalUpdateOrderRequest.JSON_PROPERTY_SHIPPING_AMOUNT, PaypalUpdateOrderRequest.JSON_PROPERTY_TAX_TOTAL }) public class PaypalUpdateOrderRequest { @@ -37,12 +40,24 @@ public class PaypalUpdateOrderRequest { /** Mark when the attribute has been explicitly set. */ private boolean isSetAmount = false; + public static final String JSON_PROPERTY_DELIVERY_ADDRESS = "deliveryAddress"; + private DeliveryAddress deliveryAddress; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDeliveryAddress = false; + public static final String JSON_PROPERTY_DELIVERY_METHODS = "deliveryMethods"; private List deliveryMethods; /** Mark when the attribute has been explicitly set. */ private boolean isSetDeliveryMethods = false; + public static final String JSON_PROPERTY_DISCOUNT_AMOUNT = "discountAmount"; + private Amount discountAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDiscountAmount = false; + public static final String JSON_PROPERTY_PAYMENT_DATA = "paymentData"; private String paymentData; @@ -61,6 +76,12 @@ public class PaypalUpdateOrderRequest { /** Mark when the attribute has been explicitly set. */ private boolean isSetSessionId = false; + public static final String JSON_PROPERTY_SHIPPING_AMOUNT = "shippingAmount"; + private Amount shippingAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetShippingAmount = false; + public static final String JSON_PROPERTY_TAX_TOTAL = "taxTotal"; private TaxTotal taxTotal; @@ -110,6 +131,41 @@ public void setAmount(Amount amount) { isSetAmount = true; // mark as set } + /** + * deliveryAddress + * + * @param deliveryAddress + * @return the current {@code PaypalUpdateOrderRequest} instance, allowing for method chaining + */ + public PaypalUpdateOrderRequest deliveryAddress(DeliveryAddress deliveryAddress) { + this.deliveryAddress = deliveryAddress; + isSetDeliveryAddress = true; // mark as set + return this; + } + + /** + * Get deliveryAddress + * + * @return deliveryAddress + */ + @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeliveryAddress getDeliveryAddress() { + return deliveryAddress; + } + + /** + * deliveryAddress + * + * @param deliveryAddress + */ + @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeliveryAddress(DeliveryAddress deliveryAddress) { + this.deliveryAddress = deliveryAddress; + isSetDeliveryAddress = true; // mark as set + } + /** * The list of new delivery methods and the cost of each. * @@ -153,6 +209,41 @@ public void setDeliveryMethods(List deliveryMethods) { isSetDeliveryMethods = true; // mark as set } + /** + * discountAmount + * + * @param discountAmount + * @return the current {@code PaypalUpdateOrderRequest} instance, allowing for method chaining + */ + public PaypalUpdateOrderRequest discountAmount(Amount discountAmount) { + this.discountAmount = discountAmount; + isSetDiscountAmount = true; // mark as set + return this; + } + + /** + * Get discountAmount + * + * @return discountAmount + */ + @JsonProperty(JSON_PROPERTY_DISCOUNT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Amount getDiscountAmount() { + return discountAmount; + } + + /** + * discountAmount + * + * @param discountAmount + */ + @JsonProperty(JSON_PROPERTY_DISCOUNT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDiscountAmount(Amount discountAmount) { + this.discountAmount = discountAmount; + isSetDiscountAmount = true; // mark as set + } + /** * The `paymentData` from the client side. This value changes every time you make a * `/paypal/updateOrder` request. @@ -267,6 +358,41 @@ public void setSessionId(String sessionId) { isSetSessionId = true; // mark as set } + /** + * shippingAmount + * + * @param shippingAmount + * @return the current {@code PaypalUpdateOrderRequest} instance, allowing for method chaining + */ + public PaypalUpdateOrderRequest shippingAmount(Amount shippingAmount) { + this.shippingAmount = shippingAmount; + isSetShippingAmount = true; // mark as set + return this; + } + + /** + * Get shippingAmount + * + * @return shippingAmount + */ + @JsonProperty(JSON_PROPERTY_SHIPPING_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Amount getShippingAmount() { + return shippingAmount; + } + + /** + * shippingAmount + * + * @param shippingAmount + */ + @JsonProperty(JSON_PROPERTY_SHIPPING_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShippingAmount(Amount shippingAmount) { + this.shippingAmount = shippingAmount; + isSetShippingAmount = true; // mark as set + } + /** * taxTotal * @@ -334,14 +460,20 @@ public boolean equals(Object o) { PaypalUpdateOrderRequest paypalUpdateOrderRequest = (PaypalUpdateOrderRequest) o; return Objects.equals(this.amount, paypalUpdateOrderRequest.amount) && Objects.equals(this.isSetAmount, paypalUpdateOrderRequest.isSetAmount) + && Objects.equals(this.deliveryAddress, paypalUpdateOrderRequest.deliveryAddress) + && Objects.equals(this.isSetDeliveryAddress, paypalUpdateOrderRequest.isSetDeliveryAddress) && Objects.equals(this.deliveryMethods, paypalUpdateOrderRequest.deliveryMethods) && Objects.equals(this.isSetDeliveryMethods, paypalUpdateOrderRequest.isSetDeliveryMethods) + && Objects.equals(this.discountAmount, paypalUpdateOrderRequest.discountAmount) + && Objects.equals(this.isSetDiscountAmount, paypalUpdateOrderRequest.isSetDiscountAmount) && Objects.equals(this.paymentData, paypalUpdateOrderRequest.paymentData) && Objects.equals(this.isSetPaymentData, paypalUpdateOrderRequest.isSetPaymentData) && Objects.equals(this.pspReference, paypalUpdateOrderRequest.pspReference) && Objects.equals(this.isSetPspReference, paypalUpdateOrderRequest.isSetPspReference) && Objects.equals(this.sessionId, paypalUpdateOrderRequest.sessionId) && Objects.equals(this.isSetSessionId, paypalUpdateOrderRequest.isSetSessionId) + && Objects.equals(this.shippingAmount, paypalUpdateOrderRequest.shippingAmount) + && Objects.equals(this.isSetShippingAmount, paypalUpdateOrderRequest.isSetShippingAmount) && Objects.equals(this.taxTotal, paypalUpdateOrderRequest.taxTotal) && Objects.equals(this.isSetTaxTotal, paypalUpdateOrderRequest.isSetTaxTotal); } @@ -351,14 +483,20 @@ public int hashCode() { return Objects.hash( amount, isSetAmount, + deliveryAddress, + isSetDeliveryAddress, deliveryMethods, isSetDeliveryMethods, + discountAmount, + isSetDiscountAmount, paymentData, isSetPaymentData, pspReference, isSetPspReference, sessionId, isSetSessionId, + shippingAmount, + isSetShippingAmount, taxTotal, isSetTaxTotal); } @@ -368,10 +506,13 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PaypalUpdateOrderRequest {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" deliveryAddress: ").append(toIndentedString(deliveryAddress)).append("\n"); sb.append(" deliveryMethods: ").append(toIndentedString(deliveryMethods)).append("\n"); + sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n"); sb.append(" paymentData: ").append(toIndentedString(paymentData)).append("\n"); sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" shippingAmount: ").append(toIndentedString(shippingAmount)).append("\n"); sb.append(" taxTotal: ").append(toIndentedString(taxTotal)).append("\n"); sb.append("}"); return sb.toString(); @@ -400,9 +541,15 @@ public Map getExplicitNulls() { if (isSetAmount) { addIfNull(nulls, JSON_PROPERTY_AMOUNT, this.amount); } + if (isSetDeliveryAddress) { + addIfNull(nulls, JSON_PROPERTY_DELIVERY_ADDRESS, this.deliveryAddress); + } if (isSetDeliveryMethods) { addIfNull(nulls, JSON_PROPERTY_DELIVERY_METHODS, this.deliveryMethods); } + if (isSetDiscountAmount) { + addIfNull(nulls, JSON_PROPERTY_DISCOUNT_AMOUNT, this.discountAmount); + } if (isSetPaymentData) { addIfNull(nulls, JSON_PROPERTY_PAYMENT_DATA, this.paymentData); } @@ -412,6 +559,9 @@ public Map getExplicitNulls() { if (isSetSessionId) { addIfNull(nulls, JSON_PROPERTY_SESSION_ID, this.sessionId); } + if (isSetShippingAmount) { + addIfNull(nulls, JSON_PROPERTY_SHIPPING_AMOUNT, this.shippingAmount); + } if (isSetTaxTotal) { addIfNull(nulls, JSON_PROPERTY_TAX_TOTAL, this.taxTotal); } diff --git a/src/main/java/com/adyen/model/checkout/PickupInfo.java b/src/main/java/com/adyen/model/checkout/PickupInfo.java new file mode 100644 index 000000000..21903c82c --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/PickupInfo.java @@ -0,0 +1,375 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.time.LocalDate; +import java.util.*; + +/** PickupInfo */ +@JsonPropertyOrder({ + PickupInfo.JSON_PROPERTY_CITY, + PickupInfo.JSON_PROPERTY_COUNTRY_CODE, + PickupInfo.JSON_PROPERTY_DATE, + PickupInfo.JSON_PROPERTY_STATE_OR_PROVINCE +}) +public class PickupInfo { + public static final String JSON_PROPERTY_CITY = "city"; + private String city; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCity = false; + + public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode"; + private String countryCode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCountryCode = false; + + public static final String JSON_PROPERTY_DATE = "date"; + private LocalDate date; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDate = false; + + public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince"; + private String stateOrProvince; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetStateOrProvince = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public PickupInfo() {} + + /** + * The city where the car is rented. * Format: ASCII * Must not start with a space or be all + * spaces. * Must not be all zeros. * **additionalData key:** `carRental.locationCity` + * + * @param city The city where the car is rented. * Format: ASCII * Must not start with a space or + * be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.locationCity` + * @return the current {@code PickupInfo} instance, allowing for method chaining + */ + public PickupInfo city(String city) { + this.city = city; + isSetCity = true; // mark as set + return this; + } + + /** + * The city where the car is rented. * Format: ASCII * Must not start with a space or be all + * spaces. * Must not be all zeros. * **additionalData key:** `carRental.locationCity` + * + * @return city The city where the car is rented. * Format: ASCII * Must not start with a space or + * be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.locationCity` + */ + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCity() { + return city; + } + + /** + * The city where the car is rented. * Format: ASCII * Must not start with a space or be all + * spaces. * Must not be all zeros. * **additionalData key:** `carRental.locationCity` + * + * @param city The city where the car is rented. * Format: ASCII * Must not start with a space or + * be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.locationCity` + */ + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCity(String city) { + this.city = city; + isSetCity = true; // mark as set + } + + /** + * The country where the car is rented, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 characters * + * **additionalData key:** `carRental.locationCountry` + * + * @param countryCode The country where the car is rented, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 + * characters * **additionalData key:** `carRental.locationCountry` + * @return the current {@code PickupInfo} instance, allowing for method chaining + */ + public PickupInfo countryCode(String countryCode) { + this.countryCode = countryCode; + isSetCountryCode = true; // mark as set + return this; + } + + /** + * The country where the car is rented, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 characters * + * **additionalData key:** `carRental.locationCountry` + * + * @return countryCode The country where the car is rented, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 + * characters * **additionalData key:** `carRental.locationCountry` + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCountryCode() { + return countryCode; + } + + /** + * The country where the car is rented, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 characters * + * **additionalData key:** `carRental.locationCountry` + * + * @param countryCode The country where the car is rented, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 + * characters * **additionalData key:** `carRental.locationCountry` + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + isSetCountryCode = true; // mark as set + } + + /** + * The pick-up date. * minLength: 10 characters * maxLength: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `carRental.checkOutDate` + * + * @param date The pick-up date. * minLength: 10 characters * maxLength: 10 characters * Format + * [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `carRental.checkOutDate` + * @return the current {@code PickupInfo} instance, allowing for method chaining + */ + public PickupInfo date(LocalDate date) { + this.date = date; + isSetDate = true; // mark as set + return this; + } + + /** + * The pick-up date. * minLength: 10 characters * maxLength: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `carRental.checkOutDate` + * + * @return date The pick-up date. * minLength: 10 characters * maxLength: 10 characters * Format + * [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `carRental.checkOutDate` + */ + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalDate getDate() { + return date; + } + + /** + * The pick-up date. * minLength: 10 characters * maxLength: 10 characters * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `carRental.checkOutDate` + * + * @param date The pick-up date. * minLength: 10 characters * maxLength: 10 characters * Format + * [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `carRental.checkOutDate` + */ + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDate(LocalDate date) { + this.date = date; + isSetDate = true; // mark as set + } + + /** + * The state or province where the car is rented. * maxLength: 3 characters * Must not start with + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.locationStateProvince` + * + * @param stateOrProvince The state or province where the car is rented. * maxLength: 3 characters + * * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.locationStateProvince` + * @return the current {@code PickupInfo} instance, allowing for method chaining + */ + public PickupInfo stateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + isSetStateOrProvince = true; // mark as set + return this; + } + + /** + * The state or province where the car is rented. * maxLength: 3 characters * Must not start with + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.locationStateProvince` + * + * @return stateOrProvince The state or province where the car is rented. * maxLength: 3 + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `carRental.locationStateProvince` + */ + @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStateOrProvince() { + return stateOrProvince; + } + + /** + * The state or province where the car is rented. * maxLength: 3 characters * Must not start with + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.locationStateProvince` + * + * @param stateOrProvince The state or province where the car is rented. * maxLength: 3 characters + * * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.locationStateProvince` + */ + @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + isSetStateOrProvince = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public PickupInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this PickupInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PickupInfo pickupInfo = (PickupInfo) o; + return Objects.equals(this.city, pickupInfo.city) + && Objects.equals(this.isSetCity, pickupInfo.isSetCity) + && Objects.equals(this.countryCode, pickupInfo.countryCode) + && Objects.equals(this.isSetCountryCode, pickupInfo.isSetCountryCode) + && Objects.equals(this.date, pickupInfo.date) + && Objects.equals(this.isSetDate, pickupInfo.isSetDate) + && Objects.equals(this.stateOrProvince, pickupInfo.stateOrProvince) + && Objects.equals(this.isSetStateOrProvince, pickupInfo.isSetStateOrProvince); + } + + @Override + public int hashCode() { + return Objects.hash( + city, + isSetCity, + countryCode, + isSetCountryCode, + date, + isSetDate, + stateOrProvince, + isSetStateOrProvince); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PickupInfo {\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetCity) { + addIfNull(nulls, JSON_PROPERTY_CITY, this.city); + } + if (isSetCountryCode) { + addIfNull(nulls, JSON_PROPERTY_COUNTRY_CODE, this.countryCode); + } + if (isSetDate) { + addIfNull(nulls, JSON_PROPERTY_DATE, this.date); + } + if (isSetStateOrProvince) { + addIfNull(nulls, JSON_PROPERTY_STATE_OR_PROVINCE, this.stateOrProvince); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of PickupInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of PickupInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to PickupInfo + */ + public static PickupInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PickupInfo.class); + } + + /** + * Convert an instance of PickupInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/RentalSurcharges.java b/src/main/java/com/adyen/model/checkout/RentalSurcharges.java new file mode 100644 index 000000000..a23608d29 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/RentalSurcharges.java @@ -0,0 +1,328 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** RentalSurcharges */ +@JsonPropertyOrder({ + RentalSurcharges.JSON_PROPERTY_FUEL, + RentalSurcharges.JSON_PROPERTY_INSURANCE, + RentalSurcharges.JSON_PROPERTY_ONE_WAY_DROP_OFF +}) +public class RentalSurcharges { + public static final String JSON_PROPERTY_FUEL = "fuel"; + private Long fuel; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFuel = false; + + public static final String JSON_PROPERTY_INSURANCE = "insurance"; + private Long insurance; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetInsurance = false; + + public static final String JSON_PROPERTY_ONE_WAY_DROP_OFF = "oneWayDropOff"; + private Long oneWayDropOff; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetOneWayDropOff = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public RentalSurcharges() {} + + /** + * The fuel charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.fuelCharges` + * + * @param fuel The fuel charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.fuelCharges` + * @return the current {@code RentalSurcharges} instance, allowing for method chaining + */ + public RentalSurcharges fuel(Long fuel) { + this.fuel = fuel; + isSetFuel = true; // mark as set + return this; + } + + /** + * The fuel charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.fuelCharges` + * + * @return fuel The fuel charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.fuelCharges` + */ + @JsonProperty(JSON_PROPERTY_FUEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFuel() { + return fuel; + } + + /** + * The fuel charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.fuelCharges` + * + * @param fuel The fuel charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.fuelCharges` + */ + @JsonProperty(JSON_PROPERTY_FUEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFuel(Long fuel) { + this.fuel = fuel; + isSetFuel = true; // mark as set + } + + /** + * Any insurance charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.insuranceCharges` + * + * @param insurance Any insurance charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.insuranceCharges` + * @return the current {@code RentalSurcharges} instance, allowing for method chaining + */ + public RentalSurcharges insurance(Long insurance) { + this.insurance = insurance; + isSetInsurance = true; // mark as set + return this; + } + + /** + * Any insurance charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.insuranceCharges` + * + * @return insurance Any insurance charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.insuranceCharges` + */ + @JsonProperty(JSON_PROPERTY_INSURANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInsurance() { + return insurance; + } + + /** + * Any insurance charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.insuranceCharges` + * + * @param insurance Any insurance charges associated with the rental, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.insuranceCharges` + */ + @JsonProperty(JSON_PROPERTY_INSURANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInsurance(Long insurance) { + this.insurance = insurance; + isSetInsurance = true; // mark as set + } + + /** + * The charge for not returning a car to the original rental location, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.oneWayDropOffCharges` + * + * @param oneWayDropOff The charge for not returning a car to the original rental location, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData + * key:** `carRental.oneWayDropOffCharges` + * @return the current {@code RentalSurcharges} instance, allowing for method chaining + */ + public RentalSurcharges oneWayDropOff(Long oneWayDropOff) { + this.oneWayDropOff = oneWayDropOff; + isSetOneWayDropOff = true; // mark as set + return this; + } + + /** + * The charge for not returning a car to the original rental location, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.oneWayDropOffCharges` + * + * @return oneWayDropOff The charge for not returning a car to the original rental location, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData + * key:** `carRental.oneWayDropOffCharges` + */ + @JsonProperty(JSON_PROPERTY_ONE_WAY_DROP_OFF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOneWayDropOff() { + return oneWayDropOff; + } + + /** + * The charge for not returning a car to the original rental location, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `carRental.oneWayDropOffCharges` + * + * @param oneWayDropOff The charge for not returning a car to the original rental location, in + * [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, + * 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData + * key:** `carRental.oneWayDropOffCharges` + */ + @JsonProperty(JSON_PROPERTY_ONE_WAY_DROP_OFF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOneWayDropOff(Long oneWayDropOff) { + this.oneWayDropOff = oneWayDropOff; + isSetOneWayDropOff = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public RentalSurcharges includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this RentalSurcharges object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RentalSurcharges rentalSurcharges = (RentalSurcharges) o; + return Objects.equals(this.fuel, rentalSurcharges.fuel) + && Objects.equals(this.isSetFuel, rentalSurcharges.isSetFuel) + && Objects.equals(this.insurance, rentalSurcharges.insurance) + && Objects.equals(this.isSetInsurance, rentalSurcharges.isSetInsurance) + && Objects.equals(this.oneWayDropOff, rentalSurcharges.oneWayDropOff) + && Objects.equals(this.isSetOneWayDropOff, rentalSurcharges.isSetOneWayDropOff); + } + + @Override + public int hashCode() { + return Objects.hash( + fuel, isSetFuel, insurance, isSetInsurance, oneWayDropOff, isSetOneWayDropOff); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RentalSurcharges {\n"); + sb.append(" fuel: ").append(toIndentedString(fuel)).append("\n"); + sb.append(" insurance: ").append(toIndentedString(insurance)).append("\n"); + sb.append(" oneWayDropOff: ").append(toIndentedString(oneWayDropOff)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetFuel) { + addIfNull(nulls, JSON_PROPERTY_FUEL, this.fuel); + } + if (isSetInsurance) { + addIfNull(nulls, JSON_PROPERTY_INSURANCE, this.insurance); + } + if (isSetOneWayDropOff) { + addIfNull(nulls, JSON_PROPERTY_ONE_WAY_DROP_OFF, this.oneWayDropOff); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of RentalSurcharges given an JSON string + * + * @param jsonString JSON string + * @return An instance of RentalSurcharges + * @throws JsonProcessingException if the JSON string is invalid with respect to RentalSurcharges + */ + public static RentalSurcharges fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RentalSurcharges.class); + } + + /** + * Convert an instance of RentalSurcharges to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/ReturnInfo.java b/src/main/java/com/adyen/model/checkout/ReturnInfo.java new file mode 100644 index 000000000..7128f62b5 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/ReturnInfo.java @@ -0,0 +1,440 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.time.LocalDate; +import java.util.*; + +/** ReturnInfo */ +@JsonPropertyOrder({ + ReturnInfo.JSON_PROPERTY_CITY, + ReturnInfo.JSON_PROPERTY_COUNTRY_CODE, + ReturnInfo.JSON_PROPERTY_DATE, + ReturnInfo.JSON_PROPERTY_LOCATION_ID, + ReturnInfo.JSON_PROPERTY_STATE_OR_PROVINCE +}) +public class ReturnInfo { + public static final String JSON_PROPERTY_CITY = "city"; + private String city; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCity = false; + + public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode"; + private String countryCode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCountryCode = false; + + public static final String JSON_PROPERTY_DATE = "date"; + private LocalDate date; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDate = false; + + public static final String JSON_PROPERTY_LOCATION_ID = "locationId"; + private String locationId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLocationId = false; + + public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince"; + private String stateOrProvince; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetStateOrProvince = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ReturnInfo() {} + + /** + * The city where the car must be returned. * Format: ASCII * maxLength: 18 characters * Must not + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.returnCity` + * + * @param city The city where the car must be returned. * Format: ASCII * maxLength: 18 characters + * * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.returnCity` + * @return the current {@code ReturnInfo} instance, allowing for method chaining + */ + public ReturnInfo city(String city) { + this.city = city; + isSetCity = true; // mark as set + return this; + } + + /** + * The city where the car must be returned. * Format: ASCII * maxLength: 18 characters * Must not + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.returnCity` + * + * @return city The city where the car must be returned. * Format: ASCII * maxLength: 18 + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `carRental.returnCity` + */ + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCity() { + return city; + } + + /** + * The city where the car must be returned. * Format: ASCII * maxLength: 18 characters * Must not + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `carRental.returnCity` + * + * @param city The city where the car must be returned. * Format: ASCII * maxLength: 18 characters + * * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.returnCity` + */ + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCity(String city) { + this.city = city; + isSetCity = true; // mark as set + } + + /** + * The country where the car must be returned, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 characters * + * **additionalData key:** `carRental.returnCountry` + * + * @param countryCode The country where the car must be returned, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 + * characters * **additionalData key:** `carRental.returnCountry` + * @return the current {@code ReturnInfo} instance, allowing for method chaining + */ + public ReturnInfo countryCode(String countryCode) { + this.countryCode = countryCode; + isSetCountryCode = true; // mark as set + return this; + } + + /** + * The country where the car must be returned, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 characters * + * **additionalData key:** `carRental.returnCountry` + * + * @return countryCode The country where the car must be returned, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 + * characters * **additionalData key:** `carRental.returnCountry` + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCountryCode() { + return countryCode; + } + + /** + * The country where the car must be returned, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 characters * + * **additionalData key:** `carRental.returnCountry` + * + * @param countryCode The country where the car must be returned, in [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * maxLength: 2 + * characters * **additionalData key:** `carRental.returnCountry` + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + isSetCountryCode = true; // mark as set + } + + /** + * The date by which the car must be returned. * minLength: 10 characters * maxLength: 10 + * characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `carRental.returnDate` + * + * @param date The date by which the car must be returned. * minLength: 10 characters * maxLength: + * 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `carRental.returnDate` + * @return the current {@code ReturnInfo} instance, allowing for method chaining + */ + public ReturnInfo date(LocalDate date) { + this.date = date; + isSetDate = true; // mark as set + return this; + } + + /** + * The date by which the car must be returned. * minLength: 10 characters * maxLength: 10 + * characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `carRental.returnDate` + * + * @return date The date by which the car must be returned. * minLength: 10 characters * + * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): + * yyyy-MM-dd * **additionalData key:** `carRental.returnDate` + */ + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalDate getDate() { + return date; + } + + /** + * The date by which the car must be returned. * minLength: 10 characters * maxLength: 10 + * characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `carRental.returnDate` + * + * @param date The date by which the car must be returned. * minLength: 10 characters * maxLength: + * 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `carRental.returnDate` + */ + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDate(LocalDate date) { + this.date = date; + isSetDate = true; // mark as set + } + + /** + * The agency code, phone number, or address abbreviation. * Format: ASCII * maxLength: 10 + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `carRental.returnLocationId` + * + * @param locationId The agency code, phone number, or address abbreviation. * Format: ASCII * + * maxLength: 10 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.returnLocationId` + * @return the current {@code ReturnInfo} instance, allowing for method chaining + */ + public ReturnInfo locationId(String locationId) { + this.locationId = locationId; + isSetLocationId = true; // mark as set + return this; + } + + /** + * The agency code, phone number, or address abbreviation. * Format: ASCII * maxLength: 10 + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `carRental.returnLocationId` + * + * @return locationId The agency code, phone number, or address abbreviation. * Format: ASCII * + * maxLength: 10 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.returnLocationId` + */ + @JsonProperty(JSON_PROPERTY_LOCATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLocationId() { + return locationId; + } + + /** + * The agency code, phone number, or address abbreviation. * Format: ASCII * maxLength: 10 + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `carRental.returnLocationId` + * + * @param locationId The agency code, phone number, or address abbreviation. * Format: ASCII * + * maxLength: 10 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.returnLocationId` + */ + @JsonProperty(JSON_PROPERTY_LOCATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocationId(String locationId) { + this.locationId = locationId; + isSetLocationId = true; // mark as set + } + + /** + * The state or province where the car must be returned. * Format: ASCII * maxLength: 3 characters + * * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.returnStateProvince` + * + * @param stateOrProvince The state or province where the car must be returned. * Format: ASCII * + * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.returnStateProvince` + * @return the current {@code ReturnInfo} instance, allowing for method chaining + */ + public ReturnInfo stateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + isSetStateOrProvince = true; // mark as set + return this; + } + + /** + * The state or province where the car must be returned. * Format: ASCII * maxLength: 3 characters + * * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.returnStateProvince` + * + * @return stateOrProvince The state or province where the car must be returned. * Format: ASCII * + * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.returnStateProvince` + */ + @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStateOrProvince() { + return stateOrProvince; + } + + /** + * The state or province where the car must be returned. * Format: ASCII * maxLength: 3 characters + * * Must not start with a space or be all spaces. * Must not be all zeros. * **additionalData + * key:** `carRental.returnStateProvince` + * + * @param stateOrProvince The state or province where the car must be returned. * Format: ASCII * + * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all + * zeros. * **additionalData key:** `carRental.returnStateProvince` + */ + @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + isSetStateOrProvince = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ReturnInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ReturnInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnInfo returnInfo = (ReturnInfo) o; + return Objects.equals(this.city, returnInfo.city) + && Objects.equals(this.isSetCity, returnInfo.isSetCity) + && Objects.equals(this.countryCode, returnInfo.countryCode) + && Objects.equals(this.isSetCountryCode, returnInfo.isSetCountryCode) + && Objects.equals(this.date, returnInfo.date) + && Objects.equals(this.isSetDate, returnInfo.isSetDate) + && Objects.equals(this.locationId, returnInfo.locationId) + && Objects.equals(this.isSetLocationId, returnInfo.isSetLocationId) + && Objects.equals(this.stateOrProvince, returnInfo.stateOrProvince) + && Objects.equals(this.isSetStateOrProvince, returnInfo.isSetStateOrProvince); + } + + @Override + public int hashCode() { + return Objects.hash( + city, + isSetCity, + countryCode, + isSetCountryCode, + date, + isSetDate, + locationId, + isSetLocationId, + stateOrProvince, + isSetStateOrProvince); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnInfo {\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" locationId: ").append(toIndentedString(locationId)).append("\n"); + sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetCity) { + addIfNull(nulls, JSON_PROPERTY_CITY, this.city); + } + if (isSetCountryCode) { + addIfNull(nulls, JSON_PROPERTY_COUNTRY_CODE, this.countryCode); + } + if (isSetDate) { + addIfNull(nulls, JSON_PROPERTY_DATE, this.date); + } + if (isSetLocationId) { + addIfNull(nulls, JSON_PROPERTY_LOCATION_ID, this.locationId); + } + if (isSetStateOrProvince) { + addIfNull(nulls, JSON_PROPERTY_STATE_OR_PROVINCE, this.stateOrProvince); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ReturnInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to ReturnInfo + */ + public static ReturnInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ReturnInfo.class); + } + + /** + * Convert an instance of ReturnInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/RivertyDetails.java b/src/main/java/com/adyen/model/checkout/RivertyDetails.java index 29661ed06..cc7c01332 100644 --- a/src/main/java/com/adyen/model/checkout/RivertyDetails.java +++ b/src/main/java/com/adyen/model/checkout/RivertyDetails.java @@ -30,6 +30,7 @@ RivertyDetails.JSON_PROPERTY_DELIVERY_ADDRESS, RivertyDetails.JSON_PROPERTY_DEVICE_FINGERPRINT, RivertyDetails.JSON_PROPERTY_IBAN, + RivertyDetails.JSON_PROPERTY_MERCHANT_DATA, RivertyDetails.JSON_PROPERTY_PERSONAL_DETAILS, RivertyDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, RivertyDetails.JSON_PROPERTY_SDK_DATA, @@ -68,6 +69,12 @@ public class RivertyDetails { /** Mark when the attribute has been explicitly set. */ private boolean isSetIban = false; + public static final String JSON_PROPERTY_MERCHANT_DATA = "merchantData"; + private String merchantData; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMerchantData = false; + public static final String JSON_PROPERTY_PERSONAL_DETAILS = "personalDetails"; private String personalDetails; @@ -342,6 +349,44 @@ public void setIban(String iban) { isSetIban = true; // mark as set } + /** + * Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Riverty at authorization. + * + * @param merchantData Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Riverty + * at authorization. + * @return the current {@code RivertyDetails} instance, allowing for method chaining + */ + public RivertyDetails merchantData(String merchantData) { + this.merchantData = merchantData; + isSetMerchantData = true; // mark as set + return this; + } + + /** + * Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Riverty at authorization. + * + * @return merchantData Base64-encoded merchant metadata (Extra Merchant Data) forwarded to + * Riverty at authorization. + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMerchantData() { + return merchantData; + } + + /** + * Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Riverty at authorization. + * + * @param merchantData Base64-encoded merchant metadata (Extra Merchant Data) forwarded to Riverty + * at authorization. + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantData(String merchantData) { + this.merchantData = merchantData; + isSetMerchantData = true; // mark as set + } + /** * Shopper name, date of birth, phone number, and email address. * @@ -611,6 +656,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetDeviceFingerprint, rivertyDetails.isSetDeviceFingerprint) && Objects.equals(this.iban, rivertyDetails.iban) && Objects.equals(this.isSetIban, rivertyDetails.isSetIban) + && Objects.equals(this.merchantData, rivertyDetails.merchantData) + && Objects.equals(this.isSetMerchantData, rivertyDetails.isSetMerchantData) && Objects.equals(this.personalDetails, rivertyDetails.personalDetails) && Objects.equals(this.isSetPersonalDetails, rivertyDetails.isSetPersonalDetails) && Objects.equals(this.recurringDetailReference, rivertyDetails.recurringDetailReference) @@ -640,6 +687,8 @@ public int hashCode() { isSetDeviceFingerprint, iban, isSetIban, + merchantData, + isSetMerchantData, personalDetails, isSetPersonalDetails, recurringDetailReference, @@ -663,6 +712,7 @@ public String toString() { sb.append(" deliveryAddress: ").append(toIndentedString(deliveryAddress)).append("\n"); sb.append(" deviceFingerprint: ").append(toIndentedString(deviceFingerprint)).append("\n"); sb.append(" iban: ").append(toIndentedString(iban)).append("\n"); + sb.append(" merchantData: ").append(toIndentedString(merchantData)).append("\n"); sb.append(" personalDetails: ").append(toIndentedString(personalDetails)).append("\n"); sb.append(" recurringDetailReference: ") .append(toIndentedString(recurringDetailReference)) @@ -712,6 +762,9 @@ public Map getExplicitNulls() { if (isSetIban) { addIfNull(nulls, JSON_PROPERTY_IBAN, this.iban); } + if (isSetMerchantData) { + addIfNull(nulls, JSON_PROPERTY_MERCHANT_DATA, this.merchantData); + } if (isSetPersonalDetails) { addIfNull(nulls, JSON_PROPERTY_PERSONAL_DETAILS, this.personalDetails); } diff --git a/src/main/java/com/adyen/model/checkout/Room.java b/src/main/java/com/adyen/model/checkout/Room.java new file mode 100644 index 000000000..33332cdbd --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/Room.java @@ -0,0 +1,249 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** Room */ +@JsonPropertyOrder({Room.JSON_PROPERTY_NUMBER_OF_NIGHTS, Room.JSON_PROPERTY_RATE}) +public class Room { + public static final String JSON_PROPERTY_NUMBER_OF_NIGHTS = "numberOfNights"; + private Integer numberOfNights; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNumberOfNights = false; + + public static final String JSON_PROPERTY_RATE = "rate"; + private Long rate; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRate = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public Room() {} + + /** + * The total number of nights the room is booked for. * Format: Numeric * Must be a number between + * 1 and 99 * **additionalData key:** `lodging.room[N].numberOfNights` + * + * @param numberOfNights The total number of nights the room is booked for. * Format: Numeric * + * Must be a number between 1 and 99 * **additionalData key:** + * `lodging.room[N].numberOfNights` + * @return the current {@code Room} instance, allowing for method chaining + */ + public Room numberOfNights(Integer numberOfNights) { + this.numberOfNights = numberOfNights; + isSetNumberOfNights = true; // mark as set + return this; + } + + /** + * The total number of nights the room is booked for. * Format: Numeric * Must be a number between + * 1 and 99 * **additionalData key:** `lodging.room[N].numberOfNights` + * + * @return numberOfNights The total number of nights the room is booked for. * Format: Numeric * + * Must be a number between 1 and 99 * **additionalData key:** + * `lodging.room[N].numberOfNights` + */ + @JsonProperty(JSON_PROPERTY_NUMBER_OF_NIGHTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumberOfNights() { + return numberOfNights; + } + + /** + * The total number of nights the room is booked for. * Format: Numeric * Must be a number between + * 1 and 99 * **additionalData key:** `lodging.room[N].numberOfNights` + * + * @param numberOfNights The total number of nights the room is booked for. * Format: Numeric * + * Must be a number between 1 and 99 * **additionalData key:** + * `lodging.room[N].numberOfNights` + */ + @JsonProperty(JSON_PROPERTY_NUMBER_OF_NIGHTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfNights(Integer numberOfNights) { + this.numberOfNights = numberOfNights; + isSetNumberOfNights = true; // mark as set + } + + /** + * Room rate per night, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.room[N].rate` + * + * @param rate Room rate per night, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.room[N].rate` + * @return the current {@code Room} instance, allowing for method chaining + */ + public Room rate(Long rate) { + this.rate = rate; + isSetRate = true; // mark as set + return this; + } + + /** + * Room rate per night, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.room[N].rate` + * + * @return rate Room rate per night, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.room[N].rate` + */ + @JsonProperty(JSON_PROPERTY_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRate() { + return rate; + } + + /** + * Room rate per night, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.room[N].rate` + * + * @param rate Room rate per night, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `lodging.room[N].rate` + */ + @JsonProperty(JSON_PROPERTY_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRate(Long rate) { + this.rate = rate; + isSetRate = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public Room includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this Room object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Room room = (Room) o; + return Objects.equals(this.numberOfNights, room.numberOfNights) + && Objects.equals(this.isSetNumberOfNights, room.isSetNumberOfNights) + && Objects.equals(this.rate, room.rate) + && Objects.equals(this.isSetRate, room.isSetRate); + } + + @Override + public int hashCode() { + return Objects.hash(numberOfNights, isSetNumberOfNights, rate, isSetRate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Room {\n"); + sb.append(" numberOfNights: ").append(toIndentedString(numberOfNights)).append("\n"); + sb.append(" rate: ").append(toIndentedString(rate)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetNumberOfNights) { + addIfNull(nulls, JSON_PROPERTY_NUMBER_OF_NIGHTS, this.numberOfNights); + } + if (isSetRate) { + addIfNull(nulls, JSON_PROPERTY_RATE, this.rate); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of Room given an JSON string + * + * @param jsonString JSON string + * @return An instance of Room + * @throws JsonProcessingException if the JSON string is invalid with respect to Room + */ + public static Room fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Room.class); + } + + /** + * Convert an instance of Room to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/StoredPaymentMethod.java b/src/main/java/com/adyen/model/checkout/StoredPaymentMethod.java index 9d54cd4f4..a0302e925 100644 --- a/src/main/java/com/adyen/model/checkout/StoredPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/StoredPaymentMethod.java @@ -29,6 +29,7 @@ StoredPaymentMethod.JSON_PROPERTY_CASHTAG, StoredPaymentMethod.JSON_PROPERTY_EXPIRY_MONTH, StoredPaymentMethod.JSON_PROPERTY_EXPIRY_YEAR, + StoredPaymentMethod.JSON_PROPERTY_EXTERNAL_TOKEN, StoredPaymentMethod.JSON_PROPERTY_HOLDER_NAME, StoredPaymentMethod.JSON_PROPERTY_IBAN, StoredPaymentMethod.JSON_PROPERTY_ID, @@ -79,6 +80,12 @@ public class StoredPaymentMethod { /** Mark when the attribute has been explicitly set. */ private boolean isSetExpiryYear = false; + public static final String JSON_PROPERTY_EXTERNAL_TOKEN = "externalToken"; + private String externalToken; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetExternalToken = false; + public static final String JSON_PROPERTY_HOLDER_NAME = "holderName"; private String holderName; @@ -377,6 +384,47 @@ public void setExpiryYear(String expiryYear) { isSetExpiryYear = true; // mark as set } + /** + * The token issued by an external tokenization service representing the shopper's payment + * method + * + * @param externalToken The token issued by an external tokenization service representing the + * shopper's payment method + * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining + */ + public StoredPaymentMethod externalToken(String externalToken) { + this.externalToken = externalToken; + isSetExternalToken = true; // mark as set + return this; + } + + /** + * The token issued by an external tokenization service representing the shopper's payment + * method + * + * @return externalToken The token issued by an external tokenization service representing the + * shopper's payment method + */ + @JsonProperty(JSON_PROPERTY_EXTERNAL_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExternalToken() { + return externalToken; + } + + /** + * The token issued by an external tokenization service representing the shopper's payment + * method + * + * @param externalToken The token issued by an external tokenization service representing the + * shopper's payment method + */ + @JsonProperty(JSON_PROPERTY_EXTERNAL_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExternalToken(String externalToken) { + this.externalToken = externalToken; + isSetExternalToken = true; // mark as set + } + /** * The name of the payment method holder. * @@ -878,6 +926,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetExpiryMonth, storedPaymentMethod.isSetExpiryMonth) && Objects.equals(this.expiryYear, storedPaymentMethod.expiryYear) && Objects.equals(this.isSetExpiryYear, storedPaymentMethod.isSetExpiryYear) + && Objects.equals(this.externalToken, storedPaymentMethod.externalToken) + && Objects.equals(this.isSetExternalToken, storedPaymentMethod.isSetExternalToken) && Objects.equals(this.holderName, storedPaymentMethod.holderName) && Objects.equals(this.isSetHolderName, storedPaymentMethod.isSetHolderName) && Objects.equals(this.iban, storedPaymentMethod.iban) @@ -926,6 +976,8 @@ public int hashCode() { isSetExpiryMonth, expiryYear, isSetExpiryYear, + externalToken, + isSetExternalToken, holderName, isSetHolderName, iban, @@ -962,6 +1014,7 @@ public String toString() { sb.append(" cashtag: ").append(toIndentedString(cashtag)).append("\n"); sb.append(" expiryMonth: ").append(toIndentedString(expiryMonth)).append("\n"); sb.append(" expiryYear: ").append(toIndentedString(expiryYear)).append("\n"); + sb.append(" externalToken: ").append(toIndentedString(externalToken)).append("\n"); sb.append(" holderName: ").append(toIndentedString(holderName)).append("\n"); sb.append(" iban: ").append(toIndentedString(iban)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -1020,6 +1073,9 @@ public Map getExplicitNulls() { if (isSetExpiryYear) { addIfNull(nulls, JSON_PROPERTY_EXPIRY_YEAR, this.expiryYear); } + if (isSetExternalToken) { + addIfNull(nulls, JSON_PROPERTY_EXTERNAL_TOKEN, this.externalToken); + } if (isSetHolderName) { addIfNull(nulls, JSON_PROPERTY_HOLDER_NAME, this.holderName); } diff --git a/src/main/java/com/adyen/model/checkout/TemporaryServices.java b/src/main/java/com/adyen/model/checkout/TemporaryServices.java new file mode 100644 index 000000000..aa948e6fd --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/TemporaryServices.java @@ -0,0 +1,558 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.time.LocalDate; +import java.util.*; + +/** TemporaryServices */ +@JsonPropertyOrder({ + TemporaryServices.JSON_PROPERTY_EMPLOYEE_NAME, + TemporaryServices.JSON_PROPERTY_END_DATE, + TemporaryServices.JSON_PROPERTY_HOUR_RATE, + TemporaryServices.JSON_PROPERTY_HOURS_WORKED, + TemporaryServices.JSON_PROPERTY_JOB_DESCRIPTION, + TemporaryServices.JSON_PROPERTY_SERVICE_REQUESTOR, + TemporaryServices.JSON_PROPERTY_START_DATE +}) +public class TemporaryServices { + public static final String JSON_PROPERTY_EMPLOYEE_NAME = "employeeName"; + private String employeeName; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEmployeeName = false; + + public static final String JSON_PROPERTY_END_DATE = "endDate"; + private LocalDate endDate; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEndDate = false; + + public static final String JSON_PROPERTY_HOUR_RATE = "hourRate"; + private Integer hourRate; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetHourRate = false; + + public static final String JSON_PROPERTY_HOURS_WORKED = "hoursWorked"; + private Integer hoursWorked; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetHoursWorked = false; + + public static final String JSON_PROPERTY_JOB_DESCRIPTION = "jobDescription"; + private String jobDescription; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetJobDescription = false; + + public static final String JSON_PROPERTY_SERVICE_REQUESTOR = "serviceRequestor"; + private String serviceRequestor; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetServiceRequestor = false; + + public static final String JSON_PROPERTY_START_DATE = "startDate"; + private LocalDate startDate; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetStartDate = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public TemporaryServices() {} + + /** + * The name or ID of the person working in a temporary capacity. * Format: ASCII * Must not start + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.employeeName` + * + * @param employeeName The name or ID of the person working in a temporary capacity. * Format: + * ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.employeeName` + * @return the current {@code TemporaryServices} instance, allowing for method chaining + */ + public TemporaryServices employeeName(String employeeName) { + this.employeeName = employeeName; + isSetEmployeeName = true; // mark as set + return this; + } + + /** + * The name or ID of the person working in a temporary capacity. * Format: ASCII * Must not start + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.employeeName` + * + * @return employeeName The name or ID of the person working in a temporary capacity. * Format: + * ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.employeeName` + */ + @JsonProperty(JSON_PROPERTY_EMPLOYEE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmployeeName() { + return employeeName; + } + + /** + * The name or ID of the person working in a temporary capacity. * Format: ASCII * Must not start + * with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.employeeName` + * + * @param employeeName The name or ID of the person working in a temporary capacity. * Format: + * ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.employeeName` + */ + @JsonProperty(JSON_PROPERTY_EMPLOYEE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmployeeName(String employeeName) { + this.employeeName = employeeName; + isSetEmployeeName = true; // mark as set + } + + /** + * The billing period end date. * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): + * yyyy-MM-dd * **additionalData key:** `enhancedSchemeData.tempWeekEnding` + * + * @param endDate The billing period end date. * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.tempWeekEnding` + * @return the current {@code TemporaryServices} instance, allowing for method chaining + */ + public TemporaryServices endDate(LocalDate endDate) { + this.endDate = endDate; + isSetEndDate = true; // mark as set + return this; + } + + /** + * The billing period end date. * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): + * yyyy-MM-dd * **additionalData key:** `enhancedSchemeData.tempWeekEnding` + * + * @return endDate The billing period end date. * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.tempWeekEnding` + */ + @JsonProperty(JSON_PROPERTY_END_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalDate getEndDate() { + return endDate; + } + + /** + * The billing period end date. * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): + * yyyy-MM-dd * **additionalData key:** `enhancedSchemeData.tempWeekEnding` + * + * @param endDate The billing period end date. * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.tempWeekEnding` + */ + @JsonProperty(JSON_PROPERTY_END_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + isSetEndDate = true; // mark as set + } + + /** + * The hourly rate for the temporary services, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.regularHoursRate` + * + * @param hourRate The hourly rate for the temporary services, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.regularHoursRate` + * @return the current {@code TemporaryServices} instance, allowing for method chaining + */ + public TemporaryServices hourRate(Integer hourRate) { + this.hourRate = hourRate; + isSetHourRate = true; // mark as set + return this; + } + + /** + * The hourly rate for the temporary services, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.regularHoursRate` + * + * @return hourRate The hourly rate for the temporary services, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.regularHoursRate` + */ + @JsonProperty(JSON_PROPERTY_HOUR_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getHourRate() { + return hourRate; + } + + /** + * The hourly rate for the temporary services, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means + * USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.regularHoursRate` + * + * @param hourRate The hourly rate for the temporary services, in [minor + * units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 + * means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * **additionalData key:** + * `enhancedSchemeData.regularHoursRate` + */ + @JsonProperty(JSON_PROPERTY_HOUR_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHourRate(Integer hourRate) { + this.hourRate = hourRate; + isSetHourRate = true; // mark as set + } + + /** + * The number of hours worked during the billing period. * Format: Numeric * **additionalData + * key:** `enhancedSchemeData.regularHoursWorked` + * + * @param hoursWorked The number of hours worked during the billing period. * Format: Numeric * + * **additionalData key:** `enhancedSchemeData.regularHoursWorked` + * @return the current {@code TemporaryServices} instance, allowing for method chaining + */ + public TemporaryServices hoursWorked(Integer hoursWorked) { + this.hoursWorked = hoursWorked; + isSetHoursWorked = true; // mark as set + return this; + } + + /** + * The number of hours worked during the billing period. * Format: Numeric * **additionalData + * key:** `enhancedSchemeData.regularHoursWorked` + * + * @return hoursWorked The number of hours worked during the billing period. * Format: Numeric * + * **additionalData key:** `enhancedSchemeData.regularHoursWorked` + */ + @JsonProperty(JSON_PROPERTY_HOURS_WORKED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getHoursWorked() { + return hoursWorked; + } + + /** + * The number of hours worked during the billing period. * Format: Numeric * **additionalData + * key:** `enhancedSchemeData.regularHoursWorked` + * + * @param hoursWorked The number of hours worked during the billing period. * Format: Numeric * + * **additionalData key:** `enhancedSchemeData.regularHoursWorked` + */ + @JsonProperty(JSON_PROPERTY_HOURS_WORKED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHoursWorked(Integer hoursWorked) { + this.hoursWorked = hoursWorked; + isSetHoursWorked = true; // mark as set + } + + /** + * The job description of the person working in a temporary capacity. * Format: ASCII * Must not + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.jobDescription` + * + * @param jobDescription The job description of the person working in a temporary capacity. * + * Format: ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.jobDescription` + * @return the current {@code TemporaryServices} instance, allowing for method chaining + */ + public TemporaryServices jobDescription(String jobDescription) { + this.jobDescription = jobDescription; + isSetJobDescription = true; // mark as set + return this; + } + + /** + * The job description of the person working in a temporary capacity. * Format: ASCII * Must not + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.jobDescription` + * + * @return jobDescription The job description of the person working in a temporary capacity. * + * Format: ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.jobDescription` + */ + @JsonProperty(JSON_PROPERTY_JOB_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getJobDescription() { + return jobDescription; + } + + /** + * The job description of the person working in a temporary capacity. * Format: ASCII * Must not + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.jobDescription` + * + * @param jobDescription The job description of the person working in a temporary capacity. * + * Format: ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.jobDescription` + */ + @JsonProperty(JSON_PROPERTY_JOB_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJobDescription(String jobDescription) { + this.jobDescription = jobDescription; + isSetJobDescription = true; // mark as set + } + + /** + * The name of the person requesting the temporary services. * Format: ASCII * Must not start with + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.requestName` + * + * @param serviceRequestor The name of the person requesting the temporary services. * Format: + * ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.requestName` + * @return the current {@code TemporaryServices} instance, allowing for method chaining + */ + public TemporaryServices serviceRequestor(String serviceRequestor) { + this.serviceRequestor = serviceRequestor; + isSetServiceRequestor = true; // mark as set + return this; + } + + /** + * The name of the person requesting the temporary services. * Format: ASCII * Must not start with + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.requestName` + * + * @return serviceRequestor The name of the person requesting the temporary services. * Format: + * ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.requestName` + */ + @JsonProperty(JSON_PROPERTY_SERVICE_REQUESTOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceRequestor() { + return serviceRequestor; + } + + /** + * The name of the person requesting the temporary services. * Format: ASCII * Must not start with + * a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `enhancedSchemeData.requestName` + * + * @param serviceRequestor The name of the person requesting the temporary services. * Format: + * ASCII * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `enhancedSchemeData.requestName` + */ + @JsonProperty(JSON_PROPERTY_SERVICE_REQUESTOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setServiceRequestor(String serviceRequestor) { + this.serviceRequestor = serviceRequestor; + isSetServiceRequestor = true; // mark as set + } + + /** + * The billing period start date. * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): + * yyyy-MM-dd * **additionalData key:** `enhancedSchemeData.tempStartDate` + * + * @param startDate The billing period start date. * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.tempStartDate` + * @return the current {@code TemporaryServices} instance, allowing for method chaining + */ + public TemporaryServices startDate(LocalDate startDate) { + this.startDate = startDate; + isSetStartDate = true; // mark as set + return this; + } + + /** + * The billing period start date. * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): + * yyyy-MM-dd * **additionalData key:** `enhancedSchemeData.tempStartDate` + * + * @return startDate The billing period start date. * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.tempStartDate` + */ + @JsonProperty(JSON_PROPERTY_START_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalDate getStartDate() { + return startDate; + } + + /** + * The billing period start date. * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): + * yyyy-MM-dd * **additionalData key:** `enhancedSchemeData.tempStartDate` + * + * @param startDate The billing period start date. * Format [ISO + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `enhancedSchemeData.tempStartDate` + */ + @JsonProperty(JSON_PROPERTY_START_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + isSetStartDate = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public TemporaryServices includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this TemporaryServices object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemporaryServices temporaryServices = (TemporaryServices) o; + return Objects.equals(this.employeeName, temporaryServices.employeeName) + && Objects.equals(this.isSetEmployeeName, temporaryServices.isSetEmployeeName) + && Objects.equals(this.endDate, temporaryServices.endDate) + && Objects.equals(this.isSetEndDate, temporaryServices.isSetEndDate) + && Objects.equals(this.hourRate, temporaryServices.hourRate) + && Objects.equals(this.isSetHourRate, temporaryServices.isSetHourRate) + && Objects.equals(this.hoursWorked, temporaryServices.hoursWorked) + && Objects.equals(this.isSetHoursWorked, temporaryServices.isSetHoursWorked) + && Objects.equals(this.jobDescription, temporaryServices.jobDescription) + && Objects.equals(this.isSetJobDescription, temporaryServices.isSetJobDescription) + && Objects.equals(this.serviceRequestor, temporaryServices.serviceRequestor) + && Objects.equals(this.isSetServiceRequestor, temporaryServices.isSetServiceRequestor) + && Objects.equals(this.startDate, temporaryServices.startDate) + && Objects.equals(this.isSetStartDate, temporaryServices.isSetStartDate); + } + + @Override + public int hashCode() { + return Objects.hash( + employeeName, + isSetEmployeeName, + endDate, + isSetEndDate, + hourRate, + isSetHourRate, + hoursWorked, + isSetHoursWorked, + jobDescription, + isSetJobDescription, + serviceRequestor, + isSetServiceRequestor, + startDate, + isSetStartDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemporaryServices {\n"); + sb.append(" employeeName: ").append(toIndentedString(employeeName)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" hourRate: ").append(toIndentedString(hourRate)).append("\n"); + sb.append(" hoursWorked: ").append(toIndentedString(hoursWorked)).append("\n"); + sb.append(" jobDescription: ").append(toIndentedString(jobDescription)).append("\n"); + sb.append(" serviceRequestor: ").append(toIndentedString(serviceRequestor)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetEmployeeName) { + addIfNull(nulls, JSON_PROPERTY_EMPLOYEE_NAME, this.employeeName); + } + if (isSetEndDate) { + addIfNull(nulls, JSON_PROPERTY_END_DATE, this.endDate); + } + if (isSetHourRate) { + addIfNull(nulls, JSON_PROPERTY_HOUR_RATE, this.hourRate); + } + if (isSetHoursWorked) { + addIfNull(nulls, JSON_PROPERTY_HOURS_WORKED, this.hoursWorked); + } + if (isSetJobDescription) { + addIfNull(nulls, JSON_PROPERTY_JOB_DESCRIPTION, this.jobDescription); + } + if (isSetServiceRequestor) { + addIfNull(nulls, JSON_PROPERTY_SERVICE_REQUESTOR, this.serviceRequestor); + } + if (isSetStartDate) { + addIfNull(nulls, JSON_PROPERTY_START_DATE, this.startDate); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of TemporaryServices given an JSON string + * + * @param jsonString JSON string + * @return An instance of TemporaryServices + * @throws JsonProcessingException if the JSON string is invalid with respect to TemporaryServices + */ + public static TemporaryServices fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TemporaryServices.class); + } + + /** + * Convert an instance of TemporaryServices to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/ThirdPartyTokenRedundancyInfo.java b/src/main/java/com/adyen/model/checkout/ThirdPartyTokenRedundancyInfo.java new file mode 100644 index 000000000..dde016e66 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/ThirdPartyTokenRedundancyInfo.java @@ -0,0 +1,261 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 72 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.adyen.model.checkout; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.HashMap; +import java.util.Map; + +/** ThirdPartyTokenRedundancyInfo */ +@JsonPropertyOrder({ + ThirdPartyTokenRedundancyInfo.JSON_PROPERTY_REQUEST_PARAMETERS, + ThirdPartyTokenRedundancyInfo.JSON_PROPERTY_REQUEST_TEMPLATE_CODE +}) +public class ThirdPartyTokenRedundancyInfo { + public static final String JSON_PROPERTY_REQUEST_PARAMETERS = "requestParameters"; + private Map requestParameters; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRequestParameters = false; + + public static final String JSON_PROPERTY_REQUEST_TEMPLATE_CODE = "requestTemplateCode"; + private String requestTemplateCode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRequestTemplateCode = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ThirdPartyTokenRedundancyInfo() {} + + /** + * Request-specific parameter values to populate the template placeholders. Each key must match a + * placeholder defined in the template referenced by `requestTemplateCode`. + * + * @param requestParameters Request-specific parameter values to populate the template + * placeholders. Each key must match a placeholder defined in the template referenced by + * `requestTemplateCode`. + * @return the current {@code ThirdPartyTokenRedundancyInfo} instance, allowing for method + * chaining + */ + public ThirdPartyTokenRedundancyInfo requestParameters(Map requestParameters) { + this.requestParameters = requestParameters; + isSetRequestParameters = true; // mark as set + return this; + } + + public ThirdPartyTokenRedundancyInfo putRequestParametersItem( + String key, String requestParametersItem) { + if (this.requestParameters == null) { + this.requestParameters = new HashMap<>(); + } + this.requestParameters.put(key, requestParametersItem); + return this; + } + + /** + * Request-specific parameter values to populate the template placeholders. Each key must match a + * placeholder defined in the template referenced by `requestTemplateCode`. + * + * @return requestParameters Request-specific parameter values to populate the template + * placeholders. Each key must match a placeholder defined in the template referenced by + * `requestTemplateCode`. + */ + @JsonProperty(JSON_PROPERTY_REQUEST_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getRequestParameters() { + return requestParameters; + } + + /** + * Request-specific parameter values to populate the template placeholders. Each key must match a + * placeholder defined in the template referenced by `requestTemplateCode`. + * + * @param requestParameters Request-specific parameter values to populate the template + * placeholders. Each key must match a placeholder defined in the template referenced by + * `requestTemplateCode`. + */ + @JsonProperty(JSON_PROPERTY_REQUEST_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestParameters(Map requestParameters) { + this.requestParameters = requestParameters; + isSetRequestParameters = true; // mark as set + } + + /** + * Identifier for the third-party token request template configured in your Adyen account. This + * template defines the structure and endpoint for token requests. + * + * @param requestTemplateCode Identifier for the third-party token request template configured in + * your Adyen account. This template defines the structure and endpoint for token requests. + * @return the current {@code ThirdPartyTokenRedundancyInfo} instance, allowing for method + * chaining + */ + public ThirdPartyTokenRedundancyInfo requestTemplateCode(String requestTemplateCode) { + this.requestTemplateCode = requestTemplateCode; + isSetRequestTemplateCode = true; // mark as set + return this; + } + + /** + * Identifier for the third-party token request template configured in your Adyen account. This + * template defines the structure and endpoint for token requests. + * + * @return requestTemplateCode Identifier for the third-party token request template configured in + * your Adyen account. This template defines the structure and endpoint for token requests. + */ + @JsonProperty(JSON_PROPERTY_REQUEST_TEMPLATE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestTemplateCode() { + return requestTemplateCode; + } + + /** + * Identifier for the third-party token request template configured in your Adyen account. This + * template defines the structure and endpoint for token requests. + * + * @param requestTemplateCode Identifier for the third-party token request template configured in + * your Adyen account. This template defines the structure and endpoint for token requests. + */ + @JsonProperty(JSON_PROPERTY_REQUEST_TEMPLATE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestTemplateCode(String requestTemplateCode) { + this.requestTemplateCode = requestTemplateCode; + isSetRequestTemplateCode = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ThirdPartyTokenRedundancyInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ThirdPartyTokenRedundancyInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ThirdPartyTokenRedundancyInfo thirdPartyTokenRedundancyInfo = (ThirdPartyTokenRedundancyInfo) o; + return Objects.equals(this.requestParameters, thirdPartyTokenRedundancyInfo.requestParameters) + && Objects.equals( + this.isSetRequestParameters, thirdPartyTokenRedundancyInfo.isSetRequestParameters) + && Objects.equals( + this.requestTemplateCode, thirdPartyTokenRedundancyInfo.requestTemplateCode) + && Objects.equals( + this.isSetRequestTemplateCode, thirdPartyTokenRedundancyInfo.isSetRequestTemplateCode); + } + + @Override + public int hashCode() { + return Objects.hash( + requestParameters, isSetRequestParameters, requestTemplateCode, isSetRequestTemplateCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ThirdPartyTokenRedundancyInfo {\n"); + sb.append(" requestParameters: ").append(toIndentedString(requestParameters)).append("\n"); + sb.append(" requestTemplateCode: ") + .append(toIndentedString(requestTemplateCode)) + .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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetRequestParameters) { + addIfNull(nulls, JSON_PROPERTY_REQUEST_PARAMETERS, this.requestParameters); + } + if (isSetRequestTemplateCode) { + addIfNull(nulls, JSON_PROPERTY_REQUEST_TEMPLATE_CODE, this.requestTemplateCode); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ThirdPartyTokenRedundancyInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of ThirdPartyTokenRedundancyInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ThirdPartyTokenRedundancyInfo + */ + public static ThirdPartyTokenRedundancyInfo fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ThirdPartyTokenRedundancyInfo.class); + } + + /** + * Convert an instance of ThirdPartyTokenRedundancyInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/checkout/Ticket.java b/src/main/java/com/adyen/model/checkout/Ticket.java index 11d97f884..17d73f6c4 100644 --- a/src/main/java/com/adyen/model/checkout/Ticket.java +++ b/src/main/java/com/adyen/model/checkout/Ticket.java @@ -55,10 +55,11 @@ public Ticket() {} /** * The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: - * 16 characters + * 16 characters * **additionalData key:** `airline.ticket_issue_address` * * @param issueAddress The address of the organization that issued the ticket. * minLength: 0 - * characters * maxLength: 16 characters + * characters * maxLength: 16 characters * **additionalData key:** + * `airline.ticket_issue_address` * @return the current {@code Ticket} instance, allowing for method chaining */ public Ticket issueAddress(String issueAddress) { @@ -69,10 +70,11 @@ public Ticket issueAddress(String issueAddress) { /** * The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: - * 16 characters + * 16 characters * **additionalData key:** `airline.ticket_issue_address` * * @return issueAddress The address of the organization that issued the ticket. * minLength: 0 - * characters * maxLength: 16 characters + * characters * maxLength: 16 characters * **additionalData key:** + * `airline.ticket_issue_address` */ @JsonProperty(JSON_PROPERTY_ISSUE_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -82,10 +84,11 @@ public String getIssueAddress() { /** * The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: - * 16 characters + * 16 characters * **additionalData key:** `airline.ticket_issue_address` * * @param issueAddress The address of the organization that issued the ticket. * minLength: 0 - * characters * maxLength: 16 characters + * characters * maxLength: 16 characters * **additionalData key:** + * `airline.ticket_issue_address` */ @JsonProperty(JSON_PROPERTY_ISSUE_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -96,11 +99,13 @@ public void setIssueAddress(String issueAddress) { /** * The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: - * 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `airline.issue_date` * * @param issueDate The date that the ticket was issued to the passenger. * minLength: 10 * characters * maxLength: 10 characters * Format [ISO - * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `airline.issue_date` * @return the current {@code Ticket} instance, allowing for method chaining */ public Ticket issueDate(LocalDate issueDate) { @@ -111,11 +116,13 @@ public Ticket issueDate(LocalDate issueDate) { /** * The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: - * 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `airline.issue_date` * * @return issueDate The date that the ticket was issued to the passenger. * minLength: 10 * characters * maxLength: 10 characters * Format [ISO - * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `airline.issue_date` */ @JsonProperty(JSON_PROPERTY_ISSUE_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -125,11 +132,13 @@ public LocalDate getIssueDate() { /** * The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: - * 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * + * **additionalData key:** `airline.issue_date` * * @param issueDate The date that the ticket was issued to the passenger. * minLength: 10 * characters * maxLength: 10 characters * Format [ISO - * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd * **additionalData key:** + * `airline.issue_date` */ @JsonProperty(JSON_PROPERTY_ISSUE_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -140,10 +149,12 @@ public void setIssueDate(LocalDate issueDate) { /** * The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must - * not start with a space or be all spaces. * Must not be all zeros. + * not start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.ticket_number` * * @param number The ticket's unique identifier. * minLength: 1 character * maxLength: 15 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.ticket_number` * @return the current {@code Ticket} instance, allowing for method chaining */ public Ticket number(String number) { @@ -154,10 +165,12 @@ public Ticket number(String number) { /** * The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must - * not start with a space or be all spaces. * Must not be all zeros. + * not start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.ticket_number` * * @return number The ticket's unique identifier. * minLength: 1 character * maxLength: 15 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.ticket_number` */ @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -167,10 +180,12 @@ public String getNumber() { /** * The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must - * not start with a space or be all spaces. * Must not be all zeros. + * not start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.ticket_number` * * @param number The ticket's unique identifier. * minLength: 1 character * maxLength: 15 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.ticket_number` */ @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/TravelAgency.java b/src/main/java/com/adyen/model/checkout/TravelAgency.java index 93611fad0..0db715b4a 100644 --- a/src/main/java/com/adyen/model/checkout/TravelAgency.java +++ b/src/main/java/com/adyen/model/checkout/TravelAgency.java @@ -45,11 +45,13 @@ public TravelAgency() {} /** * The unique identifier from IATA or ARC for the travel agency that issues the ticket. * * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.travel_agency_code` * * @param code The unique identifier from IATA or ARC for the travel agency that issues the * ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not - * start with a space or be all spaces. * Must not be all zeros. + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.travel_agency_code` * @return the current {@code TravelAgency} instance, allowing for method chaining */ public TravelAgency code(String code) { @@ -61,11 +63,13 @@ public TravelAgency code(String code) { /** * The unique identifier from IATA or ARC for the travel agency that issues the ticket. * * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.travel_agency_code` * * @return code The unique identifier from IATA or ARC for the travel agency that issues the * ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not - * start with a space or be all spaces. * Must not be all zeros. + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.travel_agency_code` */ @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -76,11 +80,13 @@ public String getCode() { /** * The unique identifier from IATA or ARC for the travel agency that issues the ticket. * * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a - * space or be all spaces. * Must not be all zeros. + * space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.travel_agency_code` * * @param code The unique identifier from IATA or ARC for the travel agency that issues the * ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not - * start with a space or be all spaces. * Must not be all zeros. + * start with a space or be all spaces. * Must not be all zeros. * **additionalData key:** + * `airline.travel_agency_code` */ @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -91,11 +97,12 @@ public void setCode(String code) { /** * The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.travel_agency_name` * * @param name The name of the travel agency. * Encoding: ASCII * minLength: 1 character * * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all - * zeros. + * zeros. * **additionalData key:** `airline.travel_agency_name` * @return the current {@code TravelAgency} instance, allowing for method chaining */ public TravelAgency name(String name) { @@ -106,11 +113,12 @@ public TravelAgency name(String name) { /** * The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.travel_agency_name` * * @return name The name of the travel agency. * Encoding: ASCII * minLength: 1 character * * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all - * zeros. + * zeros. * **additionalData key:** `airline.travel_agency_name` */ @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -120,11 +128,12 @@ public String getName() { /** * The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 - * characters * Must not start with a space or be all spaces. * Must not be all zeros. + * characters * Must not start with a space or be all spaces. * Must not be all zeros. * + * **additionalData key:** `airline.travel_agency_name` * * @param name The name of the travel agency. * Encoding: ASCII * minLength: 1 character * * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all - * zeros. + * zeros. * **additionalData key:** `airline.travel_agency_name` */ @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)