From a2d9532549e73473cb1021ff28bbfd430fd35360 Mon Sep 17 00:00:00 2001 From: cgrdmz Date: Tue, 13 Aug 2024 13:17:15 +0300 Subject: [PATCH] add missing IdentityDocument type to OrderPassenger --- .../duffel/model/IdentityDocumentType.java | 8 +++++ .../java/com/duffel/model/OrderPassenger.java | 34 ++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/duffel/model/IdentityDocumentType.java diff --git a/src/main/java/com/duffel/model/IdentityDocumentType.java b/src/main/java/com/duffel/model/IdentityDocumentType.java new file mode 100644 index 0000000..af40067 --- /dev/null +++ b/src/main/java/com/duffel/model/IdentityDocumentType.java @@ -0,0 +1,8 @@ +package com.duffel.model; + +public enum IdentityDocumentType { + passport, + tax_id, + known_traveler_number, + passenger_redress_number +} diff --git a/src/main/java/com/duffel/model/OrderPassenger.java b/src/main/java/com/duffel/model/OrderPassenger.java index 46fbee1..f83ef29 100644 --- a/src/main/java/com/duffel/model/OrderPassenger.java +++ b/src/main/java/com/duffel/model/OrderPassenger.java @@ -49,7 +49,7 @@ public class OrderPassenger { * passenger_identity_documents_required is set to true, then an identity document must be provided. */ @JsonProperty("identity_documents") - private List identityDocuments; + private List identityDocuments; /** * The id of the passenger, returned when the OffersRequest was created @@ -87,4 +87,36 @@ public class OrderPassenger { @JsonProperty("born_on") private String bornOn; + @EqualsAndHashCode + @Getter + @Setter + @ToString + public static class IdentityDocument { + + /** + * The type of the identity document. Currently, the only supported types are passport, tax_id, known_traveler_number, and passenger_redress_number. The identity document's type supported by the airline can be found in the offer's supported_passenger_identity_document_types. + */ + @JsonProperty("type") + private IdentityDocumentType identityDocumentType; + + /** + * Must only be provided for passport type. The date on which the identity document expires + */ + @JsonProperty("expires_on") + private String expiresOn; + + /** + * Must only be provided for passport, known_traveler_number, and passenger_redress_number types. The ISO 3166-1 alpha-2 code of the country that issued this identity document + */ + @JsonProperty("issuing_country_code") + private String issuingCountryCode; + + /** + * The unique identifier of the identity document. e.g. the passport number. + */ + @JsonProperty("unique_identifier") + private String uniqueIdentifier; + + } + }