class Line::Bot::V2::ManageAudience::AudienceGroupJob
Audience
group job @see developers.line.biz/en/reference/messaging-api/#get-audience-group
Attributes
@!attribute [rw] audience_count
@return [Integer,nil] The number of accounts (recipients) that were added or removed.
@!attribute [rw] audience_group_id
@return [Integer,nil] An audience ID.
@!attribute [rw] audience_group_job_id
@return [Integer,nil] A job ID.
@!attribute [rw] created
@return [Integer,nil] When the job was created (in UNIX time).
@!attribute [rw] description
@return [String,nil] The job's description.
@!attribute [rw] failed_type
@return [String,nil] ('INTERNAL_ERROR'|'AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT')
@!attribute [rw] job_status
@return [String,nil] ('QUEUED'|'WORKING'|'FINISHED'|'FAILED')
@!attribute [rw] type
@return [String,nil] ('DIFF_ADD')
Public Class Methods
Source
# File lib/line/bot/v2/manage_audience/model/audience_group_job.rb, line 87 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::ManageAudience::AudienceGroupJob] Instance of the class
Source
# File lib/line/bot/v2/manage_audience/model/audience_group_job.rb, line 50 def initialize( audience_group_job_id: nil, audience_group_id: nil, description: nil, type: nil, job_status: nil, failed_type: nil, audience_count: nil, created: nil, **dynamic_attributes ) @audience_group_job_id = audience_group_job_id @audience_group_id = audience_group_id @description = description @type = type @job_status = job_status @failed_type = failed_type @audience_count = audience_count @created = created 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 audience_group_job_id
[Integer,nil] A job ID. @param audience_group_id
[Integer,nil] An audience ID. @param description [String,nil] The job’s description. @param type [String,nil] (‘DIFF_ADD’) @param job_status
[String,nil] (‘QUEUED’|‘WORKING’|‘FINISHED’|‘FAILED’) @param failed_type
[String,nil] (‘INTERNAL_ERROR’|‘AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT’) @param audience_count
[Integer,nil] The number of accounts (recipients) that were added or removed. @param created [Integer,nil] When the job was created (in UNIX time).
Public Instance Methods
Source
# File lib/line/bot/v2/manage_audience/model/audience_group_job.rb, line 94 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/manage_audience/model/audience_group_job.rb, line 103 def hash [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash end
@return [Integer] Hash code of the object