Archive

Archive for the ‘Site Administration’ Category

BulkData GetBulkSiteAddresses Method

April 13, 2017 Leave a comment

Retrieves a list of sites and their addresses that were created in the last 96 hours.

Parameters

Name Data Type Is Required
OrgID Long Required
Description The organization’s ID number.
BeginDate DateTime Required
Description The start date of the date range for which you wish to retrieve the addresses.
EndDate DateTime Optional
Description The end date of the date range for which you wish to retrieve the addresses. This will default to today if left undefined.

Returned Parameters

Name Data Type
ADDRESS_ID Long
Description The address record’s ID number.
SITE_ID Long
Description The site’s ID number.
SITE_NAME String
Description The name of the site as it appears in Store.
ADDRESS_LABEL String
Description Not used.
LINE1 String
Description The first line for the site’s address.
LINE2 String
Description The second line for the site’s address.
LINE3 String
Description Not used.
CITY String
Description The city for the site’s address.
STATE String
Description The state/province for the site’s address.
POSTAL_CODE String
Description The ZIP/postal code for the site’s address.
COUNTRY String
Description The country for the site’s address.
CREATED_DATE DateTime
Description The date that the site was created.
CREATED_BY_ID Long
Description The user’s ID that created the site.
CREATED_BY_NAME  String
Description The first and last name of the user that created the site.
UPDATED_DATE DateTime
Description The date that the site was last updated.
UPDATED_BY_ID Long
Description The user’s ID that last updated the site information.
UPDATED_BY_NAME String
Description The first and last name of the user that last updated the site information.
ORG_ID Long
Description The organization’s ID number.

Example

We’ll assume you’ve got a web reference, let’s name it BulkData, in your Visual Studio project. At this point we need to our objects. We’ll need the standard service object, a user request object and a data request object. We can define and create those like this:

// Create request objects
BulkData.LookupUser_Request user_request = new BulkData.LookupUser_Request();
BulkData.BulkDataSoapClient service = new BulkData.BulkDataSoapClient();
BulkData.BulkData_Request request = new BulkData.BulkData_Request();

Here’s my sample code of the Request and user objects.

// request
user_request.Username = "user";
user_request.Password = "pass";
user_request.Channel = 999;

request.OrgID = 123546;
request.BeginDate = DateTime.Today.AddDays(-1);
request.BeginDate = DateTime.Today;

Finally we can call the method and pass across the login object and the request object to retrieve our data. It’s a good idea to do this in a Try Catch block.

// Call the method that will load the response object
try
{
  BulkData.BulkSiteAddresses_Response response;
  response = service.GetBulkSiteAddresses(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 BulkData Methods.

SWS UpdateUnitData Method

April 3, 2017 Leave a comment

Update the unit information for a single unit. This will allow you to update all attributes, all dimensions, all rate types, notes on the unit, the unit number and the walk thru order number of the specified unit.

Parameters

Name DataType Is Required
AccessType Integer Optional
Description Updates the “AccessType” attribute to this new value. See eUnitAccessType for the available values.
Attribute01 Integer Optional
Description Updates the “Attribute01” attribute to this new value. See eUnitAttr01 for the available values. This value cannot be null.
Attribute02 Integer Optional
Description Updates the “Attribute02” attribute to this new value. See eUnitAttr02 for the available values. To set this to no value use -1.
Climate Integer Optional
Description Updates the “Climate” attribute to this new value. See eUnitClimate for the available values. To set this to no value use -1.
Depth Decimal Optional
Description Updates the depth of measurement of the unit.
Door Integer Optional
Description Updates the “Door” attribute to this new value. See eUnitDoor for the available values. To set this to no value use -1.
Features Integer Optional
Description Updates the “Features”attribute to this new value. See eUnitFeatures for the available values. To set this to no value use -1.
FutureEffectiveDate DateTime Optional
Description Sets the date the future rent rate will take effect.
FutureRate Decimal Optional
Description Updates the future rent rate for the rental item. For an explanation of rates see Terms and Accronyms.
Height Decimal Optional
Description Updates the height measurement of the rental item.
Notes String Optional
Description Updates the text that will be attached to the unit. This is displayed in the “Edit Rental Items” window in the notes box in Store.
ProformaRate Decimal Optional
Description Updates the proforma rate for the rental item. For an explanation of rates see Terms and Accronyms.
PushRate Decimal Optional
Description Updates the push rate for the rental item. For an explanation of rates see Terms and Accronyms.
RackRate Decimal Optional
Description Updates the rack rate for the rental item. For an explanation of rates see Terms and Accronyms.
SquareFeet Decimal Optional
Description Updates the total square foot measurement of the unit based on it’s width and depth.
Status Integer Optional
Description Updates the “Status” attribute to this new value. See eUnitStatus for the available values.
StreetRate Decimal Optional
Description Updates the street rate for the rental item. For an explanation of rates see Terms and Accronyms.
UnitID Long Required
Description This is returned when you use any of the GetSiteUnitData
calls. This is maintained through rentals.
UnitNumber String Optional
Description Updates the site assigned unit number of the rental item.
WalkThruOrder Integer Optional
Description Updates the walk thru order number. This is primarily used for a walkthru of the site by the manager.
Width Decimal Optional
Description Updates the width measurement of the rental item.

Returned Parameters

Name DataType
Succeeded Boolean
Description Indicates if the unit data was updated 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 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 UpdateUnitData request object, and a UpdateUnitData response object. We can define and create those like this:

// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.UpdateUnitData_Request request = new SWS.UpdateUnitData_Request();
SWS.UpdateUnitData_Response response;

Here is my sample requesting a change of the reserved unit.

// UpdateReservation request
request.UnitID = 123456;
request.Status = 5; //unavailable-damaged

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.UpdateUnitData(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.

siteRuleData Reference

December 5, 2016 Leave a comment

Reference for any method using the siteRuleData object.

Name Data Type
ruleID Long
Description The rule’s ID number
ruleName String
Description The name of the rule.
desc String
Description The description of the rule.
currSiteValue String
Description The numeric value of the current rule setting.
siteValueMeaning String
Description  The textual value of the current rule setting.