# Path: ac_mediator/exceptions.py
# class ImproperlyConfiguredACService(ACException):
#     pass
# 
# class ACException(Exception):
#     msg = None
#     status = None
# 
#     def __init__(self, msg=None, status=None):
# 
#         # Set defaults (if not set in subclass)
#         if self.msg is None:
#             self.msg = ""
#         if self.status is None:
#             self.msg = -1
# 
#         # Override with arguments (if any)
#         if msg is not None:
#             self.msg = msg
#         if status is not None:
#             self.status = status
# 
#     def __repr__(self):
#         return self.msg


from ac_mediator.exceptions import ImproperlyConfiguredACService, ACException
from services.acservice.constants import *
import requests
import logging
        :return: dict with components as keys
        """
        description = dict()
        # Call all object methods that start with 'describe_' to get description of components
        for item in dir(self):
            if item.startswith('describe_') and callable(getattr(self, item)):
                name, component_description = getattr(self, item)()
                description[name] = component_description
        return description

    def send_request(self,
                     url,
                     method='get',
                     params=None,
                     data=None,
                     supported_auth_methods=None,
                     account=None,
                     use_authentication_method=None):
        """
        Make a request to the service. If not provided, this method automatically chooses
        a suitable authentication method for making the request.
        :param method: request method (either 'get' or 'post')
        :param url: endpoint api url
        :param params: request parameters in a dictionary
        :param data: dictionary of data to be included as json body
        :param supported_auth_methods: auth methods supported by the api endpoint (defaults to those defined for the service)
        :param account: user account (for enduser authentication only)
        :return: dictionary of json response (can raise exception if status_code!=200)
        """
        if method not in ['get', 'post']:

# Path: ac_mediator/exceptions.py
# class ImproperlyConfiguredACService(ACException):
#     pass
# 
# class ACException(Exception):
#     msg = None
#     status = None
# 
#     def __init__(self, msg=None, status=None):
# 
#         # Set defaults (if not set in subclass)
#         if self.msg is None:
#             self.msg = ""
#         if self.status is None:
#             self.msg = -1
# 
#         # Override with arguments (if any)
#         if msg is not None:
#             self.msg = msg
#         if status is not None:
#             self.status = status
# 
#     def __repr__(self):
#         return self.msg


# Path: services/acservice/base.py
from ac_mediator.exceptions import ImproperlyConfiguredACService, ACException
from services.acservice.constants import *
import requests
import logging

        :return: dict with components as keys
        """
        description = dict()
        # Call all object methods that start with 'describe_' to get description of components
        for item in dir(self):
            if item.startswith('describe_') and callable(getattr(self, item)):
                name, component_description = getattr(self, item)()
                description[name] = component_description
        return description

    def send_request(self,
                     url,
                     method='get',
                     params=None,
                     data=None,
                     supported_auth_methods=None,
                     account=None,
                     use_authentication_method=None):
        """
        Make a request to the service. If not provided, this method automatically chooses
        a suitable authentication method for making the request.
        :param method: request method (either 'get' or 'post')
        :param url: endpoint api url
        :param params: request parameters in a dictionary
        :param data: dictionary of data to be included as json body
        :param supported_auth_methods: auth methods supported by the api endpoint (defaults to those defined for the service)
        :param account: user account (for enduser authentication only)
        :return: dictionary of json response (can raise exception if status_code!=200)
        """
        if method not in ['get', 'post']:

            raise ACException('Request method {0} not in allowed methods'.format(method))