EFL
Models

ProductType

Leaf node in the product catalogue representing a specific product type with VAT and recommendation flag.

Namespace and purpose

Imoli\EflLeasingSdk\Model\Products\ProductType represents a single product type in the EFL product catalogue. It carries the type identifier, VAT rate and a recommended flag.

Class definition

  • Namespace: Imoli\EflLeasingSdk\Model\Products
  • Class: final ProductType
final class ProductType
{
    public ?string $name;

    public int $id;

    public float $vatRate;

    public bool $recommended;

    public static function fromArray(array $data): self;
}

Properties

NameTypeRequiredDescription
namestring|nullNoName of the product type.
idintYesProduct type identifier used in other API calls.
vatRatefloatYesVAT rate applicable to this type.
recommendedboolYesWhether this type is recommended.

Methods

MethodKindReturn typeDescription
fromArray()staticProductTypeCreates a product type from raw API data (name, id, VAT rate and recommended flag).

fromArray() reads name as string, casts id to int, vatRate to float and recommended to bool.

Usage in the SDK