AmwalInAppSdkSettings.fromJson constructor

AmwalInAppSdkSettings.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AmwalInAppSdkSettings.fromJson(Map<String, dynamic> json) {
  return AmwalInAppSdkSettings(
    token: json['token'],
    maxTransactionAmount: json['maxTransactionAmount'],
    secureHashValue: json['secureHashValue'],
    merchantId: json['merchantId'],
    terminalIds: json['terminalIds'] ?? [],
    transactionId: json['transactionId'],
    merchantName: json['merchantName'],
    onPay: json['onPay'],
    countDownInSeconds: json['countDownInSeconds'],
    getTransactionFunction: json['getTransactionFunction'],
    onError: json['onError'],
    log: json['log'],
    onCountComplete: json['onCountComplete'],
    locale: json['locale'],
    isMocked: json['isMocked'],
    transactionType: json['isNfc'] == true
        ? TransactionType.nfc
        : TransactionType.cardWallet,
    onTokenExpired: json['onTokenExpired'],
    flavor: json['flavor'],
    additionValues: json['additionValues'] != null
        ? Map<String, String>.from(json['additionValues'])
        : null,
  );
}