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

add missing IdentityDocument type to OrderPassenger #90

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;

}

}
Loading