Archive
Reservation Rules
There are 2 calls that you would use to get information on rules for a specific site.
First you would call GetSiteRules in order to find the specific rule_id’s that you wanted to look up for a site.
Then you would call GetSiteRuleValue with the rule_id that you looked up before in order to see what the specific site you were looking for is using.
GetSiteRules: https://centershiftdevx.com/2011/04/20/sws-getsiterules-method/
GetSiteRuleValue: https://centershiftdevx.com/2011/04/20/sws-getsiterulevalue-method/
Here are the rule_id’s that are for the Reservation Rules
RULE_ID = 299
RULE NAME = Reservation Parameters
DESCRIPTION = Sets general reservation parameters for this site.
RULE_ID = 300
RULE NAME = Reservation Threshold Logic
DESCRIPTION = Sets vacancy threshold logic for allowing reservations based on count and/or percentage.
RULE_ID = 301
RULE NAME = % Available Threshold
DESCRIPTION = Sets the minimum percentage (for example, .25 equals 25%) of units that must be available before a reservation can be made.
RULE_ID = 302
RULE NAME = Quantity Available Threshold
DESCRIPTION = Sets the minimum number of units that must be available before a reservation can be made.
SWS getTenantLetterListV2 Method
Retrieves tenant letter document information for an entire site, account and/or rental item. Receipts are excluded if they were centrally mailed. Includes additional return fields not found in the original version GetTenantLetterList.
Parameters
Name | DataType | Is Required |
---|---|---|
AcctID | Long | Optional* |
Description | The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method. * AcctID, RentalID or SiteID is required. |
|
EndDate | DateTime | Optional |
Description | The end of the date range for which you are requesting the letters. Defaults to the StartDate if left undefined. | |
RentalID | Long | Optional* |
Description | The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. * AcctID, RentalID or SiteID is required. |
|
SiteID | Long | Optional* |
Description | The site’s ID number. This can be found using the GetSiteList method. * AcctID, RentalID or SiteID is required. |
|
StartDate | DateTime | Optional |
Description | The start of the date range for which you are requesting the letters. Defaults to today if left undefined. |
Returned Parameters
Name | DataType |
---|---|
ACCT_ID | Long |
Description | The account’s ID number. |
CERTIFIED | String |
Description | Indicates that the letter is flagged to be sent as certified mail (“Y”) or as regular mail (“N”). |
CREATED | DateTime |
Description | The created date and time of the record. |
EXPORT_DATE | String |
Description | The date the letter was exported to a .pdf for printing. |
EXPORT_ID | Long |
Description | The export ID number in which the letter was sent. |
GROUP_MEANING | String |
Description | The textual value of the LTR_TYPE_GROUP. |
LTR_NAME | String |
Description | The textual value of the LTR_TYPE_ID |
LTR_NUM | Long |
Description | The letter number. This is system generated when the letter is generated and is primarily used for tracking. |
LTR_TYPE_GROUP | Integer |
Description | The group number assigned to the letter template type. Common values:
|
LTR_TYPE_ID | Long |
Description | The ID to the specific letter template used to generate the letter. |
MAIL_LOCAL | String |
Description | Indicates if the letter will be printed and mailed by the site (“Y”) or sent through centralized mail (“N”). |
PRINT_MEANING | String |
Description | The textual value of the PRINT_SPECIAL parameter. |
PRINT_SPECIAL | Integer |
Description | The type of special printing required for the letter. The default is “0” for “Plain Letter”. |
RENTAL_ID | Long |
Description | The rental item’s ID number. |
SITE_ID | Long |
Description | The site’s ID number. |
UNIT_NUMBER | String |
Description | The unit’s number as assigned by the organization. This is not the UnitID. |
VERSION | Integer |
Description | The version number of the letter template that was used to create the letter. Defaults to 1 if there have been no updates. |
WHO_CREATED | String |
Description | The name of the user that created the letter. |
SCHEDULED | DateTime |
Description | The date and time the letter was scheduled to be created. |
MAILED_DATE | DateTime |
Description | The date and time the letter was mailed, if done through centralized mailing. |
ERROR_CODE | Integer |
Description | The error codes numeric value. While this is called an error code, it does not necessarily indicate an error has occured. |
ERROR_CODE_MEANING | String |
Description | The textual value of the ERROR_CODE. While this is called an error code, it does not necessarily indicate an error has occured. |
Example
As with every method we need to pass in credentials. We do this with the LookupUser request object.
We will assume you have a web reference, let us name it SWS, in your Visual Studio project. At this point we need to define our objects. We’ll need the standard service object, a GetTenantDocList request object, and a GetTenantLetterListV2 response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.getTenantDocList_Request request = new SWS.getTenantDocList_Request();
SWS.getTenantLetterListV2_Response response;
Here is a sample code of the request object:
// GetTenantDocList Request
request.SiteID = 123456;
request.AcctID = 123456;
request.RentalID = 123456;
request.StartDate = DateTime.Today.AddDays(-30);
request.EndDate = DateTime.Today;
Finally we can call the method and pass across the login object and the request object to retrieve our requested information. 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.getTenantLetterListV2(user_request, request);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Note that if something goes wrong the service will respond with an exception. You will want to capture the message in the exception so it can be debugged.
For a full list of methods see SWS Methods.
SWS TerminateServiceV2 Method
Terminates a service for a specified rental item and allows the user to indicate whether any associated, unpaid service assessments should be written off.
Parameters
Name | DataType | Is Required |
---|---|---|
RemoveUnpaidAssessments | Boolean | Required |
Description | Indicates if you wish to write off the already applied service charges (“True”) or if you wish to leave them assessed to the account (“False”. | |
ServiceRentalID | Long | Required |
Description | The rental ID number of the service that will be removed. This is the RENTAL_ID parameter that is returned when using the GetAppliedServices method. | |
ServiceType | serviceTypeVals | Required |
Description | The type of service to be removed. This is the SERVICE_TYPE parameter that is returned when using the GetAppliedServices method. Available values:
|
|
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
Succeeded | Boolean |
Description | Indicates if the service was removed successfully (“True”) or not (“False”). |
Example
As with every method we need to pass in credentials. We do this with the LookupUser request object.
We will assume you have a web reference, let us name it SWS, in your Visual Studio project. At this point we need to define our objects. We will need the standard service object, a TerminateServiceV2 request object, and a TerminateService response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.TerminateServiceV2_Request request = new SWS.TerminateServiceV2_Request();
SWS.TerminateService_Response response;
Here is a sample code of the request object:
// TerminateServiceV2 Request
request.SiteID = 123456;
request.ServiceRentalID = 213456;
request.ServiceType = SWS.serviceTypeVals.GATE_ACCESS;
request.RemoveUnpaidAssessments = false;
Finally we can call the method and pass across the login object and the request object to retrieve our requested information. 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.TerminateServiceV2(user_request, request);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Note that if something goes wrong the service will respond with an exception. You will want to capture the message in the exception so it can be debugged.
For a full list of methods see SWS Methods.
SWS GetPrimaryRentalInfoV2 Method
Retrieves rental data and tax exempt information for a specified rental or a collection of rental data for a specified contact or account. The return includes the same information as the first version in addition to tax exemption information.
Parameters
Name | DataType | Is Required |
---|---|---|
AccountID | Long | Optional |
Description | The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBymethod. | |
ContactID | Long | Optional |
Description | The rental contact’s ID number. This is returned when using the CreateNewAccount or AddNewContact methods or you can search for it using the SearchBy method. | |
RentalID | Long | Optional |
Description | The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBymethod. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
ACCT_ID | Long |
Description | The account’s ID number. |
ACCT_NAME | String |
Description | The name on the account. This may differ from the primary contact’s name in some instances, such as a business account or a guardianship account. |
ACCT_TYPE | String |
Description | The system-defined account type. |
ADDR1 | String |
Description | The first address line of the account address. |
ADDR2 | String |
Description | The second address line of the account address. |
ADDR3 | String |
Description | The third address line of the account address. |
ADDRESS_TYPE | String |
Description | The address type of the account address. |
ATTRIBUTE01_VAL | String |
Description | The textual value for the “Attribute01” custom lookup as defined by the site. See eUnitAttr01 for the available values. |
CITY | String |
Description | The city of the account address. |
CONTACT_ID | Long |
Description | The rental contact’s ID number. |
CONTACT_TYPE | String |
Description | The contact’s type. Available values:
|
COUNTRY | String |
Description | The country of the account address if one is included. |
CURRENTLY_RENTED | String |
Description | Indicates if the unit is currently rented (“Y”) or not (“N”). |
DEL_EXEMPT | String |
Description | Indicates if the rental is exempt from the delinquency schedule (“Y”) or not (“N”). |
DEL_STEP | Integer |
Description | The current delinquency step for the rental item. If the unit is not rented this will return “0”. |
DEPTH | Decimal |
Description | The depth measurement of the rental item. |
String | |
Description | The rental contact’s email address. This is also used as the username if the site supports eStore/eCommerce. |
FIRST_NAME | String |
Description | The given name for the account/rental contact. |
KNOWN_AS | String |
Description | The alternate or nick name, if there is one, for the rental contact. |
LAST_NAME | String |
Description | The family name for the rental contact. |
LTD | DateTime |
Description | The lease-thru-date (LTD). |
MO_DATE | DateTime |
Description | The scheduled date of the move-out, if it has been provided and documented in the rental details. |
OBJ_PERIOD | Long |
Description | The number of periods which apply to the UOM (unit of measure). |
OBJ_PERIOD_UOM | String |
Description | The description of the UOM (unit of measure). This will always be “Month”. |
OVERLOCK_STATUS | String |
Description | The current overlock status of the rental. Available values:
|
PHONE | String |
Description | The primary contact’s phone number. |
PHONE_TYPE | String |
Description | The type of phone number. Available values:
|
POSTAL_CODE | String |
Description | The postal/ZIP code for the contacts address. |
PTD | DateTime |
Description | The paid-thru-date (PTD). |
RENTAL_ID | Long |
Description | The rental item’s ID number. |
RENTAL_STATUS | String |
Description | The textual value for the “Status” custom lookup as defined by the site. See eUnitStatus for the available values. |
SITE_ID | Long |
Description | The site’s ID number. |
START_DATE | DateTime |
Description | The date the rental was first rented. |
STATE | String |
Description | The state/province for the address. |
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. |
WIDTH | Decimal |
Description | The width measurement of the rental item. |
TAX_EXEMPT | String |
Description | Indicates if the rental is exempt from taxes (“1”) or not (“0”). |
TAX_EXEMPT_EXP | DateTime |
Description | The date the tax exempt status expires. |
TAX_EXEMPT_INFO | String |
Description | The tax exempt ID number. |
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 GetPrimaryRentalInfo request object and a GetPrimaryRentalInfo response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetPrimaryRentalInfo_Request request = new SWS.GetPrimaryRentalInfo_Request();
SWS.GetPrimaryRentalInfoV2_Response response;
Here’s my sample code of the Request object using the RentalID.
// GetPrimaryRentalInfoV2 Request
request.SiteID = 123456;
request.RentalID = 123456;
Finally we can call the method and pass across the login object and the request object to get our primary rental info. 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.GetPrimaryRentalInfoV2(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.