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!!
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();
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 );
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
To install eBay::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm eBay::API
CPAN shell
perl -MCPAN -e shell install eBay::API
For more information on module installation, please visit the detailed CPAN module installation guide.