class Line::Bot::V2::MessagingApi::NarrowcastProgressResponse
@see developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status
Attributes
@!attribute [rw] accepted_time
@return [String] Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC
@!attribute [rw] completed_time
@return [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
@!attribute [rw] error_code
@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.
@!attribute [rw] failed_description
@return [String,nil] The reason the message failed to be sent. This is only included with a `phase` property value of `failed`.
@!attribute [rw] failure_count
@return [Integer,nil] The number of users who failed to send the message.
@!attribute [rw] phase
@return [String] ('waiting'|'sending'|'succeeded'|'failed') The current status. One of: `waiting`: Messages are not yet ready to be sent. They are currently being filtered or processed in some way. `sending`: Messages are currently being sent. `succeeded`: Messages were sent successfully. This may not mean the messages were successfully received. `failed`: Messages failed to be sent. Use the failedDescription property to find the cause of the failure.
@!attribute [rw] success_count
@return [Integer,nil] The number of users who successfully received the message.
@!attribute [rw] target_count
@return [Integer,nil] The number of intended recipients of the message.
Public Class Methods
Source
# File lib/line/bot/v2/messaging_api/model/narrowcast_progress_response.rb, line 86 def self.create(args) # steep:ignore symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) return new(**symbolized_args) # steep:ignore end
Create an instance of the class from a hash @param args [Hash] Hash containing all the required attributes @return [Line::Bot::V2::MessagingApi::NarrowcastProgressResponse] Instance of the class
Source
# File lib/line/bot/v2/messaging_api/model/narrowcast_progress_response.rb, line 49 def initialize( phase:, success_count: nil, failure_count: nil, target_count: nil, failed_description: nil, error_code: nil, accepted_time:, completed_time: nil, **dynamic_attributes ) @phase = phase @success_count = success_count @failure_count = failure_count @target_count = target_count @failed_description = failed_description @error_code = error_code @accepted_time = accepted_time @completed_time = completed_time dynamic_attributes.each do |key, value| self.class.attr_accessor key if value.is_a?(Hash) struct_klass = Struct.new(*value.keys.map(&:to_sym)) struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } instance_variable_set("@#{key}", struct_klass.new(*struct_values)) else instance_variable_set("@#{key}", value) end end end
@param phase [String] (‘waiting’|‘sending’|‘succeeded’|‘failed’) The current status. One of: ‘waiting`: Messages are not yet ready to be sent. They are currently being filtered or processed in some way. `sending`: Messages are currently being sent. `succeeded`: Messages were sent successfully. This may not mean the messages were successfully received. `failed`: Messages failed to be sent. Use the failedDescription property to find the cause of the failure. @param success_count
[Integer,nil] The number of users who successfully received the message. @param failure_count
[Integer,nil] The number of users who failed to send the message. @param target_count
[Integer,nil] The number of intended recipients of the message. @param failed_description
[String,nil] The reason the message failed to be sent. This is only included with a `phase` property value of `failed`. @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. @param accepted_time
[String] Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC @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
Public Instance Methods
Source
# File lib/line/bot/v2/messaging_api/model/narrowcast_progress_response.rb, line 93 def ==(other) return false unless self.class == other.class instance_variables.all? do |var| instance_variable_get(var) == other.instance_variable_get(var) end end
@param other [Object] Object to compare @return [Boolean] true if the objects are equal, false otherwise
Source
# File lib/line/bot/v2/messaging_api/model/narrowcast_progress_response.rb, line 102 def hash [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash end
@return [Integer] Hash code of the object