def create_xml(self, **kwargs) -> XMLElement:
    shop_el = XMLElement('shop')
    for tag in ('name', 'company', 'url', 'platform', 'version', 'agency', 'email'):
        value = getattr(self, tag)
        if value:
            el = XMLSubElement(shop_el, tag)
            el.text = value
    currencies_el = XMLSubElement(shop_el, 'currencies')
    for c in self.currencies:
        c.to_xml(currencies_el)
    categories_el = XMLSubElement(shop_el, 'categories')
    for c in self.categories:
        c.to_xml(categories_el)
    if self.delivery_options:
        delivery_options_el = XMLSubElement(shop_el, 'delivery-options')
        for o in self.delivery_options:
            o.to_xml(delivery_options_el)
    if self.pickup_options:
        pickup_options_el = XMLSubElement(shop_el, 'pickup-options')
        for o in self.pickup_options:
            o.to_xml(pickup_options_el)
    if self._enable_auto_discounts:
        enable_auto_discounts_el = XMLSubElement(shop_el, 'enable_auto_discounts')
        enable_auto_discounts_el.text = self._enable_auto_discounts
    offers_el = XMLSubElement(shop_el, 'offers')
    for o in self.offers:
        o.to_xml(offers_el)
    if self.gifts:
        gifts_el = XMLSubElement(shop_el, 'gifts')
        for g in self.gifts:
            g.to_xml(gifts_el)
    if self.promos:
        promos_el = XMLSubElement(shop_el, 'promos')
        for p in self.promos:
            p.to_xml(promos_el)
    return shop_el
def create_xml(self, **kwargs) -> XMLElement:
    shop_el = XMLElement('shop')
    for tag in ('name', 'company', 'url', 'platform', 'version', 'agency', 'email'):
        value = getattr(self, tag)
        if value:
            el = XMLSubElement(shop_el, tag)
            el.text = value
    currencies_el = XMLSubElement(shop_el, 'currencies')
    for c in self.currencies:
        c.to_xml(currencies_el)
    categories_el = XMLSubElement(shop_el, 'categories')
    for c in self.categories:
        c.to_xml(categories_el)
    if self.delivery_options:
        delivery_options_el = XMLSubElement(shop_el, 'delivery-options')
        for o in self.delivery_options:
            o.to_xml(delivery_options_el)
    if self.pickup_options:
        pickup_options_el = XMLSubElement(shop_el, 'pickup-options')
        for o in self.pickup_options:
            o.to_xml(pickup_options_el)
    if self._enable_auto_discounts:
        enable_auto_discounts_el = XMLSubElement(shop_el, 'enable_auto_discounts')
        enable_auto_discounts_el.text = self._enable_auto_discounts
    offers_el = XMLSubElement(shop_el, 'offers')
    for o in self.offers:
        o.to_xml(offers_el)
    if self.gifts:
        gifts_el = XMLSubElement(shop_el, 'gifts')
        for g in self.gifts:
            g.to_xml(gifts_el)
    if self.promos:
        promos_el = XMLSubElement(shop_el, 'promos')
        for p in self.promos:
            p.to_xml(promos_el)
    return shop_el