Class: ConnectWise::WorkflowAction
- Inherits:
-
Object
- Object
- ConnectWise::WorkflowAction
- Defined in:
- lib/connect_wise/models/workflow_action.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_info ⇒ Object
Returns the value of attribute _info.
-
#activity_status ⇒ Object
Returns the value of attribute activity_status.
-
#activity_type ⇒ Object
Returns the value of attribute activity_type.
-
#attach_configurations_for ⇒ Object
Required when notifyType is set to: "Attach Configuration".
-
#attached_track ⇒ Object
Returns the value of attribute attached_track.
-
#attachments ⇒ Object
Returns the value of attribute attachments.
-
#audit_notes_flag ⇒ Object
Returns the value of attribute audit_notes_flag.
-
#automate_script ⇒ Object
Returns the value of attribute automate_script.
-
#bcc_contact ⇒ Object
Returns the value of attribute bcc_contact.
-
#board ⇒ Object
Returns the value of attribute board.
-
#board_status ⇒ Object
Returns the value of attribute board_status.
-
#cc_contact ⇒ Object
Returns the value of attribute cc_contact.
-
#company_status ⇒ Object
Returns the value of attribute company_status.
-
#configuration_status ⇒ Object
Returns the value of attribute configuration_status.
-
#configuration_type ⇒ Object
Returns the value of attribute configuration_type.
-
#days_to_execute ⇒ Object
Returns the value of attribute days_to_execute.
-
#detail_notes_flag ⇒ Object
Returns the value of attribute detail_notes_flag.
-
#email_from ⇒ Object
Required when notifyFrom is set to: "Email Address" Max length: 250;.
-
#email_recipient ⇒ Object
Required when notifyWho is set to: "Email Address" Max length: 250;.
-
#group ⇒ Object
Returns the value of attribute group.
-
#id ⇒ Object
Returns the value of attribute id.
-
#internal_notes_flag ⇒ Object
Returns the value of attribute internal_notes_flag.
-
#invoice_min_days ⇒ Object
Returns the value of attribute invoice_min_days.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#notify_from ⇒ Object
Returns the value of attribute notify_from.
-
#notify_type ⇒ Object
Returns the value of attribute notify_type.
-
#notify_who ⇒ Object
Returns the value of attribute notify_who.
-
#project_status ⇒ Object
Returns the value of attribute project_status.
-
#sales_order_status ⇒ Object
Returns the value of attribute sales_order_status.
-
#script_fail_status ⇒ Object
Returns the value of attribute script_fail_status.
-
#script_success_status ⇒ Object
Returns the value of attribute script_success_status.
-
#service_item ⇒ Object
Returns the value of attribute service_item.
-
#service_priority ⇒ Object
Returns the value of attribute service_priority.
-
#service_sub_type ⇒ Object
Returns the value of attribute service_sub_type.
-
#service_survey ⇒ Object
Returns the value of attribute service_survey.
-
#service_template ⇒ Object
Returns the value of attribute service_template.
-
#service_type ⇒ Object
Returns the value of attribute service_type.
-
#specific_member_from ⇒ Object
Returns the value of attribute specific_member_from.
-
#specific_member_to ⇒ Object
Returns the value of attribute specific_member_to.
-
#specific_team_to ⇒ Object
Returns the value of attribute specific_team_to.
-
#subject ⇒ Object
Required when notifyType is set to: "Create Activity", "Send Email", "Assign Resource" Max length: 100;.
-
#update_owner_flag ⇒ Object
Returns the value of attribute update_owner_flag.
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
-
#==(other) ⇒ 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?(other) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ WorkflowAction
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 = {}) ⇒ WorkflowAction
Initializes the object
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 262 263 264 265 |
# File 'lib/connect_wise/models/workflow_action.rb', line 167 def initialize(attributes = {}) raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::WorkflowAction` initialize method' unless attributes.is_a?(Hash) # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) do |(k, v), h| raise ArgumentError, "`#{k}` is not a valid attribute in `ConnectWise::WorkflowAction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym) h[k.to_sym] = v end self.notify_type = attributes[:notify_type] if attributes.key?(:notify_type) self.id = attributes[:id] if attributes.key?(:id) self.notify_who = attributes[:notify_who] if attributes.key?(:notify_who) self.specific_member_to = attributes[:specific_member_to] if attributes.key?(:specific_member_to) self.email_recipient = attributes[:email_recipient] if attributes.key?(:email_recipient) self.notify_from = attributes[:notify_from] if attributes.key?(:notify_from) self.specific_member_from = attributes[:specific_member_from] if attributes.key?(:specific_member_from) self.email_from = attributes[:email_from] if attributes.key?(:email_from) self.cc_contact = attributes[:cc_contact] if attributes.key?(:cc_contact) self.bcc_contact = attributes[:bcc_contact] if attributes.key?(:bcc_contact) self.subject = attributes[:subject] if attributes.key?(:subject) self.notes = attributes[:notes] if attributes.key?(:notes) self.activity_status = attributes[:activity_status] if attributes.key?(:activity_status) self.activity_type = attributes[:activity_type] if attributes.key?(:activity_type) self.attached_track = attributes[:attached_track] if attributes.key?(:attached_track) self.days_to_execute = attributes[:days_to_execute] if attributes.key?(:days_to_execute) self.board = attributes[:board] if attributes.key?(:board) self.board_status = attributes[:board_status] if attributes.key?(:board_status) self.service_type = attributes[:service_type] if attributes.key?(:service_type) self.service_sub_type = attributes[:service_sub_type] if attributes.key?(:service_sub_type) self.service_item = attributes[:service_item] if attributes.key?(:service_item) self.group = attributes[:group] if attributes.key?(:group) self.service_template = attributes[:service_template] if attributes.key?(:service_template) self.invoice_min_days = attributes[:invoice_min_days] if attributes.key?(:invoice_min_days) self.automate_script = attributes[:automate_script] if attributes.key?(:automate_script) self.script_success_status = attributes[:script_success_status] if attributes.key?(:script_success_status) self.script_fail_status = attributes[:script_fail_status] if attributes.key?(:script_fail_status) self.detail_notes_flag = attributes[:detail_notes_flag] if attributes.key?(:detail_notes_flag) self.internal_notes_flag = attributes[:internal_notes_flag] if attributes.key?(:internal_notes_flag) self.audit_notes_flag = attributes[:audit_notes_flag] if attributes.key?(:audit_notes_flag) self.service_priority = attributes[:service_priority] if attributes.key?(:service_priority) self.update_owner_flag = attributes[:update_owner_flag] if attributes.key?(:update_owner_flag) self.sales_order_status = attributes[:sales_order_status] if attributes.key?(:sales_order_status) self.project_status = attributes[:project_status] if attributes.key?(:project_status) self.company_status = attributes[:company_status] if attributes.key?(:company_status) if attributes.key?(:attachments) && (value = attributes[:attachments]).is_a?(Array) self. = value end self.service_survey = attributes[:service_survey] if attributes.key?(:service_survey) self.specific_team_to = attributes[:specific_team_to] if attributes.key?(:specific_team_to) self.attach_configurations_for = attributes[:attach_configurations_for] if attributes.key?(:attach_configurations_for) self.configuration_type = attributes[:configuration_type] if attributes.key?(:configuration_type) self.configuration_status = attributes[:configuration_status] if attributes.key?(:configuration_status) return unless attributes.key?(:_info) return unless (value = attributes[:_info]).is_a?(Hash) self._info = value end |
Instance Attribute Details
#_info ⇒ Object
Returns the value of attribute _info.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def _info @_info end |
#activity_status ⇒ Object
Returns the value of attribute activity_status.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def activity_status @activity_status end |
#activity_type ⇒ Object
Returns the value of attribute activity_type.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def activity_type @activity_type end |
#attach_configurations_for ⇒ Object
Required when notifyType is set to: "Attach Configuration"
28 29 30 |
# File 'lib/connect_wise/models/workflow_action.rb', line 28 def attach_configurations_for @attach_configurations_for end |
#attached_track ⇒ Object
Returns the value of attribute attached_track.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def attached_track @attached_track end |
#attachments ⇒ Object
Returns the value of attribute attachments.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def end |
#audit_notes_flag ⇒ Object
Returns the value of attribute audit_notes_flag.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def audit_notes_flag @audit_notes_flag end |
#automate_script ⇒ Object
Returns the value of attribute automate_script.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def automate_script @automate_script end |
#bcc_contact ⇒ Object
Returns the value of attribute bcc_contact.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def bcc_contact @bcc_contact end |
#board ⇒ Object
Returns the value of attribute board.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def board @board end |
#board_status ⇒ Object
Returns the value of attribute board_status.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def board_status @board_status end |
#cc_contact ⇒ Object
Returns the value of attribute cc_contact.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def cc_contact @cc_contact end |
#company_status ⇒ Object
Returns the value of attribute company_status.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def company_status @company_status end |
#configuration_status ⇒ Object
Returns the value of attribute configuration_status.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def configuration_status @configuration_status end |
#configuration_type ⇒ Object
Returns the value of attribute configuration_type.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def configuration_type @configuration_type end |
#days_to_execute ⇒ Object
Returns the value of attribute days_to_execute.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def days_to_execute @days_to_execute end |
#detail_notes_flag ⇒ Object
Returns the value of attribute detail_notes_flag.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def detail_notes_flag @detail_notes_flag end |
#email_from ⇒ Object
Required when notifyFrom is set to: "Email Address" Max length: 250;
22 23 24 |
# File 'lib/connect_wise/models/workflow_action.rb', line 22 def email_from @email_from end |
#email_recipient ⇒ Object
Required when notifyWho is set to: "Email Address" Max length: 250;
19 20 21 |
# File 'lib/connect_wise/models/workflow_action.rb', line 19 def email_recipient @email_recipient end |
#group ⇒ Object
Returns the value of attribute group.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def group @group end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def id @id end |
#internal_notes_flag ⇒ Object
Returns the value of attribute internal_notes_flag.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def internal_notes_flag @internal_notes_flag end |
#invoice_min_days ⇒ Object
Returns the value of attribute invoice_min_days.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def invoice_min_days @invoice_min_days end |
#notes ⇒ Object
Returns the value of attribute notes.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def notes @notes end |
#notify_from ⇒ Object
Returns the value of attribute notify_from.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def notify_from @notify_from end |
#notify_type ⇒ Object
Returns the value of attribute notify_type.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def notify_type @notify_type end |
#notify_who ⇒ Object
Returns the value of attribute notify_who.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def notify_who @notify_who end |
#project_status ⇒ Object
Returns the value of attribute project_status.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def project_status @project_status end |
#sales_order_status ⇒ Object
Returns the value of attribute sales_order_status.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def sales_order_status @sales_order_status end |
#script_fail_status ⇒ Object
Returns the value of attribute script_fail_status.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def script_fail_status @script_fail_status end |
#script_success_status ⇒ Object
Returns the value of attribute script_success_status.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def script_success_status @script_success_status end |
#service_item ⇒ Object
Returns the value of attribute service_item.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def service_item @service_item end |
#service_priority ⇒ Object
Returns the value of attribute service_priority.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def service_priority @service_priority end |
#service_sub_type ⇒ Object
Returns the value of attribute service_sub_type.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def service_sub_type @service_sub_type end |
#service_survey ⇒ Object
Returns the value of attribute service_survey.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def service_survey @service_survey end |
#service_template ⇒ Object
Returns the value of attribute service_template.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def service_template @service_template end |
#service_type ⇒ Object
Returns the value of attribute service_type.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def service_type @service_type end |
#specific_member_from ⇒ Object
Returns the value of attribute specific_member_from.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def specific_member_from @specific_member_from end |
#specific_member_to ⇒ Object
Returns the value of attribute specific_member_to.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def specific_member_to @specific_member_to end |
#specific_team_to ⇒ Object
Returns the value of attribute specific_team_to.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def specific_team_to @specific_team_to end |
#subject ⇒ Object
Required when notifyType is set to: "Create Activity", "Send Email", "Assign Resource" Max length: 100;
25 26 27 |
# File 'lib/connect_wise/models/workflow_action.rb', line 25 def subject @subject end |
#update_owner_flag ⇒ Object
Returns the value of attribute update_owner_flag.
16 17 18 |
# File 'lib/connect_wise/models/workflow_action.rb', line 16 def update_owner_flag @update_owner_flag end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
100 101 102 |
# File 'lib/connect_wise/models/workflow_action.rb', line 100 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 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 92 93 94 95 96 97 |
# File 'lib/connect_wise/models/workflow_action.rb', line 52 def self.attribute_map { notify_type: :notifyType, id: :id, notify_who: :notifyWho, specific_member_to: :specificMemberTo, email_recipient: :emailRecipient, notify_from: :notifyFrom, specific_member_from: :specificMemberFrom, email_from: :emailFrom, cc_contact: :ccContact, bcc_contact: :bccContact, subject: :subject, notes: :notes, activity_status: :activityStatus, activity_type: :activityType, attached_track: :attachedTrack, days_to_execute: :daysToExecute, board: :board, board_status: :boardStatus, service_type: :serviceType, service_sub_type: :serviceSubType, service_item: :serviceItem, group: :group, service_template: :serviceTemplate, invoice_min_days: :invoiceMinDays, automate_script: :automateScript, script_success_status: :scriptSuccessStatus, script_fail_status: :scriptFailStatus, detail_notes_flag: :detailNotesFlag, internal_notes_flag: :internalNotesFlag, audit_notes_flag: :auditNotesFlag, service_priority: :servicePriority, update_owner_flag: :updateOwnerFlag, sales_order_status: :salesOrderStatus, project_status: :projectStatus, company_status: :companyStatus, attachments: :attachments, service_survey: :serviceSurvey, specific_team_to: :specificTeamTo, attach_configurations_for: :attachConfigurationsFor, configuration_type: :configurationType, configuration_status: :configurationStatus, _info: :_info } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
361 362 363 |
# File 'lib/connect_wise/models/workflow_action.rb', line 361 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/connect_wise/models/workflow_action.rb', line 153 def self.openapi_nullable Set.new(i[ days_to_execute invoice_min_days detail_notes_flag internal_notes_flag audit_notes_flag update_owner_flag attach_configurations_for ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 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 |
# File 'lib/connect_wise/models/workflow_action.rb', line 105 def self.openapi_types { notify_type: :NotifyTypeReference, id: :Integer, notify_who: :NotificationRecipientReference, specific_member_to: :MemberReference, email_recipient: :String, notify_from: :NotificationRecipientReference, specific_member_from: :MemberReference, email_from: :String, cc_contact: :ContactReference, bcc_contact: :ContactReference, subject: :String, notes: :String, activity_status: :ActivityStatusReference, activity_type: :ActivityTypeReference, attached_track: :TrackReference, days_to_execute: :Integer, board: :BoardReference, board_status: :ServiceStatusReference, service_type: :ServiceTypeReference, service_sub_type: :ServiceSubTypeReference, service_item: :ServiceItemReference, group: :GroupReference, service_template: :ServiceTemplateReference, invoice_min_days: :Integer, automate_script: :AutomateScriptReference, script_success_status: :ServiceStatusReference, script_fail_status: :ServiceStatusReference, detail_notes_flag: :Boolean, internal_notes_flag: :Boolean, audit_notes_flag: :Boolean, service_priority: :PriorityReference, update_owner_flag: :Boolean, sales_order_status: :OrderStatusReference, project_status: :ProjectStatusReference, company_status: :CompanyStatusReference, attachments: :'Array<Integer>', service_survey: :ServiceSurveyReference, specific_team_to: :GenericBoardTeamReference, attach_configurations_for: :String, configuration_type: :ConfigurationTypeReference, configuration_status: :ConfigurationStatusReference, _info: :'Hash<String, String>' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/connect_wise/models/workflow_action.rb', line 298 def ==(other) return true if equal?(other) self.class == other.class && notify_type == other.notify_type && id == other.id && notify_who == other.notify_who && specific_member_to == other.specific_member_to && email_recipient == other.email_recipient && notify_from == other.notify_from && specific_member_from == other.specific_member_from && email_from == other.email_from && cc_contact == other.cc_contact && bcc_contact == other.bcc_contact && subject == other.subject && notes == other.notes && activity_status == other.activity_status && activity_type == other.activity_type && attached_track == other.attached_track && days_to_execute == other.days_to_execute && board == other.board && board_status == other.board_status && service_type == other.service_type && service_sub_type == other.service_sub_type && service_item == other.service_item && group == other.group && service_template == other.service_template && invoice_min_days == other.invoice_min_days && automate_script == other.automate_script && script_success_status == other.script_success_status && script_fail_status == other.script_fail_status && detail_notes_flag == other.detail_notes_flag && internal_notes_flag == other.internal_notes_flag && audit_notes_flag == other.audit_notes_flag && service_priority == other.service_priority && update_owner_flag == other.update_owner_flag && sales_order_status == other.sales_order_status && project_status == other.project_status && company_status == other.company_status && == other. && service_survey == other.service_survey && specific_team_to == other.specific_team_to && attach_configurations_for == other.attach_configurations_for && configuration_type == other.configuration_type && configuration_status == other.configuration_status && _info == other._info end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
391 392 393 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 |
# File 'lib/connect_wise/models/workflow_action.rb', line 391 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 = ConnectWise.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
462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/connect_wise/models/workflow_action.rb', line 462 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
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/connect_wise/models/workflow_action.rb', line 368 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) 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 send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }) if attributes[self.class.attribute_map[key]].is_a?(Array) elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(other) ⇒ Boolean
348 349 350 |
# File 'lib/connect_wise/models/workflow_action.rb', line 348 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
354 355 356 |
# File 'lib/connect_wise/models/workflow_action.rb', line 354 def hash [notify_type, id, notify_who, specific_member_to, email_recipient, notify_from, specific_member_from, email_from, cc_contact, bcc_contact, subject, notes, activity_status, activity_type, attached_track, days_to_execute, board, board_status, service_type, service_sub_type, service_item, group, service_template, invoice_min_days, automate_script, script_success_status, script_fail_status, detail_notes_flag, internal_notes_flag, audit_notes_flag, service_priority, update_owner_flag, sales_order_status, project_status, company_status, , service_survey, specific_team_to, attach_configurations_for, configuration_type, configuration_status, _info].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
269 270 271 272 273 274 |
# File 'lib/connect_wise/models/workflow_action.rb', line 269 def list_invalid_properties invalid_properties = [] invalid_properties.push('invalid value for "notify_type", notify_type cannot be nil.') if @notify_type.nil? invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
438 439 440 |
# File 'lib/connect_wise/models/workflow_action.rb', line 438 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
444 445 446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/connect_wise/models/workflow_action.rb', line 444 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = 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
432 433 434 |
# File 'lib/connect_wise/models/workflow_action.rb', line 432 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
278 279 280 281 282 283 284 285 |
# File 'lib/connect_wise/models/workflow_action.rb', line 278 def valid? return false if @notify_type.nil? attach_configurations_for_validator = EnumAttributeValidator.new('String', %w[Company Contact]) return false unless attach_configurations_for_validator.valid?(@attach_configurations_for) true end |