/home/desid573/public_html/angel/payment/xero/lib/Models/Accounting
NameSizeModeActions
Account.php293160644editdlrm
Accounts.php62520644editdlrm
AccountsPayable.php68850644editdlrm
AccountsReceivable.php68970644editdlrm
AccountType.php26310644editdlrm
Address.php182000644editdlrm
Allocation.php78690644editdlrm
Allocations.php63360644editdlrm
Attachment.php98340644editdlrm
Attachments.php63360644editdlrm
Balances.php76310644editdlrm
BankTransaction.php267100644editdlrm
BankTransactions.php64920644editdlrm
BankTransfer.php153720644editdlrm
BankTransfers.php64080644editdlrm
BatchPayment.php218690644editdlrm
BatchPaymentDetails.php115500644editdlrm
BatchPayments.php64080644editdlrm
Bill.php67410644editdlrm
BrandingTheme.php108770644editdlrm
BrandingThemes.php64360644editdlrm
CISOrgSetting.php81840644editdlrm
CISSetting.php69430644editdlrm
CISSettings.php63520644editdlrm
Contact.php447110644editdlrm
ContactGroup.php98160644editdlrm
ContactGroups.php64080644editdlrm
ContactPerson.php85870644editdlrm
Contacts.php62520644editdlrm
CountryCode.php114890644editdlrm
CreditNote.php267520644editdlrm
CreditNotes.php63520644editdlrm
Currencies.php63050644editdlrm
Currency.php69140644editdlrm
CurrencyCode.php86970644editdlrm
Element.php64720644editdlrm
Employee.php122280644editdlrm
Employees.php62800644editdlrm
Error.php82660644editdlrm
ExpenseClaim.php160790644editdlrm
ExpenseClaims.php64080644editdlrm
ExternalLink.php88740644editdlrm
HistoryRecord.php81170644editdlrm
HistoryRecords.php64360644editdlrm
Invoice.php398590644editdlrm
InvoiceReminder.php61530644editdlrm
InvoiceReminders.php64920644editdlrm
Invoices.php62520644editdlrm
Item.php206830644editdlrm
Items.php61680644editdlrm
Journal.php151850644editdlrm
JournalLine.php149770644editdlrm
Journals.php62520644editdlrm
LineAmountTypes.php14700644editdlrm
LineItem.php163240644editdlrm
LineItemTracking.php81400644editdlrm
LinkedTransaction.php197930644editdlrm
LinkedTransactions.php65480644editdlrm
ManualJournal.php178380644editdlrm
ManualJournalLine.php108100644editdlrm
ManualJournals.php64360644editdlrm
ModelInterface.php21090644editdlrm
OnlineInvoice.php63680644editdlrm
OnlineInvoices.php64360644editdlrm
Organisation.php463360644editdlrm
Organisations.php63920644editdlrm
Overpayment.php220120644editdlrm
Overpayments.php63640644editdlrm
Payment.php270610644editdlrm
Payments.php62520644editdlrm
PaymentService.php110110644editdlrm
PaymentServices.php64640644editdlrm
PaymentTerm.php68910644editdlrm
PaymentTermType.php15110644editdlrm
Phone.php114050644editdlrm
Prepayment.php212630644editdlrm
Prepayments.php63360644editdlrm
Purchase.php87790644editdlrm
PurchaseOrder.php306740644editdlrm
PurchaseOrders.php64360644editdlrm
Quote.php249590644editdlrm
Quotes.php61960644editdlrm
QuoteStatusCodes.php14960644editdlrm
Receipt.php202930644editdlrm
Receipts.php62520644editdlrm
RepeatingInvoice.php200560644editdlrm
RepeatingInvoices.php65200644editdlrm
Report.php118650644editdlrm
ReportAttribute.php66460644editdlrm
ReportCell.php69320644editdlrm
ReportFields.php74890644editdlrm
ReportRow.php75800644editdlrm
ReportRows.php82890644editdlrm
Reports.php62240644editdlrm
ReportWithRow.php123230644editdlrm
ReportWithRows.php62730644editdlrm
RequestEmpty.php61610644editdlrm
RowType.php13720644editdlrm
SalesTrackingCategory.php74520644editdlrm
Schedule.php132510644editdlrm
TaxComponent.php84120644editdlrm
TaxRate.php211870644editdlrm
TaxRates.php62680644editdlrm
TaxType.php46530644editdlrm
TenNinteyNineContact.php195430644editdlrm
TimeZone.php115220644editdlrm
TrackingCategories.php65450644editdlrm
TrackingCategory.php122570644editdlrm
TrackingOption.php102690644editdlrm
TrackingOptions.php62800644editdlrm
User.php126460644editdlrm
Users.php61680644editdlrm
ValidationError.php61620644editdlrm
Edit: /home/desid573/public_html/angel/payment/xero/lib/Models/Accounting/Item.php (20683B)
'string', 'inventory_asset_account_code' => 'string', 'name' => 'string', 'is_sold' => 'bool', 'is_purchased' => 'bool', 'description' => 'string', 'purchase_description' => 'string', 'purchase_details' => '\XeroAPI\XeroPHP\Models\Accounting\Purchase', 'sales_details' => '\XeroAPI\XeroPHP\Models\Accounting\Purchase', 'is_tracked_as_inventory' => 'bool', 'total_cost_pool' => 'double', 'quantity_on_hand' => 'double', 'updated_date_utc' => '\DateTime', 'item_id' => 'string', 'validation_errors' => '\XeroAPI\XeroPHP\Models\Accounting\ValidationError[]' ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $openAPIFormats = [ 'code' => null, 'inventory_asset_account_code' => null, 'name' => null, 'is_sold' => null, 'is_purchased' => null, 'description' => null, 'purchase_description' => null, 'purchase_details' => null, 'sales_details' => null, 'is_tracked_as_inventory' => null, 'total_cost_pool' => 'double', 'quantity_on_hand' => 'double', 'updated_date_utc' => 'date-time', 'item_id' => 'uuid', 'validation_errors' => null ]; /** * 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 = [ 'code' => 'Code', 'inventory_asset_account_code' => 'InventoryAssetAccountCode', 'name' => 'Name', 'is_sold' => 'IsSold', 'is_purchased' => 'IsPurchased', 'description' => 'Description', 'purchase_description' => 'PurchaseDescription', 'purchase_details' => 'PurchaseDetails', 'sales_details' => 'SalesDetails', 'is_tracked_as_inventory' => 'IsTrackedAsInventory', 'total_cost_pool' => 'TotalCostPool', 'quantity_on_hand' => 'QuantityOnHand', 'updated_date_utc' => 'UpdatedDateUTC', 'item_id' => 'ItemID', 'validation_errors' => 'ValidationErrors' ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'code' => 'setCode', 'inventory_asset_account_code' => 'setInventoryAssetAccountCode', 'name' => 'setName', 'is_sold' => 'setIsSold', 'is_purchased' => 'setIsPurchased', 'description' => 'setDescription', 'purchase_description' => 'setPurchaseDescription', 'purchase_details' => 'setPurchaseDetails', 'sales_details' => 'setSalesDetails', 'is_tracked_as_inventory' => 'setIsTrackedAsInventory', 'total_cost_pool' => 'setTotalCostPool', 'quantity_on_hand' => 'setQuantityOnHand', 'updated_date_utc' => 'setUpdatedDateUtc', 'item_id' => 'setItemId', 'validation_errors' => 'setValidationErrors' ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'code' => 'getCode', 'inventory_asset_account_code' => 'getInventoryAssetAccountCode', 'name' => 'getName', 'is_sold' => 'getIsSold', 'is_purchased' => 'getIsPurchased', 'description' => 'getDescription', 'purchase_description' => 'getPurchaseDescription', 'purchase_details' => 'getPurchaseDetails', 'sales_details' => 'getSalesDetails', 'is_tracked_as_inventory' => 'getIsTrackedAsInventory', 'total_cost_pool' => 'getTotalCostPool', 'quantity_on_hand' => 'getQuantityOnHand', 'updated_date_utc' => 'getUpdatedDateUtc', 'item_id' => 'getItemId', 'validation_errors' => 'getValidationErrors' ]; /** * 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; } /** * 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['code'] = isset($data['code']) ? $data['code'] : null; $this->container['inventory_asset_account_code'] = isset($data['inventory_asset_account_code']) ? $data['inventory_asset_account_code'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['is_sold'] = isset($data['is_sold']) ? $data['is_sold'] : null; $this->container['is_purchased'] = isset($data['is_purchased']) ? $data['is_purchased'] : null; $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['purchase_description'] = isset($data['purchase_description']) ? $data['purchase_description'] : null; $this->container['purchase_details'] = isset($data['purchase_details']) ? $data['purchase_details'] : null; $this->container['sales_details'] = isset($data['sales_details']) ? $data['sales_details'] : null; $this->container['is_tracked_as_inventory'] = isset($data['is_tracked_as_inventory']) ? $data['is_tracked_as_inventory'] : null; $this->container['total_cost_pool'] = isset($data['total_cost_pool']) ? $data['total_cost_pool'] : null; $this->container['quantity_on_hand'] = isset($data['quantity_on_hand']) ? $data['quantity_on_hand'] : null; $this->container['updated_date_utc'] = isset($data['updated_date_utc']) ? $data['updated_date_utc'] : null; $this->container['item_id'] = isset($data['item_id']) ? $data['item_id'] : null; $this->container['validation_errors'] = isset($data['validation_errors']) ? $data['validation_errors'] : null; } /** * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { $invalidProperties = []; if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } if ((mb_strlen($this->container['code']) > 30)) { $invalidProperties[] = "invalid value for 'code', the character length must be smaller than or equal to 30."; } if ($this->container['inventory_asset_account_code'] === null) { $invalidProperties[] = "'inventory_asset_account_code' can't be null"; } if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 50)) { $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; } if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 4000)) { $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 4000."; } if (!is_null($this->container['purchase_description']) && (mb_strlen($this->container['purchase_description']) > 4000)) { $invalidProperties[] = "invalid value for 'purchase_description', the character length must be smaller than or equal to 4000."; } 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 code * * @return string */ public function getCode() { return $this->container['code']; } /** * Sets code * * @param string $code User defined item code (max length = 30) * * @return $this */ public function setCode($code) { if ((mb_strlen($code) > 30)) { throw new \InvalidArgumentException('invalid length for $code when calling Item., must be smaller than or equal to 30.'); } $this->container['code'] = $code; return $this; } /** * Gets inventory_asset_account_code * * @return string */ public function getInventoryAssetAccountCode() { return $this->container['inventory_asset_account_code']; } /** * Sets inventory_asset_account_code * * @param string $inventory_asset_account_code The inventory asset account for the item. The account must be of type INVENTORY. The COGSAccountCode in PurchaseDetails is also required to create a tracked item * * @return $this */ public function setInventoryAssetAccountCode($inventory_asset_account_code) { $this->container['inventory_asset_account_code'] = $inventory_asset_account_code; return $this; } /** * Gets name * * @return string|null */ public function getName() { return $this->container['name']; } /** * Sets name * * @param string|null $name The name of the item (max length = 50) * * @return $this */ public function setName($name) { if (!is_null($name) && (mb_strlen($name) > 50)) { throw new \InvalidArgumentException('invalid length for $name when calling Item., must be smaller than or equal to 50.'); } $this->container['name'] = $name; return $this; } /** * Gets is_sold * * @return bool|null */ public function getIsSold() { return $this->container['is_sold']; } /** * Sets is_sold * * @param bool|null $is_sold Boolean value, defaults to true. When IsSold is true the item will be available on sales transactions in the Xero UI. If IsSold is updated to false then Description and SalesDetails values will be nulled. * * @return $this */ public function setIsSold($is_sold) { $this->container['is_sold'] = $is_sold; return $this; } /** * Gets is_purchased * * @return bool|null */ public function getIsPurchased() { return $this->container['is_purchased']; } /** * Sets is_purchased * * @param bool|null $is_purchased Boolean value, defaults to true. When IsPurchased is true the item is available for purchase transactions in the Xero UI. If IsPurchased is updated to false then PurchaseDescription and PurchaseDetails values will be nulled. * * @return $this */ public function setIsPurchased($is_purchased) { $this->container['is_purchased'] = $is_purchased; return $this; } /** * Gets description * * @return string|null */ public function getDescription() { return $this->container['description']; } /** * Sets description * * @param string|null $description The sales description of the item (max length = 4000) * * @return $this */ public function setDescription($description) { if (!is_null($description) && (mb_strlen($description) > 4000)) { throw new \InvalidArgumentException('invalid length for $description when calling Item., must be smaller than or equal to 4000.'); } $this->container['description'] = $description; return $this; } /** * Gets purchase_description * * @return string|null */ public function getPurchaseDescription() { return $this->container['purchase_description']; } /** * Sets purchase_description * * @param string|null $purchase_description The purchase description of the item (max length = 4000) * * @return $this */ public function setPurchaseDescription($purchase_description) { if (!is_null($purchase_description) && (mb_strlen($purchase_description) > 4000)) { throw new \InvalidArgumentException('invalid length for $purchase_description when calling Item., must be smaller than or equal to 4000.'); } $this->container['purchase_description'] = $purchase_description; return $this; } /** * Gets purchase_details * * @return \XeroAPI\XeroPHP\Models\Accounting\Purchase|null */ public function getPurchaseDetails() { return $this->container['purchase_details']; } /** * Sets purchase_details * * @param \XeroAPI\XeroPHP\Models\Accounting\Purchase|null $purchase_details purchase_details * * @return $this */ public function setPurchaseDetails($purchase_details) { $this->container['purchase_details'] = $purchase_details; return $this; } /** * Gets sales_details * * @return \XeroAPI\XeroPHP\Models\Accounting\Purchase|null */ public function getSalesDetails() { return $this->container['sales_details']; } /** * Sets sales_details * * @param \XeroAPI\XeroPHP\Models\Accounting\Purchase|null $sales_details sales_details * * @return $this */ public function setSalesDetails($sales_details) { $this->container['sales_details'] = $sales_details; return $this; } /** * Gets is_tracked_as_inventory * * @return bool|null */ public function getIsTrackedAsInventory() { return $this->container['is_tracked_as_inventory']; } /** * Sets is_tracked_as_inventory * * @param bool|null $is_tracked_as_inventory True for items that are tracked as inventory. An item will be tracked as inventory if the InventoryAssetAccountCode and COGSAccountCode are set. * * @return $this */ public function setIsTrackedAsInventory($is_tracked_as_inventory) { $this->container['is_tracked_as_inventory'] = $is_tracked_as_inventory; return $this; } /** * Gets total_cost_pool * * @return double|null */ public function getTotalCostPool() { return $this->container['total_cost_pool']; } /** * Sets total_cost_pool * * @param double|null $total_cost_pool The value of the item on hand. Calculated using average cost accounting. * * @return $this */ public function setTotalCostPool($total_cost_pool) { $this->container['total_cost_pool'] = $total_cost_pool; return $this; } /** * Gets quantity_on_hand * * @return double|null */ public function getQuantityOnHand() { return $this->container['quantity_on_hand']; } /** * Sets quantity_on_hand * * @param double|null $quantity_on_hand The quantity of the item on hand * * @return $this */ public function setQuantityOnHand($quantity_on_hand) { $this->container['quantity_on_hand'] = $quantity_on_hand; return $this; } /** * Gets updated_date_utc * * @return \DateTime|null */ public function getUpdatedDateUtc() { return $this->container['updated_date_utc']; } /** * Sets updated_date_utc * * @param \DateTime|null $updated_date_utc Last modified date in UTC format * * @return $this */ public function setUpdatedDateUtc($updated_date_utc) { $this->container['updated_date_utc'] = $updated_date_utc; return $this; } /** * Gets item_id * * @return string|null */ public function getItemId() { return $this->container['item_id']; } /** * Sets item_id * * @param string|null $item_id The Xero identifier for an Item * * @return $this */ public function setItemId($item_id) { $this->container['item_id'] = $item_id; return $this; } /** * Gets validation_errors * * @return \XeroAPI\XeroPHP\Models\Accounting\ValidationError[]|null */ public function getValidationErrors() { return $this->container['validation_errors']; } /** * Sets validation_errors * * @param \XeroAPI\XeroPHP\Models\Accounting\ValidationError[]|null $validation_errors Displays array of validation error messages from the API * * @return $this */ public function setValidationErrors($validation_errors) { $this->container['validation_errors'] = $validation_errors; 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 ); } }