| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/clicksend_client/models/ |
Upload File : |
# coding: utf-8
"""
ClickSend v3 API
This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..* # noqa: E501
OpenAPI spec version: 3.1
Contact: support@clicksend.com
Generated by: https://github.com/clicksend-api/clicksend-codegen.git
"""
import pprint
import re # noqa: F401
import six
from clicksend_client.configuration import Configuration
class Subaccount(object):
"""NOTE: This class is auto generated by the clicksend code generator program.
Do not edit the class manually.
"""
"""
Attributes:
clicksend_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.
"""
clicksend_types = {
'api_username': 'str',
'password': 'str',
'email': 'str',
'phone_number': 'str',
'first_name': 'str',
'last_name': 'str',
'access_users': 'int',
'access_billing': 'int',
'access_reporting': 'int',
'access_contacts': 'int',
'access_settings': 'int'
}
attribute_map = {
'api_username': 'api_username',
'password': 'password',
'email': 'email',
'phone_number': 'phone_number',
'first_name': 'first_name',
'last_name': 'last_name',
'access_users': 'access_users',
'access_billing': 'access_billing',
'access_reporting': 'access_reporting',
'access_contacts': 'access_contacts',
'access_settings': 'access_settings'
}
discriminator_value_class_map = {
}
def __init__(self, api_username=None, password=None, email=None, phone_number=None, first_name=None, last_name=None, access_users=1, access_billing=1, access_reporting=1, access_contacts=0, access_settings=1, _configuration=None): # noqa: E501
"""Subaccount - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._api_username = None
self._password = None
self._email = None
self._phone_number = None
self._first_name = None
self._last_name = None
self._access_users = None
self._access_billing = None
self._access_reporting = None
self._access_contacts = None
self._access_settings = None
self.discriminator = 'classType'
self.api_username = api_username
self.password = password
self.email = email
self.phone_number = phone_number
self.first_name = first_name
self.last_name = last_name
if access_users is not None:
self.access_users = access_users
if access_billing is not None:
self.access_billing = access_billing
if access_reporting is not None:
self.access_reporting = access_reporting
if access_contacts is not None:
self.access_contacts = access_contacts
if access_settings is not None:
self.access_settings = access_settings
@property
def api_username(self):
"""Gets the api_username of this Subaccount. # noqa: E501
Your new api username. # noqa: E501
:return: The api_username of this Subaccount. # noqa: E501
:rtype: str
"""
return self._api_username
@api_username.setter
def api_username(self, api_username):
"""Sets the api_username of this Subaccount.
Your new api username. # noqa: E501
:param api_username: The api_username of this Subaccount. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and api_username is None:
raise ValueError("Invalid value for `api_username`, must not be `None`") # noqa: E501
self._api_username = api_username
@property
def password(self):
"""Gets the password of this Subaccount. # noqa: E501
Your new password # noqa: E501
:return: The password of this Subaccount. # noqa: E501
:rtype: str
"""
return self._password
@password.setter
def password(self, password):
"""Sets the password of this Subaccount.
Your new password # noqa: E501
:param password: The password of this Subaccount. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and password is None:
raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501
self._password = password
@property
def email(self):
"""Gets the email of this Subaccount. # noqa: E501
Your new email. # noqa: E501
:return: The email of this Subaccount. # noqa: E501
:rtype: str
"""
return self._email
@email.setter
def email(self, email):
"""Sets the email of this Subaccount.
Your new email. # noqa: E501
:param email: The email of this Subaccount. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and email is None:
raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501
self._email = email
@property
def phone_number(self):
"""Gets the phone_number of this Subaccount. # noqa: E501
Your phone number in E.164 format. # noqa: E501
:return: The phone_number of this Subaccount. # noqa: E501
:rtype: str
"""
return self._phone_number
@phone_number.setter
def phone_number(self, phone_number):
"""Sets the phone_number of this Subaccount.
Your phone number in E.164 format. # noqa: E501
:param phone_number: The phone_number of this Subaccount. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and phone_number is None:
raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501
self._phone_number = phone_number
@property
def first_name(self):
"""Gets the first_name of this Subaccount. # noqa: E501
Your firstname # noqa: E501
:return: The first_name of this Subaccount. # noqa: E501
:rtype: str
"""
return self._first_name
@first_name.setter
def first_name(self, first_name):
"""Sets the first_name of this Subaccount.
Your firstname # noqa: E501
:param first_name: The first_name of this Subaccount. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and first_name is None:
raise ValueError("Invalid value for `first_name`, must not be `None`") # noqa: E501
self._first_name = first_name
@property
def last_name(self):
"""Gets the last_name of this Subaccount. # noqa: E501
Your lastname # noqa: E501
:return: The last_name of this Subaccount. # noqa: E501
:rtype: str
"""
return self._last_name
@last_name.setter
def last_name(self, last_name):
"""Sets the last_name of this Subaccount.
Your lastname # noqa: E501
:param last_name: The last_name of this Subaccount. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and last_name is None:
raise ValueError("Invalid value for `last_name`, must not be `None`") # noqa: E501
self._last_name = last_name
@property
def access_users(self):
"""Gets the access_users of this Subaccount. # noqa: E501
Your access users flag value, must be 1 or 0. # noqa: E501
:return: The access_users of this Subaccount. # noqa: E501
:rtype: int
"""
return self._access_users
@access_users.setter
def access_users(self, access_users):
"""Sets the access_users of this Subaccount.
Your access users flag value, must be 1 or 0. # noqa: E501
:param access_users: The access_users of this Subaccount. # noqa: E501
:type: int
"""
self._access_users = access_users
@property
def access_billing(self):
"""Gets the access_billing of this Subaccount. # noqa: E501
Your access billing flag value, must be 1 or 0. # noqa: E501
:return: The access_billing of this Subaccount. # noqa: E501
:rtype: int
"""
return self._access_billing
@access_billing.setter
def access_billing(self, access_billing):
"""Sets the access_billing of this Subaccount.
Your access billing flag value, must be 1 or 0. # noqa: E501
:param access_billing: The access_billing of this Subaccount. # noqa: E501
:type: int
"""
self._access_billing = access_billing
@property
def access_reporting(self):
"""Gets the access_reporting of this Subaccount. # noqa: E501
Your access reporting flag value, must be 1 or 0. # noqa: E501
:return: The access_reporting of this Subaccount. # noqa: E501
:rtype: int
"""
return self._access_reporting
@access_reporting.setter
def access_reporting(self, access_reporting):
"""Sets the access_reporting of this Subaccount.
Your access reporting flag value, must be 1 or 0. # noqa: E501
:param access_reporting: The access_reporting of this Subaccount. # noqa: E501
:type: int
"""
self._access_reporting = access_reporting
@property
def access_contacts(self):
"""Gets the access_contacts of this Subaccount. # noqa: E501
Your access contacts flag value, must be 1 or 0. # noqa: E501
:return: The access_contacts of this Subaccount. # noqa: E501
:rtype: int
"""
return self._access_contacts
@access_contacts.setter
def access_contacts(self, access_contacts):
"""Sets the access_contacts of this Subaccount.
Your access contacts flag value, must be 1 or 0. # noqa: E501
:param access_contacts: The access_contacts of this Subaccount. # noqa: E501
:type: int
"""
self._access_contacts = access_contacts
@property
def access_settings(self):
"""Gets the access_settings of this Subaccount. # noqa: E501
Your access settings flag value, must be 1 or 0. # noqa: E501
:return: The access_settings of this Subaccount. # noqa: E501
:rtype: int
"""
return self._access_settings
@access_settings.setter
def access_settings(self, access_settings):
"""Sets the access_settings of this Subaccount.
Your access settings flag value, must be 1 or 0. # noqa: E501
:param access_settings: The access_settings of this Subaccount. # noqa: E501
:type: int
"""
self._access_settings = access_settings
def get_real_child_model(self, data):
"""Returns the real base class specified by the discriminator"""
discriminator_value = data[self.discriminator].lower()
return self.discriminator_value_class_map.get(discriminator_value)
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.clicksend_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(Subaccount, 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, Subaccount):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, Subaccount):
return True
return self.to_dict() != other.to_dict()