Class: UltracartClient::EmailCommseqStat
- Inherits:
-
Object
- Object
- UltracartClient::EmailCommseqStat
- Defined in:
- lib/ultracart_api/models/email_commseq_stat.rb
Instance Attribute Summary collapse
-
#click_count ⇒ Object
Count of clicked emails.
-
#click_count_formatted ⇒ Object
Count of clicked emails, formatted.
-
#conversion_count ⇒ Object
Count of conversion.
-
#conversion_count_formatted ⇒ Object
Count of conversions, formatted.
-
#delivered_count ⇒ Object
Count of delivered emails.
-
#delivered_count_formatted ⇒ Object
Count of delivered emails, formatted.
-
#email_communication_sequence_uuid ⇒ Object
UUID associated with the communication sequence.
-
#finished_count ⇒ Object
Count of customers that finished the sequence.
-
#finished_count_formatted ⇒ Object
Count of customers that finished the sequence, formatted.
-
#in_progress_count ⇒ Object
Count of customers in progress.
-
#in_progress_count_formatted ⇒ Object
Count of customers in progress, formatted.
-
#kickbox_count ⇒ Object
Count of emails kicked.
-
#kickbox_count_formatted ⇒ Object
Count of emails kicked, formatted.
-
#merchant_id ⇒ Object
Merchant ID.
-
#open_count ⇒ Object
Count of opened emails.
-
#open_count_formatted ⇒ Object
Count of opened emails, formatted.
-
#order_count ⇒ Object
Count of orders.
-
#order_count_formatted ⇒ Object
Count of orders, formatted.
-
#permanent_bounce_count ⇒ Object
Count of emails permanently bounced.
-
#permanent_bounce_count_formatted ⇒ Object
Count of emails permanently bounced, formatted.
-
#profit ⇒ Object
Profit.
-
#profit_formatted ⇒ Object
Profit, formatted.
-
#revenue ⇒ Object
Revenue.
-
#revenue_formatted ⇒ Object
Revenue, formatted.
-
#send_count ⇒ Object
Count of emails sent.
-
#send_count_formatted ⇒ Object
Count of emails sent, formatted.
-
#skipped_count ⇒ Object
Count of skipped emails.
-
#skipped_count_formatted ⇒ Object
Count of skipped emails, formatted.
-
#spam_count ⇒ Object
Count of emails classified as spam.
-
#spam_count_formatted ⇒ Object
Count of emails classified as spam, formatted.
-
#started_count ⇒ Object
Count of customers that started the sequence.
-
#started_count_formatted ⇒ Object
Count of customers that started the sequence, formatted.
-
#storefront_oid ⇒ Object
Storefront oid.
-
#unsubscribe_count ⇒ Object
Count of unsubscribes caused.
-
#unsubscribe_count_formatted ⇒ Object
Count of unsubscribes caused, formatted.
-
#view_count ⇒ Object
Count of views.
-
#view_count_formatted ⇒ Object
Count of views, formatted.
Class Method Summary collapse
-
.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.
-
#_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 ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ EmailCommseqStat
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 = {}) ⇒ EmailCommseqStat
Initializes the object
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 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 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 228 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqStat` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailCommseqStat`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'click_count') self.click_count = attributes[:'click_count'] end if attributes.key?(:'click_count_formatted') self.click_count_formatted = attributes[:'click_count_formatted'] end if attributes.key?(:'conversion_count') self.conversion_count = attributes[:'conversion_count'] end if attributes.key?(:'conversion_count_formatted') self.conversion_count_formatted = attributes[:'conversion_count_formatted'] end if attributes.key?(:'delivered_count') self.delivered_count = attributes[:'delivered_count'] end if attributes.key?(:'delivered_count_formatted') self.delivered_count_formatted = attributes[:'delivered_count_formatted'] end if attributes.key?(:'email_communication_sequence_uuid') self.email_communication_sequence_uuid = attributes[:'email_communication_sequence_uuid'] end if attributes.key?(:'finished_count') self.finished_count = attributes[:'finished_count'] end if attributes.key?(:'finished_count_formatted') self.finished_count_formatted = attributes[:'finished_count_formatted'] end if attributes.key?(:'in_progress_count') self.in_progress_count = attributes[:'in_progress_count'] end if attributes.key?(:'in_progress_count_formatted') self.in_progress_count_formatted = attributes[:'in_progress_count_formatted'] end if attributes.key?(:'kickbox_count') self.kickbox_count = attributes[:'kickbox_count'] end if attributes.key?(:'kickbox_count_formatted') self.kickbox_count_formatted = attributes[:'kickbox_count_formatted'] end if attributes.key?(:'merchant_id') self.merchant_id = attributes[:'merchant_id'] end if attributes.key?(:'open_count') self.open_count = attributes[:'open_count'] end if attributes.key?(:'open_count_formatted') self.open_count_formatted = attributes[:'open_count_formatted'] end if attributes.key?(:'order_count') self.order_count = attributes[:'order_count'] end if attributes.key?(:'order_count_formatted') self.order_count_formatted = attributes[:'order_count_formatted'] end if attributes.key?(:'permanent_bounce_count') self.permanent_bounce_count = attributes[:'permanent_bounce_count'] end if attributes.key?(:'permanent_bounce_count_formatted') self.permanent_bounce_count_formatted = attributes[:'permanent_bounce_count_formatted'] end if attributes.key?(:'profit') self.profit = attributes[:'profit'] end if attributes.key?(:'profit_formatted') self.profit_formatted = attributes[:'profit_formatted'] end if attributes.key?(:'revenue') self.revenue = attributes[:'revenue'] end if attributes.key?(:'revenue_formatted') self.revenue_formatted = attributes[:'revenue_formatted'] end if attributes.key?(:'send_count') self.send_count = attributes[:'send_count'] end if attributes.key?(:'send_count_formatted') self.send_count_formatted = attributes[:'send_count_formatted'] end if attributes.key?(:'skipped_count') self.skipped_count = attributes[:'skipped_count'] end if attributes.key?(:'skipped_count_formatted') self.skipped_count_formatted = attributes[:'skipped_count_formatted'] end if attributes.key?(:'spam_count') self.spam_count = attributes[:'spam_count'] end if attributes.key?(:'spam_count_formatted') self.spam_count_formatted = attributes[:'spam_count_formatted'] end if attributes.key?(:'started_count') self.started_count = attributes[:'started_count'] end if attributes.key?(:'started_count_formatted') self.started_count_formatted = attributes[:'started_count_formatted'] end if attributes.key?(:'storefront_oid') self.storefront_oid = attributes[:'storefront_oid'] end if attributes.key?(:'unsubscribe_count') self.unsubscribe_count = attributes[:'unsubscribe_count'] end if attributes.key?(:'unsubscribe_count_formatted') self.unsubscribe_count_formatted = attributes[:'unsubscribe_count_formatted'] end if attributes.key?(:'view_count') self.view_count = attributes[:'view_count'] end if attributes.key?(:'view_count_formatted') self.view_count_formatted = attributes[:'view_count_formatted'] end end |
Instance Attribute Details
#click_count ⇒ Object
Count of clicked emails
19 20 21 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 19 def click_count @click_count end |
#click_count_formatted ⇒ Object
Count of clicked emails, formatted
22 23 24 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 22 def click_count_formatted @click_count_formatted end |
#conversion_count ⇒ Object
Count of conversion
25 26 27 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 25 def conversion_count @conversion_count end |
#conversion_count_formatted ⇒ Object
Count of conversions, formatted
28 29 30 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 28 def conversion_count_formatted @conversion_count_formatted end |
#delivered_count ⇒ Object
Count of delivered emails
31 32 33 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 31 def delivered_count @delivered_count end |
#delivered_count_formatted ⇒ Object
Count of delivered emails, formatted
34 35 36 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 34 def delivered_count_formatted @delivered_count_formatted end |
#email_communication_sequence_uuid ⇒ Object
UUID associated with the communication sequence
37 38 39 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 37 def email_communication_sequence_uuid @email_communication_sequence_uuid end |
#finished_count ⇒ Object
Count of customers that finished the sequence
40 41 42 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 40 def finished_count @finished_count end |
#finished_count_formatted ⇒ Object
Count of customers that finished the sequence, formatted
43 44 45 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 43 def finished_count_formatted @finished_count_formatted end |
#in_progress_count ⇒ Object
Count of customers in progress
46 47 48 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 46 def in_progress_count @in_progress_count end |
#in_progress_count_formatted ⇒ Object
Count of customers in progress, formatted
49 50 51 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 49 def in_progress_count_formatted @in_progress_count_formatted end |
#kickbox_count ⇒ Object
Count of emails kicked
52 53 54 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 52 def kickbox_count @kickbox_count end |
#kickbox_count_formatted ⇒ Object
Count of emails kicked, formatted
55 56 57 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 55 def kickbox_count_formatted @kickbox_count_formatted end |
#merchant_id ⇒ Object
Merchant ID
58 59 60 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 58 def merchant_id @merchant_id end |
#open_count ⇒ Object
Count of opened emails
61 62 63 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 61 def open_count @open_count end |
#open_count_formatted ⇒ Object
Count of opened emails, formatted
64 65 66 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 64 def open_count_formatted @open_count_formatted end |
#order_count ⇒ Object
Count of orders
67 68 69 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 67 def order_count @order_count end |
#order_count_formatted ⇒ Object
Count of orders, formatted
70 71 72 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 70 def order_count_formatted @order_count_formatted end |
#permanent_bounce_count ⇒ Object
Count of emails permanently bounced
73 74 75 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 73 def permanent_bounce_count @permanent_bounce_count end |
#permanent_bounce_count_formatted ⇒ Object
Count of emails permanently bounced, formatted
76 77 78 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 76 def permanent_bounce_count_formatted @permanent_bounce_count_formatted end |
#profit ⇒ Object
Profit
79 80 81 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 79 def profit @profit end |
#profit_formatted ⇒ Object
Profit, formatted
82 83 84 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 82 def profit_formatted @profit_formatted end |
#revenue ⇒ Object
Revenue
85 86 87 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 85 def revenue @revenue end |
#revenue_formatted ⇒ Object
Revenue, formatted
88 89 90 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 88 def revenue_formatted @revenue_formatted end |
#send_count ⇒ Object
Count of emails sent
91 92 93 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 91 def send_count @send_count end |
#send_count_formatted ⇒ Object
Count of emails sent, formatted
94 95 96 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 94 def send_count_formatted @send_count_formatted end |
#skipped_count ⇒ Object
Count of skipped emails
97 98 99 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 97 def skipped_count @skipped_count end |
#skipped_count_formatted ⇒ Object
Count of skipped emails, formatted
100 101 102 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 100 def skipped_count_formatted @skipped_count_formatted end |
#spam_count ⇒ Object
Count of emails classified as spam
103 104 105 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 103 def spam_count @spam_count end |
#spam_count_formatted ⇒ Object
Count of emails classified as spam, formatted
106 107 108 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 106 def spam_count_formatted @spam_count_formatted end |
#started_count ⇒ Object
Count of customers that started the sequence
109 110 111 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 109 def started_count @started_count end |
#started_count_formatted ⇒ Object
Count of customers that started the sequence, formatted
112 113 114 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 112 def started_count_formatted @started_count_formatted end |
#storefront_oid ⇒ Object
Storefront oid
115 116 117 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 115 def storefront_oid @storefront_oid end |
#unsubscribe_count ⇒ Object
Count of unsubscribes caused
118 119 120 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 118 def unsubscribe_count @unsubscribe_count end |
#unsubscribe_count_formatted ⇒ Object
Count of unsubscribes caused, formatted
121 122 123 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 121 def unsubscribe_count_formatted @unsubscribe_count_formatted end |
#view_count ⇒ Object
Count of views
124 125 126 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 124 def view_count @view_count end |
#view_count_formatted ⇒ Object
Count of views, formatted
127 128 129 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 127 def view_count_formatted @view_count_formatted end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
173 174 175 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 173 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 130 def self.attribute_map { :'click_count' => :'click_count', :'click_count_formatted' => :'click_count_formatted', :'conversion_count' => :'conversion_count', :'conversion_count_formatted' => :'conversion_count_formatted', :'delivered_count' => :'delivered_count', :'delivered_count_formatted' => :'delivered_count_formatted', :'email_communication_sequence_uuid' => :'email_communication_sequence_uuid', :'finished_count' => :'finished_count', :'finished_count_formatted' => :'finished_count_formatted', :'in_progress_count' => :'in_progress_count', :'in_progress_count_formatted' => :'in_progress_count_formatted', :'kickbox_count' => :'kickbox_count', :'kickbox_count_formatted' => :'kickbox_count_formatted', :'merchant_id' => :'merchant_id', :'open_count' => :'open_count', :'open_count_formatted' => :'open_count_formatted', :'order_count' => :'order_count', :'order_count_formatted' => :'order_count_formatted', :'permanent_bounce_count' => :'permanent_bounce_count', :'permanent_bounce_count_formatted' => :'permanent_bounce_count_formatted', :'profit' => :'profit', :'profit_formatted' => :'profit_formatted', :'revenue' => :'revenue', :'revenue_formatted' => :'revenue_formatted', :'send_count' => :'send_count', :'send_count_formatted' => :'send_count_formatted', :'skipped_count' => :'skipped_count', :'skipped_count_formatted' => :'skipped_count_formatted', :'spam_count' => :'spam_count', :'spam_count_formatted' => :'spam_count_formatted', :'started_count' => :'started_count', :'started_count_formatted' => :'started_count_formatted', :'storefront_oid' => :'storefront_oid', :'unsubscribe_count' => :'unsubscribe_count', :'unsubscribe_count_formatted' => :'unsubscribe_count_formatted', :'view_count' => :'view_count', :'view_count_formatted' => :'view_count_formatted' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
462 463 464 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 462 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
221 222 223 224 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 221 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 178 def self.openapi_types { :'click_count' => :'Integer', :'click_count_formatted' => :'String', :'conversion_count' => :'Integer', :'conversion_count_formatted' => :'String', :'delivered_count' => :'Integer', :'delivered_count_formatted' => :'String', :'email_communication_sequence_uuid' => :'String', :'finished_count' => :'Integer', :'finished_count_formatted' => :'String', :'in_progress_count' => :'Integer', :'in_progress_count_formatted' => :'String', :'kickbox_count' => :'Integer', :'kickbox_count_formatted' => :'String', :'merchant_id' => :'String', :'open_count' => :'Integer', :'open_count_formatted' => :'String', :'order_count' => :'Integer', :'order_count_formatted' => :'String', :'permanent_bounce_count' => :'Integer', :'permanent_bounce_count_formatted' => :'String', :'profit' => :'Float', :'profit_formatted' => :'String', :'revenue' => :'Float', :'revenue_formatted' => :'String', :'send_count' => :'Integer', :'send_count_formatted' => :'String', :'skipped_count' => :'Integer', :'skipped_count_formatted' => :'String', :'spam_count' => :'Integer', :'spam_count_formatted' => :'String', :'started_count' => :'Integer', :'started_count_formatted' => :'String', :'storefront_oid' => :'Integer', :'unsubscribe_count' => :'Integer', :'unsubscribe_count_formatted' => :'String', :'view_count' => :'Integer', :'view_count_formatted' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 405 def ==(o) return true if self.equal?(o) self.class == o.class && click_count == o.click_count && click_count_formatted == o.click_count_formatted && conversion_count == o.conversion_count && conversion_count_formatted == o.conversion_count_formatted && delivered_count == o.delivered_count && delivered_count_formatted == o.delivered_count_formatted && email_communication_sequence_uuid == o.email_communication_sequence_uuid && finished_count == o.finished_count && finished_count_formatted == o.finished_count_formatted && in_progress_count == o.in_progress_count && in_progress_count_formatted == o.in_progress_count_formatted && kickbox_count == o.kickbox_count && kickbox_count_formatted == o.kickbox_count_formatted && merchant_id == o.merchant_id && open_count == o.open_count && open_count_formatted == o.open_count_formatted && order_count == o.order_count && order_count_formatted == o.order_count_formatted && permanent_bounce_count == o.permanent_bounce_count && permanent_bounce_count_formatted == o.permanent_bounce_count_formatted && profit == o.profit && profit_formatted == o.profit_formatted && revenue == o.revenue && revenue_formatted == o.revenue_formatted && send_count == o.send_count && send_count_formatted == o.send_count_formatted && skipped_count == o.skipped_count && skipped_count_formatted == o.skipped_count_formatted && spam_count == o.spam_count && spam_count_formatted == o.spam_count_formatted && started_count == o.started_count && started_count_formatted == o.started_count_formatted && storefront_oid == o.storefront_oid && unsubscribe_count == o.unsubscribe_count && unsubscribe_count_formatted == o.unsubscribe_count_formatted && view_count == o.view_count && view_count_formatted == o.view_count_formatted end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 493 def _deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = UltracartClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 564 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
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 469 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[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 end self end |
#eql?(o) ⇒ Boolean
449 450 451 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 449 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
455 456 457 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 455 def hash [click_count, click_count_formatted, conversion_count, conversion_count_formatted, delivered_count, delivered_count_formatted, email_communication_sequence_uuid, finished_count, finished_count_formatted, in_progress_count, in_progress_count_formatted, kickbox_count, kickbox_count_formatted, merchant_id, open_count, open_count_formatted, order_count, order_count_formatted, permanent_bounce_count, permanent_bounce_count_formatted, profit, profit_formatted, revenue, revenue_formatted, send_count, send_count_formatted, skipped_count, skipped_count_formatted, spam_count, spam_count_formatted, started_count, started_count_formatted, storefront_oid, unsubscribe_count, unsubscribe_count_formatted, view_count, view_count_formatted].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
392 393 394 395 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 392 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
540 541 542 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 540 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 546 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 |
#to_s ⇒ String
Returns the string representation of the object
534 535 536 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 534 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
399 400 401 |
# File 'lib/ultracart_api/models/email_commseq_stat.rb', line 399 def valid? true end |