Skip to content

Uniqa

Helper to add into your Uniqa product to help you with common scenarios/problems

Interface

Use

In your class definition add , UniqaInterface after implements GeneralProductInterface
and in your section of uses (at the top) add

use BP\Products\Interfaces\UniqaInterface;

Constants

// Purpose
public const PURPOSE_HISTORIC = 10;

// Legal form constants
public const FO = 1;
public const SE = 3;
public const COM = 2;

// Special
public const COMPANY_BIRTH = '19800101';
public const CROSSSELLING = 'CS0';
public const DEAR_CLIENT = '6';

// Constants
public const ID_CALC = 'ID_Vypocet';

// Reinsurances constants
public const EURO = 'euro_ochr';

Trait

Use

Right below your class definition add

use BP\Products\Traits\UniqaTrait;

Methods

formatDate($date, string $format = 'Ymd'): string

/**
 * Convert date into right format
 *
 * @param string $date
 * @param string $format
 * @return string
 */

// Example
public function parseDateOfFirstEvidence(string $date): string
{
    return $this->formatDate($date);
}

Parsers

Predefined parsers so you only call $this->value('field'); for these parsers and they will be parsed into right format
Don't redefine them if you doesn't need different outputs

Automatically parsed fields

  • [Field::BLOCK_HOLDER, Field::LEGAL_FORM] (parseHolderLegalForm)
  • [Field::BLOCK_HOLDER, Field::BIRTH] (parseHolderBirth)
  • Field::FUEL
  • Field::PAYMENT_FREQUENCY
  • Field::PAYMENT_METHOD
  • Field::VEHICLE_BRAND
  • Field::VEHICLE_MODEL
  • Field::VEHICLE_PURPOSE
  • Field::START