class PaymentRequestPayeeResponse {
  final bool success;
  final String message;
  final List<String> data;
  final dynamic errors; 
  final int statusCode;
  final DateTime timestamp;

  PaymentRequestPayeeResponse({
    required this.success,
    required this.message,
    required this.data,
    this.errors,
    required this.statusCode,
    required this.timestamp,
  });

  factory PaymentRequestPayeeResponse.fromJson(Map<String, dynamic> json) {
    return PaymentRequestPayeeResponse(
      success: json['success'] ?? false,
      message: json['message'] ?? '',
      data: List<String>.from(json['data'] ?? []),
      errors: json['errors'],
      statusCode: json['statusCode'] ?? 0,
      timestamp: DateTime.parse(json['timestamp']),
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'success': success,
      'message': message,
      'data': data,
      'errors': errors,
      'statusCode': statusCode,
      'timestamp': timestamp.toIso8601String(),
    };
  }
}
