fromMap static method

LabourLabourContact? fromMap(
  1. Object? body
)

Implementation

static LabourLabourContact? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return LabourLabourContact(
    addressLine1: readText(source['address_line_1']),
    addressLine2: readText(source['address_line_2']),
    addressLine3: readText(source['address_line_3']),
    addressLine4: readText(source['address_line_4']),
    addressLine5: readText(source['address_line_5']),
    city: readText(source['city']),
    contactType: readText(source['contact_type']),
    country: readText(source['country']),
    designation: readText(source['designation']),
    emailAddress: readText(source['email_address']),
    fax: LabourLabourContactFax.fromMap(source['fax']),
    firstName: readText(source['first_name']),
    id: readText(source['id']),
    lastName: readText(source['last_name']),
    middleName: readAny(source['middle_name']),
    mobile: LabourLabourContactMobile.fromMap(source['mobile']),
    object: readText(source['object']),
    phone: LabourLabourContactPhone.fromMap(source['phone']),
    postCode: readText(source['post_code']),
    receiveEmail: readFlag(source['receive_email']),
    salutation: readText(source['salutation']),
    state: readText(source['state']),
    status: readText(source['status']),
  );
}