# encoding: utf-8

from datetime import datetime
from utils import get_store_id


class BenefitsHeaderDto(object):
    def __init__(self, title, promotion_name, operator, start_date, end_date):
        # type: (str, str, str, str, str) -> ()

        self.title = title
        self.store_name = get_store_id()
        self.promotion_name = promotion_name if promotion_name is not None else title
        self.operator = operator if operator is not None else "$ALL_OPERATORS"
        self.start_date = datetime.strptime(start_date, '%Y%m%d').strftime('%d/%m/%y')
        self.end_date = datetime.strptime(end_date, '%Y%m%d').strftime('%d/%m/%y')
