SubscriptionPauseCollection.fromJson constructor

SubscriptionPauseCollection.fromJson(
  1. Object? json
)

Implementation

factory SubscriptionPauseCollection.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SubscriptionPauseCollection(
    behavior: SubscriptionPauseCollectionBehavior.fromJson(map['behavior']),
    resumesAt: map['resumes_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['resumes_at'] as int).toInt()),
  );
}