Class: Zernio::GetAdsTimeline200ResponseRowsInner
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::GetAdsTimeline200ResponseRowsInner
- Defined in:
- lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb
Instance Attribute Summary collapse
-
#action_values ⇒ Object
Monetary mirror of
actionsin native currency. -
#actions ⇒ Object
Per-action-type counts merged across all ads on this day.
-
#clicks ⇒ Object
Returns the value of attribute clicks.
-
#conversions ⇒ Object
Sum of conversion events over the range.
-
#cost_per_conversion ⇒ Object
Returns the value of attribute cost_per_conversion.
-
#cpc ⇒ Object
Cost per click in native currency.
-
#cpm ⇒ Object
Cost per 1000 impressions in native currency.
-
#ctr ⇒ Object
Click-through rate as a percentage (0–100).
-
#date ⇒ Object
Returns the value of attribute date.
-
#engagement ⇒ Object
Returns the value of attribute engagement.
-
#impressions ⇒ Object
Returns the value of attribute impressions.
-
#purchase_value ⇒ Object
Sum of purchase-type action values on this day, native currency.
-
#reach ⇒ Object
Reach summed across the account's ads for this single day.
-
#roas ⇒ Object
Derived purchaseValue / spend.
-
#spend ⇒ Object
Native currency units (matches /ads/tree convention).
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetAdsTimeline200ResponseRowsInner
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ GetAdsTimeline200ResponseRowsInner
Initializes the object
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 118 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdsTimeline200ResponseRowsInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdsTimeline200ResponseRowsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'date') self.date = attributes[:'date'] end if attributes.key?(:'spend') self.spend = attributes[:'spend'] end if attributes.key?(:'impressions') self.impressions = attributes[:'impressions'] end if attributes.key?(:'reach') self.reach = attributes[:'reach'] end if attributes.key?(:'clicks') self.clicks = attributes[:'clicks'] end if attributes.key?(:'engagement') self.engagement = attributes[:'engagement'] end if attributes.key?(:'ctr') self.ctr = attributes[:'ctr'] end if attributes.key?(:'cpc') self.cpc = attributes[:'cpc'] end if attributes.key?(:'cpm') self.cpm = attributes[:'cpm'] end if attributes.key?(:'conversions') self.conversions = attributes[:'conversions'] end if attributes.key?(:'cost_per_conversion') self.cost_per_conversion = attributes[:'cost_per_conversion'] end if attributes.key?(:'actions') if (value = attributes[:'actions']).is_a?(Hash) self.actions = value end end if attributes.key?(:'action_values') if (value = attributes[:'action_values']).is_a?(Hash) self.action_values = value end end if attributes.key?(:'purchase_value') self.purchase_value = attributes[:'purchase_value'] end if attributes.key?(:'roas') self.roas = attributes[:'roas'] end end |
Instance Attribute Details
#action_values ⇒ Object
Monetary mirror of actions in native currency.
50 51 52 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 50 def action_values @action_values end |
#actions ⇒ Object
Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
47 48 49 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 47 def actions @actions end |
#clicks ⇒ Object
Returns the value of attribute clicks.
28 29 30 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 28 def clicks @clicks end |
#conversions ⇒ Object
Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
42 43 44 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 42 def conversions @conversions end |
#cost_per_conversion ⇒ Object
Returns the value of attribute cost_per_conversion.
44 45 46 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 44 def cost_per_conversion @cost_per_conversion end |
#cpc ⇒ Object
Cost per click in native currency.
36 37 38 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 36 def cpc @cpc end |
#cpm ⇒ Object
Cost per 1000 impressions in native currency.
39 40 41 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 39 def cpm @cpm end |
#ctr ⇒ Object
Click-through rate as a percentage (0–100).
33 34 35 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 33 def ctr @ctr end |
#date ⇒ Object
Returns the value of attribute date.
18 19 20 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 18 def date @date end |
#engagement ⇒ Object
Returns the value of attribute engagement.
30 31 32 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 30 def engagement @engagement end |
#impressions ⇒ Object
Returns the value of attribute impressions.
23 24 25 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 23 def impressions @impressions end |
#purchase_value ⇒ Object
Sum of purchase-type action values on this day, native currency.
53 54 55 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 53 def purchase_value @purchase_value end |
#reach ⇒ Object
Reach summed across the account's ads for this single day. A person seen by two ads the same day counts twice, and reach is de-duplicated per day only: do NOT sum it across days (people reached on multiple days would be double-counted).
26 27 28 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 26 def reach @reach end |
#roas ⇒ Object
Derived purchaseValue / spend.
56 57 58 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 56 def roas @roas end |
#spend ⇒ Object
Native currency units (matches /ads/tree convention).
21 22 23 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 21 def spend @spend end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
80 81 82 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 80 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
85 86 87 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 85 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 59 def self.attribute_map { :'date' => :'date', :'spend' => :'spend', :'impressions' => :'impressions', :'reach' => :'reach', :'clicks' => :'clicks', :'engagement' => :'engagement', :'ctr' => :'ctr', :'cpc' => :'cpc', :'cpm' => :'cpm', :'conversions' => :'conversions', :'cost_per_conversion' => :'costPerConversion', :'actions' => :'actions', :'action_values' => :'actionValues', :'purchase_value' => :'purchaseValue', :'roas' => :'roas' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 249 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
111 112 113 114 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 111 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 90 def self.openapi_types { :'date' => :'Date', :'spend' => :'Float', :'impressions' => :'Integer', :'reach' => :'Integer', :'clicks' => :'Integer', :'engagement' => :'Integer', :'ctr' => :'Float', :'cpc' => :'Float', :'cpm' => :'Float', :'conversions' => :'Float', :'cost_per_conversion' => :'Float', :'actions' => :'Hash<String, Float>', :'action_values' => :'Hash<String, Float>', :'purchase_value' => :'Float', :'roas' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 214 def ==(o) return true if self.equal?(o) self.class == o.class && date == o.date && spend == o.spend && impressions == o.impressions && reach == o.reach && clicks == o.clicks && engagement == o.engagement && ctr == o.ctr && cpc == o.cpc && cpm == o.cpm && conversions == o.conversions && cost_per_conversion == o.cost_per_conversion && actions == o.actions && action_values == o.action_values && purchase_value == o.purchase_value && roas == o.roas end |
#eql?(o) ⇒ Boolean
236 237 238 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 236 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
242 243 244 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 242 def hash [date, spend, impressions, reach, clicks, engagement, ctr, cpc, cpm, conversions, cost_per_conversion, actions, action_values, purchase_value, roas].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
199 200 201 202 203 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 199 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 271 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
207 208 209 210 |
# File 'lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb', line 207 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |