SubscriptionsResourcePauseCollection.fromJson constructor

SubscriptionsResourcePauseCollection.fromJson(
  1. Object? json
)

Implementation

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