Home > API General, Rental/Reservation > SWS2 GetSiteUnitDataStatus Method

SWS2 GetSiteUnitDataStatus Method


Retrieve all the units from the site with their full data and current status.

Parameters

Name Data Type Is Required
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.

Returned Parameters

Name Data Type
SITE_ID Long
Description The site’s ID number.
CLASS_DESC String
Description The textual value of the revenue class to which the unit belongs.
SITE_CLASS_ID Long
Description The revenue classes ID number.
OBJECT_GROUP Integer
Description Not currently used.
UNIT_ID Long
Description The unit’s ID number. This is maintained through rentals.
RENT_RATE Decimal
Description The current rate at which the unit should be rented.
PUSH_RATE Decimal
Description The lowest rate that is available for the unit. Usually this rate has restrictions, set up by the site, on when it can be used.
STREET_RATE Decimal
Description The default rate of the unit. This is usually the rate at which a unit will be rented when the current tenant moves out.
RACK_RATE Decimal
Description The highest rate available on a unit. This usually has restrictions, set up by the site, on when it can be used.
FUTURE_RATE Decimal
Description If a rate change has been scheduled for the unit, this will be the rate to which it will change.
PROFORMA_RATE Decimal
Description This is used as a goal or base rate.
MIN_RENT_RATE Decimal
Description The minimum rate, set by the site, for a which a unit can be rented.
MAX_RENT_RATE Decimal
Description The maximum rate, set by the site, for which a unit can be rented.
STATUS Integer
Description The numeric value for the “Status” custom look up as defined by the site. See eUnitStatus for the available values.
WIDTH Decimal
Description The width measurment of the unit.
DEPTH Decimal
Description The depth measurement of the unit.
HEIGHT Decimal
Description The height measurement of the unit.
SQUARE_FEET Decimal
Description The area of the unit. This is calculated by multiplying the WIDTH times the DEPTH.
VOLUME Decimal
Description The volume of the unit. This is calculated by multiplying the WIDTH, DEPTH and HEIGHT.
ATTRIBUTE01 Integer
Description The numeric value for the “Attribute01” custom look up as defined by the site.
ATTRIBUTE01_VAL String
Description  The textual value for the “Attribute01” custom look up as defined by the site.
ATTRIBUTE02 Integer
Description The numeric value for the “Attribute02” custom look up as defined by the site.
ATTRIBUTE02_VAL String
Description The textual value for the “Attribute02” custom lookup as defined by the site.
CLIMATE Integer
Description The numeric value for the “Climate” custom look up as defined by the site.
CLIMATE_VAL String
Description The textual value for the “Climate” custom lookup as defined by the site.
DOOR Integer
Description The numeric value for the “Door” custom look up as defined by the site.
DOOR_VAL String
Description The textual value for the “Door” custom lookup as defined by the site.
ACCESS_TYPE Integer
Description The numeric value for the “AccessType” custom look up as defined by the site.
ACCESS_TYPE_VAL String
Description The textual value for the “AccessType” custom lookup as defined by the site.
FEATURES Integer
Description The numeric value for the “Features” custom look up as defined by the site.
FEATURES_VAL String
Description The textual value for the “Features” custom lookup as defined by the site.
RESERVATION_DEPOSIT Decimal
Description The amount required to hold a reservation.
TOTAL_UNITS Integer
Description The total number of units of this type.
NUM_STATUS_AVAILABLE Integer
Description The number of units of this type that are available.
NUM_STATUS_RESERVED Integer
Description The number of units of this type that are set aside for reservations.
NUM_STATUS_RENTED Integer
Description The number of units of this type that are currently rented.
NUM_STATUS_COMP_USE Integer
Description The number of units of this type that are set aside for the companies use.
NUM_STATUS_UNAVAIL_DAMAGED Integer
Description The number of units of this type that are not rentable due to damage.
NUM_STATUS_UNAVAIL_PERM Integer
Description The number of units of this type that are set as not available permanently. Usually this is used for a non-existant unit.
NUM_STATUS_OTHER Integer
Description The number of units of this type that are set to other status determined by the site.
NUM_STATUS_UNAVAIL_HOLD Integer
Description The number of units of this type that are set to unavailable hold. This is often used for a unit that was terminated but still has items to be removed.
NUM_STATUS_AVAIL_HOLD Integer
Description The number of units of this type that are set to available hold. This status is used by the system to hold a unit during the move in process.
VERSION Integer
Description The unit’s version number which serves to prevent duplicate use of the unit.

Example

We’ll assume you’ve got a web reference, let’s name it Store, in your Visual Studio project. At this point we need to reference our objects. We’ll need the standard service object, a GetSiteUnitDataStatus_Request request object. We can define and create those like this:

// Create a request and response objects
StoreServiceClient client = new StoreServiceClient();
GetSiteUnitDataStatus_Request request = new GetSiteUnitDataStatus_Request();

As with every method we need to pass in credentials. We also set up the parameters for our request.

client.ChannelFactory.Credentials.UserName.UserName = "user";
client.ChannelFactory.Credentials.UserName.Password = "pass";
client.ChannelFactory.Credentials.SupportInteractive = true;

request.SiteID = 123456;

Finally we can call the method and pass across the login object and the request object to retrieve the data. It’s a good idea to do this in a Try Catch block.

try
{
    // Call the method that will load the response object
    UnitTypeStatus[] resp;
    resp = client.GetSiteUnitDataStatus(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 SWS2 Methods.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: