1 PACKAGE iby_factor_pkg AUTHID CURRENT_USER AS
2 /*$Header: ibyfacts.pls 115.7 2002/11/18 23:02:10 jleybovi ship $*/
3
4 /* Amount Range Record used in PaymentAmount Factor*/
5 TYPE Amount_Range is RECORD (LowAmtLmt Number, UprAmtLmt Number,
6 Seq integer, Score VARCHAR2(10));
7 /* Time Range Recores used in Time of Purchase */
8 TYPE Time_Range is RECORD (LowTimeLmt integer, UprTimeLmt integer,
9 Seq integer, Score VARCHAR2(10));
10 /* Frequncy Range Record used in Payment History*/
11 TYPE Freq_Range is RECORD (LowFreqLmt integer, UprFreqLmt integer,
12 Seq integer, Score VARCHAR2(10));
13 /* Codes Range Record AVSCodes, RiskCodes and CreditRating Codes */
14 TYPE codes is RECORD (code VARCHAR2(30), Score VARCHAR2(10));
15
16 TYPE AmountRange_table IS TABLE OF Amount_Range INDEX BY BINARY_INTEGER;
17 TYPE FreqRange_table IS TABLE OF Freq_Range INDEX BY BINARY_INTEGER;
18 TYPE TimeRange_table IS TABLE OF Time_Range INDEX BY BINARY_INTEGER;
19 TYPE codes_table IS TABLE OF codes INDEX BY BINARY_INTEGER;
20
21 /*
22 ** Procedure: save_PaymentAmount
23 ** Purpose: Saves the PaymentAmount factor configuration into
24 ** database. Checks if payeeid is null or not, if it is
25 ** null then updates the site level configuration values
26 ** otherwise checks if payee already has some entries.
27 ** if payee has entries then updates them otherwise
28 ** creates new entries.
29 */
30
31 procedure save_PaymentAmount( i_payeeid in varchar2,
32 i_name in VARCHAR2,
33 i_description in VARCHAR2,
34 i_count in integer,
35 i_amountRanges in AmountRange_table );
36
37 /*
38 ** Procedure: load_PaymentAmount
39 ** Purpose: loads the PaymentAmount factor configuration into
40 ** output parameters. Checks if payeeid is null or not, if it is
41 ** null then loads the site level configuration values
42 ** otherwise checks if payee already has some entries.
43 ** if payee has entries then loads them otherwise
44 ** creates new entries.
45 */
46 procedure load_PaymentAmount( i_payeeid in varchar2,
47 o_name out nocopy VARCHAR2,
48 o_description out nocopy VARCHAR2,
49 o_amountRanges out nocopy AmountRange_table );
50
51 /*
52 ** Procedure: save_TimeOfPurchase
53 ** Purpose: Saves the TimeOfPurchase factor configuration into
54 ** database. Checks if payeeid is null or not, if it is
55 ** null then updates the site level configuration values
56 ** otherwise checks if payee already has some entries.
57 ** if payee has entries then updates them otherwise
58 ** creates new entries.
59 */
60 procedure save_TimeOfPurchase( i_payeeid in varchar2,
61 i_name in VARCHAR2,
62 i_description in VARCHAR2,
63 i_count in integer,
64 i_timeRanges in TimeRange_table );
65
66 /*
67 ** Procedure: load_TimeOfPurchase
68 ** Purpose: loads the TimeOfPurchase factor configuration into
69 ** output parameters. Checks if payeeid is null or not, if it is
70 ** null then loads the site level configuration values
71 ** otherwise checks if payee already has some entries.
72 ** if payee has entries then loads them otherwise
73 ** loads the site level entries.
74 */
75 procedure load_TimeOfPurchase( i_payeeid in varchar2,
76 o_name out nocopy VARCHAR2,
77 o_description out nocopy VARCHAR2,
78 o_timeRanges out nocopy TimeRange_table );
79
80 /*
81 ** Procedure: save_TrxnAmountLimit
82 ** Purpose: Saves the TrxnAmountLimit factor configuration into
83 ** database. Checks if payeeid is null or not, if it is
84 ** null then updates the site level configuration values
85 ** otherwise checks if payee already has some entries.
86 ** if payee has entries then updates them otherwise
87 ** creates new entries.
88 */
89 procedure save_TrxnAmountLimit( i_payeeid in varchar2,
90 i_name in VARCHAR2,
91 i_description in VARCHAR2,
92 i_duration in integer,
93 i_durationType in VARCHAR2,
94 i_amount in number );
95
96 /*
97 ** Procedure: load_TrxnAmountLimit
98 ** Purpose: loads the TrxnAmountLimit factor configuration into
99 ** output parameters. Checks if payeeid is null or not, if it is
100 ** null then loads the site level configuration values
101 ** otherwise checks if payee already has some entries.
102 ** if payee has entries then loads them otherwise
103 ** loads the site level entries.
104 */
105 procedure load_TrxnAmountLimit( i_payeeid in varchar2,
106 o_name out nocopy VARCHAR2,
107 o_description out nocopy VARCHAR2,
108 o_duration out nocopy integer,
109 o_durationType out nocopy VARCHAR2,
110 o_amount out nocopy number );
111
112 /*
113 ** Procedure: save_PaymentHistory
114 ** Purpose: Saves the PaymentHistory factor configuration into
115 ** database. Checks if payeeid is null or not, if it is
116 ** null then updates the site level configuration values
117 ** otherwise checks if payee already has some entries.
118 ** if payee has entries then updates them otherwise
119 ** creates new entries.
120 */
121 procedure save_PaymentHistory(i_payeeid in varchar2,
122 i_name in VARCHAR2,
123 i_description in VARCHAR2,
124 i_duration in integer,
125 i_durationType in VARCHAR2,
126 i_count in integer,
127 i_freqRanges in FreqRange_table );
128
129 /*
130 ** Procedure: load_PaymentHistory
131 ** Purpose: loads the PaymentHistory factor configuration into
132 ** output parameters. Checks if payeeid is null or not, if it is
133 ** null then loads the site level configuration values
134 ** otherwise checks if payee already has some entries.
135 ** if payee has entries then loads them otherwise
136 ** loads the site level Payemnet History values.
137 */
138 procedure load_PaymentHistory(i_payeeid in varchar2,
139 o_name out nocopy VARCHAR2,
140 o_description out nocopy VARCHAR2,
141 o_duration out nocopy integer,
142 o_durationType out nocopy VARCHAR2,
143 o_freqRanges out nocopy FreqRange_table );
144
145 /*
146 ** Procedure: save_AVSCodes
147 ** Purpose: Saves the AVSCodes factor configuration into
148 ** database. Checks if payeeid is null or not, if it is
149 ** null then updates the site level configuration values
150 ** otherwise checks if payee already has some entries.
151 ** if payee has entries then updates them otherwise
152 ** creates new entries.
153 */
154 procedure save_AVSCodes( i_payeeid in varchar2,
155 i_name in VARCHAR2,
156 i_description in VARCHAR2,
157 i_count in integer,
158 i_codes in codes_table );
159
160 /*
161 ** Procedure: load_AVSCodes
162 ** Purpose: loads the AVSCodes factor configuration into
163 ** output parameters. Checks if payeeid is null or not, if it is
164 ** null then loads the site level configuration values
165 ** otherwise checks if payee already has some entries.
166 ** if payee has entries then loads them otherwise
167 ** loads AVSCodes of the site level.
168 */
169 procedure load_AVSCodes( i_payeeid in varchar2,
170 o_name out nocopy VARCHAR2,
171 o_description out nocopy VARCHAR2,
172 o_codes out nocopy codes_table );
173
174 /*
175 ** Procedure: save_RiskCodes
176 ** Purpose: Saves the RiskCodes factor configuration into
177 ** database. Checks if payeeid is null or not, if it is
178 ** null then updates the site level configuration values
179 ** otherwise checks if payee already has some entries.
180 ** if payee has entries then updates them otherwise
181 ** creates new entries.
182 */
183 procedure save_RiskCodes( i_payeeid in varchar2,
184 i_name in VARCHAR2,
185 i_description in VARCHAR2,
186 i_count in integer,
187 i_codes in codes_table );
188
189 /*
190 ** Procedure: load_RiskCodes
191 ** Purpose: loads the RiskCodes factor configuration into
192 ** output parameters. Checks if payeeid is null or not, if it is
193 ** null then loads the site level configuration values
194 ** otherwise checks if payee already has some entries.
195 ** if payee has entries then loads them otherwise
196 ** loads the sitelevel entries.
197 */
198 procedure load_RiskCodes( i_payeeid in varchar2,
199 o_name out nocopy VARCHAR2,
200 o_description out nocopy VARCHAR2,
201 o_codes out nocopy codes_table );
202
203 /*
204 ** Procedure: save_CreditRatingCodes
205 ** Purpose: Saves the CreditRatingCodes factor configuration into
206 ** database. Checks if payeeid is null or not, if it is
207 ** null then updates the site level configuration values
208 ** otherwise checks if payee already has some entries.
209 ** if payee has entries then updates them otherwise
210 ** creates new entries.
211 */
212 procedure save_CreditRatingCodes( i_payeeid in varchar2,
213 i_name in VARCHAR2,
214 i_description in VARCHAR2,
215 i_count in integer,
216 i_codes in codes_table );
217
218 /*
219 ** Procedure: load_CreditRatingCodes
220 ** Purpose: loads the CreditRatingCodes factor configuration into
221 ** output parameters. Checks if payeeid is null or not, if it is
222 ** null then loads the site level configuration values
223 ** otherwise checks if payee already has some entries.
224 ** if payee has entries then loads them otherwise
225 ** loads new entries.
226 */
227 procedure load_CreditRatingCodes( i_payeeid in varchar2,
228 o_name out nocopy VARCHAR2,
229 o_description out nocopy VARCHAR2,
230 o_codes out nocopy codes_table );
231
232 /*
233 ** Procedure: save_FreqOfPurchase
234 ** Purpose: Saves the FreqOfPurchase factor configuration into
235 ** database. Checks if payeeid is null or not, if it is
236 ** null then updates the site level configuration values
237 ** otherwise checks if payee already has some entries.
238 ** if payee has entries then updates them otherwise
239 ** creates new entries.
240 */
241 procedure save_FreqOfPurchase(i_payeeid in varchar2,
242 i_name in VARCHAR2,
243 i_description in VARCHAR2,
244 i_duration in integer,
245 i_durationType in VARCHAR2,
246 i_frequency in integer );
247
248 /*
249 ** Procedure: load_FreqOfPurchase
250 ** Purpose: loads the FreqOfPurchase factor configuration into
251 ** output parameters. Checks if payeeid is null or not, if it is
252 ** null then loads the site level configuration values
253 ** otherwise checks if payee already has some entries.
254 ** if payee has entries then loads them otherwise
255 ** creates new entries.
256 */
257 procedure load_FreqOfPurchase(i_payeeid in varchar2,
258 o_name out nocopy VARCHAR2,
259 o_description out nocopy VARCHAR2,
260 o_duration out nocopy integer,
261 o_durationType out nocopy VARCHAR2,
262 o_frequency out nocopy integer );
263
264 /*
265 ** Procedure: save_RiskScores
266 ** Purpose: Saves the RiskScores information into
267 ** database. Checks if payeeid is null or not, if it is
268 ** null then updates the site level RiskScores values
269 ** otherwise checks if payee already has some entries.
270 ** if payee has entries then updates them otherwise
271 ** creates new entries.
272 */
273 procedure save_RiskScores( i_payeeid in varchar2,
274 i_lowval in integer,
275 i_lowMedVal in integer,
276 i_medVal in integer,
277 i_medHighVal in integer,
278 i_highVal in integer );
279
280 /*
281 ** Procedure: load_RiskScores
282 ** Purpose: loads the RiskScores information into
283 ** output parameters. Checks if payeeid is null or not, if it is
284 ** null then loads the site level RiskScore values
285 ** otherwise checks if payee already has some entries.
286 ** if payee has entries then loads them otherwise
287 ** retrieves new entries.
288 */
289 procedure load_RiskScores( i_payeeid in varchar2,
290 o_lowval out nocopy integer,
291 o_lowMedVal out nocopy integer,
292 o_medVal out nocopy integer,
293 o_medHighVal out nocopy integer,
294 o_highVal out nocopy integer );
295
296 end iby_factor_pkg;
297
298