class Line::Bot::V2::ManageAudience::GetSharedAudienceGroupsResponse
Gets data for more than one audience. @see developers.line.biz/en/reference/messaging-api/#get-audience-groups
Attributes
@!attribute [rw] audience_groups
@return [Array[AudienceGroup],nil] An array of audience data. If there are no audiences that match the specified filter, an empty array will be returned.
@!attribute [rw] has_next_page
@return [Boolean,nil] true when this is not the last page.
@!attribute [rw] page
@return [Integer,nil] The current page number.
@!attribute [rw] read_write_audience_group_total_count
@return [Integer,nil] Of the audiences you can get with the specified filter, the number of audiences with the update permission set to READ_WRITE.
@!attribute [rw] size
@return [Integer,nil] The maximum number of audiences on the current page.
@!attribute [rw] total_count
@return [Integer,nil] The total number of audiences that can be returned with the specified filter.
Public Class Methods
Source
# File lib/line/bot/v2/manage_audience/model/get_shared_audience_groups_response.rb, line 81 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::GetSharedAudienceGroupsResponse] Instance of the class
Source
# File lib/line/bot/v2/manage_audience/model/get_shared_audience_groups_response.rb, line 42 def initialize( audience_groups: nil, has_next_page: nil, total_count: nil, read_write_audience_group_total_count: nil, page: nil, size: nil, **dynamic_attributes ) @audience_groups = audience_groups&.map do |item| if item.is_a?(Hash) Line::Bot::V2::ManageAudience::AudienceGroup.create(**item) # steep:ignore InsufficientKeywordArguments else item end end @has_next_page = has_next_page @total_count = total_count @read_write_audience_group_total_count = read_write_audience_group_total_count @page = page @size = size 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_groups
[Array[AudienceGroup, Hash[Symbol, untyped]],nil] An array of audience data. If there are no audiences that match the specified filter, an empty array will be returned. @param has_next_page
[Boolean,nil] true when this is not the last page. @param total_count
[Integer,nil] The total number of audiences that can be returned with the specified filter. @param read_write_audience_group_total_count
[Integer,nil] Of the audiences you can get with the specified filter, the number of audiences with the update permission set to READ_WRITE. @param page [Integer,nil] The current page number. @param size [Integer,nil] The maximum number of audiences on the current page.
Public Instance Methods
Source
# File lib/line/bot/v2/manage_audience/model/get_shared_audience_groups_response.rb, line 88 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/get_shared_audience_groups_response.rb, line 97 def hash [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash end
@return [Integer] Hash code of the object