-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added hotel estimates * Generated SDK * Added test code * Update README.md Co-authored-by: James Klein <[email protected]> * Deleted lock files and adjusted test * Adjusted README * Added package-lock file back * Reran generate sdk function Co-authored-by: James Klein <[email protected]>
- Loading branch information
1 parent
9c2dc13
commit 61386e4
Showing
8 changed files
with
185 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/** | ||
* Patch API V1 | ||
* The core API used to integrate with Patch's service | ||
* | ||
* Contact: [email protected] | ||
*/ | ||
|
||
import ApiClient from '../ApiClient'; | ||
|
||
class CreateHotelEstimateRequest { | ||
constructor(countryCode) { | ||
CreateHotelEstimateRequest.initialize(this, countryCode); | ||
} | ||
|
||
static initialize(obj, countryCode) { | ||
obj['country_code'] = countryCode; | ||
} | ||
|
||
static constructFromObject(data, obj) { | ||
if (data) { | ||
obj = obj || new CreateHotelEstimateRequest(); | ||
|
||
if (data.hasOwnProperty('country_code')) { | ||
obj['country_code'] = ApiClient.convertToType( | ||
data['country_code'], | ||
'String' | ||
); | ||
} | ||
|
||
if (data.hasOwnProperty('city')) { | ||
obj['city'] = ApiClient.convertToType(data['city'], 'String'); | ||
} | ||
|
||
if (data.hasOwnProperty('region')) { | ||
obj['region'] = ApiClient.convertToType(data['region'], 'String'); | ||
} | ||
|
||
if (data.hasOwnProperty('star_rating')) { | ||
obj['star_rating'] = ApiClient.convertToType( | ||
data['star_rating'], | ||
'Number' | ||
); | ||
} | ||
|
||
if (data.hasOwnProperty('number_of_nights')) { | ||
obj['number_of_nights'] = ApiClient.convertToType( | ||
data['number_of_nights'], | ||
'Number' | ||
); | ||
} | ||
|
||
if (data.hasOwnProperty('number_of_rooms')) { | ||
obj['number_of_rooms'] = ApiClient.convertToType( | ||
data['number_of_rooms'], | ||
'Number' | ||
); | ||
} | ||
|
||
if (data.hasOwnProperty('project_id')) { | ||
obj['project_id'] = ApiClient.convertToType( | ||
data['project_id'], | ||
'String' | ||
); | ||
} | ||
|
||
if (data.hasOwnProperty('create_order')) { | ||
obj['create_order'] = ApiClient.convertToType( | ||
data['create_order'], | ||
'Boolean' | ||
); | ||
} | ||
} | ||
return obj; | ||
} | ||
} | ||
|
||
CreateHotelEstimateRequest.prototype['country_code'] = undefined; | ||
|
||
CreateHotelEstimateRequest.prototype['city'] = undefined; | ||
|
||
CreateHotelEstimateRequest.prototype['region'] = undefined; | ||
|
||
CreateHotelEstimateRequest.prototype['star_rating'] = undefined; | ||
|
||
CreateHotelEstimateRequest.prototype['number_of_nights'] = undefined; | ||
|
||
CreateHotelEstimateRequest.prototype['number_of_rooms'] = undefined; | ||
|
||
CreateHotelEstimateRequest.prototype['project_id'] = undefined; | ||
|
||
CreateHotelEstimateRequest.prototype['create_order'] = false; | ||
|
||
export default CreateHotelEstimateRequest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters