SWS ResetRefunds Method
Resets refunds for specified site(s) for a specified date range in the Financial Integration Utility (FIU).
Parameters
Name | DataType | Is Required |
---|---|---|
EndDate | DateTime | Optional |
Description | The end date of the date range for which you wish to reset the refunds. | |
OrgID | Long | Required |
Description | The organization’s ID number. | |
SiteList | Long | Required |
Description | Site ID for which you wish to reset the refunds. This can be a collection of site IDs. This can be found using the GetSiteList method. | |
StartDate | DateTime | Required |
Description | The start date of the date range for which you wish to reset the refunds. | |
RefundStatusFilter | Integer | Optional |
Description | Resets refunds in the requested status. This defaults to 2 (Approved). Available values:
|
Returned Parameters
Name | DataType |
---|---|
SiteNumber | String |
Description | The site’s number as defined by the site administrator. This is not the site ID number. |
Address1 | String |
Description | The first line of the street address of the account. |
Address2 | String |
Description | The second line of the street address of the account. |
Address3 | String |
Description | The third line of the street address of the account. |
City | String |
Description | The city for the account address. |
PostalCode | String |
Description | The postal/ZIP code for the account address. |
State | String |
Description | The state/province of the account address. |
PhoneNumber | String |
Description | The phone number of the account. |
PhoneType | String |
Description | The type of phone number. Available values:
|
AccountName | String |
Description | The name on the account. This may differ from the primary contact’s name in some instances, such as a business account or a guardianship account. |
AccountNumber | Long |
Description | The account’s ID number. |
RefundType | String |
Description | The form of payment that the refund will take. The refund types are available in the GetMoveOutInfo method. This is based on the site rules set by the admin. |
RegionalApprovedBy | String |
Description | The user’s name that processed the refund request. |
SitePerson | String |
Description | The users’s name that initiated the refund request. |
TodaysDate | DateTime |
Description | The current date. |
TotalRefundAmount | Decimal |
Description | The total amount that was requested for refund. |
TransactionNumber | Long |
Description | The transaction’s ID number. |
VacateDate | DateTime |
Description | The date the rental was vacated. |
UnitNumber | String |
Description | The unit’s number as assigned by the organization. This is not the UnitID. |
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 Refunds request object, and a Refunds response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.Refund_Request request = new SWS.Refund_Request();
SWS.Refund_Response response;
Here’s a sample code of the Request object (including optional parameters):
// ResetRefunds Request
request.OrgID = 123456;
request.SiteList = new long[] { 1232456, 456789 };
request.RefundStatusFilter = new int[] { 2, 1, 3 };
Finally we can call the method and pass across the login object and the request object to reset the applicable refunds. 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.ResetRefunds(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 returned in that exception so it can be debugged.
For a full list of methods see SWS Methods.