|
| 1 | +/** |
| 2 | + * Patch API V1 |
| 3 | + * The core API used to integrate with Patch's service |
| 4 | + * |
| 5 | + |
| 6 | + */ |
| 7 | + |
| 8 | +import ApiClient from '../ApiClient'; |
| 9 | + |
| 10 | +class CreateVehicleEstimateRequest { |
| 11 | + constructor(distanceM, make, model, year) { |
| 12 | + CreateVehicleEstimateRequest.initialize(this, distanceM, make, model, year); |
| 13 | + } |
| 14 | + |
| 15 | + static initialize(obj, distanceM, make, model, year) { |
| 16 | + obj['distance_m'] = distanceM; |
| 17 | + obj['make'] = make; |
| 18 | + obj['model'] = model; |
| 19 | + obj['year'] = year; |
| 20 | + } |
| 21 | + |
| 22 | + static constructFromObject(data, obj) { |
| 23 | + if (data) { |
| 24 | + obj = obj || new CreateVehicleEstimateRequest(); |
| 25 | + |
| 26 | + if (data.hasOwnProperty('distance_m')) { |
| 27 | + obj['distance_m'] = ApiClient.convertToType( |
| 28 | + data['distance_m'], |
| 29 | + 'Number' |
| 30 | + ); |
| 31 | + } |
| 32 | + |
| 33 | + if (data.hasOwnProperty('make')) { |
| 34 | + obj['make'] = ApiClient.convertToType(data['make'], 'String'); |
| 35 | + } |
| 36 | + |
| 37 | + if (data.hasOwnProperty('model')) { |
| 38 | + obj['model'] = ApiClient.convertToType(data['model'], 'String'); |
| 39 | + } |
| 40 | + |
| 41 | + if (data.hasOwnProperty('year')) { |
| 42 | + obj['year'] = ApiClient.convertToType(data['year'], 'Number'); |
| 43 | + } |
| 44 | + |
| 45 | + if (data.hasOwnProperty('project_id')) { |
| 46 | + obj['project_id'] = ApiClient.convertToType( |
| 47 | + data['project_id'], |
| 48 | + 'String' |
| 49 | + ); |
| 50 | + } |
| 51 | + |
| 52 | + if (data.hasOwnProperty('create_order')) { |
| 53 | + obj['create_order'] = ApiClient.convertToType( |
| 54 | + data['create_order'], |
| 55 | + 'Boolean' |
| 56 | + ); |
| 57 | + } |
| 58 | + } |
| 59 | + return obj; |
| 60 | + } |
| 61 | +} |
| 62 | + |
| 63 | +CreateVehicleEstimateRequest.prototype['distance_m'] = undefined; |
| 64 | + |
| 65 | +CreateVehicleEstimateRequest.prototype['make'] = undefined; |
| 66 | + |
| 67 | +CreateVehicleEstimateRequest.prototype['model'] = undefined; |
| 68 | + |
| 69 | +CreateVehicleEstimateRequest.prototype['year'] = undefined; |
| 70 | + |
| 71 | +CreateVehicleEstimateRequest.prototype['project_id'] = undefined; |
| 72 | + |
| 73 | +CreateVehicleEstimateRequest.prototype['create_order'] = undefined; |
| 74 | + |
| 75 | +export default CreateVehicleEstimateRequest; |
0 commit comments