GetAccountResponseMessage.fromMap constructor

GetAccountResponseMessage.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory GetAccountResponseMessage.fromMap(Map<String, dynamic> map) {
  return GetAccountResponseMessage(
    accountId: map['id'],
    name: map['name'],
    createdAt: map['created_at'] != null ? DateTime.fromMillisecondsSinceEpoch(map['created_at']) : null,
    updatedAt: map['updated_at'] != null ? DateTime.fromMillisecondsSinceEpoch(map['updated_at']) : null,
    canReceive: map['can_receive'],
    isVerified: map['is_verified'],
    lastAccountVerificationRequestStatus: map['last_verification_request_status'],
    lastAccountVerificationRequestData: map['last_verification_request_data'] == null ? null : AccountModel.fromMap(map['last_verification_request_data']),
    lastAccountVerificationRequestDataFeedback: map['last_verification_request_feedback'],
    changePlanType: map['change_plan_type'],
    subscriptionsTrialPeriod: map['subscriptions_trial_period'],
    disableEmails: map['disable_emails'],
    lastWithdraw: map['last_withdraw'] == null ? null : WithdrawModel.fromMap(map['last_withdraw']),
    totalSubscriptions: map['total_subscriptions'],
    replyToEmail: map['reply_to'],
    runningInTestMode: map['webapp_on_test_mode'],
    isMarketplace: map['marketplace'],
    enableAutoWithdraw: map['auto_withdraw'],
    balance: map['balance'],
    protectedBalance: map['protected_balance'],
    payableBalance: map['payable_balance'],
    receivableBalance: map['receivable_balance'],
    commissionBalance: map['commission_balance'],
    lastMonthVolume: map['volume_last_month'],
    currentVolume: map['volume_this_month'],
    taxesPaidLastMonth: map['taxes_paid_last_month'],
    taxesPaidMonth: map['taxes_paid_this_month'],
    clientLogoUrl: map['custom_logo_url'],
    clientSmallLogoUrl: map['custom_logo_small_url'],
    extraInformations: map['informations'] == null ? null : List<Information>.from(map['informations']?.map((x) => Information.fromMap(x))),
  );
}