Class: ConnectWise::ProjectTicket

Inherits:
Object
  • Object
show all
Defined in:
lib/connect_wise/models/project_ticket.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ProjectTicket

Initializes the object

Raises:

  • (ArgumentError)


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
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/connect_wise/models/project_ticket.rb', line 295

def initialize(attributes = {})
  raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::ProjectTicket` 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::ProjectTicket`. 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.summary = attributes[:summary] if attributes.key?(:summary)

  self.id = attributes[:id] if attributes.key?(:id)

  self.is_issue_flag = attributes[:is_issue_flag] if attributes.key?(:is_issue_flag)

  self.board = attributes[:board] if attributes.key?(:board)

  self.status = attributes[:status] if attributes.key?(:status)

  self.work_role = attributes[:work_role] if attributes.key?(:work_role)

  self.work_type = attributes[:work_type] if attributes.key?(:work_type)

  self.project = attributes[:project] if attributes.key?(:project)

  self.phase = attributes[:phase] if attributes.key?(:phase)

  self.wbs_code = attributes[:wbs_code] if attributes.key?(:wbs_code)

  self.company = attributes[:company] if attributes.key?(:company)

  self.site = attributes[:site] if attributes.key?(:site)

  self.site_name = attributes[:site_name] if attributes.key?(:site_name)

  self.address_line1 = attributes[:address_line1] if attributes.key?(:address_line1)

  self.address_line2 = attributes[:address_line2] if attributes.key?(:address_line2)

  self.city = attributes[:city] if attributes.key?(:city)

  self.state_identifier = attributes[:state_identifier] if attributes.key?(:state_identifier)

  self.zip = attributes[:zip] if attributes.key?(:zip)

  self.country = attributes[:country] if attributes.key?(:country)

  self.contact = attributes[:contact] if attributes.key?(:contact)

  self.contact_name = attributes[:contact_name] if attributes.key?(:contact_name)

  self.contact_phone_number = attributes[:contact_phone_number] if attributes.key?(:contact_phone_number)

  self.contact_phone_extension = attributes[:contact_phone_extension] if attributes.key?(:contact_phone_extension)

  self.contact_email_address = attributes[:contact_email_address] if attributes.key?(:contact_email_address)

  self.type = attributes[:type] if attributes.key?(:type)

  self.sub_type = attributes[:sub_type] if attributes.key?(:sub_type)

  self.item = attributes[:item] if attributes.key?(:item)

  self.owner = attributes[:owner] if attributes.key?(:owner)

  self.priority = attributes[:priority] if attributes.key?(:priority)

  self.service_location = attributes[:service_location] if attributes.key?(:service_location)

  self.source = attributes[:source] if attributes.key?(:source)

  self.required_date = attributes[:required_date] if attributes.key?(:required_date)

  self.budget_hours = attributes[:budget_hours] if attributes.key?(:budget_hours)

  self.opportunity = attributes[:opportunity] if attributes.key?(:opportunity)

  self.agreement = attributes[:agreement] if attributes.key?(:agreement)

  self.knowledge_base_category_id = attributes[:knowledge_base_category_id] if attributes.key?(:knowledge_base_category_id)

  self.knowledge_base_sub_category_id = attributes[:knowledge_base_sub_category_id] if attributes.key?(:knowledge_base_sub_category_id)

  self.knowledge_base_link_id = attributes[:knowledge_base_link_id] if attributes.key?(:knowledge_base_link_id)

  self.knowledge_base_link_type = attributes[:knowledge_base_link_type] if attributes.key?(:knowledge_base_link_type)

  self.allow_all_clients_portal_view = attributes[:allow_all_clients_portal_view] if attributes.key?(:allow_all_clients_portal_view)

  self.customer_updated_flag = attributes[:customer_updated_flag] if attributes.key?(:customer_updated_flag)

  self.automatic_email_contact_flag = attributes[:automatic_email_contact_flag] if attributes.key?(:automatic_email_contact_flag)

  self.automatic_email_resource_flag = attributes[:automatic_email_resource_flag] if attributes.key?(:automatic_email_resource_flag)

  self.automatic_email_cc_flag = attributes[:automatic_email_cc_flag] if attributes.key?(:automatic_email_cc_flag)

  self.automatic_email_cc = attributes[:automatic_email_cc] if attributes.key?(:automatic_email_cc)

  self.closed_date = attributes[:closed_date] if attributes.key?(:closed_date)

  self.closed_by = attributes[:closed_by] if attributes.key?(:closed_by)

  self.closed_flag = attributes[:closed_flag] if attributes.key?(:closed_flag)

  self.actual_hours = attributes[:actual_hours] if attributes.key?(:actual_hours)

  self.approved = attributes[:approved] if attributes.key?(:approved)

  self.sub_billing_method = attributes[:sub_billing_method] if attributes.key?(:sub_billing_method)

  self.sub_billing_amount = attributes[:sub_billing_amount] if attributes.key?(:sub_billing_amount)

  self.sub_date_accepted = attributes[:sub_date_accepted] if attributes.key?(:sub_date_accepted)

  self.resources = attributes[:resources] if attributes.key?(:resources)

  self.bill_time = attributes[:bill_time] if attributes.key?(:bill_time)

  self.bill_expenses = attributes[:bill_expenses] if attributes.key?(:bill_expenses)

  self.bill_products = attributes[:bill_products] if attributes.key?(:bill_products)

  self.predecessor_type = attributes[:predecessor_type] if attributes.key?(:predecessor_type)

  self.predecessor_id = attributes[:predecessor_id] if attributes.key?(:predecessor_id)

  self.predecessor_closed_flag = attributes[:predecessor_closed_flag] if attributes.key?(:predecessor_closed_flag)

  self.lag_days = attributes[:lag_days] if attributes.key?(:lag_days)

  self.lag_nonworking_days_flag = attributes[:lag_nonworking_days_flag] if attributes.key?(:lag_nonworking_days_flag)

  self.estimated_start_date = attributes[:estimated_start_date] if attributes.key?(:estimated_start_date)

  self.location = attributes[:location] if attributes.key?(:location)

  self.department = attributes[:department] if attributes.key?(:department)

  self.duration = attributes[:duration] if attributes.key?(:duration)

  self.mobile_guid = attributes[:mobile_guid] if attributes.key?(:mobile_guid)

  self.currency = attributes[:currency] if attributes.key?(:currency)

  if attributes.key?(:_info) && (value = attributes[:_info]).is_a?(Hash)
    self._info = value
  end

  self.initial_description = attributes[:initial_description] if attributes.key?(:initial_description)

  self.initial_internal_analysis = attributes[:initial_internal_analysis] if attributes.key?(:initial_internal_analysis)

  self.initial_resolution = attributes[:initial_resolution] if attributes.key?(:initial_resolution)

  self.contact_email_lookup = attributes[:contact_email_lookup] if attributes.key?(:contact_email_lookup)

  self.process_notifications = attributes[:process_notifications] if attributes.key?(:process_notifications)

  self.skip_callback = attributes[:skip_callback] if attributes.key?(:skip_callback)

  return unless attributes.key?(:custom_fields)
  return unless (value = attributes[:custom_fields]).is_a?(Array)

  self.custom_fields = value
