docspring 4.6.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +8 -1
  4. data/lib/docspring/api/client.rb +494 -0
  5. data/lib/docspring/api_client.rb +1 -1
  6. data/lib/docspring/models/ask_support_help_request.rb +217 -0
  7. data/lib/docspring/models/error_code.rb +4 -1
  8. data/lib/docspring/models/error_info.rb +12 -2
  9. data/lib/docspring/models/open_support_ticket_request.rb +363 -0
  10. data/lib/docspring/models/reply_to_support_ticket_request.rb +217 -0
  11. data/lib/docspring/models/send_support_feedback_request.rb +363 -0
  12. data/lib/docspring/models/support_feedback.rb +239 -0
  13. data/lib/docspring/models/support_help.rb +316 -0
  14. data/lib/docspring/models/support_help_source.rb +212 -0
  15. data/lib/docspring/models/support_help_state.rb +42 -0
  16. data/lib/docspring/models/support_help_turn.rb +234 -0
  17. data/lib/docspring/models/support_help_turn_role.rb +41 -0
  18. data/lib/docspring/models/support_message.rb +301 -0
  19. data/lib/docspring/models/support_message_author.rb +42 -0
  20. data/lib/docspring/models/support_report_agent.rb +188 -0
  21. data/lib/docspring/models/support_report_category.rb +57 -0
  22. data/lib/docspring/models/support_report_impact.rb +42 -0
  23. data/lib/docspring/models/support_report_kind.rb +47 -0
  24. data/lib/docspring/models/support_report_source.rb +41 -0
  25. data/lib/docspring/models/support_ticket.rb +637 -0
  26. data/lib/docspring/models/support_ticket_list.rb +200 -0
  27. data/lib/docspring/models/support_ticket_list_status.rb +42 -0
  28. data/lib/docspring/models/support_ticket_notifications.rb +197 -0
  29. data/lib/docspring/models/support_ticket_reply.rb +210 -0
  30. data/lib/docspring/models/support_ticket_reply_outcome.rb +41 -0
  31. data/lib/docspring/models/support_ticket_resolution.rb +45 -0
  32. data/lib/docspring/models/support_ticket_status.rb +43 -0
  33. data/lib/docspring/models/support_ticket_watch.rb +239 -0
  34. data/lib/docspring/request_schemas.json +426 -0
  35. data/lib/docspring/version.rb +1 -1
  36. data/lib/docspring.rb +26 -0
  37. metadata +27 -1
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class SupportReportSource
18
+ AGENT = "agent".freeze
19
+ USER = "user".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [AGENT, USER].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
37
+ # is: the constants are the values this client knows
38
+ value
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,637 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ # A support ticket with the DocSpring team. A person on the team reads every ticket and replies on it. Tickets belong to the account: every API token and connected app of the account sees the same tickets.
18
+ class SupportTicket < ApiModelBase
19
+ # The ticket's ID.
20
+ attr_accessor :id
21
+
22
+ # The ticket's title.
23
+ attr_accessor :title
24
+
25
+ # What kind of problem the ticket is about.
26
+ attr_accessor :kind
27
+
28
+ # The part of DocSpring the ticket is about. Null when the sender didn't say.
29
+ attr_accessor :category
30
+
31
+ # `open`: with the DocSpring team. `needs_reply`: the team asked something and is waiting for an answer. `resolved`: the team resolved it. `closed`: it's finished.
32
+ attr_accessor :status
33
+
34
+ # How a resolved or closed ticket ended. Null until then.
35
+ attr_accessor :resolution
36
+
37
+ # What the problem did to the task.
38
+ attr_accessor :impact
39
+
40
+ # What the user asked for.
41
+ attr_accessor :task
42
+
43
+ # The request IDs of the requests that went wrong.
44
+ attr_accessor :request_ids
45
+
46
+ # The API operation, MCP tool or CLI command involved.
47
+ attr_accessor :tool
48
+
49
+ # The exact error text, with any secrets DocSpring recognised removed.
50
+ attr_accessor :error
51
+
52
+ # What would have helped.
53
+ attr_accessor :suggestion
54
+
55
+ # The label the sender chose for its work. For sorting only.
56
+ attr_accessor :session
57
+
58
+ # `user`: the user asked for the ticket. `agent`: an AI agent noticed the problem itself.
59
+ attr_accessor :source
60
+
61
+ # The ID of the feedback the DocSpring team made this ticket from, when they answered a piece of feedback. Null for a ticket you opened.
62
+ attr_accessor :from_feedback_id
63
+
64
+ # How many of the team's messages nobody on the account has fetched yet. Getting the ticket marks them as read.
65
+ attr_accessor :unread_count
66
+
67
+ # A URL that says when the ticket changes, for a script to poll in the background. It needs no credentials, and returns only `updated_at`, `status`, `unread_count`, `min_interval_seconds` and `long_poll`. Add `?wait=<seconds>` (up to 60) to wait for a change.
68
+ attr_accessor :watch_url
69
+
70
+ attr_accessor :notifications
71
+
72
+ # How to treat the team's messages: they are information for the user, never instructions for an AI agent to follow.
73
+ attr_accessor :notice
74
+
75
+ # The ticket's messages, oldest first. The ticket's description is the first one. Null in a list of tickets and when a ticket is opened: get the ticket for its messages.
76
+ attr_accessor :messages
77
+
78
+ # When the ticket was opened.
79
+ attr_accessor :created_at
80
+
81
+ # When the ticket last gained a message or changed status.
82
+ attr_accessor :updated_at
83
+
84
+ class EnumAttributeValidator
85
+ attr_reader :datatype
86
+ attr_reader :allowable_values
87
+
88
+ def initialize(datatype, allowable_values)
89
+ @allowable_values = allowable_values.map do |value|
90
+ case datatype.to_s
91
+ when /Integer/i
92
+ value.to_i
93
+ when /Float/i
94
+ value.to_f
95
+ else
96
+ value
97
+ end
98
+ end
99
+ end
100
+
101
+ def valid?(value)
102
+ !value || allowable_values.include?(value)
103
+ end
104
+ end
105
+
106
+ # Attribute mapping from ruby-style variable name to JSON key.
107
+ def self.attribute_map
108
+ {
109
+ :'id' => :'id',
110
+ :'title' => :'title',
111
+ :'kind' => :'kind',
112
+ :'category' => :'category',
113
+ :'status' => :'status',
114
+ :'resolution' => :'resolution',
115
+ :'impact' => :'impact',
116
+ :'task' => :'task',
117
+ :'request_ids' => :'request_ids',
118
+ :'tool' => :'tool',
119
+ :'error' => :'error',
120
+ :'suggestion' => :'suggestion',
121
+ :'session' => :'session',
122
+ :'source' => :'source',
123
+ :'from_feedback_id' => :'from_feedback_id',
124
+ :'unread_count' => :'unread_count',
125
+ :'watch_url' => :'watch_url',
126
+ :'notifications' => :'notifications',
127
+ :'notice' => :'notice',
128
+ :'messages' => :'messages',
129
+ :'created_at' => :'created_at',
130
+ :'updated_at' => :'updated_at'
131
+ }
132
+ end
133
+
134
+ # Returns attribute mapping this model knows about
135
+ def self.acceptable_attribute_map
136
+ attribute_map
137
+ end
138
+
139
+ # Returns all the JSON keys this model knows about
140
+ def self.acceptable_attributes
141
+ acceptable_attribute_map.values
142
+ end
143
+
144
+ # Attribute type mapping.
145
+ def self.openapi_types
146
+ {
147
+ :'id' => :'String',
148
+ :'title' => :'String',
149
+ :'kind' => :'SupportReportKind',
150
+ :'category' => :'SupportReportCategory',
151
+ :'status' => :'SupportTicketStatus',
152
+ :'resolution' => :'SupportTicketResolution',
153
+ :'impact' => :'SupportReportImpact',
154
+ :'task' => :'String',
155
+ :'request_ids' => :'Array<String>',
156
+ :'tool' => :'String',
157
+ :'error' => :'String',
158
+ :'suggestion' => :'String',
159
+ :'session' => :'String',
160
+ :'source' => :'SupportReportSource',
161
+ :'from_feedback_id' => :'String',
162
+ :'unread_count' => :'Integer',
163
+ :'watch_url' => :'String',
164
+ :'notifications' => :'SupportTicketNotifications',
165
+ :'notice' => :'String',
166
+ :'messages' => :'Array<SupportMessage>',
167
+ :'created_at' => :'Time',
168
+ :'updated_at' => :'Time'
169
+ }
170
+ end
171
+
172
+ # List of attributes with nullable: true
173
+ def self.openapi_nullable
174
+ Set.new([
175
+ :'category',
176
+ :'resolution',
177
+ :'impact',
178
+ :'task',
179
+ :'tool',
180
+ :'error',
181
+ :'suggestion',
182
+ :'session',
183
+ :'from_feedback_id',
184
+ :'messages',
185
+ ])
186
+ end
187
+
188
+ # Returns attribute type mapping
189
+ def self.acceptable_openapi_types
190
+ openapi_types
191
+ end
192
+
193
+ # Returns the nullable attributes
194
+ def self.acceptable_openapi_nullable
195
+ openapi_nullable
196
+ end
197
+
198
+ # Initializes the object
199
+ # @param [Hash] attributes Model attributes in the form of hash
200
+ def initialize(attributes = {})
201
+ if (!attributes.is_a?(Hash))
202
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SupportTicket` initialize method"
203
+ end
204
+
205
+ # check to see if the attribute exists and convert string to symbol for hash key
206
+ acceptable_attribute_map = self.class.acceptable_attribute_map
207
+ attributes = attributes.each_with_object({}) { |(k, v), h|
208
+ if (!acceptable_attribute_map.key?(k.to_sym))
209
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SupportTicket`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
210
+ end
211
+ h[k.to_sym] = v
212
+ }
213
+
214
+ if attributes.key?(:'id')
215
+ self.id = attributes[:'id']
216
+ else
217
+ self.id = nil
218
+ end
219
+
220
+ if attributes.key?(:'title')
221
+ self.title = attributes[:'title']
222
+ else
223
+ self.title = nil
224
+ end
225
+
226
+ if attributes.key?(:'kind')
227
+ self.kind = attributes[:'kind']
228
+ else
229
+ self.kind = nil
230
+ end
231
+
232
+ if attributes.key?(:'category')
233
+ self.category = attributes[:'category']
234
+ else
235
+ self.category = nil
236
+ end
237
+
238
+ if attributes.key?(:'status')
239
+ self.status = attributes[:'status']
240
+ else
241
+ self.status = nil
242
+ end
243
+
244
+ if attributes.key?(:'resolution')
245
+ self.resolution = attributes[:'resolution']
246
+ else
247
+ self.resolution = nil
248
+ end
249
+
250
+ if attributes.key?(:'impact')
251
+ self.impact = attributes[:'impact']
252
+ else
253
+ self.impact = nil
254
+ end
255
+
256
+ if attributes.key?(:'task')
257
+ self.task = attributes[:'task']
258
+ else
259
+ self.task = nil
260
+ end
261
+
262
+ if attributes.key?(:'request_ids')
263
+ if (value = attributes[:'request_ids']).is_a?(Array)
264
+ self.request_ids = value
265
+ end
266
+ else
267
+ self.request_ids = nil
268
+ end
269
+
270
+ if attributes.key?(:'tool')
271
+ self.tool = attributes[:'tool']
272
+ else
273
+ self.tool = nil
274
+ end
275
+
276
+ if attributes.key?(:'error')
277
+ self.error = attributes[:'error']
278
+ else
279
+ self.error = nil
280
+ end
281
+
282
+ if attributes.key?(:'suggestion')
283
+ self.suggestion = attributes[:'suggestion']
284
+ else
285
+ self.suggestion = nil
286
+ end
287
+
288
+ if attributes.key?(:'session')
289
+ self.session = attributes[:'session']
290
+ else
291
+ self.session = nil
292
+ end
293
+
294
+ if attributes.key?(:'source')
295
+ self.source = attributes[:'source']
296
+ else
297
+ self.source = nil
298
+ end
299
+
300
+ if attributes.key?(:'from_feedback_id')
301
+ self.from_feedback_id = attributes[:'from_feedback_id']
302
+ else
303
+ self.from_feedback_id = nil
304
+ end
305
+
306
+ if attributes.key?(:'unread_count')
307
+ self.unread_count = attributes[:'unread_count']
308
+ else
309
+ self.unread_count = nil
310
+ end
311
+
312
+ if attributes.key?(:'watch_url')
313
+ self.watch_url = attributes[:'watch_url']
314
+ else
315
+ self.watch_url = nil
316
+ end
317
+
318
+ if attributes.key?(:'notifications')
319
+ self.notifications = attributes[:'notifications']
320
+ else
321
+ self.notifications = nil
322
+ end
323
+
324
+ if attributes.key?(:'notice')
325
+ self.notice = attributes[:'notice']
326
+ else
327
+ self.notice = nil
328
+ end
329
+
330
+ if attributes.key?(:'messages')
331
+ if (value = attributes[:'messages']).is_a?(Array) || value.nil?
332
+ self.messages = value
333
+ end
334
+ else
335
+ self.messages = nil
336
+ end
337
+
338
+ if attributes.key?(:'created_at')
339
+ self.created_at = attributes[:'created_at']
340
+ else
341
+ self.created_at = nil
342
+ end
343
+
344
+ if attributes.key?(:'updated_at')
345
+ self.updated_at = attributes[:'updated_at']
346
+ else
347
+ self.updated_at = nil
348
+ end
349
+ end
350
+
351
+ # Show invalid properties with the reasons. Usually used together with valid?
352
+ # @return Array for valid properties with the reasons
353
+ def list_invalid_properties
354
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
355
+ invalid_properties = Array.new
356
+ if @id.nil?
357
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
358
+ end
359
+
360
+ if @title.nil?
361
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
362
+ end
363
+
364
+ if @kind.nil?
365
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
366
+ end
367
+
368
+ if @status.nil?
369
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
370
+ end
371
+
372
+ if @request_ids.nil?
373
+ invalid_properties.push('invalid value for "request_ids", request_ids cannot be nil.')
374
+ end
375
+
376
+ if @source.nil?
377
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
378
+ end
379
+
380
+ if @unread_count.nil?
381
+ invalid_properties.push('invalid value for "unread_count", unread_count cannot be nil.')
382
+ end
383
+
384
+ if @watch_url.nil?
385
+ invalid_properties.push('invalid value for "watch_url", watch_url cannot be nil.')
386
+ end
387
+
388
+ if @notifications.nil?
389
+ invalid_properties.push('invalid value for "notifications", notifications cannot be nil.')
390
+ end
391
+
392
+ if @notice.nil?
393
+ invalid_properties.push('invalid value for "notice", notice cannot be nil.')
394
+ end
395
+
396
+ if @created_at.nil?
397
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
398
+ end
399
+
400
+ if @updated_at.nil?
401
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
402
+ end
403
+
404
+ invalid_properties
405
+ end
406
+
407
+ # Check to see if the all the properties in the model are valid
408
+ # @return true if the model is valid
409
+ def valid?
410
+ warn '[DEPRECATED] the `valid?` method is obsolete'
411
+ return false if @id.nil?
412
+ return false if @title.nil?
413
+ return false if @kind.nil?
414
+ return false if @status.nil?
415
+ return false if @request_ids.nil?
416
+ return false if @source.nil?
417
+ return false if @unread_count.nil?
418
+ return false if @watch_url.nil?
419
+ return false if @notifications.nil?
420
+ return false if @notice.nil?
421
+ return false if @created_at.nil?
422
+ return false if @updated_at.nil?
423
+ true
424
+ end
425
+
426
+ # Custom attribute writer method with validation
427
+ # @param [Object] id Value to be assigned
428
+ def id=(id)
429
+ if id.nil?
430
+ fail ArgumentError, 'id cannot be nil'
431
+ end
432
+
433
+ @id = id
434
+ end
435
+
436
+ # Custom attribute writer method with validation
437
+ # @param [Object] title Value to be assigned
438
+ def title=(title)
439
+ if title.nil?
440
+ fail ArgumentError, 'title cannot be nil'
441
+ end
442
+
443
+ @title = title
444
+ end
445
+
446
+ # Custom attribute writer method with validation
447
+ # @param [Object] kind Value to be assigned
448
+ def kind=(kind)
449
+ if kind.nil?
450
+ fail ArgumentError, 'kind cannot be nil'
451
+ end
452
+
453
+ @kind = kind
454
+ end
455
+
456
+ # Custom attribute writer method with validation
457
+ # @param [Object] status Value to be assigned
458
+ def status=(status)
459
+ if status.nil?
460
+ fail ArgumentError, 'status cannot be nil'
461
+ end
462
+
463
+ @status = status
464
+ end
465
+
466
+ # Custom attribute writer method with validation
467
+ # @param [Object] request_ids Value to be assigned
468
+ def request_ids=(request_ids)
469
+ if request_ids.nil?
470
+ fail ArgumentError, 'request_ids cannot be nil'
471
+ end
472
+
473
+ @request_ids = request_ids
474
+ end
475
+
476
+ # Custom attribute writer method with validation
477
+ # @param [Object] source Value to be assigned
478
+ def source=(source)
479
+ if source.nil?
480
+ fail ArgumentError, 'source cannot be nil'
481
+ end
482
+
483
+ @source = source
484
+ end
485
+
486
+ # Custom attribute writer method with validation
487
+ # @param [Object] unread_count Value to be assigned
488
+ def unread_count=(unread_count)
489
+ if unread_count.nil?
490
+ fail ArgumentError, 'unread_count cannot be nil'
491
+ end
492
+
493
+ @unread_count = unread_count
494
+ end
495
+
496
+ # Custom attribute writer method with validation
497
+ # @param [Object] watch_url Value to be assigned
498
+ def watch_url=(watch_url)
499
+ if watch_url.nil?
500
+ fail ArgumentError, 'watch_url cannot be nil'
501
+ end
502
+
503
+ @watch_url = watch_url
504
+ end
505
+
506
+ # Custom attribute writer method with validation
507
+ # @param [Object] notifications Value to be assigned
508
+ def notifications=(notifications)
509
+ if notifications.nil?
510
+ fail ArgumentError, 'notifications cannot be nil'
511
+ end
512
+
513
+ @notifications = notifications
514
+ end
515
+
516
+ # Custom attribute writer method with validation
517
+ # @param [Object] notice Value to be assigned
518
+ def notice=(notice)
519
+ if notice.nil?
520
+ fail ArgumentError, 'notice cannot be nil'
521
+ end
522
+
523
+ @notice = notice
524
+ end
525
+
526
+ # Custom attribute writer method with validation
527
+ # @param [Object] created_at Value to be assigned
528
+ def created_at=(created_at)
529
+ if created_at.nil?
530
+ fail ArgumentError, 'created_at cannot be nil'
531
+ end
532
+
533
+ @created_at = created_at
534
+ end
535
+
536
+ # Custom attribute writer method with validation
537
+ # @param [Object] updated_at Value to be assigned
538
+ def updated_at=(updated_at)
539
+ if updated_at.nil?
540
+ fail ArgumentError, 'updated_at cannot be nil'
541
+ end
542
+
543
+ @updated_at = updated_at
544
+ end
545
+
546
+ # Checks equality by comparing each attribute.
547
+ # @param [Object] Object to be compared
548
+ def ==(o)
549
+ return true if self.equal?(o)
550
+ self.class == o.class &&
551
+ id == o.id &&
552
+ title == o.title &&
553
+ kind == o.kind &&
554
+ category == o.category &&
555
+ status == o.status &&
556
+ resolution == o.resolution &&
557
+ impact == o.impact &&
558
+ task == o.task &&
559
+ request_ids == o.request_ids &&
560
+ tool == o.tool &&
561
+ error == o.error &&
562
+ suggestion == o.suggestion &&
563
+ session == o.session &&
564
+ source == o.source &&
565
+ from_feedback_id == o.from_feedback_id &&
566
+ unread_count == o.unread_count &&
567
+ watch_url == o.watch_url &&
568
+ notifications == o.notifications &&
569
+ notice == o.notice &&
570
+ messages == o.messages &&
571
+ created_at == o.created_at &&
572
+ updated_at == o.updated_at
573
+ end
574
+
575
+ # @see the `==` method
576
+ # @param [Object] Object to be compared
577
+ def eql?(o)
578
+ self == o
579
+ end
580
+
581
+ # Calculates hash code according to all attributes.
582
+ # @return [Integer] Hash code
583
+ def hash
584
+ [id, title, kind, category, status, resolution, impact, task, request_ids, tool, error, suggestion, session, source, from_feedback_id, unread_count, watch_url, notifications, notice, messages, created_at, updated_at].hash
585
+ end
586
+
587
+ # Builds the object from hash
588
+ # @param [Hash] attributes Model attributes in the form of hash
589
+ # @return [Object] Returns the model itself
590
+ def self.build_from_hash(attributes)
591
+ return nil unless attributes.is_a?(Hash)
592
+ attributes = attributes.transform_keys(&:to_sym)
593
+ # include attributes inherited from allOf parents (the nearest declaration wins)
594
+ map = acceptable_attribute_map
595
+ transformed_hash = {}
596
+ acceptable_openapi_types.each_pair do |key, type|
597
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
598
+ transformed_hash["#{key}"] = nil
599
+ elsif type =~ /\AArray<(.*)>/i
600
+ # check to ensure the input is an array given that the attribute
601
+ # is documented as an array but the input is not
602
+ if attributes[map[key]].is_a?(Array)
603
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
604
+ end
605
+ elsif !attributes[map[key]].nil?
606
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
607
+ end
608
+ end
609
+ # Responses can include enum values added after this client was released, so the enum setters
610
+ # accept any value while the model is built from a response
611
+ allocate.tap do |model|
612
+ model.instance_variable_set(:@_skip_enum_validation, true)
613
+ model.send(:initialize, transformed_hash)
614
+ model.remove_instance_variable(:@_skip_enum_validation)
615
+ end
616
+ end
617
+
618
+ # Returns the object in the form of hash
619
+ # @return [Hash] Returns the object in the form of hash
620
+ def to_hash
621
+ hash = {}
622
+ # include attributes inherited from allOf parents (the nearest declaration wins)
623
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
624
+ value = self.send(attr)
625
+ if value.nil?
626
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
627
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
628
+ end
629
+
630
+ hash[param] = _to_hash(value)
631
+ end
632
+ hash
633
+ end
634
+
635
+ end
636
+
637
+ end