Class: ConnectWise::EmailConnector
- Inherits:
-
Object
- Object
- ConnectWise::EmailConnector
- Defined in:
- lib/connectwise-ruby-sdk/models/email_connector.rb
Instance Attribute Summary collapse
-
#_info ⇒ Object
Metadata of the entity.
-
#add_cc_flag ⇒ Object
Returns the value of attribute add_cc_flag.
-
#bcc_email_to ⇒ Object
Returns the value of attribute bcc_email_to.
-
#create_contact_flag ⇒ Object
Returns the value of attribute create_contact_flag.
-
#default_company ⇒ Object
Returns the value of attribute default_company.
-
#default_member ⇒ Object
Returns the value of attribute default_member.
-
#department ⇒ Object
Returns the value of attribute department.
-
#discard_duplicates_flag ⇒ Object
Returns the value of attribute discard_duplicates_flag.
-
#email_errors_to ⇒ Object
Returns the value of attribute email_errors_to.
-
#email_notify_from ⇒ Object
Returns the value of attribute email_notify_from.
-
#id ⇒ Object
Returns the value of attribute id.
-
#imap_setup ⇒ Object
Returns the value of attribute imap_setup.
-
#item_override ⇒ Object
Returns the value of attribute item_override.
-
#location ⇒ Object
Returns the value of attribute location.
-
#never_respond_flag ⇒ Object
Returns the value of attribute never_respond_flag.
-
#no_response_flag ⇒ Object
Returns the value of attribute no_response_flag.
-
#post_replies_to_ticket_flag ⇒ Object
Returns the value of attribute post_replies_to_ticket_flag.
-
#priority_override ⇒ Object
Returns the value of attribute priority_override.
-
#response_email_for_existing ⇒ Object
Returns the value of attribute response_email_for_existing.
-
#response_email_for_new ⇒ Object
Returns the value of attribute response_email_for_new.
-
#service_board ⇒ Object
Returns the value of attribute service_board.
-
#set_email_to_default_contact_flag ⇒ Object
Returns the value of attribute set_email_to_default_contact_flag.
-
#source_override ⇒ Object
Returns the value of attribute source_override.
-
#status_override ⇒ Object
Returns the value of attribute status_override.
-
#sub_type_override ⇒ Object
Returns the value of attribute sub_type_override.
-
#type_override ⇒ Object
Returns the value of attribute type_override.
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 = {}) ⇒ EmailConnector
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 = {}) ⇒ EmailConnector
Initializes the object
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 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 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 127 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?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'imapSetup') self.imap_setup = attributes[:'imapSetup'] end if attributes.has_key?(:'serviceBoard') self.service_board = attributes[:'serviceBoard'] end if attributes.has_key?(:'defaultCompany') self.default_company = attributes[:'defaultCompany'] end if attributes.has_key?(:'defaultMember') self.default_member = attributes[:'defaultMember'] end if attributes.has_key?(:'location') self.location = attributes[:'location'] end if attributes.has_key?(:'department') self.department = attributes[:'department'] end if attributes.has_key?(:'emailNotifyFrom') self.email_notify_from = attributes[:'emailNotifyFrom'] end if attributes.has_key?(:'bccEmailTo') self.bcc_email_to = attributes[:'bccEmailTo'] end if attributes.has_key?(:'emailErrorsTo') self.email_errors_to = attributes[:'emailErrorsTo'] end if attributes.has_key?(:'setEmailToDefaultContactFlag') self.set_email_to_default_contact_flag = attributes[:'setEmailToDefaultContactFlag'] end if attributes.has_key?(:'noResponseFlag') self.no_response_flag = attributes[:'noResponseFlag'] end if attributes.has_key?(:'neverRespondFlag') self.never_respond_flag = attributes[:'neverRespondFlag'] end if attributes.has_key?(:'discardDuplicatesFlag') self.discard_duplicates_flag = attributes[:'discardDuplicatesFlag'] end if attributes.has_key?(:'postRepliesToTicketFlag') self.post_replies_to_ticket_flag = attributes[:'postRepliesToTicketFlag'] end if attributes.has_key?(:'createContactFlag') self.create_contact_flag = attributes[:'createContactFlag'] end if attributes.has_key?(:'responseEmailForNew') self.response_email_for_new = attributes[:'responseEmailForNew'] end if attributes.has_key?(:'responseEmailForExisting') self.response_email_for_existing = attributes[:'responseEmailForExisting'] end if attributes.has_key?(:'sourceOverride') self.source_override = attributes[:'sourceOverride'] end if attributes.has_key?(:'priorityOverride') self.priority_override = attributes[:'priorityOverride'] end if attributes.has_key?(:'typeOverride') self.type_override = attributes[:'typeOverride'] end if attributes.has_key?(:'subTypeOverride') self.sub_type_override = attributes[:'subTypeOverride'] end if attributes.has_key?(:'itemOverride') self.item_override = attributes[:'itemOverride'] end if attributes.has_key?(:'statusOverride') self.status_override = attributes[:'statusOverride'] end if attributes.has_key?(:'addCcFlag') self.add_cc_flag = attributes[:'addCcFlag'] end if attributes.has_key?(:'_info') self._info = attributes[:'_info'] end end |
Instance Attribute Details
#_info ⇒ Object
Metadata of the entity
58 59 60 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 58 def _info @_info end |
#add_cc_flag ⇒ Object
Returns the value of attribute add_cc_flag.
55 56 57 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 55 def add_cc_flag @add_cc_flag end |
#bcc_email_to ⇒ Object
Returns the value of attribute bcc_email_to.
23 24 25 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 23 def bcc_email_to @bcc_email_to end |
#create_contact_flag ⇒ Object
Returns the value of attribute create_contact_flag.
37 38 39 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 37 def create_contact_flag @create_contact_flag end |
#default_company ⇒ Object
Returns the value of attribute default_company.
13 14 15 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 13 def default_company @default_company end |
#default_member ⇒ Object
Returns the value of attribute default_member.
15 16 17 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 15 def default_member @default_member end |
#department ⇒ Object
Returns the value of attribute department.
19 20 21 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 19 def department @department end |
#discard_duplicates_flag ⇒ Object
Returns the value of attribute discard_duplicates_flag.
33 34 35 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 33 def discard_duplicates_flag @discard_duplicates_flag end |
#email_errors_to ⇒ Object
Returns the value of attribute email_errors_to.
25 26 27 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 25 def email_errors_to @email_errors_to end |
#email_notify_from ⇒ Object
Returns the value of attribute email_notify_from.
21 22 23 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 21 def email_notify_from @email_notify_from end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 7 def id @id end |
#imap_setup ⇒ Object
Returns the value of attribute imap_setup.
9 10 11 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 9 def imap_setup @imap_setup end |
#item_override ⇒ Object
Returns the value of attribute item_override.
51 52 53 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 51 def item_override @item_override end |
#location ⇒ Object
Returns the value of attribute location.
17 18 19 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 17 def location @location end |
#never_respond_flag ⇒ Object
Returns the value of attribute never_respond_flag.
31 32 33 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 31 def never_respond_flag @never_respond_flag end |
#no_response_flag ⇒ Object
Returns the value of attribute no_response_flag.
29 30 31 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 29 def no_response_flag @no_response_flag end |
#post_replies_to_ticket_flag ⇒ Object
Returns the value of attribute post_replies_to_ticket_flag.
35 36 37 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 35 def post_replies_to_ticket_flag @post_replies_to_ticket_flag end |
#priority_override ⇒ Object
Returns the value of attribute priority_override.
45 46 47 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 45 def priority_override @priority_override end |
#response_email_for_existing ⇒ Object
Returns the value of attribute response_email_for_existing.
41 42 43 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 41 def response_email_for_existing @response_email_for_existing end |
#response_email_for_new ⇒ Object
Returns the value of attribute response_email_for_new.
39 40 41 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 39 def response_email_for_new @response_email_for_new end |
#service_board ⇒ Object
Returns the value of attribute service_board.
11 12 13 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 11 def service_board @service_board end |
#set_email_to_default_contact_flag ⇒ Object
Returns the value of attribute set_email_to_default_contact_flag.
27 28 29 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 27 def set_email_to_default_contact_flag @set_email_to_default_contact_flag end |
#source_override ⇒ Object
Returns the value of attribute source_override.
43 44 45 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 43 def source_override @source_override end |
#status_override ⇒ Object
Returns the value of attribute status_override.
53 54 55 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 53 def status_override @status_override end |
#sub_type_override ⇒ Object
Returns the value of attribute sub_type_override.
49 50 51 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 49 def sub_type_override @sub_type_override end |
#type_override ⇒ Object
Returns the value of attribute type_override.
47 48 49 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 47 def type_override @type_override end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
62 63 64 65 66 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 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 62 def self.attribute_map { :'id' => :'id', :'imap_setup' => :'imapSetup', :'service_board' => :'serviceBoard', :'default_company' => :'defaultCompany', :'default_member' => :'defaultMember', :'location' => :'location', :'department' => :'department', :'email_notify_from' => :'emailNotifyFrom', :'bcc_email_to' => :'bccEmailTo', :'email_errors_to' => :'emailErrorsTo', :'set_email_to_default_contact_flag' => :'setEmailToDefaultContactFlag', :'no_response_flag' => :'noResponseFlag', :'never_respond_flag' => :'neverRespondFlag', :'discard_duplicates_flag' => :'discardDuplicatesFlag', :'post_replies_to_ticket_flag' => :'postRepliesToTicketFlag', :'create_contact_flag' => :'createContactFlag', :'response_email_for_new' => :'responseEmailForNew', :'response_email_for_existing' => :'responseEmailForExisting', :'source_override' => :'sourceOverride', :'priority_override' => :'priorityOverride', :'type_override' => :'typeOverride', :'sub_type_override' => :'subTypeOverride', :'item_override' => :'itemOverride', :'status_override' => :'statusOverride', :'add_cc_flag' => :'addCcFlag', :'_info' => :'_info' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 122 123 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 94 def self.swagger_types { :'id' => :'Integer', :'imap_setup' => :'ImapSetupReference', :'service_board' => :'BoardReference', :'default_company' => :'CompanyReference', :'default_member' => :'MemberReference', :'location' => :'SystemLocationReference', :'department' => :'SystemDepartmentReference', :'email_notify_from' => :'String', :'bcc_email_to' => :'String', :'email_errors_to' => :'String', :'set_email_to_default_contact_flag' => :'BOOLEAN', :'no_response_flag' => :'BOOLEAN', :'never_respond_flag' => :'BOOLEAN', :'discard_duplicates_flag' => :'BOOLEAN', :'post_replies_to_ticket_flag' => :'BOOLEAN', :'create_contact_flag' => :'BOOLEAN', :'response_email_for_new' => :'String', :'response_email_for_existing' => :'String', :'source_override' => :'ServiceSourceReference', :'priority_override' => :'PriorityReference', :'type_override' => :'ServiceTypeReference', :'sub_type_override' => :'ServiceSubTypeReference', :'item_override' => :'ServiceItemReference', :'status_override' => :'ServiceStatusReference', :'add_cc_flag' => :'BOOLEAN', :'_info' => :'Metadata' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 330 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && imap_setup == o.imap_setup && service_board == o.service_board && default_company == o.default_company && default_member == o.default_member && location == o.location && department == o.department && email_notify_from == o.email_notify_from && bcc_email_to == o.bcc_email_to && email_errors_to == o.email_errors_to && set_email_to_default_contact_flag == o.set_email_to_default_contact_flag && no_response_flag == o.no_response_flag && never_respond_flag == o.never_respond_flag && discard_duplicates_flag == o.discard_duplicates_flag && post_replies_to_ticket_flag == o.post_replies_to_ticket_flag && create_contact_flag == o.create_contact_flag && response_email_for_new == o.response_email_for_new && response_email_for_existing == o.response_email_for_existing && source_override == o.source_override && priority_override == o.priority_override && type_override == o.type_override && sub_type_override == o.sub_type_override && item_override == o.item_override && status_override == o.status_override && add_cc_flag == o.add_cc_flag && _info == o._info end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 397 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 = ConnectWise.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
463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 463 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
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 376 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 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
363 364 365 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 363 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
369 370 371 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 369 def hash [id, imap_setup, service_board, default_company, default_member, location, department, email_notify_from, bcc_email_to, email_errors_to, set_email_to_default_contact_flag, no_response_flag, never_respond_flag, discard_duplicates_flag, post_replies_to_ticket_flag, create_contact_flag, response_email_for_new, response_email_for_existing, source_override, priority_override, type_override, sub_type_override, item_override, status_override, add_cc_flag, _info].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 241 def list_invalid_properties invalid_properties = Array.new if @imap_setup.nil? invalid_properties.push("invalid value for 'imap_setup', imap_setup cannot be nil.") end if @service_board.nil? invalid_properties.push("invalid value for 'service_board', service_board cannot be nil.") end if @default_company.nil? invalid_properties.push("invalid value for 'default_company', default_company cannot be nil.") end if @default_member.nil? invalid_properties.push("invalid value for 'default_member', default_member cannot be nil.") end if !@email_notify_from.nil? && @email_notify_from.to_s.length > 50 invalid_properties.push("invalid value for 'email_notify_from', the character length must be smaller than or equal to 50.") end if !@bcc_email_to.nil? && @bcc_email_to.to_s.length > 250 invalid_properties.push("invalid value for 'bcc_email_to', the character length must be smaller than or equal to 250.") end if @email_errors_to.nil? invalid_properties.push("invalid value for 'email_errors_to', email_errors_to cannot be nil.") end if @email_errors_to.to_s.length > 50 invalid_properties.push("invalid value for 'email_errors_to', the character length must be smaller than or equal to 50.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
443 444 445 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 443 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
449 450 451 452 453 454 455 456 457 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 449 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
437 438 439 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 437 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/connectwise-ruby-sdk/models/email_connector.rb', line 280 def valid? return false if @imap_setup.nil? return false if @service_board.nil? return false if @default_company.nil? return false if @default_member.nil? return false if !@email_notify_from.nil? && @email_notify_from.to_s.length > 50 return false if !@bcc_email_to.nil? && @bcc_email_to.to_s.length > 250 return false if @email_errors_to.nil? return false if @email_errors_to.to_s.length > 50 return true end |