Esempio n. 1
0
 /**
  * Constructor for the Object
  * 
  * @access public
  * @param string $tracking_number number of the pacaage(s) we are tracking
  * @param array $inquiry array of inquiry data
  */
 public function __construct($tracking_number = null, $inquiry = array())
 {
     parent::__construct();
     // set object properties
     $this->tracking_number = $tracking_number;
     $this->inquiry_array = $inquiry;
 }
 /**
  * Constructor for the Object
  * 
  * @access public
  * @param array $address array of address parts to validate
  */
 public function __construct($address)
 {
     parent::__construct();
     // set object properties
     $this->server = $GLOBALS['ups_api']['server'] . '/ups.app/xml/AV';
     $this->address = $address;
 }
Esempio n. 3
0
 /**
  * Constructor for the Object
  * 
  * @access public
  * @param array $origin array of origin data
  * @param array $destination array of destination data
  * @param array $data array of request data
  */
 public function __construct($origin, $destination, $data)
 {
     parent::__construct();
     // set object properties
     $this->origin = $origin;
     $this->destination = $destination;
     $this->data = $data;
 }
Esempio n. 4
0
 /**
  * Constructor for the Object
  * 
  * @access public
  * @param array $origin array of origin data
  * @param array $destination array of destination data
  * @param array $data array of request data
  */
 public function __construct($origin, $destination, $data)
 {
     parent::__construct();
     // set object properties
     $this->server = $GLOBALS['ups_api']['server'] . '/ups.app/xml/TimeInTransit';
     $this->origin = $origin;
     $this->destination = $destination;
     $this->data = $data;
 }
 /**
  * Constructor for the Object
  * 
  * @access public
  * @param array $address array of address parts to validate
  */
 public function __construct($address)
 {
     parent::__construct();
     $this->server = $GLOBALS['ups_street_level_api']['server'] . '/ups.app/xml/XAV';
     /// check for zip4
     if (isset($address['zip_code'])) {
         $pattern = "/([^0-9])/";
         $zip = trim(preg_replace($pattern, '', $address['zip_code']));
         if (strlen($zip) > 5) {
             $zip5 = substr($zip, 0, 5);
             $zip4 = substr($zip, 5);
             if (strlen($zip5) == 5 && strlen($zip4) == 4) {
                 $address['zip_code'] = $zip5;
                 $address['zip_code4'] = $zip4;
             }
         }
     }
     $this->address = $address;
 }
 /**
  * Constructor for the Object
  * 
  * @access public
  * @param array $shipment array of shipment data
  * @param array $shipper array of shipper data
  * @param array $ship_from array of ship from data
  * @param array $desination array of destination data
  */
 public function __construct($shipment, $shipper, $ship_from, $desination)
 {
     parent::__construct();
     // set object properties
     $this->server = $GLOBALS['ups_api']['server'] . '/ups.app/xml/Rate';
     $this->shipment = $shipment;
     $this->shipper = $shipper;
     $this->ship_from = $ship_from;
     $this->destination = $desination;
 }
 /**
  * Constructor for the Object
  * 
  * @access public
  * @param array $address array of address parts to validate
  */
 public function __construct($address)
 {
     parent::__construct();
     // set object properties
     $this->address = $address;
 }
 /**
  * Constructor for the Object
  * 
  * @access public
  * @param array $shipment array of shipment data
  * @param array $shipper array of shipper data
  * @param array $ship_from array of ship from data
  * @param array $desination array of destination data
  */
 public function __construct($shipment, $shipper, $ship_from, $desination)
 {
     parent::__construct();
     // set object properties
     $this->shipment = $shipment;
     $this->shipper = $shipper;
     $this->ship_from = $ship_from;
     $this->destination = $desination;
 }