Class: ConnectWise::ServiceTemplate
- Inherits:
-
Object
- Object
- ConnectWise::ServiceTemplate
- Defined in:
- lib/connectwise-ruby-sdk/models/service_template.rb
Overview
The Service (Ticket) Templates on which the Member is the assignedTo resource
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_info ⇒ Object
Metadata of the entity.
-
#agreement ⇒ Object
Returns the value of attribute agreement.
-
#assigned_by ⇒ Object
Returns the value of attribute assigned_by.
-
#assigned_notify_flag ⇒ Object
Returns the value of attribute assigned_notify_flag.
-
#attach_schedule_to_new_service_flag ⇒ Object
Returns the value of attribute attach_schedule_to_new_service_flag.
-
#bill_complete_flag ⇒ Object
Returns the value of attribute bill_complete_flag.
-
#bill_service_separately_flag ⇒ Object
Returns the value of attribute bill_service_separately_flag.
-
#bill_unapproved_time_and_expenses_flag ⇒ Object
Returns the value of attribute bill_unapproved_time_and_expenses_flag.
-
#billing_amount ⇒ Object
Returns the value of attribute billing_amount.
-
#billing_method ⇒ Object
Returns the value of attribute billing_method.
-
#board ⇒ Object
Returns the value of attribute board.
-
#company ⇒ Object
Returns the value of attribute company.
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#count ⇒ Object
Returns the value of attribute count.
-
#department ⇒ Object
Returns the value of attribute department.
-
#email_cc ⇒ Object
Returns the value of attribute email_cc.
-
#email_cc_flag ⇒ Object
Returns the value of attribute email_cc_flag.
-
#email_contact_flag ⇒ Object
Returns the value of attribute email_contact_flag.
-
#email_resource_flag ⇒ Object
Returns the value of attribute email_resource_flag.
-
#expense_billable_flag ⇒ Object
Returns the value of attribute expense_billable_flag.
-
#expense_invoice_flag ⇒ Object
Returns the value of attribute expense_invoice_flag.
-
#hours_budget ⇒ Object
Returns the value of attribute hours_budget.
-
#id ⇒ Object
Returns the value of attribute id.
-
#impact ⇒ Object
Returns the value of attribute impact.
-
#internal_analysis ⇒ Object
Returns the value of attribute internal_analysis.
-
#item ⇒ Object
Returns the value of attribute item.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#override_flag ⇒ Object
Returns the value of attribute override_flag.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#problem ⇒ Object
Returns the value of attribute problem.
-
#product_invoice_flag ⇒ Object
Returns the value of attribute product_invoice_flag.
-
#purchase_order_number ⇒ Object
Returns the value of attribute purchase_order_number.
-
#re_assign_to_member ⇒ Object
Returns the value of attribute re_assign_to_member.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#restrict_downpayment_flag ⇒ Object
Returns the value of attribute restrict_downpayment_flag.
-
#schedule_days_before ⇒ Object
Returns the value of attribute schedule_days_before.
-
#service_days_before ⇒ Object
Returns the value of attribute service_days_before.
-
#service_location ⇒ Object
Returns the value of attribute service_location.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#site ⇒ Object
Returns the value of attribute site.
-
#source ⇒ Object
Returns the value of attribute source.
-
#status ⇒ Object
Returns the value of attribute status.
-
#subtype ⇒ Object
Returns the value of attribute subtype.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#team ⇒ Object
Returns the value of attribute team.
-
#template_flag ⇒ Object
Returns the value of attribute template_flag.
-
#time_billable_flag ⇒ Object
Returns the value of attribute time_billable_flag.
-
#time_invoice_flag ⇒ Object
Returns the value of attribute time_invoice_flag.
-
#type ⇒ Object
Returns the value of attribute type.
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 = {}) ⇒ ServiceTemplate
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 = {}) ⇒ ServiceTemplate
Initializes the object
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 378 379 380 381 382 383 384 385 386 387 388 389 390 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 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 244 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?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'board') self.board = attributes[:'board'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'item') self.item = attributes[:'item'] end if attributes.has_key?(:'subtype') self.subtype = attributes[:'subtype'] end if attributes.has_key?(:'serviceLocation') self.service_location = attributes[:'serviceLocation'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'source') self.source = attributes[:'source'] end if attributes.has_key?(:'priority') self.priority = attributes[:'priority'] end if attributes.has_key?(:'team') self.team = attributes[:'team'] end if attributes.has_key?(:'company') self.company = attributes[:'company'] end if attributes.has_key?(:'contact') self.contact = attributes[:'contact'] end if attributes.has_key?(:'site') self.site = attributes[:'site'] end if attributes.has_key?(:'assignedNotifyFlag') self.assigned_notify_flag = attributes[:'assignedNotifyFlag'] 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?(:'summary') self.summary = attributes[:'summary'] end if attributes.has_key?(:'problem') self.problem = attributes[:'problem'] end if attributes.has_key?(:'hoursBudget') self.hours_budget = attributes[:'hoursBudget'] end if attributes.has_key?(:'internalAnalysis') self.internal_analysis = attributes[:'internalAnalysis'] end if attributes.has_key?(:'timeBillableFlag') self.time_billable_flag = attributes[:'timeBillableFlag'] end if attributes.has_key?(:'expenseBillableFlag') self.expense_billable_flag = attributes[:'expenseBillableFlag'] end if attributes.has_key?(:'purchaseOrderNumber') self.purchase_order_number = attributes[:'purchaseOrderNumber'] end if attributes.has_key?(:'reference') self.reference = attributes[:'reference'] end if attributes.has_key?(:'BillComplete_Flag') self.bill_complete_flag = attributes[:'BillComplete_Flag'] end if attributes.has_key?(:'billServiceSeparatelyFlag') self.bill_service_separately_flag = attributes[:'billServiceSeparatelyFlag'] end if attributes.has_key?(:'billingAmount') self.billing_amount = attributes[:'billingAmount'] end if attributes.has_key?(:'billUnapprovedTimeAndExpensesFlag') self.bill_unapproved_time_and_expenses_flag = attributes[:'billUnapprovedTimeAndExpensesFlag'] end if attributes.has_key?(:'overrideFlag') self.override_flag = attributes[:'overrideFlag'] end if attributes.has_key?(:'timeInvoiceFlag') self.time_invoice_flag = attributes[:'timeInvoiceFlag'] end if attributes.has_key?(:'expenseInvoiceFlag') self.expense_invoice_flag = attributes[:'expenseInvoiceFlag'] end if attributes.has_key?(:'productInvoiceFlag') self.product_invoice_flag = attributes[:'productInvoiceFlag'] end if attributes.has_key?(:'agreement') self.agreement = attributes[:'agreement'] end if attributes.has_key?(:'billingMethod') self.billing_method = attributes[:'billingMethod'] end if attributes.has_key?(:'severity') self.severity = attributes[:'severity'] end if attributes.has_key?(:'impact') self.impact = attributes[:'impact'] end if attributes.has_key?(:'assignedBy') self.assigned_by = attributes[:'assignedBy'] end if attributes.has_key?(:'scheduleDaysBefore') self.schedule_days_before = attributes[:'scheduleDaysBefore'] end if attributes.has_key?(:'serviceDaysBefore') self.service_days_before = attributes[:'serviceDaysBefore'] end if attributes.has_key?(:'attachScheduleToNewServiceFlag') self.attach_schedule_to_new_service_flag = attributes[:'attachScheduleToNewServiceFlag'] end if attributes.has_key?(:'templateFlag') self.template_flag = attributes[:'templateFlag'] end if attributes.has_key?(:'emailContactFlag') self.email_contact_flag = attributes[:'emailContactFlag'] end if attributes.has_key?(:'emailResourceFlag') self.email_resource_flag = attributes[:'emailResourceFlag'] end if attributes.has_key?(:'emailCCFlag') self.email_cc_flag = attributes[:'emailCCFlag'] end if attributes.has_key?(:'emailCC') self.email_cc = attributes[:'emailCC'] end if attributes.has_key?(:'restrictDownpaymentFlag') self.restrict_downpayment_flag = attributes[:'restrictDownpaymentFlag'] end if attributes.has_key?(:'_info') self._info = attributes[:'_info'] end if attributes.has_key?(:'count') self.count = attributes[:'count'] end if attributes.has_key?(:'reAssignToMember') self.re_assign_to_member = attributes[:'reAssignToMember'] end end |
Instance Attribute Details
#_info ⇒ Object
Metadata of the entity
102 103 104 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 102 def _info @_info end |
#agreement ⇒ Object
Returns the value of attribute agreement.
73 74 75 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 73 def agreement @agreement end |
#assigned_by ⇒ Object
Returns the value of attribute assigned_by.
81 82 83 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 81 def assigned_by @assigned_by end |
#assigned_notify_flag ⇒ Object
Returns the value of attribute assigned_notify_flag.
35 36 37 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 35 def assigned_notify_flag @assigned_notify_flag end |
#attach_schedule_to_new_service_flag ⇒ Object
Returns the value of attribute attach_schedule_to_new_service_flag.
87 88 89 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 87 def attach_schedule_to_new_service_flag @attach_schedule_to_new_service_flag end |
#bill_complete_flag ⇒ Object
Returns the value of attribute bill_complete_flag.
57 58 59 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 57 def bill_complete_flag @bill_complete_flag end |
#bill_service_separately_flag ⇒ Object
Returns the value of attribute bill_service_separately_flag.
59 60 61 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 59 def bill_service_separately_flag @bill_service_separately_flag end |
#bill_unapproved_time_and_expenses_flag ⇒ Object
Returns the value of attribute bill_unapproved_time_and_expenses_flag.
63 64 65 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 63 def bill_unapproved_time_and_expenses_flag @bill_unapproved_time_and_expenses_flag end |
#billing_amount ⇒ Object
Returns the value of attribute billing_amount.
61 62 63 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 61 def billing_amount @billing_amount end |
#billing_method ⇒ Object
Returns the value of attribute billing_method.
75 76 77 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 75 def billing_method @billing_method end |
#board ⇒ Object
Returns the value of attribute board.
11 12 13 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 11 def board @board end |
#company ⇒ Object
Returns the value of attribute company.
29 30 31 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 29 def company @company end |
#contact ⇒ Object
Returns the value of attribute contact.
31 32 33 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 31 def contact @contact end |
#count ⇒ Object
Returns the value of attribute count.
104 105 106 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 104 def count @count end |
#department ⇒ Object
Returns the value of attribute department.
39 40 41 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 39 def department @department end |
#email_cc ⇒ Object
Returns the value of attribute email_cc.
97 98 99 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 97 def email_cc @email_cc end |
#email_cc_flag ⇒ Object
Returns the value of attribute email_cc_flag.
95 96 97 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 95 def email_cc_flag @email_cc_flag end |
#email_contact_flag ⇒ Object
Returns the value of attribute email_contact_flag.
91 92 93 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 91 def email_contact_flag @email_contact_flag end |
#email_resource_flag ⇒ Object
Returns the value of attribute email_resource_flag.
93 94 95 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 93 def email_resource_flag @email_resource_flag end |
#expense_billable_flag ⇒ Object
Returns the value of attribute expense_billable_flag.
51 52 53 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 51 def expense_billable_flag @expense_billable_flag end |
#expense_invoice_flag ⇒ Object
Returns the value of attribute expense_invoice_flag.
69 70 71 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 69 def expense_invoice_flag @expense_invoice_flag end |
#hours_budget ⇒ Object
Returns the value of attribute hours_budget.
45 46 47 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 45 def hours_budget @hours_budget end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 7 def id @id end |
#impact ⇒ Object
Returns the value of attribute impact.
79 80 81 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 79 def impact @impact end |
#internal_analysis ⇒ Object
Returns the value of attribute internal_analysis.
47 48 49 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 47 def internal_analysis @internal_analysis end |
#item ⇒ Object
Returns the value of attribute item.
15 16 17 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 15 def item @item end |
#location ⇒ Object
Returns the value of attribute location.
37 38 39 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 37 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 9 def name @name end |
#override_flag ⇒ Object
Returns the value of attribute override_flag.
65 66 67 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 65 def override_flag @override_flag end |
#priority ⇒ Object
Returns the value of attribute priority.
25 26 27 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 25 def priority @priority end |
#problem ⇒ Object
Returns the value of attribute problem.
43 44 45 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 43 def problem @problem end |
#product_invoice_flag ⇒ Object
Returns the value of attribute product_invoice_flag.
71 72 73 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 71 def product_invoice_flag @product_invoice_flag end |
#purchase_order_number ⇒ Object
Returns the value of attribute purchase_order_number.
53 54 55 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 53 def purchase_order_number @purchase_order_number end |
#re_assign_to_member ⇒ Object
Returns the value of attribute re_assign_to_member.
106 107 108 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 106 def re_assign_to_member @re_assign_to_member end |
#reference ⇒ Object
Returns the value of attribute reference.
55 56 57 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 55 def reference @reference end |
#restrict_downpayment_flag ⇒ Object
Returns the value of attribute restrict_downpayment_flag.
99 100 101 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 99 def restrict_downpayment_flag @restrict_downpayment_flag end |
#schedule_days_before ⇒ Object
Returns the value of attribute schedule_days_before.
83 84 85 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 83 def schedule_days_before @schedule_days_before end |
#service_days_before ⇒ Object
Returns the value of attribute service_days_before.
85 86 87 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 85 def service_days_before @service_days_before end |
#service_location ⇒ Object
Returns the value of attribute service_location.
19 20 21 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 19 def service_location @service_location end |
#severity ⇒ Object
Returns the value of attribute severity.
77 78 79 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 77 def severity @severity end |
#site ⇒ Object
Returns the value of attribute site.
33 34 35 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 33 def site @site end |
#source ⇒ Object
Returns the value of attribute source.
23 24 25 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 23 def source @source end |
#status ⇒ Object
Returns the value of attribute status.
21 22 23 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 21 def status @status end |
#subtype ⇒ Object
Returns the value of attribute subtype.
17 18 19 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 17 def subtype @subtype end |
#summary ⇒ Object
Returns the value of attribute summary.
41 42 43 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 41 def summary @summary end |
#team ⇒ Object
Returns the value of attribute team.
27 28 29 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 27 def team @team end |
#template_flag ⇒ Object
Returns the value of attribute template_flag.
89 90 91 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 89 def template_flag @template_flag end |
#time_billable_flag ⇒ Object
Returns the value of attribute time_billable_flag.
49 50 51 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 49 def time_billable_flag @time_billable_flag end |
#time_invoice_flag ⇒ Object
Returns the value of attribute time_invoice_flag.
67 68 69 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 67 def time_invoice_flag @time_invoice_flag end |
#type ⇒ Object
Returns the value of attribute type.
13 14 15 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 13 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 131 def self.attribute_map { :'id' => :'id', :'name' => :'name', :'board' => :'board', :'type' => :'type', :'item' => :'item', :'subtype' => :'subtype', :'service_location' => :'serviceLocation', :'status' => :'status', :'source' => :'source', :'priority' => :'priority', :'team' => :'team', :'company' => :'company', :'contact' => :'contact', :'site' => :'site', :'assigned_notify_flag' => :'assignedNotifyFlag', :'location' => :'location', :'department' => :'department', :'summary' => :'summary', :'problem' => :'problem', :'hours_budget' => :'hoursBudget', :'internal_analysis' => :'internalAnalysis', :'time_billable_flag' => :'timeBillableFlag', :'expense_billable_flag' => :'expenseBillableFlag', :'purchase_order_number' => :'purchaseOrderNumber', :'reference' => :'reference', :'bill_complete_flag' => :'BillComplete_Flag', :'bill_service_separately_flag' => :'billServiceSeparatelyFlag', :'billing_amount' => :'billingAmount', :'bill_unapproved_time_and_expenses_flag' => :'billUnapprovedTimeAndExpensesFlag', :'override_flag' => :'overrideFlag', :'time_invoice_flag' => :'timeInvoiceFlag', :'expense_invoice_flag' => :'expenseInvoiceFlag', :'product_invoice_flag' => :'productInvoiceFlag', :'agreement' => :'agreement', :'billing_method' => :'billingMethod', :'severity' => :'severity', :'impact' => :'impact', :'assigned_by' => :'assignedBy', :'schedule_days_before' => :'scheduleDaysBefore', :'service_days_before' => :'serviceDaysBefore', :'attach_schedule_to_new_service_flag' => :'attachScheduleToNewServiceFlag', :'template_flag' => :'templateFlag', :'email_contact_flag' => :'emailContactFlag', :'email_resource_flag' => :'emailResourceFlag', :'email_cc_flag' => :'emailCCFlag', :'email_cc' => :'emailCC', :'restrict_downpayment_flag' => :'restrictDownpaymentFlag', :'_info' => :'_info', :'count' => :'count', :'re_assign_to_member' => :'reAssignToMember' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 187 def self.swagger_types { :'id' => :'Integer', :'name' => :'String', :'board' => :'BoardReference', :'type' => :'ServiceTypeReference', :'item' => :'ServiceItemReference', :'subtype' => :'ServiceSubTypeReference', :'service_location' => :'ServiceLocationReference', :'status' => :'ServiceStatusReference', :'source' => :'ServiceSourceReference', :'priority' => :'PriorityReference', :'team' => :'ServiceTeamReference', :'company' => :'CompanyReference', :'contact' => :'ContactReference', :'site' => :'SiteReference', :'assigned_notify_flag' => :'BOOLEAN', :'location' => :'SystemLocationReference', :'department' => :'SystemDepartmentReference', :'summary' => :'String', :'problem' => :'String', :'hours_budget' => :'Float', :'internal_analysis' => :'String', :'time_billable_flag' => :'BOOLEAN', :'expense_billable_flag' => :'BOOLEAN', :'purchase_order_number' => :'String', :'reference' => :'String', :'bill_complete_flag' => :'BOOLEAN', :'bill_service_separately_flag' => :'BOOLEAN', :'billing_amount' => :'Float', :'bill_unapproved_time_and_expenses_flag' => :'BOOLEAN', :'override_flag' => :'BOOLEAN', :'time_invoice_flag' => :'BOOLEAN', :'expense_invoice_flag' => :'BOOLEAN', :'product_invoice_flag' => :'BOOLEAN', :'agreement' => :'AgreementReference', :'billing_method' => :'String', :'severity' => :'String', :'impact' => :'String', :'assigned_by' => :'MemberReference', :'schedule_days_before' => :'Integer', :'service_days_before' => :'Integer', :'attach_schedule_to_new_service_flag' => :'BOOLEAN', :'template_flag' => :'BOOLEAN', :'email_contact_flag' => :'BOOLEAN', :'email_resource_flag' => :'BOOLEAN', :'email_cc_flag' => :'BOOLEAN', :'email_cc' => :'String', :'restrict_downpayment_flag' => :'BOOLEAN', :'_info' => :'Metadata', :'count' => :'Integer', :'re_assign_to_member' => :'MemberReference' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 654 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && board == o.board && type == o.type && item == o.item && subtype == o.subtype && service_location == o.service_location && status == o.status && source == o.source && priority == o.priority && team == o.team && company == o.company && contact == o.contact && site == o.site && assigned_notify_flag == o.assigned_notify_flag && location == o.location && department == o.department && summary == o.summary && problem == o.problem && hours_budget == o.hours_budget && internal_analysis == o.internal_analysis && time_billable_flag == o.time_billable_flag && expense_billable_flag == o.expense_billable_flag && purchase_order_number == o.purchase_order_number && reference == o.reference && bill_complete_flag == o.bill_complete_flag && bill_service_separately_flag == o.bill_service_separately_flag && billing_amount == o.billing_amount && bill_unapproved_time_and_expenses_flag == o.bill_unapproved_time_and_expenses_flag && override_flag == o.override_flag && time_invoice_flag == o.time_invoice_flag && expense_invoice_flag == o.expense_invoice_flag && product_invoice_flag == o.product_invoice_flag && agreement == o.agreement && billing_method == o.billing_method && severity == o.severity && impact == o.impact && assigned_by == o.assigned_by && schedule_days_before == o.schedule_days_before && service_days_before == o.service_days_before && attach_schedule_to_new_service_flag == o.attach_schedule_to_new_service_flag && template_flag == o.template_flag && email_contact_flag == o.email_contact_flag && email_resource_flag == o.email_resource_flag && email_cc_flag == o.email_cc_flag && email_cc == o.email_cc && restrict_downpayment_flag == o.restrict_downpayment_flag && _info == o._info && count == o.count && re_assign_to_member == o.re_assign_to_member end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 745 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
811 812 813 814 815 816 817 818 819 820 821 822 823 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 811 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
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 724 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
711 712 713 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 711 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
717 718 719 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 717 def hash [id, name, board, type, item, subtype, service_location, status, source, priority, team, company, contact, site, assigned_notify_flag, location, department, summary, problem, hours_budget, internal_analysis, time_billable_flag, expense_billable_flag, purchase_order_number, reference, bill_complete_flag, bill_service_separately_flag, billing_amount, bill_unapproved_time_and_expenses_flag, override_flag, time_invoice_flag, expense_invoice_flag, product_invoice_flag, agreement, billing_method, severity, impact, assigned_by, schedule_days_before, service_days_before, attach_schedule_to_new_service_flag, template_flag, email_contact_flag, email_resource_flag, email_cc_flag, email_cc, restrict_downpayment_flag, _info, count, re_assign_to_member].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 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 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 454 def list_invalid_properties invalid_properties = Array.new if @name.nil? invalid_properties.push("invalid value for 'name', name cannot be nil.") end if @name.to_s.length > 100 invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 100.") end if @board.nil? invalid_properties.push("invalid value for 'board', board cannot be nil.") end if @status.nil? invalid_properties.push("invalid value for 'status', status cannot be nil.") end if @source.nil? invalid_properties.push("invalid value for 'source', source cannot be nil.") end if @priority.nil? invalid_properties.push("invalid value for 'priority', priority cannot be nil.") end if @team.nil? invalid_properties.push("invalid value for 'team', team cannot be nil.") end if @location.nil? invalid_properties.push("invalid value for 'location', location cannot be nil.") end if @department.nil? invalid_properties.push("invalid value for 'department', department cannot be nil.") end if @summary.nil? invalid_properties.push("invalid value for 'summary', summary cannot be nil.") end if @summary.to_s.length > 100 invalid_properties.push("invalid value for 'summary', the character length must be smaller than or equal to 100.") end if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 invalid_properties.push("invalid value for 'purchase_order_number', the character length must be smaller than or equal to 25.") end if !@reference.nil? && @reference.to_s.length > 50 invalid_properties.push("invalid value for 'reference', the character length must be smaller than or equal to 50.") end if @billing_method.nil? invalid_properties.push("invalid value for 'billing_method', billing_method cannot be nil.") end if @severity.nil? invalid_properties.push("invalid value for 'severity', severity cannot be nil.") end if @impact.nil? invalid_properties.push("invalid value for 'impact', impact cannot be nil.") end if @assigned_by.nil? invalid_properties.push("invalid value for 'assigned_by', assigned_by cannot be nil.") end if !@email_cc.nil? && @email_cc.to_s.length > 1000 invalid_properties.push("invalid value for 'email_cc', the character length must be smaller than or equal to 1000.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
791 792 793 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 791 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
797 798 799 800 801 802 803 804 805 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 797 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
785 786 787 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 785 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/connectwise-ruby-sdk/models/service_template.rb', line 533 def valid? return false if @name.nil? return false if @name.to_s.length > 100 return false if @board.nil? return false if @status.nil? return false if @source.nil? return false if @priority.nil? return false if @team.nil? return false if @location.nil? return false if @department.nil? return false if @summary.nil? return false if @summary.to_s.length > 100 return false if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25 return false if !@reference.nil? && @reference.to_s.length > 50 return false if @billing_method.nil? billing_method_validator = EnumAttributeValidator.new('String', ["ActualRates", "FixedFee", "NotToExceed", "OverrideRate"]) return false unless billing_method_validator.valid?(@billing_method) return false if @severity.nil? severity_validator = EnumAttributeValidator.new('String', ["Low", "Medium", "High"]) return false unless severity_validator.valid?(@severity) return false if @impact.nil? impact_validator = EnumAttributeValidator.new('String', ["Low", "Medium", "High"]) return false unless impact_validator.valid?(@impact) return false if @assigned_by.nil? return false if !@email_cc.nil? && @email_cc.to_s.length > 1000 return true end |