Print Search
Content Actions
Wiki Search
Random Art
Update
(Stage 1: GetItemRequest)
(Stage 1: GetItemRequest)
Line 2: Line 2:
  
  
 +
__TOC__
 
=== Stage 1:  GetItemRequest ===
 
=== Stage 1:  GetItemRequest ===
  
Line 32: Line 33:
 
:::: ''result'' = 5 // still pending
 
:::: ''result'' = 5 // still pending
 
::: if ''result'' = 1
 
::: if ''result'' = 1
:::: Jump to '''Stage 2'''
+
:::: Jump to [[#Stage_1:__GetItemRequest]]
  
 
=== Stage 2:  GetAllBiddersRequest ===
 
=== Stage 2:  GetAllBiddersRequest ===

Revision as of 08:39, 30 August 2008

XML Parsing Logic

Stage 1: GetItemRequest

if Item exist
if Item->ListingDetails exsts
date = Item->ListingDetails->EndTime
if Item->SellingStatus exsts
reserveMet = Item->SellingStatus->ReserveMet
bids = Item->SellingStatus->BidCount
sold = Item->SellingStatus->QuantitySold
if Item->SellingStatus->ListingStatus == "Active"
ended = FALSE
else
ended = TRUE
if Item->SellingStatus->CurrentPrice.currency == "USD"
price = Item->SellingStatus->CurrentPrice
else
price = Item->SellingStatus->ConvertedCurrentPrice
if ended
if sold > 0
result = 1 // sold
else if bids > 0
if reserveMet
result = 1 // sold
else
result = 2 // reserve not met
else
result = 3 // ended with no bids
else
result = 5 // still pending
if result = 1
Jump to #Stage_1:__GetItemRequest

Stage 2: GetAllBiddersRequest

if HighestBid exists
if HighestBid.currency == "USD"
price = HighestBid
else
price = BidArray -> Offer[0] -> HighestBid