import 'package:json_annotation/json_annotation.dart';

import 'package:pshared/api/responses/base.dart';
import 'package:pshared/api/responses/token.dart';
import 'package:pshared/data/dto/payment/method.dart';

part 'method.g.dart';


@JsonSerializable(explicitToJson: true)
class PaymentMethodResponse extends BaseAuthorizedResponse {

  @JsonKey(name: 'payment_methods')
  final List<PaymentMethodDTO> paymentMethods;

  const PaymentMethodResponse({required super.accessToken, required this.paymentMethods});

  factory PaymentMethodResponse.fromJson(Map<String, dynamic> json) => _$PaymentMethodResponseFromJson(json);
  @override
  Map<String, dynamic> toJson() => _$PaymentMethodResponseToJson(this);
}