File Coverage

lib/eBay/API/XML/Call/GetProducts/GetProductsRequestType.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             package eBay::API::XML::Call::GetProducts::GetProductsRequestType;
4              
5 1     1   1502 use strict;
  1         2  
  1         25  
6 1     1   4 use warnings;
  1         2  
  1         32  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. GetProductsRequestType.pm
12             # Generated by: ......... genEBayApiDataTypes.pl
13             # Last Generated: ....... 08/24/2008 16:44
14             # API Release Number: ... 579
15             #
16             ##########################################################################
17              
18             =head1 NAME
19              
20             eBay::API::XML::Call::GetProducts::GetProductsRequestType
21              
22             =head1 DESCRIPTION
23              
24             Searches for stock information and reviews for certain kinds of products,
25             such as a particular digital camera model.
26            

27             GetProducts is designed to be useful to applications that support
28             shopping comparison, product reviews, or basic supply and
29             demand data.
30            

31            

32             GetProducts also supports tracking so that members of the
33             eBay Affiliates Program can get commissions for driving traffic to eBay.
34            

35            

Note:

36             For selling use cases, use GetProductSearchResults and
37             GetProductSellingPages instead.
38            

39            

40             To use this call, you typically pass in keywords, and GetProducts finds
41             products with matching words in the product title, description, and/or
42             Item Specifics.
43            

44             For each product of interest, you call GetProducts again to retrieve
45             additional details that would be useful to buyers:
46            

