| lib/eBay/API/XML/DataType/ProductListingDetailsType.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::DataType::ProductListingDetailsType; | ||||||
| 4 | |||||||
| 5 | 1 | 1 | 1271 | use strict; | |||
| 1 | 3 | ||||||
| 1 | 34 | ||||||
| 6 | 1 | 1 | 4 | use warnings; | |||
| 1 | 2 | ||||||
| 1 | 27 | ||||||
| 7 | |||||||
| 8 | ########################################################################## | ||||||
| 9 | # | ||||||
| 10 | # Module: ............... |
||||||
| 11 | # File: ................. ProductListingDetailsType.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::DataType::ProductListingDetailsType | ||||||
| 21 | |||||||
| 22 | =head1 DESCRIPTION | ||||||
| 23 | |||||||
| 24 | Contains product information that can be included in a listing. | ||||||
| 25 | Applicable for listings that use eBay's Pre-filled Item Information feature. | ||||||
| 26 | See the Developer's Guide for details on working with Pre-filled Item Information. | ||||||
| 27 | |||||||
| 28 | |||||||
| 29 | |||||||
| 30 | =head1 SYNOPSIS | ||||||
| 31 | |||||||
| 32 | =cut | ||||||
| 33 | |||||||
| 34 | |||||||
| 35 | =head1 INHERITANCE | ||||||
| 36 | |||||||
| 37 | eBay::API::XML::DataType::ProductListingDetailsType inherits from the L |
||||||
| 38 | |||||||
| 39 | =cut | ||||||
| 40 | |||||||
| 41 | 1 | 1 | 34 | use eBay::API::XML::BaseDataType; | |||
| 0 | |||||||
| 0 | |||||||
| 42 | our @ISA = ("eBay::API::XML::BaseDataType"); | ||||||
| 43 | |||||||
| 44 | |||||||
| 45 | |||||||
| 46 | my @gaProperties = ( [ 'Copyright', 'xs:string', '1', '', '' ] | ||||||
| 47 | , [ 'IncludePrefilledItemInformation', 'xs:boolean', '', '', '' ] | ||||||
| 48 | , [ 'IncludeStockPhotoURL', 'xs:boolean', '', '', '' ] | ||||||
| 49 | , [ 'ProductID', 'xs:string', '', '', '' ] | ||||||
| 50 | , [ 'StockPhotoURL', 'xs:anyURI', '', '', '' ] | ||||||
| 51 | , [ 'UseStockPhotoURLAsGallery', 'xs:boolean', '', '', '' ] | ||||||
| 52 | ); | ||||||
| 53 | push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()}; | ||||||
| 54 | |||||||
| 55 | my @gaAttributes = ( | ||||||
| 56 | ); | ||||||
| 57 | push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()}; | ||||||
| 58 | |||||||
| 59 | =head1 Subroutines: | ||||||
| 60 | |||||||
| 61 | =cut | ||||||
| 62 | |||||||
| 63 | sub new { | ||||||
| 64 | my $classname = shift; | ||||||
| 65 | my %args = @_; | ||||||
| 66 | my $self = $classname->SUPER::new(%args); | ||||||
| 67 | return $self; | ||||||
| 68 | } | ||||||
| 69 | |||||||
| 70 | sub isScalar { | ||||||
| 71 | return 0; | ||||||
| 72 | } | ||||||
| 73 | |||||||
| 74 | |||||||
| 75 | |||||||
| 76 | =head2 setCopyright() | ||||||
| 77 | |||||||
| 78 | Copyright statement indicating the source of the product information. This information will be | ||||||
| 79 | included in the listing with Pre-filled Item Information. Your application should also display | ||||||
| 80 | the copyright statement when rendering the Pre-filled Item Information. | ||||||
| 81 | If more than one copyright statement is applicable, they can be presented to the | ||||||
| 82 | user in alphabetical order. Returned as HTML. | ||||||
| 83 | Output only. | ||||||
| 84 | |||||||
| 85 | # Argument: reference to an array | ||||||
| 86 | of 'xs:string' | ||||||
| 87 | |||||||
| 88 | =cut | ||||||
| 89 | |||||||
| 90 | sub setCopyright { | ||||||
| 91 | my $self = shift; | ||||||
| 92 | $self->{'Copyright'} = | ||||||
| 93 | $self->convertArray_To_RefToArrayIfNeeded(@_); | ||||||
| 94 | } | ||||||
| 95 | |||||||
| 96 | =head2 getCopyright() | ||||||
| 97 | |||||||
| 98 | Calls: GetBidderList | ||||||
| 99 | Returned: Conditionally | ||||||
| 100 | |||||||
| 101 | Calls: GetItem | ||||||
| 102 | Returned: Conditionally | ||||||
| 103 | Details: DetailLevel: ItemReturnAttributes, ReturnAll | ||||||
| 104 | |||||||
| 105 | # Returns: reference to an array | ||||||
| 106 | of 'xs:string' | ||||||
| 107 | |||||||
| 108 | =cut | ||||||
| 109 | |||||||
| 110 | sub getCopyright { | ||||||
| 111 | my $self = shift; | ||||||
| 112 | return $self->_getDataTypeArray('Copyright'); | ||||||
| 113 | } | ||||||
| 114 | |||||||
| 115 | |||||||
| 116 | =head2 setIncludePrefilledItemInformation() | ||||||
| 117 | |||||||
| 118 | If true, specifies that the listing should include additional information about the product, | ||||||
| 119 | such as a publisher's description or film credits. Such information is hosted through the eBay site | ||||||
| 120 | and cannot be edited. If true, Item.Description is optional in item-listing requests. | ||||||
| 121 | |||||||
| 122 | Calls: AddItem | ||||||
| 123 | GetItemRecommendations | ||||||
| 124 | RelistItem | ||||||
| 125 | ReviseItem | ||||||
| 126 | VerifyAddItem | ||||||
| 127 | RequiredInput: No | ||||||
| 128 | |||||||
| 129 | # Argument: 'xs:boolean' | ||||||
| 130 | |||||||
| 131 | =cut | ||||||
| 132 | |||||||
| 133 | sub setIncludePrefilledItemInformation { | ||||||
| 134 | my $self = shift; | ||||||
| 135 | $self->{'IncludePrefilledItemInformation'} = shift | ||||||
| 136 | } | ||||||
| 137 | |||||||
| 138 | =head2 isIncludePrefilledItemInformation() | ||||||
| 139 | |||||||
| 140 | Calls: GetBidderList | ||||||
| 141 | Returned: Conditionally | ||||||
| 142 | |||||||
| 143 | Calls: GetItem | ||||||
| 144 | Returned: Conditionally | ||||||
| 145 | Details: DetailLevel: ItemReturnAttributes, ReturnAll | ||||||
| 146 | |||||||
| 147 | # Returns: 'xs:boolean' | ||||||
| 148 | |||||||
| 149 | =cut | ||||||
| 150 | |||||||
| 151 | sub isIncludePrefilledItemInformation { | ||||||
| 152 | my $self = shift; | ||||||
| 153 | return $self->{'IncludePrefilledItemInformation'}; | ||||||
| 154 | } | ||||||
| 155 | |||||||
| 156 | |||||||
| 157 | =head2 setIncludeStockPhotoURL() | ||||||
| 158 | |||||||
| 159 | If true, indicates that the item listing includes the stock photo. | ||||||
| 160 | To use an eBay stock photo in an item listing, set IncludeStockPhotoURL to true. | ||||||
| 161 | If a stock photo is available, it is used at the top of the View Item page and in | ||||||
| 162 | the Item Specifics section of the listing. If you also include Item.PictureDetails.PictureURL, | ||||||
| 163 | the stock photo only appears in the Item Specifics section of the listing. Other pictures | ||||||
| 164 | you specify by using Item.PictureDetails.PictureURL appear in a separate section of the listing. | ||||||
| 165 | If you use Item.ExternalProductID instead of Item.ProductListingDetails, | ||||||
| 166 | eBay sets IncludeStockPhotoURL to true (and you cannot set it to false). | ||||||
| 167 | In GetItem, the URL of the stock photo will be returned in StockPhotoURL. | ||||||
| 168 | If you set IncludeStockPhotoURL to false, the stock photo does not appear in the listing at all. |
||||||
| 169 | |
||||||
| 170 | Note: | ||||||
| 171 | As of 02-20-2008, the following sites offer free Gallery: | ||||||
| 172 | US (site ID 0), Parts & Accessories Category on US Motors (site ID 100), | ||||||
| 173 | CA (site ID 2), CAFR (site ID 210), FR (site ID 71) and NL (site ID 146). | ||||||
| 174 | Additionally, ES (site ID 186) and IT (site ID 101) offer free Gallery as of 03-03-2008. | ||||||
| 175 | On these sites, eBay selects a Gallery thumbnail from image |
||||||
| 176 | URLs included in the request (i.e. either GalleryURL or the first PictureURL), | ||||||
| 177 | using selection rules that consider which of these URLs has been specified and | ||||||
| 178 | whether an eBay stock photo exists for the item. Also, eBay | ||||||
| 179 | selects an image regardless of whether you have specified either GalleryType or GalleryURL. | ||||||
| 180 | A Gallery fee will only apply if you have set GalleryType to Plus or Featured (as basic | ||||||
| 181 | Gallery is free). |
||||||
| 182 | |
||||||
| 183 | Along with these changes, IncludeStockPhotoURL will be used in the request. | ||||||
| 184 | In some cases, if IncludeStockPhotoURL is set to false, no image will be generated | ||||||
| 185 | for the Gallery. A common example of this occurrence is when only GalleryURL has been | ||||||
| 186 | set in the request (i.e., no PictureURL elements are defined). | ||||||
| 187 | In this case, eBay will not use a stock photo, even if it is available. | ||||||
| 188 | See "Using Gallery Features on Sites with Free Gallery" | ||||||
| 189 | in the eBay Web Services Guide for complete information. | ||||||
| 190 | |
||||||
| 191 | |
||||||
| 192 | To be considered for eBay Express, in most cases a listing must include a picture or a gallery URL. | ||||||
| 193 | You can choose to use the eBay stock photo for this purpose. | ||||||
| 194 | See the eBay Web Services Guide links below for complete information. |
||||||
| 195 | |
||||||
| 196 | Not applicable to Half.com. | ||||||
| 197 | |||||||
| 198 | SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=Pictures | ||||||
| 199 | Title: Introduction to Pictures in Item Listings | ||||||
| 200 | , URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=GalleryFeaturesSitesWithFreeGallery | ||||||
| 201 | For: complete details on how eBay selects a gallery thumbnail. | ||||||
| 202 | Title: Using Gallery Features on Sites with Free Gallery | ||||||
| 203 | , URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ExpressPictureRequired | ||||||
| 204 | Title: Specify a Picture for Express and eBay | ||||||
| 205 | |||||||
| 206 | |||||||
| 207 | Calls: AddItem | ||||||
| 208 | GetItemRecommendations | ||||||
| 209 | RelistItem | ||||||
| 210 | ReviseItem | ||||||
| 211 | VerifyAddItem | ||||||
| 212 | RequiredInput: No | ||||||
| 213 | |||||||
| 214 | # Argument: 'xs:boolean' | ||||||
| 215 | |||||||
| 216 | =cut | ||||||
| 217 | |||||||
| 218 | sub setIncludeStockPhotoURL { | ||||||
| 219 | my $self = shift; | ||||||
| 220 | $self->{'IncludeStockPhotoURL'} = shift | ||||||
| 221 | } | ||||||
| 222 | |||||||
| 223 | =head2 isIncludeStockPhotoURL() | ||||||
| 224 | |||||||
| 225 | Calls: GetBidderList | ||||||
| 226 | Returned: Conditionally | ||||||
| 227 | |||||||
| 228 | Calls: GetItem | ||||||
| 229 | Returned: Conditionally | ||||||
| 230 | Details: DetailLevel: ItemReturnAttributes, ReturnAll | ||||||
| 231 | |||||||
| 232 | # Returns: 'xs:boolean' | ||||||
| 233 | |||||||
| 234 | =cut | ||||||
| 235 | |||||||
| 236 | sub isIncludeStockPhotoURL { | ||||||
| 237 | my $self = shift; | ||||||
| 238 | return $self->{'IncludeStockPhotoURL'}; | ||||||
| 239 | } | ||||||
| 240 | |||||||
| 241 | |||||||
| 242 | =head2 setProductID() | ||||||
| 243 | |||||||
| 244 | Applicable when ProductListingDetails is used. Unique identifier for | ||||||
| 245 | the product. See the Developer's Guide for information about determining product IDs. | ||||||
| 246 | If the primary and secondary categories are both catalog-enabled, this ID should correspond to the primary | ||||||
| 247 | category (not the secondary category). | ||||||
| 248 | In item-listing requests, if you pass in an old product ID, eBay will | ||||||
| 249 | list the item with the latest version of the product and the latest product ID, and the call | ||||||
| 250 | will return a warning indicating that the data has changed. | ||||||
| 251 | To list an item with Pre-filled Item Information by | ||||||
| 252 | using an ISBN, EAN, or UPC value, use ExternalProductID (defined on AddItem) instead. | ||||||
| 253 | Either ExternalProductID (for an ISBN, UPC, EAN or eBay product ID) | ||||||
| 254 | or Item.ProductListingDetails.ProductID (for an eBay product ID) can be specified | ||||||
| 255 | in AddItem requests, but not both. | ||||||
| 256 | |
||||||
| 257 | |
||||||
| 258 | As of mid-2008, some sites (such as eBay US, Germany, Austria, and Switzerland) are | ||||||
| 259 | updating, replacing, deleting, or merging some products (as a result of migrating from one | ||||||
| 260 | catalog data provider to another). If you use an older product ID that has been | ||||||
| 261 | deleted (and that has not been mapped to a new product), the request will fail. | ||||||
| 262 | |||||||
| 263 | MaxLength: 4000 | ||||||
| 264 | |||||||
| 265 | Calls: AddItem | ||||||
| 266 | GetItemRecommendations | ||||||
| 267 | RelistItem | ||||||
| 268 | ReviseItem | ||||||
| 269 | VerifyAddItem | ||||||
| 270 | RequiredInput: Conditionally | ||||||
| 271 | |||||||
| 272 | # Argument: 'xs:string' | ||||||
| 273 | |||||||
| 274 | =cut | ||||||
| 275 | |||||||
| 276 | sub setProductID { | ||||||
| 277 | my $self = shift; | ||||||
| 278 | $self->{'ProductID'} = shift | ||||||
| 279 | } | ||||||
| 280 | |||||||
| 281 | =head2 getProductID() | ||||||
| 282 | |||||||
| 283 | Calls: GetBidderList | ||||||
| 284 | Returned: Conditionally | ||||||
| 285 | |||||||
| 286 | Calls: GetItem | ||||||
| 287 | Returned: Conditionally | ||||||
| 288 | Details: DetailLevel: ItemReturnAttributes, ReturnAll | ||||||
| 289 | |||||||
| 290 | # Returns: 'xs:string' | ||||||
| 291 | |||||||
| 292 | =cut | ||||||
| 293 | |||||||
| 294 | sub getProductID { | ||||||
| 295 | my $self = shift; | ||||||
| 296 | return $self->{'ProductID'}; | ||||||
| 297 | } | ||||||
| 298 | |||||||
| 299 | |||||||
| 300 | =head2 setStockPhotoURL() | ||||||
| 301 | |||||||
| 302 | Fully qualified URL for a standard image (if any) that is associated with the product. | ||||||
| 303 | A seller includes the stock photo in the listing | ||||||
| 304 | by setting IncludeStockPhotoURL. | ||||||
| 305 | |||||||
| 306 | # Argument: 'xs:anyURI' | ||||||
| 307 | |||||||
| 308 | =cut | ||||||
| 309 | |||||||
| 310 | sub setStockPhotoURL { | ||||||
| 311 | my $self = shift; | ||||||
| 312 | $self->{'StockPhotoURL'} = shift | ||||||
| 313 | } | ||||||
| 314 | |||||||
| 315 | =head2 getStockPhotoURL() | ||||||
| 316 | |||||||
| 317 | Calls: GetBidderList | ||||||
| 318 | Returned: Conditionally | ||||||
| 319 | |||||||
| 320 | Calls: GetItem | ||||||
| 321 | Returned: Conditionally | ||||||
| 322 | Details: DetailLevel: ItemReturnAttributes, ReturnAll | ||||||
| 323 | |||||||
| 324 | # Returns: 'xs:anyURI' | ||||||
| 325 | |||||||
| 326 | =cut | ||||||
| 327 | |||||||
| 328 | sub getStockPhotoURL { | ||||||
| 329 | my $self = shift; | ||||||
| 330 | return $self->{'StockPhotoURL'}; | ||||||
| 331 | } | ||||||
| 332 | |||||||
| 333 | |||||||
| 334 | =head2 setUseStockPhotoURLAsGallery() | ||||||
| 335 | |||||||
| 336 | If true, indicates that the stock photo for an item (if available) is | ||||||
| 337 | used as the gallery thumbnail. When listing an item, IncludeStockPhotoURL | ||||||
| 338 | must also be true and Item.PictureDetails.GalleryType must be passed in with a value of Gallery | ||||||
| 339 | or Gallery Featured (but not both). Passing in Item.PictureDetails.GalleryURL takes precedence | ||||||
| 340 | over UseStockPhotoURLAsGallery. See the | ||||||
| 341 | eBay Web Services Guide for additional validation rules for pictures. | ||||||
| 342 | |
||||||
| 343 | |
||||||
| 344 | Note: | ||||||
| 345 | As of 02-20-2008, the following sites offer free Gallery: | ||||||
| 346 | US (site ID 0), Parts & Accessories Category on US Motors (site ID 100), | ||||||
| 347 | CA (site ID 2), CAFR (site ID 210), FR (site ID 71) and NL (site ID 146). | ||||||
| 348 | Additionally, ES (site ID 186) and IT (site ID 101) offer free Gallery as of 03-03-2008. | ||||||
| 349 | On these sites, eBay selects a Gallery thumbnail from image |
||||||
| 350 | URLs included in the request (i.e. either GalleryURL or the first PictureURL), | ||||||
| 351 | using selection rules that consider which of these URLs has been specified and | ||||||
| 352 | whether an eBay stock photo exists for the item. Also, eBay | ||||||
| 353 | selects an image regardless of whether you have specified either GalleryType or GalleryURL. | ||||||
| 354 | A Gallery fee will only apply if you have set GalleryType to Plus or Featured (as basic | ||||||
| 355 | Gallery is free). |
||||||
| 356 | |
||||||
| 357 | Along with these changes, UseStockPhotoURLAsGallery will be used in the request. | ||||||
| 358 | In some cases, if UseStockPhotoURLAsGallery is set to false, no image will be | ||||||
| 359 | generated for the Gallery. A common example of this occurrence is when only | ||||||
| 360 | GalleryURL has been set in the request (i.e., no PictureURL elements are defined). | ||||||
| 361 | In this case, eBay will not use a stock photo, even if it is available. | ||||||
| 362 | See "Using Gallery Features on Sites with Free Gallery" in the | ||||||
| 363 | eBay Web Services Guide for complete information. | ||||||
| 364 | |||||||
| 365 | |
||||||
| 366 | |
||||||
| 367 | To be considered for eBay Express, in most cases a listing must include a picture or a gallery URL. | ||||||
| 368 | You can choose to use the eBay stock photo for this purpose. | ||||||
| 369 | See "Working with eBay Express Listings" in the eBay Web Services Guide. | ||||||
| 370 | |||||||
| 371 | SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=GalleryFeaturesSitesWithFreeGallery | ||||||
| 372 | For: complete details on how eBay selects a gallery thumbnail. | ||||||
| 373 | Title: Using Gallery Features on Sites with Free Gallery | ||||||
| 374 | , URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=Pictures | ||||||
| 375 | Title: Introduction to Pictures in Item Listings | ||||||
| 376 | , URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ExpressPictureRequired | ||||||
| 377 | Title: Specify a Picture for Express and eBay | ||||||
| 378 | |||||||
| 379 | |||||||
| 380 | Calls: AddItem | ||||||
| 381 | GetItemRecommendations | ||||||
| 382 | RelistItem | ||||||
| 383 | ReviseItem | ||||||
| 384 | VerifyAddItem | ||||||
| 385 | RequiredInput: No | ||||||
| 386 | |||||||
| 387 | # Argument: 'xs:boolean' | ||||||
| 388 | |||||||
| 389 | =cut | ||||||
| 390 | |||||||
| 391 | sub setUseStockPhotoURLAsGallery { | ||||||
| 392 | my $self = shift; | ||||||
| 393 | $self->{'UseStockPhotoURLAsGallery'} = shift | ||||||
| 394 | } | ||||||
| 395 | |||||||
| 396 | =head2 isUseStockPhotoURLAsGallery() | ||||||
| 397 | |||||||
| 398 | Calls: GetBidderList | ||||||
| 399 | Returned: Conditionally | ||||||
| 400 | |||||||
| 401 | Calls: GetItem | ||||||
| 402 | Returned: Conditionally | ||||||
| 403 | Details: DetailLevel: ItemReturnAttributes, ReturnAll | ||||||
| 404 | |||||||
| 405 | # Returns: 'xs:boolean' | ||||||
| 406 | |||||||
| 407 | =cut | ||||||
| 408 | |||||||
| 409 | sub isUseStockPhotoURLAsGallery { | ||||||
| 410 | my $self = shift; | ||||||
| 411 | return $self->{'UseStockPhotoURLAsGallery'}; | ||||||
| 412 | } | ||||||
| 413 | |||||||
| 414 | |||||||
| 415 | |||||||
| 416 | |||||||
| 417 | |||||||
| 418 | ## Attribute and Property lists | ||||||
| 419 | sub getPropertiesList { | ||||||
| 420 | my $self = shift; | ||||||
| 421 | return \@gaProperties; | ||||||
| 422 | } | ||||||
| 423 | |||||||
| 424 | sub getAttributesList { | ||||||
| 425 | my $self = shift; | ||||||
| 426 | return \@gaAttributes; | ||||||
| 427 | } | ||||||
| 428 | |||||||
| 429 | |||||||
| 430 | |||||||
| 431 | 1; |