Class: Line::Bot::V2::Insight::GetStatisticsPerUnitResponseMessage
- Inherits:
-
Object
- Object
- Line::Bot::V2::Insight::GetStatisticsPerUnitResponseMessage
- Defined in:
- lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb
Overview
Instance Attribute Summary collapse
-
#impression ⇒ Integer?
Number of times the bubble was displayed.
-
#media_played ⇒ Integer?
Number of times audio or video in the bubble started playing.
-
#media_played100_percent ⇒ Integer?
Number of times audio or video in the bubble started playing and was played 100% of the total time.
-
#media_played25_percent ⇒ Integer?
Number of times audio or video in the bubble started playing and was played 25% of the total time.
-
#media_played50_percent ⇒ Integer?
Number of times audio or video in the bubble started playing and was played 50% of the total time.
-
#media_played75_percent ⇒ Integer?
Number of times audio or video in the bubble started playing and was played 75% of the total time.
-
#seq ⇒ Integer
Bubble’s serial number.
-
#unique_impression ⇒ Integer?
Number of users the bubble was displayed.
-
#unique_media_played ⇒ Integer?
Number of users that started playing audio or video in the bubble.
-
#unique_media_played100_percent ⇒ Integer?
Number of users that started playing audio or video in the bubble and played 100% of the total time.
-
#unique_media_played25_percent ⇒ Integer?
Number of users that started playing audio or video in the bubble and played 25% of the total time.
-
#unique_media_played50_percent ⇒ Integer?
Number of users that started playing audio or video in the bubble and played 50% of the total time.
-
#unique_media_played75_percent ⇒ Integer?
Number of users that started playing audio or video in the bubble and played 75% of the total time.
Class Method Summary collapse
-
.create(args) ⇒ Line::Bot::V2::Insight::GetStatisticsPerUnitResponseMessage
Create an instance of the class from a hash.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
True if the objects are equal, false otherwise.
-
#hash ⇒ Integer
Hash code of the object.
-
#initialize(seq:, impression: nil, media_played: nil, media_played25_percent: nil, media_played50_percent: nil, media_played75_percent: nil, media_played100_percent: nil, unique_impression: nil, unique_media_played: nil, unique_media_played25_percent: nil, unique_media_played50_percent: nil, unique_media_played75_percent: nil, unique_media_played100_percent: nil, **dynamic_attributes) ⇒ GetStatisticsPerUnitResponseMessage
constructor
A new instance of GetStatisticsPerUnitResponseMessage.
Constructor Details
#initialize(seq:, impression: nil, media_played: nil, media_played25_percent: nil, media_played50_percent: nil, media_played75_percent: nil, media_played100_percent: nil, unique_impression: nil, unique_media_played: nil, unique_media_played25_percent: nil, unique_media_played50_percent: nil, unique_media_played75_percent: nil, unique_media_played100_percent: nil, **dynamic_attributes) ⇒ GetStatisticsPerUnitResponseMessage
Returns a new instance of GetStatisticsPerUnitResponseMessage.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 69 def initialize( seq:, impression: nil, media_played: nil, media_played25_percent: nil, media_played50_percent: nil, media_played75_percent: nil, media_played100_percent: nil, unique_impression: nil, unique_media_played: nil, unique_media_played25_percent: nil, unique_media_played50_percent: nil, unique_media_played75_percent: nil, unique_media_played100_percent: nil, **dynamic_attributes ) @seq = seq @impression = impression @media_played = media_played @media_played25_percent = media_played25_percent @media_played50_percent = media_played50_percent @media_played75_percent = media_played75_percent @media_played100_percent = media_played100_percent @unique_impression = unique_impression @unique_media_played = unique_media_played @unique_media_played25_percent = unique_media_played25_percent @unique_media_played50_percent = unique_media_played50_percent @unique_media_played75_percent = unique_media_played75_percent @unique_media_played100_percent = unique_media_played100_percent 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 |
Instance Attribute Details
#impression ⇒ Integer?
Returns Number of times the bubble was displayed.
21 22 23 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 21 def impression @impression end |
#media_played ⇒ Integer?
Returns Number of times audio or video in the bubble started playing.
24 25 26 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 24 def media_played @media_played end |
#media_played100_percent ⇒ Integer?
Returns Number of times audio or video in the bubble started playing and was played 100% of the total time.
36 37 38 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 36 def media_played100_percent @media_played100_percent end |
#media_played25_percent ⇒ Integer?
Returns Number of times audio or video in the bubble started playing and was played 25% of the total time.
27 28 29 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 27 def media_played25_percent @media_played25_percent end |
#media_played50_percent ⇒ Integer?
Returns Number of times audio or video in the bubble started playing and was played 50% of the total time.
30 31 32 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 30 def media_played50_percent @media_played50_percent end |
#media_played75_percent ⇒ Integer?
Returns Number of times audio or video in the bubble started playing and was played 75% of the total time.
33 34 35 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 33 def media_played75_percent @media_played75_percent end |
#seq ⇒ Integer
Returns Bubble’s serial number.
18 19 20 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 18 def seq @seq end |
#unique_impression ⇒ Integer?
Returns Number of users the bubble was displayed.
39 40 41 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 39 def unique_impression @unique_impression end |
#unique_media_played ⇒ Integer?
Returns Number of users that started playing audio or video in the bubble.
42 43 44 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 42 def unique_media_played @unique_media_played end |
#unique_media_played100_percent ⇒ Integer?
Returns Number of users that started playing audio or video in the bubble and played 100% of the total time.
54 55 56 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 54 def unique_media_played100_percent @unique_media_played100_percent end |
#unique_media_played25_percent ⇒ Integer?
Returns Number of users that started playing audio or video in the bubble and played 25% of the total time.
45 46 47 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 45 def unique_media_played25_percent @unique_media_played25_percent end |
#unique_media_played50_percent ⇒ Integer?
Returns Number of users that started playing audio or video in the bubble and played 50% of the total time.
48 49 50 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 48 def unique_media_played50_percent @unique_media_played50_percent end |
#unique_media_played75_percent ⇒ Integer?
Returns Number of users that started playing audio or video in the bubble and played 75% of the total time.
51 52 53 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 51 def unique_media_played75_percent @unique_media_played75_percent end |
Class Method Details
.create(args) ⇒ Line::Bot::V2::Insight::GetStatisticsPerUnitResponseMessage
Create an instance of the class from a hash
116 117 118 119 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 116 def self.create(args) # steep:ignore symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) return new(**symbolized_args) # steep:ignore end |
Instance Method Details
#==(other) ⇒ Boolean
Returns true if the objects are equal, false otherwise.
123 124 125 126 127 128 129 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 123 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 |
#hash ⇒ Integer
Returns Hash code of the object.
132 133 134 |
# File 'lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb', line 132 def hash [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash end |