Home > API General, Rental/Reservation, Transfer > SWS InitiateUnitTransfer Method

SWS InitiateUnitTransfer Method


Begins the process of transferring from one rental item to another rental item. The CompleteUnitTransfer SWS method should be called after this SWS method in order to complete the process. Failure to call CompleteUnitTransfer will result in the transfer getting rolled back during nightly processing. If the transfer is canceled after it is initiated but before it is completed, use the RollbackUnitTransfer method.

Parameters

Name DataType 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.
OrgID Long Required
Description The organization’s ID number.
PrimaryFromRental Long Optional
Description The rental ID of the unit that is being vacated. This is returned when using the MakeReservation method or can be searched for using the SearchBy method.
RentalInfo: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.
RentalInfo:Version Integer Required
Description The unit’s version number which serves to prevent duplicate use of the unit.
SetEndDay Integer Optional
Description Indicates the day of the month to set as the rental cycle’s end date. This should match the current rental’s end date.
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.
TransferInsurance Boolean Optional
Description Indicates if the insurance/protection plan should be transferred with the unit (“True”) or not (“False”).
TransferInvoice Boolean Optional
Description Indicates if the invoicing service should be transferred with the unit (“True”) or not (“False”).
TransferServices Boolean Optional
Description Indicates if any services, not including insurance or invoicing, should be transferred with the unit (“True”) or not (“False”).
EmailInvoice Integer Optional
Description Adds email invoicing to the new rental using the SERVICE_OBJECT_ID of the email invoice service. This is returned from the GetAvailableServices method. Use this if the customer didn’t have the service on the previous rental but wants it for the new rental.
MailInvoice Integer Optional
Description Adds paper invoicing to the new rental using the SERVICE_OBJECT_ID of the paper invoice service. This is returned from the GetAvailableServices method. Use this if the customer didn’t have the service on the previous rental but wants it for the new rental.
NewInsurance Integer Optional
Description Adds new insurance to the new rental using the INS_OPTION_ID of the insurance service. This is returned from the GetInsuranceProviders method. Use this if the customer didn’t have the service on the previous rental but wants it for the new rental or wants to change their current coverage.
PerEndDay Integer Optional
Description Overrides the previous rentals end day of their rental cycle. Use 31 for the end of the month regardless of the number of days in the month.
UnitInfo:UnitID Long Required
Description The unit’s ID to which the customer is transferring. This is returned when you use any of the GetSiteUnitData calls.
UnitInfo:Version Integer Required
Description The unit’s version number which serves to prevent duplicate use of the unit.

Returned Parameters

Name DataType
RentalData: RentalID Long
Description The rental ID of the unit being vacated.
RentalData:TotalEscrow Decimal
Description The total amount of the escrow that will be transferred from the old unit to the new.
RentalData:AssessID Long
Description The assessment’s ID for the specified assessment.
RentalData:Description String
Description The description of the assessment.
RentalData:Rate Decimal
Description The dollar amount of the assessment.
RentalData:RateTax Decimal
Description The dollar amount of the tax applicable to the Rate.
RentalData:NetPrePaid Decimal
Description The amount of the assessment that has already been paid. If this is for the current month, based on the site rules, it will be prorated.
RentalData:PrePaidTax Decimal
Description The amount of tax, applicable to the assessment, that has already been paid. If the assessment is prorated, this will also be a prorated amount.
RentalData:Credit Decimal
Description The amount of the prepaid assessment that will be put towards cash credit/escrow if the new assessments are less than the old.
RentalData:IsTransferrable Boolean
Description Indicates if the prepaid amount can be transferred to the new rental (“True”) or not (“False”).
NewUnitData:RentalID Long
Description The rental ID of the new rental.
NewUnitData:RentalVersion Integer
Description The unit’s version number from which the customer is transferring. This serves to prevent duplicate use of the unit.
NewUnitData:UnitID Long
Description The unit’s ID number of the unit to which the customer is transferring. This is maintained through rentals.
NewUnitData:UnitVersion Integer
Description The version of the unit to which the customer is transferring. This serves to prevent duplicate use of the unit.
NewUnitData:QuoteID Long
Description The quote ID for the new rental quote.
NewUnitData:EscrowID Long
Description The ID of the escrow transferred from the previous unit.
NewUnitData:UnitTotal Decimal
Description The total due (not including the escrow) to move in the new unit.
UnitAssessments:AssessID Long
Description The ID of the assessment applicable to the new unit.
UnitAssessments:RentalID Long
Description The rental ID to which the assessment applies.
UnitAssessments:Description String
Description The textual description of the assessment.
UnitAssessments:ItemPrice Decimal
Description The dollar amount of a single instance of the assessment.
UnitAssessments:Quantity Integer
Description The total number of the specified assessment.
UnitAssessments:ExtendedPrice Decimal
Description The total charged for the entire quantity of the assessment.
UnitAssessments:AmountFulFilled Decimal
Description The amount that has been paid to the assessment.
UnitAssessments:Tax Decimal
Description The amount of tax applicable to the extended price of the assessment.
UnitAssessments:TaxFulFilled Decimal
Description  The amount that has been paid towards the tax.
TransactionID Long
Description The transaction’s ID number. Transaction IDs are system generated for each payment transaction that occurs in the system. A null or “0” response indicates the transaction failed.

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 InitiateUnitTransfer request object and a InitiateUnitTransfer response object. We will also need at least one RentalInfo object and at least one UnitInfo object  We can define and create those like this:

// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.InitiateUnitTransfer_Request request = new SWS.InitiateUnitTransfer_Request();
SWS.InitiateUnitTransfer_Response response;

SWS.RentalInfo fromRentals = new SWS.RentalInfo();
SWS.UnitInfo unitInfo = new SWS.UnitInfo();

Here’s sample code of the Request objects.

// InitiateUnitTransfer Request
fromRentals.RentalID = 123456;
fromRentals.Version = 10;

unitInfo.UnitID = 123456;
unitInfo.Version = 11;
unitInfo.EmailInvoice = 123456;
unitInfo.PerEndDay = 15;

request.OrgID = 123456;
request.SiteID = 123456;
request.AccountID = 123456;
request.PrimaryFromRental = 123456;
request.FromRentals = new SWS.RentalInfo[] { fromRentals };
request.ToUnits = new SWS.UnitInfo[] { unitInfo };

Finally we can call the method and pass across the login object and the request object to initiate unit transfer our 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.InitiateUnitTransfer(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.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s