Archive

Posts Tagged ‘accounting’

SWS VoidTransaction Method

Allows you to void a payment for a rental and/or retail items. A void can only be done the same day as the original transaction and prior to nightly processing.

Parameters

Name DataType 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.
AccountName String Required
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.
Amount Decimal Required
Description The amount of the payment to be voided.
Ledger LedgerType Optional
Description Indicates if the transaction was for rental or retail.
Available values:

  • Rental
  • Retail
OrgID Long Required
Description The organization’s ID number.
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.
TransactionDate DateTime Required
Description The date the transaction occurred. For a void transaction it must always have been done current day.
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. It can also be retrieved using the GetRentalLedger method.

Returned Parameters

Name DataType
Successful Boolean
Description Indicates if the transaction was voided successfully (“True”) or not (“False”).

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

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

Here is a sample code of the request object:

// VoidTransaction Request
request.OrgID = 123456;
request.SiteID = 123546;
request.AccountID = 123456;
request.AccountName = "Doe, John";
request.Amount = 55.26m;
request.TransactionID = 123546;
request.TransactionDate = new DateTime(2016, 2, 3);
request.Ledger = SWS.LedgerType.Rental;

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

SWS GetRentalLedger Method

May 23, 2011 1 comment

Retrieves a collection of transaction history for a specified account, rental or transaction, for a given time-frame.

Parameters

Name DataType Is Required
AccountID Long Required
Description The account’s ID for which you wish to retrieve the data. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method.
EndDate DateTime Optional
Description The end date of the date range for which you wish to retrieve the data. This will default to today if left undefined.
RentalID Long Optional
Description The rental item’s ID number. This will allow you to specify which rental if the account has more than one rental. This is returned when using the MakeReservation method or can be searched for using the SearchBy method.
StartDate DateTime Optional
Description The start date of the date range for which you wish to retrieve the data. This will default to today if left undefined.
TransactionID Long Optional
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
ACCT_ID Long
Description The account’s ID number.
ADDR_ID String
Description The rental contact’s address ID number.
ASS_DATE DateTime
Description The date and time the assessment was applied to the account.
ASS_ID Decimal
Description The assessment’s ID number.
CHILD_RENTAL_ID String
Description The rental ID for the service or insurance assessment that belongs to this rental.
CLASS_REF Decimal
Description The GL account’s class reference number.
CONTACT_ID String
Description The rental contact’s ID number.
CREATED DateTime
Description The date the ledger item was created.
CREATED_BY Long
Description The user’s ID number that created the ledger item.
CREATED_NAME String
Description The name of the person who created the ledger item. This is the textual value of the CREATED_BY data.
DESCRIP String
Description A description of the ledger item.
EXTENDED Decimal
Description The total amount of the assessment after quantities have been applied.
GL Decimal
Description The GL account’s reference number.
GL_DESC String
Description The GL account’s name.
GL_MAP String
Description The GL account’s reference number.
ITEM_PRICE Decimal
Description The amount to be charged for the assessment.
LASTFOUR String
Description The last four digits of the credit card number if the transaction was a credit card payment.
OBJ_NAME String
Description The name of the item assessed to the account.
PARENT_ASS_ID Decimal
Description The rental ID for the rental that owns this assessment.
PAY_AMT Decimal
Description The portion of the payment that was applied to the specific rental’s ledger.
PAY_REF String
Description The payment type payment type, if transaction is a payment.
QTY Decimal
Description The total number of items that were assessed.
REF_TYPE Integer
Description The numeric value for the assessment type.
RENTAL_ID Decimal
Description The rental item’s ID number.
SITE_ID Long
Description The site’s ID number.
STATUS Integer
Description The numeric value of the transaction’s status.
STATUS_VAL String
Description The alpha-numeric description of the transaction’s status.
TAX Decimal
Description The required tax amount, if the ledger item is not tax exempt.
TNX_DATE DateTime
Description The date the transaction occurred.
TNX_DETAIL_ID Decimal
Description The ID number for the transaction’s detail row.
TNX_ID Decimal
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.
TRAN_TYPE_VALUE Decimal
Description The numeric value of the transaction type.
TRANSACTION_TYPE String
Description The textual value of the transaction type.
VOIDSTAT String
Description Indicates if the assessment can still be voided. This is only applicable to fees, insurance and services. Taxes will show as “Pending” (eligible for voiding) but are not voidable. A tax exempt number must be applied to the rental.

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

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

Here’s my sample code of the Request object.

// GetRentalLedger Request
request.AccountID = 123546;
request.RentalID = 123456;
request.StartDate = DateTime.Today.AddDays(-30);
request.EndDate = DateTime.Now;

Finally we can call the method and pass across the login object and the request object to get our rental ledger 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.GetRentalLedger(user_request, ref 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 GetMiscRevenueClassData Method

May 17, 2011 Leave a comment

Retrieves a collection of miscellaneous revenue class data for making miscellaneous payments.

Parameters

Name Data Type Is Required
SiteID  Long  Required
Description  The site’s ID number. This can be found using the GetSiteList method.

Returned Parameters

Name Data Type
ClassID Long
Description The system generated ID for the revenue class.
MiscClassID Long
Description The system generated ID for the miscellaneous class of the organization.
Description String
Description The name of the revenue class.
ClassRef Long
Description The indicator of what type of revenue class this is.
TaxGroupID Long
Description If the revenue class is taxed this indicates which tax group is used.

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

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

Here’s my sample code of the Request object.

// GetMiscRevenueClassData Request
request.SiteID = 123456;

Finally we can call the method and pass across the login object and the request object to get our misc revenue class data. 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.GetMiscRevenueClassData(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 FIUSelect Method

May 12, 2011 Leave a comment

Allows export of the FIU (Financial Integration Utility) general ledger data in .XML format to the accounting software. It can also be saved to a file path as long as permissions allow for it. This SWS method displays non-exported transaction data for the specified organization, sites and dates.

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 date cannot be greater than today.
OrgID Long Required
Description The organization’s ID number.
Path String Not used for this method.
Description If entered, the file location where the FIU export data will be saved as a .xml file. Permissions for the directory must be set to allow this to occur.
SiteList Long Optional
Description A collection of limited site details for a specified site. 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.

Returned Parameters

Name DataType
TRAN_FIU_DATA TRAN_FIU_DATA
Description The object containing all the date for the call.

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

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

Here’s my sample code of the Request object.

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

Finally we can call the method and pass across the login object and the request object to update our previously exported financial 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.FIUSelect(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.