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

Commit

Permalink
Merge pull request #90 from CGRDMZ/main
Browse files Browse the repository at this point in the history
add missing IdentityDocument type to OrderPassenger
  • Loading branch information
commanderofthegrey authored Aug 15, 2024
2 parents 64c1ea8 + a2d9532 commit f1b85a4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/main/java/com/duffel/model/IdentityDocumentType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.duffel.model;

public enum IdentityDocumentType {
passport,
tax_id,
known_traveler_number,
passenger_redress_number
}
34 changes: 33 additions & 1 deletion src/main/java/com/duffel/model/OrderPassenger.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> identityDocuments;
private List<IdentityDocument> identityDocuments;

/**
* The id of the passenger, returned when the OffersRequest was created
Expand Down Expand Up @@ -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;

}

}

0 comments on commit f1b85a4

Please sign in to comment.