Archive
SWS GetTotalDuePastDue Method
Retrieves the total amount due and the past due amount for a rental item, including the number of cycles past due. It works the same as the GetTotalDue SWS method with the exception that it requires each rental ID that you wish to include in the total. This will include all fees and services for the applicable past due and future amounts.
Parameters
Name | DataType | Is Required |
---|---|---|
AcctID | Long | Required |
Description | The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method. | |
Cycles | Integer | Optional |
Description | The number of rental periods used to calculate the amount. If no cycle is passed in, it is assumed only one cycle should be included. The number of cycles starts from the PTD of the rental. You are limited to the number of cycles you can retrieve based on the ‘Allowed Number of Days Paid Ahead’ rule for the site. The rule information can be retrieved using the GetSiteRules and GetSiteRulesValue methods. | |
IsRetail | Boolean | Optional |
Description | Indicates that the total retrieved should be for retail assessment only (“True”) or if it should be for the rental assessments only (“False”). | |
IsRetailAndRental | Boolean | Optional |
Description | Indicates that the total retrieved should be for both the retail and the rental assessments on the account (“True”) or only for the rental assessments (“False”). | |
MoveOutDate | DateTime | Ignored |
Description | (Deprecated) The date the customer has indicated they will be moving out. | |
RentalID | Long | Required |
Description | The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
PastDueCycles | Decimal |
Description | The number of rental periods that must be paid to bring the account current. |
PastDueTotal | Decimal |
Description | The total amount due to bring the account current. |
RequestedTotalDue | Decimal |
Description | The total amount due for the requested number of rental periods. |
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 GetTotalDue request object and a GetTotalDuePastDue response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetTotalDue_Request request = new SWS.GetTotalDue_Request();
SWS.GetTotalDuePastDue_Response response;
Here’s my sample code of the Request object.
// GetTotalDuePastDue Request
request.SiteID = 123456;
request.AcctID = 123456;
request.RentalID = new long[] { 123456 };
request.Cycles = new int[] { 1 };
request.IsRetail = false;
request.IsRetailAndRental = false;
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.
// Call the method that will load the response object
try
{
response = service.GetTotalDuePastDue(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.
SWS GetTransactionRentals Method
Retrieves information regarding rentals and retail related to a specified transaction.
Parameters
Name | DataType | Is Required |
---|---|---|
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. | |
TranID | ArrayOfLong | Required |
Description | The transaction’s ID number. Transaction IDs are system generated for each monetary transaction that occurs in the system. If there is no transaction ID the transaction failed. The transaction ID is returned when any MakePayment method is used. |
Returned Parameters
Name | DataType |
---|---|
RENTAL_ID | Decimal |
Description | The rental item’s ID number. |
TNX_DATE | DateTime |
Description | The date the transaction occurred. |
TNX_ID | Long |
Description | The transaction’s ID number.Transaction IDs are system generated for each monetary transaction that occurs in the system. |
HasRetail | Boolean |
Description | Indicates if the transaction included retail assessments (“True”) or not (“False”). |
TranID | Long |
Description | The transaction’s ID number. Transaction IDs are system generated for each monetary transaction that occurs in the system. This reiterates the first transaction ID. |
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 GetTransactionRentals request object and a GetTransactionRentals response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetTransactionRentals_Request request = new SWS.GetTransactionRentals_Request();
SWS.GetTransactionRentals_Response response;
Here’s my sample code of the Request object.
// GetTransactionRentals Request
request.SiteID = 123456;
request.TranID = new long[] { 123456 };
Finally we can call the method and pass across the login object and the request object to get our transaction rentals. 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.GetTransactionRentals(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.
SWS GetTotalDue Method
Retrieves the total amount due for specified rental items for an account and can expand the amount to cover future cycles. This will always include at least 1 rental period assessment. This will include all fees and services applicable to the requested time period.
Parameters
Name | DataType | Is Required |
---|---|---|
AcctID | Long | Required |
Description | The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method. | |
Cycles | Integer | Optional |
Description | The number of rental periods for which to calculate the total. If no cycle is passed in, it is assumed only one cycle should be used. If a single integer is passed in, it is assumed that all account rentals will be included for the number of cycles indicated. If an array of integers is passed in, it is assumed they match one to one with the array of rental ID’s passed in. If the arrays are of different sizes, an error will occur. The number of cycles starts from the PTD for each rental. You are limited to the number of cycles you can retrieve based on the “Allowed Number of Days Paid Ahead” rule for the site. The rule information can be retrieved using the GetSiteRules and GetSiteRulesValue methods. | |
IsRetail | Boolean | Required |
Description | Indicates that the total retrieved should be for retail assessment only (“True”) or if it should be for the rental assessments only (“False”). | |
IsRetailAndRental | Boolean | Required |
Description | Indicates that the total retrieved should be for both the retail and the rental assessments on the account (“True”) or only for the rental assessments (“False”). | |
MoveOutDate | DateTime | Ignored |
Description | (Deprecated) The date the customer has indicated they will be moving out. | |
RentalID | Long | Optional |
Description | The rental item’s ID number. Use an array to choose which rentals will be included in the response. If no rental ID is indicated it will default to all rentals on the account. All rentals must belong to the account. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
Details | Decimal |
Description | The total amount due for the applied assessments. |
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 GetTotalDue request object and a GetTotalDue response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetTotalDue_Request request = new SWS.GetTotalDue_Request();
SWS.GetTotalDue_Response response;
Here’s my sample code of the Request object using a single rental from the account and requesting the oldest cycle’s total due.
// GetTotalDue Request
request.SiteID = 123456;
request.AcctID = 123456;
request.RentalID = new long[] { 123456 };
request.Cycles = new int[] { 1 };
request.IsRetail = false;
request.IsRetailAndRental = false;
Finally we can call the method and pass across the login object and the request object to get our total due. 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.GetTotalDue(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.
SWS ApplyCreditToAssessments Method
Applies an already created Manager’s Credits to currently due assessments (non-volatile) or future assessments (volatile) that are within 30 days of being due. Manager’s Credits must have been added to the account using the AddUpdatePCD SWS method or through the application. Note: promotions, discounts and rate modications are not used with this SWS method.
Parameters
Name | DataType | Is Required |
---|---|---|
AssessId | Long | Required |
Description | The assessment’s ID number. This is retrieved using the GetAssessments method. | |
AssessVersion | Integer | Required |
Description | The assessment’s version number. This is retrieved using the GetAssessments method. | |
ApplyAmt | Decimal | Required |
Description | The amount to apply to the specified assessment. This can be all or only a portion of the available manager’s credit. | |
OrgID | Long | Required |
Description | The organization’s ID number. | |
RentalID | Long | Required |
Description | The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
Successful | Boolean |
Description | Indicates that the application of the manager’s credit was successful (“True”) or not (“False”). |
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, an ApplyCreditsToAssessments request object and an ApplyCreditsToAssessments response object. We can define and create those like this:
// Create request and response objects and assessment info object
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.ApplyCreditToAssessments_Request request = new SWS.ApplyCreditToAssessments_Request();
SWS.ApplyCreditToAssessments_Response response;
SWS.AssessInfo assess_data = new SWS.AssessInfo();
Here’s my sample code of the Request objects.
//Create assessment info object assess_data.AssessId = 123456; assess_data.AssessVersion = 3; assess_data.ApplyAmt = 10.50m; //Applies the credit to the assessment request.OrgID = 123456; request.SiteID = 123456; request.RentalID = 123456; request.AssessmentInfo = new SWS.AssessInfo[] { assess_data };
We can call the method and pass across the login object and the request object for applying credits to assessments. It’s a good idea to do this in a Try Catch block.
try
{
// Call the method that will load the response object
response = service.ApplyCreditToAssessments(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.