TokenCompany.fromJson constructor

TokenCompany.fromJson(
  1. Object? json
)

Implementation

factory TokenCompany.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TokenCompany(
    address: map['address'] == null
        ? null
        : AccountSupportAddress.fromJson(map['address']),
    addressKana: map['address_kana'] == null
        ? null
        : AccountAddressKana.fromJson(map['address_kana']),
    addressKanji: map['address_kanji'] == null
        ? null
        : AccountAddressKana.fromJson(map['address_kanji']),
    directorsProvided: map['directors_provided'] == null
        ? null
        : (map['directors_provided'] as bool),
    executivesProvided: map['executives_provided'] == null
        ? null
        : (map['executives_provided'] as bool),
    exportLicenseId: map['export_license_id'] == null
        ? null
        : (map['export_license_id'] as String),
    exportPurposeCode: map['export_purpose_code'] == null
        ? null
        : (map['export_purpose_code'] as String),
    name: map['name'] == null ? null : (map['name'] as String),
    nameKana: map['name_kana'] == null ? null : (map['name_kana'] as String),
    nameKanji:
        map['name_kanji'] == null ? null : (map['name_kanji'] as String),
    ownersProvided: map['owners_provided'] == null
        ? null
        : (map['owners_provided'] as bool),
    ownershipDeclaration: map['ownership_declaration'] == null
        ? null
        : AccountOwnershipDeclaration.fromJson(map['ownership_declaration']),
    ownershipDeclarationShownAndSigned:
        map['ownership_declaration_shown_and_signed'] == null
            ? null
            : (map['ownership_declaration_shown_and_signed'] as bool),
    phone: map['phone'] == null ? null : (map['phone'] as String),
    registrationNumber: map['registration_number'] == null
        ? null
        : (map['registration_number'] as String),
    structure: map['structure'] == null
        ? null
        : AccountStructure.fromJson(map['structure']),
    taxId: map['tax_id'] == null ? null : (map['tax_id'] as String),
    taxIdRegistrar: map['tax_id_registrar'] == null
        ? null
        : (map['tax_id_registrar'] as String),
    vatId: map['vat_id'] == null ? null : (map['vat_id'] as String),
    verification: map['verification'] == null
        ? null
        : AccountVerification.fromJson(map['verification']),
  );
}