Services_Ebay
[ class tree: Services_Ebay ] [ index: Services_Ebay ] [ all elements ]

Source for file Shipment.php

Documentation is available at Shipment.php

  1. <?PHP
  2. /**
  3.  * Model for a shipment
  4.  *
  5.  *
  6.  * @package Services_Ebay
  7.  * @author  Stephan Schmidt <schst@php.net>
  8.  */
  9. {
  10.    /**
  11.     * default properties for a shipment
  12.     *
  13.     * @var  array 
  14.     */
  15.     protected $properties = array(
  16.                                     'CurrencyId'   => 1,
  17.                                     'Transactions' => array()
  18.                                 );
  19.  
  20.    /**
  21.     * set package dimemsions for the shipment
  22.     *
  23.     * @param    int     depth
  24.     * @param    int     length
  25.     * @param    int     width
  26.     * @return   void 
  27.     */               
  28.     public function SetPackageDimensions($Depth$Length$Width)
  29.     {
  30.         $this->properties['PackageDimensions'= array(
  31.                                                         'Depth'         => $Depth,
  32.                                                         'Length'        => $Length,
  33.                                                         'Width'         => $Width,
  34.                                                         'UnitOfMeasure' => 1
  35.                                                     );
  36.     }
  37.                                 
  38.    /**
  39.     * add a transaction
  40.     *
  41.     * @param    string  item id
  42.     * @param    string  transactio id
  43.     * @return   void 
  44.     */               
  45.     public function AddTransaction($ItemId$TransactionId)
  46.     {
  47.         array_push($this->properties['Transactions']array'ItemId' => $ItemId'TransactionId' => $TransactionId ));
  48.     }
  49.  
  50.    /**
  51.     * set the from address
  52.     *
  53.     * @param    string  company name
  54.     * @param    string  name
  55.     * @param    string  street, line 1
  56.     * @param    string  street, line 2
  57.     * @param    string  city
  58.     * @param    string  zipcode
  59.     * @param    string  state or province
  60.     * @param    string  country
  61.     * @param    string  phone number
  62.     * @return   void 
  63.     */               
  64.     public function SetFromAddress($CompanyName$Name$Street1$Street2$City$Zip$StateOrProvince$Country$Phone = null)
  65.     {
  66.         $this->properties['ShipFromAddress'= array(
  67.                                                         'CompanyName'     => $CompanyName,
  68.                                                         'Name'            => $Name,
  69.                                                         'Street1'         => $Street1,
  70.                                                         'Street2'         => $Street2,
  71.                                                         'City'            => $City,
  72.                                                         'Zip'             => $Zip,
  73.                                                         'StateOrProvince' => $StateOrProvince,
  74.                                                         'Country'         => $Country,
  75.                                                         'Phone'           => $Phone
  76.                                                     );
  77.     }
  78.  
  79.    /**
  80.     * set the to address
  81.     *
  82.     * @param    string  type of the address
  83.     * @param    string  company name
  84.     * @param    string  name
  85.     * @param    string  street, line 1
  86.     * @param    string  street, line 2
  87.     * @param    string  city
  88.     * @param    string  zipcode
  89.     * @param    string  state or province
  90.     * @param    string  country
  91.     * @param    string  phone number
  92.     * @return   void 
  93.     */               
  94.     public function SetAddress($Type$CompanyName$Name$Street1$Street2$City$Zip$StateOrProvince$Country$Phone = null)
  95.     {
  96.         $this->properties['ShippingAddress'= array(
  97.                                                         'AddressType'     => $Type,
  98.                                                         'CompanyName'     => $CompanyName,
  99.                                                         'Name'            => $Name,
  100.                                                         'Street1'         => $Street1,
  101.                                                         'Street2'         => $Street2,
  102.                                                         'City'            => $City,
  103.                                                         'Zip'             => $Zip,
  104.                                                         'StateOrProvince' => $StateOrProvince,
  105.                                                         'Country'         => $Country,
  106.                                                         'Phone'           => $Phone
  107.                                                     );
  108.     }
  109. }
  110. ?>

Documentation generated on Mon, 11 Mar 2019 15:49:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.