gchecky.model.shipping_option_t

Package gchecky :: Module model :: Class shipping_option_t |
[hide private]
[frames] | no frames]

# Class shipping_option_t

source code

    object --+
             |
     gxml.Node --+
                 |
                shipping_option_t

Known Subclasses:
  flat_rate_shipping_t, merchant_calculated_shipping_t

Represents information about shipping costs.

    >>> test_node(
    ...   shipping_option_t(
    ...       name = 'Testing',
    ...         price = price_t(
    ...             currency = 'GBP',
    ...             value = 9.99,
    ...             ),
    ...         allowed_areas = allowed_areas_t(
    ...             world_area = True,
    ...             ),
    ...         excluded_areas = excluded_areas_t(
    ...             postal_areas = [postal_area_t(
    ...                 country_code = 'US',
    ...                 )],
    ...             ),
    ...         )
    ... , '''
    ... <node name='Testing'>
    ...   <price currency='GBP'>9.990</price>
    ...   <shipping-restrictions>
    ...     <allowed-areas>
    ...       <world-area/>
    ...     </allowed-areas>
    ...     <excluded-areas>
    ...       <postal-area>
    ...         <country-code>US</country-code>
    ...       </postal-area>
    ...     </excluded-areas>
    ...   </shipping-restrictions>
    ... </node>
    ... ''')

Nested Classes | [hide private]
Inherited from `gxml.Node`: `__metaclass__`

Instance Methods | [hide private]
Inherited from `gxml.Node`: `__eq__`, `__init__`, `__neq__`, `read`, `write` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Methods | [hide private]
Inherited from `gxml.Node`: `fields`, `set_fields`

Static Methods | [hide private]
Inherited from `gxml.Node`: `__new__`

Class Variables | [hide private]
| name = `String:PATH(@name):REQ:EMPTY`
| price = `Node:PATH(price):REQ:{ price_t }`
| allowed_areas = `Node:PATH(shipping-restrictions/allowed-areas)`...``
| excluded_areas = `Node:PATH(shipping-restrictions/excluded-area`...``
| _fields = ``{``'``allowed_areas``'``:` Node:PATH(shipping-restrictions/al`...`` list of meta-Fields of this class.

Properties | [hide private]
Inherited from `object`: `__class__`

Class Variable Details | [hide private]

  ### allowed_areas Value:
      Node:PATH(shipping-restrictions/allowed-areas):OPT:{ allowed_areas_t }

  ### excluded_areas Value:
      Node:PATH(shipping-restrictions/excluded-areas):OPT:{ excluded_areas_t
       }

  ### _fields list of meta-Fields of this class. Value:
      {'allowed_areas': Node:PATH(shipping-restrictions/allowed-areas):OPT:{
       allowed_areas_t },
       'excluded_areas': Node:PATH(shipping-restrictions/excluded-areas):OPT
      :{ excluded_areas_t },
       'name': String:PATH(@name):REQ:EMPTY,
       'price': Node:PATH(price):REQ:{ price_t }}