38 lines
998 B
PHP
38 lines
998 B
PHP
<?php
|
|
|
|
namespace App\BusProNet\Model;
|
|
|
|
/**
|
|
* The answer to "Adresse_Neu": the ids of the address the CRM now holds for this person, and
|
|
* whether it had to create it.
|
|
*
|
|
* isNewRecord() is BusPro's own duplicate check ("neuanlage"): False means it matched an address
|
|
* that already existed and answered with that one's ids, so a caller never has to look for
|
|
* duplicates itself - which it could not anyway, as reading an address needs the customer's
|
|
* password. It says nothing about which CRM selections that address carries.
|
|
*/
|
|
class RegistrationResponse
|
|
{
|
|
public function __construct(
|
|
private readonly int $addressId,
|
|
private readonly int $personId,
|
|
private readonly bool $isNewRecord,
|
|
) {
|
|
}
|
|
|
|
public function getAddressId(): int
|
|
{
|
|
return $this->addressId;
|
|
}
|
|
|
|
public function getPersonId(): int
|
|
{
|
|
return $this->personId;
|
|
}
|
|
|
|
public function isNewRecord(): bool
|
|
{
|
|
return $this->isNewRecord;
|
|
}
|
|
}
|