Class: ConnectWise::CustomReport

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

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CustomReport

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Raises:

  • (ArgumentError)


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  return unless attributes.key?(:_info)
  return unless (value = attributes[:_info]).is_a?(Hash)

  self._info = value
end

Instance Attribute Details

#_infoObject

Returns the value of attribute _info.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def _info
  @_info
end

#_moduleObject

The Module Name



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

def _module
  @_module
end

#agreement_flagObject

Returns the value of attribute agreement_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def agreement_flag
  @agreement_flag
end

#agreement_overrideObject

Returns the value of attribute agreement_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def agreement_override
  @agreement_override
end

#agreement_param_idObject

Parameter unique identifier for the Custom Report’s Agreement parameter



82
83
84
# File 'lib/connect_wise/models/custom_report.rb', line 82

def agreement_param_id
  @agreement_param_id
end

#agreement_type_flagObject

Returns the value of attribute agreement_type_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def agreement_type_flag
  @agreement_type_flag
end

#agreement_type_overrideObject

Returns the value of attribute agreement_type_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def agreement_type_override
  @agreement_type_override
end

#agreement_type_param_idObject

Parameter unique identifier for the Custom Report’s Agreement Type parameter



79
80
81
# File 'lib/connect_wise/models/custom_report.rb', line 79

def agreement_type_param_id
  @agreement_type_param_id
end

#company_flagObject

Returns the value of attribute company_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def company_flag
  @company_flag
end

#company_overrideObject

Returns the value of attribute company_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def company_override
  @company_override
end

#company_param_idObject

Parameter unique identifier for the Custom Report’s Company parameter



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

def company_param_id
  @company_param_id
end

#department_default_flagObject

Returns the value of attribute department_default_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def department_default_flag
  @department_default_flag
end

#department_flagObject

Returns the value of attribute department_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def department_flag
  @department_flag
end

#department_overrideObject

Returns the value of attribute department_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def department_override
  @department_override
end

#department_param_idObject

Parameter unique identifier for the Custom Report’s Department parameter



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

def department_param_id
  @department_param_id
end

#descriptionObject

Max length: 150;



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

def description
  @description
end

#end_date_flagObject

Returns the value of attribute end_date_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def end_date_flag
  @end_date_flag
end

#end_date_overrideObject

Returns the value of attribute end_date_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def end_date_override
  @end_date_override
end

#end_date_param_idObject

Parameter unique identifier for the Custom Report’s End Date parameter



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

def end_date_param_id
  @end_date_param_id
end

#generated_flagObject

Returns the value of attribute generated_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def generated_flag
  @generated_flag
end

#idObject

Returns the value of attribute id.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def id
  @id
end

#invoice_flagObject

Returns the value of attribute invoice_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def invoice_flag
  @invoice_flag
end

#invoice_overrideObject

Returns the value of attribute invoice_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def invoice_override
  @invoice_override
end

#invoice_param_idObject

Parameter unique identifier for the Custom Report’s Invoice Type parameter



97
98
99
# File 'lib/connect_wise/models/custom_report.rb', line 97

def invoice_param_id
  @invoice_param_id
end

#location_default_flagObject

Returns the value of attribute location_default_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def location_default_flag
  @location_default_flag
end

#location_flagObject

Returns the value of attribute location_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def location_flag
  @location_flag
end

#location_overrideObject

Returns the value of attribute location_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def location_override
  @location_override
end

#location_param_idObject

Parameter unique identifier for the Custom Report’s Location parameter



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

def location_param_id
  @location_param_id
end

#marketing_campaign_flagObject

Returns the value of attribute marketing_campaign_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def marketing_campaign_flag
  @marketing_campaign_flag
end

#marketing_campaign_overrideObject

Returns the value of attribute marketing_campaign_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def marketing_campaign_override
  @marketing_campaign_override
end

#marketing_campaign_param_idObject

