Skip to content

Instantly share code, notes, and snippets.

@shadeglare
Last active December 24, 2015 11:19
Show Gist options
  • Save shadeglare/6790175 to your computer and use it in GitHub Desktop.
Save shadeglare/6790175 to your computer and use it in GitHub Desktop.
Models for booking an offer with a single flight segment
var BookingModels = {
"passenger": {
properties: {
"firstName": "",
"lastName": "",
"email": {},
"birthDate": {
day: 0,
month: 0,
year: 0
}
},
relations: {
}
},
"offer": {
properties: {
"marketingCarrier": "",
"operatingCarrier": "",
"from": "",
"to": "",
"departure": {
"minutes": 0,
"hours": 0,
"day": 0,
"month": 0,
"year": 0
},
"arrival": {
"minutes": 0,
"hours": 0,
"day": 0,
"month": 0,
"year": 0
},
"price": {
"value": 0,
"currency": ""
}
},
relations: {
}
},
"bonusCard": {
"carrier": "",
"number": ""
},
"booking": {
properties: {
"locator": "",
"timeLimit": {
"minutes": 0,
"hours": 0,
"day": 0,
"month": 0,
"year": 0
},
"bonusCards": []
},
relations: {
"offer" : {},
"passengers" : {}
}
}
};
module.exports.BookingModels = BookingModels;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment