IssuingPersonalizationDesign.fromJson constructor

IssuingPersonalizationDesign.fromJson(
  1. Object? json
)

Implementation

factory IssuingPersonalizationDesign.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return IssuingPersonalizationDesign(
    cardLogo:
        map['card_logo'] == null ? null : FileOrId.fromJson(map['card_logo']),
    carrierText: map['carrier_text'] == null
        ? null
        : IssuingPersonalizationDesignCarrierText.fromJson(
            map['carrier_text']),
    created:
        DateTime.fromMillisecondsSinceEpoch((map['created'] as int).toInt()),
    id: (map['id'] as String),
    livemode: (map['livemode'] as bool),
    lookupKey:
        map['lookup_key'] == null ? null : (map['lookup_key'] as String),
    metadata: (map['metadata'] as Map).cast<String, Object?>().map((
          key,
          value,
        ) =>
            MapEntry(
              key,
              (value as String),
            )),
    name: map['name'] == null ? null : (map['name'] as String),
    physicalBundle:
        IssuingPhysicalBundleOrId.fromJson(map['physical_bundle']),
    preferences:
        IssuingPersonalizationDesignPreferences.fromJson(map['preferences']),
    rejectionReasons: IssuingPersonalizationDesignRejectionReasons.fromJson(
        map['rejection_reasons']),
    status: IssuingPersonalizationDesignStatus.fromJson(map['status']),
  );
}