From 91f5129d4e12c6366141f336bbe798c4354ee414 Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Wed, 23 Sep 2026 15:12:39 +0000 Subject: [PATCH] chore: regenerate SDK --- generated/Api/AppIconBadgesApi.php | 39 +- generated/Api/LiveActivitiesApi.php | 86 ++- generated/Api/PushNotificationsApi.php | 43 +- generated/Model/BillingBlockedError.php | 556 ++++++++++++++++++ .../Model/BillingBlockedErrorTrialPeriod.php | 449 ++++++++++++++ generated/Model/PushInterruptionLevel.php | 66 +++ generated/Model/PushNotificationRequest.php | 77 +++ generated/openapi-source.json | 4 +- 8 files changed, 1304 insertions(+), 16 deletions(-) create mode 100644 generated/Model/BillingBlockedError.php create mode 100644 generated/Model/BillingBlockedErrorTrialPeriod.php create mode 100644 generated/Model/PushInterruptionLevel.php diff --git a/generated/Api/AppIconBadgesApi.php b/generated/Api/AppIconBadgesApi.php index 2297269..5d6b240 100644 --- a/generated/Api/AppIconBadgesApi.php +++ b/generated/Api/AppIconBadgesApi.php @@ -132,7 +132,7 @@ public function getConfig() * * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \ActivitySmith\Generated\Model\AppIconBadgeCountUpdateResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\UpdateAppIconBadgeCount422Response|\ActivitySmith\Generated\Model\RateLimitError|\ActivitySmith\Generated\Model\AppIconBadgeCountUpdateError + * @return \ActivitySmith\Generated\Model\AppIconBadgeCountUpdateResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\BillingBlockedError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\UpdateAppIconBadgeCount422Response|\ActivitySmith\Generated\Model\RateLimitError|\ActivitySmith\Generated\Model\AppIconBadgeCountUpdateError */ public function updateAppIconBadgeCount($appIconBadgeCountUpdateRequest, string $contentType = self::contentTypes['updateAppIconBadgeCount'][0]) { @@ -150,7 +150,7 @@ public function updateAppIconBadgeCount($appIconBadgeCountUpdateRequest, string * * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \ActivitySmith\Generated\Model\AppIconBadgeCountUpdateResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\UpdateAppIconBadgeCount422Response|\ActivitySmith\Generated\Model\RateLimitError|\ActivitySmith\Generated\Model\AppIconBadgeCountUpdateError, HTTP status code, HTTP response headers (array of strings) + * @return array of \ActivitySmith\Generated\Model\AppIconBadgeCountUpdateResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\BillingBlockedError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\UpdateAppIconBadgeCount422Response|\ActivitySmith\Generated\Model\RateLimitError|\ActivitySmith\Generated\Model\AppIconBadgeCountUpdateError, HTTP status code, HTTP response headers (array of strings) */ public function updateAppIconBadgeCountWithHttpInfo($appIconBadgeCountUpdateRequest, string $contentType = self::contentTypes['updateAppIconBadgeCount'][0]) { @@ -246,6 +246,33 @@ public function updateAppIconBadgeCountWithHttpInfo($appIconBadgeCountUpdateRequ $response->getStatusCode(), $response->getHeaders() ]; + case 402: + if ('\ActivitySmith\Generated\Model\BillingBlockedError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\ActivitySmith\Generated\Model\BillingBlockedError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\ActivitySmith\Generated\Model\BillingBlockedError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: if ('\ActivitySmith\Generated\Model\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -402,6 +429,14 @@ public function updateAppIconBadgeCountWithHttpInfo($appIconBadgeCountUpdateRequ ); $e->setResponseObject($data); break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\ActivitySmith\Generated\Model\BillingBlockedError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), diff --git a/generated/Api/LiveActivitiesApi.php b/generated/Api/LiveActivitiesApi.php index d3601e1..4e7fb88 100644 --- a/generated/Api/LiveActivitiesApi.php +++ b/generated/Api/LiveActivitiesApi.php @@ -960,7 +960,7 @@ public function endLiveActivityStreamRequest($streamKey, $liveActivityStreamDele * * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \ActivitySmith\Generated\Model\LiveActivityStreamPutResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response + * @return \ActivitySmith\Generated\Model\LiveActivityStreamPutResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\BillingBlockedError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response */ public function reconcileLiveActivityStream($streamKey, $liveActivityStreamRequest, string $contentType = self::contentTypes['reconcileLiveActivityStream'][0]) { @@ -979,7 +979,7 @@ public function reconcileLiveActivityStream($streamKey, $liveActivityStreamReque * * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \ActivitySmith\Generated\Model\LiveActivityStreamPutResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \ActivitySmith\Generated\Model\LiveActivityStreamPutResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\BillingBlockedError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response, HTTP status code, HTTP response headers (array of strings) */ public function reconcileLiveActivityStreamWithHttpInfo($streamKey, $liveActivityStreamRequest, string $contentType = self::contentTypes['reconcileLiveActivityStream'][0]) { @@ -1075,6 +1075,33 @@ public function reconcileLiveActivityStreamWithHttpInfo($streamKey, $liveActivit $response->getStatusCode(), $response->getHeaders() ]; + case 402: + if ('\ActivitySmith\Generated\Model\BillingBlockedError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\ActivitySmith\Generated\Model\BillingBlockedError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\ActivitySmith\Generated\Model\BillingBlockedError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: if ('\ActivitySmith\Generated\Model\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1102,7 +1129,7 @@ public function reconcileLiveActivityStreamWithHttpInfo($streamKey, $liveActivit $response->getStatusCode(), $response->getHeaders() ]; - case 404: + case 422: if ('\ActivitySmith\Generated\Model\NoRecipientsError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1204,6 +1231,14 @@ public function reconcileLiveActivityStreamWithHttpInfo($streamKey, $liveActivit ); $e->setResponseObject($data); break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\ActivitySmith\Generated\Model\BillingBlockedError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1212,7 +1247,7 @@ public function reconcileLiveActivityStreamWithHttpInfo($streamKey, $liveActivit ); $e->setResponseObject($data); break; - case 404: + case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\ActivitySmith\Generated\Model\NoRecipientsError', @@ -1435,7 +1470,7 @@ public function reconcileLiveActivityStreamRequest($streamKey, $liveActivityStre * * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \ActivitySmith\Generated\Model\LiveActivityStartResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response + * @return \ActivitySmith\Generated\Model\LiveActivityStartResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\BillingBlockedError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response */ public function startLiveActivity($liveActivityStartRequest, string $contentType = self::contentTypes['startLiveActivity'][0]) { @@ -1453,7 +1488,7 @@ public function startLiveActivity($liveActivityStartRequest, string $contentType * * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \ActivitySmith\Generated\Model\LiveActivityStartResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \ActivitySmith\Generated\Model\LiveActivityStartResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\BillingBlockedError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response, HTTP status code, HTTP response headers (array of strings) */ public function startLiveActivityWithHttpInfo($liveActivityStartRequest, string $contentType = self::contentTypes['startLiveActivity'][0]) { @@ -1549,6 +1584,33 @@ public function startLiveActivityWithHttpInfo($liveActivityStartRequest, string $response->getStatusCode(), $response->getHeaders() ]; + case 402: + if ('\ActivitySmith\Generated\Model\BillingBlockedError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\ActivitySmith\Generated\Model\BillingBlockedError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\ActivitySmith\Generated\Model\BillingBlockedError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: if ('\ActivitySmith\Generated\Model\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1576,7 +1638,7 @@ public function startLiveActivityWithHttpInfo($liveActivityStartRequest, string $response->getStatusCode(), $response->getHeaders() ]; - case 404: + case 422: if ('\ActivitySmith\Generated\Model\NoRecipientsError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1678,6 +1740,14 @@ public function startLiveActivityWithHttpInfo($liveActivityStartRequest, string ); $e->setResponseObject($data); break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\ActivitySmith\Generated\Model\BillingBlockedError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1686,7 +1756,7 @@ public function startLiveActivityWithHttpInfo($liveActivityStartRequest, string ); $e->setResponseObject($data); break; - case 404: + case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\ActivitySmith\Generated\Model\NoRecipientsError', diff --git a/generated/Api/PushNotificationsApi.php b/generated/Api/PushNotificationsApi.php index 1857bc0..e8d3ecb 100644 --- a/generated/Api/PushNotificationsApi.php +++ b/generated/Api/PushNotificationsApi.php @@ -132,7 +132,7 @@ public function getConfig() * * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \ActivitySmith\Generated\Model\PushNotificationResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response + * @return \ActivitySmith\Generated\Model\PushNotificationResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\BillingBlockedError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response */ public function sendPushNotification($pushNotificationRequest, string $contentType = self::contentTypes['sendPushNotification'][0]) { @@ -150,7 +150,7 @@ public function sendPushNotification($pushNotificationRequest, string $contentTy * * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \ActivitySmith\Generated\Model\PushNotificationResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \ActivitySmith\Generated\Model\PushNotificationResponse|\ActivitySmith\Generated\Model\BadRequestError|\ActivitySmith\Generated\Model\BillingBlockedError|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\NoRecipientsError|\ActivitySmith\Generated\Model\SendPushNotification429Response, HTTP status code, HTTP response headers (array of strings) */ public function sendPushNotificationWithHttpInfo($pushNotificationRequest, string $contentType = self::contentTypes['sendPushNotification'][0]) { @@ -246,6 +246,33 @@ public function sendPushNotificationWithHttpInfo($pushNotificationRequest, strin $response->getStatusCode(), $response->getHeaders() ]; + case 402: + if ('\ActivitySmith\Generated\Model\BillingBlockedError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\ActivitySmith\Generated\Model\BillingBlockedError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\ActivitySmith\Generated\Model\BillingBlockedError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: if ('\ActivitySmith\Generated\Model\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -273,7 +300,7 @@ public function sendPushNotificationWithHttpInfo($pushNotificationRequest, strin $response->getStatusCode(), $response->getHeaders() ]; - case 404: + case 422: if ('\ActivitySmith\Generated\Model\NoRecipientsError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -375,6 +402,14 @@ public function sendPushNotificationWithHttpInfo($pushNotificationRequest, strin ); $e->setResponseObject($data); break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\ActivitySmith\Generated\Model\BillingBlockedError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -383,7 +418,7 @@ public function sendPushNotificationWithHttpInfo($pushNotificationRequest, strin ); $e->setResponseObject($data); break; - case 404: + case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\ActivitySmith\Generated\Model\NoRecipientsError', diff --git a/generated/Model/BillingBlockedError.php b/generated/Model/BillingBlockedError.php new file mode 100644 index 0000000..d30bcaa --- /dev/null +++ b/generated/Model/BillingBlockedError.php @@ -0,0 +1,556 @@ + + */ +class BillingBlockedError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BillingBlockedError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'error' => 'string', + 'message' => 'string', + 'trialPeriod' => '\ActivitySmith\Generated\Model\BillingBlockedErrorTrialPeriod', + 'upgradeUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'error' => null, + 'message' => null, + 'trialPeriod' => null, + 'upgradeUrl' => 'uri' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'error' => false, + 'message' => false, + 'trialPeriod' => false, + 'upgradeUrl' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error', + 'message' => 'message', + 'trialPeriod' => 'trial_period', + 'upgradeUrl' => 'upgrade_url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError', + 'message' => 'setMessage', + 'trialPeriod' => 'setTrialPeriod', + 'upgradeUrl' => 'setUpgradeUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError', + 'message' => 'getMessage', + 'trialPeriod' => 'getTrialPeriod', + 'upgradeUrl' => 'getUpgradeUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ERROR_TRIAL_EXPIRED = 'trial_expired'; + public const ERROR_TRIAL_EXHAUSTED = 'trial_exhausted'; + public const ERROR_BILLING_OVERAGE_CAP_REACHED = 'billing_overage_cap_reached'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getErrorAllowableValues() + { + return [ + self::ERROR_TRIAL_EXPIRED, + self::ERROR_TRIAL_EXHAUSTED, + self::ERROR_BILLING_OVERAGE_CAP_REACHED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('error', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('trialPeriod', $data ?? [], null); + $this->setIfExists('upgradeUrl', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['error'] === null) { + $invalidProperties[] = "'error' can't be null"; + } + $allowedValues = $this->getErrorAllowableValues(); + if (!is_null($this->container['error']) && !in_array($this->container['error'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'error', must be one of '%s'", + $this->container['error'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + if ($this->container['upgradeUrl'] === null) { + $invalidProperties[] = "'upgradeUrl' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets error + * + * @return string + */ + public function getError() + { + return $this->container['error']; + } + + /** + * Sets error + * + * @param string $error error + * + * @return self + */ + public function setError($error) + { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } + $allowedValues = $this->getErrorAllowableValues(); + if (!in_array($error, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'error', must be one of '%s'", + $error, + implode("', '", $allowedValues) + ) + ); + } + $this->container['error'] = $error; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets trialPeriod + * + * @return \ActivitySmith\Generated\Model\BillingBlockedErrorTrialPeriod|null + */ + public function getTrialPeriod() + { + return $this->container['trialPeriod']; + } + + /** + * Sets trialPeriod + * + * @param \ActivitySmith\Generated\Model\BillingBlockedErrorTrialPeriod|null $trialPeriod trialPeriod + * + * @return self + */ + public function setTrialPeriod($trialPeriod) + { + if (is_null($trialPeriod)) { + throw new \InvalidArgumentException('non-nullable trialPeriod cannot be null'); + } + $this->container['trialPeriod'] = $trialPeriod; + + return $this; + } + + /** + * Gets upgradeUrl + * + * @return string + */ + public function getUpgradeUrl() + { + return $this->container['upgradeUrl']; + } + + /** + * Sets upgradeUrl + * + * @param string $upgradeUrl upgradeUrl + * + * @return self + */ + public function setUpgradeUrl($upgradeUrl) + { + if (is_null($upgradeUrl)) { + throw new \InvalidArgumentException('non-nullable upgradeUrl cannot be null'); + } + $this->container['upgradeUrl'] = $upgradeUrl; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/generated/Model/BillingBlockedErrorTrialPeriod.php b/generated/Model/BillingBlockedErrorTrialPeriod.php new file mode 100644 index 0000000..c42c137 --- /dev/null +++ b/generated/Model/BillingBlockedErrorTrialPeriod.php @@ -0,0 +1,449 @@ + + */ +class BillingBlockedErrorTrialPeriod implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BillingBlockedError_trial_period'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'startedAt' => '\DateTime', + 'endsAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'startedAt' => 'date-time', + 'endsAt' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'startedAt' => false, + 'endsAt' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'startedAt' => 'started_at', + 'endsAt' => 'ends_at' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'startedAt' => 'setStartedAt', + 'endsAt' => 'setEndsAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'startedAt' => 'getStartedAt', + 'endsAt' => 'getEndsAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('startedAt', $data ?? [], null); + $this->setIfExists('endsAt', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['startedAt'] === null) { + $invalidProperties[] = "'startedAt' can't be null"; + } + if ($this->container['endsAt'] === null) { + $invalidProperties[] = "'endsAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets startedAt + * + * @return \DateTime + */ + public function getStartedAt() + { + return $this->container['startedAt']; + } + + /** + * Sets startedAt + * + * @param \DateTime $startedAt startedAt + * + * @return self + */ + public function setStartedAt($startedAt) + { + if (is_null($startedAt)) { + throw new \InvalidArgumentException('non-nullable startedAt cannot be null'); + } + $this->container['startedAt'] = $startedAt; + + return $this; + } + + /** + * Gets endsAt + * + * @return \DateTime + */ + public function getEndsAt() + { + return $this->container['endsAt']; + } + + /** + * Sets endsAt + * + * @param \DateTime $endsAt endsAt + * + * @return self + */ + public function setEndsAt($endsAt) + { + if (is_null($endsAt)) { + throw new \InvalidArgumentException('non-nullable endsAt cannot be null'); + } + $this->container['endsAt'] = $endsAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/generated/Model/PushInterruptionLevel.php b/generated/Model/PushInterruptionLevel.php new file mode 100644 index 0000000..1dbb56e --- /dev/null +++ b/generated/Model/PushInterruptionLevel.php @@ -0,0 +1,66 @@ + 'string', 'message' => 'string', 'subtitle' => 'string', + 'icon' => 'string', + 'interruptionLevel' => '\ActivitySmith\Generated\Model\PushInterruptionLevel', 'media' => 'string', 'redirection' => 'string', 'actions' => '\ActivitySmith\Generated\Model\PushNotificationAction[]', @@ -83,6 +85,8 @@ class PushNotificationRequest implements ModelInterface, ArrayAccess, \JsonSeria 'title' => null, 'message' => null, 'subtitle' => null, + 'icon' => 'uri', + 'interruptionLevel' => null, 'media' => 'uri', 'redirection' => 'uri', 'actions' => null, @@ -103,6 +107,8 @@ class PushNotificationRequest implements ModelInterface, ArrayAccess, \JsonSeria 'title' => false, 'message' => false, 'subtitle' => false, + 'icon' => false, + 'interruptionLevel' => false, 'media' => false, 'redirection' => false, 'actions' => false, @@ -203,6 +209,8 @@ public function isNullableSetToNull(string $property): bool 'title' => 'title', 'message' => 'message', 'subtitle' => 'subtitle', + 'icon' => 'icon', + 'interruptionLevel' => 'interruption_level', 'media' => 'media', 'redirection' => 'redirection', 'actions' => 'actions', @@ -223,6 +231,8 @@ public function isNullableSetToNull(string $property): bool 'title' => 'setTitle', 'message' => 'setMessage', 'subtitle' => 'setSubtitle', + 'icon' => 'setIcon', + 'interruptionLevel' => 'setInterruptionLevel', 'media' => 'setMedia', 'redirection' => 'setRedirection', 'actions' => 'setActions', @@ -243,6 +253,8 @@ public function isNullableSetToNull(string $property): bool 'title' => 'getTitle', 'message' => 'getMessage', 'subtitle' => 'getSubtitle', + 'icon' => 'getIcon', + 'interruptionLevel' => 'getInterruptionLevel', 'media' => 'getMedia', 'redirection' => 'getRedirection', 'actions' => 'getActions', @@ -314,6 +326,8 @@ public function __construct(array $data = null) $this->setIfExists('title', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); $this->setIfExists('subtitle', $data ?? [], null); + $this->setIfExists('icon', $data ?? [], null); + $this->setIfExists('interruptionLevel', $data ?? [], null); $this->setIfExists('media', $data ?? [], null); $this->setIfExists('redirection', $data ?? [], null); $this->setIfExists('actions', $data ?? [], null); @@ -358,6 +372,10 @@ public function listInvalidProperties() if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } + if (!is_null($this->container['icon']) && !preg_match("/^https:\/\//", $this->container['icon'])) { + $invalidProperties[] = "invalid value for 'icon', must be conform to the pattern /^https:\/\//."; + } + if (!is_null($this->container['media']) && !preg_match("/^https:\/\//", $this->container['media'])) { $invalidProperties[] = "invalid value for 'media', must be conform to the pattern /^https:\/\//."; } @@ -501,6 +519,65 @@ public function setSubtitle($subtitle) return $this; } + /** + * Gets icon + * + * @return string|null + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param string|null $icon Optional HTTPS image URL without credentials for a custom notification icon. If the image cannot be loaded, the app icon is used. iOS may omit subtitle when displaying a custom icon. + * + * @return self + */ + public function setIcon($icon) + { + if (is_null($icon)) { + throw new \InvalidArgumentException('non-nullable icon cannot be null'); + } + + if ((!preg_match("/^https:\/\//", ObjectSerializer::toString($icon)))) { + throw new \InvalidArgumentException("invalid value for \$icon when calling PushNotificationRequest., must conform to the pattern /^https:\/\//."); + } + + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets interruptionLevel + * + * @return \ActivitySmith\Generated\Model\PushInterruptionLevel|null + */ + public function getInterruptionLevel() + { + return $this->container['interruptionLevel']; + } + + /** + * Sets interruptionLevel + * + * @param \ActivitySmith\Generated\Model\PushInterruptionLevel|null $interruptionLevel interruptionLevel + * + * @return self + */ + public function setInterruptionLevel($interruptionLevel) + { + if (is_null($interruptionLevel)) { + throw new \InvalidArgumentException('non-nullable interruptionLevel cannot be null'); + } + $this->container['interruptionLevel'] = $interruptionLevel; + + return $this; + } + /** * Gets media * diff --git a/generated/openapi-source.json b/generated/openapi-source.json index aeeecd6..d4adebe 100644 --- a/generated/openapi-source.json +++ b/generated/openapi-source.json @@ -1,6 +1,6 @@ { "repository": "ActivitySmithHQ/activitysmith-backend", - "commit": "6832df646de7de8a6aaf0110960c37074b513c48", + "commit": "ee13bdfa1572f59f7e8d3372eedd29ce3f901617", "path": "openapi.json", - "sha256": "9ae85ad6127cfa2d50c33261459f5f9e85e011939d01ac4a9d507fa6ed11aa61" + "sha256": "50d494a997b266684d1ff61f8c10cb007abfd02c1b950af52620c0533da7b7e0" }