Esempio n. 1
0
 /**
  * @param bool $returnData
  * @return Bronto_Api_MessageRule_Row
  */
 public function read()
 {
     if ($this->id) {
         $params = array('id' => $this->id);
     } else {
         $params = array('name' => array('value' => $this->name, 'operator' => 'EqualTo'));
     }
     return parent::_read($params, $returnData);
 }
Esempio n. 2
0
 /**
  * @return Bronto_Api_Field_Row
  */
 public function read()
 {
     if ($this->id) {
         $params = array('id' => $this->id);
     } elseif ($this->name) {
         $params = array('name' => array('value' => $this->name, 'operator' => 'EqualTo'));
     }
     parent::_read($params);
     return $this;
 }
 /**
  * @return Bronto_Api_Contact_Row
  */
 public function read()
 {
     $params = array();
     if ($this->id) {
         $params = array('id' => $this->id);
     } elseif ($this->email) {
         $params = array('email' => array('value' => $this->email, 'operator' => 'EqualTo'));
     } else {
         throw new Bronto_Api_Contact_Exception('Trying to read Contact without Id or Email for lookup');
     }
     parent::_read($params);
     return $this;
 }
Esempio n. 4
0
 /**
  * @return Bronto_Api_ApiToken_Row
  */
 public function read()
 {
     if ($this->id) {
         $params = array('id' => $this->id);
     } elseif ($this->accountId) {
         $params = array('accountId' => $this->accountId);
     } elseif ($this->name) {
         $params = array('name' => array('value' => $this->name, 'operator' => 'EqualTo'));
     } else {
         throw new Bronto_Api_ApiToken_Exception('Trying to read ApiToken without Id or Name for lookup');
     }
     parent::_read($params);
     return $this;
 }
 /**
  * @return Bronto_Api_Conversion_Row
  */
 public function read()
 {
     $params = array();
     if ($this->id) {
         $params['id'] = array($this->id);
     } else {
         if ($this->contactId) {
             $params['contactId'] = array($this->contactId);
         }
         if ($this->deliveryId) {
             $params['deliveryId'] = array($this->deliveryId);
         }
         if ($this->orderId) {
             $params['orderId'] = array($this->orderId);
         }
     }
     parent::_read($params);
     return $this;
 }