| Value | Description |
|---|
| `no_consent` | The customer has not given consent to receive any marketing communications |
| `unsubscribed` | The customers have unsubscribed from ALL marketing communications |
| `subscribed` | The customers are subscribed and are counted towards marketing caps |
| `archived` | The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for |
+ *
+ * @return self
+ */
+ public function setMarketingStatus($marketing_status): self
+ {
+ $allowedValues = $this->getMarketingStatusAllowableValues();
+ if (!is_null($marketing_status) && !in_array($marketing_status, $allowedValues, true)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ "Invalid value '%s' for 'marketing_status', must be one of '%s'",
+ $marketing_status,
+ implode("', '", $allowedValues)
+ )
+ );
+ }
+ $this->container['marketing_status'] = $marketing_status;
+
+ return $this;
+ }
+
+ /**
+ * Gets custom_fields
+ *
+ * @return array