47            
48            
  • Top reviews of the product by eBay members,
  • 49             including part of the review text, plus links to the full text on the
    50             eBay Web site.
    51            
  • Relevant buying guides (shopping advice) written by
  • 52             eBay members and by eBay staff, including part of the guide text,
    53             plus links to the full text
    54             on the eBay Web site.
    55            
  • Up to 200 matching items on eBay (if any). (To find more matching
  • 56             items, use GetSearchResults.)
    57            
    58            

    59             Note:
    60             As catalog queries can take longer than item queries,
    61             GetProducts can be slower than GetSearchResults.
    62             Also, due to the way product data is cached, you may get a faster response
    63             when you run the same query a second time.
    64              
    65              
    66              
    67             =head1 SYNOPSIS
    68              
    69             =cut
    70              
    71              
    72             =head1 INHERITANCE
    73              
    74             eBay::API::XML::Call::GetProducts::GetProductsRequestType inherits from the L class
    75              
    76             =cut
    77              
    78 1     1   33 use eBay::API::XML::RequestDataType;
      0            
      0            
    79             our @ISA = ("eBay::API::XML::RequestDataType");
    80              
    81             use eBay::API::XML::DataType::AffiliateTrackingDetailsType;
    82             use eBay::API::XML::DataType::ProductSearchType;
    83             use eBay::API::XML::DataType::Enum::ProductSortCodeType;
    84              
    85              
    86             my @gaProperties = ( [ 'AffiliateTrackingDetails', 'ns:AffiliateTrackingDetailsType', ''
    87             ,'eBay::API::XML::DataType::AffiliateTrackingDetailsType', '1' ]
    88             , [ 'IncludeBuyingGuideDetails', 'xs:boolean', '', '', '' ]
    89             , [ 'IncludeHistogram', 'xs:boolean', '', '', '' ]
    90             , [ 'IncludeItemArray', 'xs:boolean', '', '', '' ]
    91             , [ 'IncludeReviewDetails', 'xs:boolean', '', '', '' ]
    92             , [ 'ProductSearch', 'ns:ProductSearchType', ''
    93             ,'eBay::API::XML::DataType::ProductSearchType', '1' ]
    94             , [ 'ProductSort', 'ns:ProductSortCodeType', ''
    95             ,'eBay::API::XML::DataType::Enum::ProductSortCodeType', '' ]
    96             );
    97             push @gaProperties, @{eBay::API::XML::RequestDataType::getPropertiesList()};
    98              
    99             my @gaAttributes = (
    100             );
    101             push @gaAttributes, @{eBay::API::XML::RequestDataType::getAttributesList()};
    102              
    103             =head1 Subroutines:
    104              
    105             =cut
    106              
    107             sub new {
    108             my $classname = shift;
    109             my %args = @_;
    110             my $self = $classname->SUPER::new(%args);
    111             return $self;
    112             }
    113              
    114             sub isScalar {
    115             return 0;
    116             }
    117              
    118              
    119              
    120             =head2 setAffiliateTrackingDetails()
    121              
    122             See the
    123             eBay Partner Network.
    124             eBay uses the specified details to build a View Item URL
    125             string in the response that includes your
    126             affiliate tracking information in the correct format.
    127             When a user clicks through the URL to eBay and performs
    128             certain tasks, you may get a commission (see the URL above).
    129             Only applicable when IncludeItemArray is specified
    130             (because the View Item URL is only returned in item information,
    131             not in product information).
    132              
    133             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=AffiliateTrackingConcepts
    134             Title: Affiliate Tracking Concepts
    135              
    136             RequiredInput: No
    137             # Argument: 'ns:AffiliateTrackingDetailsType'
    138              
    139             =cut
    140              
    141             sub setAffiliateTrackingDetails {
    142             my $self = shift;
    143             $self->{'AffiliateTrackingDetails'} = shift
    144             }
    145              
    146             =head2 getAffiliateTrackingDetails()
    147              
    148             # Returns: 'ns:AffiliateTrackingDetailsType'
    149              
    150             =cut
    151              
    152             sub getAffiliateTrackingDetails {
    153             my $self = shift;
    154             return $self->_getDataTypeInstance( 'AffiliateTrackingDetails'
    155             ,'eBay::API::XML::DataType::AffiliateTrackingDetailsType');
    156             }
    157              
    158              
    159             =head2 setIncludeBuyingGuideDetails()
    160              
    161             If true, the response includes up to 5 buying guides (if any)
    162             for the product specified in ExternalProductID or
    163             ProductReferenceID.
    164             Not applicable with QueryKeywords.
    165              
    166             RequiredInput: No
    167             Default: false
    168             # Argument: 'xs:boolean'
    169              
    170             =cut
    171              
    172             sub setIncludeBuyingGuideDetails {
    173             my $self = shift;
    174             $self->{'IncludeBuyingGuideDetails'} = shift
    175             }
    176              
    177             =head2 isIncludeBuyingGuideDetails()
    178              
    179             # Returns: 'xs:boolean'
    180              
    181             =cut
    182              
    183             sub isIncludeBuyingGuideDetails {
    184             my $self = shift;
    185             return $self->{'IncludeBuyingGuideDetails'};
    186             }
    187              
    188              
    189             =head2 setIncludeHistogram()
    190              
    191             If true, the response includes a histogram that lists the
    192             number of matching products found and the domains in which
    193             they were found. (A domain is like a high-level category.)
    194             Including the histogram can affect the call's performance.
    195             You may see significantly slower response times when many
    196             matching products are found.
    197              
    198             RequiredInput: No
    199             Default: false
    200             # Argument: 'xs:boolean'
    201              
    202             =cut
    203              
    204             sub setIncludeHistogram {
    205             my $self = shift;
    206             $self->{'IncludeHistogram'} = shift
    207             }
    208              
    209             =head2 isIncludeHistogram()
    210              
    211             # Returns: 'xs:boolean'
    212              
    213             =cut
    214              
    215             sub isIncludeHistogram {
    216             my $self = shift;
    217             return $self->{'IncludeHistogram'};
    218             }
    219              
    220              
    221             =head2 setIncludeItemArray()
    222              
    223             If true, the response includes items (if any) that match the
    224             product specified in ExternalProductID or ProductReferenceID.
    225             Not applicable with QueryKeywords.
    226              
    227             RequiredInput: No
    228             Default: false
    229             # Argument: 'xs:boolean'
    230              
    231             =cut
    232              
    233             sub setIncludeItemArray {
    234             my $self = shift;
    235             $self->{'IncludeItemArray'} = shift
    236             }
    237              
    238             =head2 isIncludeItemArray()
    239              
    240             # Returns: 'xs:boolean'
    241              
    242             =cut
    243              
    244             sub isIncludeItemArray {
    245             my $self = shift;
    246             return $self->{'IncludeItemArray'};
    247             }
    248              
    249              
    250             =head2 setIncludeReviewDetails()
    251              
    252             If true, the response includes up to 20 reviews (if any)
    253             for the product specified in ExternalProductID or
    254             ProductReferenceID.
    255             The reviews are sorted by most helpful (most votes) first.
    256             When you include review details, please note that
    257             response times may be longer than 60 seconds.
    258             Not applicable with QueryKeywords.
    259              
    260             RequiredInput: No
    261             Default: false
    262             # Argument: 'xs:boolean'
    263              
    264             =cut
    265              
    266             sub setIncludeReviewDetails {
    267             my $self = shift;
    268             $self->{'IncludeReviewDetails'} = shift
    269             }
    270              
    271             =head2 isIncludeReviewDetails()
    272              
    273             # Returns: 'xs:boolean'
    274              
    275             =cut
    276              
    277             sub isIncludeReviewDetails {
    278             my $self = shift;
    279             return $self->{'IncludeReviewDetails'};
    280             }
    281              
    282              
    283             =head2 setProductSearch()
    284              
    285             Contains the fields that form the search query. You can query
    286             against keywords, an eBay product reference ID (not to be confused
    287             with an eBay product ID), or external product ID (like an ISBN).
    288              
    289             RequiredInput: Yes
    290             # Argument: 'ns:ProductSearchType'
    291              
    292             =cut
    293              
    294             sub setProductSearch {
    295             my $self = shift;
    296             $self->{'ProductSearch'} = shift
    297             }
    298              
    299             =head2 getProductSearch()
    300              
    301             # Returns: 'ns:ProductSearchType'
    302              
    303             =cut
    304              
    305             sub getProductSearch {
    306             my $self = shift;
    307             return $self->_getDataTypeInstance( 'ProductSearch'
    308             ,'eBay::API::XML::DataType::ProductSearchType');
    309             }
    310              
    311              
    312             =head2 setProductSort()
    313              
    314             Sorts the list of products returned. This is mostly only useful
    315             with QueryKeywords. (When you use ExternalProductID or
    316             ProductReferenceID, eBay usually only returns one product.)
    317              
    318             RequiredInput: No
    319             # Argument: 'ns:ProductSortCodeType'
    320              
    321             =cut
    322              
    323             sub setProductSort {
    324             my $self = shift;
    325             $self->{'ProductSort'} = shift
    326             }
    327              
    328             =head2 getProductSort()
    329              
    330             # Returns: 'ns:ProductSortCodeType'
    331              
    332             =cut
    333              
    334             sub getProductSort {
    335             my $self = shift;
    336             return $self->{'ProductSort'};
    337             }
    338              
    339              
    340              
    341              
    342              
    343             ## Attribute and Property lists
    344             sub getPropertiesList {
    345             my $self = shift;
    346             return \@gaProperties;
    347             }
    348              
    349             sub getAttributesList {
    350             my $self = shift;
    351             return \@gaAttributes;
    352             }
    353              
    354              
    355              
    356             1;