import 'package:be_happy/domain/entities/subscription.dart';

class SubscriptionsResponse {
  final List<Subscription> subscriptions;

  SubscriptionsResponse({required this.subscriptions});

  factory SubscriptionsResponse.fromJson(Map<String, dynamic> json) {
    return SubscriptionsResponse(
      subscriptions: (json['data'] as List<dynamic>)
          .map((e) => Subscription.fromJson(e as Map<String, dynamic>))
          .toList(),
    );
  }
}
