Class: UltracartClient::OrderUtm
- Inherits:
-
Object
- Object
- UltracartClient::OrderUtm
- Defined in:
- lib/ultracart_api/models/order_utm.rb
Instance Attribute Summary collapse
-
#attribution_first_click_subtotal ⇒ Object
Returns the value of attribute attribution_first_click_subtotal.
-
#attribution_first_click_total ⇒ Object
Returns the value of attribute attribution_first_click_total.
-
#attribution_last_click_subtotal ⇒ Object
Returns the value of attribute attribution_last_click_subtotal.
-
#attribution_last_click_total ⇒ Object
Returns the value of attribute attribution_last_click_total.
-
#attribution_linear_subtotal ⇒ Object
Returns the value of attribute attribution_linear_subtotal.
-
#attribution_linear_total ⇒ Object
Returns the value of attribute attribution_linear_total.
-
#attribution_position_based_subtotal ⇒ Object
Returns the value of attribute attribution_position_based_subtotal.
-
#attribution_position_based_total ⇒ Object
Returns the value of attribute attribution_position_based_total.
-
#click_dts ⇒ Object
Date/time that the click happened.
-
#facebook_ad_id ⇒ Object
Returns the value of attribute facebook_ad_id.
-
#fbclid ⇒ Object
Returns the value of attribute fbclid.
-
#gbraid ⇒ Object
Returns the value of attribute gbraid.
-
#glcid ⇒ Object
Returns the value of attribute glcid.
-
#msclkid ⇒ Object
Returns the value of attribute msclkid.
-
#ttclid ⇒ Object
Returns the value of attribute ttclid.
-
#uc_message_id ⇒ Object
Returns the value of attribute uc_message_id.
-
#utm_campaign ⇒ Object
Returns the value of attribute utm_campaign.
-
#utm_content ⇒ Object
Returns the value of attribute utm_content.
-
#utm_id ⇒ Object
Returns the value of attribute utm_id.
-
#utm_medium ⇒ Object
Returns the value of attribute utm_medium.
-
#utm_source ⇒ Object
Returns the value of attribute utm_source.
-
#utm_term ⇒ Object
Returns the value of attribute utm_term.
-
#vmcid ⇒ Object
Returns the value of attribute vmcid.
-
#wbraid ⇒ Object
Returns the value of attribute wbraid.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ OrderUtm
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ OrderUtm
Initializes the object
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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/ultracart_api/models/order_utm.rb', line 128 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'attribution_first_click_subtotal') self.attribution_first_click_subtotal = attributes[:'attribution_first_click_subtotal'] end if attributes.has_key?(:'attribution_first_click_total') self.attribution_first_click_total = attributes[:'attribution_first_click_total'] end if attributes.has_key?(:'attribution_last_click_subtotal') self.attribution_last_click_subtotal = attributes[:'attribution_last_click_subtotal'] end if attributes.has_key?(:'attribution_last_click_total') self.attribution_last_click_total = attributes[:'attribution_last_click_total'] end if attributes.has_key?(:'attribution_linear_subtotal') self.attribution_linear_subtotal = attributes[:'attribution_linear_subtotal'] end if attributes.has_key?(:'attribution_linear_total') self.attribution_linear_total = attributes[:'attribution_linear_total'] end if attributes.has_key?(:'attribution_position_based_subtotal') self.attribution_position_based_subtotal = attributes[:'attribution_position_based_subtotal'] end if attributes.has_key?(:'attribution_position_based_total') self.attribution_position_based_total = attributes[:'attribution_position_based_total'] end if attributes.has_key?(:'click_dts') self.click_dts = attributes[:'click_dts'] end if attributes.has_key?(:'facebook_ad_id') self.facebook_ad_id = attributes[:'facebook_ad_id'] end if attributes.has_key?(:'fbclid') self.fbclid = attributes[:'fbclid'] end if attributes.has_key?(:'gbraid') self.gbraid = attributes[:'gbraid'] end if attributes.has_key?(:'glcid') self.glcid = attributes[:'glcid'] end if attributes.has_key?(:'msclkid') self.msclkid = attributes[:'msclkid'] end if attributes.has_key?(:'ttclid') self.ttclid = attributes[:'ttclid'] end if attributes.has_key?(:'uc_message_id') self. = attributes[:'uc_message_id'] end if attributes.has_key?(:'utm_campaign') self.utm_campaign = attributes[:'utm_campaign'] end if attributes.has_key?(:'utm_content') self.utm_content = attributes[:'utm_content'] end if attributes.has_key?(:'utm_id') self.utm_id = attributes[:'utm_id'] end if attributes.has_key?(:'utm_medium') self.utm_medium = attributes[:'utm_medium'] end if attributes.has_key?(:'utm_source') self.utm_source = attributes[:'utm_source'] end if attributes.has_key?(:'utm_term') self.utm_term = attributes[:'utm_term'] end if attributes.has_key?(:'vmcid') self.vmcid = attributes[:'vmcid'] end if attributes.has_key?(:'wbraid') self.wbraid = attributes[:'wbraid'] end end |
Instance Attribute Details
#attribution_first_click_subtotal ⇒ Object
Returns the value of attribute attribution_first_click_subtotal.
17 18 19 |
# File 'lib/ultracart_api/models/order_utm.rb', line 17 def attribution_first_click_subtotal @attribution_first_click_subtotal end |
#attribution_first_click_total ⇒ Object
Returns the value of attribute attribution_first_click_total.
19 20 21 |
# File 'lib/ultracart_api/models/order_utm.rb', line 19 def attribution_first_click_total @attribution_first_click_total end |
#attribution_last_click_subtotal ⇒ Object
Returns the value of attribute attribution_last_click_subtotal.
21 22 23 |
# File 'lib/ultracart_api/models/order_utm.rb', line 21 def attribution_last_click_subtotal @attribution_last_click_subtotal end |
#attribution_last_click_total ⇒ Object
Returns the value of attribute attribution_last_click_total.
23 24 25 |
# File 'lib/ultracart_api/models/order_utm.rb', line 23 def attribution_last_click_total @attribution_last_click_total end |
#attribution_linear_subtotal ⇒ Object
Returns the value of attribute attribution_linear_subtotal.
25 26 27 |
# File 'lib/ultracart_api/models/order_utm.rb', line 25 def attribution_linear_subtotal @attribution_linear_subtotal end |
#attribution_linear_total ⇒ Object
Returns the value of attribute attribution_linear_total.
27 28 29 |
# File 'lib/ultracart_api/models/order_utm.rb', line 27 def attribution_linear_total @attribution_linear_total end |
#attribution_position_based_subtotal ⇒ Object
Returns the value of attribute attribution_position_based_subtotal.
29 30 31 |
# File 'lib/ultracart_api/models/order_utm.rb', line 29 def attribution_position_based_subtotal @attribution_position_based_subtotal end |
#attribution_position_based_total ⇒ Object
Returns the value of attribute attribution_position_based_total.
31 32 33 |
# File 'lib/ultracart_api/models/order_utm.rb', line 31 def attribution_position_based_total @attribution_position_based_total end |
#click_dts ⇒ Object
Date/time that the click happened
34 35 36 |
# File 'lib/ultracart_api/models/order_utm.rb', line 34 def click_dts @click_dts end |
#facebook_ad_id ⇒ Object
Returns the value of attribute facebook_ad_id.
36 37 38 |
# File 'lib/ultracart_api/models/order_utm.rb', line 36 def facebook_ad_id @facebook_ad_id end |
#fbclid ⇒ Object
Returns the value of attribute fbclid.
38 39 40 |
# File 'lib/ultracart_api/models/order_utm.rb', line 38 def fbclid @fbclid end |
#gbraid ⇒ Object
Returns the value of attribute gbraid.
40 41 42 |
# File 'lib/ultracart_api/models/order_utm.rb', line 40 def gbraid @gbraid end |
#glcid ⇒ Object
Returns the value of attribute glcid.
42 43 44 |
# File 'lib/ultracart_api/models/order_utm.rb', line 42 def glcid @glcid end |
#msclkid ⇒ Object
Returns the value of attribute msclkid.
44 45 46 |
# File 'lib/ultracart_api/models/order_utm.rb', line 44 def msclkid @msclkid end |
#ttclid ⇒ Object
Returns the value of attribute ttclid.
46 47 48 |
# File 'lib/ultracart_api/models/order_utm.rb', line 46 def ttclid @ttclid end |
#uc_message_id ⇒ Object
Returns the value of attribute uc_message_id.
48 49 50 |
# File 'lib/ultracart_api/models/order_utm.rb', line 48 def @uc_message_id end |
#utm_campaign ⇒ Object
Returns the value of attribute utm_campaign.
50 51 52 |
# File 'lib/ultracart_api/models/order_utm.rb', line 50 def utm_campaign @utm_campaign end |
#utm_content ⇒ Object
Returns the value of attribute utm_content.
52 53 54 |
# File 'lib/ultracart_api/models/order_utm.rb', line 52 def utm_content @utm_content end |
#utm_id ⇒ Object
Returns the value of attribute utm_id.
54 55 56 |
# File 'lib/ultracart_api/models/order_utm.rb', line 54 def utm_id @utm_id end |
#utm_medium ⇒ Object
Returns the value of attribute utm_medium.
56 57 58 |
# File 'lib/ultracart_api/models/order_utm.rb', line 56 def utm_medium @utm_medium end |
#utm_source ⇒ Object
Returns the value of attribute utm_source.
58 59 60 |
# File 'lib/ultracart_api/models/order_utm.rb', line 58 def utm_source @utm_source end |
#utm_term ⇒ Object
Returns the value of attribute utm_term.
60 61 62 |
# File 'lib/ultracart_api/models/order_utm.rb', line 60 def utm_term @utm_term end |
#vmcid ⇒ Object
Returns the value of attribute vmcid.
62 63 64 |
# File 'lib/ultracart_api/models/order_utm.rb', line 62 def vmcid @vmcid end |
#wbraid ⇒ Object
Returns the value of attribute wbraid.
64 65 66 |
# File 'lib/ultracart_api/models/order_utm.rb', line 64 def wbraid @wbraid end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
67 68 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 |
# File 'lib/ultracart_api/models/order_utm.rb', line 67 def self.attribute_map { :'attribution_first_click_subtotal' => :'attribution_first_click_subtotal', :'attribution_first_click_total' => :'attribution_first_click_total', :'attribution_last_click_subtotal' => :'attribution_last_click_subtotal', :'attribution_last_click_total' => :'attribution_last_click_total', :'attribution_linear_subtotal' => :'attribution_linear_subtotal', :'attribution_linear_total' => :'attribution_linear_total', :'attribution_position_based_subtotal' => :'attribution_position_based_subtotal', :'attribution_position_based_total' => :'attribution_position_based_total', :'click_dts' => :'click_dts', :'facebook_ad_id' => :'facebook_ad_id', :'fbclid' => :'fbclid', :'gbraid' => :'gbraid', :'glcid' => :'glcid', :'msclkid' => :'msclkid', :'ttclid' => :'ttclid', :'uc_message_id' => :'uc_message_id', :'utm_campaign' => :'utm_campaign', :'utm_content' => :'utm_content', :'utm_id' => :'utm_id', :'utm_medium' => :'utm_medium', :'utm_source' => :'utm_source', :'utm_term' => :'utm_term', :'vmcid' => :'vmcid', :'wbraid' => :'wbraid' } end |
.swagger_types ⇒ Object
Attribute type mapping.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/ultracart_api/models/order_utm.rb', line 97 def self.swagger_types { :'attribution_first_click_subtotal' => :'Float', :'attribution_first_click_total' => :'Float', :'attribution_last_click_subtotal' => :'Float', :'attribution_last_click_total' => :'Float', :'attribution_linear_subtotal' => :'Float', :'attribution_linear_total' => :'Float', :'attribution_position_based_subtotal' => :'Float', :'attribution_position_based_total' => :'Float', :'click_dts' => :'String', :'facebook_ad_id' => :'String', :'fbclid' => :'String', :'gbraid' => :'String', :'glcid' => :'String', :'msclkid' => :'String', :'ttclid' => :'String', :'uc_message_id' => :'String', :'utm_campaign' => :'String', :'utm_content' => :'String', :'utm_id' => :'String', :'utm_medium' => :'String', :'utm_source' => :'String', :'utm_term' => :'String', :'vmcid' => :'String', :'wbraid' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/ultracart_api/models/order_utm.rb', line 246 def ==(o) return true if self.equal?(o) self.class == o.class && attribution_first_click_subtotal == o.attribution_first_click_subtotal && attribution_first_click_total == o.attribution_first_click_total && attribution_last_click_subtotal == o.attribution_last_click_subtotal && attribution_last_click_total == o.attribution_last_click_total && attribution_linear_subtotal == o.attribution_linear_subtotal && attribution_linear_total == o.attribution_linear_total && attribution_position_based_subtotal == o.attribution_position_based_subtotal && attribution_position_based_total == o.attribution_position_based_total && click_dts == o.click_dts && facebook_ad_id == o.facebook_ad_id && fbclid == o.fbclid && gbraid == o.gbraid && glcid == o.glcid && msclkid == o.msclkid && ttclid == o.ttclid && == o. && utm_campaign == o.utm_campaign && utm_content == o.utm_content && utm_id == o.utm_id && utm_medium == o.utm_medium && utm_source == o.utm_source && utm_term == o.utm_term && vmcid == o.vmcid && wbraid == o.wbraid end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/ultracart_api/models/order_utm.rb', line 311 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = UltracartClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
377 378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'lib/ultracart_api/models/order_utm.rb', line 377 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/ultracart_api/models/order_utm.rb', line 290 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if 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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
277 278 279 |
# File 'lib/ultracart_api/models/order_utm.rb', line 277 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
283 284 285 |
# File 'lib/ultracart_api/models/order_utm.rb', line 283 def hash [attribution_first_click_subtotal, attribution_first_click_total, attribution_last_click_subtotal, attribution_last_click_total, attribution_linear_subtotal, attribution_linear_total, attribution_position_based_subtotal, attribution_position_based_total, click_dts, facebook_ad_id, fbclid, gbraid, glcid, msclkid, ttclid, , utm_campaign, utm_content, utm_id, utm_medium, utm_source, utm_term, vmcid, wbraid].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
233 234 235 236 |
# File 'lib/ultracart_api/models/order_utm.rb', line 233 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
357 358 359 |
# File 'lib/ultracart_api/models/order_utm.rb', line 357 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
363 364 365 366 367 368 369 370 371 |
# File 'lib/ultracart_api/models/order_utm.rb', line 363 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
351 352 353 |
# File 'lib/ultracart_api/models/order_utm.rb', line 351 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
240 241 242 |
# File 'lib/ultracart_api/models/order_utm.rb', line 240 def valid? true end |