Hurdles API
The Hurdles API allows a third-party external interface to distribute updates to the OPERA Hurdles. The updated Hurdles are stored "as-is" without any intermediate calculations.
Field |
Data Format |
Notes |
RESORT |
VARCHAR2(20) |
The property that the record belongs to. |
HURDLE_DATE |
DATE |
Date of the Hurdle. |
ROOM_CATEGORY |
VARCHAR2(20) |
Room Type that the Hurdle applies to. |
YIELD_CATEGORY |
VARCHAR2(20) |
Yield Category that the Hurdle applies to. |
LOS |
NUMBER |
Length of Stay (OPUS2). |
ROOM_CATEGORY_LABEL |
VARCHAR2(20) |
Room Type Code that the Hurdle applies to. |
DELTA |
NUMBER |
Delta amount which needs to be applied to each ceiling until the Maxsolds is reached. |
HURDLE |
NUMBER |
Amount of the actual Hurdle. |
OVERRIDE |
VARCHAR2(1) |
Indicator if the Hurdle can be overridden by the user. (Y/N) |
UPSOLDS |
NUMBER |
Number of Room Types sold. |
CEILING |
NUMBER |
Number to reach before the Delta is applicable. |
MAXSOLDS |
NUMBER |
Maximum number of Room Types to sell. |
INSERT_USER |
NUMBER |
User ID who created the record. |
INSERT_DATE |
DATE |
Date the record was created. |
UPDATE_USER |
NUMBER |
If the record has been modified, then this is the User ID that modified the record. |
UPDATE_DATE |
DATE |
If the record has been modified, then this is the Date that the record was modified. |
YM_CODE |
VARCHAR2(20) |
Yield Market Code. |
TYPE hurdle_rec_type IS RECORD(
hr_resort hurdle_rates.resort%type,
hr_hurdle_date hurdle_rates.hurdle_date%type,
hr_room_category hurdle_rates.room_category%type,
hr_yield_category hurdle_rates.yield_category%type,
hr_los hurdle_rates.los%type,
hr_room_category_label hurdle_rates.room_category_label%type,
hr_delta hurdle_rates.delta%type,
hr_hurdle hurdle_rates.hurdle%type,
hr_override hurdle_rates.override%type,
hr_upsolds hurdle_rates.upsolds%type,
hr_ceiling hurdle_rates.ceiling%type,
hr_maxsolds hurdle_rates.maxsolds%type,
hr_room_category_yieldable_yn varchar2(1),
hr_insert_user hurdle_rates.insert_user%type,
hr_insert_date hurdle_rates.insert_date%type,
hr_update_user hurdle_rates.update_user%type,
hr_update_date hurdle_rates.update_date%type,
hr_ym_code hurdle_rates.ym_code%TYPE
);
DECLARE
s varchar2(2000);
rec int_set_hurdle.hurdle_rec_type;
i integer;
BEGIN
pms_p.initialize('<USERNAME>','<PASSWORD>','<PROPERTY_CODE>');
rec.hr_resort:=pms_p.resort;
rec.hr_hurdle_date:=pms_p.business_date;
rec.hr_room_category:='10080';
rec.hr_yield_category:='01';
rec.hr_los:=0;
rec.hr_room_category_label:='DLX';
rec.hr_delta:=1.5;
rec.hr_hurdle:=100;
rec.hr_override:='Y';
rec.hr_upsolds:=null;
rec.hr_ceiling:='81';
rec.hr_maxsolds:='83';
rec.hr_room_category_yieldable_yn:='';
rec.hr_ym_code:='';
i:=int_set_hurdle.rput(p_hurdle_rec => rec,
p_message => s);
IF i=0 THEN
COMMIT;
ELSE
dbms_output.put_line('ERROR: '||s);
END IF;
END;