How to use the recurly.recurly.RecurlyException function in recurly

To help you get started, we’ve selected a few recurly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github recurly / recurly-client-python / recurly / recurly.py View on Github external
'credit',
        'invoice',
        'line_item',
        'payment',
        'plan',
        'transaction',
    ]

# These resources should always be treated as an array
# even the root element is not of the 'array' type
FORCED_MULTIPLE = [
        'error',
    ]

class RecurlyException(Exception): pass
class RecurlyValidationException(RecurlyException): pass
class RecurlyConnectionException(RecurlyException): pass
class RecurlyNotFoundException(RecurlyException): pass
class RecurlyServerException(RecurlyException): pass
class RecurlyServiceUnavailableException(RecurlyException): pass

class Recurly(object):
    username = ''
    password = ''
    subdomain = 'app'
    uri = ''
    response = None
    errors = None
    
    def __init__(self, username='', password='', subdomain='app', uri=''):
        self.username = username
        self.password = password
github recurly / recurly-client-python / recurly / recurly.py View on Github external
'plan',
        'transaction',
    ]

# These resources should always be treated as an array
# even the root element is not of the 'array' type
FORCED_MULTIPLE = [
        'error',
    ]

class RecurlyException(Exception): pass
class RecurlyValidationException(RecurlyException): pass
class RecurlyConnectionException(RecurlyException): pass
class RecurlyNotFoundException(RecurlyException): pass
class RecurlyServerException(RecurlyException): pass
class RecurlyServiceUnavailableException(RecurlyException): pass

class Recurly(object):
    username = ''
    password = ''
    subdomain = 'app'
    uri = ''
    response = None
    errors = None
    
    def __init__(self, username='', password='', subdomain='app', uri=''):
        self.username = username
        self.password = password
        self.subdomain = subdomain
        self.uri = uri
github recurly / recurly-client-python / recurly / recurly.py View on Github external
'invoice',
        'line_item',
        'payment',
        'plan',
        'transaction',
    ]

# These resources should always be treated as an array
# even the root element is not of the 'array' type
FORCED_MULTIPLE = [
        'error',
    ]

class RecurlyException(Exception): pass
class RecurlyValidationException(RecurlyException): pass
class RecurlyConnectionException(RecurlyException): pass
class RecurlyNotFoundException(RecurlyException): pass
class RecurlyServerException(RecurlyException): pass
class RecurlyServiceUnavailableException(RecurlyException): pass

class Recurly(object):
    username = ''
    password = ''
    subdomain = 'app'
    uri = ''
    response = None
    errors = None
    
    def __init__(self, username='', password='', subdomain='app', uri=''):
        self.username = username
        self.password = password
        self.subdomain = subdomain
github recurly / recurly-client-python / recurly / recurly.py View on Github external
# All responses in this range are successes
            if e.code in range(200, 205):
                pass
            elif e.code == 422:
                msg = self.parse_errors(xml_response)
                raise RecurlyValidationException(msg)
            elif e.code == 404:
                msg = self.parse_errors(xml_response)
                raise RecurlyNotFoundException(msg)
            elif e.code == 500:
                raise RecurlyServerException(e)
            elif e.code == 503:
                raise RecurlyServiceUnavailableException(e)
            else:
                raise RecurlyException(e)
        except URLError, e:
            raise RecurlyConnectionException(e)
                
        xml_response = Recurly.remove_white_space(xml_response)
        
        if xml_response is '':
            self.response = None
        else:
            self.response = Recurly.xml_to_dict(xml_response)
        
        return self.response
github recurly / recurly-client-python / recurly / recurly.py View on Github external
'line_item',
        'payment',
        'plan',
        'transaction',
    ]

# These resources should always be treated as an array
# even the root element is not of the 'array' type
FORCED_MULTIPLE = [
        'error',
    ]

class RecurlyException(Exception): pass
class RecurlyValidationException(RecurlyException): pass
class RecurlyConnectionException(RecurlyException): pass
class RecurlyNotFoundException(RecurlyException): pass
class RecurlyServerException(RecurlyException): pass
class RecurlyServiceUnavailableException(RecurlyException): pass

class Recurly(object):
    username = ''
    password = ''
    subdomain = 'app'
    uri = ''
    response = None
    errors = None
    
    def __init__(self, username='', password='', subdomain='app', uri=''):
        self.username = username
        self.password = password
        self.subdomain = subdomain
        self.uri = uri
github recurly / recurly-client-python / recurly / recurly.py View on Github external
'payment',
        'plan',
        'transaction',
    ]

# These resources should always be treated as an array
# even the root element is not of the 'array' type
FORCED_MULTIPLE = [
        'error',
    ]

class RecurlyException(Exception): pass
class RecurlyValidationException(RecurlyException): pass
class RecurlyConnectionException(RecurlyException): pass
class RecurlyNotFoundException(RecurlyException): pass
class RecurlyServerException(RecurlyException): pass
class RecurlyServiceUnavailableException(RecurlyException): pass

class Recurly(object):
    username = ''
    password = ''
    subdomain = 'app'
    uri = ''
    response = None
    errors = None
    
    def __init__(self, username='', password='', subdomain='app', uri=''):
        self.username = username
        self.password = password
        self.subdomain = subdomain
        self.uri = uri