discountnetwork 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.hound.yml +3 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +629 -0
  6. data/.sample.pryrc +4 -0
  7. data/.travis.yml +5 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +405 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +7 -0
  13. data/bin/rake +17 -0
  14. data/bin/rspec +17 -0
  15. data/bin/setup +6 -0
  16. data/discountnetwork.gemspec +28 -0
  17. data/lib/discountnetwork/account.rb +28 -0
  18. data/lib/discountnetwork/activation.rb +15 -0
  19. data/lib/discountnetwork/base.rb +20 -0
  20. data/lib/discountnetwork/booking.rb +23 -0
  21. data/lib/discountnetwork/client.rb +54 -0
  22. data/lib/discountnetwork/configuration.rb +17 -0
  23. data/lib/discountnetwork/destination.rb +9 -0
  24. data/lib/discountnetwork/password.rb +21 -0
  25. data/lib/discountnetwork/provider.rb +15 -0
  26. data/lib/discountnetwork/response.rb +19 -0
  27. data/lib/discountnetwork/result.rb +15 -0
  28. data/lib/discountnetwork/rspec.rb +5 -0
  29. data/lib/discountnetwork/search.rb +15 -0
  30. data/lib/discountnetwork/session.rb +9 -0
  31. data/lib/discountnetwork/supplementary.rb +15 -0
  32. data/lib/discountnetwork/testing/discountnetwork_api.rb +240 -0
  33. data/lib/discountnetwork/version.rb +3 -0
  34. data/lib/discountnetwork.rb +16 -0
  35. data/spec/discountnetwork/account_spec.rb +36 -0
  36. data/spec/discountnetwork/activation_spec.rb +46 -0
  37. data/spec/discountnetwork/booking_spec.rb +70 -0
  38. data/spec/discountnetwork/client_spec.rb +40 -0
  39. data/spec/discountnetwork/configuration_spec.rb +30 -0
  40. data/spec/discountnetwork/destination_spec.rb +16 -0
  41. data/spec/discountnetwork/password_spec.rb +41 -0
  42. data/spec/discountnetwork/provider_spec.rb +26 -0
  43. data/spec/discountnetwork/response_spec.rb +16 -0
  44. data/spec/discountnetwork/result_spec.rb +30 -0
  45. data/spec/discountnetwork/search_spec.rb +37 -0
  46. data/spec/discountnetwork/session_spec.rb +18 -0
  47. data/spec/discountnetwork/supplementary_spec.rb +40 -0
  48. data/spec/fixtures/booking.json +86 -0
  49. data/spec/fixtures/destinations.json +22 -0
  50. data/spec/fixtures/empty.json +0 -0
  51. data/spec/fixtures/ping.json +3 -0
  52. data/spec/fixtures/provider.json +16 -0
  53. data/spec/fixtures/providers.json +32 -0
  54. data/spec/fixtures/result.json +89 -0
  55. data/spec/fixtures/results.json +121 -0
  56. data/spec/fixtures/search.json +19 -0
  57. data/spec/fixtures/search_created.json +19 -0
  58. data/spec/fixtures/session_created.json +31 -0
  59. data/spec/fixtures/supplementaries.json +33 -0
  60. data/spec/fixtures/supplementary.json +21 -0
  61. data/spec/fixtures/user.json +31 -0
  62. data/spec/spec_helper.rb +12 -0
  63. metadata +189 -0
