Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion line-openapi
Submodule line-openapi updated 1 files
+10 −0 messaging-api.yml
6 changes: 4 additions & 2 deletions linebot/v3/messaging/models/limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ class Limit(BaseModel):
"""
max: Optional[conint(strict=True, ge=1)] = Field(None, description="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. ")
up_to_remaining_quota: Optional[StrictBool] = Field(False, alias="upToRemainingQuota", description="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. ")
forbid_partial_delivery: Optional[StrictBool] = Field(False, alias="forbidPartialDelivery", description="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. ")

__properties = ["max", "upToRemainingQuota"]
__properties = ["max", "upToRemainingQuota", "forbidPartialDelivery"]

class Config:
"""Pydantic configuration"""
Expand Down Expand Up @@ -68,7 +69,8 @@ def from_dict(cls, obj: dict) -> Limit:

_obj = Limit.parse_obj({
"max": obj.get("max"),
"up_to_remaining_quota": obj.get("upToRemainingQuota") if obj.get("upToRemainingQuota") is not None else False
"up_to_remaining_quota": obj.get("upToRemainingQuota") if obj.get("upToRemainingQuota") is not None else False,
"forbid_partial_delivery": obj.get("forbidPartialDelivery") if obj.get("forbidPartialDelivery") is not None else False
})
return _obj

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class NarrowcastProgressResponse(BaseModel):
failure_count: Optional[StrictInt] = Field(None, alias="failureCount", description="The number of users who failed to send the message.")
target_count: Optional[StrictInt] = Field(None, alias="targetCount", description="The number of intended recipients of the message.")
failed_description: Optional[StrictStr] = Field(None, alias="failedDescription", description="The reason the message failed to be sent. This is only included with a `phase` property value of `failed`.")
error_code: Optional[StrictInt] = Field(None, alias="errorCode", description="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. ")
error_code: Optional[StrictInt] = Field(None, alias="errorCode", description="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. ")
accepted_time: datetime = Field(..., alias="acceptedTime", description="Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC ")
completed_time: Optional[datetime] = Field(None, alias="completedTime", description="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 ")

Expand Down