File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
main/java/com/amadeus/resources
test/java/com/amadeus/booking Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 6
6
import lombok .Setter ;
7
7
import lombok .ToString ;
8
8
9
+
9
10
/**
10
11
* An Airline object as returned by the Airline Code LookUp API.
11
- * @see com.amadeus.booking.flightOrder #get()
12
+ * @see com.amadeus.booking.FlightOrder #get()
12
13
*/
13
14
@ ToString
14
15
public class FlightOrder extends Resource {
@@ -59,20 +60,34 @@ public static class Name {
59
60
public static class Contact {
60
61
61
62
private @ Getter @ Setter Phone [] phones ;
62
- private @ Getter @ Setter String deviceType ;
63
+ private @ Getter @ Setter DeviceType deviceType ;
64
+
65
+ public enum DeviceType {
66
+ MOBILE ,
67
+ LANDLINE ,
68
+ FAX
69
+ }
63
70
}
64
71
65
72
@ AllArgsConstructor
66
73
@ NoArgsConstructor
67
74
@ ToString
68
75
public static class Document {
69
76
70
- private @ Getter @ Setter String documentType ;
77
+ private @ Getter @ Setter DocumentType documentType ;
71
78
private @ Getter @ Setter String number ;
72
79
public @ Getter @ Setter String expiryDate ;
73
80
private @ Getter @ Setter String issuanceCountry ;
74
81
private @ Getter @ Setter String nationality ;
75
82
private @ Getter @ Setter boolean holder ;
83
+
84
+ public enum DocumentType {
85
+ VISA ,
86
+ PASSPORT ,
87
+ IDENTITY_CARD ,
88
+ KNOWN_TRAVELER ,
89
+ REDRESS
90
+ }
76
91
}
77
92
78
93
@ AllArgsConstructor
Original file line number Diff line number Diff line change @@ -116,11 +116,12 @@ private Traveler[] getTravelerData() {
116
116
117
117
Contact contact = new Contact ();
118
118
contact .setPhones (phone );
119
+ contact .setDeviceType (Contact .DeviceType .MOBILE );
119
120
traveler .setContact (contact );
120
121
121
122
Document [] document = new Document [1 ];
122
123
document [0 ] = new Document ();
123
- document [0 ].setDocumentType (" PASSPORT" );
124
+ document [0 ].setDocumentType (Document . DocumentType . PASSPORT );
124
125
document [0 ].setNumber ("480080076" );
125
126
document [0 ].setExpiryDate ("2022-10-11" );
126
127
document [0 ].setIssuanceCountry ("ES" );
You can’t perform that action at this time.
0 commit comments