import 'package:pshared/data/dto/payment/card.dart';
import 'package:pshared/models/payment/methods/card.dart';


extension CardPaymentMethodMapper on CardPaymentMethod {
  CardEndpointDTO toDTO() => CardEndpointDTO(
    pan: pan,
    firstName: firstName,
    lastName: lastName,
    expMonth: expMonth,
    expYear: expYear,
    country: country,
  );
}

extension CardPaymentDataDTOMapper on CardEndpointDTO {
  CardPaymentMethod toDomain() => CardPaymentMethod(
    pan: pan,
    firstName: firstName,
    lastName: lastName,
    expMonth: expMonth,
    expYear: expYear,
    country: country,
  );
}
