Ejemplo n.º 1
0
 /**
  * Use customer key ($custKey) as the triggered send key definition.
  *
  * @param type $custKey
  * @param type $options
  */
 public function useKey($custKey, $options = array())
 {
     $tsd = new EtTriggeredSendDefinition();
     $tsd->setCustomerKey($custKey);
     if (!empty($options)) {
         foreach ($options as $key => $value) {
             $tsd->set($key, $value);
         }
     }
     $this->TriggeredSendDefinition = new \SoapVar($tsd, SOAP_ENC_OBJECT, "TriggeredSendDefinition", EtClient::SOAPWSDL);
 }
Ejemplo n.º 2
0
 /**
  *
  * @param string $triggeredSendKey
  * @param array $options
  * @return EtTriggeredSend
  */
 public function buildTriggeredSend($triggeredSendKey, $options = array())
 {
     $tsd = new EtTriggeredSendDefinition();
     $tsd->setCustomerKey($triggeredSendKey);
     if (!empty($options)) {
         foreach ($options as $key => $value) {
             $tsd->set($key, $value);
         }
     }
     $ts = new EtTriggeredSend($this);
     $ts->setTriggeredSendDefinition(new \SoapVar($tsd, SOAP_ENC_OBJECT, "TriggeredSendDefinition", self::SOAPWSDL));
     // return the triggeredSend to allow you to add subscribers or whatever you need to do
     return $ts;
 }