CardShipping.fromJson constructor

CardShipping.fromJson(
  1. Object? json
)

Implementation

factory CardShipping.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CardShipping(
    address: CardholderAddress.fromJson(map['address']),
    customs:
        map['customs'] == null ? null : CardCustoms.fromJson(map['customs']),
    name: (map['name'] as String),
    phoneNumber:
        map['phone_number'] == null ? null : (map['phone_number'] as String),
    requireSignature: map['require_signature'] == null
        ? null
        : (map['require_signature'] as bool),
    service: map['service'] == null
        ? null
        : IssuingCardShippingService.fromJson(map['service']),
    type: map['type'] == null
        ? null
        : IssuingCardShippingType.fromJson(map['type']),
  );
}