Archive
SWS GetReservations Method
Retrieves the reservation history for a specified rental account.
Parameters
Name | DataType | Is Required |
---|---|---|
AcctID | Long | Optional |
Description | The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method. | |
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 |
---|---|
ACCESS_TYPE | Integer |
Description | The numeric value for the “Access Type” custom look up as defined by the site. See eUnitAccessType for the available values. |
ACCESS_TYPE_VAL | String |
Description | The textual value for the “Access Type” custom look up as defined by the site. See eUnitAccessType for the available values. |
ACCT_ID | Long |
Description | The account’s ID number. |
ACCT_NAME | String |
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. |
ADMIN_FEE | Decimal |
Description | The administrative fee, if there is one. |
ATTRIBUTE01 | Integer |
Description | The numeric value for the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. |
ATTRIBUTE01_VAL | String |
Description | The textual value for the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. |
ATTRIBUTE02 | Integer |
Description | The numeric value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
ATTRIBUTE02_VAL | String |
Description | The textual value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
CHANNEL | Integer |
Description | The access channel that created the reservation. (I.E., Store Application, EStore. This is customized by the site.) |
CLASS_TYPE | Decimal |
Description | The numeric value for the “Class” custom look up as defined by the site. See eUnitClass for the available values. |
CLIMATE | Integer |
Description | The numeric value for the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. |
CLIMATE_VAL | String |
Description | The textual value for the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. |
CREATED | DateTime |
Description | The date and time the reservation was created. |
CREATED_BY | Long |
Description | The user ID for the person that created the reservation. |
CREATED_BY_NAME | String |
Description | The name of the person that created the reservation. |
DEPOSIT | Decimal |
Description | The amount of the security deposit. |
DEPTH | Decimal |
Description | The depth measurement of the rental item. |
DISC_AMT | Decimal |
Description | The amount of any discount or promotion offered at the time of booking the reservation. |
DOOR | Integer |
Description | The numeric value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
DOOR_VAL | String |
Description | The textual value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
EXPIRATION | DateTime |
Description | The date that the reservation expires. |
FEATURES | Integer |
Description | The numeric value for the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. |
FEATURES_VAL | String |
Description | The textual value for the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. |
GATE_KEYPAD | Integer |
Description | The gate keypad access pin assigned to the rental item. |
ICON | String |
Description | The URL for the site revenue class icon that displays in the Store application. |
INQUIRY_SOURCE | Integer |
Description | The numeric value of the customized inquiry source for the site. This lets the site track how customers find them. |
LOST_DEMAND_REASON | Integer |
Description | The lost demand reason in the form of a numeric indicator as to why a potential customer failed to initiate a rental. Available values:
These are the default values set by Store, however, they can be customized by the site, so there may be additional values. |
MKT_CODE | Long |
Description | The promo code’s ID number. |
MKT_SOURCE | Long |
Description | The promo code’s value. |
OBJ_PERIOD | Long |
Description | The frequency of which the UOM is accrued on the account. For example 2 would indicate that every 2 months is 1 UOM or rental cycle. |
OBJ_PERIOD_UOM | Integer |
Description | The numeric value for the “unit of measure” (UOM) type of rental cycle. Currently the only option is “4”. |
OBJ_PERIOD_UOM_VAL | String |
Description | The textual value for the “unit of measure” (UOM) type of rental cycle. Currently the only option is “Month”. |
PRICE | Decimal |
Description | The quoted monthly rent for the rental item. |
PRORATE_AMT | Decimal |
Description | If the site is first of the month, this is the amount the customer must pay from the date of move-in to the end of the month. |
QUOTE_ID | Long |
Description | The quote’s ID number. |
QUOTE_START_DATE | DateTime |
Description | The date the reservation/quote was created. |
QUOTE_TYPE | Integer |
Description | The numeric value for the quote’s type. Available values:
|
RENT_NOW | Boolean |
Description | Indicates if the reservation’s status is set to “RentNow” (“True”) or not (“False”). |
RENTAL_ID | Long |
Description | The rental item’s ID number. |
RES_DEPOSIT | Decimal |
Description | The reservation deposit amount. |
RES_GROUP_ID | Decimal |
Description | The reservation group’s ID number that groups multiple rental item reservations together within an account. |
SITE_CLASS_ID | Long |
Description | The site’s revenue class ID number that describes the general rules for the type of rental. |
SITE_ID | Long |
Description | The site’s ID number. |
SQ_FEET | Integer |
Description | The square feet of the rental item as a result of width multiplied by depth. |
STATUS | Integer |
Description | Indicates the status of the reservation.
|
STREET_RATE | Decimal |
Description | The current street rate of the unit. |
TAX | Decimal |
Description | The required tax amount, if the rental item is not tax exempt. |
TOT_AMT | Decimal |
Description | The total amount of funds not paid to date. |
UNIT_ID | Long |
Description | The unit’s ID number. This is maintained through rentals. |
UNIT_NUMBER | String |
Description | The unit’s number as assigned by the organization. This is not the UnitID. |
WIDTH | Decimal |
Description | The width of the rental item. |
QUOTE_NOTE_ID | Long |
Description | The note’s ID. |
QUOTE_ID | Long |
Description | The ID for the quote record. |
QUOTE_NOTES | String |
Description | The notes that were entered at the time of quote creation. |
CREATED_BY | Long |
Description | The user’s ID that created the notes. |
CREATED_BY_FIRST_NAME | String |
Description | The first name of the user that created the notes. |
CREATED_BY_LAST_NAME | String |
Description | The last name of the user that created the notes. |
UPDATED_BY | Long |
Description | The user’s ID that updated the notes, if they’ve been updated. |
TRAN_QUOTE_PCD: QUOTE_PCD_ID | Long |
Description | The PCD’s ID for the quote record. |
TRAN_QUOTE_PCD: QUOTE_ID | Long |
Description | The quote record’s ID. |
TRAN_QUOTE_PCD: PCD_ID | Long |
Description | The ID specific to the PCD. |
TRAN_QUOTE_PCD: ACTIVE | Boolean |
Description | If the PCD is still active or not. |
TRAN_QUOTE_PCD: CREATED | DateTime |
Description | The date the quote record was created. |
TRAN_QUOTE_PCD: UPDATED | DateTime |
Description | The date the quote was updated, if it was updated. |
TRAN_QUOTE_PCD: CREATED_BY | Long |
Description | The user id for the user that created the quote record. |
TRAN_QUOTE_PCD: UPDATED_BY | Long |
Description | The user ID for the user that updated the quote record, if it was updated. |
TRAN_QUOTE_PCD: DISC_AMT | Decimal |
Description | The amount of the discount. See TRAN_QUOTE_PCD_DETAIL for additional information. |
TRAN_QUOTE_PCD_DETAIL | TRAN_QUOTE_PCD_DETAIL |
Description | The object containing the promotional details. |
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 GetReservations request object and a GetReservations response object. As part of the request object we also need RentalContact and an array of RentalContact. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetReservations_Request request = new SWS.GetReservations_Request();
SWS.GetReservations_Response response;
Here’s my sample code of the Request object.
// GetReservations Request
request.OrgID = 123546;
request.SiteID = 123456;
request.AcctID = 123456;
Finally we can call the method and pass across the login object and the request object to get our reservations. 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.GetReservations(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 eInquirySource Method
Retrieves the organizations customized list of inquiry source values.
Parameters
Name | DataType | Is Required |
---|---|---|
OrgID | Long | Required |
Description | The organization’s ID number. |
Returned Parameters
Name | DataType |
---|---|
CFG_LOOKUPS | CFG_LOOKUPS |
Example
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 and a eInquirySource response object. We can define and create those like this:
// Create request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.CFG_LOOKUPS[] response;
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.eInquirySource(123456);
}
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 CancelReservation Method
Cancels a reservation made for specified rental item(s) and/or quote(s). Returns data regarding possible refunds. Note: If the rental contact information is not supplied and the refund data indicates a refund should be processed, the contact information will default to the rental item(s) primary contact information.
Parameters
Name | DataType | Is Required |
---|---|---|
Request | CancelReservation_Request | Required |
Description | Request object that includes the required fields for the method. |
Returned Parameters
Name | DataType |
---|---|
AvailableRefundAmount | Decimal |
Description | The processed refund amount, if warranted. |
ErrorMessage | String |
Description | A message about any problem that occurred during the process, including details to locate errant code. |
HasDeposit | Boolean |
Description | Indicates if a refund will be processed (“True”) or not (“False”). |
ObjectID | Long |
Description | The rental_id that was cancelled. |
RefundMessage | String |
Description | The message associated with the success or failure of processing the refund. |
Succeeded | Boolean |
Description | Indicates if the cancellation was successful (“True”) or not(“False”). |
TranID | String |
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. |
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 CancelReservation request object and a CancelReservation response object. We can define and create those like this:
// Create a request and response objects and contact info object
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.CancelReservation_Request request = new SWS.CancelReservation_Request();
SWS.CancelReservation_Response response;
SWS.ContactInfo contact_info = new SWS.ContactInfo();
Here’s my sample code of the Request object.
// Contact Data contact_info.AccountID = 123456; contact_info.Address1 = "123 Main St."; contact_info.City = "My Town"; contact_info.State = "UT"; contact_info.PostalCode = "00000"; contact_info.ContactName = "First Last"; // To cancel quote(s) request.AcctID = 123456; request.QuoteIDs = new long?[] { 123456, 654321 }; request.LostDemandReason = SWS.Lost_Demand_Reasons.Availability; request.LostDemandNotes = "Unit size no longer available"; request.ContactData = contact_info; // OR To cancel rentals(s) request.AcctID = 123456; request.RentalIDs = new long?[] { 123456, 654321 }; request.LostDemandReason = SWS.Lost_Demand_Reasons.Availability; request.LostDemandNotes = "Unit size no longer available"; request.ContactData = contact_info;
Finally we can call the method and pass across the login object and the request object to cancel the 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.CancelReservation(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.
Please check around Centershift DevX for additional articles about the vast methods available in Store Enterprise/Advantage SWS to power your application.
ATTN: As of 2/21/2013 There is no need to call a SWS method to process a refund after calling CancelReservation. The CancelReservation SWS method takes care of the refund.
Multiple reservations under one credit card transaction can now be canceled and refunded back to the credit card. For example, if three reservations were paid with one credit card payment, CancelReservation will now refund the full amount to the credit card. In this example, each reservation can also be canceled one at a time and all refunds will go back to the card.
Multiple reservations on the same account under separate transactions can also be refunded correctly to a credit card.
The CancelReservation optional parameter RefundData in the request object is no longer used. The RefundData.PaymentType is now determined by the payment type of the original transaction. If the payment type is credit card, then it will be refunded back to the credit card. If it is any other payment type, including cash, then the refund will default to a check. If a single reservation transaction has multiple payment types, then a check refund will be created.
For a full list of methods see SWS Methods.
SWS CancelReservationCashCredit Method
Cancels a reservation made for specified rental item(s) and/or quote(s) AND credits an alternate rental on the account with the refund amount. Note: If you are canceling a reservation and NOT crediting the refund to an alternate rental, use the CancelReservation method.
Parameters
Name | DataType | Is Required |
---|---|---|
RefundInfo | RefundData | Required |
Description | The object containing the refund information for the cancellation. | |
Request | CancelReservation_Request | Required |
Description | The object containing the cancellation information. |
Returned Parameters
Name | DataType |
---|---|
Succeeded | Boolean |
Description | Indicates that the reservation was cancelled 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 CancelReservationCashCredit request object and a CancelReservationCashCredit response object. We can define and create those like this:
// Create a request and response objects and RefundData and ContactInfo objects.
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.CancelReservation_Request res_request = new SWS.CancelReservation_Request();
SWS.RefundData refund_request = new SWS.RefundData();
SWS.CancelReservationCashCredit_Response response;
SWS.ContactInfo contact_info = new SWS.ContactInfo();
Here’s my sample code of the Request object.
// Contact Data contact_info.AccountID = 123456; contact_info.Address1 = "123 Main St."; contact_info.City = "My Town"; contact_info.State = "UT"; contact_info.PostalCode = "00000"; contact_info.ContactName = "First Last"; // Refund Data refund_request.ApplyRefundRentalID = 123456; refund_request.RefundType = SWS.RefundTypes.CASH_CREDIT; // To cancel reservations(s) res_request.AcctID = 123456; res_request.RentalIDs = new long?[] { 123456, 654321 }; res_request.LostDemandReason = SWS.Lost_Demand_Reasons.Availability; res_request.LostDemandNotes = "Unit size no longer available"; res_request.ContactData = contact_info;
Finally we can call the method and pass across the login object and the request object to cancel the 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.CancelReservationCashCredit(user_request, res_request,
refund_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.