end

Instance Attribute Details

#_infoObject

Returns the value of attribute _info.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def _info
  @_info
end

#actual_hoursObject

Returns the value of attribute actual_hours.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def actual_hours
  @actual_hours
end

#address_line1Object

Max length: 50;



28
29
30
# File 'lib/connect_wise/models/project_ticket.rb', line 28

def address_line1
  @address_line1
end

#address_line2Object

Max length: 50;



31
32
33
# File 'lib/connect_wise/models/project_ticket.rb', line 31

def address_line2
  @address_line2
end

#agreementObject

Returns the value of attribute agreement.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def agreement
  @agreement
end

#allow_all_clients_portal_viewObject

Returns the value of attribute allow_all_clients_portal_view.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def allow_all_clients_portal_view
  @allow_all_clients_portal_view
end

#approvedObject

Returns the value of attribute approved.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def approved
  @approved
end

#automatic_email_ccObject

Max length: 1000;



55
56
57
# File 'lib/connect_wise/models/project_ticket.rb', line 55

def automatic_email_cc
  @automatic_email_cc
end

#automatic_email_cc_flagObject

Returns the value of attribute automatic_email_cc_flag.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def automatic_email_cc_flag
  @automatic_email_cc_flag
end

#automatic_email_contact_flagObject

Returns the value of attribute automatic_email_contact_flag.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def automatic_email_contact_flag
  @automatic_email_contact_flag
