示例#1
0
def create_xcty_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_EXTRA_CITY)
    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 = [
        '|'.join([
            '%s%s:-1' % (code_prefix, product_code)
            for product_code in ('MSUP', 'MSSU', 'SSUP', 'SSZP', 'CSUB',
                                 Product.PRODUCT_FREE_PRESENCE,
                                 Product.PRODUCT_FREE_SUBSCRIPTION)
        ])
    ]
    p.picture_url = ""
    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
示例#2
0
def create_xtrb_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'XTRB')
    p.price = 10000
    p.default_count = 1
    p.default = False
    p.possible_counts = range(1, 101)
    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
    p.description_translation_key = 'XTRA.description'
    p.default_comment_translation_key = 'XTRA.default_comment'
    return p
示例#3
0
def create_msub_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'MSUB')
    p.price = 25000
    p.default_count = 12
    p.default = False
    p.possible_counts = [1, 12, 24, 36]
    p.is_subscription = True
    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
    p.description_translation_key = 'MSUP.description'
    p.default_comment_translation_key = 'MSSU.default_comment'
    return p
示例#4
0
def create_klup_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'KLUP')
    p.price = -18000
    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 = [code_prefix + 'LSUP', code_prefix + 'KSUP:-1']
    p.visible = False
    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
示例#5
0
def create_ssup_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'SSUP')
    p.price = 1000
    p.default_count = 12
    p.default = False
    p.possible_counts = [12, 24, 36]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_NON_PROFIT]
    p.product_dependencies = []
    p.visible = False
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = 'MSSU.default_comment'
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
示例#6
0
def create_visi_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'VISI')
    p.price = 30
    p.default_count = 250
    p.default = False
    p.possible_counts = [250, 500, 750]
    p.is_subscription = False
    p.is_subscription_discount = False
    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
示例#7
0
def create_msud_product(legal_entity_id, code_prefix='', default_count=12):
    p = Product(key_name=code_prefix + 'MSUD')
    p.price = -5000
    p.default_count = default_count
    p.default = True
    p.possible_counts = [1, 12, 24, 36]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = [code_prefix + 'MSUP']
    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
示例#8
0
def create_loya_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'LOYA')
    p.price = 30000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1, 2, 3, 4]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.organization_types = []
    p.product_dependencies = [code_prefix + 'MSUP:-1']
    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
示例#9
0
def create_xtra_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'XTRA')
    p.price = 7500
    p.default_count = 1
    p.default = False
    p.possible_counts = range(1, 101)
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    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'
    return p
示例#10
0
def create_pres_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'PRES')
    p.price = 30000
    p.default_count = 4
    p.default = False
    p.possible_counts = range(1, 101)
    p.is_subscription = False
    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
    p.default_comment_translation_key = ''
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
示例#11
0
def create_setd_product(legal_entity_id, code_prefix='', price=-7500):
    p = Product(key_name=code_prefix + 'SETD')
    p.price = price
    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 = [code_prefix + 'SETU']
    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
示例#12
0
def create_beac_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_BEACON)
    p.price = 3500
    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 = []
    p.product_dependencies = []
    p.visible = True
    p.picture_url = "/static/images/solutions/flex/BEACON_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
示例#13
0
def create_kspp_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'KSPP')
    p.price = -1500
    p.default_count = 36
    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 + 'MSUP']
    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
示例#14
0
def create_updi_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'UPDI')
    p.price = -1000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
    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
示例#15
0
def create_lsup_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'LSUP')
    p.price = 60000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = True
    p.organization_types = []
    p.product_dependencies = [code_prefix + 'MSUP:-1']
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.extra_subscription_months = 12
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = 'LOYA.default_comment'
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
示例#16
0
def create_csux_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'CSUX')
    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 = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = 'CSUB.default_comment'
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
示例#17
0
def create_demo_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'DEMO')
    p.price = 0
    p.default_count = 3
    p.default = False
    p.possible_counts = [3]
    p.is_subscription = True
    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
示例#18
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
示例#19
0
def create_otrm_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'OTRM')
    p.price = 19900
    p.default_count = 1
    p.default = False
    p.possible_counts = range(1, 50)
    p.is_subscription = False
    p.is_subscription_discount = 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.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
示例#20
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
示例#21
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
示例#22
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
示例#23
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
示例#24
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
示例#25
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
示例#26
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
示例#27
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
示例#28
0
def create_sgup_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'SGUP')
    p.price = 49500
    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 = [ServiceProfile.ORGANIZATION_TYPE_CITY]
    p.product_dependencies = [
        '%(code_prefix)sCSUB:-1|%(code_prefix)sMSUP:-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
示例#29
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