Parameter unique identifier for the Custom Report’s Marketing Campaign parameter



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

def marketing_campaign_param_id
  @marketing_campaign_param_id
end

#member_flagObject

Returns the value of attribute member_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def member_flag
  @member_flag
end

#member_overrideObject

Returns the value of attribute member_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def member_override
  @member_override
end

#member_param_idObject

Parameter unique identifier for the Custom Report’s Member parameter



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

def member_param_id
  @member_param_id
end

#nameObject

Max length: 100;



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

def name
  @name
end

#opp_type_flagObject

Returns the value of attribute opp_type_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def opp_type_flag
  @opp_type_flag
end

#opp_type_overrideObject

Returns the value of attribute opp_type_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def opp_type_override
  @opp_type_override
end

#opp_type_param_idObject

Parameter unique identifier for the Custom Report’s Opportunity Type parameter



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

def opp_type_param_id
  @opp_type_param_id
end

#opportunity_flagObject

Returns the value of attribute opportunity_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def opportunity_flag
  @opportunity_flag
end

#opportunity_overrideObject

Returns the value of attribute opportunity_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def opportunity_override
  @opportunity_override
end

#opportunity_param_idObject

Parameter unique identifier for the Custom Report’s Opportunity parameter



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

def opportunity_param_id
  @opportunity_param_id
end

#parameter_name_separatorObject

Max length: 50;



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

def parameter_name_separator
  @parameter_name_separator
end

#parameter_prefixObject

Max length: 50;



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

def parameter_prefix
  @parameter_prefix
end

#parameter_separatorObject

Max length: 50;



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

def parameter_separator
  @parameter_separator
end

#parameter_suffixObject

Max length: 50;



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

def parameter_suffix
  @parameter_suffix
end

#project_flagObject

Returns the value of attribute project_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def project_flag
  @project_flag
end

#project_overrideObject

Returns the value of attribute project_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def project_override
  @project_override
end

#project_param_idObject

Parameter unique identifier for the Custom Report’s Project parameter



88
89
90
# File 'lib/connect_wise/models/custom_report.rb', line 88

def project_param_id
  @project_param_id
end

#project_type_flagObject

Returns the value of attribute project_type_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def project_type_flag
  @project_type_flag
end

#project_type_overrideObject

Returns the value of attribute project_type_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def project_type_override
  @project_type_override
end

#project_type_param_idObject

Parameter unique identifier for the Custom Report’s Project Type parameter



85
86
87
# File 'lib/connect_wise/models/custom_report.rb', line 85

def project_type_param_id
  @project_type_param_id
end

Returns the value of attribute report_link.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def report_link
  @report_link
end

#service_board_default_flagObject

Returns the value of attribute service_board_default_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def service_board_default_flag
  @service_board_default_flag
end

#service_board_flagObject

Returns the value of attribute service_board_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def service_board_flag
  @service_board_flag
end

#service_board_overrideObject

Returns the value of attribute service_board_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def service_board_override
  @service_board_override
end

#service_board_param_idObject

Parameter unique identifier for the Custom Report’s Service Board parameter



70
71
72
# File 'lib/connect_wise/models/custom_report.rb', line 70

def service_board_param_id
  @service_board_param_id
end

#service_status_flagObject

Returns the value of attribute service_status_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def service_status_flag
  @service_status_flag
end

#service_status_overrideObject

Returns the value of attribute service_status_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def service_status_override
  @service_status_override
end

#service_status_param_idObject

Parameter unique identifier for the Custom Report’s Service Status parameter



76
77
78
# File 'lib/connect_wise/models/custom_report.rb', line 76

def service_status_param_id
  @service_status_param_id
end

#service_type_flagObject

Returns the value of attribute service_type_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def service_type_flag
  @service_type_flag
end

#service_type_overrideObject

Returns the value of attribute service_type_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def service_type_override
  @service_type_override
end

#service_type_param_idObject

