src/UCRM/REST/Endpoints/Helpers/ClientHelper.php
public static function createResidential(string $firstName, string $lastName): Client
    {
        $organization = Organization::getByDefault();

        $client = new Client([
            "clientType" => Client::CLIENT_TYPE_RESIDENTIAL,
            "isLead" => false,
            "invoiceAddressSameAsContact" => true,
            "organizationId" => $organization->getId(),
            "registrationDate" => (new \DateTime())->format("c"),
            "firstName" => $firstName,
            "lastName" => $lastName
        ]);

        return $client;
    }
public static function createResidential(string $firstName, string $lastName): Client
    {
        $organization = Organization::getByDefault();

        $client = new Client([
            "clientType" => Client::CLIENT_TYPE_RESIDENTIAL,
            "isLead" => false,
            "invoiceAddressSameAsContact" => true,
            "organizationId" => $organization->getId(),
            "registrationDate" => (new \DateTime())->format("c"),
            "firstName" => $firstName,
            "lastName" => $lastName
        ]);

        return $client;
    }
public static function createResidential ( string $ firstName , string $ lastName ) : Client { $ organization = Organization :: getByDefault ( ) ; $ client = new Client ( [ "clientType" => Client :: CLIENT_TYPE_RESIDENTIAL , "isLead" => false , "invoiceAddressSameAsContact" => true , "organizationId" => $ organization -> getId ( ) , "registrationDate" => ( new \ DateTime ( ) ) -> format ( "c" ) , "firstName" => $ firstName , "lastName" => $ lastName ] ) ; return $ client ; }
Creates the minimal Residential Client to be used as a starting point for a new Client.

@param string $firstName The Client's first name.
@param string $lastName The Client's last name.
@return Client Returns a partially generated Client for further use before insertion.

@throws \Exception
Creates the minimal Residential Client to be used as a starting point for a new Client .