Lines Matching refs:cost
227 * Gets the expected cost category of a short number when dialed from a region
241 * ShortNumberCost cost = shortInfo.getExpectedCostForRegion(number,
243 * // Do something with the cost information here.
247 * want to know the expected cost category
249 * @return {i18n.phonenumbers.ShortNumberInfo.ShortNumberCost} the expected cost
251 * number does not match a cost category. Note that an invalid number may
252 * match any cost category.
293 * Gets the expected cost category of a short number (however, nothing is
298 * highest cost in the sequence PREMIUM_RATE, UNKNOWN_COST, STANDARD_RATE,
301 * another, its expected cost cannot be estimated as one of the latter since it
305 * the expected cost returned by this method will be STANDARD_RATE, since the
313 * want to know the expected cost category
315 * expected cost category of the short number in the region(s) with the
330 var cost = ShortNumberCost.TOLL_FREE;
338 cost = ShortNumberCost.UNKNOWN_COST;
341 if (cost !== ShortNumberCost.UNKNOWN_COST) {
342 cost = ShortNumberCost.STANDARD_RATE;
349 throw new Error('Unrecognized cost for region: ' + costForRegion);
352 return cost;
422 * Gets a valid short number for the specified cost category.
426 * @param {i18n.phonenumbers.ShortNumberInfo.ShortNumberCost} cost the cost
428 * @return {string} a valid short number for the specified region and cost
430 * information, or the cost is UNKNOWN_COST.
433 function(regionCode, cost) {
440 switch (cost) {
452 // the other cost categories.