'Retrieve a list of all credit providers or filter on providers_list, represented
as dictionaries.
Arguments:
provider_list (list of strings or None): contains list of ids if required results
to be filtered, None for all providers.
Returns:
list of providers represented as dictionaries.'

@classmethod
def get_credit_providers(cls, providers_list=None):

    credit_providers = cache.get(cls.CREDIT_PROVIDERS_CACHE_KEY)
    if (credit_providers is None):
        credit_providers = CreditProvider.objects.filter(active=True)
        credit_providers = [{'id': provider.provider_id, 'display_name': provider.display_name, 'url': provider.provider_url, 'status_url': provider.provider_status_url, 'description': provider.provider_description, 'enable_integration': provider.enable_integration, 'fulfillment_instructions': provider.fulfillment_instructions, 'thumbnail_url': provider.thumbnail_url} for provider in credit_providers]
        cache.set(cls.CREDIT_PROVIDERS_CACHE_KEY, credit_providers)
    if providers_list:
        credit_providers = [provider for provider in credit_providers if (provider['id'] in providers_list)]
    return credit_providers
