| 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 PostRecipient(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 = {
'address_name': 'str',
'address_line_1': 'str',
'address_line_2': 'str',
'address_city': 'str',
'address_state': 'str',
'address_postal_code': 'str',
'address_country': 'str',
'return_address_id': 'int',
'schedule': 'int'
}
attribute_map = {
'address_name': 'address_name',
'address_line_1': 'address_line_1',
'address_line_2': 'address_line_2',
'address_city': 'address_city',
'address_state': 'address_state',
'address_postal_code': 'address_postal_code',
'address_country': 'address_country',
'return_address_id': 'return_address_id',
'schedule': 'schedule'
}
discriminator_value_class_map = {
}
def __init__(self, address_name=None, address_line_1=None, address_line_2=None, address_city=None, address_state=None, address_postal_code=None, address_country=None, return_address_id=None, schedule=0, _configuration=None): # noqa: E501
"""PostRecipient - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._address_name = None
self._address_line_1 = None
self._address_line_2 = None
self._address_city = None
self._address_state = None
self._address_postal_code = None
self._address_country = None
self._return_address_id = None
self._schedule = None
self.discriminator = 'classType'
self.address_name = address_name
self.address_line_1 = address_line_1
if address_line_2 is not None:
self.address_line_2 = address_line_2
self.address_city = address_city
self.address_state = address_state
self.address_postal_code = address_postal_code
self.address_country = address_country
self.return_address_id = return_address_id
if schedule is not None:
self.schedule = schedule
@property
def address_name(self):
"""Gets the address_name of this PostRecipient. # noqa: E501
Name of address # noqa: E501
:return: The address_name of this PostRecipient. # noqa: E501
:rtype: str
"""
return self._address_name
@address_name.setter
def address_name(self, address_name):
"""Sets the address_name of this PostRecipient.
Name of address # noqa: E501
:param address_name: The address_name of this PostRecipient. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and address_name is None:
raise ValueError("Invalid value for `address_name`, must not be `None`") # noqa: E501
self._address_name = address_name
@property
def address_line_1(self):
"""Gets the address_line_1 of this PostRecipient. # noqa: E501
First line of address # noqa: E501
:return: The address_line_1 of this PostRecipient. # noqa: E501
:rtype: str
"""
return self._address_line_1
@address_line_1.setter
def address_line_1(self, address_line_1):
"""Sets the address_line_1 of this PostRecipient.
First line of address # noqa: E501
:param address_line_1: The address_line_1 of this PostRecipient. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and address_line_1 is None:
raise ValueError("Invalid value for `address_line_1`, must not be `None`") # noqa: E501
self._address_line_1 = address_line_1
@property
def address_line_2(self):
"""Gets the address_line_2 of this PostRecipient. # noqa: E501
Second line of address # noqa: E501
:return: The address_line_2 of this PostRecipient. # noqa: E501
:rtype: str
"""
return self._address_line_2
@address_line_2.setter
def address_line_2(self, address_line_2):
"""Sets the address_line_2 of this PostRecipient.
Second line of address # noqa: E501
:param address_line_2: The address_line_2 of this PostRecipient. # noqa: E501
:type: str
"""
self._address_line_2 = address_line_2
@property
def address_city(self):
"""Gets the address_city of this PostRecipient. # noqa: E501
City # noqa: E501
:return: The address_city of this PostRecipient. # noqa: E501
:rtype: str
"""
return self._address_city
@address_city.setter
def address_city(self, address_city):
"""Sets the address_city of this PostRecipient.
City # noqa: E501
:param address_city: The address_city of this PostRecipient. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and address_city is None:
raise ValueError("Invalid value for `address_city`, must not be `None`") # noqa: E501
self._address_city = address_city
@property
def address_state(self):
"""Gets the address_state of this PostRecipient. # noqa: E501
State # noqa: E501
:return: The address_state of this PostRecipient. # noqa: E501
:rtype: str
"""
return self._address_state
@address_state.setter
def address_state(self, address_state):
"""Sets the address_state of this PostRecipient.
State # noqa: E501
:param address_state: The address_state of this PostRecipient. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and address_state is None:
raise ValueError("Invalid value for `address_state`, must not be `None`") # noqa: E501
self._address_state = address_state
@property
def address_postal_code(self):
"""Gets the address_postal_code of this PostRecipient. # noqa: E501
Postal code # noqa: E501
:return: The address_postal_code of this PostRecipient. # noqa: E501
:rtype: str
"""
return self._address_postal_code
@address_postal_code.setter
def address_postal_code(self, address_postal_code):
"""Sets the address_postal_code of this PostRecipient.
Postal code # noqa: E501
:param address_postal_code: The address_postal_code of this PostRecipient. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and address_postal_code is None:
raise ValueError("Invalid value for `address_postal_code`, must not be `None`") # noqa: E501
self._address_postal_code = address_postal_code
@property
def address_country(self):
"""Gets the address_country of this PostRecipient. # noqa: E501
Country # noqa: E501
:return: The address_country of this PostRecipient. # noqa: E501
:rtype: str
"""
return self._address_country
@address_country.setter
def address_country(self, address_country):
"""Sets the address_country of this PostRecipient.
Country # noqa: E501
:param address_country: The address_country of this PostRecipient. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and address_country is None:
raise ValueError("Invalid value for `address_country`, must not be `None`") # noqa: E501
self._address_country = address_country
@property
def return_address_id(self):
"""Gets the return_address_id of this PostRecipient. # noqa: E501
ID of return address to use # noqa: E501
:return: The return_address_id of this PostRecipient. # noqa: E501
:rtype: int
"""
return self._return_address_id
@return_address_id.setter
def return_address_id(self, return_address_id):
"""Sets the return_address_id of this PostRecipient.
ID of return address to use # noqa: E501
:param return_address_id: The return_address_id of this PostRecipient. # noqa: E501
:type: int
"""
if self._configuration.client_side_validation and return_address_id is None:
raise ValueError("Invalid value for `return_address_id`, must not be `None`") # noqa: E501
self._return_address_id = return_address_id
@property
def schedule(self):
"""Gets the schedule of this PostRecipient. # noqa: E501
When to send letter (0/null=now) # noqa: E501
:return: The schedule of this PostRecipient. # noqa: E501
:rtype: int
"""
return self._schedule
@schedule.setter
def schedule(self, schedule):
"""Sets the schedule of this PostRecipient.
When to send letter (0/null=now) # noqa: E501
:param schedule: The schedule of this PostRecipient. # noqa: E501
:type: int
"""
self._schedule = schedule
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(PostRecipient, 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, PostRecipient):
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, PostRecipient):
return True
return self.to_dict() != other.to_dict()