index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
1.07M
signature
stringlengths
2
42.8k
58,150
sib_api_v3_sdk.models.body6
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body6): return False return self.__dict__ == other.__dict__
(self, other)
58,151
sib_api_v3_sdk.models.body6
__init__
Body6 - a model defined in Swagger
def __init__(self, name=None, duration=None, task_type_id=None, _date=None, notes=None, done=None, assign_to_id=None, contacts_ids=None, deals_ids=None, companies_ids=None, reminder=None): # noqa: E501 """Body6 - a model defined in Swagger""" # noqa: E501 self._name = None self._duration = None self._task_type_id = None self.__date = None self._notes = None self._done = None self._assign_to_id = None self._contacts_ids = None self._deals_ids = None self._companies_ids = None self._reminder = None self.discriminator = None self.name = name if duration is not None: self.duration = duration self.task_type_id = task_type_id self._date = _date if notes is not None: self.notes = notes if done is not None: self.done = done if assign_to_id is not None: self.assign_to_id = assign_to_id if contacts_ids is not None: self.contacts_ids = contacts_ids if deals_ids is not None: self.deals_ids = deals_ids if companies_ids is not None: self.companies_ids = companies_ids if reminder is not None: self.reminder = reminder
(self, name=None, duration=None, task_type_id=None, _date=None, notes=None, done=None, assign_to_id=None, contacts_ids=None, deals_ids=None, companies_ids=None, reminder=None)
58,154
sib_api_v3_sdk.models.body6
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body6, dict): for key, value in self.items(): result[key] = value return result
(self)
58,156
sib_api_v3_sdk.models.body7
Body7
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body7(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'name': 'str', 'duration': 'int', 'task_type_id': 'str', '_date': 'datetime', 'notes': 'str', 'done': 'bool', 'assign_to_id': 'str', 'contacts_ids': 'list[int]', 'deals_ids': 'list[str]', 'companies_ids': 'list[str]' } attribute_map = { 'name': 'name', 'duration': 'duration', 'task_type_id': 'taskTypeId', '_date': 'date', 'notes': 'notes', 'done': 'done', 'assign_to_id': 'assignToId', 'contacts_ids': 'contactsIds', 'deals_ids': 'dealsIds', 'companies_ids': 'companiesIds' } def __init__(self, name=None, duration=None, task_type_id=None, _date=None, notes=None, done=None, assign_to_id=None, contacts_ids=None, deals_ids=None, companies_ids=None): # noqa: E501 """Body7 - a model defined in Swagger""" # noqa: E501 self._name = None self._duration = None self._task_type_id = None self.__date = None self._notes = None self._done = None self._assign_to_id = None self._contacts_ids = None self._deals_ids = None self._companies_ids = None self.discriminator = None if name is not None: self.name = name if duration is not None: self.duration = duration if task_type_id is not None: self.task_type_id = task_type_id if _date is not None: self._date = _date if notes is not None: self.notes = notes if done is not None: self.done = done if assign_to_id is not None: self.assign_to_id = assign_to_id if contacts_ids is not None: self.contacts_ids = contacts_ids if deals_ids is not None: self.deals_ids = deals_ids if companies_ids is not None: self.companies_ids = companies_ids @property def name(self): """Gets the name of this Body7. # noqa: E501 Name of task # noqa: E501 :return: The name of this Body7. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Body7. Name of task # noqa: E501 :param name: The name of this Body7. # noqa: E501 :type: str """ self._name = name @property def duration(self): """Gets the duration of this Body7. # noqa: E501 Duration of task in milliseconds [1 minute = 60000 ms] # noqa: E501 :return: The duration of this Body7. # noqa: E501 :rtype: int """ return self._duration @duration.setter def duration(self, duration): """Sets the duration of this Body7. Duration of task in milliseconds [1 minute = 60000 ms] # noqa: E501 :param duration: The duration of this Body7. # noqa: E501 :type: int """ self._duration = duration @property def task_type_id(self): """Gets the task_type_id of this Body7. # noqa: E501 Id for type of task e.g Call / Email / Meeting etc. # noqa: E501 :return: The task_type_id of this Body7. # noqa: E501 :rtype: str """ return self._task_type_id @task_type_id.setter def task_type_id(self, task_type_id): """Sets the task_type_id of this Body7. Id for type of task e.g Call / Email / Meeting etc. # noqa: E501 :param task_type_id: The task_type_id of this Body7. # noqa: E501 :type: str """ self._task_type_id = task_type_id @property def _date(self): """Gets the _date of this Body7. # noqa: E501 Task date/time # noqa: E501 :return: The _date of this Body7. # noqa: E501 :rtype: datetime """ return self.__date @_date.setter def _date(self, _date): """Sets the _date of this Body7. Task date/time # noqa: E501 :param _date: The _date of this Body7. # noqa: E501 :type: datetime """ self.__date = _date @property def notes(self): """Gets the notes of this Body7. # noqa: E501 Notes added to a task # noqa: E501 :return: The notes of this Body7. # noqa: E501 :rtype: str """ return self._notes @notes.setter def notes(self, notes): """Sets the notes of this Body7. Notes added to a task # noqa: E501 :param notes: The notes of this Body7. # noqa: E501 :type: str """ self._notes = notes @property def done(self): """Gets the done of this Body7. # noqa: E501 Task marked as done # noqa: E501 :return: The done of this Body7. # noqa: E501 :rtype: bool """ return self._done @done.setter def done(self, done): """Sets the done of this Body7. Task marked as done # noqa: E501 :param done: The done of this Body7. # noqa: E501 :type: bool """ self._done = done @property def assign_to_id(self): """Gets the assign_to_id of this Body7. # noqa: E501 User id to whom task is assigned # noqa: E501 :return: The assign_to_id of this Body7. # noqa: E501 :rtype: str """ return self._assign_to_id @assign_to_id.setter def assign_to_id(self, assign_to_id): """Sets the assign_to_id of this Body7. User id to whom task is assigned # noqa: E501 :param assign_to_id: The assign_to_id of this Body7. # noqa: E501 :type: str """ self._assign_to_id = assign_to_id @property def contacts_ids(self): """Gets the contacts_ids of this Body7. # noqa: E501 Contact ids for contacts linked to this task # noqa: E501 :return: The contacts_ids of this Body7. # noqa: E501 :rtype: list[int] """ return self._contacts_ids @contacts_ids.setter def contacts_ids(self, contacts_ids): """Sets the contacts_ids of this Body7. Contact ids for contacts linked to this task # noqa: E501 :param contacts_ids: The contacts_ids of this Body7. # noqa: E501 :type: list[int] """ self._contacts_ids = contacts_ids @property def deals_ids(self): """Gets the deals_ids of this Body7. # noqa: E501 Deal ids for deals a task is linked to # noqa: E501 :return: The deals_ids of this Body7. # noqa: E501 :rtype: list[str] """ return self._deals_ids @deals_ids.setter def deals_ids(self, deals_ids): """Sets the deals_ids of this Body7. Deal ids for deals a task is linked to # noqa: E501 :param deals_ids: The deals_ids of this Body7. # noqa: E501 :type: list[str] """ self._deals_ids = deals_ids @property def companies_ids(self): """Gets the companies_ids of this Body7. # noqa: E501 Companies ids for companies a task is linked to # noqa: E501 :return: The companies_ids of this Body7. # noqa: E501 :rtype: list[str] """ return self._companies_ids @companies_ids.setter def companies_ids(self, companies_ids): """Sets the companies_ids of this Body7. Companies ids for companies a task is linked to # noqa: E501 :param companies_ids: The companies_ids of this Body7. # noqa: E501 :type: list[str] """ self._companies_ids = companies_ids def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body7, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body7): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(name=None, duration=None, task_type_id=None, _date=None, notes=None, done=None, assign_to_id=None, contacts_ids=None, deals_ids=None, companies_ids=None)
58,157
sib_api_v3_sdk.models.body7
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body7): return False return self.__dict__ == other.__dict__
(self, other)
58,158
sib_api_v3_sdk.models.body7
__init__
Body7 - a model defined in Swagger
def __init__(self, name=None, duration=None, task_type_id=None, _date=None, notes=None, done=None, assign_to_id=None, contacts_ids=None, deals_ids=None, companies_ids=None): # noqa: E501 """Body7 - a model defined in Swagger""" # noqa: E501 self._name = None self._duration = None self._task_type_id = None self.__date = None self._notes = None self._done = None self._assign_to_id = None self._contacts_ids = None self._deals_ids = None self._companies_ids = None self.discriminator = None if name is not None: self.name = name if duration is not None: self.duration = duration if task_type_id is not None: self.task_type_id = task_type_id if _date is not None: self._date = _date if notes is not None: self.notes = notes if done is not None: self.done = done if assign_to_id is not None: self.assign_to_id = assign_to_id if contacts_ids is not None: self.contacts_ids = contacts_ids if deals_ids is not None: self.deals_ids = deals_ids if companies_ids is not None: self.companies_ids = companies_ids
(self, name=None, duration=None, task_type_id=None, _date=None, notes=None, done=None, assign_to_id=None, contacts_ids=None, deals_ids=None, companies_ids=None)
58,161
sib_api_v3_sdk.models.body7
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body7, dict): for key, value in self.items(): result[key] = value return result
(self)
58,163
sib_api_v3_sdk.models.body8
Body8
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body8(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'visitor_id': 'str', 'text': 'str', 'agent_id': 'str', 'received_from': 'str', 'agent_email': 'str', 'agent_name': 'str' } attribute_map = { 'visitor_id': 'visitorId', 'text': 'text', 'agent_id': 'agentId', 'received_from': 'receivedFrom', 'agent_email': 'agentEmail', 'agent_name': 'agentName' } def __init__(self, visitor_id=None, text=None, agent_id=None, received_from=None, agent_email=None, agent_name=None): # noqa: E501 """Body8 - a model defined in Swagger""" # noqa: E501 self._visitor_id = None self._text = None self._agent_id = None self._received_from = None self._agent_email = None self._agent_name = None self.discriminator = None self.visitor_id = visitor_id self.text = text if agent_id is not None: self.agent_id = agent_id if received_from is not None: self.received_from = received_from if agent_email is not None: self.agent_email = agent_email if agent_name is not None: self.agent_name = agent_name @property def visitor_id(self): """Gets the visitor_id of this Body8. # noqa: E501 visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> # noqa: E501 :return: The visitor_id of this Body8. # noqa: E501 :rtype: str """ return self._visitor_id @visitor_id.setter def visitor_id(self, visitor_id): """Sets the visitor_id of this Body8. visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> # noqa: E501 :param visitor_id: The visitor_id of this Body8. # noqa: E501 :type: str """ if visitor_id is None: raise ValueError("Invalid value for `visitor_id`, must not be `None`") # noqa: E501 self._visitor_id = visitor_id @property def text(self): """Gets the text of this Body8. # noqa: E501 message text # noqa: E501 :return: The text of this Body8. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): """Sets the text of this Body8. message text # noqa: E501 :param text: The text of this Body8. # noqa: E501 :type: str """ if text is None: raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 self._text = text @property def agent_id(self): """Gets the agent_id of this Body8. # noqa: E501 agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). # noqa: E501 :return: The agent_id of this Body8. # noqa: E501 :rtype: str """ return self._agent_id @agent_id.setter def agent_id(self, agent_id): """Sets the agent_id of this Body8. agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). # noqa: E501 :param agent_id: The agent_id of this Body8. # noqa: E501 :type: str """ self._agent_id = agent_id @property def received_from(self): """Gets the received_from of this Body8. # noqa: E501 mark your messages to distinguish messages created by you from the others. # noqa: E501 :return: The received_from of this Body8. # noqa: E501 :rtype: str """ return self._received_from @received_from.setter def received_from(self, received_from): """Sets the received_from of this Body8. mark your messages to distinguish messages created by you from the others. # noqa: E501 :param received_from: The received_from of this Body8. # noqa: E501 :type: str """ self._received_from = received_from @property def agent_email(self): """Gets the agent_email of this Body8. # noqa: E501 agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. # noqa: E501 :return: The agent_email of this Body8. # noqa: E501 :rtype: str """ return self._agent_email @agent_email.setter def agent_email(self, agent_email): """Sets the agent_email of this Body8. agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. # noqa: E501 :param agent_email: The agent_email of this Body8. # noqa: E501 :type: str """ self._agent_email = agent_email @property def agent_name(self): """Gets the agent_name of this Body8. # noqa: E501 agent name # noqa: E501 :return: The agent_name of this Body8. # noqa: E501 :rtype: str """ return self._agent_name @agent_name.setter def agent_name(self, agent_name): """Sets the agent_name of this Body8. agent name # noqa: E501 :param agent_name: The agent_name of this Body8. # noqa: E501 :type: str """ self._agent_name = agent_name def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body8, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body8): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(visitor_id=None, text=None, agent_id=None, received_from=None, agent_email=None, agent_name=None)
58,164
sib_api_v3_sdk.models.body8
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body8): return False return self.__dict__ == other.__dict__
(self, other)
58,165
sib_api_v3_sdk.models.body8
__init__
Body8 - a model defined in Swagger
def __init__(self, visitor_id=None, text=None, agent_id=None, received_from=None, agent_email=None, agent_name=None): # noqa: E501 """Body8 - a model defined in Swagger""" # noqa: E501 self._visitor_id = None self._text = None self._agent_id = None self._received_from = None self._agent_email = None self._agent_name = None self.discriminator = None self.visitor_id = visitor_id self.text = text if agent_id is not None: self.agent_id = agent_id if received_from is not None: self.received_from = received_from if agent_email is not None: self.agent_email = agent_email if agent_name is not None: self.agent_name = agent_name
(self, visitor_id=None, text=None, agent_id=None, received_from=None, agent_email=None, agent_name=None)
58,168
sib_api_v3_sdk.models.body8
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body8, dict): for key, value in self.items(): result[key] = value return result
(self)
58,170
sib_api_v3_sdk.models.body9
Body9
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body9(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'text': 'str' } attribute_map = { 'text': 'text' } def __init__(self, text=None): # noqa: E501 """Body9 - a model defined in Swagger""" # noqa: E501 self._text = None self.discriminator = None self.text = text @property def text(self): """Gets the text of this Body9. # noqa: E501 edited message text # noqa: E501 :return: The text of this Body9. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): """Sets the text of this Body9. edited message text # noqa: E501 :param text: The text of this Body9. # noqa: E501 :type: str """ if text is None: raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 self._text = text def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body9, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body9): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(text=None)
58,171
sib_api_v3_sdk.models.body9
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body9): return False return self.__dict__ == other.__dict__
(self, other)
58,172
sib_api_v3_sdk.models.body9
__init__
Body9 - a model defined in Swagger
def __init__(self, text=None): # noqa: E501 """Body9 - a model defined in Swagger""" # noqa: E501 self._text = None self.discriminator = None self.text = text
(self, text=None)
58,175
sib_api_v3_sdk.models.body9
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body9, dict): for key, value in self.items(): result[key] = value return result
(self)
58,177
sib_api_v3_sdk.models.body_variables_items
BodyVariablesItems
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class BodyVariablesItems(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { } attribute_map = { } def __init__(self): # noqa: E501 """BodyVariablesItems - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(BodyVariablesItems, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BodyVariablesItems): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
()
58,178
sib_api_v3_sdk.models.body_variables_items
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BodyVariablesItems): return False return self.__dict__ == other.__dict__
(self, other)
58,179
sib_api_v3_sdk.models.body_variables_items
__init__
BodyVariablesItems - a model defined in Swagger
def __init__(self): # noqa: E501 """BodyVariablesItems - a model defined in Swagger""" # noqa: E501 self.discriminator = None
(self)
58,182
sib_api_v3_sdk.models.body_variables_items
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(BodyVariablesItems, dict): for key, value in self.items(): result[key] = value return result
(self)
58,184
sib_api_v3_sdk.api.companies_api
CompaniesApi
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
class CompaniesApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def companies_attributes_get(self, **kwargs): # noqa: E501 """Get company attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_attributes_get(async_req=True) >>> result = thread.get() :param async_req bool :return: CompanyAttributes If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_attributes_get_with_http_info(**kwargs) # noqa: E501 else: (data) = self.companies_attributes_get_with_http_info(**kwargs) # noqa: E501 return data def companies_attributes_get_with_http_info(self, **kwargs): # noqa: E501 """Get company attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_attributes_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: CompanyAttributes If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_attributes_get" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/attributes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CompanyAttributes', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def companies_get(self, **kwargs): # noqa: E501 """Get all companies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_get(async_req=True) >>> result = thread.get() :param async_req bool :param str filters: Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} :param int linked_contacts_ids: Filter by linked contacts ids :param str linked_deals_ids: Filter by linked deals ids :param int page: Index of the first document of the page :param int limit: Number of documents per page :param str sort: Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed :param str sort_by: The field used to sort field names. :return: CompaniesList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_get_with_http_info(**kwargs) # noqa: E501 else: (data) = self.companies_get_with_http_info(**kwargs) # noqa: E501 return data def companies_get_with_http_info(self, **kwargs): # noqa: E501 """Get all companies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str filters: Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} :param int linked_contacts_ids: Filter by linked contacts ids :param str linked_deals_ids: Filter by linked deals ids :param int page: Index of the first document of the page :param int limit: Number of documents per page :param str sort: Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed :param str sort_by: The field used to sort field names. :return: CompaniesList If the method is called asynchronously, returns the request thread. """ all_params = ['filters', 'linked_contacts_ids', 'linked_deals_ids', 'page', 'limit', 'sort', 'sort_by'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_get" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'filters' in params: query_params.append(('filters', params['filters'])) # noqa: E501 if 'linked_contacts_ids' in params: query_params.append(('linkedContactsIds', params['linked_contacts_ids'])) # noqa: E501 if 'linked_deals_ids' in params: query_params.append(('linkedDealsIds', params['linked_deals_ids'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 if 'sort_by' in params: query_params.append(('sortBy', params['sort_by'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CompaniesList', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def companies_id_delete(self, id, **kwargs): # noqa: E501 """Delete a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_delete(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_id_delete_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.companies_id_delete_with_http_info(id, **kwargs) # noqa: E501 return data def companies_id_delete_with_http_info(self, id, **kwargs): # noqa: E501 """Delete a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_delete_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_id_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `companies_id_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def companies_id_get(self, id, **kwargs): # noqa: E501 """Get a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_get(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: Company If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_id_get_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.companies_id_get_with_http_info(id, **kwargs) # noqa: E501 return data def companies_id_get_with_http_info(self, id, **kwargs): # noqa: E501 """Get a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_get_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: Company If the method is called asynchronously, returns the request thread. """ all_params = ['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_id_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `companies_id_get`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Company', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def companies_id_patch(self, id, body, **kwargs): # noqa: E501 """Update a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_patch(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body1 body: Updated company details. (required) :return: Company If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_id_patch_with_http_info(id, body, **kwargs) # noqa: E501 else: (data) = self.companies_id_patch_with_http_info(id, body, **kwargs) # noqa: E501 return data def companies_id_patch_with_http_info(self, id, body, **kwargs): # noqa: E501 """Update a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_patch_with_http_info(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body1 body: Updated company details. (required) :return: Company If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_id_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `companies_id_patch`") # noqa: E501 # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `companies_id_patch`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Company', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def companies_link_unlink_id_patch(self, id, body, **kwargs): # noqa: E501 """Link and Unlink company with contacts and deals # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_link_unlink_id_patch(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body2 body: Linked / Unlinked contacts and deals ids. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_link_unlink_id_patch_with_http_info(id, body, **kwargs) # noqa: E501 else: (data) = self.companies_link_unlink_id_patch_with_http_info(id, body, **kwargs) # noqa: E501 return data def companies_link_unlink_id_patch_with_http_info(self, id, body, **kwargs): # noqa: E501 """Link and Unlink company with contacts and deals # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_link_unlink_id_patch_with_http_info(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body2 body: Linked / Unlinked contacts and deals ids. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_link_unlink_id_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `companies_link_unlink_id_patch`") # noqa: E501 # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `companies_link_unlink_id_patch`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/link-unlink/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def companies_post(self, body, **kwargs): # noqa: E501 """Create a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_post(body, async_req=True) >>> result = thread.get() :param async_req bool :param Body body: Company create data. (required) :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_post_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.companies_post_with_http_info(body, **kwargs) # noqa: E501 return data def companies_post_with_http_info(self, body, **kwargs): # noqa: E501 """Create a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param Body body: Company create data. (required) :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `companies_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='InlineResponse200', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(api_client=None)
58,186
sib_api_v3_sdk.api.companies_api
companies_attributes_get
Get company attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_attributes_get(async_req=True) >>> result = thread.get() :param async_req bool :return: CompanyAttributes If the method is called asynchronously, returns the request thread.
def companies_attributes_get(self, **kwargs): # noqa: E501 """Get company attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_attributes_get(async_req=True) >>> result = thread.get() :param async_req bool :return: CompanyAttributes If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_attributes_get_with_http_info(**kwargs) # noqa: E501 else: (data) = self.companies_attributes_get_with_http_info(**kwargs) # noqa: E501 return data
(self, **kwargs)
58,187
sib_api_v3_sdk.api.companies_api
companies_attributes_get_with_http_info
Get company attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_attributes_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: CompanyAttributes If the method is called asynchronously, returns the request thread.
def companies_attributes_get_with_http_info(self, **kwargs): # noqa: E501 """Get company attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_attributes_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: CompanyAttributes If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_attributes_get" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/attributes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CompanyAttributes', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, **kwargs)
58,188
sib_api_v3_sdk.api.companies_api
companies_get
Get all companies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_get(async_req=True) >>> result = thread.get() :param async_req bool :param str filters: Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"5b1a17d914b73d35a76ca0c7"} :param int linked_contacts_ids: Filter by linked contacts ids :param str linked_deals_ids: Filter by linked deals ids :param int page: Index of the first document of the page :param int limit: Number of documents per page :param str sort: Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed :param str sort_by: The field used to sort field names. :return: CompaniesList If the method is called asynchronously, returns the request thread.
def companies_get(self, **kwargs): # noqa: E501 """Get all companies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_get(async_req=True) >>> result = thread.get() :param async_req bool :param str filters: Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} :param int linked_contacts_ids: Filter by linked contacts ids :param str linked_deals_ids: Filter by linked deals ids :param int page: Index of the first document of the page :param int limit: Number of documents per page :param str sort: Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed :param str sort_by: The field used to sort field names. :return: CompaniesList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_get_with_http_info(**kwargs) # noqa: E501 else: (data) = self.companies_get_with_http_info(**kwargs) # noqa: E501 return data
(self, **kwargs)
58,189
sib_api_v3_sdk.api.companies_api
companies_get_with_http_info
Get all companies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str filters: Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"5b1a17d914b73d35a76ca0c7"} :param int linked_contacts_ids: Filter by linked contacts ids :param str linked_deals_ids: Filter by linked deals ids :param int page: Index of the first document of the page :param int limit: Number of documents per page :param str sort: Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed :param str sort_by: The field used to sort field names. :return: CompaniesList If the method is called asynchronously, returns the request thread.
def companies_get_with_http_info(self, **kwargs): # noqa: E501 """Get all companies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str filters: Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} :param int linked_contacts_ids: Filter by linked contacts ids :param str linked_deals_ids: Filter by linked deals ids :param int page: Index of the first document of the page :param int limit: Number of documents per page :param str sort: Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed :param str sort_by: The field used to sort field names. :return: CompaniesList If the method is called asynchronously, returns the request thread. """ all_params = ['filters', 'linked_contacts_ids', 'linked_deals_ids', 'page', 'limit', 'sort', 'sort_by'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_get" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'filters' in params: query_params.append(('filters', params['filters'])) # noqa: E501 if 'linked_contacts_ids' in params: query_params.append(('linkedContactsIds', params['linked_contacts_ids'])) # noqa: E501 if 'linked_deals_ids' in params: query_params.append(('linkedDealsIds', params['linked_deals_ids'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 if 'sort_by' in params: query_params.append(('sortBy', params['sort_by'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CompaniesList', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, **kwargs)
58,190
sib_api_v3_sdk.api.companies_api
companies_id_delete
Delete a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_delete(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: None If the method is called asynchronously, returns the request thread.
def companies_id_delete(self, id, **kwargs): # noqa: E501 """Delete a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_delete(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_id_delete_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.companies_id_delete_with_http_info(id, **kwargs) # noqa: E501 return data
(self, id, **kwargs)
58,191
sib_api_v3_sdk.api.companies_api
companies_id_delete_with_http_info
Delete a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_delete_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: None If the method is called asynchronously, returns the request thread.
def companies_id_delete_with_http_info(self, id, **kwargs): # noqa: E501 """Delete a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_delete_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_id_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `companies_id_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, id, **kwargs)
58,192
sib_api_v3_sdk.api.companies_api
companies_id_get
Get a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_get(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: Company If the method is called asynchronously, returns the request thread.
def companies_id_get(self, id, **kwargs): # noqa: E501 """Get a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_get(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: Company If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_id_get_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.companies_id_get_with_http_info(id, **kwargs) # noqa: E501 return data
(self, id, **kwargs)
58,193
sib_api_v3_sdk.api.companies_api
companies_id_get_with_http_info
Get a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_get_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: Company If the method is called asynchronously, returns the request thread.
def companies_id_get_with_http_info(self, id, **kwargs): # noqa: E501 """Get a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_get_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :return: Company If the method is called asynchronously, returns the request thread. """ all_params = ['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_id_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `companies_id_get`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Company', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, id, **kwargs)
58,194
sib_api_v3_sdk.api.companies_api
companies_id_patch
Update a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_patch(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body1 body: Updated company details. (required) :return: Company If the method is called asynchronously, returns the request thread.
def companies_id_patch(self, id, body, **kwargs): # noqa: E501 """Update a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_patch(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body1 body: Updated company details. (required) :return: Company If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_id_patch_with_http_info(id, body, **kwargs) # noqa: E501 else: (data) = self.companies_id_patch_with_http_info(id, body, **kwargs) # noqa: E501 return data
(self, id, body, **kwargs)
58,195
sib_api_v3_sdk.api.companies_api
companies_id_patch_with_http_info
Update a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_patch_with_http_info(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body1 body: Updated company details. (required) :return: Company If the method is called asynchronously, returns the request thread.
def companies_id_patch_with_http_info(self, id, body, **kwargs): # noqa: E501 """Update a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_id_patch_with_http_info(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body1 body: Updated company details. (required) :return: Company If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_id_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `companies_id_patch`") # noqa: E501 # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `companies_id_patch`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Company', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, id, body, **kwargs)
58,196
sib_api_v3_sdk.api.companies_api
companies_link_unlink_id_patch
Link and Unlink company with contacts and deals # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_link_unlink_id_patch(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body2 body: Linked / Unlinked contacts and deals ids. (required) :return: None If the method is called asynchronously, returns the request thread.
def companies_link_unlink_id_patch(self, id, body, **kwargs): # noqa: E501 """Link and Unlink company with contacts and deals # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_link_unlink_id_patch(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body2 body: Linked / Unlinked contacts and deals ids. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_link_unlink_id_patch_with_http_info(id, body, **kwargs) # noqa: E501 else: (data) = self.companies_link_unlink_id_patch_with_http_info(id, body, **kwargs) # noqa: E501 return data
(self, id, body, **kwargs)
58,197
sib_api_v3_sdk.api.companies_api
companies_link_unlink_id_patch_with_http_info
Link and Unlink company with contacts and deals # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_link_unlink_id_patch_with_http_info(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body2 body: Linked / Unlinked contacts and deals ids. (required) :return: None If the method is called asynchronously, returns the request thread.
def companies_link_unlink_id_patch_with_http_info(self, id, body, **kwargs): # noqa: E501 """Link and Unlink company with contacts and deals # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_link_unlink_id_patch_with_http_info(id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str id: (required) :param Body2 body: Linked / Unlinked contacts and deals ids. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_link_unlink_id_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `companies_link_unlink_id_patch`") # noqa: E501 # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `companies_link_unlink_id_patch`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies/link-unlink/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, id, body, **kwargs)
58,198
sib_api_v3_sdk.api.companies_api
companies_post
Create a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_post(body, async_req=True) >>> result = thread.get() :param async_req bool :param Body body: Company create data. (required) :return: InlineResponse200 If the method is called asynchronously, returns the request thread.
def companies_post(self, body, **kwargs): # noqa: E501 """Create a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_post(body, async_req=True) >>> result = thread.get() :param async_req bool :param Body body: Company create data. (required) :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.companies_post_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.companies_post_with_http_info(body, **kwargs) # noqa: E501 return data
(self, body, **kwargs)
58,199
sib_api_v3_sdk.api.companies_api
companies_post_with_http_info
Create a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param Body body: Company create data. (required) :return: InlineResponse200 If the method is called asynchronously, returns the request thread.
def companies_post_with_http_info(self, body, **kwargs): # noqa: E501 """Create a company # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.companies_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param Body body: Company create data. (required) :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method companies_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `companies_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/companies', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='InlineResponse200', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, body, **kwargs)
58,200
sib_api_v3_sdk.models.companies_list
CompaniesList
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class CompaniesList(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'items': 'list[Company]' } attribute_map = { 'items': 'items' } def __init__(self, items=None): # noqa: E501 """CompaniesList - a model defined in Swagger""" # noqa: E501 self._items = None self.discriminator = None if items is not None: self.items = items @property def items(self): """Gets the items of this CompaniesList. # noqa: E501 List of compaies # noqa: E501 :return: The items of this CompaniesList. # noqa: E501 :rtype: list[Company] """ return self._items @items.setter def items(self, items): """Sets the items of this CompaniesList. List of compaies # noqa: E501 :param items: The items of this CompaniesList. # noqa: E501 :type: list[Company] """ self._items = items def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(CompaniesList, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CompaniesList): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(items=None)
58,201
sib_api_v3_sdk.models.companies_list
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CompaniesList): return False return self.__dict__ == other.__dict__
(self, other)
58,202
sib_api_v3_sdk.models.companies_list
__init__
CompaniesList - a model defined in Swagger
def __init__(self, items=None): # noqa: E501 """CompaniesList - a model defined in Swagger""" # noqa: E501 self._items = None self.discriminator = None if items is not None: self.items = items
(self, items=None)
58,205
sib_api_v3_sdk.models.companies_list
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(CompaniesList, dict): for key, value in self.items(): result[key] = value return result
(self)
58,207
sib_api_v3_sdk.models.company
Company
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Company(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'id': 'str', 'attributes': 'object', 'linked_contacts_ids': 'list[int]', 'linked_deals_ids': 'list[str]' } attribute_map = { 'id': 'id', 'attributes': 'attributes', 'linked_contacts_ids': 'linkedContactsIds', 'linked_deals_ids': 'linkedDealsIds' } def __init__(self, id=None, attributes=None, linked_contacts_ids=None, linked_deals_ids=None): # noqa: E501 """Company - a model defined in Swagger""" # noqa: E501 self._id = None self._attributes = None self._linked_contacts_ids = None self._linked_deals_ids = None self.discriminator = None if id is not None: self.id = id if attributes is not None: self.attributes = attributes if linked_contacts_ids is not None: self.linked_contacts_ids = linked_contacts_ids if linked_deals_ids is not None: self.linked_deals_ids = linked_deals_ids @property def id(self): """Gets the id of this Company. # noqa: E501 Unique company id # noqa: E501 :return: The id of this Company. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Company. Unique company id # noqa: E501 :param id: The id of this Company. # noqa: E501 :type: str """ self._id = id @property def attributes(self): """Gets the attributes of this Company. # noqa: E501 Company attributes with values # noqa: E501 :return: The attributes of this Company. # noqa: E501 :rtype: object """ return self._attributes @attributes.setter def attributes(self, attributes): """Sets the attributes of this Company. Company attributes with values # noqa: E501 :param attributes: The attributes of this Company. # noqa: E501 :type: object """ self._attributes = attributes @property def linked_contacts_ids(self): """Gets the linked_contacts_ids of this Company. # noqa: E501 Contact ids for contacts linked to this company # noqa: E501 :return: The linked_contacts_ids of this Company. # noqa: E501 :rtype: list[int] """ return self._linked_contacts_ids @linked_contacts_ids.setter def linked_contacts_ids(self, linked_contacts_ids): """Sets the linked_contacts_ids of this Company. Contact ids for contacts linked to this company # noqa: E501 :param linked_contacts_ids: The linked_contacts_ids of this Company. # noqa: E501 :type: list[int] """ self._linked_contacts_ids = linked_contacts_ids @property def linked_deals_ids(self): """Gets the linked_deals_ids of this Company. # noqa: E501 Deals ids for companies linked to this company # noqa: E501 :return: The linked_deals_ids of this Company. # noqa: E501 :rtype: list[str] """ return self._linked_deals_ids @linked_deals_ids.setter def linked_deals_ids(self, linked_deals_ids): """Sets the linked_deals_ids of this Company. Deals ids for companies linked to this company # noqa: E501 :param linked_deals_ids: The linked_deals_ids of this Company. # noqa: E501 :type: list[str] """ self._linked_deals_ids = linked_deals_ids def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Company, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Company): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(id=None, attributes=None, linked_contacts_ids=None, linked_deals_ids=None)
58,208
sib_api_v3_sdk.models.company
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Company): return False return self.__dict__ == other.__dict__
(self, other)
58,209
sib_api_v3_sdk.models.company
__init__
Company - a model defined in Swagger
def __init__(self, id=None, attributes=None, linked_contacts_ids=None, linked_deals_ids=None): # noqa: E501 """Company - a model defined in Swagger""" # noqa: E501 self._id = None self._attributes = None self._linked_contacts_ids = None self._linked_deals_ids = None self.discriminator = None if id is not None: self.id = id if attributes is not None: self.attributes = attributes if linked_contacts_ids is not None: self.linked_contacts_ids = linked_contacts_ids if linked_deals_ids is not None: self.linked_deals_ids = linked_deals_ids
(self, id=None, attributes=None, linked_contacts_ids=None, linked_deals_ids=None)
58,212
sib_api_v3_sdk.models.company
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Company, dict): for key, value in self.items(): result[key] = value return result
(self)
58,214
sib_api_v3_sdk.models.company_attributes
CompanyAttributes
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class CompanyAttributes(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { } attribute_map = { } def __init__(self): # noqa: E501 """CompanyAttributes - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(CompanyAttributes, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CompanyAttributes): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
()
58,215
sib_api_v3_sdk.models.company_attributes
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CompanyAttributes): return False return self.__dict__ == other.__dict__
(self, other)
58,216
sib_api_v3_sdk.models.company_attributes
__init__
CompanyAttributes - a model defined in Swagger
def __init__(self): # noqa: E501 """CompanyAttributes - a model defined in Swagger""" # noqa: E501 self.discriminator = None
(self)
58,219
sib_api_v3_sdk.models.company_attributes
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(CompanyAttributes, dict): for key, value in self.items(): result[key] = value return result
(self)
58,221
sib_api_v3_sdk.models.company_attributes_inner
CompanyAttributesInner
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class CompanyAttributesInner(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'internal_name': 'str', 'label': 'str', 'attribute_type_name': 'str', 'attribute_options': 'list[object]', 'is_required': 'bool' } attribute_map = { 'internal_name': 'internalName', 'label': 'label', 'attribute_type_name': 'attributeTypeName', 'attribute_options': 'attributeOptions', 'is_required': 'isRequired' } def __init__(self, internal_name=None, label=None, attribute_type_name=None, attribute_options=None, is_required=None): # noqa: E501 """CompanyAttributesInner - a model defined in Swagger""" # noqa: E501 self._internal_name = None self._label = None self._attribute_type_name = None self._attribute_options = None self._is_required = None self.discriminator = None if internal_name is not None: self.internal_name = internal_name if label is not None: self.label = label if attribute_type_name is not None: self.attribute_type_name = attribute_type_name if attribute_options is not None: self.attribute_options = attribute_options if is_required is not None: self.is_required = is_required @property def internal_name(self): """Gets the internal_name of this CompanyAttributesInner. # noqa: E501 :return: The internal_name of this CompanyAttributesInner. # noqa: E501 :rtype: str """ return self._internal_name @internal_name.setter def internal_name(self, internal_name): """Sets the internal_name of this CompanyAttributesInner. :param internal_name: The internal_name of this CompanyAttributesInner. # noqa: E501 :type: str """ self._internal_name = internal_name @property def label(self): """Gets the label of this CompanyAttributesInner. # noqa: E501 :return: The label of this CompanyAttributesInner. # noqa: E501 :rtype: str """ return self._label @label.setter def label(self, label): """Sets the label of this CompanyAttributesInner. :param label: The label of this CompanyAttributesInner. # noqa: E501 :type: str """ self._label = label @property def attribute_type_name(self): """Gets the attribute_type_name of this CompanyAttributesInner. # noqa: E501 :return: The attribute_type_name of this CompanyAttributesInner. # noqa: E501 :rtype: str """ return self._attribute_type_name @attribute_type_name.setter def attribute_type_name(self, attribute_type_name): """Sets the attribute_type_name of this CompanyAttributesInner. :param attribute_type_name: The attribute_type_name of this CompanyAttributesInner. # noqa: E501 :type: str """ self._attribute_type_name = attribute_type_name @property def attribute_options(self): """Gets the attribute_options of this CompanyAttributesInner. # noqa: E501 :return: The attribute_options of this CompanyAttributesInner. # noqa: E501 :rtype: list[object] """ return self._attribute_options @attribute_options.setter def attribute_options(self, attribute_options): """Sets the attribute_options of this CompanyAttributesInner. :param attribute_options: The attribute_options of this CompanyAttributesInner. # noqa: E501 :type: list[object] """ self._attribute_options = attribute_options @property def is_required(self): """Gets the is_required of this CompanyAttributesInner. # noqa: E501 :return: The is_required of this CompanyAttributesInner. # noqa: E501 :rtype: bool """ return self._is_required @is_required.setter def is_required(self, is_required): """Sets the is_required of this CompanyAttributesInner. :param is_required: The is_required of this CompanyAttributesInner. # noqa: E501 :type: bool """ self._is_required = is_required def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(CompanyAttributesInner, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CompanyAttributesInner): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(internal_name=None, label=None, attribute_type_name=None, attribute_options=None, is_required=None)
58,222
sib_api_v3_sdk.models.company_attributes_inner
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CompanyAttributesInner): return False return self.__dict__ == other.__dict__
(self, other)
58,223
sib_api_v3_sdk.models.company_attributes_inner
__init__
CompanyAttributesInner - a model defined in Swagger
def __init__(self, internal_name=None, label=None, attribute_type_name=None, attribute_options=None, is_required=None): # noqa: E501 """CompanyAttributesInner - a model defined in Swagger""" # noqa: E501 self._internal_name = None self._label = None self._attribute_type_name = None self._attribute_options = None self._is_required = None self.discriminator = None if internal_name is not None: self.internal_name = internal_name if label is not None: self.label = label if attribute_type_name is not None: self.attribute_type_name = attribute_type_name if attribute_options is not None: self.attribute_options = attribute_options if is_required is not None: self.is_required = is_required
(self, internal_name=None, label=None, attribute_type_name=None, attribute_options=None, is_required=None)
58,226
sib_api_v3_sdk.models.company_attributes_inner
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(CompanyAttributesInner, dict): for key, value in self.items(): result[key] = value return result
(self)
58,228
sib_api_v3_sdk.models.component_items
ComponentItems
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class ComponentItems(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'type': 'str', 'text': 'str' } attribute_map = { 'type': 'type', 'text': 'text' } def __init__(self, type=None, text=None): # noqa: E501 """ComponentItems - a model defined in Swagger""" # noqa: E501 self._type = None self._text = None self.discriminator = None if type is not None: self.type = type if text is not None: self.text = text @property def type(self): """Gets the type of this ComponentItems. # noqa: E501 :return: The type of this ComponentItems. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this ComponentItems. :param type: The type of this ComponentItems. # noqa: E501 :type: str """ self._type = type @property def text(self): """Gets the text of this ComponentItems. # noqa: E501 :return: The text of this ComponentItems. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): """Sets the text of this ComponentItems. :param text: The text of this ComponentItems. # noqa: E501 :type: str """ self._text = text def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(ComponentItems, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ComponentItems): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(type=None, text=None)
58,229
sib_api_v3_sdk.models.component_items
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, ComponentItems): return False return self.__dict__ == other.__dict__
(self, other)
58,230
sib_api_v3_sdk.models.component_items
__init__
ComponentItems - a model defined in Swagger
def __init__(self, type=None, text=None): # noqa: E501 """ComponentItems - a model defined in Swagger""" # noqa: E501 self._type = None self._text = None self.discriminator = None if type is not None: self.type = type if text is not None: self.text = text
(self, type=None, text=None)
58,233
sib_api_v3_sdk.models.component_items
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(ComponentItems, dict): for key, value in self.items(): result[key] = value return result
(self)
58,235
sib_api_v3_sdk.configuration
Configuration
NOTE: This class is auto generated by the swagger code generator program. Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually.
class Configuration(object): """NOTE: This class is auto generated by the swagger code generator program. Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. """ _default = None def __init__(self): """Constructor""" if self._default: for key in self._default.__dict__.keys(): self.__dict__[key] = copy.copy(self._default.__dict__[key]) return # Default Base url self.host = "https://api.sendinblue.com/v3" # Temp file folder for downloading files self.temp_folder_path = None # Authentication Settings # dict to store API key(s) self.api_key = {} # dict to store API prefix (e.g. Bearer) self.api_key_prefix = {} # function to refresh API key if expired self.refresh_api_key_hook = None # Username for HTTP basic authentication self.username = "" # Password for HTTP basic authentication self.password = "" # Logging Settings self.logger = {} self.logger["package_logger"] = logging.getLogger("sib_api_v3_sdk") self.logger["urllib3_logger"] = logging.getLogger("urllib3") # Log format self.logger_format = '%(asctime)s %(levelname)s %(message)s' # Log stream handler self.logger_stream_handler = None # Log file handler self.logger_file_handler = None # Debug file location self.logger_file = None # Debug switch self.debug = False # SSL/TLS verification # Set this to false to skip verifying SSL certificate when calling API # from https server. self.verify_ssl = True # Set this to customize the certificate file to verify the peer. self.ssl_ca_cert = None # client certificate file self.cert_file = None # client key file self.key_file = None # Set this to True/False to enable/disable SSL hostname verification. self.assert_hostname = None # urllib3 connection pool's maximum number of connections saved # per pool. urllib3 uses 1 connection as default value, but this is # not the best value when you are making a lot of possibly parallel # requests to the same host, which is often the case here. # cpu_count * 5 is used as default value to increase performance. self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 # Proxy URL self.proxy = None # Safe chars for path_param self.safe_chars_for_path_param = '' @classmethod def set_default(cls, default): cls._default = default @property def logger_file(self): """The logger file. If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str """ return self.__logger_file @logger_file.setter def logger_file(self, value): """The logger file. If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str """ self.__logger_file = value if self.__logger_file: # If set logging file, # then add file handler and remove stream handler. self.logger_file_handler = logging.FileHandler(self.__logger_file) self.logger_file_handler.setFormatter(self.logger_formatter) for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_file_handler) if self.logger_stream_handler: logger.removeHandler(self.logger_stream_handler) else: # If not set logging file, # then add stream handler and remove file handler. self.logger_stream_handler = logging.StreamHandler() self.logger_stream_handler.setFormatter(self.logger_formatter) for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_stream_handler) if self.logger_file_handler: logger.removeHandler(self.logger_file_handler) @property def debug(self): """Debug status :param value: The debug status, True or False. :type: bool """ return self.__debug @debug.setter def debug(self, value): """Debug status :param value: The debug status, True or False. :type: bool """ self.__debug = value if self.__debug: # if debug status is True, turn on debug logging for _, logger in six.iteritems(self.logger): logger.setLevel(logging.DEBUG) # turn on httplib debug httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in six.iteritems(self.logger): logger.setLevel(logging.WARNING) # turn off httplib debug httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): """The logger format. The logger_formatter will be updated when sets logger_format. :param value: The format string. :type: str """ return self.__logger_format @logger_format.setter def logger_format(self, value): """The logger format. The logger_formatter will be updated when sets logger_format. :param value: The format string. :type: str """ self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) def get_api_key_with_prefix(self, identifier): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ if self.refresh_api_key_hook: self.refresh_api_key_hook(self) key = self.api_key.get(identifier) if key: prefix = self.api_key_prefix.get(identifier) if prefix: return "%s %s" % (prefix, key) else: return key def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ return urllib3.util.make_headers( basic_auth=self.username + ':' + self.password ).get('authorization') def auth_settings(self): """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ return { 'api-key': { 'type': 'api_key', 'in': 'header', 'key': 'api-key', 'value': self.get_api_key_with_prefix('api-key') }, 'partner-key': { 'type': 'api_key', 'in': 'header', 'key': 'partner-key', 'value': self.get_api_key_with_prefix('partner-key') }, } def to_debug_report(self): """Gets the essential information for debugging. :return: The report for debugging. """ return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 3.0.0\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version)
()
58,236
sib_api_v3_sdk.configuration
__init__
Constructor
def __init__(self): """Constructor""" if self._default: for key in self._default.__dict__.keys(): self.__dict__[key] = copy.copy(self._default.__dict__[key]) return # Default Base url self.host = "https://api.sendinblue.com/v3" # Temp file folder for downloading files self.temp_folder_path = None # Authentication Settings # dict to store API key(s) self.api_key = {} # dict to store API prefix (e.g. Bearer) self.api_key_prefix = {} # function to refresh API key if expired self.refresh_api_key_hook = None # Username for HTTP basic authentication self.username = "" # Password for HTTP basic authentication self.password = "" # Logging Settings self.logger = {} self.logger["package_logger"] = logging.getLogger("sib_api_v3_sdk") self.logger["urllib3_logger"] = logging.getLogger("urllib3") # Log format self.logger_format = '%(asctime)s %(levelname)s %(message)s' # Log stream handler self.logger_stream_handler = None # Log file handler self.logger_file_handler = None # Debug file location self.logger_file = None # Debug switch self.debug = False # SSL/TLS verification # Set this to false to skip verifying SSL certificate when calling API # from https server. self.verify_ssl = True # Set this to customize the certificate file to verify the peer. self.ssl_ca_cert = None # client certificate file self.cert_file = None # client key file self.key_file = None # Set this to True/False to enable/disable SSL hostname verification. self.assert_hostname = None # urllib3 connection pool's maximum number of connections saved # per pool. urllib3 uses 1 connection as default value, but this is # not the best value when you are making a lot of possibly parallel # requests to the same host, which is often the case here. # cpu_count * 5 is used as default value to increase performance. self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 # Proxy URL self.proxy = None # Safe chars for path_param self.safe_chars_for_path_param = ''
(self)
58,237
sib_api_v3_sdk.configuration
auth_settings
Gets Auth Settings dict for api client. :return: The Auth Settings information dict.
def auth_settings(self): """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ return { 'api-key': { 'type': 'api_key', 'in': 'header', 'key': 'api-key', 'value': self.get_api_key_with_prefix('api-key') }, 'partner-key': { 'type': 'api_key', 'in': 'header', 'key': 'partner-key', 'value': self.get_api_key_with_prefix('partner-key') }, }
(self)
58,238
sib_api_v3_sdk.configuration
get_api_key_with_prefix
Gets API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication.
def get_api_key_with_prefix(self, identifier): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ if self.refresh_api_key_hook: self.refresh_api_key_hook(self) key = self.api_key.get(identifier) if key: prefix = self.api_key_prefix.get(identifier) if prefix: return "%s %s" % (prefix, key) else: return key
(self, identifier)
58,239
sib_api_v3_sdk.configuration
get_basic_auth_token
Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication.
def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ return urllib3.util.make_headers( basic_auth=self.username + ':' + self.password ).get('authorization')
(self)
58,240
sib_api_v3_sdk.configuration
to_debug_report
Gets the essential information for debugging. :return: The report for debugging.
def to_debug_report(self): """Gets the essential information for debugging. :return: The report for debugging. """ return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 3.0.0\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version)
(self)
58,241
sib_api_v3_sdk.api.contacts_api
ContactsApi
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
class ContactsApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def add_contact_to_list(self, list_id, contact_emails, **kwargs): # noqa: E501 """Add existing contacts to a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_contact_to_list(list_id, contact_emails, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param AddContactToList contact_emails: Emails addresses OR IDs of the contacts (required) :return: PostContactInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.add_contact_to_list_with_http_info(list_id, contact_emails, **kwargs) # noqa: E501 else: (data) = self.add_contact_to_list_with_http_info(list_id, contact_emails, **kwargs) # noqa: E501 return data def add_contact_to_list_with_http_info(self, list_id, contact_emails, **kwargs): # noqa: E501 """Add existing contacts to a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_contact_to_list_with_http_info(list_id, contact_emails, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param AddContactToList contact_emails: Emails addresses OR IDs of the contacts (required) :return: PostContactInfo If the method is called asynchronously, returns the request thread. """ all_params = ['list_id', 'contact_emails'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_contact_to_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `add_contact_to_list`") # noqa: E501 # verify the required parameter 'contact_emails' is set if ('contact_emails' not in params or params['contact_emails'] is None): raise ValueError("Missing the required parameter `contact_emails` when calling `add_contact_to_list`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'contact_emails' in params: body_params = params['contact_emails'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}/contacts/add', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PostContactInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_attribute(self, attribute_category, attribute_name, create_attribute, **kwargs): # noqa: E501 """Create contact attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_attribute(attribute_category, attribute_name, create_attribute, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the attribute (required) :param CreateAttribute create_attribute: Values to create an attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, **kwargs) # noqa: E501 else: (data) = self.create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, **kwargs) # noqa: E501 return data def create_attribute_with_http_info(self, attribute_category, attribute_name, create_attribute, **kwargs): # noqa: E501 """Create contact attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the attribute (required) :param CreateAttribute create_attribute: Values to create an attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['attribute_category', 'attribute_name', 'create_attribute'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_attribute" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'attribute_category' is set if ('attribute_category' not in params or params['attribute_category'] is None): raise ValueError("Missing the required parameter `attribute_category` when calling `create_attribute`") # noqa: E501 # verify the required parameter 'attribute_name' is set if ('attribute_name' not in params or params['attribute_name'] is None): raise ValueError("Missing the required parameter `attribute_name` when calling `create_attribute`") # noqa: E501 # verify the required parameter 'create_attribute' is set if ('create_attribute' not in params or params['create_attribute'] is None): raise ValueError("Missing the required parameter `create_attribute` when calling `create_attribute`") # noqa: E501 collection_formats = {} path_params = {} if 'attribute_category' in params: path_params['attributeCategory'] = params['attribute_category'] # noqa: E501 if 'attribute_name' in params: path_params['attributeName'] = params['attribute_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_attribute' in params: body_params = params['create_attribute'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/attributes/{attributeCategory}/{attributeName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_contact(self, create_contact, **kwargs): # noqa: E501 """Create a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_contact(create_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateContact create_contact: Values to create a contact (required) :return: CreateUpdateContactModel If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_contact_with_http_info(create_contact, **kwargs) # noqa: E501 else: (data) = self.create_contact_with_http_info(create_contact, **kwargs) # noqa: E501 return data def create_contact_with_http_info(self, create_contact, **kwargs): # noqa: E501 """Create a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_contact_with_http_info(create_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateContact create_contact: Values to create a contact (required) :return: CreateUpdateContactModel If the method is called asynchronously, returns the request thread. """ all_params = ['create_contact'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_contact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'create_contact' is set if ('create_contact' not in params or params['create_contact'] is None): raise ValueError("Missing the required parameter `create_contact` when calling `create_contact`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_contact' in params: body_params = params['create_contact'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateUpdateContactModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_doi_contact(self, create_doi_contact, **kwargs): # noqa: E501 """Create Contact via DOI (Double-Opt-In) Flow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_doi_contact(create_doi_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDoiContact create_doi_contact: Values to create the Double opt-in (DOI) contact (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_doi_contact_with_http_info(create_doi_contact, **kwargs) # noqa: E501 else: (data) = self.create_doi_contact_with_http_info(create_doi_contact, **kwargs) # noqa: E501 return data def create_doi_contact_with_http_info(self, create_doi_contact, **kwargs): # noqa: E501 """Create Contact via DOI (Double-Opt-In) Flow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_doi_contact_with_http_info(create_doi_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDoiContact create_doi_contact: Values to create the Double opt-in (DOI) contact (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['create_doi_contact'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_doi_contact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'create_doi_contact' is set if ('create_doi_contact' not in params or params['create_doi_contact'] is None): raise ValueError("Missing the required parameter `create_doi_contact` when calling `create_doi_contact`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_doi_contact' in params: body_params = params['create_doi_contact'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/doubleOptinConfirmation', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_folder(self, create_folder, **kwargs): # noqa: E501 """Create a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_folder(create_folder, async_req=True) >>> result = thread.get() :param async_req bool :param CreateUpdateFolder create_folder: Name of the folder (required) :return: CreateModel If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_folder_with_http_info(create_folder, **kwargs) # noqa: E501 else: (data) = self.create_folder_with_http_info(create_folder, **kwargs) # noqa: E501 return data def create_folder_with_http_info(self, create_folder, **kwargs): # noqa: E501 """Create a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_folder_with_http_info(create_folder, async_req=True) >>> result = thread.get() :param async_req bool :param CreateUpdateFolder create_folder: Name of the folder (required) :return: CreateModel If the method is called asynchronously, returns the request thread. """ all_params = ['create_folder'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_folder" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'create_folder' is set if ('create_folder' not in params or params['create_folder'] is None): raise ValueError("Missing the required parameter `create_folder` when calling `create_folder`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_folder' in params: body_params = params['create_folder'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_list(self, create_list, **kwargs): # noqa: E501 """Create a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_list(create_list, async_req=True) >>> result = thread.get() :param async_req bool :param CreateList create_list: Values to create a list (required) :return: CreateModel If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_list_with_http_info(create_list, **kwargs) # noqa: E501 else: (data) = self.create_list_with_http_info(create_list, **kwargs) # noqa: E501 return data def create_list_with_http_info(self, create_list, **kwargs): # noqa: E501 """Create a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_list_with_http_info(create_list, async_req=True) >>> result = thread.get() :param async_req bool :param CreateList create_list: Values to create a list (required) :return: CreateModel If the method is called asynchronously, returns the request thread. """ all_params = ['create_list'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'create_list' is set if ('create_list' not in params or params['create_list'] is None): raise ValueError("Missing the required parameter `create_list` when calling `create_list`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_list' in params: body_params = params['create_list'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_attribute(self, attribute_category, attribute_name, **kwargs): # noqa: E501 """Delete an attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_attribute(attribute_category, attribute_name, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the existing attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_attribute_with_http_info(attribute_category, attribute_name, **kwargs) # noqa: E501 else: (data) = self.delete_attribute_with_http_info(attribute_category, attribute_name, **kwargs) # noqa: E501 return data def delete_attribute_with_http_info(self, attribute_category, attribute_name, **kwargs): # noqa: E501 """Delete an attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_attribute_with_http_info(attribute_category, attribute_name, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the existing attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['attribute_category', 'attribute_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_attribute" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'attribute_category' is set if ('attribute_category' not in params or params['attribute_category'] is None): raise ValueError("Missing the required parameter `attribute_category` when calling `delete_attribute`") # noqa: E501 # verify the required parameter 'attribute_name' is set if ('attribute_name' not in params or params['attribute_name'] is None): raise ValueError("Missing the required parameter `attribute_name` when calling `delete_attribute`") # noqa: E501 collection_formats = {} path_params = {} if 'attribute_category' in params: path_params['attributeCategory'] = params['attribute_category'] # noqa: E501 if 'attribute_name' in params: path_params['attributeName'] = params['attribute_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/attributes/{attributeCategory}/{attributeName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_contact(self, identifier, **kwargs): # noqa: E501 """Delete a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_contact(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_contact_with_http_info(identifier, **kwargs) # noqa: E501 else: (data) = self.delete_contact_with_http_info(identifier, **kwargs) # noqa: E501 return data def delete_contact_with_http_info(self, identifier, **kwargs): # noqa: E501 """Delete a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_contact_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['identifier'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_contact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'identifier' is set if ('identifier' not in params or params['identifier'] is None): raise ValueError("Missing the required parameter `identifier` when calling `delete_contact`") # noqa: E501 collection_formats = {} path_params = {} if 'identifier' in params: path_params['identifier'] = params['identifier'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/{identifier}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_folder(self, folder_id, **kwargs): # noqa: E501 """Delete a folder (and all its lists) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_folder(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_folder_with_http_info(folder_id, **kwargs) # noqa: E501 else: (data) = self.delete_folder_with_http_info(folder_id, **kwargs) # noqa: E501 return data def delete_folder_with_http_info(self, folder_id, **kwargs): # noqa: E501 """Delete a folder (and all its lists) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_folder_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['folder_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_folder" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'folder_id' is set if ('folder_id' not in params or params['folder_id'] is None): raise ValueError("Missing the required parameter `folder_id` when calling `delete_folder`") # noqa: E501 collection_formats = {} path_params = {} if 'folder_id' in params: path_params['folderId'] = params['folder_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders/{folderId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_list(self, list_id, **kwargs): # noqa: E501 """Delete a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_list_with_http_info(list_id, **kwargs) # noqa: E501 else: (data) = self.delete_list_with_http_info(list_id, **kwargs) # noqa: E501 return data def delete_list_with_http_info(self, list_id, **kwargs): # noqa: E501 """Delete a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['list_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `delete_list`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_attributes(self, **kwargs): # noqa: E501 """List all attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAttributes If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_attributes_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_attributes_with_http_info(**kwargs) # noqa: E501 return data def get_attributes_with_http_info(self, **kwargs): # noqa: E501 """List all attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAttributes If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_attributes" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/attributes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetAttributes', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_contact_info(self, identifier, **kwargs): # noqa: E501 """Get a contact's details # noqa: E501 Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) :param str start_date: **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. :return: GetExtendedContactDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_contact_info_with_http_info(identifier, **kwargs) # noqa: E501 else: (data) = self.get_contact_info_with_http_info(identifier, **kwargs) # noqa: E501 return data def get_contact_info_with_http_info(self, identifier, **kwargs): # noqa: E501 """Get a contact's details # noqa: E501 Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_info_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) :param str start_date: **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. :return: GetExtendedContactDetails If the method is called asynchronously, returns the request thread. """ all_params = ['identifier', 'start_date', 'end_date'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_contact_info" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'identifier' is set if ('identifier' not in params or params['identifier'] is None): raise ValueError("Missing the required parameter `identifier` when calling `get_contact_info`") # noqa: E501 collection_formats = {} path_params = {} if 'identifier' in params: path_params['identifier'] = params['identifier'] # noqa: E501 query_params = [] if 'start_date' in params: query_params.append(('startDate', params['start_date'])) # noqa: E501 if 'end_date' in params: query_params.append(('endDate', params['end_date'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/{identifier}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetExtendedContactDetails', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_contact_stats(self, identifier, **kwargs): # noqa: E501 """Get email campaigns' statistics for a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_stats(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :param str start_date: Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days :return: GetContactCampaignStats If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_contact_stats_with_http_info(identifier, **kwargs) # noqa: E501 else: (data) = self.get_contact_stats_with_http_info(identifier, **kwargs) # noqa: E501 return data def get_contact_stats_with_http_info(self, identifier, **kwargs): # noqa: E501 """Get email campaigns' statistics for a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_stats_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :param str start_date: Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days :return: GetContactCampaignStats If the method is called asynchronously, returns the request thread. """ all_params = ['identifier', 'start_date', 'end_date'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_contact_stats" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'identifier' is set if ('identifier' not in params or params['identifier'] is None): raise ValueError("Missing the required parameter `identifier` when calling `get_contact_stats`") # noqa: E501 collection_formats = {} path_params = {} if 'identifier' in params: path_params['identifier'] = params['identifier'] # noqa: E501 query_params = [] if 'start_date' in params: query_params.append(('startDate', params['start_date'])) # noqa: E501 if 'end_date' in params: query_params.append(('endDate', params['end_date'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/{identifier}/campaignStats', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetContactCampaignStats', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_contacts(self, **kwargs): # noqa: E501 """Get all the contacts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str created_since: Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_contacts_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_contacts_with_http_info(**kwargs) # noqa: E501 return data def get_contacts_with_http_info(self, **kwargs): # noqa: E501 """Get all the contacts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str created_since: Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread. """ all_params = ['limit', 'offset', 'modified_since', 'created_since', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_contacts" % key ) params[key] = val del params['kwargs'] if 'limit' in params and params['limit'] > 1000: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_contacts`, must be a value less than or equal to `1000`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_contacts`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'modified_since' in params: query_params.append(('modifiedSince', params['modified_since'])) # noqa: E501 if 'created_since' in params: query_params.append(('createdSince', params['created_since'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetContacts', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_contacts_from_list(self, list_id, **kwargs): # noqa: E501 """Get contacts in a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_from_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_contacts_from_list_with_http_info(list_id, **kwargs) # noqa: E501 else: (data) = self.get_contacts_from_list_with_http_info(list_id, **kwargs) # noqa: E501 return data def get_contacts_from_list_with_http_info(self, list_id, **kwargs): # noqa: E501 """Get contacts in a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_from_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread. """ all_params = ['list_id', 'modified_since', 'limit', 'offset', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_contacts_from_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `get_contacts_from_list`") # noqa: E501 if 'limit' in params and params['limit'] > 500: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_contacts_from_list`, must be a value less than or equal to `500`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_contacts_from_list`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] if 'modified_since' in params: query_params.append(('modifiedSince', params['modified_since'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}/contacts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetContacts', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_folder(self, folder_id, **kwargs): # noqa: E501 """Returns a folder's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: id of the folder (required) :return: GetFolder If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_folder_with_http_info(folder_id, **kwargs) # noqa: E501 else: (data) = self.get_folder_with_http_info(folder_id, **kwargs) # noqa: E501 return data def get_folder_with_http_info(self, folder_id, **kwargs): # noqa: E501 """Returns a folder's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: id of the folder (required) :return: GetFolder If the method is called asynchronously, returns the request thread. """ all_params = ['folder_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_folder" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'folder_id' is set if ('folder_id' not in params or params['folder_id'] is None): raise ValueError("Missing the required parameter `folder_id` when calling `get_folder`") # noqa: E501 collection_formats = {} path_params = {} if 'folder_id' in params: path_params['folderId'] = params['folder_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders/{folderId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetFolder', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_folder_lists(self, folder_id, **kwargs): # noqa: E501 """Get lists in a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_lists(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolderLists If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_folder_lists_with_http_info(folder_id, **kwargs) # noqa: E501 else: (data) = self.get_folder_lists_with_http_info(folder_id, **kwargs) # noqa: E501 return data def get_folder_lists_with_http_info(self, folder_id, **kwargs): # noqa: E501 """Get lists in a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_lists_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolderLists If the method is called asynchronously, returns the request thread. """ all_params = ['folder_id', 'limit', 'offset', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_folder_lists" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'folder_id' is set if ('folder_id' not in params or params['folder_id'] is None): raise ValueError("Missing the required parameter `folder_id` when calling `get_folder_lists`") # noqa: E501 if 'limit' in params and params['limit'] > 50: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_folder_lists`, must be a value less than or equal to `50`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_folder_lists`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'folder_id' in params: path_params['folderId'] = params['folder_id'] # noqa: E501 query_params = [] if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders/{folderId}/lists', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetFolderLists', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_folders(self, limit, offset, **kwargs): # noqa: E501 """Get all folders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folders(limit, offset, async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page (required) :param int offset: Index of the first document of the page (required) :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolders If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_folders_with_http_info(limit, offset, **kwargs) # noqa: E501 else: (data) = self.get_folders_with_http_info(limit, offset, **kwargs) # noqa: E501 return data def get_folders_with_http_info(self, limit, offset, **kwargs): # noqa: E501 """Get all folders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folders_with_http_info(limit, offset, async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page (required) :param int offset: Index of the first document of the page (required) :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolders If the method is called asynchronously, returns the request thread. """ all_params = ['limit', 'offset', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_folders" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'limit' is set if ('limit' not in params or params['limit'] is None): raise ValueError("Missing the required parameter `limit` when calling `get_folders`") # noqa: E501 # verify the required parameter 'offset' is set if ('offset' not in params or params['offset'] is None): raise ValueError("Missing the required parameter `offset` when calling `get_folders`") # noqa: E501 if 'limit' in params and params['limit'] > 50: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_folders`, must be a value less than or equal to `50`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_folders`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetFolders', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_list(self, list_id, **kwargs): # noqa: E501 """Get a list's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: GetExtendedList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_list_with_http_info(list_id, **kwargs) # noqa: E501 else: (data) = self.get_list_with_http_info(list_id, **kwargs) # noqa: E501 return data def get_list_with_http_info(self, list_id, **kwargs): # noqa: E501 """Get a list's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: GetExtendedList If the method is called asynchronously, returns the request thread. """ all_params = ['list_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `get_list`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetExtendedList', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_lists(self, **kwargs): # noqa: E501 """Get all the lists # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_lists(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetLists If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_lists_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_lists_with_http_info(**kwargs) # noqa: E501 return data def get_lists_with_http_info(self, **kwargs): # noqa: E501 """Get all the lists # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_lists_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetLists If the method is called asynchronously, returns the request thread. """ all_params = ['limit', 'offset', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_lists" % key ) params[key] = val del params['kwargs'] if 'limit' in params and params['limit'] > 50: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_lists`, must be a value less than or equal to `50`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_lists`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetLists', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def import_contacts(self, request_contact_import, **kwargs): # noqa: E501 """Import contacts # noqa: E501 It returns the background process ID which on completion calls the notify URL that you have set in the input. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.import_contacts(request_contact_import, async_req=True) >>> result = thread.get() :param async_req bool :param RequestContactImport request_contact_import: Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) :return: CreatedProcessId If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.import_contacts_with_http_info(request_contact_import, **kwargs) # noqa: E501 else: (data) = self.import_contacts_with_http_info(request_contact_import, **kwargs) # noqa: E501 return data def import_contacts_with_http_info(self, request_contact_import, **kwargs): # noqa: E501 """Import contacts # noqa: E501 It returns the background process ID which on completion calls the notify URL that you have set in the input. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.import_contacts_with_http_info(request_contact_import, async_req=True) >>> result = thread.get() :param async_req bool :param RequestContactImport request_contact_import: Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) :return: CreatedProcessId If the method is called asynchronously, returns the request thread. """ all_params = ['request_contact_import'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method import_contacts" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'request_contact_import' is set if ('request_contact_import' not in params or params['request_contact_import'] is None): raise ValueError("Missing the required parameter `request_contact_import` when calling `import_contacts`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'request_contact_import' in params: body_params = params['request_contact_import'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/import', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreatedProcessId', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def remove_contact_from_list(self, list_id, contact_emails, **kwargs): # noqa: E501 """Delete a contact from a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_contact_from_list(list_id, contact_emails, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param RemoveContactFromList contact_emails: Emails addresses OR IDs of the contacts (required) :return: PostContactInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.remove_contact_from_list_with_http_info(list_id, contact_emails, **kwargs) # noqa: E501 else: (data) = self.remove_contact_from_list_with_http_info(list_id, contact_emails, **kwargs) # noqa: E501 return data def remove_contact_from_list_with_http_info(self, list_id, contact_emails, **kwargs): # noqa: E501 """Delete a contact from a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_contact_from_list_with_http_info(list_id, contact_emails, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param RemoveContactFromList contact_emails: Emails addresses OR IDs of the contacts (required) :return: PostContactInfo If the method is called asynchronously, returns the request thread. """ all_params = ['list_id', 'contact_emails'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method remove_contact_from_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `remove_contact_from_list`") # noqa: E501 # verify the required parameter 'contact_emails' is set if ('contact_emails' not in params or params['contact_emails'] is None): raise ValueError("Missing the required parameter `contact_emails` when calling `remove_contact_from_list`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'contact_emails' in params: body_params = params['contact_emails'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}/contacts/remove', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PostContactInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def request_contact_export(self, request_contact_export, **kwargs): # noqa: E501 """Export contacts # noqa: E501 It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.request_contact_export(request_contact_export, async_req=True) >>> result = thread.get() :param async_req bool :param RequestContactExport request_contact_export: Values to request a contact export (required) :return: CreatedProcessId If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.request_contact_export_with_http_info(request_contact_export, **kwargs) # noqa: E501 else: (data) = self.request_contact_export_with_http_info(request_contact_export, **kwargs) # noqa: E501 return data def request_contact_export_with_http_info(self, request_contact_export, **kwargs): # noqa: E501 """Export contacts # noqa: E501 It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.request_contact_export_with_http_info(request_contact_export, async_req=True) >>> result = thread.get() :param async_req bool :param RequestContactExport request_contact_export: Values to request a contact export (required) :return: CreatedProcessId If the method is called asynchronously, returns the request thread. """ all_params = ['request_contact_export'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method request_contact_export" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'request_contact_export' is set if ('request_contact_export' not in params or params['request_contact_export'] is None): raise ValueError("Missing the required parameter `request_contact_export` when calling `request_contact_export`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'request_contact_export' in params: body_params = params['request_contact_export'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/export', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreatedProcessId', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_attribute(self, attribute_category, attribute_name, update_attribute, **kwargs): # noqa: E501 """Update contact attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_attribute(attribute_category, attribute_name, update_attribute, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the existing attribute (required) :param UpdateAttribute update_attribute: Values to update an attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, **kwargs) # noqa: E501 else: (data) = self.update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, **kwargs) # noqa: E501 return data def update_attribute_with_http_info(self, attribute_category, attribute_name, update_attribute, **kwargs): # noqa: E501 """Update contact attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the existing attribute (required) :param UpdateAttribute update_attribute: Values to update an attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['attribute_category', 'attribute_name', 'update_attribute'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_attribute" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'attribute_category' is set if ('attribute_category' not in params or params['attribute_category'] is None): raise ValueError("Missing the required parameter `attribute_category` when calling `update_attribute`") # noqa: E501 # verify the required parameter 'attribute_name' is set if ('attribute_name' not in params or params['attribute_name'] is None): raise ValueError("Missing the required parameter `attribute_name` when calling `update_attribute`") # noqa: E501 # verify the required parameter 'update_attribute' is set if ('update_attribute' not in params or params['update_attribute'] is None): raise ValueError("Missing the required parameter `update_attribute` when calling `update_attribute`") # noqa: E501 collection_formats = {} path_params = {} if 'attribute_category' in params: path_params['attributeCategory'] = params['attribute_category'] # noqa: E501 if 'attribute_name' in params: path_params['attributeName'] = params['attribute_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_attribute' in params: body_params = params['update_attribute'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/attributes/{attributeCategory}/{attributeName}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_batch_contacts(self, update_batch_contacts, **kwargs): # noqa: E501 """Update multiple contacts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_batch_contacts(update_batch_contacts, async_req=True) >>> result = thread.get() :param async_req bool :param UpdateBatchContacts update_batch_contacts: Values to update multiple contacts (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_batch_contacts_with_http_info(update_batch_contacts, **kwargs) # noqa: E501 else: (data) = self.update_batch_contacts_with_http_info(update_batch_contacts, **kwargs) # noqa: E501 return data def update_batch_contacts_with_http_info(self, update_batch_contacts, **kwargs): # noqa: E501 """Update multiple contacts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_batch_contacts_with_http_info(update_batch_contacts, async_req=True) >>> result = thread.get() :param async_req bool :param UpdateBatchContacts update_batch_contacts: Values to update multiple contacts (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['update_batch_contacts'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_batch_contacts" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'update_batch_contacts' is set if ('update_batch_contacts' not in params or params['update_batch_contacts'] is None): raise ValueError("Missing the required parameter `update_batch_contacts` when calling `update_batch_contacts`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_batch_contacts' in params: body_params = params['update_batch_contacts'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/batch', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_contact(self, identifier, update_contact, **kwargs): # noqa: E501 """Update a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_contact(identifier, update_contact, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :param UpdateContact update_contact: Values to update a contact (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_contact_with_http_info(identifier, update_contact, **kwargs) # noqa: E501 else: (data) = self.update_contact_with_http_info(identifier, update_contact, **kwargs) # noqa: E501 return data def update_contact_with_http_info(self, identifier, update_contact, **kwargs): # noqa: E501 """Update a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_contact_with_http_info(identifier, update_contact, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :param UpdateContact update_contact: Values to update a contact (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['identifier', 'update_contact'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_contact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'identifier' is set if ('identifier' not in params or params['identifier'] is None): raise ValueError("Missing the required parameter `identifier` when calling `update_contact`") # noqa: E501 # verify the required parameter 'update_contact' is set if ('update_contact' not in params or params['update_contact'] is None): raise ValueError("Missing the required parameter `update_contact` when calling `update_contact`") # noqa: E501 collection_formats = {} path_params = {} if 'identifier' in params: path_params['identifier'] = params['identifier'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_contact' in params: body_params = params['update_contact'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/{identifier}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_folder(self, folder_id, update_folder, **kwargs): # noqa: E501 """Update a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_folder(folder_id, update_folder, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :param CreateUpdateFolder update_folder: Name of the folder (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_folder_with_http_info(folder_id, update_folder, **kwargs) # noqa: E501 else: (data) = self.update_folder_with_http_info(folder_id, update_folder, **kwargs) # noqa: E501 return data def update_folder_with_http_info(self, folder_id, update_folder, **kwargs): # noqa: E501 """Update a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_folder_with_http_info(folder_id, update_folder, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :param CreateUpdateFolder update_folder: Name of the folder (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['folder_id', 'update_folder'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_folder" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'folder_id' is set if ('folder_id' not in params or params['folder_id'] is None): raise ValueError("Missing the required parameter `folder_id` when calling `update_folder`") # noqa: E501 # verify the required parameter 'update_folder' is set if ('update_folder' not in params or params['update_folder'] is None): raise ValueError("Missing the required parameter `update_folder` when calling `update_folder`") # noqa: E501 collection_formats = {} path_params = {} if 'folder_id' in params: path_params['folderId'] = params['folder_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_folder' in params: body_params = params['update_folder'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders/{folderId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_list(self, list_id, update_list, **kwargs): # noqa: E501 """Update a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_list(list_id, update_list, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param UpdateList update_list: Values to update a list (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_list_with_http_info(list_id, update_list, **kwargs) # noqa: E501 else: (data) = self.update_list_with_http_info(list_id, update_list, **kwargs) # noqa: E501 return data def update_list_with_http_info(self, list_id, update_list, **kwargs): # noqa: E501 """Update a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_list_with_http_info(list_id, update_list, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param UpdateList update_list: Values to update a list (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['list_id', 'update_list'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `update_list`") # noqa: E501 # verify the required parameter 'update_list' is set if ('update_list' not in params or params['update_list'] is None): raise ValueError("Missing the required parameter `update_list` when calling `update_list`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_list' in params: body_params = params['update_list'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(api_client=None)
58,243
sib_api_v3_sdk.api.contacts_api
add_contact_to_list
Add existing contacts to a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_contact_to_list(list_id, contact_emails, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param AddContactToList contact_emails: Emails addresses OR IDs of the contacts (required) :return: PostContactInfo If the method is called asynchronously, returns the request thread.
def add_contact_to_list(self, list_id, contact_emails, **kwargs): # noqa: E501 """Add existing contacts to a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_contact_to_list(list_id, contact_emails, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param AddContactToList contact_emails: Emails addresses OR IDs of the contacts (required) :return: PostContactInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.add_contact_to_list_with_http_info(list_id, contact_emails, **kwargs) # noqa: E501 else: (data) = self.add_contact_to_list_with_http_info(list_id, contact_emails, **kwargs) # noqa: E501 return data
(self, list_id, contact_emails, **kwargs)
58,244
sib_api_v3_sdk.api.contacts_api
add_contact_to_list_with_http_info
Add existing contacts to a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_contact_to_list_with_http_info(list_id, contact_emails, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param AddContactToList contact_emails: Emails addresses OR IDs of the contacts (required) :return: PostContactInfo If the method is called asynchronously, returns the request thread.
def add_contact_to_list_with_http_info(self, list_id, contact_emails, **kwargs): # noqa: E501 """Add existing contacts to a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_contact_to_list_with_http_info(list_id, contact_emails, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param AddContactToList contact_emails: Emails addresses OR IDs of the contacts (required) :return: PostContactInfo If the method is called asynchronously, returns the request thread. """ all_params = ['list_id', 'contact_emails'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_contact_to_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `add_contact_to_list`") # noqa: E501 # verify the required parameter 'contact_emails' is set if ('contact_emails' not in params or params['contact_emails'] is None): raise ValueError("Missing the required parameter `contact_emails` when calling `add_contact_to_list`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'contact_emails' in params: body_params = params['contact_emails'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}/contacts/add', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PostContactInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, list_id, contact_emails, **kwargs)
58,245
sib_api_v3_sdk.api.contacts_api
create_attribute
Create contact attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_attribute(attribute_category, attribute_name, create_attribute, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the attribute (required) :param CreateAttribute create_attribute: Values to create an attribute (required) :return: None If the method is called asynchronously, returns the request thread.
def create_attribute(self, attribute_category, attribute_name, create_attribute, **kwargs): # noqa: E501 """Create contact attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_attribute(attribute_category, attribute_name, create_attribute, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the attribute (required) :param CreateAttribute create_attribute: Values to create an attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, **kwargs) # noqa: E501 else: (data) = self.create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, **kwargs) # noqa: E501 return data
(self, attribute_category, attribute_name, create_attribute, **kwargs)
58,246
sib_api_v3_sdk.api.contacts_api
create_attribute_with_http_info
Create contact attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the attribute (required) :param CreateAttribute create_attribute: Values to create an attribute (required) :return: None If the method is called asynchronously, returns the request thread.
def create_attribute_with_http_info(self, attribute_category, attribute_name, create_attribute, **kwargs): # noqa: E501 """Create contact attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the attribute (required) :param CreateAttribute create_attribute: Values to create an attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['attribute_category', 'attribute_name', 'create_attribute'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_attribute" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'attribute_category' is set if ('attribute_category' not in params or params['attribute_category'] is None): raise ValueError("Missing the required parameter `attribute_category` when calling `create_attribute`") # noqa: E501 # verify the required parameter 'attribute_name' is set if ('attribute_name' not in params or params['attribute_name'] is None): raise ValueError("Missing the required parameter `attribute_name` when calling `create_attribute`") # noqa: E501 # verify the required parameter 'create_attribute' is set if ('create_attribute' not in params or params['create_attribute'] is None): raise ValueError("Missing the required parameter `create_attribute` when calling `create_attribute`") # noqa: E501 collection_formats = {} path_params = {} if 'attribute_category' in params: path_params['attributeCategory'] = params['attribute_category'] # noqa: E501 if 'attribute_name' in params: path_params['attributeName'] = params['attribute_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_attribute' in params: body_params = params['create_attribute'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/attributes/{attributeCategory}/{attributeName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, attribute_category, attribute_name, create_attribute, **kwargs)
58,247
sib_api_v3_sdk.api.contacts_api
create_contact
Create a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_contact(create_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateContact create_contact: Values to create a contact (required) :return: CreateUpdateContactModel If the method is called asynchronously, returns the request thread.
def create_contact(self, create_contact, **kwargs): # noqa: E501 """Create a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_contact(create_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateContact create_contact: Values to create a contact (required) :return: CreateUpdateContactModel If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_contact_with_http_info(create_contact, **kwargs) # noqa: E501 else: (data) = self.create_contact_with_http_info(create_contact, **kwargs) # noqa: E501 return data
(self, create_contact, **kwargs)
58,248
sib_api_v3_sdk.api.contacts_api
create_contact_with_http_info
Create a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_contact_with_http_info(create_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateContact create_contact: Values to create a contact (required) :return: CreateUpdateContactModel If the method is called asynchronously, returns the request thread.
def create_contact_with_http_info(self, create_contact, **kwargs): # noqa: E501 """Create a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_contact_with_http_info(create_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateContact create_contact: Values to create a contact (required) :return: CreateUpdateContactModel If the method is called asynchronously, returns the request thread. """ all_params = ['create_contact'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_contact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'create_contact' is set if ('create_contact' not in params or params['create_contact'] is None): raise ValueError("Missing the required parameter `create_contact` when calling `create_contact`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_contact' in params: body_params = params['create_contact'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateUpdateContactModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, create_contact, **kwargs)
58,249
sib_api_v3_sdk.api.contacts_api
create_doi_contact
Create Contact via DOI (Double-Opt-In) Flow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_doi_contact(create_doi_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDoiContact create_doi_contact: Values to create the Double opt-in (DOI) contact (required) :return: None If the method is called asynchronously, returns the request thread.
def create_doi_contact(self, create_doi_contact, **kwargs): # noqa: E501 """Create Contact via DOI (Double-Opt-In) Flow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_doi_contact(create_doi_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDoiContact create_doi_contact: Values to create the Double opt-in (DOI) contact (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_doi_contact_with_http_info(create_doi_contact, **kwargs) # noqa: E501 else: (data) = self.create_doi_contact_with_http_info(create_doi_contact, **kwargs) # noqa: E501 return data
(self, create_doi_contact, **kwargs)
58,250
sib_api_v3_sdk.api.contacts_api
create_doi_contact_with_http_info
Create Contact via DOI (Double-Opt-In) Flow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_doi_contact_with_http_info(create_doi_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDoiContact create_doi_contact: Values to create the Double opt-in (DOI) contact (required) :return: None If the method is called asynchronously, returns the request thread.
def create_doi_contact_with_http_info(self, create_doi_contact, **kwargs): # noqa: E501 """Create Contact via DOI (Double-Opt-In) Flow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_doi_contact_with_http_info(create_doi_contact, async_req=True) >>> result = thread.get() :param async_req bool :param CreateDoiContact create_doi_contact: Values to create the Double opt-in (DOI) contact (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['create_doi_contact'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_doi_contact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'create_doi_contact' is set if ('create_doi_contact' not in params or params['create_doi_contact'] is None): raise ValueError("Missing the required parameter `create_doi_contact` when calling `create_doi_contact`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_doi_contact' in params: body_params = params['create_doi_contact'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/doubleOptinConfirmation', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, create_doi_contact, **kwargs)
58,251
sib_api_v3_sdk.api.contacts_api
create_folder
Create a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_folder(create_folder, async_req=True) >>> result = thread.get() :param async_req bool :param CreateUpdateFolder create_folder: Name of the folder (required) :return: CreateModel If the method is called asynchronously, returns the request thread.
def create_folder(self, create_folder, **kwargs): # noqa: E501 """Create a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_folder(create_folder, async_req=True) >>> result = thread.get() :param async_req bool :param CreateUpdateFolder create_folder: Name of the folder (required) :return: CreateModel If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_folder_with_http_info(create_folder, **kwargs) # noqa: E501 else: (data) = self.create_folder_with_http_info(create_folder, **kwargs) # noqa: E501 return data
(self, create_folder, **kwargs)
58,252
sib_api_v3_sdk.api.contacts_api
create_folder_with_http_info
Create a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_folder_with_http_info(create_folder, async_req=True) >>> result = thread.get() :param async_req bool :param CreateUpdateFolder create_folder: Name of the folder (required) :return: CreateModel If the method is called asynchronously, returns the request thread.
def create_folder_with_http_info(self, create_folder, **kwargs): # noqa: E501 """Create a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_folder_with_http_info(create_folder, async_req=True) >>> result = thread.get() :param async_req bool :param CreateUpdateFolder create_folder: Name of the folder (required) :return: CreateModel If the method is called asynchronously, returns the request thread. """ all_params = ['create_folder'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_folder" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'create_folder' is set if ('create_folder' not in params or params['create_folder'] is None): raise ValueError("Missing the required parameter `create_folder` when calling `create_folder`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_folder' in params: body_params = params['create_folder'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, create_folder, **kwargs)
58,253
sib_api_v3_sdk.api.contacts_api
create_list
Create a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_list(create_list, async_req=True) >>> result = thread.get() :param async_req bool :param CreateList create_list: Values to create a list (required) :return: CreateModel If the method is called asynchronously, returns the request thread.
def create_list(self, create_list, **kwargs): # noqa: E501 """Create a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_list(create_list, async_req=True) >>> result = thread.get() :param async_req bool :param CreateList create_list: Values to create a list (required) :return: CreateModel If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_list_with_http_info(create_list, **kwargs) # noqa: E501 else: (data) = self.create_list_with_http_info(create_list, **kwargs) # noqa: E501 return data
(self, create_list, **kwargs)
58,254
sib_api_v3_sdk.api.contacts_api
create_list_with_http_info
Create a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_list_with_http_info(create_list, async_req=True) >>> result = thread.get() :param async_req bool :param CreateList create_list: Values to create a list (required) :return: CreateModel If the method is called asynchronously, returns the request thread.
def create_list_with_http_info(self, create_list, **kwargs): # noqa: E501 """Create a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_list_with_http_info(create_list, async_req=True) >>> result = thread.get() :param async_req bool :param CreateList create_list: Values to create a list (required) :return: CreateModel If the method is called asynchronously, returns the request thread. """ all_params = ['create_list'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'create_list' is set if ('create_list' not in params or params['create_list'] is None): raise ValueError("Missing the required parameter `create_list` when calling `create_list`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_list' in params: body_params = params['create_list'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CreateModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, create_list, **kwargs)
58,255
sib_api_v3_sdk.api.contacts_api
delete_attribute
Delete an attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_attribute(attribute_category, attribute_name, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the existing attribute (required) :return: None If the method is called asynchronously, returns the request thread.
def delete_attribute(self, attribute_category, attribute_name, **kwargs): # noqa: E501 """Delete an attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_attribute(attribute_category, attribute_name, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the existing attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_attribute_with_http_info(attribute_category, attribute_name, **kwargs) # noqa: E501 else: (data) = self.delete_attribute_with_http_info(attribute_category, attribute_name, **kwargs) # noqa: E501 return data
(self, attribute_category, attribute_name, **kwargs)
58,256
sib_api_v3_sdk.api.contacts_api
delete_attribute_with_http_info
Delete an attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_attribute_with_http_info(attribute_category, attribute_name, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the existing attribute (required) :return: None If the method is called asynchronously, returns the request thread.
def delete_attribute_with_http_info(self, attribute_category, attribute_name, **kwargs): # noqa: E501 """Delete an attribute # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_attribute_with_http_info(attribute_category, attribute_name, async_req=True) >>> result = thread.get() :param async_req bool :param str attribute_category: Category of the attribute (required) :param str attribute_name: Name of the existing attribute (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['attribute_category', 'attribute_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_attribute" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'attribute_category' is set if ('attribute_category' not in params or params['attribute_category'] is None): raise ValueError("Missing the required parameter `attribute_category` when calling `delete_attribute`") # noqa: E501 # verify the required parameter 'attribute_name' is set if ('attribute_name' not in params or params['attribute_name'] is None): raise ValueError("Missing the required parameter `attribute_name` when calling `delete_attribute`") # noqa: E501 collection_formats = {} path_params = {} if 'attribute_category' in params: path_params['attributeCategory'] = params['attribute_category'] # noqa: E501 if 'attribute_name' in params: path_params['attributeName'] = params['attribute_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/attributes/{attributeCategory}/{attributeName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, attribute_category, attribute_name, **kwargs)
58,257
sib_api_v3_sdk.api.contacts_api
delete_contact
Delete a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_contact(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :return: None If the method is called asynchronously, returns the request thread.
def delete_contact(self, identifier, **kwargs): # noqa: E501 """Delete a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_contact(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_contact_with_http_info(identifier, **kwargs) # noqa: E501 else: (data) = self.delete_contact_with_http_info(identifier, **kwargs) # noqa: E501 return data
(self, identifier, **kwargs)
58,258
sib_api_v3_sdk.api.contacts_api
delete_contact_with_http_info
Delete a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_contact_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :return: None If the method is called asynchronously, returns the request thread.
def delete_contact_with_http_info(self, identifier, **kwargs): # noqa: E501 """Delete a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_contact_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['identifier'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_contact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'identifier' is set if ('identifier' not in params or params['identifier'] is None): raise ValueError("Missing the required parameter `identifier` when calling `delete_contact`") # noqa: E501 collection_formats = {} path_params = {} if 'identifier' in params: path_params['identifier'] = params['identifier'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/{identifier}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, identifier, **kwargs)
58,259
sib_api_v3_sdk.api.contacts_api
delete_folder
Delete a folder (and all its lists) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_folder(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :return: None If the method is called asynchronously, returns the request thread.
def delete_folder(self, folder_id, **kwargs): # noqa: E501 """Delete a folder (and all its lists) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_folder(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_folder_with_http_info(folder_id, **kwargs) # noqa: E501 else: (data) = self.delete_folder_with_http_info(folder_id, **kwargs) # noqa: E501 return data
(self, folder_id, **kwargs)
58,260
sib_api_v3_sdk.api.contacts_api
delete_folder_with_http_info
Delete a folder (and all its lists) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_folder_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :return: None If the method is called asynchronously, returns the request thread.
def delete_folder_with_http_info(self, folder_id, **kwargs): # noqa: E501 """Delete a folder (and all its lists) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_folder_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['folder_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_folder" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'folder_id' is set if ('folder_id' not in params or params['folder_id'] is None): raise ValueError("Missing the required parameter `folder_id` when calling `delete_folder`") # noqa: E501 collection_formats = {} path_params = {} if 'folder_id' in params: path_params['folderId'] = params['folder_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders/{folderId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, folder_id, **kwargs)
58,261
sib_api_v3_sdk.api.contacts_api
delete_list
Delete a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: None If the method is called asynchronously, returns the request thread.
def delete_list(self, list_id, **kwargs): # noqa: E501 """Delete a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_list_with_http_info(list_id, **kwargs) # noqa: E501 else: (data) = self.delete_list_with_http_info(list_id, **kwargs) # noqa: E501 return data
(self, list_id, **kwargs)
58,262
sib_api_v3_sdk.api.contacts_api
delete_list_with_http_info
Delete a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: None If the method is called asynchronously, returns the request thread.
def delete_list_with_http_info(self, list_id, **kwargs): # noqa: E501 """Delete a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['list_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `delete_list`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, list_id, **kwargs)
58,263
sib_api_v3_sdk.api.contacts_api
get_attributes
List all attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAttributes If the method is called asynchronously, returns the request thread.
def get_attributes(self, **kwargs): # noqa: E501 """List all attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAttributes If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_attributes_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_attributes_with_http_info(**kwargs) # noqa: E501 return data
(self, **kwargs)
58,264
sib_api_v3_sdk.api.contacts_api
get_attributes_with_http_info
List all attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAttributes If the method is called asynchronously, returns the request thread.
def get_attributes_with_http_info(self, **kwargs): # noqa: E501 """List all attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAttributes If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_attributes" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/attributes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetAttributes', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, **kwargs)
58,265
sib_api_v3_sdk.api.contacts_api
get_contact_info
Get a contact's details # noqa: E501 Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) :param str start_date: **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. :return: GetExtendedContactDetails If the method is called asynchronously, returns the request thread.
def get_contact_info(self, identifier, **kwargs): # noqa: E501 """Get a contact's details # noqa: E501 Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) :param str start_date: **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. :return: GetExtendedContactDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_contact_info_with_http_info(identifier, **kwargs) # noqa: E501 else: (data) = self.get_contact_info_with_http_info(identifier, **kwargs) # noqa: E501 return data
(self, identifier, **kwargs)
58,266
sib_api_v3_sdk.api.contacts_api
get_contact_info_with_http_info
Get a contact's details # noqa: E501 Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_info_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) :param str start_date: **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. :return: GetExtendedContactDetails If the method is called asynchronously, returns the request thread.
def get_contact_info_with_http_info(self, identifier, **kwargs): # noqa: E501 """Get a contact's details # noqa: E501 Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_info_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) :param str start_date: **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. :return: GetExtendedContactDetails If the method is called asynchronously, returns the request thread. """ all_params = ['identifier', 'start_date', 'end_date'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_contact_info" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'identifier' is set if ('identifier' not in params or params['identifier'] is None): raise ValueError("Missing the required parameter `identifier` when calling `get_contact_info`") # noqa: E501 collection_formats = {} path_params = {} if 'identifier' in params: path_params['identifier'] = params['identifier'] # noqa: E501 query_params = [] if 'start_date' in params: query_params.append(('startDate', params['start_date'])) # noqa: E501 if 'end_date' in params: query_params.append(('endDate', params['end_date'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/{identifier}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetExtendedContactDetails', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, identifier, **kwargs)
58,267
sib_api_v3_sdk.api.contacts_api
get_contact_stats
Get email campaigns' statistics for a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_stats(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :param str start_date: Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days :return: GetContactCampaignStats If the method is called asynchronously, returns the request thread.
def get_contact_stats(self, identifier, **kwargs): # noqa: E501 """Get email campaigns' statistics for a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_stats(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :param str start_date: Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days :return: GetContactCampaignStats If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_contact_stats_with_http_info(identifier, **kwargs) # noqa: E501 else: (data) = self.get_contact_stats_with_http_info(identifier, **kwargs) # noqa: E501 return data
(self, identifier, **kwargs)
58,268
sib_api_v3_sdk.api.contacts_api
get_contact_stats_with_http_info
Get email campaigns' statistics for a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_stats_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :param str start_date: Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days :return: GetContactCampaignStats If the method is called asynchronously, returns the request thread.
def get_contact_stats_with_http_info(self, identifier, **kwargs): # noqa: E501 """Get email campaigns' statistics for a contact # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contact_stats_with_http_info(identifier, async_req=True) >>> result = thread.get() :param async_req bool :param str identifier: Email (urlencoded) OR ID of the contact (required) :param str start_date: Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate :param str end_date: Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days :return: GetContactCampaignStats If the method is called asynchronously, returns the request thread. """ all_params = ['identifier', 'start_date', 'end_date'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_contact_stats" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'identifier' is set if ('identifier' not in params or params['identifier'] is None): raise ValueError("Missing the required parameter `identifier` when calling `get_contact_stats`") # noqa: E501 collection_formats = {} path_params = {} if 'identifier' in params: path_params['identifier'] = params['identifier'] # noqa: E501 query_params = [] if 'start_date' in params: query_params.append(('startDate', params['start_date'])) # noqa: E501 if 'end_date' in params: query_params.append(('endDate', params['end_date'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/{identifier}/campaignStats', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetContactCampaignStats', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, identifier, **kwargs)
58,269
sib_api_v3_sdk.api.contacts_api
get_contacts
Get all the contacts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str created_since: Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread.
def get_contacts(self, **kwargs): # noqa: E501 """Get all the contacts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str created_since: Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_contacts_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_contacts_with_http_info(**kwargs) # noqa: E501 return data
(self, **kwargs)
58,270
sib_api_v3_sdk.api.contacts_api
get_contacts_from_list
Get contacts in a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_from_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread.
def get_contacts_from_list(self, list_id, **kwargs): # noqa: E501 """Get contacts in a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_from_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_contacts_from_list_with_http_info(list_id, **kwargs) # noqa: E501 else: (data) = self.get_contacts_from_list_with_http_info(list_id, **kwargs) # noqa: E501 return data
(self, list_id, **kwargs)
58,271
sib_api_v3_sdk.api.contacts_api
get_contacts_from_list_with_http_info
Get contacts in a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_from_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread.
def get_contacts_from_list_with_http_info(self, list_id, **kwargs): # noqa: E501 """Get contacts in a list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_from_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread. """ all_params = ['list_id', 'modified_since', 'limit', 'offset', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_contacts_from_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `get_contacts_from_list`") # noqa: E501 if 'limit' in params and params['limit'] > 500: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_contacts_from_list`, must be a value less than or equal to `500`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_contacts_from_list`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] if 'modified_since' in params: query_params.append(('modifiedSince', params['modified_since'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}/contacts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetContacts', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, list_id, **kwargs)
58,272
sib_api_v3_sdk.api.contacts_api
get_contacts_with_http_info
Get all the contacts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str created_since: Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread.
def get_contacts_with_http_info(self, **kwargs): # noqa: E501 """Get all the contacts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_contacts_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str modified_since: Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str created_since: Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetContacts If the method is called asynchronously, returns the request thread. """ all_params = ['limit', 'offset', 'modified_since', 'created_since', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_contacts" % key ) params[key] = val del params['kwargs'] if 'limit' in params and params['limit'] > 1000: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_contacts`, must be a value less than or equal to `1000`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_contacts`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'modified_since' in params: query_params.append(('modifiedSince', params['modified_since'])) # noqa: E501 if 'created_since' in params: query_params.append(('createdSince', params['created_since'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetContacts', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, **kwargs)
58,273
sib_api_v3_sdk.api.contacts_api
get_folder
Returns a folder's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: id of the folder (required) :return: GetFolder If the method is called asynchronously, returns the request thread.
def get_folder(self, folder_id, **kwargs): # noqa: E501 """Returns a folder's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: id of the folder (required) :return: GetFolder If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_folder_with_http_info(folder_id, **kwargs) # noqa: E501 else: (data) = self.get_folder_with_http_info(folder_id, **kwargs) # noqa: E501 return data
(self, folder_id, **kwargs)
58,274
sib_api_v3_sdk.api.contacts_api
get_folder_lists
Get lists in a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_lists(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolderLists If the method is called asynchronously, returns the request thread.
def get_folder_lists(self, folder_id, **kwargs): # noqa: E501 """Get lists in a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_lists(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolderLists If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_folder_lists_with_http_info(folder_id, **kwargs) # noqa: E501 else: (data) = self.get_folder_lists_with_http_info(folder_id, **kwargs) # noqa: E501 return data
(self, folder_id, **kwargs)
58,275
sib_api_v3_sdk.api.contacts_api
get_folder_lists_with_http_info
Get lists in a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_lists_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolderLists If the method is called asynchronously, returns the request thread.
def get_folder_lists_with_http_info(self, folder_id, **kwargs): # noqa: E501 """Get lists in a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_lists_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: Id of the folder (required) :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolderLists If the method is called asynchronously, returns the request thread. """ all_params = ['folder_id', 'limit', 'offset', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_folder_lists" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'folder_id' is set if ('folder_id' not in params or params['folder_id'] is None): raise ValueError("Missing the required parameter `folder_id` when calling `get_folder_lists`") # noqa: E501 if 'limit' in params and params['limit'] > 50: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_folder_lists`, must be a value less than or equal to `50`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_folder_lists`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'folder_id' in params: path_params['folderId'] = params['folder_id'] # noqa: E501 query_params = [] if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders/{folderId}/lists', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetFolderLists', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, folder_id, **kwargs)
58,276
sib_api_v3_sdk.api.contacts_api
get_folder_with_http_info
Returns a folder's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: id of the folder (required) :return: GetFolder If the method is called asynchronously, returns the request thread.
def get_folder_with_http_info(self, folder_id, **kwargs): # noqa: E501 """Returns a folder's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folder_with_http_info(folder_id, async_req=True) >>> result = thread.get() :param async_req bool :param int folder_id: id of the folder (required) :return: GetFolder If the method is called asynchronously, returns the request thread. """ all_params = ['folder_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_folder" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'folder_id' is set if ('folder_id' not in params or params['folder_id'] is None): raise ValueError("Missing the required parameter `folder_id` when calling `get_folder`") # noqa: E501 collection_formats = {} path_params = {} if 'folder_id' in params: path_params['folderId'] = params['folder_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders/{folderId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetFolder', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, folder_id, **kwargs)
58,277
sib_api_v3_sdk.api.contacts_api
get_folders
Get all folders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folders(limit, offset, async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page (required) :param int offset: Index of the first document of the page (required) :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolders If the method is called asynchronously, returns the request thread.
def get_folders(self, limit, offset, **kwargs): # noqa: E501 """Get all folders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folders(limit, offset, async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page (required) :param int offset: Index of the first document of the page (required) :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolders If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_folders_with_http_info(limit, offset, **kwargs) # noqa: E501 else: (data) = self.get_folders_with_http_info(limit, offset, **kwargs) # noqa: E501 return data
(self, limit, offset, **kwargs)
58,278
sib_api_v3_sdk.api.contacts_api
get_folders_with_http_info
Get all folders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folders_with_http_info(limit, offset, async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page (required) :param int offset: Index of the first document of the page (required) :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolders If the method is called asynchronously, returns the request thread.
def get_folders_with_http_info(self, limit, offset, **kwargs): # noqa: E501 """Get all folders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_folders_with_http_info(limit, offset, async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page (required) :param int offset: Index of the first document of the page (required) :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetFolders If the method is called asynchronously, returns the request thread. """ all_params = ['limit', 'offset', 'sort'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_folders" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'limit' is set if ('limit' not in params or params['limit'] is None): raise ValueError("Missing the required parameter `limit` when calling `get_folders`") # noqa: E501 # verify the required parameter 'offset' is set if ('offset' not in params or params['offset'] is None): raise ValueError("Missing the required parameter `offset` when calling `get_folders`") # noqa: E501 if 'limit' in params and params['limit'] > 50: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_folders`, must be a value less than or equal to `50`") # noqa: E501 if 'limit' in params and params['limit'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `get_folders`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'offset' in params: query_params.append(('offset', params['offset'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/folders', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetFolders', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, limit, offset, **kwargs)
58,279
sib_api_v3_sdk.api.contacts_api
get_list
Get a list's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: GetExtendedList If the method is called asynchronously, returns the request thread.
def get_list(self, list_id, **kwargs): # noqa: E501 """Get a list's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_list(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: GetExtendedList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_list_with_http_info(list_id, **kwargs) # noqa: E501 else: (data) = self.get_list_with_http_info(list_id, **kwargs) # noqa: E501 return data
(self, list_id, **kwargs)
58,280
sib_api_v3_sdk.api.contacts_api
get_list_with_http_info
Get a list's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: GetExtendedList If the method is called asynchronously, returns the request thread.
def get_list_with_http_info(self, list_id, **kwargs): # noqa: E501 """Get a list's details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_list_with_http_info(list_id, async_req=True) >>> result = thread.get() :param async_req bool :param int list_id: Id of the list (required) :return: GetExtendedList If the method is called asynchronously, returns the request thread. """ all_params = ['list_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'list_id' is set if ('list_id' not in params or params['list_id'] is None): raise ValueError("Missing the required parameter `list_id` when calling `get_list`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['listId'] = params['list_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/contacts/lists/{listId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetExtendedList', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, list_id, **kwargs)
58,281
sib_api_v3_sdk.api.contacts_api
get_lists
Get all the lists # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_lists(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetLists If the method is called asynchronously, returns the request thread.
def get_lists(self, **kwargs): # noqa: E501 """Get all the lists # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_lists(async_req=True) >>> result = thread.get() :param async_req bool :param int limit: Number of documents per page :param int offset: Index of the first document of the page :param str sort: Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed :return: GetLists If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_lists_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_lists_with_http_info(**kwargs) # noqa: E501 return data
(self, **kwargs)