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

eBay::API::XML::Tools::CodeGen::XSD::Annotation

Generate annotations/documentation for the classes.

createAddAppInfo()

Some times there are a few more elements in rhAppInfo hash table:

   SiteInfo, Constraint, APIInfo

They are rarely used. Concatenate them into one generic variable: 'additionalAppInfo'

hashMakeSureItsArray()

Arguments:

  1. [R] Either a hash ref or an array ref
  2. [0] Warning message if previous parameter is not a reference.

Returns:

  an array ref

Description:

If there are multiple elements with a same name, XML:Simple return them as a reference to an array, otherwise it returns a value.

The problem is that for some XML document, the element appears only once in the structure, while for other documents, more than once.

Here, we make sure that such elements are returned in a array even in cases when there is only one element. Obviously we do this only for elements that we know can be returned as an array.

scalarMakeSureItsArray()

Argument:

  1. [R] Either an array ref or a scalar

Returns:

  an array ref

Description:

If there are multiple elements with a same name, XML:Simple return them as a reference to an array, otherwise it returns a value.

The problem is that for some XML document, the element appears only once in the structure, while for other documents, more than once.

Here, we make sure that such elements are returned in a array even in cases when there is only one element. Obviosly we do this only for elements that we know can be returned as an array.

eBay::API::XML::Tools::CodeGen::XSD::Annotation::CallInfo

Manage call information for the annotations.

new()

Arguments:

     a hash containing the following values:

     1.  'CallName' and 'Context' are arrays

         'Returned' => 'Conditionally',
         'CallName' => [
                'GetBidderList',
                'GetItem',
               ],
          'Context' => [
               'BidList',
               'LostList',
               'WonList'
              ] 
          'MaxLength' => '32',

      2.  'CallName' and 'Context' are just scalars
          'Returned' => 'Conditionally',
          'CallName' => 'GetBidderList',
          'MaxLength' => '32',
          'Context' => 'WatchList'

NOTE: 'CallName' and 'Context' can be either an array or a scalar.

This structure has to be converted into a set with 3 elements:

  a) callNames   - array ref
  b) attributes  - hash ref ('RequiredInput', 'Returned', 'MaxLength')
  c) context     - array ref

_setCallNames()

Arguments: a reference to an array containg scalars (strings)

Description: Array contains names of calls for which the given property is used.

getCallNames()

Returns: a reference to an array containg scalars (strings)

Description: Array contains names of calls for which the given property is used.

_setAttributes()

Arguments: a reference to a hash. Hash element definition: key - attribute name (scalar string value - attribute value (scalar string)

Description: Hash contains all attributes common for all calls defined with current instance of CallInfo

getAttributes()

Arguments: a reference to a hash.

Description: see getAttributes

_setContext()

Arguments: a reference to an array containg scalars (strings)

Description: Array contains context names in which the given property is being used.

getContext()

Returns: a reference to an array containg scalars (strings)

Description: Array contains context names in which a given property is being used.

getInputOutputAttribute()

Returns: reference to a hash The hash contains either all Input/Output attributes of all calls contained in this CallInfo instance.

Attribute can be both, input argument and output property

1. For calls where the property is used as an input argument return: 'RequiredInput' attribute name

2. For calls where the property is used as an output property return: 'Returned' attribute name

getNonInputOutputAttribute()

Returns: reference to a hash The hash contains all attributes except Input/Output related attributes. See 'getInputOutputAttribute' method above for definition of Input/Output attributes.