Archive

Posts Tagged ‘Refunds’

SWS GetRetailRefundAmount Method

May 23, 2011 Leave a comment

Retrieves a sum total refund amount for multiple retail item types and quantities.

Parameters

Name DataType Is Required
ReturnRetailData ReturnRetailItem Required
Description The object containing the details about the retail item/s being returned. Create a collection for each RetailObjectID being returned.
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.
TransactionID Long Required
Description The transaction’s ID number. Transaction IDs are system generated for each payment transaction that occurs in the system. If there is no transaction ID the transaction failed. The transaction ID is returned when any MakePayment method is used.

Returned Parameters

Name DataType
TotalRefundAmount Decimal
Description The refund amount is automatically calculated by the Store application, based on the refund rules for the site.

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 GetRetailRefundAmount request object and a GetRetailRefundAmount response object.  You will also need a ReturnRetailItem(s) object to indicate which item you are returning. We can define and create those like this:

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

SWS.ReturnRetailItem item = new SWS.ReturnRetailItem();

Here’s my sample code of the Request object.

// GetRetailRefundAmount Request
item.RetailObjectID = 123456;
item.Quantity = 1;
item.ReturnReason = SWS.RetailReturnReasons.DEFECTIVE_DESTROY;

request.SiteID = 123456;
request.TransactionID = 123456;
request.ReturnRetailData = new SWS.ReturnRetailItem[] { item };

Finally we can call the method and pass across the login object and the request object to get our retail refund amount. 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.GetRetailRefundAmount(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 GetEstimatedRefund Method

May 16, 2011 Leave a comment

Retrieves potential refund amount for a terminated reservation. This is for reservations only and will return “0” for any currently occupied rental.

Parameters

Name DataType Is Required
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.

Returned Parameters

Name DataType
EstimatedRefundAmount Decimal
Description The refund amount is automatically calculated by the Store application, based on the refund rules for the site. This is from the CancelReservation SWS method.

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 GetEstimatedRefund request object and a GetEstimatedRefund response object.  We can define and create those like this:

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

Here’s my sample code of the Request object.

// GetEstimatedRefund Request
request.RentalID = 123456;

Finally we can call the method and pass across the login object and the request object to get our estimated refund. 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.GetEstimatedRefund(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 ResetRefunds Method

April 16, 2011 Leave a comment

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:

SWS ExportRefunds Method

April 13, 2011 Leave a comment

Exports a list of refunds and resets the refund status for specified site(s) for a given time-frame.

Parameters

Name DataType Is Required
EndDate DateTime Optional
Description The date to end a process. If start date is provided, then it is the end date of a range of dates. Technically, it’s one day beyond the end date. This will default to today’s date if left undefined.
OrgID Long Required
Description The organization’s ID number.
SiteList Long Required
Description A collection of site IDs. This will return all sites within the organization if left undefined.
StartDate DateTime Required
Description The date to start a process. If end date is provided, then it is the start date of a range of dates.
RefundStatusFilter Integer Optional
Description Selects refunds of given status. Defaults to 2 and 5 if left blank.
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
RefundDetail RefundDetail
Description Returns the object containing all the values of the refund detail.

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 classify our objects.  We will need the standard service object, an ExportRefunds request object, and an ExportRefunds 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):

// ExportRefunds Request
request.OrgID = 5005;
request.SiteList = new long[] { 123456, 456789 };
request.StartDate = DateTime.Today.AddDays(1);
request.EndDate = DateTime.Today;
request.RefundStatusFilter = new int[] { 1 };

Finally we can call the method and pass across the login object and the request object to export the specified 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.ExportRefunds(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, Refunds Tags: