SWS GetUnitData Method
Retrieves a collection of rental item data for all rental items at the site, an array of rental items at the site or a specific rental item at a site which meets the all the parameters requested.
Parameters
Name | DataType | Is Required |
---|---|---|
AccessType | Long | Optional |
Description | Filters for the numeric value of the “Access Type” custom look up as defined by the site. See eUnitAccessType for the available values. | |
Active | String | Optional |
Description | Do not use. Use the Status attribute for units that are available for rent. | |
Attribute01 | Long | Optional |
Description | Filters for the numeric value of the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. | |
Attribute02 | Long | Optional |
Description | Filters for the numeric value of the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. | |
ClassType | Long | Optional |
Description | Filters for the numeric value of the “Class” custom look up as defined by the site. See eUnitClass for the available values. | |
Climate | Long | Optional |
Description | Filters for the numeric value of the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. | |
Depth | Long | Optional |
Description | Do not use. Use the DepthDecimal parameter. | |
DepthDecimal | Decimal | Optional |
Description | The depth measurement of the rental item. Filters items to only those with this depth measurement. | |
Door | Long | Optional |
Description | Filters for the numeric value of the “Door” custom look up as defined by the site. See eUnitDoor for the available values. | |
Features | Long | Optional |
Description | Filters for the numeric value of the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. | |
Height | Long | Optional |
Description | Do not use. Use the HeightDecimal parameter. | |
HeightDecimal | Decimal | Optional |
Description | The height measurement of the rental item. Filters items to only those with this height measurement. | |
MaxRentRate | Decimal | Optional |
Description | The maximum rent rate that can be charged for the rental item. This will filter the results to those with rates equal to or less than the specified amount. | |
MinRentRate | Decimal | Optional |
Description | The minimum rent rate that can be charged for the rental item. This will filter the results to those with rates equal to or greater than the specified amount. | |
SiteID | Long | Required |
Description | The site’s ID number. | |
Status | Integer | Optional |
Description | Adds a filter that will show only unit of the specified status. Available values:
|
|
UnitID | Long | Optional |
Description | Adds a filter for a specific unit’s ID number. This is returned when you use any of the GetSiteUnitData calls and is maintained through rentals. | |
UnitIDs | Long | Optional |
Description | Adds a filter for an array of unit IDs. This is returned when you use any of the GetSiteUnitData calls and is maintained through rentals. | |
UnitNumber | String | Optional |
Description | The unit’s number as assigned by the organization. This is not the UnitID. | |
Width | Long | Optional |
Description | Do not use. Use the WidthDecimal parameter. | |
WidthDecimal | Decimal | Optional |
Description | The width measurement of the rental item. Filters items to only those with this width measurement. |
Returned Parameters
Name | DataType |
---|---|
ACCESS_TYPE | Integer |
Description | The numeric value of the “Access Type” custom look up as defined by the site. See eUnitAccessType for the available values. |
ACCESS_TYPE_VAL | String |
Description | The textual value of the “Access Type” custom look up as defined by the site. See eUnitAccessType for the available values. |
ACTIVE | Boolean |
Description | Indicates that the unit is active. Only active units should be returned regardless of the requested activity. |
ALARM | Integer |
Description | No longer used. |
ATTRIBUTE01 | Integer |
Description | The numeric value of the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. |
ATTRIBUTE01_VAL | String |
Description | The textual value of the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. |
ATTRIBUTE02 | Integer |
Description | The numeric value of the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
ATTRIBUTE02_VAL | String |
Description | The textual value of the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
CLASS_DESC | String |
Description | The textual value of the “Class” custom look up as defined by the site. See eUnitClass for the available values. |
CLASS_REF | Integer |
Description | The numeric value of the revenue class type. |
CLASS_TYPE | Integer |
Description | The numeric value of the “Class” custom look up as defined by the site. See eUnitClass for the available values. |
CLIMATE | Integer |
Description | The numeric value of the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. |
CLIMATE_VAL | String |
Description | The textual value of the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. |
DEL_MODEL_ID | Long |
Description | The delinquency schedule’s ID number. |
DEP_GROUP_ID | Long |
Description | The security deposit’s group ID number. |
DEPTH | Decimal |
Description | The depth of the rental item. |
DOOR | Integer |
Description | The numeric value of the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
DOOR_VAL | String |
Description | The textual value of the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
FEATURES | Integer |
Description | The numeric value of the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. |
FEATURES_VAL | String |
Description | The textual value of the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. |
FEE_OBJECT_ID | Long |
Description | No longer used. |
FOM_IND | String |
Description | Indicates if the unit is a first of the month rental (“Y”) or if it is anniversary (“N”). |
GATE_KEYPAD | Integer |
Description | The gate’s keypad access number assigned to the rental item. |
GP_MULTIPLIER | Decimal |
Description | No longer used. |
HEIGHT | Decimal |
Description | The height of the rental item. |
ICON | String |
Description | The URL for the site revenue class icon that displays in the Store application. |
LEASE_GROUP_ID | Long |
Description | The lease group’s ID number. |
LINK_ID | Long |
Description | No longer used. |
MUX | Integer |
Description | No longer used. |
NOTES | String |
Description | The note text for the rental item. |
OBJ_INV_FREQ | Long |
Description | The frequency of months that occur before an invoice is sent. |
OBJ_PERIOD | Long |
Description | The description for the unit of measure (UOM) type of rental cycle, currently only month. |
OBJ_PERIOD_UOM | Integer |
Description | The numeric value for the unit of measure (UOM) for the type of rental cycle. For example, 6 would indicate that 6 months is one rental cycle. |
OBJ_PERIOD_UOM_VAL | String |
Description | The description for the unit of measure (UOM) type of rental cycle. |
ORG_CLASS_ID | Long |
Description | The organization’s revenue class ID number the item belongs to. |
PORTABLE | Boolean |
Description | Indicates if the unit is portable (“True”) or not (“False”). |
RENT_RATE | Decimal |
Description | The current rent rate of the unit. |
RES_GROUP_ID | Long |
Description | The reservation group’s ID number that groups multiple rental item reservations together within an account. |
SERIAL01 | Long |
Description | No longer used. |
SERIAL02 | Long |
Description | No longer used. |
SITE_CLASS_ID | Long |
Description | The site’s revenue class ID. This record provides the basic rules of handling a rental. |
SITE_ID | Long |
Description | The site’s ID number. |
STATUS | Integer |
Description | The numeric value of the status attribute for the rental. |
STATUS_VAL | String |
Description | The textual value of the status attribute for the rental. |
TAX_GROUP_ID | Long |
Description | The tax group’s ID number. |
UNIT_ID | Long |
Description | The unit’s ID number. This is maintained through rentals. |
UNIT_NUMBER | String |
Description | The unit’s number as assigned by the organization. This is not the UnitID. |
VERSION | Decimal |
Description | The unit’s version number which serves to prevent duplicate use of the unit. |
VOL_EXEMPT | Boolean |
Description | Indicates if the unit is listed as non-dimensional (“True”) or not (“False”). |
VOLUME | Decimal |
Description | The total volume of the rental item. |
WALK_THRU_ORDER | Integer |
Description | The number indicating the order in which the units are inspected. |
WIDTH | Decimal |
Description | The width of the rental item. |
Example
As with every method we need to pass in credentials. We do this with the LookupUser request object.
We’ll assume you’ve got a web reference, let’s name it SWS, in your Visual Studio project. At this point we need to our objects. We’ll need the standard service object, a GetUnitData request object and a GetUnitData response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetUnitData_Request request = new SWS.GetUnitData_Request();
SWS.GetUnitData_Response response;
Here’s sample code of the Request object for all available units for a site.
// GetUnitData Request
request.SiteID = 123456;
request.Status = 1;
Finally we can call the method and pass across the login object and the request object to get our unit data. It’s a good idea to do this in a Try Catch block.
// Call the method that will load the response object
try
{
response = service.GetUnitData(user_request, request);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Note that if something goes wrong the service will respond with an exception. You’ll want to take a look at that message returned in that exception so it can be debugged.
For a full list of methods see SWS Methods.