Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit f1b85a4

Browse files
Merge pull request #90 from CGRDMZ/main
add missing IdentityDocument type to OrderPassenger
2 parents 64c1ea8 + a2d9532 commit f1b85a4

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.duffel.model;
2+
3+
public enum IdentityDocumentType {
4+
passport,
5+
tax_id,
6+
known_traveler_number,
7+
passenger_redress_number
8+
}

src/main/java/com/duffel/model/OrderPassenger.java

+33-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class OrderPassenger {
4949
* passenger_identity_documents_required is set to true, then an identity document must be provided.
5050
*/
5151
@JsonProperty("identity_documents")
52-
private List<String> identityDocuments;
52+
private List<IdentityDocument> identityDocuments;
5353

5454
/**
5555
* The id of the passenger, returned when the OffersRequest was created
@@ -87,4 +87,36 @@ public class OrderPassenger {
8787
@JsonProperty("born_on")
8888
private String bornOn;
8989

90+
@EqualsAndHashCode
91+
@Getter
92+
@Setter
93+
@ToString
94+
public static class IdentityDocument {
95+
96+
/**
97+
* 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.
98+
*/
99+
@JsonProperty("type")
100+
private IdentityDocumentType identityDocumentType;
101+
102+
/**
103+
* Must only be provided for passport type. The date on which the identity document expires
104+
*/
105+
@JsonProperty("expires_on")
106+
private String expiresOn;
107+
108+
/**
109+
* 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
110+
*/
111+
@JsonProperty("issuing_country_code")
112+
private String issuingCountryCode;
113+
114+
/**
115+
* The unique identifier of the identity document. e.g. the passport number.
116+
*/
117+
@JsonProperty("unique_identifier")
118+
private String uniqueIdentifier;
119+
120+
}
121+
90122
}

0 commit comments

Comments
 (0)