from django.shortcuts import render
from django.http import HttpResponse
from .models import HotelService
import json
# Create your views here.
def show(request):
rq = {"Credentials": {
'UserName': '*******',
'Languaje': 'es',
'Password': '*******',
},
'GetAvailAndRatesRQ': {
'NotGetCancellationInfoCollection': False,
'GetMultiGroupRates': True,
'RQRec':[{
'HotelCode': 'ROL01',
'RQID': 1,
'RoomRQ': [{
'PaxAgeList':[30,
30,],
'CH': 0,
'RQID': 1,
'AD': 2,
'RoomCode': 'FAM',
'CU': 0,
'NoRooms': 1,
'BoardCode': 'TI',
}]
}],
'NotGetChargeInfoCollection': False,
'PromotionCodeList': [],
'GetPromotionsCollection': True,
'DateTo': '2016-11-5',
'IncludedPromotionsInOnlyBar': False,
'DateFrom': '2016-10-30',
'GetHotelRS': False,
'Languaje': 'es',
'GetHotelDetails': False,
'GetHotelsWithoutAllotment': True,
'OnlyBar': False,
'NotGetDailyPriceCollection': True,
'ExactRoomMatch': False,
'GroupRateList': [],
'CustomerCode': 'WEB',
'Criteria': [],
}
}
product = HotelService.getAvailAndRates(rq)
return HttpResponse(product)