diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7f3f5c84..d2d60a3d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.23.0" + ".": "0.24.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 7340c7e7..1609d193 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 40 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent/sent-dm-e0a4f9a3faa85838c6d8a83dc1676c1fefa359c2eaf09ca5cfc05942549ca596.yml -openapi_spec_hash: 74ba6ccdd1a0bb875402884dc1d10a59 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent/sent-dm-aaa1e926cc5197acf2f9ea1d957bf3d3eae95dbeffda2968d9bcb55a56b65332.yml +openapi_spec_hash: 950356265774a5813826bd518d469da3 config_hash: 32929c7d4b1344f5bbf67df044a518af diff --git a/CHANGELOG.md b/CHANGELOG.md index 85905fd2..a4ae8bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.24.0 (2026-06-30) + +Full Changelog: [v0.23.0...v0.24.0](https://github.com/sentdm/sent-dm-php/compare/v0.23.0...v0.24.0) + +### Features + +* **api:** api update ([9b90725](https://github.com/sentdm/sent-dm-php/commit/9b907251a0683a94bb9d48a8c4e53dcb57e79399)) +* **api:** api update ([b343626](https://github.com/sentdm/sent-dm-php/commit/b3436260c321335f3902a93ed9f8278e9a354423)) + ## 0.23.0 (2026-05-21) Full Changelog: [v0.22.0...v0.23.0](https://github.com/sentdm/sent-dm-php/compare/v0.22.0...v0.23.0) diff --git a/README.md b/README.md index 1e607047..562ecbb4 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The REST API documentation can be found on [docs.sent.dm](https://docs.sent.dm). ``` -composer require "sentdm/sent-dm-php 0.23.0" +composer require "sentdm/sent-dm-php 0.24.0" ``` diff --git a/src/Messages/MessageSendParams.php b/src/Messages/MessageSendParams.php index 66ab6419..644a8bac 100644 --- a/src/Messages/MessageSendParams.php +++ b/src/Messages/MessageSendParams.php @@ -21,6 +21,7 @@ * channel?: list|null, * sandbox?: bool|null, * template?: null|Template|TemplateShape, + * text?: string|null, * to?: list|null, * idempotencyKey?: string|null, * xProfileID?: string|null, @@ -53,9 +54,15 @@ final class MessageSendParams implements BaseModel /** * SDK-style template reference: resolve by ID or by name, with optional parameters. */ - #[Optional] + #[Optional(nullable: true)] public ?Template $template; + /** + * Plain-text (free-form) message body. Provide either Template or this. + */ + #[Optional(nullable: true)] + public ?string $text; + /** * List of recipient phone numbers in E.164 format (multi-recipient fan-out). * @@ -88,6 +95,7 @@ public static function with( ?array $channel = null, ?bool $sandbox = null, Template|array|null $template = null, + ?string $text = null, ?array $to = null, ?string $idempotencyKey = null, ?string $xProfileID = null, @@ -97,6 +105,7 @@ public static function with( null !== $channel && $self['channel'] = $channel; null !== $sandbox && $self['sandbox'] = $sandbox; null !== $template && $self['template'] = $template; + null !== $text && $self['text'] = $text; null !== $to && $self['to'] = $to; null !== $idempotencyKey && $self['idempotencyKey'] = $idempotencyKey; null !== $xProfileID && $self['xProfileID'] = $xProfileID; @@ -135,9 +144,9 @@ public function withSandbox(bool $sandbox): self /** * SDK-style template reference: resolve by ID or by name, with optional parameters. * - * @param Template|TemplateShape $template + * @param Template|TemplateShape|null $template */ - public function withTemplate(Template|array $template): self + public function withTemplate(Template|array|null $template): self { $self = clone $this; $self['template'] = $template; @@ -145,6 +154,17 @@ public function withTemplate(Template|array $template): self return $self; } + /** + * Plain-text (free-form) message body. Provide either Template or this. + */ + public function withText(?string $text): self + { + $self = clone $this; + $self['text'] = $text; + + return $self; + } + /** * List of recipient phone numbers in E.164 format (multi-recipient fan-out). * diff --git a/src/Profiles/Campaigns/TcrCampaignWithUseCases.php b/src/Profiles/Campaigns/TcrCampaignWithUseCases.php index 02c83bc0..f26e0c93 100644 --- a/src/Profiles/Campaigns/TcrCampaignWithUseCases.php +++ b/src/Profiles/Campaigns/TcrCampaignWithUseCases.php @@ -26,6 +26,7 @@ * dcaElectionsComplete?: bool|null, * dcaElectionsCompletedAt?: \DateTimeInterface|null, * description?: string|null, + * hasSubmissionTransaction?: bool|null, * helpKeywords?: string|null, * helpMessage?: string|null, * kycSubmissionFormID?: string|null, @@ -91,6 +92,14 @@ final class TcrCampaignWithUseCases implements BaseModel #[Optional] public ?string $description; + /** + * True when this campaign already has a billing transaction of reference type + * TCR_CAMPAIGN_SUBMISSION (the one-time submission fee was charged). Populated only by the + * campaigns-list path; defaults false on other responses. + */ + #[Optional] + public ?bool $hasSubmissionTransaction; + #[Optional(nullable: true)] public ?string $helpKeywords; @@ -186,6 +195,7 @@ public static function with( ?bool $dcaElectionsComplete = null, ?\DateTimeInterface $dcaElectionsCompletedAt = null, ?string $description = null, + ?bool $hasSubmissionTransaction = null, ?string $helpKeywords = null, ?string $helpMessage = null, ?string $kycSubmissionFormID = null, @@ -222,6 +232,7 @@ public static function with( null !== $dcaElectionsComplete && $self['dcaElectionsComplete'] = $dcaElectionsComplete; null !== $dcaElectionsCompletedAt && $self['dcaElectionsCompletedAt'] = $dcaElectionsCompletedAt; null !== $description && $self['description'] = $description; + null !== $hasSubmissionTransaction && $self['hasSubmissionTransaction'] = $hasSubmissionTransaction; null !== $helpKeywords && $self['helpKeywords'] = $helpKeywords; null !== $helpMessage && $self['helpMessage'] = $helpMessage; null !== $kycSubmissionFormID && $self['kycSubmissionFormID'] = $kycSubmissionFormID; @@ -340,6 +351,20 @@ public function withDescription(string $description): self return $self; } + /** + * True when this campaign already has a billing transaction of reference type + * TCR_CAMPAIGN_SUBMISSION (the one-time submission fee was charged). Populated only by the + * campaigns-list path; defaults false on other responses. + */ + public function withHasSubmissionTransaction( + bool $hasSubmissionTransaction + ): self { + $self = clone $this; + $self['hasSubmissionTransaction'] = $hasSubmissionTransaction; + + return $self; + } + public function withHelpKeywords(?string $helpKeywords): self { $self = clone $this; diff --git a/src/ServiceContracts/MessagesContract.php b/src/ServiceContracts/MessagesContract.php index 2bc51deb..6ab0997c 100644 --- a/src/ServiceContracts/MessagesContract.php +++ b/src/ServiceContracts/MessagesContract.php @@ -56,7 +56,8 @@ public function retrieveStatus( * Defaults to ["sent"] (auto-detect) if omitted. * @param bool $sandbox Body param: Sandbox flag - when true, the operation is simulated without side effects * Useful for testing integrations without actual execution - * @param Template|TemplateShape $template body param: SDK-style template reference: resolve by ID or by name, with optional parameters + * @param Template|TemplateShape|null $template body param: SDK-style template reference: resolve by ID or by name, with optional parameters + * @param string|null $text Body param: Plain-text (free-form) message body. Provide either Template or this. * @param list $to Body param: List of recipient phone numbers in E.164 format (multi-recipient fan-out) * @param string $idempotencyKey Header param: Unique key to ensure idempotent request processing. Must be 1-255 alphanumeric characters, hyphens, or underscores. Responses are cached for 24 hours per key per customer. * @param string $xProfileID Header param: Profile UUID to scope the request to a child profile. Only organization API keys can use this header. The profile must belong to the calling organization. @@ -68,6 +69,7 @@ public function send( ?array $channel = null, ?bool $sandbox = null, Template|array|null $template = null, + ?string $text = null, ?array $to = null, ?string $idempotencyKey = null, ?string $xProfileID = null, diff --git a/src/Services/MessagesRawService.php b/src/Services/MessagesRawService.php index 4f67cbe0..a934beec 100644 --- a/src/Services/MessagesRawService.php +++ b/src/Services/MessagesRawService.php @@ -112,7 +112,8 @@ public function retrieveStatus( * @param array{ * channel?: list|null, * sandbox?: bool, - * template?: Template|TemplateShape, + * template?: Template|TemplateShape|null, + * text?: string|null, * to?: list, * idempotencyKey?: string, * xProfileID?: string, diff --git a/src/Services/MessagesService.php b/src/Services/MessagesService.php index c4ec2359..bcdffd98 100644 --- a/src/Services/MessagesService.php +++ b/src/Services/MessagesService.php @@ -94,7 +94,8 @@ public function retrieveStatus( * Defaults to ["sent"] (auto-detect) if omitted. * @param bool $sandbox Body param: Sandbox flag - when true, the operation is simulated without side effects * Useful for testing integrations without actual execution - * @param Template|TemplateShape $template body param: SDK-style template reference: resolve by ID or by name, with optional parameters + * @param Template|TemplateShape|null $template body param: SDK-style template reference: resolve by ID or by name, with optional parameters + * @param string|null $text Body param: Plain-text (free-form) message body. Provide either Template or this. * @param list $to Body param: List of recipient phone numbers in E.164 format (multi-recipient fan-out) * @param string $idempotencyKey Header param: Unique key to ensure idempotent request processing. Must be 1-255 alphanumeric characters, hyphens, or underscores. Responses are cached for 24 hours per key per customer. * @param string $xProfileID Header param: Profile UUID to scope the request to a child profile. Only organization API keys can use this header. The profile must belong to the calling organization. @@ -106,6 +107,7 @@ public function send( ?array $channel = null, ?bool $sandbox = null, Template|array|null $template = null, + ?string $text = null, ?array $to = null, ?string $idempotencyKey = null, ?string $xProfileID = null, @@ -116,6 +118,7 @@ public function send( 'channel' => $channel, 'sandbox' => $sandbox, 'template' => $template, + 'text' => $text, 'to' => $to, 'idempotencyKey' => $idempotencyKey, 'xProfileID' => $xProfileID, diff --git a/src/Version.php b/src/Version.php index 439af12a..a34336d4 100644 --- a/src/Version.php +++ b/src/Version.php @@ -5,5 +5,5 @@ namespace SentDm; // x-release-please-start-version -const VERSION = '0.23.0'; +const VERSION = '0.24.0'; // x-release-please-end