package cz.moneta.test.dsl.ib.tasks.cards.application;

import cz.moneta.test.dsl.ib.cards.application.CardDetailsPage;
import cz.moneta.test.dsl.ib.cards.application.PersonalDetailsPage;

import java.util.function.Function;

public class IbCardsApplicationTasks {

    public Function<CardDetailsPage, PersonalDetailsPage>
        fillCardDetails(String limit, String dailyPurchaseLimit, String dailyWithdrawsLimit,
                    String statementType, String activationPassword, String dueDate, String paymentMethod) {
        return start -> start.fillCreditLimit(limit)
                .selectTravelAndSportOffer()
                .fillDailyPurchasesLimit(dailyPurchaseLimit)
                .fillDailyWithdrawsLimit(dailyWithdrawsLimit)
                .selectStatementType(statementType)
                .fillActivationPassword(activationPassword)
                .selectDueDate(dueDate)
                .selectPaymentMethod(paymentMethod)
                .selectWithoutInsuranceOption()
                .agreeAndContinue();
    }
}
