Class: UltracartClient::EmailCommseqEmail
- Inherits:
-
Object
- Object
- UltracartClient::EmailCommseqEmail
- Defined in:
- lib/ultracart_api/models/email_commseq_email.rb
Instance Attribute Summary collapse
-
#deleted ⇒ Object
Deleted.
-
#edited_by_user ⇒ Object
Edited by user.
-
#email_communication_sequence_email_uuid ⇒ Object
Email communication sequence email uuid.
-
#email_communication_sequence_uuid ⇒ Object
Email commseq UUID.
-
#email_container_cjson ⇒ Object
Email container cjson.
-
#email_container_cjson_last_modified_dts ⇒ Object
Timestamp the last time the container was modified.
-
#email_template_vm_path ⇒ Object
Email template virtual path.
-
#filter_profile_equation_json ⇒ Object
Filter profile equation json.
-
#individually_render ⇒ Object
Individually render.
-
#library_item_oid ⇒ Object
If this item was ever added to the Code Library, this is the oid for that library item, or 0 if never added before.
-
#merchant_id ⇒ Object
Merchant ID.
-
#pending_review ⇒ Object
True if the content of this email is pending review by UltraCart.
-
#preview_text ⇒ Object
Preview text.
-
#rejected ⇒ Object
True if the content of this email was rejected during review by UltraCart.
-
#requires_review ⇒ Object
True if the content of this email is requires review by UltraCart.
-
#screenshot_large_full_url ⇒ Object
URL to screenshot in large form factor full page.
-
#screenshot_large_viewport_url ⇒ Object
URL to screenshot in large form factor viewport.
-
#screenshot_small_full_url ⇒ Object
URL to screenshot in small form factor full page.
-
#screenshot_small_viewport_url ⇒ Object
URL to screenshot in small form factor viewport.
-
#smart_sending ⇒ Object
Smart sending.
-
#storefront_oid ⇒ Object
Storefront oid.
-
#subject ⇒ Object
Subject.
-
#suspended_for_spam ⇒ Object
True if the email was suspended for too high of a spam rate.
-
#transactional_email ⇒ Object
Transactional email.
-
#version ⇒ Object
Version.
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 = {}) ⇒ EmailCommseqEmail
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 = {}) ⇒ EmailCommseqEmail
Initializes the object
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 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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 156 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?(:'deleted') self.deleted = attributes[:'deleted'] end if attributes.has_key?(:'edited_by_user') self.edited_by_user = attributes[:'edited_by_user'] end if attributes.has_key?(:'email_communication_sequence_email_uuid') self.email_communication_sequence_email_uuid = attributes[:'email_communication_sequence_email_uuid'] end if attributes.has_key?(:'email_communication_sequence_uuid') self.email_communication_sequence_uuid = attributes[:'email_communication_sequence_uuid'] end if attributes.has_key?(:'email_container_cjson') self.email_container_cjson = attributes[:'email_container_cjson'] end if attributes.has_key?(:'email_container_cjson_last_modified_dts') self.email_container_cjson_last_modified_dts = attributes[:'email_container_cjson_last_modified_dts'] end if attributes.has_key?(:'email_template_vm_path') self.email_template_vm_path = attributes[:'email_template_vm_path'] end if attributes.has_key?(:'filter_profile_equation_json') self.filter_profile_equation_json = attributes[:'filter_profile_equation_json'] end if attributes.has_key?(:'individually_render') self.individually_render = attributes[:'individually_render'] end if attributes.has_key?(:'library_item_oid') self.library_item_oid = attributes[:'library_item_oid'] end if attributes.has_key?(:'merchant_id') self.merchant_id = attributes[:'merchant_id'] end if attributes.has_key?(:'pending_review') self.pending_review = attributes[:'pending_review'] end if attributes.has_key?(:'preview_text') self.preview_text = attributes[:'preview_text'] end if attributes.has_key?(:'rejected') self.rejected = attributes[:'rejected'] end if attributes.has_key?(:'requires_review') self.requires_review = attributes[:'requires_review'] end if attributes.has_key?(:'screenshot_large_full_url') self.screenshot_large_full_url = attributes[:'screenshot_large_full_url'] end if attributes.has_key?(:'screenshot_large_viewport_url') self. = attributes[:'screenshot_large_viewport_url'] end if attributes.has_key?(:'screenshot_small_full_url') self.screenshot_small_full_url = attributes[:'screenshot_small_full_url'] end if attributes.has_key?(:'screenshot_small_viewport_url') self. = attributes[:'screenshot_small_viewport_url'] end if attributes.has_key?(:'smart_sending') self.smart_sending = attributes[:'smart_sending'] end if attributes.has_key?(:'storefront_oid') self.storefront_oid = attributes[:'storefront_oid'] end if attributes.has_key?(:'subject') self.subject = attributes[:'subject'] end if attributes.has_key?(:'suspended_for_spam') self.suspended_for_spam = attributes[:'suspended_for_spam'] end if attributes.has_key?(:'transactional_email') self.transactional_email = attributes[:'transactional_email'] end if attributes.has_key?(:'version') self.version = attributes[:'version'] end end |
Instance Attribute Details
#deleted ⇒ Object
Deleted
18 19 20 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 18 def deleted @deleted end |
#edited_by_user ⇒ Object
Edited by user
21 22 23 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 21 def edited_by_user @edited_by_user end |
#email_communication_sequence_email_uuid ⇒ Object
Email communication sequence email uuid
24 25 26 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 24 def email_communication_sequence_email_uuid @email_communication_sequence_email_uuid end |
#email_communication_sequence_uuid ⇒ Object
Email commseq UUID
27 28 29 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 27 def email_communication_sequence_uuid @email_communication_sequence_uuid end |
#email_container_cjson ⇒ Object
Email container cjson
30 31 32 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 30 def email_container_cjson @email_container_cjson end |
#email_container_cjson_last_modified_dts ⇒ Object
Timestamp the last time the container was modified.
33 34 35 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 33 def email_container_cjson_last_modified_dts @email_container_cjson_last_modified_dts end |
#email_template_vm_path ⇒ Object
Email template virtual path
36 37 38 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 36 def email_template_vm_path @email_template_vm_path end |
#filter_profile_equation_json ⇒ Object
Filter profile equation json
39 40 41 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 39 def filter_profile_equation_json @filter_profile_equation_json end |
#individually_render ⇒ Object
Individually render
42 43 44 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 42 def individually_render @individually_render end |
#library_item_oid ⇒ Object
If this item was ever added to the Code Library, this is the oid for that library item, or 0 if never added before. This value is used to determine if a library item should be inserted or updated.
45 46 47 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 45 def library_item_oid @library_item_oid end |
#merchant_id ⇒ Object
Merchant ID
48 49 50 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 48 def merchant_id @merchant_id end |
#pending_review ⇒ Object
True if the content of this email is pending review by UltraCart
51 52 53 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 51 def pending_review @pending_review end |
#preview_text ⇒ Object
Preview text
54 55 56 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 54 def preview_text @preview_text end |
#rejected ⇒ Object
True if the content of this email was rejected during review by UltraCart
57 58 59 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 57 def rejected @rejected end |
#requires_review ⇒ Object
True if the content of this email is requires review by UltraCart
60 61 62 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 60 def requires_review @requires_review end |
#screenshot_large_full_url ⇒ Object
URL to screenshot in large form factor full page
63 64 65 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 63 def screenshot_large_full_url @screenshot_large_full_url end |
#screenshot_large_viewport_url ⇒ Object
URL to screenshot in large form factor viewport
66 67 68 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 66 def @screenshot_large_viewport_url end |
#screenshot_small_full_url ⇒ Object
URL to screenshot in small form factor full page
69 70 71 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 69 def screenshot_small_full_url @screenshot_small_full_url end |
#screenshot_small_viewport_url ⇒ Object
URL to screenshot in small form factor viewport
72 73 74 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 72 def @screenshot_small_viewport_url end |
#smart_sending ⇒ Object
Smart sending
75 76 77 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 75 def smart_sending @smart_sending end |
#storefront_oid ⇒ Object
Storefront oid
78 79 80 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 78 def storefront_oid @storefront_oid end |
#subject ⇒ Object
Subject
81 82 83 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 81 def subject @subject end |
#suspended_for_spam ⇒ Object
True if the email was suspended for too high of a spam rate.
84 85 86 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 84 def suspended_for_spam @suspended_for_spam end |
#transactional_email ⇒ Object
Transactional email
87 88 89 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 87 def transactional_email @transactional_email end |
#version ⇒ Object
Version
90 91 92 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 90 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 93 def self.attribute_map { :'deleted' => :'deleted', :'edited_by_user' => :'edited_by_user', :'email_communication_sequence_email_uuid' => :'email_communication_sequence_email_uuid', :'email_communication_sequence_uuid' => :'email_communication_sequence_uuid', :'email_container_cjson' => :'email_container_cjson', :'email_container_cjson_last_modified_dts' => :'email_container_cjson_last_modified_dts', :'email_template_vm_path' => :'email_template_vm_path', :'filter_profile_equation_json' => :'filter_profile_equation_json', :'individually_render' => :'individually_render', :'library_item_oid' => :'library_item_oid', :'merchant_id' => :'merchant_id', :'pending_review' => :'pending_review', :'preview_text' => :'preview_text', :'rejected' => :'rejected', :'requires_review' => :'requires_review', :'screenshot_large_full_url' => :'screenshot_large_full_url', :'screenshot_large_viewport_url' => :'screenshot_large_viewport_url', :'screenshot_small_full_url' => :'screenshot_small_full_url', :'screenshot_small_viewport_url' => :'screenshot_small_viewport_url', :'smart_sending' => :'smart_sending', :'storefront_oid' => :'storefront_oid', :'subject' => :'subject', :'suspended_for_spam' => :'suspended_for_spam', :'transactional_email' => :'transactional_email', :'version' => :'version' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 124 def self.swagger_types { :'deleted' => :'BOOLEAN', :'edited_by_user' => :'String', :'email_communication_sequence_email_uuid' => :'String', :'email_communication_sequence_uuid' => :'String', :'email_container_cjson' => :'String', :'email_container_cjson_last_modified_dts' => :'String', :'email_template_vm_path' => :'String', :'filter_profile_equation_json' => :'String', :'individually_render' => :'BOOLEAN', :'library_item_oid' => :'Integer', :'merchant_id' => :'String', :'pending_review' => :'BOOLEAN', :'preview_text' => :'String', :'rejected' => :'BOOLEAN', :'requires_review' => :'BOOLEAN', :'screenshot_large_full_url' => :'String', :'screenshot_large_viewport_url' => :'String', :'screenshot_small_full_url' => :'String', :'screenshot_small_viewport_url' => :'String', :'smart_sending' => :'BOOLEAN', :'storefront_oid' => :'Integer', :'subject' => :'String', :'suspended_for_spam' => :'BOOLEAN', :'transactional_email' => :'BOOLEAN', :'version' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 278 def ==(o) return true if self.equal?(o) self.class == o.class && deleted == o.deleted && edited_by_user == o.edited_by_user && email_communication_sequence_email_uuid == o.email_communication_sequence_email_uuid && email_communication_sequence_uuid == o.email_communication_sequence_uuid && email_container_cjson == o.email_container_cjson && email_container_cjson_last_modified_dts == o.email_container_cjson_last_modified_dts && email_template_vm_path == o.email_template_vm_path && filter_profile_equation_json == o.filter_profile_equation_json && individually_render == o.individually_render && library_item_oid == o.library_item_oid && merchant_id == o.merchant_id && pending_review == o.pending_review && preview_text == o.preview_text && rejected == o.rejected && requires_review == o.requires_review && screenshot_large_full_url == o.screenshot_large_full_url && == o. && screenshot_small_full_url == o.screenshot_small_full_url && == o. && smart_sending == o.smart_sending && storefront_oid == o.storefront_oid && subject == o.subject && suspended_for_spam == o.suspended_for_spam && transactional_email == o.transactional_email && version == o.version end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 344 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
410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 410 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
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 323 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
310 311 312 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 310 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
316 317 318 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 316 def hash [deleted, edited_by_user, email_communication_sequence_email_uuid, email_communication_sequence_uuid, email_container_cjson, email_container_cjson_last_modified_dts, email_template_vm_path, filter_profile_equation_json, individually_render, library_item_oid, merchant_id, pending_review, preview_text, rejected, requires_review, screenshot_large_full_url, , screenshot_small_full_url, , smart_sending, storefront_oid, subject, suspended_for_spam, transactional_email, version].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
265 266 267 268 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 265 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
390 391 392 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 390 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
396 397 398 399 400 401 402 403 404 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 396 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
384 385 386 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 384 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
272 273 274 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 272 def valid? true end |