Class: ConnectWise::ServiceSignoff

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

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ServiceSignoff

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Raises:

  • (ArgumentError)


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  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.



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

def _info
  @_info
end

#billing_methods_textObject

Max length: 2000;



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

def billing_methods_text
  @billing_methods_text
end

#billing_methods_text_flagObject

On add/post, if billingMethodsText.Length > 0, this is set to true



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

def billing_methods_text_flag
  @billing_methods_text_flag
end

#billing_terms_flagObject

Returns the value of attribute billing_terms_flag.



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

def billing_terms_flag
  @billing_terms_flag
end

#company_info_flagObject

Returns the value of attribute company_info_flag.



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

def company_info_flag
  @company_info_flag
end

#configurations_flagObject

Returns the value of attribute configurations_flag.



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

def configurations_flag
  @configurations_flag
end

#credit_card_fields_flagObject

Returns the value of attribute credit_card_fields_flag.



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

def credit_card_fields_flag
  @credit_card_fields_flag
end

#customer_signoff_fields_flagObject

Returns the value of attribute customer_signoff_fields_flag.



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

def customer_signoff_fields_flag
  @customer_signoff_fields_flag
end

#customer_signoff_textObject

Max length: 4000;



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

def customer_signoff_text
  @customer_signoff_text
end

#customer_signoff_text_flagObject

On add/post, if customerSignoffText.Length > 0, this is set to true



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

def customer_signoff_text_flag
  @customer_signoff_text_flag
end

#default_ff_flagObject

Returns the value of attribute default_ff_flag.



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

def default_ff_flag
  @default_ff_flag
end

#default_flagObject

Returns the value of attribute default_flag.



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

def default_flag
  @default_flag
end

#discussion_flagObject

Returns the value of attribute discussion_flag.



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

def discussion_flag
  @discussion_flag
end

#expense_agreement_flagObject

Returns the value of attribute expense_agreement_flag.



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

def expense_agreement_flag
  @expense_agreement_flag
end

#expense_amount_flagObject

Returns the value of attribute expense_amount_flag.



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

def expense_amount_flag
  @expense_amount_flag
end

#expense_bill_flagObject

Returns the value of attribute expense_bill_flag.



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

def expense_bill_flag
  @expense_bill_flag
end

#expense_date_flagObject

Returns the value of attribute expense_date_flag.



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

def expense_date_flag
  @expense_date_flag
end

#expense_flagObject

On add/post, if any expense related flag is set to true, this is also set to true



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

def expense_flag
  @expense_flag
end

#expense_manual_entryObject

Returns the value of attribute expense_manual_entry.



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

def expense_manual_entry
  @expense_manual_entry
end

#expense_manual_flagObject

Returns the value of attribute expense_manual_flag.



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

def expense_manual_flag
  @expense_manual_flag
end

#expense_member_flagObject

Returns the value of attribute expense_member_flag.



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

def expense_member_flag
  @expense_member_flag
end

#expense_notes_flagObject

Returns the value of attribute expense_notes_flag.



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

def expense_notes_flag
  @expense_notes_flag
end

#expense_tax_flagObject

Returns the value of attribute expense_tax_flag.



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

def expense_tax_flag
  @expense_tax_flag
end

#expense_type_flagObject

Returns the value of attribute expense_type_flag.



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

def expense_type_flag
  @expense_type_flag
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#internal_notes_flagObject

Returns the value of attribute internal_notes_flag.



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

def internal_notes_flag
  @internal_notes_flag
end

#nameObject

Max length: 50;



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

def name
  @name
end

#product_agreement_flagObject

Returns the value of attribute product_agreement_flag.



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

def product_agreement_flag
  @product_agreement_flag
end

#product_bill_flagObject

Returns the value of attribute product_bill_flag.



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

def product_bill_flag
  @product_bill_flag
end

#product_description_flagObject

Returns the value of attribute product_description_flag.



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

def product_description_flag
  @product_description_flag
