package com.banesco.infrastructure.rest.mappers;

import com.banesco.domain.bian.request.BusUpdateCardStatusRequest;
import com.banesco.infrastructure.dtos.card.UpdateCardStatusRequest;
import com.banesco.infrastructure.dtos.osb.MsgRqHdr;
import jakarta.enterprise.context.ApplicationScoped;

@ApplicationScoped
public class PaymentCardMapper {


    public UpdateCardStatusRequest toBusinessRequest(
            MsgRqHdr msgRqHdr,
            BusUpdateCardStatusRequest receptionRequest,
            String clearAccount,
            String domain
    ) {

        receptionRequest.getCardReference().setCardNumber(clearAccount);
        UpdateCardStatusRequest request = new UpdateCardStatusRequest(
                msgRqHdr,
                receptionRequest.getCustomerReference(),
                receptionRequest.getCardReference(),
                domain

        );


        return request;

    }
}
