Skip to content

Commit b8af941

Browse files
github-actions[bot]github-actions
andauthored
Add forbidPartialDelivery option to the Narrowcast Limit Object (#1753)
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 ceb703a commit b8af941

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/Limit.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,19 @@ public record Limit(
4444
* If true, the message will be sent within the maximum number of deliverable messages. The
4545
* default value is &#x60;false&#x60;. Targets will be selected at random.
4646
*/
47-
@JsonProperty("upToRemainingQuota") Boolean upToRemainingQuota) {
47+
@JsonProperty("upToRemainingQuota") Boolean upToRemainingQuota,
48+
/**
49+
* This option prevents messages from being delivered to only a subset of the target audience.
50+
* If true, the narrowcast request success but fails asynchronously. You can check whether
51+
* message delivery was canceled by retrieving the narrowcast message progress. This property
52+
* can be set to true only if upToRemainingQuota is set to true.
53+
*/
54+
@JsonProperty("forbidPartialDelivery") Boolean forbidPartialDelivery) {
4855

4956
public static class Builder {
5057
private Integer max;
5158
private Boolean upToRemainingQuota;
59+
private Boolean forbidPartialDelivery;
5260

5361
public Builder() {}
5462

@@ -62,8 +70,13 @@ public Builder upToRemainingQuota(Boolean upToRemainingQuota) {
6270
return this;
6371
}
6472

73+
public Builder forbidPartialDelivery(Boolean forbidPartialDelivery) {
74+
this.forbidPartialDelivery = forbidPartialDelivery;
75+
return this;
76+
}
77+
6578
public Limit build() {
66-
return new Limit(max, upToRemainingQuota);
79+
return new Limit(max, upToRemainingQuota, forbidPartialDelivery);
6780
}
6881
}
6982
}

clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/NarrowcastProgressResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ public record NarrowcastProgressResponse(
6262
* &#x60;1&#x60;: An internal error occurred. &#x60;2&#x60;: An error occurred because there
6363
* weren&#39;t enough recipients. &#x60;3&#x60;: A conflict error of requests occurs because a
6464
* request that has already been accepted is retried. &#x60;4&#x60;: An audience of less than 50
65-
* recipients is included as a condition of sending.
65+
* recipients is included as a condition of sending. &#x60;5&#x60;: Message delivery has been
66+
* canceled to prevent messages from being delivered only to a subset of the target audience.
6667
*/
6768
@JsonProperty("errorCode") Long errorCode,
6869
/**

line-openapi

0 commit comments

Comments
 (0)