Home > API General, Auction, Delinquency, Rental/Reservation > SWS GetAuctionRentals Method

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.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: