def call(self, uri, params=None, access_token=None, api_version=None, timeout=None):
        """Calls wepay.com/v2/``uri`` with ``params`` and returns the JSON
        response as a python `dict`. The optional ``access_token`` parameter
        takes precedence over instance's ``access_token`` if it is
        set. Essentially this is the place for all api calls.

        :param str uri: API uri to call
        :keyword dict params: parameters to include in the call
        :keyword str access_token: access_token to use for the call.
        :keyword str api_version: allows to create a call to specific version of API
        :keyword float timeout: a way to specify a call timeout in seconds. If `None`
            will use `WePay.timeout`.
        :return: WePay response as documented per call
        :rtype: dict
        :raises: :exc:`WePayClientError<wepay.exceptions.WePayClientError>`
        :raises: :exc:`WePayServerError<wepay.exceptions.WePayServerError>`
        :raises: :exc:`WePayConnectionError<wepay.exceptions.WePayConnectionError>`

        """
        url = self.api_endpoint + uri
        params = params or {}

        headers = {
            'Content-Type': 'application/json', 
            'User-Agent': 'Python WePay SDK (third party)'
        }
        access_token = access_token or self.access_token
        headers['Authorization'] = 'Bearer %s' % access_token
        api_version = api_version or self.api_version
        if not api_version is None:
            headers['Api-Version'] = api_version

        timeout = timeout or self._timeout
        return self._post(url, params, headers, timeout)
def call ( self , uri , params = None , access_token = None , api_version = None , timeout = None ) : url = self . api_endpoint + uri params = params or { } headers = { 'Content-Type' : 'application/json' , 'User-Agent' : 'Python WePay SDK (third party)' } access_token = access_token or self . access_token headers [ 'Authorization' ] = 'Bearer %s' % access_token api_version = api_version or self . api_version if not api_version is None : headers [ 'Api-Version' ] = api_version timeout = timeout or self . _timeout return self . _post ( url , params , headers , timeout )
Calls wepay.com/v2/``uri`` with ``params`` and returns the JSON
        response as a python `dict`. The optional ``access_token`` parameter
        takes precedence over instance's ``access_token`` if it is
        set. Essentially this is the place for all api calls.

        :param str uri: API uri to call
        :keyword dict params: parameters to include in the call
        :keyword str access_token: access_token to use for the call.
        :keyword str api_version: allows to create a call to specific version of API
        :keyword float timeout: a way to specify a call timeout in seconds. If `None`
            will use `WePay.timeout`.
        :return: WePay response as documented per call
        :rtype: dict
        :raises: :exc:`WePayClientError<wepay.exceptions.WePayClientError>`
        :raises: :exc:`WePayServerError<wepay.exceptions.WePayServerError>`
        :raises: :exc:`WePayConnectionError<wepay.exceptions.WePayConnectionError>`