Skip to content

Commit 7f7122f

Browse files
github-actions[bot]github-actions
andauthored
Add forbidPartialDelivery option to the Narrowcast Limit Object (#750)
line/line-openapi#114 ## Add forbidPartialDelivery option to the Narrowcast Limit Object We add a new `forbidPartialDelivery` option to the Narrowcast Limit Object. When set to true, this option prevents messages from being delivered to only a subset of the target audience. If partial delivery occurs, the narrowcast request will succeed but fail asynchronously. You can verify whether the message delivery was canceled by checking the narrowcast message progress. This property can only be set to true when upToRemainingQuota is also true. For more details, see the https://developers.line.biz/en/news/2025/10/21/narrowcast-message-update/. ### Example: ```json { "max": 100, "upToRemainingQuota": true, "forbidPartialDelivery": true } ``` --------- Co-authored-by: github-actions <[email protected]>
1 parent b4b857c commit 7f7122f

File tree

6 files changed

+201
-48
lines changed

6 files changed

+201
-48
lines changed

docs/classes/LINE-Clients-MessagingApi-Model-Limit.html

Lines changed: 145 additions & 39 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-NarrowcastProgressResponse.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,7 @@ <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
23822382
: <span class="phpdocumentor-signature__argument__return-type">int|null</span>
23832383
</dt>
23842384
<dd class="phpdocumentor-argument-list__definition">
2385-
<section class="phpdocumentor-description"><p>Error summary. This is only included with a phase property value of failed. One of: <code class="prettyprint">1</code>: An internal error occurred. <code class="prettyprint">2</code>: An error occurred because there weren't enough recipients. <code class="prettyprint">3</code>: A conflict error of requests occurs because a request that has already been accepted is retried. <code class="prettyprint">4</code>: An audience of less than 50 recipients is included as a condition of sending.</p>
2385+
<section class="phpdocumentor-description"><p>Error summary. This is only included with a phase property value of failed. One of: <code class="prettyprint">1</code>: An internal error occurred. <code class="prettyprint">2</code>: An error occurred because there weren't enough recipients. <code class="prettyprint">3</code>: A conflict error of requests occurs because a request that has already been accepted is retried. <code class="prettyprint">4</code>: An audience of less than 50 recipients is included as a condition of sending. <code class="prettyprint">5</code>: Message delivery has been canceled to prevent messages from being delivered only to a subset of the target audience.</p>
23862386
</section>
23872387

23882388
</dd>

docs/js/searchIndex.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32990,6 +32990,16 @@ Search.appendIndex(
3299032990
"name": "setUpToRemainingQuota",
3299132991
"summary": "Sets\u0020upToRemainingQuota",
3299232992
"url": "classes/LINE-Clients-MessagingApi-Model-Limit.html#method_setUpToRemainingQuota"
32993+
}, {
32994+
"fqsen": "\\LINE\\Clients\\MessagingApi\\Model\\Limit\u003A\u003AgetForbidPartialDelivery\u0028\u0029",
32995+
"name": "getForbidPartialDelivery",
32996+
"summary": "Gets\u0020forbidPartialDelivery",
32997+
"url": "classes/LINE-Clients-MessagingApi-Model-Limit.html#method_getForbidPartialDelivery"
32998+
}, {
32999+
"fqsen": "\\LINE\\Clients\\MessagingApi\\Model\\Limit\u003A\u003AsetForbidPartialDelivery\u0028\u0029",
33000+
"name": "setForbidPartialDelivery",
33001+
"summary": "Sets\u0020forbidPartialDelivery",
33002+
"url": "classes/LINE-Clients-MessagingApi-Model-Limit.html#method_setForbidPartialDelivery"
3299333003
}, {
3299433004
"fqsen": "\\LINE\\Clients\\MessagingApi\\Model\\Limit\u003A\u003AoffsetExists\u0028\u0029",
3299533005
"name": "offsetExists",

line-openapi

src/clients/messaging-api/lib/Model/Limit.php

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class Limit implements ModelInterface, ArrayAccess, \JsonSerializable
7474
*/
7575
protected static $openAPITypes = [
7676
'max' => 'int',
77-
'upToRemainingQuota' => 'bool'
77+
'upToRemainingQuota' => 'bool',
78+
'forbidPartialDelivery' => 'bool'
7879
];
7980

8081
/**
@@ -86,7 +87,8 @@ class Limit implements ModelInterface, ArrayAccess, \JsonSerializable
8687
*/
8788
protected static $openAPIFormats = [
8889
'max' => 'int32',
89-
'upToRemainingQuota' => null
90+
'upToRemainingQuota' => null,
91+
'forbidPartialDelivery' => null
9092
];
9193

9294
/**
@@ -96,7 +98,8 @@ class Limit implements ModelInterface, ArrayAccess, \JsonSerializable
9698
*/
9799
protected static array $openAPINullables = [
98100
'max' => false,
99-
'upToRemainingQuota' => false
101+
'upToRemainingQuota' => false,
102+
'forbidPartialDelivery' => false
100103
];
101104

102105
/**
@@ -186,7 +189,8 @@ public function isNullableSetToNull(string $property): bool
186189
*/
187190
protected static $attributeMap = [
188191
'max' => 'max',
189-
'upToRemainingQuota' => 'upToRemainingQuota'
192+
'upToRemainingQuota' => 'upToRemainingQuota',
193+
'forbidPartialDelivery' => 'forbidPartialDelivery'
190194
];
191195

192196
/**
@@ -196,7 +200,8 @@ public function isNullableSetToNull(string $property): bool
196200
*/
197201
protected static $setters = [
198202
'max' => 'setMax',
199-
'upToRemainingQuota' => 'setUpToRemainingQuota'
203+
'upToRemainingQuota' => 'setUpToRemainingQuota',
204+
'forbidPartialDelivery' => 'setForbidPartialDelivery'
200205
];
201206

202207
/**
@@ -206,7 +211,8 @@ public function isNullableSetToNull(string $property): bool
206211
*/
207212
protected static $getters = [
208213
'max' => 'getMax',
209-
'upToRemainingQuota' => 'getUpToRemainingQuota'
214+
'upToRemainingQuota' => 'getUpToRemainingQuota',
215+
'forbidPartialDelivery' => 'getForbidPartialDelivery'
210216
];
211217

212218
/**
@@ -268,6 +274,7 @@ public function __construct(?array $data = null)
268274
{
269275
$this->setIfExists('max', $data ?? [], null);
270276
$this->setIfExists('upToRemainingQuota', $data ?? [], false);
277+
$this->setIfExists('forbidPartialDelivery', $data ?? [], false);
271278
}
272279

273280
/**
@@ -374,6 +381,33 @@ public function setUpToRemainingQuota($upToRemainingQuota)
374381

375382
return $this;
376383
}
384+
385+
/**
386+
* Gets forbidPartialDelivery
387+
*
388+
* @return bool|null
389+
*/
390+
public function getForbidPartialDelivery()
391+
{
392+
return $this->container['forbidPartialDelivery'];
393+
}
394+
395+
/**
396+
* Sets forbidPartialDelivery
397+
*
398+
* @param bool|null $forbidPartialDelivery This option prevents messages from being delivered to only a subset of the target audience. If true, the narrowcast request success but fails asynchronously. You can check whether message delivery was canceled by retrieving the narrowcast message progress. This property can be set to true only if upToRemainingQuota is set to true.
399+
*
400+
* @return self
401+
*/
402+
public function setForbidPartialDelivery($forbidPartialDelivery)
403+
{
404+
if (is_null($forbidPartialDelivery)) {
405+
throw new \InvalidArgumentException('non-nullable forbidPartialDelivery cannot be null');
406+
}
407+
$this->container['forbidPartialDelivery'] = $forbidPartialDelivery;
408+
409+
return $this;
410+
}
377411
/**
378412
* Returns true if offset exists. False otherwise.
379413
*
@@ -486,6 +520,9 @@ public static function fromAssocArray(?array $data): self
486520
if (isset($data['upToRemainingQuota'])) {
487521
$instance->setupToRemainingQuota($data['upToRemainingQuota']);
488522
}
523+
if (isset($data['forbidPartialDelivery'])) {
524+
$instance->setforbidPartialDelivery($data['forbidPartialDelivery']);
525+
}
489526

490527
return $instance;
491528
}

src/clients/messaging-api/lib/Model/NarrowcastProgressResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public function getErrorCode()
545545
/**
546546
* Sets errorCode
547547
*
548-
* @param int|null $errorCode Error summary. This is only included with a phase property value of failed. One of: `1`: An internal error occurred. `2`: An error occurred because there weren't enough recipients. `3`: A conflict error of requests occurs because a request that has already been accepted is retried. `4`: An audience of less than 50 recipients is included as a condition of sending.
548+
* @param int|null $errorCode Error summary. This is only included with a phase property value of failed. One of: `1`: An internal error occurred. `2`: An error occurred because there weren't enough recipients. `3`: A conflict error of requests occurs because a request that has already been accepted is retried. `4`: An audience of less than 50 recipients is included as a condition of sending. `5`: Message delivery has been canceled to prevent messages from being delivered only to a subset of the target audience.
549549
*
550550
* @return self
551551
*/

0 commit comments

Comments
 (0)