Asset

Asset

new Asset(client, properties)

Asset class
Parameters:
Name Type Description
client TDAPI
properties Object
Properties:
Name Type Description
ID Number The asset ID.
ProductModelID Number The product model ID.
ProductModelName String The name of the product model.
ManufacturerID Number The manufacturer ID.
ManufacturerName String The name of the manufacturer.
SupplierID Number The supplier ID.
SupplierName String The name of the supplier.
StatusID Number The status ID.
StatusName String The name of the status.
LocationID Number The ID of the containing location.
LocationName String The name of the containing location.
LocationRoomID Number The ID of the containing room.
LocationRoomName String The name of the containing room.
Tag String The asset tag.
SerialNumber String The serial number.
PurchaseCost Number The purchase cost.
AcquisitionDate Date The acquisition date.
ExpectedReplacementDate Date The expected replacement date.
RequestingCustomerID Guid The requesting customer ID.
RequestingCustomerName String The name of the requesting customer.
RequestingDepartmentID Number The requesting department ID.
RequestingDepartmentName String The name of the requesting department.
OwningCustomerID Guid The owning customer ID.
OwningCustomerName String The name of the owning customer.
OwningDepartmentID Number The owning department ID.
OwningDepartmentName String The name of the owning department.
ParentID Number The ID of the parent asset.
ParentSerialNumber String The serial number of the parent asset.
ParentTag String The tag of the parent asset.
MaintenanceScheduleID Number The ID of the associated maintenance schedule.
MaintenanceScheduleName String The name of the associated maintenance schedule.
ConfigurationItemID Number The ID of the associated configuration item record.
CreatedDate Date The created date.
CreatedUid Guid The UID of the creator.
CreatedFullName String The full name of the creator.
ModifiedDate Date The last modified date.
ModifiedUid Guid The UID of the last person to modify the asset.
ModifiedFullName String The full name of the last person to modify the asset.
ExternalID String The external ID. This value is used to map the asset to its representation in external sources such as third-party CMDBs.
Attributes Array.<CustomAttribute> The custom attributes associated with the asset.
Attachments Array.<Attachment> The attachments associated with the asset.
Uri String The URI to retrieve the individual asset.
Source:

Methods

addFeedEntry(feedEntry) → {Promise.<ItemUpdate>}

Adds a comment to the asset.
Parameters:
Name Type Description
feedEntry FeedEntry The item update containing the comment.
Source:
Returns:
Type
Promise.<ItemUpdate>

addResource(resourceId) → {Promise.<Object>}

Adds a resource to the asset.
Parameters:
Name Type Description
resourceId Number The resource ID.
Source:
Returns:
message
Type
Promise.<Object>

addToTicket(ticketId) → {Promise.<Object>}

Adds the asset to a ticket.
Parameters:
Name Type Description
ticketId Number The ticket ID. This must belong to an application that the user can access.
Source:
Returns:
message
Type
Promise.<Object>

getFeedEntries() → {Promise.<ItemUpdate>}

Gets the feed entries for the asset.
Source:
Returns:
Type
Promise.<ItemUpdate>

getResources() → {Promise.<ResourceItem>}

Gets the asset resources.
Source:
Returns:
Type
Promise.<ResourceItem>

removeFromTicket(ticketId) → {Promise.<Object>}

Removes the asset from a ticket.
Parameters:
Name Type Description
ticketId Number The ticket ID. This must belong to an application that the user can access.
Source:
Returns:
message
Type
Promise.<Object>

removeResource(resourceId) → {Promise.<Object>}

Removes a resource from the asset.
Parameters:
Name Type Description
resourceId Number The resource ID.
Source:
Returns:
message
Type
Promise.<Object>

update() → {Promise.<Asset>}

Updates the asset.
Source:
Returns:
Type
Promise.<Asset>