Class: Zernio::TrackingTagEvent
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::TrackingTagEvent
- Defined in:
- lib/zernio-sdk/models/tracking_tag_event.rb
Overview
A conversion event tied to a tracking tag (Google conversion action, LinkedIn conversion rule, X web event tag, OpenAI event setting, TikTok pixel event, Meta custom conversion).
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#always_use_default_value ⇒ Object
defaultValueis recorded even when the conversion sends its own value. -
#click_window_days ⇒ Object
Returns the value of attribute click_window_days.
-
#counting_type ⇒ Object
onecounts at most one conversion per ad interaction (leads),everycounts each (purchases). -
#currency ⇒ Object
Returns the value of attribute currency.
-
#default_value ⇒ Object
Returns the value of attribute default_value.
-
#id ⇒ Object
Platform-native event id, the
{eventId}of the per-event routes. -
#name ⇒ Object
Returns the value of attribute name.
-
#primary ⇒ Object
Primary conversions count toward bidding and the Conversions column; secondary ones are observation only (Google
primary_for_goal). -
#site_event ⇒ Object
The neutral site event this conversion is fired for, when it maps to one.
-
#site_event_id ⇒ Object
What the site sends to fire this event (Google conversion label, LinkedIn conversion rule id, X
tw-event id). -
#status ⇒ Object
Returns the value of attribute status.
-
#type ⇒ Object
Platform event type or category.
-
#url_contains ⇒ Object
Fires only on pages whose URL contains this text (case-insensitive).
-
#view_window_days ⇒ Object
Returns the value of attribute view_window_days.
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 = {}) ⇒ TrackingTagEvent
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 = {}) ⇒ TrackingTagEvent
Initializes the object
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 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 135 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::TrackingTagEvent` 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::TrackingTagEvent`. 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?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'site_event') self.site_event = attributes[:'site_event'] end if attributes.key?(:'site_event_id') self.site_event_id = attributes[:'site_event_id'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'default_value') self.default_value = attributes[:'default_value'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'click_window_days') self.click_window_days = attributes[:'click_window_days'] end if attributes.key?(:'view_window_days') self.view_window_days = attributes[:'view_window_days'] end if attributes.key?(:'url_contains') self.url_contains = attributes[:'url_contains'] end if attributes.key?(:'always_use_default_value') self.always_use_default_value = attributes[:'always_use_default_value'] end if attributes.key?(:'primary') self.primary = attributes[:'primary'] end if attributes.key?(:'counting_type') self.counting_type = attributes[:'counting_type'] end end |
Instance Attribute Details
#always_use_default_value ⇒ Object
defaultValue is recorded even when the conversion sends its own value.
47 48 49 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 47 def always_use_default_value @always_use_default_value end |
#click_window_days ⇒ Object
Returns the value of attribute click_window_days.
39 40 41 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 39 def click_window_days @click_window_days end |
#counting_type ⇒ Object
one counts at most one conversion per ad interaction (leads), every counts each (purchases).
53 54 55 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 53 def counting_type @counting_type end |
#currency ⇒ Object
Returns the value of attribute currency.
37 38 39 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 37 def currency @currency end |
#default_value ⇒ Object
Returns the value of attribute default_value.
35 36 37 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 35 def default_value @default_value end |
#id ⇒ Object
Platform-native event id, the {eventId} of the per-event routes.
20 21 22 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 20 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 22 def name @name end |
#primary ⇒ Object
Primary conversions count toward bidding and the Conversions column; secondary ones are observation only (Google primary_for_goal).
50 51 52 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 50 def primary @primary end |
#site_event ⇒ Object
The neutral site event this conversion is fired for, when it maps to one.
28 29 30 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 28 def site_event @site_event end |
#site_event_id ⇒ Object
What the site sends to fire this event (Google conversion label, LinkedIn conversion rule id, X tw- event id).
31 32 33 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 31 def site_event_id @site_event_id end |
#status ⇒ Object
Returns the value of attribute status.
33 34 35 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 33 def status @status end |
#type ⇒ Object
Platform event type or category.
25 26 27 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 25 def type @type end |
#url_contains ⇒ Object
Fires only on pages whose URL contains this text (case-insensitive).
44 45 46 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 44 def url_contains @url_contains end |
#view_window_days ⇒ Object
Returns the value of attribute view_window_days.
41 42 43 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 41 def view_window_days @view_window_days end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
98 99 100 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 98 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
103 104 105 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 103 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 78 def self.attribute_map { :'id' => :'id', :'name' => :'name', :'type' => :'type', :'site_event' => :'siteEvent', :'site_event_id' => :'siteEventId', :'status' => :'status', :'default_value' => :'defaultValue', :'currency' => :'currency', :'click_window_days' => :'clickWindowDays', :'view_window_days' => :'viewWindowDays', :'url_contains' => :'urlContains', :'always_use_default_value' => :'alwaysUseDefaultValue', :'primary' => :'primary', :'counting_type' => :'countingType' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 315 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
128 129 130 131 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 128 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 108 def self.openapi_types { :'id' => :'String', :'name' => :'String', :'type' => :'String', :'site_event' => :'String', :'site_event_id' => :'String', :'status' => :'String', :'default_value' => :'Float', :'currency' => :'String', :'click_window_days' => :'Integer', :'view_window_days' => :'Integer', :'url_contains' => :'String', :'always_use_default_value' => :'Boolean', :'primary' => :'Boolean', :'counting_type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 281 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && type == o.type && site_event == o.site_event && site_event_id == o.site_event_id && status == o.status && default_value == o.default_value && currency == o.currency && click_window_days == o.click_window_days && view_window_days == o.view_window_days && url_contains == o.url_contains && always_use_default_value == o.always_use_default_value && primary == o.primary && counting_type == o.counting_type end |
#eql?(o) ⇒ Boolean
302 303 304 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 302 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
308 309 310 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 308 def hash [id, name, type, site_event, site_event_id, status, default_value, currency, click_window_days, view_window_days, url_contains, always_use_default_value, primary, counting_type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 212 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 337 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
228 229 230 231 232 233 234 235 236 237 |
# File 'lib/zernio-sdk/models/tracking_tag_event.rb', line 228 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @name.nil? site_event_validator = EnumAttributeValidator.new('String', ["page_view", "view_content", "add_to_cart", "search", "initiate_checkout", "add_payment_info", "purchase"]) return false unless site_event_validator.valid?(@site_event) counting_type_validator = EnumAttributeValidator.new('String', ["one", "every"]) return false unless counting_type_validator.valid?(@counting_type) true end |