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
| Name | Type | Required | Description |
|---|---|---|---|
name | string|null | No | Name of the product type. |
id | int | Yes | Product type identifier used in other API calls. |
vatRate | float | Yes | VAT rate applicable to this type. |
recommended | bool | Yes | Whether this type is recommended. |
Methods
| Method | Kind | Return type | Description |
|---|---|---|---|
fromArray() | static | ProductType | Creates 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
- Nested inside
ProductClass. - Used by
EflClient::getBrandModelByProductTypewhen requesting brand/model information for a given type.