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); }
public function post(Subscriber $subscriber) { $payload = $subscriber->toPost(); return $this->connection->post('/Subscribers', $payload); }