Class: UltracartClient::EmailCommseqEmail
- Inherits:
-
Object
- Object
- UltracartClient::EmailCommseqEmail
- Defined in:
- lib/ultracart_api/models/email_commseq_email.rb
Instance Attribute Summary collapse
-
#ai_generation ⇒ Object
Returns the value of attribute ai_generation.
-
#ai_generation_prompt ⇒ Object
Returns the value of attribute ai_generation_prompt.
-
#ai_generation_user_id ⇒ Object
Returns the value of attribute ai_generation_user_id.
-
#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.
-
#external_generation ⇒ Object
Returns the value of attribute external_generation.
-
#external_generation_authentication ⇒ Object
Returns the value of attribute external_generation_authentication.
-
#external_generation_basic_password ⇒ Object
Returns the value of attribute external_generation_basic_password.
-
#external_generation_basic_username ⇒ Object
Returns the value of attribute external_generation_basic_username.
-
#external_generation_header_name ⇒ Object
Returns the value of attribute external_generation_header_name.
-
#external_generation_header_value ⇒ Object
Returns the value of attribute external_generation_header_value.
-
#external_generation_id ⇒ Object
Returns the value of attribute external_generation_id.
-
#external_generation_url ⇒ Object
Returns the value of attribute external_generation_url.
-
#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.
-
#magic_link ⇒ Object
True if email links should contain magic link tokens to log the customer in automatically.
-
#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
-
.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 = {}) ⇒ 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
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 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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 217 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqEmail` 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::EmailCommseqEmail`. 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?(:'ai_generation') self.ai_generation = attributes[:'ai_generation'] end if attributes.key?(:'ai_generation_prompt') self.ai_generation_prompt = attributes[:'ai_generation_prompt'] end if attributes.key?(:'ai_generation_user_id') self.ai_generation_user_id = attributes[:'ai_generation_user_id'] end if attributes.key?(:'deleted') self.deleted = attributes[:'deleted'] end if attributes.key?(:'edited_by_user') self.edited_by_user = attributes[:'edited_by_user'] end if attributes.key?(:'email_communication_sequence_email_uuid') self.email_communication_sequence_email_uuid = attributes[:'email_communication_sequence_email_uuid'] end if attributes.key?(:'email_communication_sequence_uuid') self.email_communication_sequence_uuid = attributes[:'email_communication_sequence_uuid'] end if attributes.key?(:'email_container_cjson') self.email_container_cjson = attributes[:'email_container_cjson'] end if attributes.key?(:'email_container_cjson_last_modified_dts') self.email_container_cjson_last_modified_dts = attributes[:'email_container_cjson_last_modified_dts'] end if attributes.key?(:'email_template_vm_path') self.email_template_vm_path = attributes[:'email_template_vm_path'] end if attributes.key?(:'external_generation') self.external_generation = attributes[:'external_generation'] end if attributes.key?(:'external_generation_authentication') self.external_generation_authentication = attributes[:'external_generation_authentication'] end if attributes.key?(:'external_generation_basic_password') self.external_generation_basic_password = attributes[:'external_generation_basic_password'] end if attributes.key?(:'external_generation_basic_username') self.external_generation_basic_username = attributes[:'external_generation_basic_username'] end if attributes.key?(:'external_generation_header_name') self.external_generation_header_name = attributes[:'external_generation_header_name'] end if attributes.key?(:'external_generation_header_value') self.external_generation_header_value = attributes[:'external_generation_header_value'] end if attributes.key?(:'external_generation_id') self.external_generation_id = attributes[:'external_generation_id'] end if attributes.key?(:'external_generation_url') self.external_generation_url = attributes[:'external_generation_url'] end if attributes.key?(:'filter_profile_equation_json') self.filter_profile_equation_json = attributes[:'filter_profile_equation_json'] end if attributes.key?(:'individually_render') self.individually_render = attributes[:'individually_render'] end if attributes.key?(:'library_item_oid') self.library_item_oid = attributes[:'library_item_oid'] end if attributes.key?(:'magic_link') self.magic_link = attributes[:'magic_link'] end if attributes.key?(:'merchant_id') self.merchant_id = attributes[:'merchant_id'] end if attributes.key?(:'pending_review') self.pending_review = attributes[:'pending_review'] end if attributes.key?(:'preview_text') self.preview_text = attributes[:'preview_text'] end if attributes.key?(:'rejected') self.rejected = attributes[:'rejected'] end if attributes.key?(:'requires_review') self.requires_review = attributes[:'requires_review'] end if attributes.key?(:'screenshot_large_full_url') self.screenshot_large_full_url = attributes[:'screenshot_large_full_url'] end if attributes.key?(:'screenshot_large_viewport_url') self. = attributes[:'screenshot_large_viewport_url'] end if attributes.key?(:'screenshot_small_full_url') self.screenshot_small_full_url = attributes[:'screenshot_small_full_url'] end if attributes.key?(:'screenshot_small_viewport_url') self. = attributes[:'screenshot_small_viewport_url'] end if attributes.key?(:'smart_sending') self.smart_sending = attributes[:'smart_sending'] end if attributes.key?(:'storefront_oid') self.storefront_oid = attributes[:'storefront_oid'] end if attributes.key?(:'subject') self.subject = attributes[:'subject'] end if attributes.key?(:'suspended_for_spam') self.suspended_for_spam = attributes[:'suspended_for_spam'] end if attributes.key?(:'transactional_email') self.transactional_email = attributes[:'transactional_email'] end if attributes.key?(:'version') self.version = attributes[:'version'] end end |
Instance Attribute Details
#ai_generation ⇒ Object
Returns the value of attribute ai_generation.
18 19 20 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 18 def ai_generation @ai_generation end |
#ai_generation_prompt ⇒ Object
Returns the value of attribute ai_generation_prompt.
20 21 22 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 20 def ai_generation_prompt @ai_generation_prompt end |
#ai_generation_user_id ⇒ Object
Returns the value of attribute ai_generation_user_id.
22 23 24 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 22 def ai_generation_user_id @ai_generation_user_id end |
#deleted ⇒ Object
Deleted
25 26 27 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 25 def deleted @deleted end |
#edited_by_user ⇒ Object
Edited by user
28 29 30 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 28 def edited_by_user @edited_by_user end |
#email_communication_sequence_email_uuid ⇒ Object
Email communication sequence email uuid
31 32 33 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 31 def email_communication_sequence_email_uuid @email_communication_sequence_email_uuid end |
#email_communication_sequence_uuid ⇒ Object
Email commseq UUID
34 35 36 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 34 def email_communication_sequence_uuid @email_communication_sequence_uuid end |
#email_container_cjson ⇒ Object
Email container cjson
37 38 39 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 37 def email_container_cjson @email_container_cjson end |
#email_container_cjson_last_modified_dts ⇒ Object
Timestamp the last time the container was modified.
40 41 42 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 40 def email_container_cjson_last_modified_dts @email_container_cjson_last_modified_dts end |
#email_template_vm_path ⇒ Object
Email template virtual path
43 44 45 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 43 def email_template_vm_path @email_template_vm_path end |
#external_generation ⇒ Object
Returns the value of attribute external_generation.
45 46 47 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 45 def external_generation @external_generation end |
#external_generation_authentication ⇒ Object
Returns the value of attribute external_generation_authentication.
47 48 49 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 47 def external_generation_authentication @external_generation_authentication end |
#external_generation_basic_password ⇒ Object
Returns the value of attribute external_generation_basic_password.
49 50 51 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 49 def external_generation_basic_password @external_generation_basic_password end |
#external_generation_basic_username ⇒ Object
Returns the value of attribute external_generation_basic_username.
51 52 53 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 51 def external_generation_basic_username @external_generation_basic_username end |
#external_generation_header_name ⇒ Object
Returns the value of attribute external_generation_header_name.
53 54 55 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 53 def external_generation_header_name @external_generation_header_name end |
#external_generation_header_value ⇒ Object
Returns the value of attribute external_generation_header_value.
55 56 57 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 55 def external_generation_header_value @external_generation_header_value end |
#external_generation_id ⇒ Object
Returns the value of attribute external_generation_id.
57 58 59 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 57 def external_generation_id @external_generation_id end |
#external_generation_url ⇒ Object
Returns the value of attribute external_generation_url.
59 60 61 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 59 def external_generation_url @external_generation_url end |
#filter_profile_equation_json ⇒ Object
Filter profile equation json
62 63 64 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 62 def filter_profile_equation_json @filter_profile_equation_json end |
#individually_render ⇒ Object
Individually render
65 66 67 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 65 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.
68 69 70 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 68 def library_item_oid @library_item_oid end |
#magic_link ⇒ Object
True if email links should contain magic link tokens to log the customer in automatically
71 72 73 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 71 def magic_link @magic_link end |
#merchant_id ⇒ Object
Merchant ID
74 75 76 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 74 def merchant_id @merchant_id end |
#pending_review ⇒ Object
True if the content of this email is pending review by UltraCart
77 78 79 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 77 def pending_review @pending_review end |
#preview_text ⇒ Object
Preview text
80 81 82 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 80 def preview_text @preview_text end |
#rejected ⇒ Object
True if the content of this email was rejected during review by UltraCart
83 84 85 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 83 def rejected @rejected end |
#requires_review ⇒ Object
True if the content of this email is requires review by UltraCart
86 87 88 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 86 def requires_review @requires_review end |
#screenshot_large_full_url ⇒ Object
URL to screenshot in large form factor full page
89 90 91 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 89 def screenshot_large_full_url @screenshot_large_full_url end |
#screenshot_large_viewport_url ⇒ Object
URL to screenshot in large form factor viewport
92 93 94 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 92 def end |
#screenshot_small_full_url ⇒ Object
URL to screenshot in small form factor full page
95 96 97 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 95 def screenshot_small_full_url @screenshot_small_full_url end |
#screenshot_small_viewport_url ⇒ Object
URL to screenshot in small form factor viewport
98 99 100 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 98 def end |
#smart_sending ⇒ Object
Smart sending
101 102 103 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 101 def smart_sending @smart_sending end |
#storefront_oid ⇒ Object
Storefront oid
104 105 106 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 104 def storefront_oid @storefront_oid end |
#subject ⇒ Object
Subject
107 108 109 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 107 def subject @subject end |
#suspended_for_spam ⇒ Object
True if the email was suspended for too high of a spam rate.
110 111 112 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 110 def suspended_for_spam @suspended_for_spam end |
#transactional_email ⇒ Object
Transactional email
113 114 115 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 113 def transactional_email @transactional_email end |
#version ⇒ Object
Version
116 117 118 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 116 def version @version end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
162 163 164 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 162 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 119 def self.attribute_map { :'ai_generation' => :'ai_generation', :'ai_generation_prompt' => :'ai_generation_prompt', :'ai_generation_user_id' => :'ai_generation_user_id', :'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', :'external_generation' => :'external_generation', :'external_generation_authentication' => :'external_generation_authentication', :'external_generation_basic_password' => :'external_generation_basic_password', :'external_generation_basic_username' => :'external_generation_basic_username', :'external_generation_header_name' => :'external_generation_header_name', :'external_generation_header_value' => :'external_generation_header_value', :'external_generation_id' => :'external_generation_id', :'external_generation_url' => :'external_generation_url', :'filter_profile_equation_json' => :'filter_profile_equation_json', :'individually_render' => :'individually_render', :'library_item_oid' => :'library_item_oid', :'magic_link' => :'magic_link', :'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 |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
451 452 453 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 451 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
210 211 212 213 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 210 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 167 def self.openapi_types { :'ai_generation' => :'Boolean', :'ai_generation_prompt' => :'String', :'ai_generation_user_id' => :'Integer', :'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', :'external_generation' => :'Boolean', :'external_generation_authentication' => :'String', :'external_generation_basic_password' => :'String', :'external_generation_basic_username' => :'String', :'external_generation_header_name' => :'String', :'external_generation_header_value' => :'String', :'external_generation_id' => :'String', :'external_generation_url' => :'String', :'filter_profile_equation_json' => :'String', :'individually_render' => :'Boolean', :'library_item_oid' => :'Integer', :'magic_link' => :'Boolean', :'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.
394 395 396 397 398 399 400 401 402 403 404 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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 394 def ==(o) return true if self.equal?(o) self.class == o.class && ai_generation == o.ai_generation && ai_generation_prompt == o.ai_generation_prompt && ai_generation_user_id == o.ai_generation_user_id && 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 && external_generation == o.external_generation && external_generation_authentication == o.external_generation_authentication && external_generation_basic_password == o.external_generation_basic_password && external_generation_basic_username == o.external_generation_basic_username && external_generation_header_name == o.external_generation_header_name && external_generation_header_value == o.external_generation_header_value && external_generation_id == o.external_generation_id && external_generation_url == o.external_generation_url && filter_profile_equation_json == o.filter_profile_equation_json && individually_render == o.individually_render && library_item_oid == o.library_item_oid && magic_link == o.magic_link && 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
482 483 484 485 486 487 488 489 490 491 492 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 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 482 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
553 554 555 556 557 558 559 560 561 562 563 564 565 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 553 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
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 458 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
438 439 440 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 438 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
444 445 446 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 444 def hash [ai_generation, ai_generation_prompt, ai_generation_user_id, 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, external_generation, external_generation_authentication, external_generation_basic_password, external_generation_basic_username, external_generation_header_name, external_generation_header_value, external_generation_id, external_generation_url, filter_profile_equation_json, individually_render, library_item_oid, magic_link, 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?
381 382 383 384 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 381 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
529 530 531 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 529 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
535 536 537 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 535 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
523 524 525 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 523 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
388 389 390 |
# File 'lib/ultracart_api/models/email_commseq_email.rb', line 388 def valid? true end |