end

#product_extended_amount_flagObject

Returns the value of attribute product_extended_amount_flag.



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

def product_extended_amount_flag
  @product_extended_amount_flag
end

#product_flagObject

On add/post, if any product related flag is set to true, this is also set to true



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

def product_flag
  @product_flag
end

#product_manual_entryObject

Returns the value of attribute product_manual_entry.



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

def product_manual_entry
  @product_manual_entry
end

#product_manual_flagObject

Returns the value of attribute product_manual_flag.



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

def product_manual_flag
  @product_manual_flag
end

#product_price_flagObject

Returns the value of attribute product_price_flag.



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

def product_price_flag
  @product_price_flag
end

#product_quantity_flagObject

Returns the value of attribute product_quantity_flag.



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

def product_quantity_flag
  @product_quantity_flag
end

#product_tax_flagObject

Returns the value of attribute product_tax_flag.



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

def product_tax_flag
  @product_tax_flag
end

#resolution_flagObject

Returns the value of attribute resolution_flag.



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

def resolution_flag
  @resolution_flag
end

#summary_flagObject

Returns the value of attribute summary_flag.



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

def summary_flag
  @summary_flag
end

#taskObject

On add/post, if this is set but no value is set for taskFlag, taskFlag is set to true



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

def task
  @task
end

#task_flagObject

On add/post, if this is set to true but no value is set for task, task is defaulted to ServiceTasks.All



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

def task_flag
  @task_flag
end

#technician_signoff_flagObject

Returns the value of attribute technician_signoff_flag.



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

def technician_signoff_flag
  @technician_signoff_flag
end

#time_agreement_flagObject

Returns the value of attribute time_agreement_flag.



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

def time_agreement_flag
  @time_agreement_flag
end

#time_bill_flagObject

Returns the value of attribute time_bill_flag.



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

def time_bill_flag
  @time_bill_flag
end

#time_date_flagObject

Returns the value of attribute time_date_flag.



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

def time_date_flag
  @time_date_flag
end

#time_extended_amount_flagObject

Returns the value of attribute time_extended_amount_flag.



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

def time_extended_amount_flag
  @time_extended_amount_flag
end

#time_flagObject

On add/post, if any time related flag is set to true, this is also set to true



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

def time_flag
  @time_flag
end

#time_hours_flagObject

Returns the value of attribute time_hours_flag.



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

def time_hours_flag
  @time_hours_flag
end

#time_manual_entryObject

Returns the value of attribute time_manual_entry.



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

def time_manual_entry
  @time_manual_entry
end

#time_manual_flagObject

Returns the value of attribute time_manual_flag.



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

def time_manual_flag
  @time_manual_flag
end

#time_member_flagObject

Returns the value of attribute time_member_flag.



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

def time_member_flag
  @time_member_flag
end

#time_notes_flagObject

Returns the value of attribute time_notes_flag.



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

def time_notes_flag
  @time_notes_flag
end

#time_rate_flagObject

Returns the value of attribute time_rate_flag.



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

def time_rate_flag
  @time_rate_flag
end

#time_start_end_flagObject

Returns the value of attribute time_start_end_flag.



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

def time_start_end_flag
  @time_start_end_flag
end

#time_tax_flagObject

Returns the value of attribute time_tax_flag.



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

def time_tax_flag
  @time_tax_flag
end

#time_work_type_flagObject

Returns the value of attribute time_work_type_flag.



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

def time_work_type_flag
  @time_work_type_flag
end

#visible_logo_flagObject

Returns the value of attribute visible_logo_flag.



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

def visible_logo_flag
  @visible_logo_flag
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



133
134
135
# File 'lib/connect_wise/models/service_signoff.rb', line 133

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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
# File 'lib/connect_wise/models/service_signoff.rb', line 70

