/home/desid573/public_html/angel/payment/xero/lib/Models/Accounting
Edit: /home/desid573/public_html/angel/payment/xero/lib/Models/Accounting/BrandingTheme.php (10877B)
'string',
'name' => 'string',
'logo_url' => 'string',
'type' => 'string',
'sort_order' => 'int',
'created_date_utc' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'branding_theme_id' => 'uuid',
'name' => null,
'logo_url' => null,
'type' => null,
'sort_order' => null,
'created_date_utc' => 'date-time'
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'branding_theme_id' => 'BrandingThemeID',
'name' => 'Name',
'logo_url' => 'LogoUrl',
'type' => 'Type',
'sort_order' => 'SortOrder',
'created_date_utc' => 'CreatedDateUTC'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'branding_theme_id' => 'setBrandingThemeId',
'name' => 'setName',
'logo_url' => 'setLogoUrl',
'type' => 'setType',
'sort_order' => 'setSortOrder',
'created_date_utc' => 'setCreatedDateUtc'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'branding_theme_id' => 'getBrandingThemeId',
'name' => 'getName',
'logo_url' => 'getLogoUrl',
'type' => 'getType',
'sort_order' => 'getSortOrder',
'created_date_utc' => 'getCreatedDateUtc'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
const TYPE_INVOICE = 'INVOICE';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [
self::TYPE_INVOICE,
];
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['branding_theme_id'] = isset($data['branding_theme_id']) ? $data['branding_theme_id'] : null;
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['logo_url'] = isset($data['logo_url']) ? $data['logo_url'] : null;
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
$this->container['sort_order'] = isset($data['sort_order']) ? $data['sort_order'] : null;
$this->container['created_date_utc'] = isset($data['created_date_utc']) ? $data['created_date_utc'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
$allowedValues = $this->getTypeAllowableValues();
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value for 'type', must be one of '%s'",
implode("', '", $allowedValues)
);
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets branding_theme_id
*
* @return string|null
*/
public function getBrandingThemeId()
{
return $this->container['branding_theme_id'];
}
/**
* Sets branding_theme_id
*
* @param string|null $branding_theme_id Xero identifier
*
* @return $this
*/
public function setBrandingThemeId($branding_theme_id)
{
$this->container['branding_theme_id'] = $branding_theme_id;
return $this;
}
/**
* Gets name
*
* @return string|null
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string|null $name Name of branding theme
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets logo_url
*
* @return string|null
*/
public function getLogoUrl()
{
return $this->container['logo_url'];
}
/**
* Sets logo_url
*
* @param string|null $logo_url The location of the image file used as the logo on this branding theme
*
* @return $this
*/
public function setLogoUrl($logo_url)
{
$this->container['logo_url'] = $logo_url;
return $this;
}
/**
* Gets type
*
* @return string|null
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string|null $type Always INVOICE
*
* @return $this
*/
public function setType($type)
{
$allowedValues = $this->getTypeAllowableValues();
if (!is_null($type) && !in_array($type, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'type', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets sort_order
*
* @return int|null
*/
public function getSortOrder()
{
return $this->container['sort_order'];
}
/**
* Sets sort_order
*
* @param int|null $sort_order Integer – ranked order of branding theme. The default branding theme has a value of 0
*
* @return $this
*/
public function setSortOrder($sort_order)
{
$this->container['sort_order'] = $sort_order;
return $this;
}
/**
* Gets created_date_utc
*
* @return \DateTime|null
*/
public function getCreatedDateUtc()
{
return $this->container['created_date_utc'];
}
/**
* Sets created_date_utc
*
* @param \DateTime|null $created_date_utc UTC timestamp of creation date of branding theme
*
* @return $this
*/
public function setCreatedDateUtc($created_date_utc)
{
$this->container['created_date_utc'] = $created_date_utc;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
AccountingObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}