KeckUser.fromJson constructor
Implementation
factory KeckUser.fromJson(Map<String, dynamic> json, String userId) {
return KeckUser(
userId: userId,
email: json['email'] as String,
companyName: json['company_name'] as String,
phone: json['phone'] as String,
createTime: json['create_time'].toDate(),
cashregisterCount: json['metadata']['cashregister_count'] as int,
signatureCount: json['metadata']['signature_count'] as int,
isSmallBusiness: json['tax_details']['is_small_business'] as bool,
taxnr: json['tax_details']['taxnr'] as String,
isProduction: json['production'] == true,
apiKey: json['api_key'] as String?,
uid: json['tax_details']['uid'] as String?,
gln: json['tax_details']['gln'] as String?,
benid: json['webservice_user']['benid'] as String?,
tid: json['webservice_user']['tid'] as String?,
pin: json['webservice_user']['pin'] as String?,
addressCity: json['address']['city'] as String,
addressStreet: json['address']['street'] as String,
addressZip: json['address']['zip'] as String,
footer1: json['footer']['footer1'] as String,
footer2: json['footer']['footer2'] as String,
footer3: json['footer']['footer3'] as String?,
footer4: json['footer']['footer4'] as String?,
logoUrl: json['logo_url'] as String?,
thanksMessage: json['thanks_message'] as String?,
);
}