def self.attribute_map
  {
    name: :name,
    id: :id,
    default_flag: :defaultFlag,
    visible_logo_flag: :visibleLogoFlag,
    company_info_flag: :companyInfoFlag,
    billing_terms_flag: :billingTermsFlag,
    summary_flag: :summaryFlag,
    discussion_flag: :discussionFlag,
    task_flag: :taskFlag,
    task: :task,
    configurations_flag: :configurationsFlag,
    internal_notes_flag: :internalNotesFlag,
    resolution_flag: :resolutionFlag,
    time_flag: :timeFlag,
    time_member_flag: :timeMemberFlag,
    time_date_flag: :timeDateFlag,
    time_start_end_flag: :timeStartEndFlag,
    time_bill_flag: :timeBillFlag,
    time_hours_flag: :timeHoursFlag,
    time_rate_flag: :timeRateFlag,
    time_extended_amount_flag: :timeExtendedAmountFlag,
    time_work_type_flag: :timeWorkTypeFlag,
    time_agreement_flag: :timeAgreementFlag,
    time_notes_flag: :timeNotesFlag,
    time_manual_flag: :timeManualFlag,
    time_manual_entry: :timeManualEntry,
    time_tax_flag: :timeTaxFlag,
    expense_flag: :expenseFlag,
    expense_date_flag: :expenseDateFlag,
    expense_member_flag: :expenseMemberFlag,
    expense_type_flag: :expenseTypeFlag,
    expense_bill_flag: :expenseBillFlag,
    expense_amount_flag: :expenseAmountFlag,
    expense_agreement_flag: :expenseAgreementFlag,
    expense_notes_flag: :expenseNotesFlag,
    expense_tax_flag: :expenseTaxFlag,
    expense_manual_flag: :expenseManualFlag,
    expense_manual_entry: :expenseManualEntry,
    product_flag: :productFlag,
    product_description_flag: :productDescriptionFlag,
    product_bill_flag: :productBillFlag,
    product_quantity_flag: :productQuantityFlag,
    product_price_flag: :productPriceFlag,
    product_extended_amount_flag: :productExtendedAmountFlag,
    product_agreement_flag: :productAgreementFlag,
    product_manual_flag: :productManualFlag,
    product_manual_entry: :productManualEntry,
    product_tax_flag: :productTaxFlag,
    technician_signoff_flag: :technicianSignoffFlag,
    customer_signoff_text_flag: :customerSignoffTextFlag,
    customer_signoff_text: :customerSignoffText,
    customer_signoff_fields_flag: :customerSignoffFieldsFlag,
    billing_methods_text_flag: :billingMethodsTextFlag,
    billing_methods_text: :billingMethodsText,
    credit_card_fields_flag: :creditCardFieldsFlag,
    default_ff_flag: :defaultFFFlag,
    _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



497
498
499
# File 'lib/connect_wise/models/service_signoff.rb', line 497

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

.openapi_nullableObject

List of attributes with nullable: true



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

def self.openapi_nullable
  Set.new(%i[
            default_flag
            visible_logo_flag
            company_info_flag
            billing_terms_flag
            summary_flag
            discussion_flag
            task_flag
            task
            configurations_flag
            internal_notes_flag
            resolution_flag
            time_flag
            time_member_flag
            time_date_flag
            time_start_end_flag
            time_bill_flag
            time_hours_flag
            time_rate_flag
            time_extended_amount_flag
            time_work_type_flag
            time_agreement_flag
            time_notes_flag
            time_manual_flag
            time_manual_entry
            time_tax_flag
            expense_flag
            expense_date_flag
            expense_member_flag
            expense_type_flag
            expense_bill_flag
            expense_amount_flag
            expense_agreement_flag
            expense_notes_flag
            expense_tax_flag
            expense_manual_flag
            expense_manual_entry
            product_flag
            product_description_flag
            product_bill_flag
            product_quantity_flag
            product_price_flag
            product_extended_amount_flag
            product_agreement_flag
            product_manual_flag
            product_manual_entry
            product_tax_flag
            technician_signoff_flag
            customer_signoff_text_flag
            customer_signoff_fields_flag
            billing_methods_text_flag
            credit_card_fields_flag
            default_ff_flag
          ])
end

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    name: :String,
    id: :Integer,
    default_flag: :Boolean,
    visible_logo_flag: :Boolean,
    company_info_flag: :Boolean,
    billing_terms_flag: :Boolean,
    summary_flag: :Boolean,
    discussion_flag: :Boolean,
    task_flag: :Boolean,
    task: :String,
    configurations_flag: :Boolean,
    internal_notes_flag: :Boolean,
    resolution_flag: :Boolean,
    time_flag: :Boolean,
    time_member_flag: :Boolean,
    time_date_flag: :Boolean,
    time_start_end_flag: :Boolean,
    time_bill_flag: :Boolean,
    time_hours_flag: :Boolean,
    time_rate_flag: :Boolean,
    time_extended_amount_flag: :Boolean,
    time_work_type_flag: :Boolean,
    time_agreement_flag: :Boolean,
    time_notes_flag: :Boolean,
    time_manual_flag: :Boolean,
    time_manual_entry: :Integer,
    time_tax_flag: :Boolean,
    expense_flag: :Boolean,
    expense_date_flag: :Boolean,
    expense_member_flag: :Boolean,
    expense_type_flag: :Boolean,
    expense_bill_flag: :Boolean,
    expense_amount_flag: :Boolean,
    expense_agreement_flag: :Boolean,
    expense_notes_flag: :Boolean,
    expense_tax_flag: :Boolean,
    expense_manual_flag: :Boolean,
    expense_manual_entry: :Integer,
    product_flag: :Boolean,
    product_description_flag: :Boolean,
    product_bill_flag: :Boolean,
    product_quantity_flag: :Boolean,
    product_price_flag: :Boolean,
    product_extended_amount_flag: :Boolean,
    product_agreement_flag: :Boolean,
    product_manual_flag: :Boolean,
    product_manual_entry: :Integer,
    product_tax_flag: :Boolean,
    technician_signoff_flag: :Boolean,
    customer_signoff_text_flag: :Boolean,
    customer_signoff_text: :String,
    customer_signoff_fields_flag: :Boolean,
    billing_methods_text_flag: :Boolean,
    billing_methods_text: :String,
    credit_card_fields_flag: :Boolean,
    default_ff_flag: :Boolean,
    _info: :'Hash<String, String>'
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

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

  self.class == other.class &&
    name == other.name &&
    id == other.id &&
    default_flag == other.default_flag &&
    visible_logo_flag == other.visible_logo_flag &&
    company_info_flag == other.company_info_flag &&
    billing_terms_flag == other.billing_terms_flag &&
    summary_flag == other.summary_flag &&
    discussion_flag == other.discussion_flag &&
    task_flag == other.task_flag &&
    task == other.task &&
    configurations_flag == other.configurations_flag &&
    internal_notes_flag == other.internal_notes_flag &&
    resolution_flag == other.resolution_flag &&
    time_flag == other.time_flag &&
    time_member_flag == other.time_member_flag &&
    time_date_flag == other.time_date_flag &&
    time_start_end_flag == other.time_start_end_flag &&
    time_bill_flag == other.time_bill_flag &&
    time_hours_flag == other.time_hours_flag &&
    time_rate_flag == other.time_rate_flag &&
    time_extended_amount_flag == other.time_extended_amount_flag &&
    time_work_type_flag == other.time_work_type_flag &&
    time_agreement_flag == other.time_agreement_flag &&
    time_notes_flag == other.time_notes_flag &&
    time_manual_flag == other.time_manual_flag &&
    time_manual_entry == other.time_manual_entry &&
    time_tax_flag == other.time_tax_flag &&
    expense_flag == other.expense_flag &&
    expense_date_flag == other.expense_date_flag &&
    expense_member_flag == other.expense_member_flag &&
    expense_type_flag == other.expense_type_flag &&
    expense_bill_flag == other.expense_bill_flag &&
    expense_amount_flag == other.expense_amount_flag &&
    expense_agreement_flag == other.expense_agreement_flag &&
    expense_notes_flag == other.expense_notes_flag &&
    expense_tax_flag == other.expense_tax_flag &&
    expense_manual_flag == other.expense_manual_flag &&
    expense_manual_entry == other.expense_manual_entry &&
    product_flag == other.product_flag &&
    product_description_flag == other.product_description_flag &&
    product_bill_flag == other.product_bill_flag &&
    product_quantity_flag == other.product_quantity_flag &&
    product_price_flag == other.product_price_flag &&
    product_extended_amount_flag == other.product_extended_amount_flag &&
    product_agreement_flag == other.product_agreement_flag &&
    product_manual_flag == other.product_manual_flag &&
    product_manual_entry == other.product_manual_entry &&
    product_tax_flag == other.product_tax_flag &&
    technician_signoff_flag == other.technician_signoff_flag &&
    customer_signoff_text_flag == other.customer_signoff_text_flag &&
    customer_signoff_text == other.customer_signoff_text &&
    customer_signoff_fields_flag == other.customer_signoff_fields_flag &&
    billing_methods_text_flag == other.billing_methods_text_flag &&
    billing_methods_text == other.billing_methods_text &&
    credit_card_fields_flag == other.credit_card_fields_flag &&
    default_ff_flag == other.default_ff_flag &&
    _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



527
528
529
530
531
532
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
560
561
562
563
564
# File 'lib/connect_wise/models/service_signoff.rb', line 527

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



598
599
600
601
602
603
604
605
606
607
608
609
610
# File 'lib/connect_wise/models/service_signoff.rb', line 598

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



504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/connect_wise/models/service_signoff.rb', line 504

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


484
485
486
# File 'lib/connect_wise/models/service_signoff.rb', line 484

def eql?(other)
  self == other
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



490
491
492
# File 'lib/connect_wise/models/service_signoff.rb', line 490

def hash
  [name, id, default_flag, visible_logo_flag, company_info_flag, billing_terms_flag, summary_flag, discussion_flag, task_flag, task, configurations_flag, internal_notes_flag, resolution_flag, time_flag, time_member_flag, time_date_flag, time_start_end_flag, time_bill_flag, time_hours_flag, time_rate_flag, time_extended_amount_flag, time_work_type_flag, time_agreement_flag, time_notes_flag, time_manual_flag, time_manual_entry, time_tax_flag, expense_flag, expense_date_flag, expense_member_flag, expense_type_flag, expense_bill_flag, expense_amount_flag, expense_agreement_flag, expense_notes_flag, expense_tax_flag, expense_manual_flag, expense_manual_entry, product_flag, product_description_flag, product_bill_flag, product_quantity_flag, product_price_flag, product_extended_amount_flag, product_agreement_flag, product_manual_flag, product_manual_entry, product_tax_flag, technician_signoff_flag, customer_signoff_text_flag, customer_signoff_text, customer_signoff_fields_flag, billing_methods_text_flag, billing_methods_text, credit_card_fields_flag, default_ff_flag, _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



390
391
392
393
394
395
# File 'lib/connect_wise/models/service_signoff.rb', line 390

def list_invalid_properties
  invalid_properties = []
  invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.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



574
575
576
# File 'lib/connect_wise/models/service_signoff.rb', line 574

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



580
581
582
583
584
585
586
587
588
589
590
591
592
# File 'lib/connect_wise/models/service_signoff.rb', line 580

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



568
569
570
# File 'lib/connect_wise/models/service_signoff.rb', line 568

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



399
400
401
402
403
404
405
406
# File 'lib/connect_wise/models/service_signoff.rb', line 399

def valid?
  return false if @name.nil?

  task_validator = EnumAttributeValidator.new('String', %w[All Closed Open])
  return false unless task_validator.valid?(@task)

  true
end