Models
ContactData
Payload for /Lead/SendContactForm containing prospect data and lead statements.
Namespace and purpose
Imoli\EflLeasingSdk\Model\Lead\ContactData represents the body of the /Lead/SendContactForm endpoint.
It contains a Prospect (lead details) and a list of StatementLead entries describing consents.
Class definition
- Namespace:
Imoli\EflLeasingSdk\Model\Lead - Class: final
ContactData
final class ContactData
{
public static function builder(): ContactDataBuilder;
public function __construct(
Prospect $prospect,
array $statementLeads
);
public function toRequestPayload(): array;
}
Properties
| Name | Type | Required | Description |
|---|---|---|---|
prospect | Prospect | Yes | Lead/prospect information (name, NIP, contact data). |
statementLeads | StatementLead[] | Yes | List of lead-specific statements/consents. |
Methods
| Method | Kind | Return type | Description |
|---|---|---|---|
builder() | static | ContactDataBuilder | Returns a fluent builder for constructing ContactData instances. |
toRequestPayload() | instance | array<string,mixed> | Serialises the contact data into the structure expected by EFL. |
toRequestPayload() returns an array with the following shape:
prospect– payload fromProspect::toRequestPayload(),statementLead– array of payloads fromStatementLead::toRequestPayload().
Usage in the SDK
- Used by
EflClient::sendContactForm. - Passed to
LeadApiClient::sendContactForm()as the request payload.