Archive

Posts Tagged ‘Credits’

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: ,

SWS GetAvailableCredits Method

May 12, 2011 Leave a comment

Retrieves a collection of PCD data for any credits that are available for the organization and site.

Parameters

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

Returned Parameters

Name DataType
ACTIVE Boolean
Description Indicates if the credit is available to use (“True”) or not (“False”).
AMT_TYPE Integer
Description The numeric value that represents the type of credit. As account credits this will always be “1”.
CREDIT_LEVEL Integer
Description The credit level required to be able to apply the PCD. This is based on the credit level assigned to a user in the User Admin/Permissions feature in Store.
DELINQUENCY_LIMIT Integer
Description The maximum number of rental cycle periods an account can be delinquent, and still receive the credit.
DISP_AMT String
Description The minimum and maximum amounts that are available for the credit.
EXPIRES DateTime
Description The date that the credit can no longer be used towards assessments.
LIMIT_ACTION Integer
Description Not currently used.
LIMIT_TYPE Integer
Description Not currently used.
LOS_REQ Decimal
Description The minimum number of rental cycle periods that must be paid for to qualify for the credit.
ORG_ID Long
Description The organization’s ID number.
PAY_LOGIC String
Description Indicates how the credit can be applied to the rental. This will always be “occurs 1” for credits.
PAYMENT_REQUIRED Boolean
Description Indicates if payment is required immediately (“True”) or not (“False”). This should always be “False” for credits.
PCD_AMT_DEFAULT Decimal
Description The default amount of the credit, if no amount is specified. If this was not set by the admin when the credit was created, it will be the minimum amount.
PCD_AMT_MAX Decimal
Description The maximum credit amount that can be applied.
PCD_AMT_MIN Decimal
Description The minimum credit amount that can be applied.
PCD_CLASS Integer
Description The numeric value that represents the PCD class.
Available values:

  • 1 – Promotion
  • 2 – Credit
  • 3 – Discount
  • 4 – Rate Modification

This should always be “Credit” for this method.

PCD_DESC String
Description The description of the credit as defined by the organization.
PCD_ID Long
Description The credit’s ID number.
PCD_NAME String
Description The name of the credit as defined by the organization.
PCD_PERIODS Integer
Description The number of rental cycle periods the credit is available to be applied.
PCD_REV_CAT Integer
Description The numeric value that represents the revenue category. This will always be “1” for a credit, but credits can be applied until no funds are left of the credit.
REASON_PROMPT Integer
Description Indicates if a reason for providing the credit is required and what form it will take. This can be customized by the organization. Contact the organization for available values.
SITE_ID Decimal
Description The site’s ID number.
STARTS DateTime
Description The date the credit was created and 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 GetAvailableCredits request object and a GetAvailableCredits response object.  We can define and create those like this:

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

Here’s my sample code of the Request object.

// GetAvailableCredits Request
request.OrgID = 123456;
request.SiteID = 123456;

Finally we can call the method and pass across the login object and the request object to get our available credits. 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.GetAvailableCredits(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: ,

SWS GetAvailableDiscounts Method

May 5, 2011 Leave a comment

Retrieves a collection of discount data for a specified rental item. This is specific to discounts and promotions, it does not include credits.

Parameters

Name DataType Is Required
OrgID Long Required
Description The organization’s ID number.
RentalID Long Optional*
Description The Rental_ID for which to retrieve possible discounts. Use this for existing rentals. This is returned when using the MakeReservation method or can be searched for using the SearchBy method.
* Either the Rental_ID or Unit_ID is required.
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.
UnitID Long Optional*
Description The unit’s ID number. This is returned when you use any of the GetSiteUnitData calls and is maintained through rentals.
* Either the Rental_ID or Unit_ID is required.

Returned Parameters

Name DataType
APPL_BEST_PCD APPL_BEST_PCD
Description Returns the object containing the data for the method 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 GetAvailableDiscounts request object and a GetAvailableDiscounts response object. We can define and create those like this:

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

Here’s my sample code of the Request object.

// GetAvailableDiscounts Request for an available unit
request.OrgID = 123456;
request.SiteID = 123456;
request.UnitID = 123456;

Finally we can call the method and pass across the login object and the request object to retrieve our discounts. 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.GetAvailableDiscounts(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 ApplyCreditToAssessments Method

April 26, 2011 Leave a comment

Applies an already created Manager’s Credits to currently due assessments (non-volatile) or future assessments (volatile) that are within 30 days of being due. Manager’s Credits must have been added to the account using the AddUpdatePCD SWS method or through the application. Note: promotions, discounts and rate modications are not used with this SWS method.

Parameters

Name DataType Is Required
AssessId Long Required
Description The assessment’s ID number. This is retrieved using the GetAssessments method.
AssessVersion Integer Required
Description The assessment’s version number. This is retrieved using the GetAssessments method.
ApplyAmt Decimal Required
Description The amount to apply to the specified assessment. This can be all or only a portion of the available manager’s credit.
OrgID Long Required
Description The organization’s ID number.
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.
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.

Returned Parameters

Name DataType
Successful Boolean
Description Indicates that the application of the manager’s credit was successful (“True”) or not (“False”).

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

 // Create request and response objects and assessment info object
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.ApplyCreditToAssessments_Request request = new SWS.ApplyCreditToAssessments_Request();
SWS.ApplyCreditToAssessments_Response response;

SWS.AssessInfo assess_data = new SWS.AssessInfo();

Here’s my sample code of the Request objects.

//Create assessment info object
assess_data.AssessId = 123456;
assess_data.AssessVersion = 3;
assess_data.ApplyAmt = 10.50m;

//Applies the credit to the assessment
request.OrgID = 123456;
request.SiteID = 123456;
request.RentalID = 123456;
request.AssessmentInfo = new SWS.AssessInfo[] { assess_data };

We can call the method and pass across the login object and the request object for applying credits to assessments. It’s a good idea to do this in a Try Catch block.

try
{
   // Call the method that will load the response object
   response = service.ApplyCreditToAssessments(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.