Skip to content

Commit b1c5348

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

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

lib/line/bot/v2/messaging_api/model/limit.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,23 @@ class Limit
2020
# @!attribute [rw] up_to_remaining_quota
2121
# @return [Boolean,nil] If true, the message will be sent within the maximum number of deliverable messages. The default value is `false`. Targets will be selected at random.
2222
attr_accessor :up_to_remaining_quota
23+
# @!attribute [rw] forbid_partial_delivery
24+
# @return [Boolean,nil] 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.
25+
attr_accessor :forbid_partial_delivery
2326

2427
# @param max [Integer,nil] The maximum number of narrowcast messages to send. Use this parameter to limit the number of narrowcast messages sent. The recipients will be chosen at random.
2528
# @param up_to_remaining_quota [Boolean,nil] If true, the message will be sent within the maximum number of deliverable messages. The default value is `false`. Targets will be selected at random.
29+
# @param forbid_partial_delivery [Boolean,nil] 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.
2630
def initialize(
2731
max: nil,
2832
up_to_remaining_quota: false,
33+
forbid_partial_delivery: false,
2934
**dynamic_attributes
3035
)
3136

3237
@max = max
3338
@up_to_remaining_quota = up_to_remaining_quota
39+
@forbid_partial_delivery = forbid_partial_delivery
3440

3541
dynamic_attributes.each do |key, value|
3642
self.class.attr_accessor key

lib/line/bot/v2/messaging_api/model/narrowcast_progress_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class NarrowcastProgressResponse
2929
# @return [String,nil] The reason the message failed to be sent. This is only included with a `phase` property value of `failed`.
3030
attr_accessor :failed_description
3131
# @!attribute [rw] error_code
32-
# @return [Integer,nil] 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.
32+
# @return [Integer,nil] 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.
3333
attr_accessor :error_code
3434
# @!attribute [rw] accepted_time
3535
# @return [String] Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC
@@ -43,7 +43,7 @@ class NarrowcastProgressResponse
4343
# @param failure_count [Integer,nil] The number of users who failed to send the message.
4444
# @param target_count [Integer,nil] The number of intended recipients of the message.
4545
# @param failed_description [String,nil] The reason the message failed to be sent. This is only included with a `phase` property value of `failed`.
46-
# @param error_code [Integer,nil] 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.
46+
# @param error_code [Integer,nil] 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.
4747
# @param accepted_time [String] Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC
4848
# @param completed_time [String,nil] Processing of narrowcast message request completion time in milliseconds. Returned when the phase property is succeeded or failed. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC
4949
def initialize(

line-openapi

sig/line/bot/v2/messaging_api/model/limit.rbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ module Line
1616
class Limit
1717
attr_accessor max: Integer?
1818
attr_accessor up_to_remaining_quota: bool?
19+
attr_accessor forbid_partial_delivery: bool?
1920

2021

2122
# @param max [Integer,nil] The maximum number of narrowcast messages to send. Use this parameter to limit the number of narrowcast messages sent. The recipients will be chosen at random.
2223
# @param up_to_remaining_quota [bool,nil] If true, the message will be sent within the maximum number of deliverable messages. The default value is `false`. Targets will be selected at random.
24+
# @param forbid_partial_delivery [bool,nil] 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.
2325
def initialize: (
2426
?max: Integer?,
2527
?up_to_remaining_quota: bool?,
28+
?forbid_partial_delivery: bool?,
2629
**untyped dynamic_attributes
2730
) -> void
2831

sig/line/bot/v2/messaging_api/model/narrowcast_progress_response.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module Line
2828
# @param failure_count [Integer,nil] The number of users who failed to send the message.
2929
# @param target_count [Integer,nil] The number of intended recipients of the message.
3030
# @param failed_description [String,nil] The reason the message failed to be sent. This is only included with a `phase` property value of `failed`.
31-
# @param error_code [Integer,nil] 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.
31+
# @param error_code [Integer,nil] 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.
3232
# @param accepted_time [String] Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC
3333
# @param completed_time [String,nil] Processing of narrowcast message request completion time in milliseconds. Returned when the phase property is succeeded or failed. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC
3434
def initialize: (

0 commit comments

Comments
 (0)