SWS2 MakeReservationSoftDeposit Method
Allows you to make a soft reservation and charge a reservation deposit for that reservation.
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. | |
CFlex1 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. | |
CFlex2 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. | |
CFlex3 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. | |
CFlex4 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. | |
CFlex5 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. | |
Channel | Integer | Optional |
Description | The method being used to create the rental. | |
Contacts: AddressID | Long | Required |
Description | The ID number of the primary contact’s address record. This is returned when using the AddNewAddress method. | |
Contacts: ContactID | Long | Required |
Description | The rental contact’s ID number. This is returned when using the CreateNewAccount or AddNewContact methods or you can search for it using the SearchBy method. | |
Contacts: GateCode | String | Optional |
Description | The gate code that will be assigned to the rental. This should match any currently existing rentals on the account. | |
Contacts: GateTimezone | String | Optional |
Description | Sets the time period that the tenant has access to the gates. See the gate settings for information. | |
Contacts: PhoneID | Long | Required |
Description | The ID of the contact’s phone number record. | |
Contacts: PrimaryFlag | Boolean | Optional |
Description | Indicates if the contact is the primary (“True”) or not (“False”). | |
InquirySource | Integer | Optional* |
Description | Indicates how the customer heard about the site. This is a custom field, please contact the organization for a list of options. *Some organizations may require this field. Check the GetSiteRules – “Item Finder – Require Inquiry Source” rule for information. |
|
MarketCode | Integer | Optional |
Description | Indicates how the customer heard about the site. *Not available at all sites. |
|
MarketSource | String | Optional |
Description | Indicates how the customer heard about the site. *Not available at all sites. |
|
Notes | String | Optional |
Description | Any notes that need to be attached to the account. Max string length of 4000. | |
OverrideReservationAmount | Decimal | Optional |
Description | If you would like to charge a different amount than the default for the reservation, enter the amount here. | |
Pcds: Active | Boolean | Optional |
Description | Indicates the promotion being added is active. | |
Pcds: DiscountAmount | Decimal | Optional |
Description | Indicates the amount of the discount being added to the quote/reservation/rental. | |
Pcds: PCDID | Long | Optional |
Description | Indicates the ID of the promotion/discount being added to the quote/reservation/rental. | |
Pcds: ReasonCode | Integer | Optional |
Description | The numeric value as to why you are applying the discount. | |
Pcds: ReasonDescription | String | Optional |
Description | The textual value as to why you are applying the discount. | |
Price | Decimal | Optional |
Description | If you are renting the item at a rate other than the current rent rate or street rate, enter that amount here. This should not include any discounts as the discount will be calculated separately. | |
QuoteExpiration | DateTime | Optional |
Description | If this is a quote/reservation, this will set the expiration date. | |
QuoteID | Long | Optional |
Description | Allows you to convert the quote/reservation ID to a rental. | |
QuoteStartDate | Long | Optional |
Description | No input required. The system will set the start date as today. | |
QuoteType | String | Required |
Description | Indicates what type of quote/reservation/rental this will be. Available values:
|
|
RentNow | Boolean | Required |
Description | Indicates if this will be a rental (“True”) or a quote/reservation (“False”). | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. | |
TaxExemptExp | DateTime | Optional |
Description | The date that the customer tax ID for exempt status expires. | |
TaxExemptID | Integer | Optional |
Description | The customer’s tax ID if they are tax exempt. | |
UnitID | Long | Required |
Description | This is returned when you use any of the GetSiteUnitData calls. This is maintained through rentals. |
|
Version | Integer | Required |
Description | The unit’s version number which serves to prevent duplicate use of the unit. | |
AssessSoftResDeposit | Boolean | Required |
Description | Indicates that a deposit should be charged for a soft reservation (“True”). |
Returned Parameters
Name | Data Type |
---|---|
QuoteID | Long |
Description | The quote’s ID number. |
RentalID | Long |
Description | The rental item’s ID number. |
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 MakeReservation_Request request object and at least one MakeReservationContacts object. We can define and create those like this:
// Create a request and response objects
StoreServiceClient client = new StoreServiceClient();
MakeReservation_Request request = new MakeReservation_Request();
MakeReservationContacts contact = new MakeReservationContacts();
As with every method we need to pass in credentials. We also set up the parameters for our request.
client.ChannelFactory.Credentials.UserName.UserName = "user"; client.ChannelFactory.Credentials.UserName.Password = "pass"; client.ChannelFactory.Credentials.SupportInteractive = true; contact.ContactID = 123456; contact.AddressID = 123456; contact.PhoneID = 123456; contact.GateCode = "1234"; contact.GateTimezone = "0"; contact.PrimaryFlag = true; request.SiteID = 123456; request.AcctID = 123456; request.Channel = 999; request.Contacts = new MakeReservationContacts[] { contact }; request.InquirySource = 2; request.Price = 50m; request.QuoteType = 1; request.RentNow = true; request.UnitID = 123456; request.Version = 34;
Finally we can call the method and pass across the login object and the request object to create the soft reservation with a deposit. It’s a good idea to do this in a Try Catch block.
try
{
// Call the method that will load the response object
MakeReservation_Response resp;
resp = client.MakeReservationSoftDeposit(request, true);
}
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.