/***********************************************************************************************************
 * Name         : ContactTriggerHelper
 * Purpose      : Implementation for methods called by ContactTriggerHandler
 **********************************************************************************************************/
public with sharing class ContactTriggerHelper {
    /**
     * Sets the RecordType and populates required fields for Contacts converted from CA Leads.
     *
     * @param newList List of Contact records to process
     */
    public static void setRecordTypeAndPopulateRequiredFields(List<Contact> newList) {
        for (Contact record : newList) {
            if (record.ConvertedFromLeadRecordType__c == LeadTriggerHelper.CA_RECTYPE_ID) {
                record.RecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName()
                    .get(CA_Constants.RECORD_TYPE_CA)
                    .getRecordTypeId();
                record.Department = CA_Constants.RECORD_TYPE_CA;
                record.Email = 'c@a.com';
            }
        }
    }
}
