Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'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
'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
'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
# 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
'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
'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