MerchantConfig.fromJson constructor

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

Implementation

factory MerchantConfig.fromJson(Map<String, dynamic> json) {
  return MerchantConfig(
    id: json['id'],
    merchantId: json['merchantId'],
    name: json['name'],
    host: json['host'],
    platform: json['platform'],
    kwikpassEnabled: json['kwikpassEnabled'],
    isWhatsappOtpLessActive: json['isWhatsappOtpLessActive'],
    isTruecallerActive: json['isTruecallerActive'],
    integrationType: json['integrationType'],
    isLogoutBtnDisabled: json['isLogoutBtnDisabled'],
    popupBreakpoint: json['popupBreakpoint'] ?? "",
    apiKey: json['apiKey'] ?? "",
    isPublicAppInstalled: json['isPublicAppInstalled'],
    thirdPartyServiceProviders: (json['thirdPartyServiceProviders'] as List)
        .map((e) => ThirdPartyServiceProvider.fromJson(e))
        .toList(),
    kpRequestId: json['kpRequestId'],
    customerIntelligenceEnabled: json['customerIntelligenceEnabled'],
    customerIntelligenceMetrics: json['customerIntelligenceMetrics'] ?? null,
    marketingPopupGlobalLimit: json['marketingPopupGlobalLimit'],
    customerAccountsVersion: json['customerAccountsVersion'],
    rlEnabled: json['rlEnabled'],
    kpAppName: json['kpAppName'] as String?,
    isCustomAccountPageEnabled: json['isCustomAccountPageEnabled'] ?? false,
    isPagePingEnabled: json['isPagePingEnabled'] ?? false,
    pagePingConfig: json['pagePingConfig'] ?? null,
    kpFeatures: (json['kpFeatures'] as List?)?.map((e) => e as String).toList() ?? [],
    consentState: json['consentState'] as String?,
    isDPDPCompliancePopup: json['isDPDPCompliancePopup'] ?? false,
    isSilentAuth: json['isSilentAuth'] ?? false,
    isCustomizePopupHandled: json['isCustomizePopupHandled'] ?? false,
    isMultiplePlatform: json['isMultiplePlatform'] ?? false,
    isS2sEventEnabled: json['isS2sEventEnabled'] ?? false,
    merchantIntegrationType: json['merchantIntegrationType'] != null
        ? Map<String, dynamic>.from(json['merchantIntegrationType'])
        : null,
  );
}