File Coverage

lib/eBay/API/XML/Call/GetItemShipping/GetItemShippingRequestType.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::GetItemShipping::GetItemShippingRequestType;
4              
5 1     1   2878 use strict;
  1         4  
  1         47  
6 1     1   7 use warnings;
  1         4  
  1         51  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. GetItemShippingRequestType.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::GetItemShipping::GetItemShippingRequestType
21              
22             =head1 DESCRIPTION
23              
24             Returns shipping cost estimates for an item for every calculated shipping service
25             that the seller has offered with the listing. This is analogous to the Shipping
26             Calculator seen in both the buyer and seller web pages.
27             It is another way for a buyer or seller to obtain shipping cost information for an
28             existing item (for which the caller is either the buyer or seller) at any point in
29             the life of of the listing, before or after a buyer has committed to purchasing
30             the item(s).
31            

Note:

32            
33            
  • Shipping insurance cost can only be determined once the
  • 34             final item price is known.
    35            
  • It is possible for a seller to offer a shipping service which turns out
  • 36             to be a mismatch in some way with the item(s) being shipped. For example, if a
    37             buyer purchases more than one of an item, the weight might be too great for First
    38             Class mail. In such a case, GetItemShipping will omit that shipping service from
    39             the response.
    40            
    41              
    42              
    43              
    44             =head1 SYNOPSIS
    45              
    46             =cut
    47              
    48              
    49             =head1 INHERITANCE
    50              
    51             eBay::API::XML::Call::GetItemShipping::GetItemShippingRequestType inherits from the L class
    52              
    53             =cut
    54              
    55 1     1   61 use eBay::API::XML::RequestDataType;
      0            
      0            
    56             our @ISA = ("eBay::API::XML::RequestDataType");
    57              
    58             use eBay::API::XML::DataType::ItemIDType;
    59             use eBay::API::XML::DataType::Enum::CountryCodeType;
    60              
    61              
    62             my @gaProperties = ( [ 'DestinationCountryCode', 'ns:CountryCodeType', ''
    63             ,'eBay::API::XML::DataType::Enum::CountryCodeType', '' ]
    64             , [ 'DestinationPostalCode', 'xs:string', '', '', '' ]
    65             , [ 'ItemID', 'ns:ItemIDType', ''
    66             ,'eBay::API::XML::DataType::ItemIDType', '1' ]
    67             , [ 'QuantitySold', 'xs:int', '', '', '' ]
    68             );
    69             push @gaProperties, @{eBay::API::XML::RequestDataType::getPropertiesList()};
    70              
    71             my @gaAttributes = (
    72             );
    73             push @gaAttributes, @{eBay::API::XML::RequestDataType::getAttributesList()};
    74              
    75             =head1 Subroutines:
    76              
    77             =cut
    78              
    79             sub new {
    80             my $classname = shift;
    81             my %args = @_;
    82             my $self = $classname->SUPER::new(%args);
    83             return $self;
    84             }
    85              
    86             sub isScalar {
    87             return 0;
    88             }
    89              
    90              
    91              
    92             =head2 setDestinationCountryCode()
    93              
    94             Destination country code. If DestinationCountryCode is US,
    95             postal code is required and represents US zip code.
    96              
    97             Default: US
    98              
    99             RequiredInput: Conditionally
    100             # Argument: 'ns:CountryCodeType'
    101              
    102             =cut
    103              
    104             sub setDestinationCountryCode {
    105             my $self = shift;
    106             $self->{'DestinationCountryCode'} = shift
    107             }
    108              
    109             =head2 getDestinationCountryCode()
    110              
    111             # Returns: 'ns:CountryCodeType'
    112              
    113             =cut
    114              
    115             sub getDestinationCountryCode {
    116             my $self = shift;
    117             return $self->{'DestinationCountryCode'};
    118             }
    119              
    120              
    121             =head2 setDestinationPostalCode()
    122              
    123             Destination country postal code (or zipcode, for US). Ignored if no
    124             country code is provided. Optional tag for some countries. More likely to
    125             be required for large countries.
    126              
    127             RequiredInput: Conditionally
    128             # Argument: 'xs:string'
    129              
    130             =cut
    131              
    132             sub setDestinationPostalCode {
    133             my $self = shift;
    134             $self->{'DestinationPostalCode'} = shift
    135             }
    136              
    137             =head2 getDestinationPostalCode()
    138              
    139             # Returns: 'xs:string'
    140              
    141             =cut
    142              
    143             sub getDestinationPostalCode {
    144             my $self = shift;
    145             return $self->{'DestinationPostalCode'};
    146             }
    147              
    148              
    149             =head2 setItemID()
    150              
    151             The item ID that uniquely identifies the item listing for which
    152             to retrieve the data. Required input.
    153              
    154             MaxLength: 19 (Note: The eBay database specifies 38. Currently, Item IDs are usually 9 to 12 digits)
    155              
    156             RequiredInput: Yes
    157             # Argument: 'ns:ItemIDType'
    158              
    159             =cut
    160              
    161             sub setItemID {
    162             my $self = shift;
    163             $self->{'ItemID'} = shift
    164             }
    165              
    166             =head2 getItemID()
    167              
    168             # Returns: 'ns:ItemIDType'
    169              
    170             =cut
    171              
    172             sub getItemID {
    173             my $self = shift;
    174             return $self->_getDataTypeInstance( 'ItemID'
    175             ,'eBay::API::XML::DataType::ItemIDType');
    176             }
    177              
    178              
    179             =head2 setQuantitySold()
    180              
    181             Number of items sold to a single buyer and to be shipped together.
    182              
    183             RequiredInput: No
    184             # Argument: 'xs:int'
    185              
    186             =cut
    187              
    188             sub setQuantitySold {
    189             my $self = shift;
    190             $self->{'QuantitySold'} = shift
    191             }
    192              
    193             =head2 getQuantitySold()
    194              
    195             # Returns: 'xs:int'
    196              
    197             =cut
    198              
    199             sub getQuantitySold {
    200             my $self = shift;
    201             return $self->{'QuantitySold'};
    202             }
    203              
    204              
    205              
    206              
    207              
    208             ## Attribute and Property lists
    209             sub getPropertiesList {
    210             my $self = shift;
    211             return \@gaProperties;
    212             }
    213              
    214             sub getAttributesList {
    215             my $self = shift;
    216             return \@gaAttributes;
    217             }
    218              
    219              
    220              
    221             1;