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


extension LedgerPaymentMethodMapper on LedgerPaymentMethod {
  LedgerEndpointDTO toDTO() => LedgerEndpointDTO(
    ledgerAccountRef: ledgerAccountRef,
    contraLedgerAccountRef: contraLedgerAccountRef,
  );
}

extension LedgerPaymentDataDTOMapper on LedgerEndpointDTO {
  LedgerPaymentMethod toDomain() => LedgerPaymentMethod(
    ledgerAccountRef: ledgerAccountRef,
    contraLedgerAccountRef: contraLedgerAccountRef,
  );
}
