8
8
import ApiClient from '../ApiClient' ;
9
9
10
10
class CreateFlightEstimateRequest {
11
- constructor ( distanceM ) {
12
- CreateFlightEstimateRequest . initialize ( this , distanceM ) ;
11
+ constructor ( ) {
12
+ CreateFlightEstimateRequest . initialize ( this ) ;
13
13
}
14
14
15
- static initialize ( obj , distanceM ) {
16
- obj [ 'distance_m' ] = distanceM ;
17
- }
15
+ static initialize ( obj ) { }
18
16
19
17
static constructFromObject ( data , obj ) {
20
18
if ( data ) {
@@ -27,6 +25,41 @@ class CreateFlightEstimateRequest {
27
25
) ;
28
26
}
29
27
28
+ if ( data . hasOwnProperty ( 'origin_airport' ) ) {
29
+ obj [ 'origin_airport' ] = ApiClient . convertToType (
30
+ data [ 'origin_airport' ] ,
31
+ 'String'
32
+ ) ;
33
+ }
34
+
35
+ if ( data . hasOwnProperty ( 'destination_airport' ) ) {
36
+ obj [ 'destination_airport' ] = ApiClient . convertToType (
37
+ data [ 'destination_airport' ] ,
38
+ 'String'
39
+ ) ;
40
+ }
41
+
42
+ if ( data . hasOwnProperty ( 'aircraft_code' ) ) {
43
+ obj [ 'aircraft_code' ] = ApiClient . convertToType (
44
+ data [ 'aircraft_code' ] ,
45
+ 'String'
46
+ ) ;
47
+ }
48
+
49
+ if ( data . hasOwnProperty ( 'cabin_class' ) ) {
50
+ obj [ 'cabin_class' ] = ApiClient . convertToType (
51
+ data [ 'cabin_class' ] ,
52
+ 'String'
53
+ ) ;
54
+ }
55
+
56
+ if ( data . hasOwnProperty ( 'passenger_count' ) ) {
57
+ obj [ 'passenger_count' ] = ApiClient . convertToType (
58
+ data [ 'passenger_count' ] ,
59
+ 'Number'
60
+ ) ;
61
+ }
62
+
30
63
if ( data . hasOwnProperty ( 'project_id' ) ) {
31
64
obj [ 'project_id' ] = ApiClient . convertToType (
32
65
data [ 'project_id' ] ,
@@ -47,6 +80,16 @@ class CreateFlightEstimateRequest {
47
80
48
81
CreateFlightEstimateRequest . prototype [ 'distance_m' ] = undefined ;
49
82
83
+ CreateFlightEstimateRequest . prototype [ 'origin_airport' ] = undefined ;
84
+
85
+ CreateFlightEstimateRequest . prototype [ 'destination_airport' ] = undefined ;
86
+
87
+ CreateFlightEstimateRequest . prototype [ 'aircraft_code' ] = undefined ;
88
+
89
+ CreateFlightEstimateRequest . prototype [ 'cabin_class' ] = undefined ;
90
+
91
+ CreateFlightEstimateRequest . prototype [ 'passenger_count' ] = undefined ;
92
+
50
93
CreateFlightEstimateRequest . prototype [ 'project_id' ] = undefined ;
51
94
52
95
CreateFlightEstimateRequest . prototype [ 'create_order' ] = undefined ;
0 commit comments