Archive
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 createAndViewLetter Method
Creates and displays an account letter (i.e., Lien Sale Notice, Welcome Letter, etc).
Parameters
Name | DataType | Is Required |
---|---|---|
LtrData | swsLtrParams | Required |
Description | The object containing all required and optional parameters to create the letter. |
Returned Parameters
Name | DataType |
---|---|
createAndViewLetterResult | String |
Description | The URL where the letter is located. |
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 CreateAndViewLetter request object, and a CreateAndViewLetter response object. We can define and create those like this:
// Create request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.createOrViewLtr_Request request = new SWS.createOrViewLtr_Request();
SWS.PdfFilePath_Response response;
Here’s my sample code of the Request object.
// Letter link request
request.LtrData.siteId = 123456;
request.LtrData.acctId = 123456;
request.LtrData.unitNum = "A102";
request.LtrData.ltrTypeId = 123456;
request.LtrData.siteLtrRule = SWS.siteRuleLtrTypeGrpVals.RATECHANGE;
request.LtrData.isMailLocal = true;
request.LtrData.isCOM = false;
request.LtrData.certifiedType = SWS.certifiedVals.NONE;
request.LtrData.contactType = SWS.contactTypeVals.PRIMARY;
request.LtrData.contactOrAddrId = 123456;
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.createAndViewLetter(user_request, request);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Here is what a returned path might look like:
https://csiapp1.centershift.com/qa40/letters/1000085746_1304609631.pdf
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 createLetter Method
Creates a .pdf letter from an existing letter template in Store.
Parameters
Name | DataType | Is Required |
---|---|---|
Request | swsLtrParams | Required |
Description | The fields required to create the letter. |
Returned Parameters
Name | DataType |
---|---|
LtrNum | Long |
Description | Returns the letter number assigned to the specific letter and customer. |
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 CreateLetter request object, and a CreateLetter response object. We can define and create those like this:
' Create a request and response objects Dim objService As New SWS.WSSoapClient Dim objReq As New SWS.CreateLetter_Request Dim objRes As New SWS.CreateLetter_Response
As with every method we need to pass in credentials. We do this with the LookupUser request object:
Here is a sample code of the request object:
' CreateLetter Request With objReq .SiteID = 1000000001 .AcctID = 1111111111 .RentalID = 1212121212 .LtrTypeID = 1000 .SiteLtrRule = INVOICE .IsMailLocal = True .IsCOM = False .CertifiedType = NONE .ContactType = PRIMARY .ContactOrAddrID = 2222222222 End With
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.
Try ' Call the method that will load the response object objRes = objService.CreateLetter(objLogin, objReq) Catch ex As Exception MessageBox.Show(ex.Message) End Try
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 getTenantLetterList Method
Retrieves tenant letter document information for an entire site, account and/or rental, excludes receipts unless centrally mailed.
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. * Either AcctID, RentalID or SiteID is required. |
|
EndDate | DateTime | Optional |
Description | The end date for the requested date range. 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. * Either AcctID, RentalID or SiteID is required. |
|
SiteID | Long | Optional* |
Description | The site’s ID number. This can be found using the GetSiteList method. * Either AcctID, RentalID or SiteID is required. |
|
StartDate | DateTime | Optional |
Description | The start date of the requested date range. Defaults to today if left undefined. |
Returned Parameters
Name | DataType |
---|---|
ACCT_ID | Long |
Description | The account’s ID number. |
CERTIFIED | String |
Description | Indicates if the letter is set to be sent with certified mail (“Y”) or not (“N”). |
CREATED | DateTime |
Description | The created date and time of the record. |
EXPORTED_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_NUMBER | 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 is going to be printed and mailed by the site (“Y”) or through centralized mailing (“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. |
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 GetTenantLetterList 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.getTenantLetterList_Response response;
Here is a sample code of the request object:
// GetTenantLetterList Request
request.SiteID = 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.getTenantLetterList(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.