|
| 1 | +/** |
| 2 | + * Patch API V1 |
| 3 | + * The core API used to integrate with Patch's service |
| 4 | + * |
| 5 | + * Contact: engineering@usepatch.com |
| 6 | + */ |
| 7 | + |
| 8 | +import ApiClient from '../ApiClient'; |
| 9 | + |
| 10 | +class CreateHotelEstimateRequest { |
| 11 | + constructor(countryCode) { |
| 12 | + CreateHotelEstimateRequest.initialize(this, countryCode); |
| 13 | + } |
| 14 | + |
| 15 | + static initialize(obj, countryCode) { |
| 16 | + obj['country_code'] = countryCode; |
| 17 | + } |
| 18 | + |
| 19 | + static constructFromObject(data, obj) { |
| 20 | + if (data) { |
| 21 | + obj = obj || new CreateHotelEstimateRequest(); |
| 22 | + |
| 23 | + if (data.hasOwnProperty('country_code')) { |
| 24 | + obj['country_code'] = ApiClient.convertToType( |
| 25 | + data['country_code'], |
| 26 | + 'String' |
| 27 | + ); |
| 28 | + } |
| 29 | + |
| 30 | + if (data.hasOwnProperty('city')) { |
| 31 | + obj['city'] = ApiClient.convertToType(data['city'], 'String'); |
| 32 | + } |
| 33 | + |
| 34 | + if (data.hasOwnProperty('region')) { |
| 35 | + obj['region'] = ApiClient.convertToType(data['region'], 'String'); |
| 36 | + } |
| 37 | + |
| 38 | + if (data.hasOwnProperty('star_rating')) { |
| 39 | + obj['star_rating'] = ApiClient.convertToType( |
| 40 | + data['star_rating'], |
| 41 | + 'Number' |
| 42 | + ); |
| 43 | + } |
| 44 | + |
| 45 | + if (data.hasOwnProperty('number_of_nights')) { |
| 46 | + obj['number_of_nights'] = ApiClient.convertToType( |
| 47 | + data['number_of_nights'], |
| 48 | + 'Number' |
| 49 | + ); |
| 50 | + } |
| 51 | + |
| 52 | + if (data.hasOwnProperty('number_of_rooms')) { |
| 53 | + obj['number_of_rooms'] = ApiClient.convertToType( |
| 54 | + data['number_of_rooms'], |
| 55 | + 'Number' |
| 56 | + ); |
| 57 | + } |
| 58 | + |
| 59 | + if (data.hasOwnProperty('project_id')) { |
| 60 | + obj['project_id'] = ApiClient.convertToType( |
| 61 | + data['project_id'], |
| 62 | + 'String' |
| 63 | + ); |
| 64 | + } |
| 65 | + |
| 66 | + if (data.hasOwnProperty('create_order')) { |
| 67 | + obj['create_order'] = ApiClient.convertToType( |
| 68 | + data['create_order'], |
| 69 | + 'Boolean' |
| 70 | + ); |
| 71 | + } |
| 72 | + } |
| 73 | + return obj; |
| 74 | + } |
| 75 | +} |
| 76 | + |
| 77 | +CreateHotelEstimateRequest.prototype['country_code'] = undefined; |
| 78 | + |
| 79 | +CreateHotelEstimateRequest.prototype['city'] = undefined; |
| 80 | + |
| 81 | +CreateHotelEstimateRequest.prototype['region'] = undefined; |
| 82 | + |
| 83 | +CreateHotelEstimateRequest.prototype['star_rating'] = undefined; |
| 84 | + |
| 85 | +CreateHotelEstimateRequest.prototype['number_of_nights'] = undefined; |
| 86 | + |
| 87 | +CreateHotelEstimateRequest.prototype['number_of_rooms'] = undefined; |
| 88 | + |
| 89 | +CreateHotelEstimateRequest.prototype['project_id'] = undefined; |
| 90 | + |
| 91 | +CreateHotelEstimateRequest.prototype['create_order'] = false; |
| 92 | + |
| 93 | +export default CreateHotelEstimateRequest; |
0 commit comments