shop.modules.vat_rate

Module Contents

Classes

VatRate

Abstract Class for all viur-shop sub/nested modules.

Attributes

shop.modules.vat_rate.logger
class shop.modules.vat_rate.VatRate(moduleName=None, modulePath=None, shop=None, *args, **kwargs)

Bases: shop.modules.abstract.ShopModuleAbstract, viur.core.prototypes.List

Abstract Class for all viur-shop sub/nested modules.

The implementations should set moduleName as class variable, so the final module name for routing it not affected by the name of custom classes.

Parameters:
  • moduleName (str)

  • modulePath (str)

  • shop (viur.shop.Shop)

moduleName = 'vat_rate'
kindName = '{{viur_shop_modulename}}_vat_rate'
adminInfo()
Return type:

dict

vat_rates()

Cache the vat rates

Since this configuration will not change much, we cache the whole thing persistently within the instance. So after changing the VAT rates, the instance would have to be restarted – or someone would have to create a pull request with an alternative solution.

_vat_skel()
get_vat_rate_for_country(*, country=None, category)

Get the configured vat rate percentage for a country.

Parameters:
Return type:

float