Exemplo n.º 1
0
def create_ilos_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'ILOS')
    p.price = 7500
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 2
0
def create_appl_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'APPL')
    p.price = 10000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.is_subscription_extension = True
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_CITY]
    p.product_dependencies = []
    p.visible = True
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = ''
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    p.charge_interval = 12
    return p
Exemplo n.º 3
0
def create_fcty_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'FCTY')
    p.price = 0
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_CITY]
    p.product_dependencies = []
    p.visible = True
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 4
0
def create_kkrt_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_CARDS)
    p.price = 1750
    p.default_count = 2
    p.default = False
    p.possible_counts = range(1, 6)
    p.is_subscription = False
    p.is_subscription_extension = False
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.picture_url = "/static/images/solutions/flex/loyalty_cards.jpg"
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 5
0
def create_bnnr_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_ROLLUP_BANNER)
    p.price = 10000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_CITY]
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.picture_url = "/static/images/solutions/flex/rollup_banner.jpg"
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 6
0
def create_csub_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'CSUB')
    p.price = 0
    p.default_count = 12
    p.default = False
    p.possible_counts = [12]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_CITY]
    p.product_dependencies = [code_prefix + 'SGUP:-1']
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 7
0
def create_mssu_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'MSSU')
    p.price = 1000
    p.default_count = 12
    p.default = False
    p.possible_counts = [6, 12, 24, 36]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'STATIC_MODULES'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 8
0
def create_cred_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix +
                Product.PRODUCT_ONE_TIME_CREDIT_CARD_PAYMENT_DISCOUNT)
    p.price = -1000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = False
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 9
0
def create_posm_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_FLYERS)
    p.price = 6
    p.default_count = 250  # 15 euro per 250
    p.default = False
    p.possible_counts = [
        250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500
    ]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.organization_types = []
    p.product_dependencies = []
    p.visible = False
    p.picture_url = "/static/images/solutions/flex/FLYERS_PRESENTATIE.jpg"
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 10
0
def create_ocap_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_FREE_PRESENCE)
    p.price = 0
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'STATIC_MODULES'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.default_comment_translation_key = ''
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 11
0
def create_setx_product(legal_entity_id,
                        code_prefix=''):  # Used for the platinum subscription
    p = Product(key_name=code_prefix + 'SETX')
    p.price = 0
    p.default_count = 1
    p.default = True
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 12
0
def create_xctd_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'XCTD')
    p.price = -1000
    p.default_count = 1
    p.default = False
    p.possible_counts = range(1, 37)
    p.is_subscription = False
    p.is_subscription_discount = False
    p.is_subscription_extension = True
    p.organization_types = []
    p.product_dependencies = [
        '%(code_prefix)sXCTY:-1' % dict(code_prefix=code_prefix)
    ]
    p.picture_url = ""
    p.visible = True
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = ''
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
Exemplo n.º 13
0
def create_vsdi_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'VSDI')
    p.price = -1500
    p.default_count = 12
    p.default = True
    p.possible_counts = [12, 24, 36]
    p.is_subscription = False
    p.is_subscription_discount = True
    p.organization_types = []
    p.product_dependencies = [
        '%(code_prefix)sMSUP:-1|%(code_prefix)sLSUP:-1' %
        dict(code_prefix=code_prefix)
    ]
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 14
0
def create_sxdm_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'SXDM')
    p.price = 0
    p.default_count = 36
    p.default = False
    p.possible_counts = [36]
    p.is_subscription = False
    p.is_subscription_discount = True
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = [
        '%(code_prefix)sMSUP|%(code_prefix)sMSSU|%(code_prefix)sSSUP|%(code_prefix)sSSZP'
        % dict(code_prefix=code_prefix)
    ]
    p.visible = False
    p.extra_subscription_months = 12
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = ''
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
Exemplo n.º 15
0
def create_a3ct_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_ACTION_3_EXTRA_CITIES)
    p.price = 2000
    p.default_count = 1
    p.default = False
    p.possible_counts = range(1, 37)
    p.is_subscription = False
    p.is_subscription_discount = False
    p.is_subscription_extension = True
    p.organization_types = []
    p.product_dependencies = [
        '%(code_prefix)sMSUP:-1|%(code_prefix)sMSSU:-1|%(code_prefix)sSSUP:-1|%(code_prefix)sSSZP:-1|%(code_prefix)sOCAP:-1'
        % dict(code_prefix=code_prefix)
    ]
    p.picture_url = ""
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p