Skip to content

Kasko Product documentation

Documentation for kasko product subclass

Have to implements (interface)

add to your product (or replace GeneralProductInterface)

... implements \BP\Products\Kasko\KaskoInterface

participation(): array

/**
 * Get insurance participation
 *
 * @return array
 */
public function participation(): array
{
    return [
        PARTIC_PERCENT => 5,
        PARTIC_PERIOD => 1, // (optional, insurance period)
        PARTIC_BONUS => true // (optional)
        PARTIC_SUM => 165,
    ];
}

Can implement

coverage(): array

/**
 * Return health, property for PZP coverages
 *
 * @return array
 */
public function coverage(): array
{
    return [
        COVERAGE_PROPERTY => 1,        // Property coverage in milions €
        COVERAGE_HEALTH => 5,          // Health ...
    ];
}

Inherited from KaskoProduct class

Methods and properties you can use from general product class
+ Vehicle helpers

Properties

protected string $textCarValue - Set to show custom car value instead of numeric value

Methods

additionalEquipment(): array

/**
 * Prepare data for additional equipment
 *
 * @return array
 * [
 *      'sum_disc' => price with discount together
 *      'sum' => price together
 *      'items' => number of items
 *      'data' => array of additional equipment , each is array with array keys 'name', 'price' and 'price_disc'
 * ]
 */

carAge(bool $fromStart = false): int

/**
 * Get car age detected from date of first evidence
 *
 * @param bool $fromStart (if car age should be calculated in day of start of insurance)
 * @return int
 */

carValue()

/**
 * Get car valuation for actual product
 * Additional equipment sum included!
 *
 * @return number
 */

gapPrice()

/**
 * Get price for GAP
 *
 * @return number
 */

hasSecurity(string $code): bool

/**
 * Detect if security is available in vehicle
 *
 * @param string $code (see constants)
 * @return bool
 */

isCarNew(): bool

/**
 * Detect if car is considered new
 *
 * @return bool
 */

isNewPrice(): bool

/**
 * Detect if car price is new (true) or time price (false)
 *
 * @return bool
 */

setCarValue($value)

/**
 * Set custom car value if provided by insurance company
 *
 * @param number $value (if you need to set custom text, use $this->textCarValue = 'anything')
 * @return void
 */

setGapPrice($value)

/**
 * Set custom gap price
 *
 * @param string $value
 * @return void
 */

securityName(string $code): string

/**
 * Get security name
 *
 * @param string $code
 * @return string
 */

valSource(): int

/**
 * Detect what source of car valuation we have
 *
 * 1 = Slovexperta
 * 0 = other
 *
 * @return int
 */

valType(): string

/**
 * Detect what type of car valuation we have
 *
 * VALUATION_AAD = from aad
 * VALUATION_CUSTOM = from call to infoline
 * VALUATION_INVOICE = from invoice
 *
 * @return *Valuation type (see constans)*
 */