The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

test_deser_3_paymentmethods()

test_deser_1_paymentmethod()

test_deser_0_paymentmethod()

This test tests whether getters that return a ref to an array always return a defined reference even if there are no elements in the array.

The test will fail if after deserilization getter that retrieves a ref to an array, returns undefined value!!

_test_scalar_array_deserilization()

testSimpleTypeDeserilization()

Simple types have 'value' property. This test contains examples that show how such properties should be set and retrieved:

 $pItemType->getReservePrice()->getValue();
 $pItemType->getItemID()->getValue();
 $pItemType->getSeller()->getUserID()->getValue();

 The folling code would retrieve just object containing those properties:

 $pItemType->getReservePrice();
 $pItemType->getItemID();
 $pItemType->getSeller()->getUserID();

getItem_partially_OO()

Simple types are instantiated and populated in shorthanded form

 # 1. set BuyItNowPrice
   use:
      $pItem->setBuyItNowPrice($gsBuyItNowPriceValue);
   instead of:
      $pItem->getBuyItNowPrice()->setValue($gsBuyItNowPriceValue);   

   
 # 3. set ItemID
   use:      
      $pItem->setItemID( $gsItemID );
   instead of:   
      $pItem->getItemID()->setValue( $gsItemID );


 # 4. set seller's userID
   use:      
      $pItem->getSeller()->setUserID( $gsSellerUserID );
   instead of:    
      $pItem->getSeller()->getUserID()->setValue( $gsSellerUserID );

getItem_full_OO()

Simple types are instantiated and populated in full OO manner:

      # 1. set BuyItNowPrice
   $pItem->getBuyItNowPrice()->setValue($gsBuyItNowPriceValue);

      # 2. set ReservePrice (both value and currency)
   my $pReservePrice = eBay::API::XML::DataType::AmountType->new();
   $pReservePrice->setCurrencyID(
                      eBay::API::XML::DataType::Enum::CurrencyCodeType::USD);
   $pReservePrice->setValue($gsReservePriceValue);
   $pItem->setReservePrice($pReservePrice);

      # 3. set ItemID (both value and currency)
   $pItem->getItemID()->setValue( $gsItemID );

      # 4. set seller's userID
   $pItem->getSeller()->getUserID()->setValue( $gsSellerUserID );

   In this case SimpleType properties are being accessed the very same way 
   they are being accessed in eBay API Java SDK