mirror of
https://github.com/retailcrm/api-client-python.git
synced 2024-11-22 04:56:04 +03:00
30 lines
528 B
Python
30 lines
528 B
Python
# coding=utf-8
|
|
|
|
|
|
class Response(object):
|
|
"""
|
|
API response class
|
|
"""
|
|
|
|
def __init__(self, code, body):
|
|
self.response_body = body
|
|
self.status_code = code
|
|
|
|
def get_status_code(self):
|
|
"""
|
|
:return: integer
|
|
"""
|
|
return self.status_code
|
|
|
|
def get_response(self):
|
|
"""
|
|
:return: dict
|
|
"""
|
|
return self.response_body
|
|
|
|
def is_successfull(self):
|
|
"""
|
|
:return: boolean
|
|
"""
|
|
return int(self.status_code) < 400
|