Home > API General, End Rental/Moveout > SWS SetUpMoveOut Method

SWS SetUpMoveOut Method


Makes a partial payment on rental item(s) for the specified account, based on information retrieved from the GetPrePayMoveOutInfo SWS method. This SWS method cannot be used without calling the GetPrePayMoveOutInfo SWS method first and will also update the intended move out date of the rental item(s). This payment method allows you to use two payment types at one time, with up to three payments per type.

Parameters

Name DataType Is Required
AcctID 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.
CashCreditID Long Optional
Description The cash credit/escrow ID number. This is required if you wish to apply a cash credit/escrow.
CashInfo Decimal Optional*
Description The amount of cash used in the transaction.
*At least one payment type is required.
CheckInfo CheckData Optional*
Description The object containing the required information for a check payment.
*At least one payment type is required.
CreditCardInfo CreditCardData Optional*
Description The object containing the required information for a credit card payment.
*At least one payment type is required.
MoveOutDate DateTime Required
Description The date the rental will be vacated. This will not automatically end the rental on that day but will update the intended termination date in Store.
PaymentCode String Required
Description A Store-generated payment code. Use the GetPrePayMoveOutInfo SWS method for this code.
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.

Returned Parameters

Name DataType
TranID 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 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, a SetupMoveOut request object, and a SetupMoveOut response object. We can define and create those like this:

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

Here is a sample code of the request object:

// SetupMoveOut Request
request.SiteID = 123456;
request.AcctID = 213456;
request.MoveOutDate = new DateTime(2017, 9, 1);
request.PaymentCode = "iNR3+yqF8ACI1Hf7KoXwAAAAAAAAAAAAAAAAADvBDRE=";

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.SetupMoveOut(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.

  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 )

Google photo

You are commenting using your Google 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

%d bloggers like this: