from ocyan.core import plugins as core_plugin


class OscarCataloguePluginConfig(core_plugin.OcyanPluginConfig):
    def contribute_to_entity_types(self, entity_types):
        return entity_types


def get_catalogue_plugins():
    return core_plugin.get_plugins(cls=OscarCataloguePluginConfig)


def get_entity_types():
    payment_plugins = get_catalogue_plugins()
    return payment_plugins.pipe("contribute_to_entity_types", [])
