123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- <?php
- namespace Dotdigitalgroup\Email\Model\Connector;
- /**
- * Holds Account information.
- *
- * @SuppressWarnings(PHPMD.ExcessivePublicCount)
- */
- class Account
- {
- /**
- * @var string
- */
- public $apiUsername;
- /**
- * @var string
- */
- public $apiPassword;
- /**
- * @var int|string
- */
- public $limit;
- /**
- * @var int|string
- */
- public $contactBookId;
- /**
- * @var int|string
- */
- public $subscriberBookId;
- /**
- * @var array
- */
- public $websites = [];
- /**
- * @var array
- */
- public $csvHeaders;
- /**
- * @var string
- */
- public $customersFilename;
- /**
- * @var string
- */
- public $subscribersFilename;
- /**
- * @var array
- */
- public $mappingHash;
- /**
- * @var array
- */
- public $contacts = [];
- /**
- * @var array
- */
- public $orders = [];
- /**
- * @var array
- */
- public $orderIds;
- /**
- * @var array
- */
- public $ordersForSingleSync = [];
- /**
- * @var array
- */
- public $orderIdsForSingleSync;
- /**
- * Set api password.
- *
- * @param string $apiPassword
- *
- * @return $this
- */
- public function setApiPassword($apiPassword)
- {
- $this->apiPassword = $apiPassword;
- return $this;
- }
- /**
- * Get api password.
- *
- * @return string
- */
- public function getApiPassword()
- {
- return $this->apiPassword;
- }
- /**
- * Set api username.
- *
- * @param string $apiUsername
- *
- * @return $this
- */
- public function setApiUsername($apiUsername)
- {
- $this->apiUsername = $apiUsername;
- return $this;
- }
- /**
- * Get api username.
- *
- * @return string
- */
- public function getApiUsername()
- {
- return $this->apiUsername;
- }
- /**
- * Set contact book id.
- *
- * @param string $contactBookId
- *
- * @return null
- */
- public function setContactBookId($contactBookId)
- {
- $this->contactBookId[$contactBookId] = $contactBookId;
- }
- /**
- * Get contact book ids.
- *
- * @return string
- */
- public function getContactBookIds()
- {
- return $this->contactBookId;
- }
- /**
- * Set contacts.
- *
- * @param array $contacts
- *
- * @return null
- */
- public function setContacts($contacts)
- {
- if (!empty($this->contacts)) {
- $this->contacts += $contacts;
- } else {
- $this->contacts[] = $contacts;
- }
- }
- /**
- * Get contacts.
- *
- * @return array
- */
- public function getContacts()
- {
- return $this->contacts;
- }
- /**
- * Set customers filename.
- *
- * @param string $customersFilename
- *
- * @return null
- */
- public function setCustomersFilename($customersFilename)
- {
- $this->customersFilename = $customersFilename;
- }
- /**
- * @return string
- */
- public function getCustomersFilename()
- {
- return $this->customersFilename;
- }
- /**
- * @param int $limit
- *
- * @return string
- */
- public function setLimit($limit)
- {
- $this->limit = $limit;
- }
- /**
- * @return string
- */
- public function getLimit()
- {
- return $this->limit;
- }
- /**
- * @param array $mappingHash
- */
- public function setMappingHash($mappingHash)
- {
- $this->mappingHash = $mappingHash;
- }
- /**
- * @return array
- */
- public function getMappingHash()
- {
- return $this->mappingHash;
- }
- /**
- * @param array $orders
- *
- * @return array
- */
- public function setOrders($orders)
- {
- foreach ($orders as $order) {
- $this->orders[$order->id] = $order->expose();
- }
- }
- /**
- * @return array
- */
- public function getOrders()
- {
- return $this->orders;
- }
- /**
- * @param string $subscriberBookId
- *
- * @return array
- */
- public function setSubscriberBookId($subscriberBookId)
- {
- $this->subscriberBookId[$subscriberBookId] = $subscriberBookId;
- }
- /**
- * @return string
- */
- public function getSubscriberBookIds()
- {
- return $this->subscriberBookId;
- }
- /**
- * @param string $subscribersFilename
- *
- * @return string
- */
- public function setSubscribersFilename($subscribersFilename)
- {
- $this->subscribersFilename = $subscribersFilename;
- }
- /**
- * @return string
- */
- public function getSubscribersFilename()
- {
- return $this->subscribersFilename;
- }
- /**
- * @param array $csvHeaders
- *
- * @return array
- */
- public function setCsvHeaders($csvHeaders)
- {
- $this->csvHeaders = $csvHeaders;
- }
- /**
- * @return array
- */
- public function getCsvHeaders()
- {
- return $this->csvHeaders;
- }
- /**
- * @param array $websites
- *
- * @return array
- */
- public function setWebsites($websites)
- {
- $this->websites[] = $websites;
- }
- /**
- * @return array
- */
- public function getWebsites()
- {
- return $this->websites;
- }
- /**
- * @param array $orderIds
- *
- * @return array
- */
- public function setOrderIds($orderIds)
- {
- $this->orderIds = $orderIds;
- }
- /**
- * @return array
- */
- public function getOrderIds()
- {
- return $this->orderIds;
- }
- /**
- * @param array $orders
- *
- * @return null
- */
- public function setOrdersForSingleSync($orders)
- {
- foreach ($orders as $order) {
- $this->ordersForSingleSync[$order->id] = $order->expose();
- }
- }
- /**
- * @return array
- */
- public function getOrdersForSingleSync()
- {
- return $this->ordersForSingleSync;
- }
- /**
- * @param array $orderIds
- *
- * @return null
- */
- public function setOrderIdsForSingleSync($orderIds)
- {
- $this->orderIdsForSingleSync = $orderIds;
- }
- /**
- * @return array
- */
- public function getOrderIdsForSingleSync()
- {
- return $this->orderIdsForSingleSync;
- }
- }
|