SWS UpdateRentalSettingsV2 Method
Provides all of the same functionality as the UpdateRentalSettings method and additionally provides the ability to set the tax exempt expiration date of a rental.
Parameters
Name | DataType | Is Required |
---|---|---|
DelExempt | Boolean | Optional |
Description | Indicates if the rental should be included in the delinquency processing (“False”) or if it should be exempt from the delinquency processing (“True”). The default is “False”. | |
DelScheduleID | Long | Optional |
Description | Changes the delinquency schedule that is assigned to the unit. You can get the ID, name and description using the GetDelinqSchedule method. | |
DelStep | Integer | Optional |
Description | Set the delinquency step number of the unit. This is the level of delinquency that applies to the unit’s delinquency status. This cannot be a negative number. | |
OverlockStatus | OverlockStatus | Optional |
Description | Sets the overlock status of the rental. Available values:
|
|
PrimaryContact | Long | Optional |
Description | Assigns an existing contact as the primary rental contact to the rental via the contact ID. | |
PrimaryContactAddressID | Long | Optional |
Description | The address’s ID number for the address that should be assigned to the new primary contact. This is required if the PrimaryContact parameter is used. | |
PrimaryContactPhoneID | Long | Optional |
Description | The ID of the phone number you wish to add to the primary contact. This is required if the PrimaryContact parameter is used. | |
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. | |
SecondaryContact | Long | Optional |
Description | Assigns an existing contact as the secondary rental contact to the rental via the contact ID. | |
SecondaryContactAddressID | Long | Optional |
Description | The address’s ID number for the address that should be assigned to the secondary contact. This is required if the SecondaryContact parameter is used. | |
SecondaryContactPhoneID | Long | Optional |
Description | The ID of the phone number you wish to add to the secondary contact. This is required if the SecondaryContact parameter is used. | |
TaxExempt | Boolean | Optional |
Description | Indicates if the rental assessments should be taxed (“False”) or if it should be exempt from taxation (“True”). The default is “False”. | |
TaxInfo | String | Optional |
Description | The tax id if the rental should be tax exempt. This is required if you use the TaxExempt parameter. | |
TaxExemptExpiration | DateTime | Optional |
Description | The date that the tax exempt status expires. |
Returned Parameters
Name | DataType |
---|---|
AccountID | Long |
Description | The account’s ID number. |
DelExempt | Boolean |
Description | Indicates if the rental will be included in the delinquency processing (“False”) or if it will be exempt from the delinquency processing (“True”). The default is “False”. |
DelSchedule | Long |
Description | The delinquency schedule’s ID number. |
DelStep | Integer |
Description | The current step number within the delinquency schedule that applies to the unit’s delinquency status. This cannot be a negative number. |
EndDate | DateTime |
Description | The date the rental was terminated and the customer moved out. |
LTD | DateTime |
Description | The date that the customer has leased |
MoveOutDate | DateTime |
Description | The date the customer vacated the rental. |
OverlockStatus | OverlockStatus |
Description | The current overlock status of the rental. Available values:
|
PrimaryContactUpdated | Boolean |
Description | Indicates if the primary contact was updated successfully (“True”) or if the update was unsuccessful (“False”). |
PTD | DateTime |
Description | The date through which the customer has paid on their rental. |
RentalID | Long |
Description | The rental item’s ID number. |
SecondaryContactUpdated | Boolean |
Description | Indicates if the secondary contact was updated successfully (“True”) or if the update was unsuccessful (“False”). |
StartDate | DateTime |
Description | The date the customer first moved into the unit. |
TaxExempt | Boolean |
Description | Indicates if the rental assessments will be taxed (“False”) or if it will be exempt from taxation (“True”). The default is “False”. |
TaxExemptInfo | String |
Description | The tax ID number if the rental is tax exempt. |
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, an UpdateRentalSettingsV2 request object, and an UpdateRentalSettings response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.UpdateRentalSettingsV2_Request request = new SWS.UpdateRentalSettingsV2_Request();
SWS.UpdateRentalSettings_Response response;
Here is a sample code of the request object:
// UpdateRentalSettingsV2_Request
request.RentalId = 123546;
request.TaxExempt = true;
request.TaxInfo = "123456789";
request.TaxExemptExpiration = new DateTime(2020, 9 ,1);
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.UpdateRentalSettingsV2(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.
-
September 13, 2012 at 11:54 amSWS Methods Table of Contents « Centershift Developer eXchange