77
88import ApiClient from '../ApiClient' ;
99import Allocation from './Allocation' ;
10+ import OrderInventory from './OrderInventory' ;
1011
1112class Order {
1213 constructor (
1314 id ,
1415 massG ,
1516 production ,
1617 state ,
18+ amount ,
19+ unit ,
20+ price ,
21+ patchFee ,
22+ currency ,
1723 allocationState ,
1824 priceCentsUsd ,
1925 patchFeeCentsUsd ,
@@ -25,6 +31,11 @@ class Order {
2531 massG ,
2632 production ,
2733 state ,
34+ amount ,
35+ unit ,
36+ price ,
37+ patchFee ,
38+ currency ,
2839 allocationState ,
2940 priceCentsUsd ,
3041 patchFeeCentsUsd ,
@@ -38,6 +49,11 @@ class Order {
3849 massG ,
3950 production ,
4051 state ,
52+ amount ,
53+ unit ,
54+ price ,
55+ patchFee ,
56+ currency ,
4157 allocationState ,
4258 priceCentsUsd ,
4359 patchFeeCentsUsd ,
@@ -47,6 +63,11 @@ class Order {
4763 obj [ 'mass_g' ] = massG ;
4864 obj [ 'production' ] = production ;
4965 obj [ 'state' ] = state ;
66+ obj [ 'amount' ] = amount ;
67+ obj [ 'unit' ] = unit ;
68+ obj [ 'price' ] = price ;
69+ obj [ 'patch_fee' ] = patchFee ;
70+ obj [ 'currency' ] = currency ;
5071 obj [ 'allocation_state' ] = allocationState ;
5172 obj [ 'price_cents_usd' ] = priceCentsUsd ;
5273 obj [ 'patch_fee_cents_usd' ] = patchFeeCentsUsd ;
@@ -80,6 +101,26 @@ class Order {
80101 obj [ 'state' ] = ApiClient . convertToType ( data [ 'state' ] , 'String' ) ;
81102 }
82103
104+ if ( data . hasOwnProperty ( 'amount' ) ) {
105+ obj [ 'amount' ] = ApiClient . convertToType ( data [ 'amount' ] , 'Number' ) ;
106+ }
107+
108+ if ( data . hasOwnProperty ( 'unit' ) ) {
109+ obj [ 'unit' ] = ApiClient . convertToType ( data [ 'unit' ] , 'String' ) ;
110+ }
111+
112+ if ( data . hasOwnProperty ( 'price' ) ) {
113+ obj [ 'price' ] = ApiClient . convertToType ( data [ 'price' ] , 'Number' ) ;
114+ }
115+
116+ if ( data . hasOwnProperty ( 'patch_fee' ) ) {
117+ obj [ 'patch_fee' ] = ApiClient . convertToType ( data [ 'patch_fee' ] , 'Number' ) ;
118+ }
119+
120+ if ( data . hasOwnProperty ( 'currency' ) ) {
121+ obj [ 'currency' ] = ApiClient . convertToType ( data [ 'currency' ] , 'String' ) ;
122+ }
123+
83124 if ( data . hasOwnProperty ( 'allocation_state' ) ) {
84125 obj [ 'allocation_state' ] = ApiClient . convertToType (
85126 data [ 'allocation_state' ] ,
@@ -117,6 +158,12 @@ class Order {
117158 if ( data . hasOwnProperty ( 'metadata' ) ) {
118159 obj [ 'metadata' ] = ApiClient . convertToType ( data [ 'metadata' ] , Object ) ;
119160 }
161+
162+ if ( data . hasOwnProperty ( 'inventory' ) ) {
163+ obj [ 'inventory' ] = ApiClient . convertToType ( data [ 'inventory' ] , [
164+ OrderInventory
165+ ] ) ;
166+ }
120167 }
121168 return obj ;
122169 }
@@ -132,6 +179,16 @@ Order.prototype['production'] = undefined;
132179
133180Order . prototype [ 'state' ] = undefined ;
134181
182+ Order . prototype [ 'amount' ] = undefined ;
183+
184+ Order . prototype [ 'unit' ] = undefined ;
185+
186+ Order . prototype [ 'price' ] = undefined ;
187+
188+ Order . prototype [ 'patch_fee' ] = undefined ;
189+
190+ Order . prototype [ 'currency' ] = undefined ;
191+
135192Order . prototype [ 'allocation_state' ] = undefined ;
136193
137194Order . prototype [ 'price_cents_usd' ] = undefined ;
@@ -144,4 +201,6 @@ Order.prototype['registry_url'] = undefined;
144201
145202Order . prototype [ 'metadata' ] = undefined ;
146203
204+ Order . prototype [ 'inventory' ] = undefined ;
205+
147206export default Order ;
0 commit comments