Esempio n. 1
0
 public function testAddOrUpdateMultipleSubscribers()
 {
     $subscribers = new SubscriberCollection();
     $subscriber = new Subscriber();
     $subscriber->setEmailAddress('*****@*****.**')->setSourceId(1);
     $subscribers->addSubscriber($subscriber);
     // add orders, order items, custom fields, etc...
     $subscribersResource = new Subscribers($this->connection);
     $subscribersResource->addOrUpdateMultiple($subscribers);
 }
Esempio n. 2
0
 public function post(Subscriber $subscriber)
 {
     $payload = $subscriber->toPost();
     return $this->connection->post('/Subscribers', $payload);
 }