Home > Accounting, API General, Refunds > SWS ResetRefunds Method

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:

  • 1 – Pending Approval
  • 2 – Approved
  • 3 – Denied
  • 4 – Processed
  • 5 – ReSet
  • 6 – Credit Fail
  • 7 – System Refund
  • 99 – Cancelled

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:

  • HOME
  • OFFICE
  • MOBILE
  • FAX
  • OTHER
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.

Categories: Accounting, API General, Refunds Tags:
  1. swsBecky
    April 6, 2017 at 8:32 am

    Updated March 12, 2013: Currently this method uses the POST DATE of the refund when determining what data to pull or reset. The post date is the date of the initial request. We recently made upgrades to the code to track the date the refund is approved. Depending on your sites rules and the amount of the refund the approval date may be the same date as the post or may be day(s) later depending on when the item is manually approved (if manual approval was required). Please keep this in mind when requesting data from this method. These changes will go into effect with the April updates. Please check your email to verify the exact date.

  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: