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

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

        return $client;
    }
public static function createCommercial(string $companyName): Client
    {
        $organization = Organization::getByDefault();

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

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

@param string $companyName The company name of this Commercial Client.
@return Client Returns a partially generated Client for further use before insertion.

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