@@ -9,21 +9,44 @@ import ApiClient from '../ApiClient';
99import OrderLineItemProject from './OrderLineItemProject' ;
1010
1111class OrderLineItem {
12- constructor ( project , vintageYear , amount , unit , price , currency ) {
12+ constructor (
13+ project ,
14+ vintageYear ,
15+ vintageStartYear ,
16+ vintageEndYear ,
17+ amount ,
18+ unit ,
19+ price ,
20+ currency
21+ ) {
1322 OrderLineItem . initialize (
1423 this ,
1524 project ,
1625 vintageYear ,
26+ vintageStartYear ,
27+ vintageEndYear ,
1728 amount ,
1829 unit ,
1930 price ,
2031 currency
2132 ) ;
2233 }
2334
24- static initialize ( obj , project , vintageYear , amount , unit , price , currency ) {
35+ static initialize (
36+ obj ,
37+ project ,
38+ vintageYear ,
39+ vintageStartYear ,
40+ vintageEndYear ,
41+ amount ,
42+ unit ,
43+ price ,
44+ currency
45+ ) {
2546 obj [ 'project' ] = project ;
2647 obj [ 'vintage_year' ] = vintageYear ;
48+ obj [ 'vintage_start_year' ] = vintageStartYear ;
49+ obj [ 'vintage_end_year' ] = vintageEndYear ;
2750 obj [ 'amount' ] = amount ;
2851 obj [ 'unit' ] = unit ;
2952 obj [ 'price' ] = price ;
@@ -52,6 +75,20 @@ class OrderLineItem {
5275 ) ;
5376 }
5477
78+ if ( data . hasOwnProperty ( 'vintage_start_year' ) ) {
79+ obj [ 'vintage_start_year' ] = ApiClient . convertToType (
80+ data [ 'vintage_start_year' ] ,
81+ 'Number'
82+ ) ;
83+ }
84+
85+ if ( data . hasOwnProperty ( 'vintage_end_year' ) ) {
86+ obj [ 'vintage_end_year' ] = ApiClient . convertToType (
87+ data [ 'vintage_end_year' ] ,
88+ 'Number'
89+ ) ;
90+ }
91+
5592 if ( data . hasOwnProperty ( 'amount' ) ) {
5693 obj [ 'amount' ] = ApiClient . convertToType ( data [ 'amount' ] , 'Number' ) ;
5794 }
@@ -78,6 +115,10 @@ OrderLineItem.prototype['project'] = undefined;
78115
79116OrderLineItem . prototype [ 'vintage_year' ] = undefined ;
80117
118+ OrderLineItem . prototype [ 'vintage_start_year' ] = undefined ;
119+
120+ OrderLineItem . prototype [ 'vintage_end_year' ] = undefined ;
121+
81122OrderLineItem . prototype [ 'amount' ] = undefined ;
82123
83124OrderLineItem . prototype [ 'unit' ] = undefined ;
0 commit comments