@@ -0,0 +1,30 @@
1
+ require "spec_helper"
2
+
3
+ describe DiscountNetwork::Result do
4
+ describe ".where" do
5
+ it "retrieves specified search results" do
6
+ search_id = 123_456_789
7
+ stub_search_results_api(search_id: search_id)
8
+ results = DiscountNetwork::Result.where(search_id: search_id)
9
+
10
+ expect(results.current_page).to eq(1)
11
+ expect(results.search.id).to eq(search_id)
12
+ expect(results.hotels.first.name).to eq("Nasa Vegas Hotel")
13
+ end
14
+ end
15
+
16
+ describe ".find_by" do
17
+ it "retrieves the hotel details for a specific search" do
18
+ search_id = 123_456_789
19
+ hotel_id = 456_789_012
20
+ stub_search_result_api(search_id: search_id, hotel_id: hotel_id)
21
+ hotel = DiscountNetwork::Result.find_by(
22
+ search_id: search_id, hotel_id: hotel_id
23
+ )
24
+
25
+ expect(hotel.id).to eq(hotel_id)
26
+ expect(hotel.search.id).to eq(search_id)
27
+ expect(hotel.name).to eq("Nasa Vegas Hotel")
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,37 @@
1
+ require "spec_helper"
2
+
3
+ describe DiscountNetwork::Search do
4
+ describe ".create" do
5
+ it "creates a new search" do
6
+ stub_search_create_api(search_params)
7
+ search = DiscountNetwork::Search.create(search_params)
8
+
9
+ expect(search.search.id).not_to be_nil
10
+ expect(search.search.wait_time).to be > 5
11
+ expect(search.search.location).to eq(search_params[:location_name])
12
+ end
13
+ end
14
+
15
+ describe ".find" do
16
+ it "finds the specified search" do
17
+ search_id = "DN_SEARCH_101"
18
+ stub_search_find_api(search_id)
19
+ search = DiscountNetwork::Search.find(search_id)
20
+
21
+ expect(search.id).to eq(search_id)
22
+ expect(search.location).to eq("Bangkok, Thailand")
23
+ end
24
+ end
25
+
26
+ def search_params
27
+ @search_params ||= {
28
+ location_id: "835",
29
+ location_name: "Bangkok, Thailand",
30
+ check_in: "25/08/2016",
31
+ check_out: "28/08/2016",
32
+ adults: "2",
33
+ children: "0",
34
+ room_numbers: "1"
35
+ }
36
+ end
37
+ end
@@ -0,0 +1,18 @@
1
+ require "spec_helper"
2
+
3
+ describe DiscountNetwork::Session do
4
+ describe ".create" do
5
+ it "creates a new user session" do
6
+ stub_session_create_api(login_params)
7
+ session = DiscountNetwork::Session.create(login_params)
8
+
9
+ expect(session.user.token).not_to be_nil
10
+ expect(session.user.username).to eq("username")
11
+ expect(session.user.subscription_status).to eq("active")
12
+ end
13
+ end
14
+
15
+ def login_params
16
+ @login_params ||= { name: "username", password: "secret_passsword" }
17
+ end
18
+ end
@@ -0,0 +1,40 @@
1
+ require "spec_helper"
2
+
3
+ describe DiscountNetwork::Supplementary do
4
+ describe ".list" do
5
+ it "lists the supplementaries for authenticated subscriber" do
6
+ set_account_auth_token("ABCD_123")
7
+ stub_supplementary_list_api
8
+ supplementaries = DiscountNetwork::Supplementary.list
9
+
10
+ expect(supplementaries.count).to eq(1)
11
+ expect(supplementaries.first.name).to eq("Mrs. Doe")
12
+ end
13
+ end
14
+
15
+ describe ".create" do
16
+ it "creates a new supplementary subscriber" do
17
+ set_account_auth_token("ABCD_123")
18
+ stub_supplementary_create_api(supplementary_attributes)
19
+ supplementary = DiscountNetwork::Supplementary.create(
20
+ supplementary_attributes,
21
+ )
22
+
23
+ expect(supplementary).not_to be_nil
24
+ expect(supplementary.activation_token).not_to be_nil
25
+ end
26
+ end
27
+
28
+ def set_account_auth_token(token)
29
+ DiscountNetwork.configuration.auth_token = token
30
+ end
31
+
32
+ def supplementary_attributes
33
+ {
34
+ first_name: "John",
35
+ last_name: "Green",
36
+ email: "john.green@example.com",
37
+ phone: "+1 123 234 345 6789",
38
+ }
39
+ end
40
+ end
@@ -0,0 +1,86 @@
1
+ {
2
+ "travel_request": {
3
+ "id": 123456789,
4
+ "user": {
5
+ "first_name": "Abu",
6
+ "middle_name": "",
7
+ "last_name": "Nashir",
8
+ "spouse_name": "",
9
+ "company_name": "Impact Services Co Ltd",
10
+ "company_abbr": "IS",
11
+ "package_name": "Prefered Platinum",
12
+ "access_id": "None",
13
+ "username": "username",
14
+ "sex": "male",
15
+ "address": "Rama 9 Road",
16
+ "city": "Huai Khwang",
17
+ "state": "Bangkok",
18
+ "zip": "10310",
19
+ "country": "TH",
20
+ "email": "abunashir@gmail.com",
21
+ "phone": "0123 456 7890",
22
+ "status": "Active",
23
+ "mobile": "0123 456 7890",
24
+ "office_phone": "",
25
+ "expiration": "None",
26
+ "created_at": "22 May, 2014",
27
+ "role": 12345,
28
+ "subscription_status": "active",
29
+ "name": "Abu Nashir",
30
+ "id": 1,
31
+ "token": "SECRET_AUTH_TKEN"
32
+ },
33
+ "code": "BOOKING_CODE_101",
34
+ "priority": null,
35
+ "note": null,
36
+ "status": null,
37
+ "travellers": [{
38
+ "id": 293,
39
+ "first_name": "John",
40
+ "last_name": "Doe",
41
+ "phone": "012 345 6789",
42
+ "email": "john.doe@example.com",
43
+ "address": "123 Main Street",
44
+ "city": "Huai Khwang",
45
+ "state": "Bangkok",
46
+ "zip": "10310",
47
+ "country": null,
48
+ "traveller_type": null,
49
+ "age": null
50
+ }],
51
+ "properties": [{
52
+ "id": 293,
53
+ "name": "Nasa Vagas, Thailand",
54
+ "description": "Cheapest hotel you can find",
55
+ "review_score": "90.0",
56
+ "total_reviews": 1000,
57
+ "price": "100.99",
58
+ "currency_code": "USD",
59
+ "travel_request_id": 295,
60
+ "created_at": "2016-09-06T06:58:01.266Z",
61
+ "updated_at": "2016-09-06T06:58:01.266Z",
62
+ "property_id": "35296",
63
+ "provider_name": "Booking.com",
64
+ "service_std": null
65
+ }],
66
+ "promo_rate": null,
67
+ "travel_criteria": {
68
+ "id": 123456789,
69
+ "location": null,
70
+ "check_in": "10 September, 2016",
71
+ "check_out": "12 September, 2016",
72
+ "adults": 2,
73
+ "children": 0,
74
+ "total_rooms": 0,
75
+ "dmy_check_in": "10/09/2016",
76
+ "dmy_check_out": "12/09/2016",
77
+ "total_results": 0,
78
+ "min_price": null,
79
+ "last_provider": null,
80
+ "max_provider": 2,
81
+ "status": null,
82
+ "wait_time": -138
83
+ },
84
+ "booking_type": null
85
+ }
86
+ }
@@ -0,0 +1,22 @@
1
+ [
2
+ {
3
+ "label": "Bangkok, Thailand",
4
+ "value": 835
5
+ },
6
+ {
7
+ "label": "Bangalore, India",
8
+ "value": 866
9
+ },
10
+ {
11
+ "label": "Dhaka, Bangladesh",
12
+ "value": 1715
13
+ },
14
+ {
15
+ "label": "Bangka, Indonesia",
16
+ "value": 26064
17
+ },
18
+ {
19
+ "label": "Sylhet, Bangladesh",
20
+ "value": 28031
21
+ }
22
+ ]
File without changes
@@ -0,0 +1,3 @@
1
+ {
2
+ "data": "Pong!"
3
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "provider": {
3
+ "name": "Hotel One",
4
+ "description": "Hotel One is one of the best discount provider on hotel",
5
+ "image": "hotel-one.jpg",
6
+ "images": {
7
+ "original": "https://s3.amazonaws.com/hotel-one.jpg",
8
+ "standard": "https://s3.amazonaws.com/standard_hotel-one.jpg",
9
+ "thumb": "https://s3.amazonaws.com/thumb_hotel-one.jpg"
10
+ },
11
+ "link": "http://hotel-one.example.com",
12
+ "slug": "hotel-one",
13
+ "frameable": true,
14
+ "postable": false
15
+ }
16
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "providers": [
3
+ {
4
+ "name": "Hotel One",
5
+ "description": "Hotel One is one of the best discount provider on hotel",
6
+ "image": "hotel-one.jpg",
7
+ "images": {
8
+ "original": "https://s3.amazonaws.com/hotel-one.jpg",
9
+ "standard": "https://s3.amazonaws.com/standard_hotel-one.jpg",
10
+ "thumb": "https://s3.amazonaws.com/thumb_hotel-one.jpg"
11
+ },
12
+ "link": "http://hotel-one.example.com",
13
+ "slug": "hotel-one",
14
+ "frameable": true,
15
+ "postable": false
16
+ },
17
+ {
18
+ "name": "Hotel Two",
19
+ "description": "Hotel Two is the best discount provider on Asia",
20
+ "image": "hotel-two.jpg",
21
+ "images": {
22
+ "original": "https://s3.amazonaws.com/hotel-two.jpg",
23
+ "standard": "https://s3.amazonaws.com/standard_hotel-two.jpg",
24
+ "thumb": "https://s3.amazonaws.com/thumb_hotel-two.jpg"
25
+ },
26
+ "link": "http://hotel-two.example.com",
27
+ "slug": "hotel-two",
28
+ "frameable": false,
29
+ "postable": true
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "result": {
3
+ "id": 456789012,
4
+ "name": "Nasa Vegas Hotel",
5
+ "description": "Nasa Vegas Hotel is conveniently located in the popular Ratchadaphisek area. The hotel offers a high standard of service and amenities to suit the individual needs of all travelers. Meeting facilities, restaurant are just some of the facilities on offer. Each guestroom is elegantly furnished and equipped with handy amenities. Recuperate from a full day of sightseeing in the comfort of your room or take advantage of the hotel's recreational facilities, including fitness center. No matter what your reasons are for visiting Bangkok, Nasa Vegas Hotel will make you feel instantly at home.",
6
+ "website": "/hotels/thailand/bangkok/nasa-vegas-hotel-35296",
7
+ "address": "44 Sukhumvit 71-Ramkhamhaeng Road",
8
+ "latitude": 13.74298,
9
+ "longitude": 100.60189,
10
+ "property_type": null,
11
+ "stars": 3,
12
+ "rank": 1,
13
+ "price": 19,
14
+ "total_reviews": 14218,
15
+ "review_score": 71,
16
+ "image": "http://1.omg.io/wego/image/upload/w_200,h_200,c_fill/v1412203579/hotels/35296/18982289.jpg",
17
+ "review_text": "Fair",
18
+ "offer": null,
19
+ "promo_price": 14.3469,
20
+ "currency_code": "USD",
21
+ "check_in": "15:00:00",
22
+ "check_out": "12:00:00",
23
+ "postal_code": "10250",
24
+ "fax": "reservation@nasavegashotel.com",
25
+ "reservation_phone": "+6627199888",
26
+ "cancellation_policy": {
27
+ "table": {}
28
+ },
29
+ "videos": [],
30
+ "images": [
31
+ "http://0.omg.io/wego/image/upload/w_460,h_460,c_fill/v1428174470/hotels/35296/13560731.jpg",
32
+ "http://0.omg.io/wego/image/upload/w_460,h_460,c_fill/v1428174557/hotels/35296/5887465.jpg",
33
+ "http://1.omg.io/wego/image/upload/w_460,h_460,c_fill/v1412203706/hotels/35296/10311481.jpg",
34
+ "http://0.omg.io/wego/image/upload/w_460,h_460,c_fill/v1412203552/hotels/35296/35681515.jpg",
35
+ "http://0.omg.io/wego/image/upload/w_460,h_460,c_fill/v1412203552/hotels/35296/35681502.jpg"
36
+ ],
37
+ "property_amenities": [
38
+ "Restaurant",
39
+ "Massage services",
40
+ "Meeting rooms",
41
+ "Playground"
42
+ ],
43
+ "room_amenities": [
44
+ "Bathrobe",
45
+ "Cable television",
46
+ "Hairdryer",
47
+ "Internet access",
48
+ "Microwave",
49
+ "Newspaper",
50
+ "Private pool",
51
+ "Separate tub and shower"
52
+ ],
53
+ "search": {
54
+ "id": 123456789,
55
+ "location": null,
56
+ "check_in": "01 September, 2016",
57
+ "check_out": "03 September, 2016",
58
+ "adults": 2,
59
+ "children": 0,
60
+ "total_rooms": 0,
61
+ "dmy_check_in": "01/09/2016",
62
+ "dmy_check_out": "03/09/2016",
63
+ "total_results": 0,
64
+ "min_price": null,
65
+ "last_provider": null,
66
+ "max_provider": 2,
67
+ "status": null,
68
+ "wait_time": -119
69
+ },
70
+ "room_rate": {
71
+ "table": {
72
+ "id": "193-1",
73
+ "price_str": "19",
74
+ "currency_code": "USD",
75
+ "currency_sym": "US$",
76
+ "provider_name": "Expedia.co.th",
77
+ "provider_code": "expedia.co.th",
78
+ "mobile_friendly": true,
79
+ "ex_tax": false,
80
+ "is_direct": false,
81
+ "description": "Junior Room Double - Room Only - Non Refundable - Save 63% - NON REFUNDABLE",
82
+ "phones": null,
83
+ "amenities": [],
84
+ "room_left": null
85
+ },
86
+ "modifiable": true
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "result": {
3
+ "search": {
4
+ "id": 123456789,
5
+ "location": null,
6
+ "check_in": "28 August, 2016",
7
+ "check_out": "30 August, 2016",
8
+ "adults": 2,
9
+ "children": 0,
10
+ "total_rooms": 0,
11
+ "dmy_check_in": "28/08/2016",
12
+ "dmy_check_out": "30/08/2016",
13
+ "total_results": 0,
14
+ "min_price": null,
15
+ "last_provider": null,
16
+ "max_provider": 2,
17
+ "status": null,
18
+ "wait_time": -93
19
+ },
20
+ "total_count": 1251,
21
+ "current_page": 1,
22
+ "per_page": 5,
23
+ "filtered_count": 1251,
24
+ "hotels": [{
25
+ "id": 456789012,
26
+ "name": "Nasa Vegas Hotel",
27
+ "description": "Nasa Vegas Hotel is conveniently located in the popular Ratchadaphisek area. The hotel offers a high standard of service and amenities to suit the individual needs of all travelers. Meeting facilities, restaurant are just some of the facilities on offer. Each guestroom is elegantly furnished and equipped with handy amenities. Recuperate from a full day of sightseeing in the comfort of your room or take advantage of the hotel's recreational facilities, including fitness center. No matter what your reasons are for visiting Bangkok, Nasa Vegas Hotel will make you feel instantly at home.",
28
+ "website": "/hotels/thailand/bangkok/nasa-vegas-hotel-35296",
29
+ "address": "44 Sukhumvit 71-Ramkhamhaeng Road",
30
+ "latitude": 13.74298,
31
+ "longitude": 100.60189,
32
+ "property_type": 1,
33
+ "stars": 3,
34
+ "rank": 1,
35
+ "price": 19,
36
+ "total_reviews": 14218,
37
+ "review_score": 71,
38
+ "image": "http://1.omg.io/wego/image/upload/w_200,h_200,c_fill/v1412203579/hotels/35296/18982289.jpg",
39
+ "review_text": "Fair",
40
+ "offer": null,
41
+ "promo_price": 14.3469,
42
+ "currency_code": "USD"
43
+ }, {
44
+ "id": 35452,
45
+ "name": "Hotel Pullman Bangkok Grande Sukhumvit",
46
+ "description": "Discover all that Bangkok has to offer with Grand Millennium Sukhumvit Hotel as a base.\r\nThis 5-star property offers travelers a choice of 325 pleasant rooms that are equipped with the standard amenities of hotels in its class.\r\nEach guestroom features amenities such as internet access – LAN, inhouse movies, daily newspaper, non smoking rooms.\r\nGuests can experience the high standards of comfort while staying at this luxury Bangkok hotel with everything they need right on the site such as restaurant, safety deposit boxes, room service. \r\nHotel's guests can experience on-site latest leisure and sports facilities such as massage, jacuzzi, outdoor pool.\r\n\r\nWith elegant facilities and hospitality, guests at this hotel will surely have an impressive stay.",
47
+ "website": "/hotels/thailand/bangkok/hotel-pullman-bangkok-grande-sukhumvit-35452",
48
+ "address": "30 Sukhumvit 21 Asoke Road, Klongtoey Nua, Wattana, ",
49
+ "latitude": 13.73908,
50
+ "longitude": 100.56228,
51
+ "property_type": 1,
52
+ "stars": 5,
53
+ "rank": 2,
54
+ "price": 116,
55
+ "total_reviews": 1775,
56
+ "review_score": 88,
57
+ "image": "http://0.omg.io/wego/image/upload/w_200,h_200,c_fill/v1465982448/hotels/35452/82269393.jpg",
58
+ "review_text": "Excellent",
59
+ "offer": null,
60
+ "promo_price": 87.5916,
61
+ "currency_code": "USD"
62
+ }, {
63
+ "id": 34944,
64
+ "name": "InterContinental Bangkok",
65
+ "description": "InterContinental Bangkok is ideally located within the Ratchaprasong District and is close to Sukhumvit Road. A directly adjacent BTS skytrain station allows fast travel throughout the city and to the Sunarnabhumi Airport. Nearby are renowned medical facilities. Major shopping destinations such as Central World, Siam Paragon, MBK and Platinum abound at walking distance. Lumpini Park is also a short distance away.",
66
+ "website": "/hotels/thailand/bangkok/intercontinental-bangkok-34944",
67
+ "address": "973 Ploenchit Road",
68
+ "latitude": 13.7444500468452,
69
+ "longitude": 100.541279911995,
70
+ "property_type": 1,
71
+ "stars": 5,
72
+ "rank": 3,
73
+ "price": 211,
74
+ "total_reviews": 2188,
75
+ "review_score": 90,
76
+ "image": "http://0.omg.io/wego/image/upload/w_200,h_200,c_fill/v1428168097/hotels/34944/2943380.jpg",
77
+ "review_text": "Excellent",
78
+ "offer": null,
79
+ "promo_price": 159.3261,
80
+ "currency_code": "USD"
81
+ }, {
82
+ "id": 776232,
83
+ "name": "Holiday Inn Bangkok Sukhumvit 22",
84
+ "description": "Holiday Inn Bangkok Sukhumvit offers 300 guest rooms including suites in a 29-storey iconic tower; the modern hotel is a relaxing base to explore the vibrant city of Bangkok. Located on the corner of Sukhumvit and Soi 22, it is conveniently located between the Nana, Asok and Phrom Phong BTS stations , close to the citys main shopping and historical interest places and as well as business and entertainment hub. The hotel is a suitable accommodation for medical tourism as well as the location is close to hospitals like Bumrungrad and Smitivej. Two versatile function rooms and a pillar-less ballroom that seats up to 500, all equipped with the latest technology, providing an ideal space for a range of functions and meeting requirements. It will offer leisure and corporate guests alike, the perfect place to relax in comfort or conduct business with ease while providing conference delegates the perfect retreat. Free Wi-Fi service is available throughout the hotel. Holiday Inn Bangkok Sukhumvit offers guests a whole host of facilities including an outdoor lap pool, gym and 2 on-site restaurants serving cuisine ranging from Thai to International delights; the highlight being a specialty authentic inspired Indian restaurant and bar that is cantilevered on the roof top overlooking the city. The hotel is located approximately 30 minutes from Suvarnabhumi International Airport and 30 minutes from Don Muang airport.",
85
+ "website": "/hotels/thailand/bangkok/holiday-inn-bangkok-sukhumvit-22-776232",
86
+ "address": "1 Sukhumvit 22, Klongton, Klongtoey, Bangkok",
87
+ "latitude": 13.733119533557,
88
+ "longitude": 100.565416526514,
89
+ "property_type": 1,
90
+ "stars": 4,
91
+ "rank": 4,
92
+ "price": 30,
93
+ "total_reviews": 1020,
94
+ "review_score": 82,
95
+ "image": "http://0.omg.io/wego/image/upload/w_200,h_200,c_fill/v1432133150/hotels/776232/46428491.jpg",
96
+ "review_text": "Very Good",
97
+ "offer": null,
98
+ "promo_price": 22.653,
99
+ "currency_code": "USD"
100
+ }, {
101
+ "id": 34738,
102
+ "name": "Centara Central World",
103
+ "description": "Centara Grand at CentralWorld is a part of CentralWorld the largest life style shopping complex linked Chidlom and Siam via sky-walk on Rama 1 Road.",
104
+ "website": "/hotels/thailand/bangkok/centara-central-world-34738",
105
+ "address": "999/99 Rama 1 Road",
106
+ "latitude": 13.747656,
107
+ "longitude": 100.538854,
108
+ "property_type": 1,
109
+ "stars": 5,
110
+ "rank": 20,
111
+ "price": 118,
112
+ "total_reviews": 1611,
113
+ "review_score": 84,
114
+ "image": "http://1.omg.io/wego/image/upload/w_200,h_200,c_fill/v1418633508/hotels/34738/22341297.jpg",
115
+ "review_text": "Very Good",
116
+ "offer": null,
117
+ "promo_price": 89.1018,
118
+ "currency_code": "USD"
119
+ }]
120
+ }
121
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "search": {
3
+ "id": "DN_SEARCH_101",
4
+ "location": "Bangkok, Thailand",
5
+ "check_in": "26 August, 2016",
6
+ "check_out": "28 August, 2016",
7
+ "adults": 2,
8
+ "children": 0,
9
+ "total_rooms": 0,
10
+ "dmy_check_in": "26/08/2016",
11
+ "dmy_check_out": "28/08/2016",
12
+ "total_results": 0,
13
+ "min_price": null,
14
+ "last_provider": null,
15
+ "max_provider": 2,
16
+ "status": null,
17
+ "wait_time": -173
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "search": {
3
+ "id": 11299,
4
+ "location": "Bangkok, Thailand",
5
+ "check_in": "25 August, 2016",
6
+ "check_out": "28 August, 2016",
7
+ "adults": 2,
8
+ "children": 0,
9
+ "total_rooms": 0,
10
+ "dmy_check_in": "25/08/2016",
11
+ "dmy_check_out": "28/08/2016",
12
+ "total_results": 0,
13
+ "min_price": null,
14
+ "last_provider": null,
15
+ "max_provider": 2,
16
+ "status": null,
17
+ "wait_time": 11
18
+ }
19
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "user": {
3
+ "first_name": "Mr User",
4
+ "middle_name": "",
5
+ "last_name": "Name",
6
+ "spouse_name": "",
7
+ "company_name": "Discount Network",
8
+ "company_abbr": "DN",
9
+ "package_name": null,
10
+ "access_id": null,
11
+ "username": "username",
12
+ "sex": "male",
13
+ "address": "Bangkok",
14
+ "city": "Huai Khwang",
15
+ "state": "Bangkok",
16
+ "zip": "10320",
17
+ "country": "TH",
18
+ "email": "username@example.com",
19
+ "phone": "20202020",
20
+ "status": "Active",
21
+ "mobile": "10308383730",
22
+ "office_phone": "",
23
+ "expiration": null,
24
+ "created_at": "22 May, 2014",
25
+ "role": 501,
26
+ "subscription_status": "active",
27
+ "name": "Mr User Name",
28
+ "id": 1,
29
+ "token": "c8L-tQutgNZ0r-Lw-PQLow"
30
+ }
31
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "supplementaries": [
3
+ {
4
+ "first_name": "Mrs.",
5
+ "middle_name": null,
6
+ "last_name": "Doe",
7
+ "spouse_name": null,
8
+ "company_name": "Impact Services",
9
+ "company_abbr": "IS",
10
+ "package_name": "Preferred Platinum",
11
+ "access_id": "ABCD-123-456",
12
+ "username": "mrs.doe",
13
+ "sex": "female",
14
+ "address": "123 Main Street",
15
+ "city": "New York",
16
+ "state": "NY",
17
+ "zip": "NY123",
18
+ "country": "US",
19
+ "email": "mrs.doe@example.com",
20
+ "phone": "+1 123 456 7890",
21
+ "status": "Pending",
22
+ "mobile": null,
23
+ "office_phone": null,
24
+ "expiration": 50,
25
+ "created_at": "27 July, 2015",
26
+ "role": 1,
27
+ "subscription_status": "Pending",
28
+ "name": "Mrs. Doe",
29
+ "id": 2,
30
+ "token": null
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "id": 1234,
3
+ "company_id": 101,
4
+ "first_name": "John",
5
+ "middle_name": null,
6
+ "last_name": "Doe",
7
+ "sex": null,
8
+ "dob": null,
9
+ "country": null,
10
+ "role": 123,
11
+ "email": "john.doe@example.com",
12
+ "phone": "+1 123 456 789 0123",
13
+ "username": null,
14
+ "status": null,
15
+ "activation_token": "token_123_abcd",
16
+ "parent_id": 1,
17
+ "access_kit_id": null,
18
+ "note": null,
19
+ "referral_key": null,
20
+ "referrer_id": null
21
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "user": {
3
+ "first_name": "Abu",
4
+ "middle_name": "",
5
+ "last_name": "Nashir",
6
+ "spouse_name": "",
7
+ "company_name": "Impact Services Co Ltd",
8
+ "company_abbr": "IS",
9
+ "package_name": null,
10
+ "access_id": null,
11
+ "username": "username",
12
+ "sex": "male",
13
+ "address": "PG Rama 9 Condominium, Rama 9 Road",
14
+ "city": "Huai Khwang",
15
+ "state": "Bangkok",
16
+ "zip": "10310",
17
+ "country": "TH",
18
+ "email": "abunashir@gmail.com",
19
+ "phone": "123 456 7890",
20
+ "status": "Active",
21
+ "mobile": "123 456 7890",
22
+ "office_phone": "",
23
+ "expiration": null,
24
+ "created_at": "22 May, 2014",
25
+ "role": 501,
26
+ "subscription_status": "active",
27
+ "name": "Abu Nashir",
28
+ "id": 1,
29
+ "token": "ABCD_123"
30
+ }
31
+ }