Parameter unique identifier for the Custom Report’s Service Type parameter



73
74
75
# File 'lib/connect_wise/models/custom_report.rb', line 73

def service_type_param_id
  @service_type_param_id
end

#start_date_flagObject

Returns the value of attribute start_date_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def start_date_flag
  @start_date_flag
end

#start_date_overrideObject

Returns the value of attribute start_date_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def start_date_override
  @start_date_override
end

#start_date_param_idObject

Parameter unique identifier for the Custom Report’s Start Date parameter



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

def start_date_param_id
  @start_date_param_id
end

#territory_default_flagObject

Returns the value of attribute territory_default_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def territory_default_flag
  @territory_default_flag
end

#territory_flagObject

Returns the value of attribute territory_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def territory_flag
  @territory_flag
end

#territory_overrideObject

Returns the value of attribute territory_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def territory_override
  @territory_override
end

#territory_param_idObject

Parameter unique identifier for the Custom Report’s Terriroty parameter



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

def territory_param_id
  @territory_param_id
end

#work_role_flagObject

Returns the value of attribute work_role_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def work_role_flag
  @work_role_flag
end

#work_role_overrideObject

Returns the value of attribute work_role_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def work_role_override
  @work_role_override
end

#work_role_param_idObject

Parameter unique identifier for the Custom Report’s Work Role parameter



91
92
93
# File 'lib/connect_wise/models/custom_report.rb', line 91

def work_role_param_id
  @work_role_param_id
end

#work_type_flagObject

Returns the value of attribute work_type_flag.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def work_type_flag
  @work_type_flag
end

#work_type_overrideObject

Returns the value of attribute work_type_override.



16
17
18
# File 'lib/connect_wise/models/custom_report.rb', line 16

def work_type_override
  @work_type_override
end

#work_type_param_idObject

Parameter unique identifier for the Custom Report’s Work Type parameter



94
95
96
# File 'lib/connect_wise/models/custom_report.rb', line 94

def work_type_param_id
  @work_type_param_id
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



202
203
204
# File 'lib/connect_wise/models/custom_report.rb', line 202

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/connect_wise/models/custom_report.rb', line 121

