new Location(client, properties)
Location class
Parameters:
Name | Type | Description |
---|---|---|
client |
TDAPI | The TDAPI client the location belongs to. |
properties |
Object | The properties to be initialized on the Location object (see: Properties). |
Properties:
Name | Type | Description |
---|---|---|
ID |
Number | The location ID. |
Name |
String | The location name. |
Description |
String | The description. |
ExternalID |
String | The external identifier for the location. |
IsActive |
Boolean | The active status. |
Address |
String | The address. |
City |
String | The city. |
State |
String | The state/province. |
PostalCode |
String | The postal code. |
Country |
String | The country. |
IsRoomRequired |
Boolean | A value indicating whether the location requires a room when specified for an asset. |
AssetsAcount |
Number | The number of assets associated with this location. |
TicketsCount |
Number | The number of tickets associated with this location. |
RoomsCount |
Number | The number of rooms associated with this location. |
Rooms |
Array.<LocationRoom> | The rooms associated with this location. |
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 location. |
ModifiedFullName |
String | The full name of the last person to modify the location. |
Latitude |
Number | null | The latitude of the location. |
Longitude |
Number | null | The longitude of the location. |
- Source:
Methods
createRoom(room) → {Promise.<LocationRoom>}
Creates a room in the location.
Parameters:
Name | Type | Description |
---|---|---|
room |
LocationRoom | The room to add to the location. |
- Source:
Returns:
room
- Type
- Promise.<LocationRoom>
deleteRoom(roomId) → {Promise.<Object>}
Deletes a room in the location.
Parameters:
Name | Type | Description |
---|---|---|
roomId |
Number | The ID of the room to delete. |
- Source:
Returns:
message
- Type
- Promise.<Object>
edit() → {Promise.<Location>}
Edits the location.
- Source:
Returns:
location
- Type
- Promise.<Location>
editRoom(roomId) → {Promise.<LocationRoom>}
Edits the specified room in the location.
Parameters:
Name | Type | Description |
---|---|---|
roomId |
Number | The ID of the room to edit. |
- Source:
Returns:
room
- Type
- Promise.<LocationRoom>