Archive
SWS GetAuctionTax Method
Returns the applicable tax of the amount for which the item was auctioned.
Parameters
Name | DataType | Required |
---|---|---|
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. | |
Amount | Decimal | Required |
Description | The amount collected on the auctioned unit. |
Returned Parameters
Name | DataType |
---|---|
baseAmount | Decimal |
Description | The amount collected on the auctioned unit. |
taxAmount | Decimal |
Description | The total of the taxes applicable to the baseAmount. |
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 AuctionProceeds request object and a GetAuctionTax response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.AuctionProceeds request = new SWS.AuctionProceeds();
SWS.GetAuctionTax_Response response;
Here’s my sample code of the Request object.
// GetAuctionTax Request
request.SiteID = 123456;
request.AuctionProceedsAmount = new decimal[] { 326m };
We can call the method and pass across the login object and the request object to return our auction tax amount. 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.GetAuctionTax(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 GetAuctionRentals Method
Retrieves detailed information for rental items from a specified auction when the auction ID is provided, it will only return those rental items that are part of that auction; otherwise, all rentals assigned to any auction will be returned.
Parameters
Name | DataType | Is Required |
---|---|---|
AuctionID | Long | Optional |
Description | The auction’s ID number. If no AuctionID is specified, all auctions will be returned. The AuctionID can be retrieved using the GetAuctions method. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
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. |
Auction_Date | String |
Description | The date and time of the auction. |
Auction_ID | Long |
Description | The auction’s ID number. |
Auction_Obj_ID | Long |
Description | The auction’s item ID number. |
Auction_Time | String |
Description | The formatted time of the auction. |
Del_Rental_ID | Long |
Description | The rental item’s ID number. |
Icon | String |
Description | The URL for the site revenue class icon that displays in the Store application. |
Last_Payment_Amount | Decimal |
Description | The amount of the last payment made. |
Last_Payment_Date | DateTime |
Description | The date the last payment was made on the rental item. |
Lien_State | Integer |
Description | The state/province for the address. |
LTD | DateTime |
Description | The lease-thru-date (LTD). |
Notes | String |
Description | The free text note as to the auction’s proceedings. |
PTD | DateTime |
Description | The paid-thru-date (PTD). |
Rental_ID | Long |
Description | The rental item’s ID number. |
Site_ID | Long |
Description | The site’s ID number. |
Total_Due | Decimal |
Description | The total amount of funds not paid to date. |
Unit_Contents | String |
Description | The free text note as to the rental item’s auction status. |
Unit_Number | String |
Description | The unit’s number as assigned by the organization. This is not the UnitID. |
Unit_Status | Integer |
Description | The rental item’s rental status. |
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 GetAuctionRentals request object and a GetAuctionRentals response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetAuctionRentals_Request request = new SWS.GetAuctionRentals_Request();
SWS.GetAuctionRentals_Response response;
Here’s my sample code of the Request object.
// GetAuctionRentals Request
request.SiteID = 123456;
request.AuctionID = 123456;
Finally we can call the method and pass across the login object and the request object to get our auction 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.GetAuctionRentals(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 GetAuctions Method
Retrieves details about each auction for a given site.
Parameters
Name | DataType | Is Required |
---|---|---|
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. | |
Status | String | Optional |
Description | The auction’s status based on the AuctionStatusValues enum. If not selected, it will default to ‘SCHEDULED’. Available values:
|
Returned Parameters
Name | DataType |
---|---|
AUCTION_DATE | DateTime |
Description | The date and time of the auction. |
AUCTION_ID | Long |
Description | The auction’s ID number. |
AUCTION_TIME | String |
Description | The formatted time of the auction. |
AUCTIONEER_NAME | String |
Description | The auctioneer’s name. Max string length of 100. |
FORMAT_DATE | String |
Description | The formatted date of the auction. |
SITE_ID | Long |
Description | The site’s ID number. |
STATUS | Integer |
Description | The auction’s status. Available values:
|
STATUS_VALUE | String |
Description | The status value of the auction status. Available values:
|
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 GetAuctions request object and a GetAuctions response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetAuctions_Request request = new SWS.GetAuctions_Request();
SWS.GetAuctions_Response response;
Here’s my sample code of the Request object.
// GetAuctions Request
request.SiteID = 123456;
request.Status = new SWS.AuctionStatusValues[] { SWS.AuctionStatusValues.SCHEDULED };
Finally we can call the method and pass across the login object and the request object to get our auction details. 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.GetAuctions(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 CreateAuction Method
Creates a rental auction so that rental items can be placed in auction, including date, time, auctioneer and auction status.
Parameters
Name | DataType | Is Required |
---|---|---|
AuctionDateTime | dateTime | Required |
Description | The date and time the auction will take place. If no time is supplied, the default is 12:00am. | |
AuctioneerName | String | Required |
Description | The auctioneer’s name. Max string length of 100. | |
AuctionNotes | String | Optional |
Description | The free text note as to the rental item’s auction status. Max string length of 4000. | |
SiteID | Long | Required |
Description | The site’s ID number where the auction will take place. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
AuctionID | Long |
Description | Returns the auction’s ID number. This is a system generated number. |
Auction_Date | dateTime |
Description | Returns the date and time when the auction will occur. |
Auction_Time | dateTime |
Description | Returns just the time when the auction will occur. |
Created_By | Long |
Description | Returns the Store user’s ID number that created the auction. |
Notes | String |
Description | Returns the auctions notes. |
Site_ID | Long |
Description | Returns the sites ID number where the auction is scheduled. |
Status | Integer |
Description | Returns the auction’s status. Available values:
|
Updated_By | Long |
Description | Returns the Store user’s ID number that last updated the field. |
Examples
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 CreateAuction request object and a CreateAuction response object. We can define and create those like this:
// Create request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.CreateAuction_Request request = new SWS.CreateAuction_Request();
SWS.CreateAuction_Response response;
Here’s my sample code of the Request object.
// new auction request
request.SiteID = 123456;
request.AuctionDateTime = DateTime.Now.AddDays(7);
request.AuctioneerName = "Joe Auctioneer";
request.AuctionNotes = "This will be the only auction this month.";
Finally we can call the method and pass across the login object and the request object to create our auction. 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.CreateAuction(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.