Archive

Posts Tagged ‘Payment’

SWS GetTotalDue Method

May 23, 2011 Leave a comment

Retrieves the total amount due for specified rental items for an account and can expand the amount to cover future cycles. This will always include at least 1 rental period assessment. This will include all fees and services applicable to the requested time period.

Parameters

Name DataType Is Required
AcctID 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.
Cycles Integer Optional
Description The number of rental periods for which to calculate the total. If no cycle is passed in, it is assumed only one cycle should be used. If a single integer is passed in, it is assumed that all account rentals will be included for the number of cycles indicated. If an array of integers is passed in, it is assumed they match one to one with the array of rental ID’s passed in. If the arrays are of different sizes, an error will occur. The number of cycles starts from the PTD for each rental. You are limited to the number of cycles you can retrieve based on the “Allowed Number of Days Paid Ahead” rule for the site. The rule information can be retrieved using the GetSiteRules and GetSiteRulesValue methods.
IsRetail Boolean Required
Description Indicates that the total retrieved should be for retail assessment only (“True”) or if it should be for the rental assessments only (“False”).
IsRetailAndRental Boolean Required
Description Indicates that the total retrieved should be for both the retail and the rental assessments on the account (“True”) or only for the rental assessments (“False”).
MoveOutDate DateTime Ignored
Description (Deprecated) The date the customer has indicated they will be moving out.
RentalID Long Optional
Description The rental item’s ID number. Use an array to choose which rentals will be included in the response. If no rental ID is indicated it will default to all rentals on the account. All rentals must belong to the account. 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 DataType
Details Decimal
Description The total amount due for the applied assessments.

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

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

Here’s my sample code of the Request object using a single rental from the account and requesting the oldest cycle’s total due.

// GetTotalDue Request
request.SiteID = 123456;
request.AcctID = 123456;
request.RentalID = new long[] { 123456 };
request.Cycles = new int[] { 1 };
request.IsRetail = false;
request.IsRetailAndRental = false;

Finally we can call the method and pass across the login object and the request object to get our total due. 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.GetTotalDue(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 GetPartialPayRules Method

May 23, 2011 Leave a comment

Retrieves site rule values that determine if and how partial payments are applied.

Parameters

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

Returned Parameters

Name DataType
AllowsPartialPay String
Description Indicates if the site allows partial payments (“True”) or not (“False”).
AllowsPartialRentPay String
Description Indicates if the site allows partial payment son delinquent rentals (“True”) or not (“False”).
PriorityList ArrayOfString1
Description The order, highest to lowest priority, in which any payment will apply to assessments.

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

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

Here’s my sample code of the Request object.

// GetPartialPayRules Request
request.SiteID = 123456;

Finally we can call the method and pass across the login object and the request object to get our partial pay rules. 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.GetPartialPayRules(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.

Categories: API General, Payments, Rules Tags: ,

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 GetCashCredits Method

May 13, 2011 Leave a comment

Retrieves the available cash credit/escrow for a selected AccountID or RentalID number.

Parameters

Name DataType Is Required
AccountID Long Optional*
Description The accounts ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method.
* Either AccountID or RentalID is required.
RentalID Long Optional*
Description The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method.
* Either AccountID or RentalID is required.
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.

Returned Parameters

Name DataType
ACCT_ID Long
Description The account’s ID number.
AMT Decimal
Description The original amount of the cash credit/escrow.
BALANCE Decimal
Description The remaining amount of the cash credit/escrow if any portion of it has been used.
CREATED DateTime
Description The date and time the credit was created.
CREDIT_TYPE Integer
Description The numeric value for the credit type.
CREDIT_TYPE_VALUE String
Description The textual description of the CREDIT_TYPE value.
ESCROW_ID Long
Description The cash credit/escrow item’s ID number.
REF_ID Long
Description The cash credit/escrow’s reference ID number.
REF_TYPE Integer
Description The numeric value for the assessment type.
REF_TYPE_VAL String
Description The assessment type’s textual value.
SITE_ID Long
Description The site’s ID number.
TNX_ID Long
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.
VERSION Integer
Description The unit’s version number which serves to prevent duplicate use of the unit.

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

// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetCashCredits_Request request = new SWS.GetCashCredits_Request();
SWS.CASH_CREDITS[] response;

Here’s my sample code of the Request object using the account ID.

// GetCashCredits Request
request.SiteID = 123456;
request.AccountID = 123456;

Finally we can call the method and pass across the login object and the request object to get our cash credit/escrow. 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.GetCashCredits(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.

Categories: API General, Credits, Payments Tags: ,