Archive
SWS GetMoveOutInfo Method
Retrieves all the assessments (charges) on a rental item and a summary of amounts, detailing what is due/owed on a rental item prior to termination.
Parameters
Name | Data Type | 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. | |
MoveOutDate | DateTime | Optional |
Description | The date applied when vacating a rental item. This defaults to today’s date unless otherwise specified. The date can be set in the past, based on the site’s End Rental rule settings, but no future dates are allowed. | |
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. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | Data Type |
---|---|
AssessmentDate | DateTime |
Description | The date the assessment was added to the account. |
Description | String |
Description | A brief description of the assessment. |
DueAmount | Decimal |
Description | The amount due on the assessment if it is unpaid. |
OriginalCharge | Decimal |
Description | The original amount of the assessment. |
PaidAmount | Decimal |
Description | The amount paid towards the assessment. |
UnappliedAmount | Decimal |
Description | The amount to be applied to the closing balance of that particular assessment. |
DueAmount | Decimal |
Description | The total of all assessments to be paid at the time of move out. |
DueTax | Decimal |
Description | The tax amount to be paid at the time of move out. |
DueTotal | Decimal |
Description | The total of both the DueAmount and the DueTax to be paid at move out. |
GrossAmount | Decimal |
Description | The total for all assessments on the account. This could be a refund or an amount to be paid. A r |
GrossTax | Decimal |
Description | The tax applicable to the GrossAmount |
GrossTotal | Decimal |
Description | The total of all assessments including the GrossTax. |
WithheldAmount | Decimal |
Description | Any amount that is retained by the site based on the site rules. |
WithheldTax | Decimal |
Description | Any taxes that are retained. |
WithheldTotal | Decimal |
Description | Total amount of the WithheldAmount and the WithheldTax. |
RefundTypes | RefundTypes |
Description | The type of refund that can be processed for the unit if a refund is due. Available values:
|
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 GetMoveOutInfo request object and a GetMoveOutInfo response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetMoveOutInfo_Request request = new SWS.GetMoveOutInfo_Request();
SWS.GetMoveOutInfo_Response response;
Here’s my sample code of the Request object.
// GetMoveOutInfo Request
request.SiteID = 123456;
request.AccountID = 123465;
request.RentalID = 123456;
request.MoveOutDate = DateTime.Today;
Finally we can call the method and pass across the login object and the request object to get our move out 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.GetMoveOutInfo(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 AuctionEndRental Method
Terminates a rental item and processes a payment for the amount collected from the auction. The PaymentData object is required when making a payment. When making a payment, either the Credit Card Info, Check Info or Cash Info must be set and the TotalAmountPaid should be equal to the sum of any/all of those amounts used. If site rules are configured to refund auction overage amounts to tenant, a refund request will be automatically generated. Important: Any amount paid through this method cannot be reversed. Make sure to confirm this is a valid action.
Parameters
Name | DataType | Is Required |
---|---|---|
Request | AuctionEndRentalInfo | Required |
Description | Object containing the required information to end the rental. |
Returned Parameters
Name | DataType |
---|---|
AuctionID | Long |
Description | The auction’s ID number. |
ErrorMessage | String |
Description | A message about any problem that occurred during the process, including details to locate errant code. |
RentalID | Long |
Description | The rental item’s ID number. |
TranID | String |
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, an AuctionEndRental request object and an AuctionEndRental response object. We can define and create those like this:
// Create request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.AuctionEndRental_Request request = new SWS.AuctionEndRental_Request();
SWS.AuctionEndRental_Response response;
Here’s my sample code of the Request object.
// Fill in the request data
request.SiteID = 123456;
request.AuctionDetail[0].AuctionID = 123456;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].AcctID = 123456;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].RentalID = 123456;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].Status = SWS.AuctionObjsStatusValues.SOLD_AT_AUCTION;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].SoldAmount = 155;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].Tax = 15.5m;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].BuyerName = "First Buyer";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].BuyerAddress = "123 Main St, My Town, UT 84000";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].BuyerPhone = "800-555-1212";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].Notes = "Will pick later this week.";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.SiteID = 123456;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.AcctID = 123456;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.RentalIDs = new long[] { 123456 };
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.Cycles = new int[] { 1 };
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.TotalAmtDue = 170.5m;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.TotalAmtPaid = 170.5m;
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.CreditCardInfo[0].CardHolderName = "First Buyer";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.CreditCardInfo[0].CardNumber = "4000111122223333";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.CreditCardInfo[0].ExpireMonth = "08";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.CreditCardInfo[0].ExpireYear = "2018";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.CreditCardInfo[0].CVV2 = "111";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.CreditCardInfo[0].Address = "123 Main St";
request.AuctionDetail[0].AuctionRentalsPayInfo[0].PaymentData.CreditCardInfo[0].PostalCode = "84000";
Finally we can call the method and pass across the login object and the request object for ending rentals from an auction. 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.AuctionEndRental(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.
UPDATED 08/23/2012
This method has been updated to automatically refund the tenant’s credit card when auction proceeds exceed the total amount due for the rental. The following criteria must be met in order for the credit card to be automatically refunded:
1) The ‘Auto-Refund Auction’ rule must be set to ‘TRUE’ in the applications site rules.
2) The tenant’s last payment must have been charged to a credit card and the amount charged must be >= the amount to be refunded; Otherwise, a check refund will be created.
3) The amount to be refunded must be less than the amount defined in the ‘Auto-Approval Threshold’ in the applications site rules; Otherwise, the refund will require secondary approval before the refund can be completed.