Archive
SWS CancelReservationV3 Method
This method works like V2 with the exception of the Lost Demand Reason code. This value is now of type long so that it can accept the custom values created by the organization.
SWS GetMoveOutInfo Method
Retrieves all the assessments (charges) on a rental item and a summary of amounts, detailing what is due/owed on a rental item prior to termination.
Parameters
Name | Data Type | Is Required |
---|---|---|
AccountID | 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. | |
MoveOutDate | DateTime | Optional |
Description | The date applied when vacating a rental item. This defaults to today’s date unless otherwise specified. The date can be set in the past, based on the site’s End Rental rule settings, but no future dates are allowed. | |
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 | Data Type |
---|---|
AssessmentDate | DateTime |
Description | The date the assessment was added to the account. |
Description | String |
Description | A brief description of the assessment. |
DueAmount | Decimal |
Description | The amount due on the assessment if it is unpaid. |
OriginalCharge | Decimal |
Description | The original amount of the assessment. |
PaidAmount | Decimal |
Description | The amount paid towards the assessment. |
UnappliedAmount | Decimal |
Description | The amount to be applied to the closing balance of that particular assessment. |
DueAmount | Decimal |
Description | The total of all assessments to be paid at the time of move out. |
DueTax | Decimal |
Description | The tax amount to be paid at the time of move out. |
DueTotal | Decimal |
Description | The total of both the DueAmount and the DueTax to be paid at move out. |
GrossAmount | Decimal |
Description | The total for all assessments on the account. This could be a refund or an amount to be paid. A r |
GrossTax | Decimal |
Description | The tax applicable to the GrossAmount |
GrossTotal | Decimal |
Description | The total of all assessments including the GrossTax. |
WithheldAmount | Decimal |
Description | Any amount that is retained by the site based on the site rules. |
WithheldTax | Decimal |
Description | Any taxes that are retained. |
WithheldTotal | Decimal |
Description | Total amount of the WithheldAmount and the WithheldTax. |
RefundTypes | RefundTypes |
Description | The type of refund that can be processed for the unit if a refund is due. Available values:
|
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 GetMoveOutInfo request object and a GetMoveOutInfo response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetMoveOutInfo_Request request = new SWS.GetMoveOutInfo_Request();
SWS.GetMoveOutInfo_Response response;
Here’s my sample code of the Request object.
// GetMoveOutInfo Request
request.SiteID = 123456;
request.AccountID = 123465;
request.RentalID = 123456;
request.MoveOutDate = DateTime.Today;
Finally we can call the method and pass across the login object and the request object to get our move out 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.GetMoveOutInfo(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 GetEndRentalRules Method
Retrieves site rules pertaining to terminating a rental.
Parameters
Name | DataType | Is Required |
---|---|---|
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
RULE_VALUES | RULE_VALUES |
Description | The object containing all returned information about the end rental rules. |
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 GetEndRentalRules request object and a RULE_VALUES collection object for the response. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetEndRentalRules_Request request = new SWS.GetEndRentalRules_Request();
SWS.RULE_VALUES[] response;
Here’s my sample code of the Request object.
// GetEndRentalRules Request
request.SiteID = 123456;
Finally we can call the method and pass across the login object and the request object to get our end rental rules. 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.GetEndRentalRules(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 GetEstimatedRefund Method
Retrieves potential refund amount for a terminated reservation. This is for reservations only and will return “0” for any currently occupied rental.
Parameters
Name | DataType | Is Required |
---|---|---|
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. |
Returned Parameters
Name | DataType |
---|---|
EstimatedRefundAmount | Decimal |
Description | The refund amount is automatically calculated by the Store application, based on the refund rules for the site. This is from the CancelReservation SWS method. |
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 GetEstimatedRefund request object and a GetEstimatedRefund response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetEstimatedRefund_Request request = new SWS.GetEstimatedRefund_Request();
SWS.GetEstimatedRefund_Response response;
Here’s my sample code of the Request object.
// GetEstimatedRefund Request
request.RentalID = 123456;
Finally we can call the method and pass across the login object and the request object to get our estimated refund. 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.GetEstimatedRefund(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.