def self.attribute_map
  {
    report_link: :reportLink,
    name: :name,
    _module: :module,
    description: :description,
    id: :id,
    generated_flag: :generatedFlag,
    parameter_prefix: :parameterPrefix,
    parameter_separator: :parameterSeparator,
    parameter_name_separator: :parameterNameSeparator,
    parameter_suffix: :parameterSuffix,
    location_flag: :locationFlag,
    location_param_id: :locationParamId,
    location_default_flag: :locationDefaultFlag,
    location_override: :locationOverride,
    department_flag: :departmentFlag,
    department_param_id: :departmentParamId,
    department_default_flag: :departmentDefaultFlag,
    department_override: :departmentOverride,
    territory_flag: :territoryFlag,
    territory_param_id: :territoryParamId,
    territory_default_flag: :territoryDefaultFlag,
    territory_override: :territoryOverride,
    company_flag: :companyFlag,
    company_param_id: :companyParamId,
    company_override: :companyOverride,
    member_flag: :memberFlag,
    member_param_id: :memberParamId,
    member_override: :memberOverride,
    start_date_flag: :startDateFlag,
    start_date_param_id: :startDateParamId,
    start_date_override: :startDateOverride,
    end_date_flag: :endDateFlag,
    end_date_param_id: :endDateParamId,
    end_date_override: :endDateOverride,
    opp_type_flag: :oppTypeFlag,
    opp_type_param_id: :oppTypeParamId,
    opp_type_override: :oppTypeOverride,
    opportunity_flag: :opportunityFlag,
    opportunity_param_id: :opportunityParamId,
    opportunity_override: :opportunityOverride,
    marketing_campaign_flag: :marketingCampaignFlag,
    marketing_campaign_param_id: :marketingCampaignParamId,
    marketing_campaign_override: :marketingCampaignOverride,
    service_board_flag: :serviceBoardFlag,
    service_board_param_id: :serviceBoardParamId,
    service_board_default_flag: :serviceBoardDefaultFlag,
    service_board_override: :serviceBoardOverride,
    service_type_flag: :serviceTypeFlag,
    service_type_param_id: :serviceTypeParamId,
    service_type_override: :serviceTypeOverride,
    service_status_flag: :serviceStatusFlag,
    service_status_param_id: :serviceStatusParamId,
    service_status_override: :serviceStatusOverride,
    agreement_type_flag: :agreementTypeFlag,
    agreement_type_param_id: :agreementTypeParamId,
    agreement_type_override: :agreementTypeOverride,
    agreement_flag: :agreementFlag,
    agreement_param_id: :agreementParamId,
    agreement_override: :agreementOverride,
    project_type_flag: :projectTypeFlag,
    project_type_param_id: :projectTypeParamId,
    project_type_override: :projectTypeOverride,
    project_flag: :projectFlag,
    project_param_id: :projectParamId,
    project_override: :projectOverride,
    work_role_flag: :workRoleFlag,
    work_role_param_id: :workRoleParamId,
    work_role_override: :workRoleOverride,
    work_type_flag: :workTypeFlag,
    work_type_param_id: :workTypeParamId,
    work_type_override: :workTypeOverride,
    invoice_flag: :invoiceFlag,
    invoice_param_id: :invoiceParamId,
    invoice_override: :invoiceOverride,
    _info: :_info
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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

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

.openapi_nullableObject

List of attributes with nullable: true



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

def self.openapi_nullable
  Set.new(%i[
            _module
            generated_flag
            location_flag
            location_param_id
            location_default_flag
            department_flag
            department_param_id
            department_default_flag
            territory_flag
            territory_param_id
            territory_default_flag
            company_flag
            company_param_id
            member_flag
            member_param_id
            start_date_flag
            start_date_param_id
            end_date_flag
            end_date_param_id
            opp_type_flag
            opp_type_param_id
            opportunity_flag
            opportunity_param_id
            marketing_campaign_flag
            marketing_campaign_param_id
            service_board_flag
            service_board_param_id
            service_board_default_flag
            service_type_flag
            service_type_param_id
            service_status_flag
            service_status_param_id
            agreement_type_flag
            agreement_type_param_id
            agreement_flag
            agreement_param_id
            project_type_flag
            project_type_param_id
            project_flag
            project_param_id
            work_role_flag
            work_role_param_id
            work_type_flag
            work_type_param_id
            invoice_flag
            invoice_param_id
          ])
end

.openapi_typesObject

Attribute type mapping.



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/connect_wise/models/custom_report.rb', line 207

def self.openapi_types
  {
    report_link: :String,
    name: :String,
    _module: :String,
    description: :String,
    id: :Integer,
    generated_flag: :Boolean,
    parameter_prefix: :String,
    parameter_separator: :String,
    parameter_name_separator: :String,
    parameter_suffix: :String,
    location_flag: :Boolean,
    location_param_id: :Integer,
    location_default_flag: :Boolean,
    location_override: :String,
    department_flag: :Boolean,
    department_param_id: :Integer,
    department_default_flag: :Boolean,
    department_override: :String,
    territory_flag: :Boolean,
    territory_param_id: :Integer,
    territory_default_flag: :Boolean,
    territory_override: :String,
    company_flag: :Boolean,
    company_param_id: :Integer,
    company_override: :String,
    member_flag: :Boolean,
    member_param_id: :Integer,
    member_override: :String,
    start_date_flag: :Boolean,
    start_date_param_id: :Integer,
    start_date_override: :String,
    end_date_flag: :Boolean,
    end_date_param_id: :Integer,
    end_date_override: :String,
    opp_type_flag: :Boolean,
    opp_type_param_id: :Integer,
    opp_type_override: :String,
    opportunity_flag: :Boolean,
    opportunity_param_id: :Integer,
    opportunity_override: :String,
    marketing_campaign_flag: :Boolean,
    marketing_campaign_param_id: :Integer,
    marketing_campaign_override: :String,
    service_board_flag: :Boolean,
    service_board_param_id: :Integer,
    service_board_default_flag: :Boolean,
    service_board_override: :String,
    service_type_flag: :Boolean,
    service_type_param_id: :Integer,
    service_type_override: :String,
    service_status_flag: :Boolean,
    service_status_param_id: :Integer,
    service_status_override: :String,
    agreement_type_flag: :Boolean,
    agreement_type_param_id: :Integer,
    agreement_type_override: :String,
    agreement_flag: :Boolean,
    agreement_param_id: :Integer,
    agreement_override: :String,
    project_type_flag: :Boolean,
    project_type_param_id: :Integer,
    project_type_override: :String,
    project_flag: :Boolean,
    project_param_id: :Integer,
    project_override: :String,
    work_role_flag: :Boolean,
    work_role_param_id: :Integer,
    work_role_override: :String,
    work_type_flag: :Boolean,
    work_type_param_id: :Integer,
    work_type_override: :String,
    invoice_flag: :Boolean,
    invoice_param_id: :Integer,
    invoice_override: :String,
    _info: :'Hash<String, String>'
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



542
543
544
545
546
547
548
549
550
551
552
553
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
# File 'lib/connect_wise/models/custom_report.rb', line 542

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

  self.class == other.class &&
    report_link == other.report_link &&
    name == other.name &&
    _module == other._module &&
    description == other.description &&
    id == other.id &&
    generated_flag == other.generated_flag &&
    parameter_prefix == other.parameter_prefix &&
    parameter_separator == other.parameter_separator &&
    parameter_name_separator == other.parameter_name_separator &&
    parameter_suffix == other.parameter_suffix &&
    location_flag == other.location_flag &&
    location_param_id == other.location_param_id &&
    location_default_flag == other.location_default_flag &&
    location_override == other.location_override &&
    department_flag == other.department_flag &&
    department_param_id == other.department_param_id &&
    department_default_flag == other.department_default_flag &&
    department_override == other.department_override &&
    territory_flag == other.territory_flag &&
    territory_param_id == other.territory_param_id &&
    territory_default_flag == other.territory_default_flag &&
    territory_override == other.territory_override &&
    company_flag == other.company_flag &&
    company_param_id == other.company_param_id &&
    company_override == other.company_override &&
    member_flag == other.member_flag &&
    member_param_id == other.member_param_id &&
    member_override == other.member_override &&
    start_date_flag == other.start_date_flag &&
    start_date_param_id == other.start_date_param_id &&
    start_date_override == other.start_date_override &&
    end_date_flag == other.end_date_flag &&
    end_date_param_id == other.end_date_param_id &&
    end_date_override == other.end_date_override &&
    opp_type_flag == other.opp_type_flag &&
    opp_type_param_id == other.opp_type_param_id &&
    opp_type_override == other.opp_type_override &&
    opportunity_flag == other.opportunity_flag &&
    opportunity_param_id == other.opportunity_param_id &&
    opportunity_override == other.opportunity_override &&
    marketing_campaign_flag == other.marketing_campaign_flag &&
    marketing_campaign_param_id == other.marketing_campaign_param_id &&
    marketing_campaign_override == other.marketing_campaign_override &&
    service_board_flag == other.service_board_flag &&
    service_board_param_id == other.service_board_param_id &&
    service_board_default_flag == other.service_board_default_flag &&
    service_board_override == other.service_board_override &&
    service_type_flag == other.service_type_flag &&
    service_type_param_id == other.service_type_param_id &&
    service_type_override == other.service_type_override &&
    service_status_flag == other.service_status_flag &&
    service_status_param_id == other.service_status_param_id &&
    service_status_override == other.service_status_override &&
    agreement_type_flag == other.agreement_type_flag &&
    agreement_type_param_id == other.agreement_type_param_id &&
    agreement_type_override == other.agreement_type_override &&
    agreement_flag == other.agreement_flag &&
    agreement_param_id == other.agreement_param_id &&
    agreement_override == other.agreement_override &&
    project_type_flag == other.project_type_flag &&
    project_type_param_id == other.project_type_param_id &&
    project_type_override == other.project_type_override &&
    project_flag == other.project_flag &&
    project_param_id == other.project_param_id &&
    project_override == other.project_override &&
    work_role_flag == other.work_role_flag &&
    work_role_param_id == other.work_role_param_id &&
    work_role_override == other.work_role_override &&
    work_type_flag == other.work_type_flag &&
    work_type_param_id == other.work_type_param_id &&
    work_type_override == other.work_type_override &&
    invoice_flag == other.invoice_flag &&
    invoice_param_id == other.invoice_param_id &&
    invoice_override == other.invoice_override &&
    _info == other._info
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/connect_wise/models/custom_report.rb', line 739

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
# File 'lib/connect_wise/models/custom_report.rb', line 645

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


625
626
627
# File 'lib/connect_wise/models/custom_report.rb', line 625

def eql?(other)
  self == other
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



631
632
633
# File 'lib/connect_wise/models/custom_report.rb', line 631

def hash
  [report_link, name, _module, description, id, generated_flag, parameter_prefix, parameter_separator, parameter_name_separator, parameter_suffix, location_flag, location_param_id, location_default_flag, location_override, department_flag, department_param_id, department_default_flag, department_override, territory_flag, territory_param_id, territory_default_flag, territory_override, company_flag, company_param_id, company_override, member_flag, member_param_id, member_override, start_date_flag, start_date_param_id, start_date_override, end_date_flag, end_date_param_id, end_date_override, opp_type_flag, opp_type_param_id, opp_type_override, opportunity_flag, opportunity_param_id, opportunity_override, marketing_campaign_flag, marketing_campaign_param_id, marketing_campaign_override, service_board_flag, service_board_param_id, service_board_default_flag, service_board_override, service_type_flag, service_type_param_id, service_type_override, service_status_flag, service_status_param_id, service_status_override, agreement_type_flag, agreement_type_param_id, agreement_type_override, agreement_flag, agreement_param_id, agreement_override, project_type_flag, project_type_param_id, project_type_override, project_flag, project_param_id, project_override, work_role_flag, work_role_param_id, work_role_override, work_type_flag, work_type_param_id, work_type_override, invoice_flag, invoice_param_id, invoice_override, _info].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



507
508
509
510
511
512
513
514
515
516
# File 'lib/connect_wise/models/custom_report.rb', line 507

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

  invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil?

  invalid_properties.push('invalid value for "description", description cannot be nil.') if @description.nil?

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



715
716
717
# File 'lib/connect_wise/models/custom_report.rb', line 715

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



721
722
723
724
725
726
727
728
729
730
731
732
733
# File 'lib/connect_wise/models/custom_report.rb', line 721

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

Returns:

  • (String)

    String presentation of the object



709
710
711
# File 'lib/connect_wise/models/custom_report.rb', line 709

def to_s
  to_hash.to_s
end

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



520
521
522
523
524
525
526
527
528
529
# File 'lib/connect_wise/models/custom_report.rb', line 520

def valid?
  return false if @report_link.nil?
  return false if @name.nil?

  _module_validator = EnumAttributeValidator.new('String', %w[Companies Finance Marketing Procurement Project Sales ServiceDesk TimeExpense])
  return false unless _module_validator.valid?(@_module)
  return false if @description.nil?

  true
end