def create_drc_corp_product(): p = Product(key_name='DRC_CORP') p.price = 4166 p.default_count = 12 p.possible_counts = [12] p.is_subscription = True p.visible = True p.organization_types = [] p.module_set = 'ALL' p.legal_entity_id = MC_TELECOM_LEGAL_ENTITY_ID p.is_multilanguage = False p.default_comment_translation_key = u'Abonnement annuel Ville Connect\xe9e pour les entreprises' p.description_translation_key = u'Abonnement Ville Connect\xe9e pour entreprises' return p
def create_drc_hefl_product(): p = Product(key_name='DRC_HEFL') p.price = 2000 p.default_count = 1 p.possible_counts = [1, 12] p.is_subscription = True p.visible = True p.organization_types = [] p.module_set = 'ALL' p.legal_entity_id = MC_TELECOM_LEGAL_ENTITY_ID p.is_multilanguage = False p.default_comment_translation_key = u'Abonnement mensuel Ville Connect\xe9e pour les entreprises travaillant \xe0 domicile, entrepreneur ou pigistes' p.description_translation_key = u'Abonnement pour les entreprises travaillant \xe0 domicile, entrepreneur ou pigistes' return p
def create_drc_stud_product(): p = Product(key_name='DRC_STUD') p.price = 1000 p.default_count = 1 p.possible_counts = [1, 12] p.is_subscription = True p.visible = True p.organization_types = [] p.module_set = 'ALL' p.legal_entity_id = MC_TELECOM_LEGAL_ENTITY_ID p.is_multilanguage = False p.default_comment_translation_key = u'Abonnement mensuel Ville Connect\xe9e pour \xe9tudiants' p.description_translation_key = u'Abonnement Ville Connect\xe9e pour \xe9tudiants' return p
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
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
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
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
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
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
def create_free_product(legal_entity_id, code_prefix=''): p = Product(key_name=code_prefix + Product.PRODUCT_FREE_SUBSCRIPTION) p.price = 0 p.default_count = 1 p.default = False p.possible_counts = [] p.is_subscription = True p.organization_types = [] p.product_dependencies = [] p.visible = True p.legal_entity_id = legal_entity_id p.module_set = 'ALL' 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
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
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
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
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
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
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
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
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
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