end

#automatic_email_resource_flagObject

Returns the value of attribute automatic_email_resource_flag.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def automatic_email_resource_flag
  @automatic_email_resource_flag
end

#bill_expensesObject

Returns the value of attribute bill_expenses.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def bill_expenses
  @bill_expenses
end

#bill_productsObject

Returns the value of attribute bill_products.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def bill_products
  @bill_products
end

#bill_timeObject

Returns the value of attribute bill_time.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def bill_time
  @bill_time
end

#boardObject

Returns the value of attribute board.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def board
  @board
end

#budget_hoursObject

Returns the value of attribute budget_hours.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def budget_hours
  @budget_hours
end

#cityObject

Max length: 50;



34
35
36
# File 'lib/connect_wise/models/project_ticket.rb', line 34

def city
  @city
end

#closed_byObject

Returns the value of attribute closed_by.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def closed_by
  @closed_by
end

#closed_dateObject

Returns the value of attribute closed_date.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def closed_date
  @closed_date
end

#closed_flagObject

Returns the value of attribute closed_flag.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def closed_flag
  @closed_flag
end

#companyObject

Returns the value of attribute company.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def company
  @company
end

#contactObject

Returns the value of attribute contact.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def contact
  @contact
end

#contact_email_addressObject

Max length: 250;



52
53
54
# File 'lib/connect_wise/models/project_ticket.rb', line 52

def contact_email_address
  @contact_email_address
end

#contact_email_lookupObject

Returns the value of attribute contact_email_lookup.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def contact_email_lookup
  @contact_email_lookup
end

#contact_nameObject

Max length: 62;



43
44
45
# File 'lib/connect_wise/models/project_ticket.rb', line 43

def contact_name
  @contact_name
end

#contact_phone_extensionObject

Max length: 15;



49
50
51
# File 'lib/connect_wise/models/project_ticket.rb', line 49

def contact_phone_extension
  @contact_phone_extension
end

#contact_phone_numberObject

Max length: 20;



46
47
48
# File 'lib/connect_wise/models/project_ticket.rb', line 46

def contact_phone_number
  @contact_phone_number
end

#countryObject

Returns the value of attribute country.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def country
  @country
end

#currencyObject

Returns the value of attribute currency.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def currency
  @currency
end

#custom_fieldsObject

Returns the value of attribute custom_fields.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def custom_fields
  @custom_fields
end

#customer_updated_flagObject

Returns the value of attribute customer_updated_flag.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def customer_updated_flag
  @customer_updated_flag
end

#departmentObject

Returns the value of attribute department.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def department
  @department
end

#durationObject

Returns the value of attribute duration.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def duration
  @duration
end

#estimated_start_dateObject

Returns the value of attribute estimated_start_date.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def estimated_start_date
  @estimated_start_date
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def id
  @id
end

#initial_descriptionObject

Only available for POST, will not be returned in the response



58
59
60
# File 'lib/connect_wise/models/project_ticket.rb', line 58

def initial_description
  @initial_description
end

#initial_internal_analysisObject

Only available for POST, will not be returned in the response



61
62
63
# File 'lib/connect_wise/models/project_ticket.rb', line 61

def initial_internal_analysis
  @initial_internal_analysis
end

#initial_resolutionObject

Only available for POST, will not be returned in the response



64
65
66
# File 'lib/connect_wise/models/project_ticket.rb', line 64

def initial_resolution
  @initial_resolution
end

#is_issue_flagObject

Returns the value of attribute is_issue_flag.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def is_issue_flag
  @is_issue_flag
end

#itemObject

Returns the value of attribute item.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def item
  @item
end

#knowledge_base_category_idObject

Returns the value of attribute knowledge_base_category_id.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def knowledge_base_category_id
  @knowledge_base_category_id
end

Returns the value of attribute knowledge_base_link_id.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def knowledge_base_link_id
  @knowledge_base_link_id
end

Returns the value of attribute knowledge_base_link_type.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def knowledge_base_link_type
  @knowledge_base_link_type
end

#knowledge_base_sub_category_idObject

Returns the value of attribute knowledge_base_sub_category_id.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def knowledge_base_sub_category_id
  @knowledge_base_sub_category_id
end

#lag_daysObject

