SWS GetQuoteData Method
Retrieves a total due at move-in based on the parameters entered. The information may not be exact based on taxes and other fees.
Parameters
Name | DataType | Is Required |
---|---|---|
OrgID | Long | Required |
Description | The organization’s ID number. | |
PromoID | Long | Optional |
Description | Returns the promotion’s ID number, if available. This ID can be retrieved from GetSiteUnitData and indicates the best available discount at the time of the quote. | |
RentRate | Decimal | Required |
Description | The current rate charged for the rental item. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. | |
UnitID | Long | Required |
Description | The unit’s ID number. This is returned when you use any of the GetSiteUnitData calls and is maintained through rentals. |
Returned Parameters
Name | DataType |
---|---|
Deposits | Decimal |
Description | The deposit amount due at the time of move-in. |
Discounts | Decimal |
Description | The dollar amount of the PromoID applicable to this unit at the time of move-in. |
Fees | Decimal |
Description | The fee charges that would be due at move-in, such as an admin fee. See GetScheduledFees for available fees. |
RentRate | Decimal |
Description | The current rent rate charged for the unit. |
Taxes | Decimal |
Description | The tax amount due at move-in. |
Total | Decimal |
Description | The total amount due at the time of move-in. |
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 GetQuoteData request object and a GetQuoteData response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetQuoteData_Request request = new SWS.GetQuoteData_Request();
SWS.GetQuoteData_Response response;
Here’s my sample code of the Request object.
// GetQuoteData Request
request.OrgID = 123456;
request.SiteID = 123456;
request.UnitID = 123456;
request.RentRate = 45.00m;
request.PromoID = 123456;
Finally we can call the method and pass across the login object and the request object to get our quote 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.GetQuoteData(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.