def build_tea(self):
        c = CatalogObject()
        c.type = 'ITEM'
        c.id = self.CLIENT_ID_TEA
        c.present_at_all_locations = True

        stiv = CatalogItemVariation()
        stiv.item_id = c.id
        stiv.name = 'Small'
        stiv.pricing_type = 'FIXED_PRICING'
        stiv.price_money = Money(150, 'USD')
        st = CatalogObject()
        st.type = 'ITEM_VARIATION'
        st.id = self.CLIENT_ID_TEA_SMALL
        st.present_at_all_locations = True
        st.item_variation_data = stiv

        ltiv = CatalogItemVariation()
        ltiv.item_id = c.id
        ltiv.name = 'Large'
        ltiv.pricing_type = 'FIXED_PRICING'
        ltiv.price_money = Money(200, 'USD')
        lt = CatalogObject()
        lt.type = 'ITEM_VARIATION'
        lt.id = self.CLIENT_ID_TEA_LARGE
        lt.present_at_all_locations = True
        lt.item_variation_data = ltiv

        cimli = CatalogItemModifierListInfo()
        cimli.modifier_list_id = self.CLIENT_ID_MILKS

        ci = CatalogItem()
        ci.name = 'Tea'
        ci.description = 'Hot leaf juice'
        ci.abbreviation = 'Te'
        ci.category_id = self.CLIENT_ID_BEVERAGES
        ci.modifier_list_info = [cimli]
        ci.tax_ids = [self.CLIENT_ID_SALES_TAX]
        ci.variations = [st, lt]

        c.item_data = ci
        return c
Exemple #2
0
    def build_tea(self):
        c = CatalogObject()
        c.type = 'ITEM'
        c.id = self.CLIENT_ID_TEA
        c.present_at_all_locations = True

        stiv = CatalogItemVariation()
        stiv.item_id = c.id
        stiv.name = 'Small'
        stiv.pricing_type = 'FIXED_PRICING'
        stiv.price_money = Money(150, 'USD')
        st = CatalogObject()
        st.type = 'ITEM_VARIATION'
        st.id = self.CLIENT_ID_TEA_SMALL
        st.present_at_all_locations = True
        st.item_variation_data = stiv

        ltiv = CatalogItemVariation()
        ltiv.item_id = c.id
        ltiv.name = 'Large'
        ltiv.pricing_type = 'FIXED_PRICING'
        ltiv.price_money = Money(200, 'USD')
        lt = CatalogObject()
        lt.type = 'ITEM_VARIATION'
        lt.id = self.CLIENT_ID_TEA_LARGE
        lt.present_at_all_locations = True
        lt.item_variation_data = ltiv

        cimli = CatalogItemModifierListInfo()
        cimli.modifier_list_id = self.CLIENT_ID_MILKS

        ci = CatalogItem()
        ci.name = 'Tea'
        ci.description = 'Hot leaf juice'
        ci.abbreviation = 'Te'
        ci.category_id = self.CLIENT_ID_BEVERAGES
        ci.modifier_list_info = [cimli]
        ci.tax_ids = [self.CLIENT_ID_SALES_TAX]
        ci.variations = [st, lt]

        c.item_data = ci
        return c
    def build_coffee(self):
        c = CatalogObject()
        c.type = 'ITEM'
        c.id = self.CLIENT_ID_COFFEE
        c.present_at_all_locations = True

        sciv = CatalogItemVariation()
        sciv.item_id = c.id
        sciv.name = 'Small'
        sciv.pricing_type = 'FIXED_PRICING'
        sciv.price_money = Money(195, 'USD')
        sc = CatalogObject()
        sc.type = 'ITEM_VARIATION'
        sc.id = self.CLIENT_ID_COFFEE_SMALL
        sc.present_at_all_locations = True
        sc.item_variation_data = sciv

        lciv = CatalogItemVariation()
        lciv.item_id = c.id
        lciv.name = 'Large'
        lciv.pricing_type = 'FIXED_PRICING'
        lciv.price_money = Money(250, 'USD')
        lc = CatalogObject()
        lc.type = 'ITEM_VARIATION'
        lc.id = self.CLIENT_ID_COFFEE_LARGE
        lc.present_at_all_locations = True
        lc.item_variation_data = lciv

        cimli = CatalogItemModifierListInfo()
        cimli.modifier_list_id = self.CLIENT_ID_MILKS

        ci = CatalogItem()
        ci.name = 'Coffee'
        ci.description = 'Hot bean juice'
        ci.abbreviation = 'Co'
        ci.category_id = self.CLIENT_ID_BEVERAGES
        ci.modifier_list_info = [cimli]
        ci.tax_ids = [self.CLIENT_ID_SALES_TAX]
        ci.variations = [sc, lc]

        c.item_data = ci
        return c
Exemple #4
0
    def build_coffee(self):
        c = CatalogObject()
        c.type = 'ITEM'
        c.id = self.CLIENT_ID_COFFEE
        c.present_at_all_locations = True

        sciv = CatalogItemVariation()
        sciv.item_id = c.id
        sciv.name = 'Small'
        sciv.pricing_type = 'FIXED_PRICING'
        sciv.price_money = Money(195, 'USD')
        sc = CatalogObject()
        sc.type = 'ITEM_VARIATION'
        sc.id = self.CLIENT_ID_COFFEE_SMALL
        sc.present_at_all_locations = True
        sc.item_variation_data = sciv

        lciv = CatalogItemVariation()
        lciv.item_id = c.id
        lciv.name = 'Large'
        lciv.pricing_type = 'FIXED_PRICING'
        lciv.price_money = Money(250, 'USD')
        lc = CatalogObject()
        lc.type = 'ITEM_VARIATION'
        lc.id = self.CLIENT_ID_COFFEE_LARGE
        lc.present_at_all_locations = True
        lc.item_variation_data = lciv

        cimli = CatalogItemModifierListInfo()
        cimli.modifier_list_id = self.CLIENT_ID_MILKS

        ci = CatalogItem()
        ci.name = 'Coffee'
        ci.description = 'Hot bean juice'
        ci.abbreviation = 'Co'
        ci.category_id = self.CLIENT_ID_BEVERAGES
        ci.modifier_list_info = [cimli]
        ci.tax_ids = [self.CLIENT_ID_SALES_TAX]
        ci.variations = [sc, lc]

        c.item_data = ci
        return c