Returns the value of attribute lag_days.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def lag_days
  @lag_days
end

#lag_nonworking_days_flagObject

Returns the value of attribute lag_nonworking_days_flag.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def lag_nonworking_days_flag
  @lag_nonworking_days_flag
end

#locationObject

Returns the value of attribute location.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def location
  @location
end

#mobile_guidObject

Returns the value of attribute mobile_guid.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def mobile_guid
  @mobile_guid
end

#opportunityObject

Returns the value of attribute opportunity.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def opportunity
  @opportunity
end

#ownerObject

Returns the value of attribute owner.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def owner
  @owner
end

#phaseObject

Returns the value of attribute phase.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def phase
  @phase
end

#predecessor_closed_flagObject

Returns the value of attribute predecessor_closed_flag.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def predecessor_closed_flag
  @predecessor_closed_flag
end

#predecessor_idObject

Returns the value of attribute predecessor_id.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def predecessor_id
  @predecessor_id
end

#predecessor_typeObject

Returns the value of attribute predecessor_type.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def predecessor_type
  @predecessor_type
end

#priorityObject

Returns the value of attribute priority.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def priority
  @priority
end

#process_notificationsObject

Can be set to false to skip notification processing when adding or updating a ticket (Defaults to True)



67
68
69
# File 'lib/connect_wise/models/project_ticket.rb', line 67

def process_notifications
  @process_notifications
end

#projectObject

Returns the value of attribute project.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def project
  @project
end

#required_dateObject

Returns the value of attribute required_date.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def required_date
  @required_date
end

#resourcesObject

Returns the value of attribute resources.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def resources
  @resources
end

#service_locationObject

Returns the value of attribute service_location.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def service_location
  @service_location
end

#siteObject

Returns the value of attribute site.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def site
  @site
end

#site_nameObject

Max length: 50;



25
26
27
# File 'lib/connect_wise/models/project_ticket.rb', line 25

def site_name
  @site_name
end

#skip_callbackObject

Returns the value of attribute skip_callback.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def skip_callback
  @skip_callback
end

#sourceObject

Returns the value of attribute source.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def source
  @source
end

#state_identifierObject

Max length: 50;



37
38
39
# File 'lib/connect_wise/models/project_ticket.rb', line 37

def state_identifier
  @state_identifier
end

#statusObject

Returns the value of attribute status.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def status
  @status
end

#sub_billing_amountObject

Returns the value of attribute sub_billing_amount.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def sub_billing_amount
  @sub_billing_amount
end

#sub_billing_methodObject

Returns the value of attribute sub_billing_method.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def sub_billing_method
  @sub_billing_method
end

#sub_date_acceptedObject

Returns the value of attribute sub_date_accepted.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def sub_date_accepted
  @sub_date_accepted
end

#sub_typeObject

Returns the value of attribute sub_type.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def sub_type
  @sub_type
end

#summaryObject

Max length: 100;



17
18
19
# File 'lib/connect_wise/models/project_ticket.rb', line 17

def summary
  @summary
end

#typeObject

Returns the value of attribute type.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def type
  @type
end

#wbs_codeObject

Max length: 50;



22
23
24
# File 'lib/connect_wise/models/project_ticket.rb', line 22

def wbs_code
  @wbs_code
end

#work_roleObject

Returns the value of attribute work_role.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def work_role
  @work_role
end

#work_typeObject

Returns the value of attribute work_type.



19
20
21
# File 'lib/connect_wise/models/project_ticket.rb', line 19

def work_type
  @work_type
end

#zipObject

Max length: 12;



40
41
42
# File 'lib/connect_wise/models/project_ticket.rb', line 40

def zip
  @zip
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



173
174
175
# File 'lib/connect_wise/models/project_ticket.rb', line 173

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



91
92
93
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/connect_wise/models/project_ticket.rb', line 91

