Class: ConnectWise::PortalConfigurationServiceSetup
- Inherits:
-
Object
- Object
- ConnectWise::PortalConfigurationServiceSetup
- Defined in:
- lib/connect_wise/models/portal_configuration_service_setup.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_info ⇒ Object
Returns the value of attribute _info.
-
#actual_hours_flag ⇒ Object
Returns the value of attribute actual_hours_flag.
-
#approval_status_flag ⇒ Object
Returns the value of attribute approval_status_flag.
-
#assigned_resources_flag ⇒ Object
Returns the value of attribute assigned_resources_flag.
-
#budget_hours_flag ⇒ Object
Returns the value of attribute budget_hours_flag.
-
#closed_tasks_flag ⇒ Object
Returns the value of attribute closed_tasks_flag.
-
#contact_flag ⇒ Object
Returns the value of attribute contact_flag.
-
#display_closed_tickets_option ⇒ Object
Returns the value of attribute display_closed_tickets_option.
-
#enable_chat_assist_flag ⇒ Object
Returns the value of attribute enable_chat_assist_flag.
-
#entered_date_flag ⇒ Object
Returns the value of attribute entered_date_flag.
-
#fixed_fee_ticket_template ⇒ Object
Returns the value of attribute fixed_fee_ticket_template.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_update_flag ⇒ Object
Returns the value of attribute last_update_flag.
-
#open_tasks_flag ⇒ Object
Returns the value of attribute open_tasks_flag.
-
#required_date_flag ⇒ Object
Returns the value of attribute required_date_flag.
-
#service_board_flag ⇒ Object
Returns the value of attribute service_board_flag.
-
#service_sub_type_flag ⇒ Object
Returns the value of attribute service_sub_type_flag.
-
#service_sub_type_item_flag ⇒ Object
Returns the value of attribute service_sub_type_item_flag.
-
#service_type_flag ⇒ Object
Returns the value of attribute service_type_flag.
-
#site_name_flag ⇒ Object
Returns the value of attribute site_name_flag.
-
#sla_info_flag ⇒ Object
Returns the value of attribute sla_info_flag.
-
#status_flag ⇒ Object
Returns the value of attribute status_flag.
-
#time_materials_ticket_template ⇒ Object
Returns the value of attribute time_materials_ticket_template.
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 = {}) ⇒ PortalConfigurationServiceSetup
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 = {}) ⇒ PortalConfigurationServiceSetup
Initializes the object
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 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 129 def initialize(attributes = {}) raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::PortalConfigurationServiceSetup` 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::PortalConfigurationServiceSetup`. 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.display_closed_tickets_option = attributes[:display_closed_tickets_option] if attributes.key?(:display_closed_tickets_option) self.id = attributes[:id] if attributes.key?(:id) self.service_type_flag = attributes[:service_type_flag] if attributes.key?(:service_type_flag) self.service_sub_type_flag = attributes[:service_sub_type_flag] if attributes.key?(:service_sub_type_flag) self.service_sub_type_item_flag = attributes[:service_sub_type_item_flag] if attributes.key?(:service_sub_type_item_flag) self.status_flag = attributes[:status_flag] if attributes.key?(:status_flag) self.site_name_flag = attributes[:site_name_flag] if attributes.key?(:site_name_flag) self.entered_date_flag = attributes[:entered_date_flag] if attributes.key?(:entered_date_flag) self.last_update_flag = attributes[:last_update_flag] if attributes.key?(:last_update_flag) self.required_date_flag = attributes[:required_date_flag] if attributes.key?(:required_date_flag) self.contact_flag = attributes[:contact_flag] if attributes.key?(:contact_flag) self.assigned_resources_flag = attributes[:assigned_resources_flag] if attributes.key?(:assigned_resources_flag) self.sla_info_flag = attributes[:sla_info_flag] if attributes.key?(:sla_info_flag) self.service_board_flag = attributes[:service_board_flag] if attributes.key?(:service_board_flag) self.budget_hours_flag = attributes[:budget_hours_flag] if attributes.key?(:budget_hours_flag) self.actual_hours_flag = attributes[:actual_hours_flag] if attributes.key?(:actual_hours_flag) self.approval_status_flag = attributes[:approval_status_flag] if attributes.key?(:approval_status_flag) self.open_tasks_flag = attributes[:open_tasks_flag] if attributes.key?(:open_tasks_flag) self.closed_tasks_flag = attributes[:closed_tasks_flag] if attributes.key?(:closed_tasks_flag) self.enable_chat_assist_flag = attributes[:enable_chat_assist_flag] if attributes.key?(:enable_chat_assist_flag) self.time_materials_ticket_template = attributes[:time_materials_ticket_template] if attributes.key?(:time_materials_ticket_template) self.fixed_fee_ticket_template = attributes[:fixed_fee_ticket_template] if attributes.key?(:fixed_fee_ticket_template) 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/portal_configuration_service_setup.rb', line 16 def _info @_info end |
#actual_hours_flag ⇒ Object
Returns the value of attribute actual_hours_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def actual_hours_flag @actual_hours_flag end |
#approval_status_flag ⇒ Object
Returns the value of attribute approval_status_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def approval_status_flag @approval_status_flag end |
#assigned_resources_flag ⇒ Object
Returns the value of attribute assigned_resources_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def assigned_resources_flag @assigned_resources_flag end |
#budget_hours_flag ⇒ Object
Returns the value of attribute budget_hours_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def budget_hours_flag @budget_hours_flag end |
#closed_tasks_flag ⇒ Object
Returns the value of attribute closed_tasks_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def closed_tasks_flag @closed_tasks_flag end |
#contact_flag ⇒ Object
Returns the value of attribute contact_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def contact_flag @contact_flag end |
#display_closed_tickets_option ⇒ Object
Returns the value of attribute display_closed_tickets_option.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def display_closed_tickets_option @display_closed_tickets_option end |
#enable_chat_assist_flag ⇒ Object
Returns the value of attribute enable_chat_assist_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def enable_chat_assist_flag @enable_chat_assist_flag end |
#entered_date_flag ⇒ Object
Returns the value of attribute entered_date_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def entered_date_flag @entered_date_flag end |
#fixed_fee_ticket_template ⇒ Object
Returns the value of attribute fixed_fee_ticket_template.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def fixed_fee_ticket_template @fixed_fee_ticket_template end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def id @id end |
#last_update_flag ⇒ Object
Returns the value of attribute last_update_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def last_update_flag @last_update_flag end |
#open_tasks_flag ⇒ Object
Returns the value of attribute open_tasks_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def open_tasks_flag @open_tasks_flag end |
#required_date_flag ⇒ Object
Returns the value of attribute required_date_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def required_date_flag @required_date_flag end |
#service_board_flag ⇒ Object
Returns the value of attribute service_board_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def service_board_flag @service_board_flag end |
#service_sub_type_flag ⇒ Object
Returns the value of attribute service_sub_type_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def service_sub_type_flag @service_sub_type_flag end |
#service_sub_type_item_flag ⇒ Object
Returns the value of attribute service_sub_type_item_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def service_sub_type_item_flag @service_sub_type_item_flag end |
#service_type_flag ⇒ Object
Returns the value of attribute service_type_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def service_type_flag @service_type_flag end |
#site_name_flag ⇒ Object
Returns the value of attribute site_name_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def site_name_flag @site_name_flag end |
#sla_info_flag ⇒ Object
Returns the value of attribute sla_info_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def sla_info_flag @sla_info_flag end |
#status_flag ⇒ Object
Returns the value of attribute status_flag.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def status_flag @status_flag end |
#time_materials_ticket_template ⇒ Object
Returns the value of attribute time_materials_ticket_template.
16 17 18 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 16 def time_materials_ticket_template @time_materials_ticket_template end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
69 70 71 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 69 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 40 def self.attribute_map { display_closed_tickets_option: :displayClosedTicketsOption, id: :id, service_type_flag: :serviceTypeFlag, service_sub_type_flag: :serviceSubTypeFlag, service_sub_type_item_flag: :serviceSubTypeItemFlag, status_flag: :statusFlag, site_name_flag: :siteNameFlag, entered_date_flag: :enteredDateFlag, last_update_flag: :lastUpdateFlag, required_date_flag: :requiredDateFlag, contact_flag: :contactFlag, assigned_resources_flag: :assignedResourcesFlag, sla_info_flag: :slaInfoFlag, service_board_flag: :serviceBoardFlag, budget_hours_flag: :budgetHoursFlag, actual_hours_flag: :actualHoursFlag, approval_status_flag: :approvalStatusFlag, open_tasks_flag: :openTasksFlag, closed_tasks_flag: :closedTasksFlag, enable_chat_assist_flag: :enableChatAssistFlag, time_materials_ticket_template: :timeMaterialsTicketTemplate, fixed_fee_ticket_template: :fixedFeeTicketTemplate, _info: :_info } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
259 260 261 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 259 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 103 def self.openapi_nullable Set.new(i[ display_closed_tickets_option service_type_flag service_sub_type_flag service_sub_type_item_flag status_flag site_name_flag entered_date_flag last_update_flag required_date_flag contact_flag assigned_resources_flag sla_info_flag service_board_flag budget_hours_flag actual_hours_flag approval_status_flag open_tasks_flag closed_tasks_flag enable_chat_assist_flag ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 74 def self.openapi_types { display_closed_tickets_option: :String, id: :Integer, service_type_flag: :Boolean, service_sub_type_flag: :Boolean, service_sub_type_item_flag: :Boolean, status_flag: :Boolean, site_name_flag: :Boolean, entered_date_flag: :Boolean, last_update_flag: :Boolean, required_date_flag: :Boolean, contact_flag: :Boolean, assigned_resources_flag: :Boolean, sla_info_flag: :Boolean, service_board_flag: :Boolean, budget_hours_flag: :Boolean, actual_hours_flag: :Boolean, approval_status_flag: :Boolean, open_tasks_flag: :Boolean, closed_tasks_flag: :Boolean, enable_chat_assist_flag: :Boolean, time_materials_ticket_template: :ServiceSignoffReference, fixed_fee_ticket_template: :ServiceSignoffReference, _info: :'Hash<String, String>' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 215 def ==(other) return true if equal?(other) self.class == other.class && display_closed_tickets_option == other.display_closed_tickets_option && id == other.id && service_type_flag == other.service_type_flag && service_sub_type_flag == other.service_sub_type_flag && service_sub_type_item_flag == other.service_sub_type_item_flag && status_flag == other.status_flag && site_name_flag == other.site_name_flag && entered_date_flag == other.entered_date_flag && last_update_flag == other.last_update_flag && required_date_flag == other.required_date_flag && contact_flag == other.contact_flag && assigned_resources_flag == other.assigned_resources_flag && sla_info_flag == other.sla_info_flag && service_board_flag == other.service_board_flag && budget_hours_flag == other.budget_hours_flag && actual_hours_flag == other.actual_hours_flag && approval_status_flag == other.approval_status_flag && open_tasks_flag == other.open_tasks_flag && closed_tasks_flag == other.closed_tasks_flag && enable_chat_assist_flag == other.enable_chat_assist_flag && time_materials_ticket_template == other.time_materials_ticket_template && fixed_fee_ticket_template == other.fixed_fee_ticket_template && _info == other._info end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 289 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
360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 360 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
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 266 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
246 247 248 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 246 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
252 253 254 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 252 def hash [display_closed_tickets_option, id, service_type_flag, service_sub_type_flag, service_sub_type_item_flag, status_flag, site_name_flag, entered_date_flag, last_update_flag, required_date_flag, contact_flag, assigned_resources_flag, sla_info_flag, service_board_flag, budget_hours_flag, actual_hours_flag, approval_status_flag, open_tasks_flag, closed_tasks_flag, enable_chat_assist_flag, time_materials_ticket_template, fixed_fee_ticket_template, _info].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
191 192 193 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 191 def list_invalid_properties [] end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
336 337 338 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 336 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 342 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
330 331 332 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 330 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
197 198 199 200 201 202 |
# File 'lib/connect_wise/models/portal_configuration_service_setup.rb', line 197 def valid? display_closed_tickets_option_validator = EnumAttributeValidator.new('String', %w[DoNotDisplay Closed30Days Closed60Days Closed90Days Closed120Days AllClosed]) return false unless display_closed_tickets_option_validator.valid?(@display_closed_tickets_option) true end |