Archive
SWS GetAutoPaySettings Method
Retrieves autopay account settings for a rental item with an active autopay rental (default). Retrieves autopay settings for the entire account if no rental item has an active autopay account.
Parameters
Name | DataType | Is Required |
---|---|---|
ActiveOnly | Boolean | Optional |
Description | Adds a filter to return only active autopays (“True”) or inactive autopays (“False”). Defaults to “True.” | |
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 |
---|---|
AccountType | APAccountType |
Description | The ACH account type. Available values:
|
ACHInfo | APACHData |
Description | The ACH data object if ACH was used for the autopay. |
AutoPayID | Long |
Description | The AutoPay credit card’s ID number. If it’s a new AutoPay credit card then it is undefined, if it is an updated AutoPay credit card, it is required for the update. |
City | String |
Description | The credit card billing city for the address. Max string length of 50. |
CreditCardData | APCreditCardData |
Description | The credit card information, if credit card information was added to autopay. |
IsActive | Boolean |
Description | Indicates whether the autopay is active (“True”) or not (“False”). |
PostalCode | String |
Description | The credit card billing postal/ZIP code for the address. Max string length of 25. |
Receipt | APReceiptTypes |
Description | The AutoPay receipt type to be sent to the customer. Default is “None”. Available values:
|
RentalID | Long |
Description | The rental item’s ID number. |
State | String |
Description | The credit card billing state/province for the address. Max string length of 50. |
Street | String |
Description | The credit card billing street address. Max string length of 50. |
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 GetAutoPaySettings request object and a GetAutoPaySettings response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetAutoPaySettings_Request request = new SWS.GetAutoPaySettings_Request();
SWS.GetAutoPaySettings_Response[] response;
Here’s my sample code of the Request object.
// GetAutoPaySettings Request
request.SiteID = 123456;
request.RentalID = 1123456;
request.ActiveOnly = true;
Finally we can call the method and pass across the login object and the request object to perform our reservation. 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.GetAutoPaySettings(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 GetAvailableCredits Method
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:
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.
SWS viewReceiptPdf Method
Provides a URL to view the requested document.
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. | |
PdfTemplateID | Long | Required |
Description | The receipt’s ID number. You are able to retrieve this ID using the LTR_TYPE_ID from the getReceiptTemplateInfo method. | |
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 |
---|---|
TntPdfFilePath | String |
Description | The file path to where the receipt is stored. Here is an example of what the receipt path might look like:
https://csiapp1.centershift.com/qa40/letters/ 1000053626__1000305633_receipt.pdf |
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 createOrViewReceipt request object, and a PdfFilePath response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.createOrViewReceipt_Request request = new SWS.createOrViewReceipt_Request();
SWS.PdfFilePath_Response response;
Here is a sample code of the request object:
// ViewReceiptPDF Request
request.SiteID = 123546;
request.AcctID = 123456;
request.TransactionID = 123456;
request.PdfTemplateID = 123456;
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.viewReceiptPdf(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 ApplyCreditToAssessments Method
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.