Archive
SWS GetPartialPayRules Method
Retrieves site rule values that determine if and how partial payments are applied.
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 |
---|---|
AllowsPartialPay | String |
Description | Indicates if the site allows partial payments (“True”) or not (“False”). |
AllowsPartialRentPay | String |
Description | Indicates if the site allows partial payment son delinquent rentals (“True”) or not (“False”). |
PriorityList | ArrayOfString1 |
Description | The order, highest to lowest priority, in which any payment will apply to 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 GetPartialPayRules request object and a GetPartialPayRules response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetPartialPayRules_Request request = new SWS.GetPartialPayRules_Request();
SWS.GetPartialPayRules_Response response;
Here’s my sample code of the Request object.
// GetPartialPayRules Request
request.SiteID = 123456;
Finally we can call the method and pass across the login object and the request object to get our partial pay 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.GetPartialPayRules(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 CancelReservationCashCredit Method
Cancels a reservation made for specified rental item(s) and/or quote(s) AND credits an alternate rental on the account with the refund amount. Note: If you are canceling a reservation and NOT crediting the refund to an alternate rental, use the CancelReservation method.
Parameters
Name | DataType | Is Required |
---|---|---|
RefundInfo | RefundData | Required |
Description | The object containing the refund information for the cancellation. | |
Request | CancelReservation_Request | Required |
Description | The object containing the cancellation information. |
Returned Parameters
Name | DataType |
---|---|
Succeeded | Boolean |
Description | Indicates that the reservation was cancelled 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’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 CancelReservationCashCredit request object and a CancelReservationCashCredit response object. We can define and create those like this:
// Create a request and response objects and RefundData and ContactInfo objects.
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.CancelReservation_Request res_request = new SWS.CancelReservation_Request();
SWS.RefundData refund_request = new SWS.RefundData();
SWS.CancelReservationCashCredit_Response response;
SWS.ContactInfo contact_info = new SWS.ContactInfo();
Here’s my sample code of the Request object.
// Contact Data contact_info.AccountID = 123456; contact_info.Address1 = "123 Main St."; contact_info.City = "My Town"; contact_info.State = "UT"; contact_info.PostalCode = "00000"; contact_info.ContactName = "First Last"; // Refund Data refund_request.ApplyRefundRentalID = 123456; refund_request.RefundType = SWS.RefundTypes.CASH_CREDIT; // To cancel reservations(s) res_request.AcctID = 123456; res_request.RentalIDs = new long?[] { 123456, 654321 }; res_request.LostDemandReason = SWS.Lost_Demand_Reasons.Availability; res_request.LostDemandNotes = "Unit size no longer available"; res_request.ContactData = contact_info;
Finally we can call the method and pass across the login object and the request object to cancel the reservation. 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.CancelReservationCashCredit(user_request, res_request,
refund_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 GetSiteRuleValue Method
Retrieves the status of the rule to indicate if it’s active or not.
Parameters
Name | DataType | Is Required |
---|---|---|
Active | Boolean | Optional |
Description | Applies a filter for rules that are set to active (“True”) or not (“False”). | |
RuleID | Long | Required |
Description | The rule’s ID number. This can be found using the GetSiteRules method. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
Details | String |
Description | The rule’s active value. This does not return the value meaning. Use the GetSiteRules method for a full description. |
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 GetSiteRuleValue request object and a GetSiteRuleValue response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.Rules_Request request = new SWS.Rules_Request();
SWS.GetSiteRuleValue_Response response;
Here’s my sample code of the Request object.
// GetSiteRuleValues Request
request.SiteID = 123456;
request.RuleID = 123;
Finally we can call the method and pass across the login object and the request object to get our site rule values. 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.GetSiteRuleValue(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.