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

Source for file Order.php

Documentation is available at Order.php

  1. <?PHP
  2. /**
  3.  * Model for an eBay order
  4.  *
  5.  * @package Services_Ebay
  6.  * @author  Stephan Schmidt <schst@php.net>
  7.  */
  8. {
  9.    /**
  10.     * create a new order
  11.     *
  12.     * @param    array 
  13.     * @param    object 
  14.     */
  15.     public function __construct($props$session = null)
  16.     {
  17.         parent::__construct($props$session);
  18.         $this->properties['Transactions'= array('Transaction' => array());
  19.         $this->properties['ShippingServiceOptions'= array('ShippingServiceOption' => array());
  20.         $this->properties['PaymentTerms'= array();
  21.     }
  22.     
  23.    /**
  24.     * add a new transaction
  25.     *
  26.     * @param    string 
  27.     * @param    string 
  28.     */    
  29.     public function AddTransaction($ItemId$TransactionId)
  30.     {
  31.         $Transaction = array(
  32.                             'ItemId' => $ItemId,
  33.                             'TransactionId' => $TransactionId
  34.                             );
  35.                             
  36.         array_push($this->properties['Transactions']['Transaction']$Transaction);
  37.     }
  38.  
  39.    /**
  40.     * add a new shipping option
  41.     *
  42.     * @param    string 
  43.     * @param    string 
  44.     */    
  45.     public function AddShippingServiceOption($ShippingService$ShippingServiceCost$ShippingServicePriority)
  46.     {
  47.         $Option = array(
  48.                             'ShippingService'         => $ShippingService,
  49.                             'ShippingServiceCost'     => $ShippingServiceCost,
  50.                             'ShippingServicePriority' => $ShippingServicePriority
  51.                             );
  52.                             
  53.         array_push($this->properties['ShippingServiceOptions']['ShippingServiceOption']$Option);
  54.     }
  55.  
  56.    /**
  57.     * set the accepted payment terms
  58.     *
  59.     * @param    string 
  60.     */    
  61.     public function AcceptPaymentTerms($methods)
  62.     {
  63.         $methods func_get_args();
  64.         foreach ($methods as $method{
  65.             $this->properties['PaymentTerms'][$method= 1;
  66.         }
  67.     }
  68.     
  69. }
  70. ?>

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