-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.js
More file actions
145 lines (135 loc) · 3.45 KB
/
test.js
File metadata and controls
145 lines (135 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
var Booking = require('./booking.js');
Booking.init({
username: 'username',
<<<<<<< HEAD
password: 'password'
=======
password:'password'
>>>>>>> b6a1c5bf83d7a8841984ec34390e341f32e9dda7
});
*/
/*
//Return info of hotel(s)
Booking.hotelInfo({
hotel_ids: '24177,78188',
languagecodes: 'es'
}, function(err, resp){
console.log('ERROR:', err);
console.log('RESPUESTA:', resp);
});
*/
/*
//Return facilities of hotel(s)
Booking.hotelFacilities({
hotel_ids: '24177,78188',
languagecodes: 'es'
}, function(err, resp){
console.log('ERROR:', err);
console.log('RESPUESTA:', resp);
});
*/
/*
//Return availability of hotel(s)
Booking.avail({
currency_code: 'MXN',
latitude: '19.427037',
longitude: '-99.167780',
arrival_date: '2014-05-03',//YYYY-MM-DD
departure_date: '2014-05-04',//YYYY-MM-DD
available_rooms: 2,//cuantos cuartos disponibles
guest_qty: '2,2',//# de guest por cuarto(array) el length de este campo debe coincidir con el valor de available_rooms
show_test: 1
}, function(err, resp){
console.log('ERROR:', err);
console.log('RESPUESTA:', resp);
});
*/
/*
//Return block of availabilities of rooms
Booking.block({
hotel_ids: '777196',//hotel test 98251, hotel live 777196
languagecode: 'es',
arrival_date: '2014-05-03',
departure_date: '2014-05-04',
currency_code: 'MXN',
detail_level: 1,
show_test: 1
}, function(err, resp){
console.log('ERROR:', err);
console.log('RESPUESTA:', resp);
});
*/
/*
//Return info of hotel
Booking.info({
hotel_ids: '98251',//hotel test
languagecode: 'es',
show_test: 1
}, function(err, resp){
console.log('ERROR:', err);
console.log('RESPUESTA:', resp);
});
*/
/*
//Return photos of hotel
Booking.photos({
hotel_ids: '98251',//Array of ids. Example: 98251,777196,472805
show_test: 1
}, function(err, resp){
console.log('ERROR:', err);
console.log('RESPUESTA:', resp);
});
*/
/*
//Return room photos of hotel
Booking.roomPhotos({
hotel_ids: '98251',//Array of ids. Example: 98251,777196,472805
show_test: 1
}, function(err, resp){
console.log('ERROR:', err);
console.log('RESPUESTA:', resp);
});
*/
/*
//Make a book
Booking.book({
affiliate_id: '386216',//Affiliate id of lastroom
affiliate_label: 'lastroom',
hotel_id: '777196',//hotel test 98251
begin_date: '2014-05-02',
block_id: '77719602_83123991_0_1',
incremental_prices: '39.00',
end_date: '2014-05-03',
cc_cardholder: 'Firstname Lastname',
cc_cvc: '253',
cc_expiration_date: '2017-06-01',//YYYY-MM-DD en vez del tipico MM-YYYY(el día es ignorado pero se debe pasar :s)
cc_number: '4147202159108677',
cc_type: '2',//AMEX:1,VISA:2,MASTERCARD:3
guest_street: 'Zamora 187, Condesa',
guest_zip: '06149',
guest_city: 'Merida',
guest_country: 'MX',
guest_email: 'example@gmail.com',
guest_telephone: '5522334455',
guest_language: 'es',
guest_name: 'Guest Lastname',
guest_company: 'Compania opcional SA de CV',
show_test: 1,
comments: 'ESTO ES OPCIONAL'
//booker_firstname: 'Guest', // Solo si 'guest_name' no es definido
//booker_lastname: 'Lastname', //Solo si booker_firstname es definido
}, function(err, resp) {
console.log('ERROR:',err);
console.log('RESPUESTA:',resp);
});
*/
/*
Booking.booking({
id: '897156933',//pincode:0453
show_test: 1,
}, function(err, resp) {
console.log('ERROR:',err);
console.log('RESPUESTA:',resp);
});
*/