def self.attribute_map
  {
    summary: :summary,
    id: :id,
    is_issue_flag: :isIssueFlag,
    board: :board,
    status: :status,
    work_role: :workRole,
    work_type: :workType,
    project: :project,
    phase: :phase,
    wbs_code: :wbsCode,
    company: :company,
    site: :site,
    site_name: :siteName,
    address_line1: :addressLine1,
    address_line2: :addressLine2,
    city: :city,
    state_identifier: :stateIdentifier,
    zip: :zip,
    country: :country,
    contact: :contact,
    contact_name: :contactName,
    contact_phone_number: :contactPhoneNumber,
    contact_phone_extension: :contactPhoneExtension,
    contact_email_address: :contactEmailAddress,
    type: :type,
    sub_type: :subType,
    item: :item,
    owner: :owner,
    priority: :priority,
    service_location: :serviceLocation,
    source: :source,
    required_date: :requiredDate,
    budget_hours: :budgetHours,
    opportunity: :opportunity,
    agreement: :agreement,
    knowledge_base_category_id: :knowledgeBaseCategoryId,
    knowledge_base_sub_category_id: :knowledgeBaseSubCategoryId,
    knowledge_base_link_id: :knowledgeBaseLinkId,
    knowledge_base_link_type: :knowledgeBaseLinkType,
    allow_all_clients_portal_view: :allowAllClientsPortalView,
    customer_updated_flag: :customerUpdatedFlag,
    automatic_email_contact_flag: :automaticEmailContactFlag,
    automatic_email_resource_flag: :automaticEmailResourceFlag,
    automatic_email_cc_flag: :automaticEmailCcFlag,
    automatic_email_cc: :automaticEmailCc,
    closed_date: :closedDate,
    closed_by: :closedBy,
    closed_flag: :closedFlag,
    actual_hours: :actualHours,
    approved: :approved,
    sub_billing_method: :subBillingMethod,
    sub_billing_amount: :subBillingAmount,
    sub_date_accepted: :subDateAccepted,
    resources: :resources,
    bill_time: :billTime,
    bill_expenses: :billExpenses,
    bill_products: :billProducts,
    predecessor_type: :predecessorType,
    predecessor_id: :predecessorId,
    predecessor_closed_flag: :predecessorClosedFlag,
    lag_days: :lagDays,
    lag_nonworking_days_flag: :lagNonworkingDaysFlag,
    estimated_start_date: :estimatedStartDate,
    location: :location,
    department: :department,
    duration: :duration,
    mobile_guid: :mobileGuid,
    currency: :currency,
    _info: :_info,
    initial_description: :initialDescription,
    initial_internal_analysis: :initialInternalAnalysis,
    initial_resolution: :initialResolution,
    contact_email_lookup: :contactEmailLookup,
    process_notifications: :processNotifications,
    skip_callback: :skipCallback,
    custom_fields: :customFields
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash



651
652
653
# File 'lib/connect_wise/models/project_ticket.rb', line 651

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



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
# File 'lib/connect_wise/models/project_ticket.rb', line 260

def self.openapi_nullable
  Set.new(i[
            is_issue_flag
            budget_hours
            knowledge_base_category_id
            knowledge_base_sub_category_id
            knowledge_base_link_id
            knowledge_base_link_type
            allow_all_clients_portal_view
            customer_updated_flag
            automatic_email_contact_flag
            automatic_email_resource_flag
            automatic_email_cc_flag
            closed_flag
            actual_hours
            approved
            sub_billing_method
            sub_billing_amount
            bill_time
            bill_expenses
            bill_products
            predecessor_type
            predecessor_id
            predecessor_closed_flag
            lag_days
            lag_nonworking_days_flag
            duration
            mobile_guid
            process_notifications
            skip_callback
          ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/connect_wise/models/project_ticket.rb', line 178

def self.openapi_types
  {
    summary: :String,
    id: :Integer,
    is_issue_flag: :Boolean,
    board: :BoardReference,
    status: :ServiceStatusReference,
    work_role: :WorkRoleReference,
    work_type: :WorkTypeReference,
    project: :ProjectReference,
    phase: :ProjectPhaseReference,
    wbs_code: :String,
    company: :CompanyReference,
    site: :SiteReference,
    site_name: :String,
    address_line1: :String,
    address_line2: :String,
    city: :String,
    state_identifier: :String,
    zip: :String,
    country: :CountryReference,
    contact: :ContactReference,
    contact_name: :String,
    contact_phone_number: :String,
    contact_phone_extension: :String,
    contact_email_address: :String,
    type: :ServiceTypeReference,
    sub_type: :ServiceSubTypeReference,
    item: :ServiceItemReference,
    owner: :MemberReference,
    priority: :PriorityReference,
    service_location: :ServiceLocationReference,
    source: :ServiceSourceReference,
    required_date: :Time,
    budget_hours: :Float,
    opportunity: :OpportunityReference,
    agreement: :AgreementReference,
    knowledge_base_category_id: :Integer,
    knowledge_base_sub_category_id: :Integer,
    knowledge_base_link_id: :Integer,
    knowledge_base_link_type: :String,
    allow_all_clients_portal_view: :Boolean,
    customer_updated_flag: :Boolean,
    automatic_email_contact_flag: :Boolean,
    automatic_email_resource_flag: :Boolean,
    automatic_email_cc_flag: :Boolean,
    automatic_email_cc: :String,
    closed_date: :String,
    closed_by: :String,
    closed_flag: :Boolean,
    actual_hours: :Float,
    approved: :Boolean,
    sub_billing_method: :String,
    sub_billing_amount: :Float,
    sub_date_accepted: :String,
    resources: :String,
    bill_time: :String,
    bill_expenses: :String,
    bill_products: :String,
    predecessor_type: :String,
    predecessor_id: :Integer,
    predecessor_closed_flag: :Boolean,
    lag_days: :Integer,
    lag_nonworking_days_flag: :Boolean,
    estimated_start_date: :Time,
    location: :SystemLocationReference,
    department: :SystemDepartmentReference,
    duration: :Integer,
    mobile_guid: :String,
    currency: :CurrencyReference,
    _info: :'Hash<String, String>',
    initial_description: :String,
    initial_internal_analysis: :String,
    initial_resolution: :String,
    contact_email_lookup: :String,
    process_notifications: :Boolean,
    skip_callback: :Boolean,
    custom_fields: :'Array<CustomFieldValue>'
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.



554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
# File 'lib/connect_wise/models/project_ticket.rb', line 554

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    summary == other.summary &&
    id == other.id &&
    is_issue_flag == other.is_issue_flag &&
    board == other.board &&
    status == other.status &&
    work_role == other.work_role &&
    work_type == other.work_type &&
    project == other.project &&
    phase == other.phase &&
    wbs_code == other.wbs_code &&
    company == other.company &&
    site == other.site &&
    site_name == other.site_name &&
    address_line1 == other.address_line1 &&
    address_line2 == other.address_line2 &&
    city == other.city &&
    state_identifier == other.state_identifier &&
    zip == other.zip &&
    country == other.country &&
    contact == other.contact &&
    contact_name == other.contact_name &&
    contact_phone_number == other.contact_phone_number &&
    contact_phone_extension == other.contact_phone_extension &&
    contact_email_address == other.contact_email_address &&
    type == other.type &&
    sub_type == other.sub_type &&
    item == other.item &&
    owner == other.owner &&
    priority == other.priority &&
    service_location == other.service_location &&
    source == other.source &&
    required_date == other.required_date &&
    budget_hours == other.budget_hours &&
    opportunity == other.opportunity &&
    agreement == other.agreement &&
    knowledge_base_category_id == other.knowledge_base_category_id &&
    knowledge_base_sub_category_id == other.knowledge_base_sub_category_id &&
    knowledge_base_link_id == other.knowledge_base_link_id &&
    knowledge_base_link_type == other.knowledge_base_link_type &&
    allow_all_clients_portal_view == other.allow_all_clients_portal_view &&
    customer_updated_flag == other.customer_updated_flag &&
    automatic_email_contact_flag == other.automatic_email_contact_flag &&
    automatic_email_resource_flag == other.automatic_email_resource_flag &&
    automatic_email_cc_flag == other.automatic_email_cc_flag &&
    automatic_email_cc == other.automatic_email_cc &&
    closed_date == other.closed_date &&
    closed_by == other.closed_by &&
    closed_flag == other.closed_flag &&
    actual_hours == other.actual_hours &&
    approved == other.approved &&
    sub_billing_method == other.sub_billing_method &&
    sub_billing_amount == other.sub_billing_amount &&
    sub_date_accepted == other.sub_date_accepted &&
    resources == other.resources &&
    bill_time == other.bill_time &&
    bill_expenses == other.bill_expenses &&
    bill_products == other.bill_products &&
    predecessor_type == other.predecessor_type &&
    predecessor_id == other.predecessor_id &&
    predecessor_closed_flag == other.predecessor_closed_flag &&
    lag_days == other.lag_days &&
    lag_nonworking_days_flag == other.lag_nonworking_days_flag &&
    estimated_start_date == other.estimated_start_date &&
    location == other.location &&
    department == other.department &&
    duration == other.duration &&
    mobile_guid == other.mobile_guid &&
    currency == other.currency &&
    _info == other._info &&
    initial_description == other.initial_description &&
    initial_internal_analysis == other.initial_internal_analysis &&
    initial_resolution == other.initial_resolution &&
    contact_email_lookup == other.contact_email_lookup &&
    process_notifications == other.process_notifications &&
    skip_callback == other.skip_callback &&
    custom_fields == other.custom_fields
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type



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
708
709
710
711
712
713
714
715
716
717
718
# File 'lib/connect_wise/models/project_ticket.rb', line 681

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



752
753
754
755
756
757
758
759
760
761
762
763
764
# File 'lib/connect_wise/models/project_ticket.rb', line 752

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



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'lib/connect_wise/models/project_ticket.rb', line 658

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

See Also:

  • `==` method


638
639
640
# File 'lib/connect_wise/models/project_ticket.rb', line 638

def eql?(other)
  self == other
end

#hashInteger

Calculates hash code according to all attributes.



644
645
646
# File 'lib/connect_wise/models/project_ticket.rb', line 644

def hash
  [summary, id, is_issue_flag, board, status, work_role, work_type, project, phase, wbs_code, company, site, site_name, address_line1, address_line2, city, state_identifier, zip, country, contact, contact_name, contact_phone_number, contact_phone_extension, contact_email_address, type, sub_type, item, owner, priority, service_location, source, required_date, budget_hours, opportunity, agreement, knowledge_base_category_id, knowledge_base_sub_category_id, knowledge_base_link_id, knowledge_base_link_type, allow_all_clients_portal_view, customer_updated_flag, automatic_email_contact_flag, automatic_email_resource_flag, automatic_email_cc_flag, automatic_email_cc, closed_date, closed_by, closed_flag, actual_hours, approved, sub_billing_method, sub_billing_amount, sub_date_accepted, resources, bill_time, bill_expenses, bill_products, predecessor_type, predecessor_id, predecessor_closed_flag, lag_days, lag_nonworking_days_flag, estimated_start_date, location, department, duration, mobile_guid, currency, _info, initial_description, initial_internal_analysis, initial_resolution, contact_email_lookup, process_notifications, skip_callback, custom_fields].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?



465
466
467
468
469
470
# File 'lib/connect_wise/models/project_ticket.rb', line 465

def list_invalid_properties
  invalid_properties = []
  invalid_properties.push('invalid value for "summary", summary cannot be nil.') if @summary.nil?

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)



728
729
730
# File 'lib/connect_wise/models/project_ticket.rb', line 728

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash



734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'lib/connect_wise/models/project_ticket.rb', line 734

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_sString

Returns the string representation of the object



722
723
724
# File 'lib/connect_wise/models/project_ticket.rb', line 722

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid



474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/connect_wise/models/project_ticket.rb', line 474

def valid?
  return false if @summary.nil?

  knowledge_base_link_type_validator = EnumAttributeValidator.new('String', %w[Activity ProjectIssue KnowledgeBaseArticle ProjectTicket ServiceTicket Time])
  return false unless knowledge_base_link_type_validator.valid?(@knowledge_base_link_type)

  sub_billing_method_validator = EnumAttributeValidator.new('String', %w[ActualRates FixedFee NotToExceed OverrideRate])
  return false unless sub_billing_method_validator.valid?(@sub_billing_method)

  bill_time_validator = EnumAttributeValidator.new('String', %w[Billable DoNotBill NoCharge NoDefault])
  return false unless bill_time_validator.valid?(@bill_time)

  bill_expenses_validator = EnumAttributeValidator.new('String', %w[Billable DoNotBill NoCharge NoDefault])
  return false unless bill_expenses_validator.valid?(@bill_expenses)

  bill_products_validator = EnumAttributeValidator.new('String', %w[Billable DoNotBill NoCharge NoDefault])
  return false unless bill_products_validator.valid?(@bill_products)

  predecessor_type_validator = EnumAttributeValidator.new('String', %w[Ticket Phase])
  return false unless predecessor_type_validator.valid?(@predecessor_type)

  true
end