QuoteFinalizeQuoteOptions.fromJson constructor

QuoteFinalizeQuoteOptions.fromJson(
  1. Object? json
)

Implementation

factory QuoteFinalizeQuoteOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return QuoteFinalizeQuoteOptions(
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    expiresAt: map['expires_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['expires_at'] as int).toInt()),
  );
}