Archive
SWS2 CancelReservation Method
Allows you to cancel a reservation or an array of reservations.
Parameters
Name | Data Type | 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. | |
AccountID | 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. | |
Address1 | String | Required |
Description | The first address line of the contact’s address. | |
Address2 | String | Required |
Description | The second address line of the contact’s address. | |
City | String | Required |
Description | The city of the contact’s address. | |
ContactName | String | Required |
Description | The first and last name of the account contact. | |
Country | String | Required |
Description | The country of the contact’s address. | |
PostalCode | String | Required |
Description | The postal/ZIP code of the contact’s address. | |
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. | |
State | String | Required |
Description | The state/province of the contact’s address. | |
DenyDepositRefund | Boolean | Required |
Description | Indicates the deposit will be refunded (“True”) or retained (“False”). | |
DenyRefundReason | String | Required |
Description | An explanation of why the refund of the deposit was denied. | |
LostDemandNotes | String | Required |
Description | Explanation of why the customer chose to cancel the reservation rather than rent the unit. | |
LostDemandReason | Integer | Required |
Description | The reason the customer chose not to rent. This can be customized by the organization’s admin. Contact the organization for their list of reasons. | |
QuoteIds | Long | Required |
Description | The quote IDs that you wish to cancel. This can be a single quote id or an array. The quote ID is returned when you use the MakeReservation method. | |
RentalIDs | Long | Required |
Description | The rental IDs that you wish to cancel. This can be a single rental ID or an array. The rental ID is returned when you use the MakeReservation method. This array needs to match 1 to 1 with the QuoteIds array. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the SearchBy method. |
Returned Parameters
Name | Data Type |
---|---|
AvailableRefundAmount | Decimal |
Description | The amount that is being refunded to the customer. |
ErrorMessage | String |
Description | The message explaining why the cancellation was unsuccessful. |
HasDeposit | Boolean |
Description | Indicates if there was a deposit on the reservation (“True”) or not (“False”). |
ObjectID | Long |
Description | The unit’s ID number. This is maintained through rentals. |
RefundMessage | String |
Description | |
Succeeded | Boolean |
Description | “True” indicates that the reservation/s were cancelled successfully, or “False” if not. |
TranID | 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. |
Example
We’ll assume you’ve got a web reference, let’s name it Store, in your Visual Studio project. At this point we need to reference our objects. We’ll need the standard service object, a CancelReservation_Request request object and a SWS2ContactInfo object. You will also need to pass in credentials. We can define and create those like this:
// Create a request and response objects
StoreServiceClient client = new StoreServiceClient();
CancelReservation_Request request = new CancelReservation_Request();
SWS2ContactInfo thisCon = new SWS2ContactInfo();
As with every method we need to pass in credentials. We also set up the parameters for our request.
//Cancel reservation setup
client.ChannelFactory.Credentials.UserName.UserName = "user";
client.ChannelFactory.Credentials.UserName.Password = "pass";
client.ChannelFactory.Credentials.SupportInteractive = true;
thisCon.AccountID = 123456;
thisCon.RentalID = 123456;
thisCon.ContactName = "John Doe";
request.SiteID = 123456;
request.AcctID = 123456;
request.ContactData = thisCon;
request.RentalIDs = new long[] { 123456 };
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.
try
{
// Call the method that will load the response object
object resp;
resp = client.CancelReservation(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 SWS2 Methods.
SWS SetUpMoveOut Method
Makes a partial payment on rental item(s) for the specified account, based on information retrieved from the GetPrePayMoveOutInfo SWS method. This SWS method cannot be used without calling the GetPrePayMoveOutInfo SWS method first and will also update the intended move out date of the rental item(s). This payment method allows you to use two payment types at one time, with up to three payments per type.
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. | |
CashCreditID | Long | Optional |
Description | The cash credit/escrow ID number. This is required if you wish to apply a cash credit/escrow. | |
CashInfo | Decimal | Optional* |
Description | The amount of cash used in the transaction. *At least one payment type is required. |
|
CheckInfo | CheckData | Optional* |
Description | The object containing the required information for a check payment. *At least one payment type is required. |
|
CreditCardInfo | CreditCardData | Optional* |
Description | The object containing the required information for a credit card payment. *At least one payment type is required. |
|
MoveOutDate | DateTime | Required |
Description | The date the rental will be vacated. This will not automatically end the rental on that day but will update the intended termination date in Store. | |
PaymentCode | String | Required |
Description | A Store-generated payment code. Use the GetPrePayMoveOutInfo SWS method for this code. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
TranID | 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. |
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 SetupMoveOut request object, and a SetupMoveOut response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.SetupMoveOut_Request request = new SWS.SetupMoveOut_Request();
SWS.SetupMoveOut_Response response;
Here is a sample code of the request object:
// SetupMoveOut Request
request.SiteID = 123456;
request.AcctID = 213456;
request.MoveOutDate = new DateTime(2017, 9, 1);
request.PaymentCode = "iNR3+yqF8ACI1Hf7KoXwAAAAAAAAAAAAAAAAADvBDRE=";
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.SetupMoveOut(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 CancelReservationV3 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. It also lets you retain the refund which was not possible in the original method. This method also allows you to use the organizations customized LostDemandReason, rather than using the applications presets.
Parameters
Name | Data Type | 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. | |
RentalIDS | Long | Required |
Description | The rental items id numbers. This can be an array if there are multiple rentals that need to be cancelled. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. | |
QuoteIDs | Long | Required |
Description | The quote’s ID number. This can be an array of quotes if there are multiple quotes that need to be cancelled. This is returned when processing the MakeReservation method or can be retrieved using the GetReservations method. | |
LostDemandReason | Integer | Required |
Description | The lost demand reason as to why a potential customer failed to initiate a rental. You will need to contact the site for their customized list. | |
LostDemandNotes | String | Required |
Description | The free text note as to why a potential customer failed to initiate a rental. Max string length of 500. | |
DenyDepositRefund | Boolean | Required |
Description | Indicates if the refund should be retained. True retains the refund, false refunds with cash,credit or check. Defaults to false. | |
DenyRefundReason | String | Required |
Description | The reason for denying a customer’s refund (i.e., Delinquent on other rentals). Max string length of 500. | |
ContactData | ContactInfo | Optional |
Description | The object containing the contact information. If no information is entered here the primary contact info is used as default. |
Returned Parameters
Name | Data Type |
---|---|
ObjectId | Long |
Description | The rental item’s ID number. |
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. |
HasDeposit | Boolean |
Description | Indicates if the reservation has a refundable deposit (“True”) or not (“False”). |
AvailableRefundAmount | Decimal |
Description | The processed refund amount, if warranted. |
Succeeded | Boolean |
Description | Indicates if the cancellation was succesful (“True”) or not (“False”). |
ErrorMessage | String |
Description | A message about any problem that occurred during the process, including details to locate errant code. |
RefundMessage | String |
Description | The message associated with the success or failure of processing the refund. |
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 CancelReservationV3 request object and a CancelReservation response object. We can define and create those like this:
// Create a request and response objects and ContactInfo object.
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.CancelReservationV3_Request request = new SWS.CancelReservationV3_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 reservations(s) request.AcctID = 123456; request.RentalIDs = new long[] { 123456, 654321 }; request.LostDemandReason = 10001; request.LostDemandNotes = "Unit size no longer available"; request.ContactData = contact_info; request.DenyDepositRefund = true; request.DenyRefundReason = "They were told the amount was non-refundable.";
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.CancelReservationV3(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 CancelReservationV2 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. This method also lets you retain the refund, which was not possible in the original method.
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. | |
ContactData | ContactInfo | Optional |
Description | The object containing the contact information. If no information is entered here, the primary contact info is used as default. | |
DenyDepositRefund | Boolean | Required |
Description | Indicates that a refund should be retain (“True”) or refunded (“False”). Defaults to false. Refunds are processed based on site rules in the form of cash, check or credit card. | |
DenyRefundReason | String | Required |
Description | The reason for denying a customer’s refund (i.e., Delinquent on other rentals). Max string length of 500. | |
LostDemandNotes | String | Required |
Description | The free text note as to why the customer terminated the rental. Max string length of 500. | |
LostDemandReason | String | Required |
Description | The lost demand reason as to why a customer terminated a rental. Available values:
|
|
QuoteIDs | Long | Optional |
Description | The quote’s ID number. This can be an array of quotes if there are multiple quotes that need to be cancelled. This is returned when processing the MakeReservation method or can be retrieved using the GetReservations method. | |
RentalIDs | Long | Optional |
Description | The rental items id numbers. This can be an array if there are multiple rentals that need to be cancelled. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. |
Returned Parameters
Name | DataType |
---|---|
AvailableRefundAmount | Decimal |
Description | The amount that will be refunded to the customer, if any refund is due. |
ErrorMessage | Decimal |
Description | A message about any problem that occurred during the process, including details to locate errant code. |
HasDeposit | Boolean |
Description | Indicates if the deposit can be refunded (“True”) or not (“False”). |
ObjectID | Long |
Description | The unit’s ID number that is being cancelled. This is maintained through rentals. |
RefundMessage | String |
Description | The message associated with the success or failure of processing the refund. |
Succeeded | Decimal |
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 CancelReservationV2 request object and a CancelReservation response object. We can define and create those like this:
// Create a request and response objects and ContactInfo object.
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.CancelReservationV2_Request request = new SWS.CancelReservationV2_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 reservations(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; request.DenyDepositRefund = true; request.DenyRefundReason = "They were told the amount was non-refundable.";
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.CancelReservationV2(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.