Archive
SWS RemovePCD Method
Removes an applied promotion, credit or discount (PCD) from a rental item.
Parameters
Name | DataType | Is Required |
---|---|---|
AssessmentID | Long | Required |
Description | The ID of the assessement that should be removed. This can be retrieved using the GetAssessments method. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
Succeeded | Boolean |
Description | Indicates if the PCD was removed from the rental 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’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 RemovePCD request object and a RemovePCD response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.RemovePCD_Request request = new SWS.RemovePCD_Request();
SWS.RemovePCD_Response response;
Here’s my sample code of the Request object.
// RemovePCD Request
request.SiteID = 123456;
request.AssessmentID = 123456;
Finally we can call the method and pass across the login object and the request object to remove our PCD. 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.RemovePCD(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 ApplyPCDs Method
Adds a specified Promotion or Discount (PCD) to a rental item. See ApplyCreditToAssessments for applying credits.
Parameters
Name | DataType | Is Required |
---|---|---|
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. | |
PCDItem | NewPCDItem | Required |
Description | The PCD to apply to the rental item that was retrieved from the GetAvailableDiscounts SWS method. |
Returned Parameters
Name | DataType |
---|---|
Succeeded | Boolean |
Description | Indicates that the PCD was applied 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’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 ApplyPCDs request object and an ApplyPCDs response object. We can define and create those like this:
// Create request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.ApplyPCDs_Request request = new SWS.ApplyPCDs_Request();
SWS.ApplyPCDs_Response response;
We then fill in the data for the request:
//Applies a PCD to a rental
request.OrgID = 123456;
request.SiteID = 123456;
request.RentalID = 123456;
request.PCDItem.PCD_ID = 123456;
request.PCDItem.EffDate = DateTime.Today;
request.PCDItem.DiscountAmount = 10;
request.PCDItem.RevenueCategory = 1;
request.PCDItem.IsPromoDiscCredit = SWS.PCDType.Promotion;
Finally we can call the method and pass across the login object and the request object to apply our PCDs. 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.ApplyPCDs(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 AddUpdatePCD Method
Adds or updates a Promotion, Credit or Discount (PCD) definition which includes name, description, PCD type, discount amounts and other parameters.
Parameters
Name | DataType | Is Required |
---|---|---|
ACTIVE | Boolean | Required |
Description | Indicates whether the promotion is active (“True”) or not (“False”). Defaults to “True” if not defined. | |
ALL_SITES | Boolean | Required |
Description | Indicates if the promotion is available at all sites in the organization (“True”) or not (“False”). Defaults to “True” if left undefined. | |
AMT_TYPE | PcdAmountType | Required |
Description | The PCD amount type. Available values:
|
|
BARCODE | Long | Optional |
Description | The barcode value’s number for a PCD coupon. Default value is “Null”. | |
COUPON_CODE | String | Optional |
Description | The coupon code for the PCD to store it for newspaper, magazine and promotional pieces. | |
CREDIT_LEVEL | PcdCreditLevels | Required |
Description | The users credit level is set in their permissions by an admin. Based on the credit level, this will restrict the application of the PCD to users of the applicable credit level. Available values:
Check with the organization for what level should apply to your PCD. |
|
DELINQUENCY_LIMIT | Integer | Required |
Description | The maximum number of delinquency steps an account can be in before the PCD is invalidated. Default is “1”. | |
EXPIRES | dateTime | Required |
Description | The date the promotion is no longer available. | |
LIMIT_ACTION | PcdLimitApplicability | Do Not Use |
Description | Not currently being used. Default is “Do Not Limit”. Available values:
|
|
LIMIT_TYPE | PcdLimitType | Do Not Use |
Description | Not currently being used. Default is “Account Level Dollar Amount”. Available values:
|
|
LOS_REQ | Decimal | Required |
Description | A numeric value indicating the number of rental periods required to qualify for the PCD. | |
ORG_ID | Long | Required |
Description | The organization’s ID number. | |
PAYMENT_REQUIRED | Boolean | Required |
Description | Indicates if the new PCD will require prepayment (“True”) or not (“False”). Default is “False”. | |
PCD_AMT_DEFAULT | Decimal | Required |
Description | The default discount amount to be applied for the PCD. For example, if 5 is entered here and it is a PcdAmountType of DiscountAmount the customer receives a $5 discount. If it’s a DiscountPercentage, they would receive a 5% discount. If it’s a PriceOverride the rent rate of the unit would be $5 for the number of applicable rental periods. | |
PCD_AMT_MAX | Decimal | Required |
Description | The maximum discount amount to be applied for the PCD. Default is the PCD_AMT_DEFAULT. For example, If you set this to be a variable amount, such as a manager’s credit, this would set the max credit that could be provided. | |
PCD_AMT_MIN | Decimal | Required |
Description | The minimum discount amount to be applied for the PCD. Default is PCD_AMT_DEFAULT. For example, If you set this to be a variable amount, such as a manager’s credit, this would set the minimum credit that could be provided. | |
PCD_CLASS | PcdClass | Required |
Description | The PCD type to be created or modified. Default is “Promotion”. Available values:
|
|
PCD_DESC | String | Required |
Description | A brief description of the PCD . Default is “Null”. | |
PCD_ID | Long | Optional* |
Description | The PCD’s ID number. If adding a PCD, leave this undefined. * If updating a current PCD this is required |
|
PCD_NAME | String | Required |
Description | The name of the PCD as it will appear, if displayed. Default is “Null”. | |
PCD_PERIODS | Integer | Required |
Description | The number of rental periods to which the discount will apply. For example, if you have a PriceOverride discount and it should only apply to the first 2 months, you would enter 2 for this parameter. | |
PCD_PRIORITY | Integer | Required |
Description | The priority level. If multiple PCD’s are available for a rental item, the PCD with the lowest integer displays as the available PCD, regardless of the monetary savings to the customer. Default is “Null”. | |
PCD_REV_CAT | PcdRevenueCategory | Required |
Description | The revenue class to which the PCD applies. Currently the only available value is RentalItem. | |
PCD_START_PERIOD | PcdStartPeriod | Required |
Description | Whether to apply the discount to the beginning or end of the rental period time frame. For example if the promotion is “Buy 11 months get the 12th month free” you would choose the EndOfRequiredLOS. This would apply the free month to the last month. Available values:
|
|
REASON_PROMPT | PcdReasonPrompt | Required |
Description | The require user provided reason prompt. Default is “Not Required”. Available values:
|
|
ROLLOVER | Boolean | Optional |
Description | Indicates if the full amount of the discount will be applied even for partial months (“True”) or not (“False”). Default is “Null”. | |
STARTS | dateTime | Optional |
Description | The effective start date the PCD will first be available to the sites. Default is “Null”. | |
TRANSFERABLE | Boolean | Optional |
Description | Indicates if the PCD can be transferred to a new rental (“True”) or not (“False”). Default is “False”. |
Returned Parameters
Name | DataType |
---|---|
PcdID | Long |
Description | The PCD’s ID number that is system-generated when a PCD is successfully created or updated. A null result indicates failure. |
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 AddUpdatePCD request object and an AddUpdatePCD response object. We can define and create those like this:
// Create request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.AddUpdatePCD_Request request = new SWS.AddUpdatePCD_Request();
SWS.AddUpdatePCD_Response response;
Here’s my sample code of the Request object.
//Adds a New PCD to the organization
request.ORG_ID = 123456;
request.ACTIVE = true;
request.ALL_SITES = true;
request.AMT_TYPE = SWS.PcdAmountType.DiscountAmount;
request.CREDIT_LEVEL = SWS.PcdCreditLevels.Level1;
request.DELINQUENCY_LIMIT = 1;
request.EXPIRES = new DateTime(2020, 1, 15);
request.LOS_REQ = 1;
request.PAYMENT_REQUIRED = true;
request.PCD_AMT_DEFAULT = 15;
request.PCD_AMT_MAX = 20;
request.PCD_AMT_MIN = 10;
request.PCD_CLASS = SWS.PcdClass.Promotion;
request.PCD_DESC = "A percentage off for move ins";
request.PCD_NAME = "Move In - Percentage Off";
request.PCD_PERIODS = 1;
request.PCD_PRIORITY = 1;
request.PCD_REV_CAT = SWS.PcdRevenueCategory.RentalItem;
request.PCD_START_PERIOD = SWS.PcdStartPeriod.StartOfRequiredLOS;
request.REASON_PROMPT = SWS.PcdReasonPrompt.NotRequired;
request.ROLLOVER = false;
request.STARTS = DateTime.Today;
request.TRANSFERABLE = false;
Finally we can call the method and pass across the login object and the request object for updating merchandise items. 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.AddUpdatePCD(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.