docspring 4.3.0 → 4.4.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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +80 -0
  3. data/.openapi-generator/FILES +84 -0
  4. data/CHANGELOG.md +55 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +20 -1
  7. data/docs/AddTemplateFieldsRequest.md +1 -1
  8. data/docs/Client.md +2311 -766
  9. data/docs/CombinedPdfSource.md +1 -1
  10. data/docs/CreateAccountEmailActionRequest.md +54 -0
  11. data/docs/CreateEmailActionRequest.md +50 -0
  12. data/docs/CreateEmailDomainRequest.md +18 -0
  13. data/docs/CreateSubmissionBatchRequest.md +2 -2
  14. data/docs/CreateSubmissionRequest.md +22 -4
  15. data/docs/CreateTemplateRequest.md +22 -6
  16. data/docs/DnsRecordType.md +15 -0
  17. data/docs/EmailAction.md +76 -0
  18. data/docs/EmailActionConditions.md +20 -0
  19. data/docs/EmailActionConditionsInput.md +20 -0
  20. data/docs/EmailActionCustomization.md +36 -0
  21. data/docs/EmailActionDelivery.md +15 -0
  22. data/docs/EmailActionFileFormats.md +15 -0
  23. data/docs/EmailActionList.md +20 -0
  24. data/docs/EmailActionSetting.md +15 -0
  25. data/docs/EmailActionSubmissionType.md +15 -0
  26. data/docs/EmailActionTestEmail.md +18 -0
  27. data/docs/EmailDomain.md +38 -0
  28. data/docs/EmailDomainDnsRecord.md +24 -0
  29. data/docs/EmailDomainDnsRecordPurpose.md +15 -0
  30. data/docs/EmailDomainList.md +20 -0
  31. data/docs/EmailDomainRecordState.md +15 -0
  32. data/docs/EmailDomainState.md +15 -0
  33. data/docs/ErrorInfo.md +12 -6
  34. data/docs/Field.md +1 -1
  35. data/docs/FieldInput.md +1 -1
  36. data/docs/HtmlEngineOptions.md +1 -1
  37. data/docs/HtmlEngineOptionsInput.md +1 -1
  38. data/docs/SendAccountEmailActionTestEmailRequest.md +18 -0
  39. data/docs/SignatureRequest.md +9 -1
  40. data/docs/SignatureRequestEmailAttachments.md +15 -0
  41. data/docs/SignatureRequestEmailStatus.md +15 -0
  42. data/docs/SignatureRequestInput.md +7 -3
  43. data/docs/SignatureRequestReminders.md +20 -0
  44. data/docs/SigningOrder.md +15 -0
  45. data/docs/Submission.md +4 -2
  46. data/docs/SubmissionAction.md +5 -3
  47. data/docs/SubmissionInput.md +3 -3
  48. data/docs/SubmissionSummary.md +1 -1
  49. data/docs/Template.md +23 -7
  50. data/docs/TemplateSourcePdf.md +1 -1
  51. data/docs/TemplateSummary.md +4 -4
  52. data/docs/UpdateAccountEmailActionRequest.md +54 -0
  53. data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
  54. data/docs/UpdateEmailActionRequest.md +50 -0
  55. data/docs/UpdateTemplateDocumentRequest.md +1 -1
  56. data/docs/UpdateTemplateRequest.md +21 -5
  57. data/docs/ValidateSubmissionRequest.md +22 -4
  58. data/lib/docspring/api/client.rb +1749 -314
  59. data/lib/docspring/api_client.rb +1 -1
  60. data/lib/docspring/models/add_template_fields_request.rb +1 -1
  61. data/lib/docspring/models/combined_pdf_source.rb +1 -1
  62. data/lib/docspring/models/create_account_email_action_request.rb +388 -0
  63. data/lib/docspring/models/create_email_action_request.rb +364 -0
  64. data/lib/docspring/models/create_email_domain_request.rb +185 -0
  65. data/lib/docspring/models/create_submission_batch_request.rb +2 -2
  66. data/lib/docspring/models/create_submission_request.rb +143 -7
  67. data/lib/docspring/models/create_template_request.rb +107 -7
  68. data/lib/docspring/models/dns_record_type.rb +42 -0
  69. data/lib/docspring/models/email_action.rb +790 -0
  70. data/lib/docspring/models/email_action_conditions.rb +219 -0
  71. data/lib/docspring/models/email_action_conditions_input.rb +219 -0
  72. data/lib/docspring/models/email_action_customization.rb +360 -0
  73. data/lib/docspring/models/email_action_delivery.rb +41 -0
  74. data/lib/docspring/models/email_action_file_formats.rb +43 -0
  75. data/lib/docspring/models/email_action_list.rb +200 -0
  76. data/lib/docspring/models/email_action_setting.rb +53 -0
  77. data/lib/docspring/models/email_action_submission_type.rb +42 -0
  78. data/lib/docspring/models/email_action_test_email.rb +185 -0
  79. data/lib/docspring/models/email_domain.rb +423 -0
  80. data/lib/docspring/models/email_domain_dns_record.rb +288 -0
  81. data/lib/docspring/models/email_domain_dns_record_purpose.rb +42 -0
  82. data/lib/docspring/models/email_domain_list.rb +200 -0
  83. data/lib/docspring/models/email_domain_record_state.rb +42 -0
  84. data/lib/docspring/models/email_domain_state.rb +42 -0
  85. data/lib/docspring/models/error_code.rb +3 -1
  86. data/lib/docspring/models/error_info.rb +39 -9
  87. data/lib/docspring/models/field.rb +1 -1
  88. data/lib/docspring/models/field_input.rb +1 -1
  89. data/lib/docspring/models/html_engine_options.rb +1 -1
  90. data/lib/docspring/models/html_engine_options_input.rb +1 -1
  91. data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
  92. data/lib/docspring/models/signature_request.rb +68 -2
  93. data/lib/docspring/models/signature_request_email_attachments.rb +41 -0
  94. data/lib/docspring/models/signature_request_email_status.rb +47 -0
  95. data/lib/docspring/models/signature_request_event_type.rb +3 -1
  96. data/lib/docspring/models/signature_request_input.rb +25 -22
  97. data/lib/docspring/models/signature_request_reminders.rb +212 -0
  98. data/lib/docspring/models/signing_order.rb +41 -0
  99. data/lib/docspring/models/string_condition_type.rb +8 -1
  100. data/lib/docspring/models/submission.rb +30 -3
  101. data/lib/docspring/models/submission_action.rb +18 -5
  102. data/lib/docspring/models/submission_input.rb +3 -3
  103. data/lib/docspring/models/submission_summary.rb +1 -1
  104. data/lib/docspring/models/template.rb +144 -8
  105. data/lib/docspring/models/template_source_pdf.rb +1 -1
  106. data/lib/docspring/models/template_summary.rb +4 -4
  107. data/lib/docspring/models/template_type.rb +2 -1
  108. data/lib/docspring/models/update_account_email_action_request.rb +388 -0
  109. data/lib/docspring/models/update_email_action_customization_request.rb +343 -0
  110. data/lib/docspring/models/update_email_action_request.rb +364 -0
  111. data/lib/docspring/models/update_template_document_request.rb +1 -1
  112. data/lib/docspring/models/update_template_request.rb +108 -8
  113. data/lib/docspring/models/validate_submission_request.rb +143 -7
  114. data/lib/docspring/models/webhook_event_type.rb +3 -1
  115. data/lib/docspring/request_schemas.json +1691 -145
  116. data/lib/docspring/request_validator.rb +4 -0
  117. data/lib/docspring/version.rb +1 -1
  118. data/lib/docspring.rb +28 -0
  119. data/spec/api/client_spec.rb +306 -18
  120. data/spec/models/create_account_email_action_request_spec.rb +144 -0
  121. data/spec/models/create_email_action_request_spec.rb +132 -0
  122. data/spec/models/create_email_domain_request_spec.rb +36 -0
  123. data/spec/models/create_submission_request_spec.rb +54 -0
  124. data/spec/models/create_template_request_spec.rb +48 -0
  125. data/spec/models/dns_record_type_spec.rb +30 -0
  126. data/spec/models/email_action_conditions_input_spec.rb +42 -0
  127. data/spec/models/email_action_conditions_spec.rb +42 -0
  128. data/spec/models/email_action_customization_spec.rb +90 -0
  129. data/spec/models/email_action_delivery_spec.rb +30 -0
  130. data/spec/models/email_action_file_formats_spec.rb +30 -0
  131. data/spec/models/email_action_list_spec.rb +42 -0
  132. data/spec/models/email_action_setting_spec.rb +30 -0
  133. data/spec/models/email_action_spec.rb +210 -0
  134. data/spec/models/email_action_submission_type_spec.rb +30 -0
  135. data/spec/models/email_action_test_email_spec.rb +36 -0
  136. data/spec/models/email_domain_dns_record_purpose_spec.rb +30 -0
  137. data/spec/models/email_domain_dns_record_spec.rb +54 -0
  138. data/spec/models/email_domain_list_spec.rb +42 -0
  139. data/spec/models/email_domain_record_state_spec.rb +30 -0
  140. data/spec/models/email_domain_spec.rb +96 -0
  141. data/spec/models/email_domain_state_spec.rb +30 -0
  142. data/spec/models/error_info_spec.rb +18 -0
  143. data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
  144. data/spec/models/signature_request_email_attachments_spec.rb +30 -0
  145. data/spec/models/signature_request_email_status_spec.rb +30 -0
  146. data/spec/models/signature_request_input_spec.rb +12 -0
  147. data/spec/models/signature_request_reminders_spec.rb +42 -0
  148. data/spec/models/signature_request_spec.rb +24 -0
  149. data/spec/models/signing_order_spec.rb +30 -0
  150. data/spec/models/submission_action_spec.rb +6 -0
  151. data/spec/models/submission_spec.rb +6 -0
  152. data/spec/models/template_spec.rb +48 -0
  153. data/spec/models/update_account_email_action_request_spec.rb +144 -0
  154. data/spec/models/update_email_action_customization_request_spec.rb +120 -0
  155. data/spec/models/update_email_action_request_spec.rb +132 -0
  156. data/spec/models/update_template_request_spec.rb +48 -0
  157. data/spec/models/validate_submission_request_spec.rb +54 -0
  158. metadata +115 -4
  159. data/.gitlab-ci.yml +0 -26
  160. data/.travis.yml +0 -11
@@ -0,0 +1,343 @@
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
+ # The template's changes to the account email action, replacing any it had. Each setting you send is changed for this template, and the ones you leave out follow the account email action. `enabled: false` stops it sending for this template; left out, it sends.
18
+ class UpdateEmailActionCustomizationRequest < ApiModelBase
19
+ # Whether it sends emails. DocSpring turns an email action off after 3 days of failed emails, or straight away when one of the addresses in `to`, `cc` or `bcc` (not one from a field or metadata) bounces or marks an email as spam.
20
+ attr_accessor :enabled
21
+
22
+ # Who gets each email: email addresses, and tags for an address that each submission gives, from one of the template's text or email fields (`{{ data.client_email }}`, or `{{ data["client email"] }}` for a name with spaces) or from its metadata (`{{ metadata.agent_email }}`, or `{{ metadata.agent.email }}` for a value in an object). A tag whose value is blank or isn't a valid address is skipped for that submission, and so is a field an account email action names that the template doesn't have. `{{ signer.email }}` sends each of the submission's signers their own email, to them alone, and everyone else in `to`, `cc` and `bcc` one email together, without the signers. An email needs at least one entry in `to`, `cc` or `bcc`, and at most 10 across them.
23
+ attr_accessor :to
24
+
25
+ # Who is copied on each email, as in `to` (but not `{{ signer.email }}`).
26
+ attr_accessor :cc
27
+
28
+ # Who is blind-copied on each email, as in `to` (but not `{{ signer.email }}`).
29
+ attr_accessor :bcc
30
+
31
+ # The sender's name. Null uses your account's name. From DocSpring's shared address, the name is followed by "via DocSpring".
32
+ attr_accessor :from_name
33
+
34
+ # The sender's address, at one of your verified email domains. Null sends from DocSpring's shared address.
35
+ attr_accessor :from_address
36
+
37
+ # Where replies go: a team member's email address, or an address at one of your verified email domains. Null sends without a reply address.
38
+ attr_accessor :reply_to
39
+
40
+ # The subject line, a Liquid template with the variables `account.name`, `template.name`, `template.id`, `submission.id`, the submission's values as `data.<field name>` (`data["field name"]` for a name with spaces) and its metadata as `metadata.<key>`, such as `Your {{ template.name }}`. Null uses the template's name followed by the file it sends, such as "Lease PDF", or by "files" when it sends several.
41
+ attr_accessor :subject
42
+
43
+ # The email's text, a Liquid template with the same variables as `subject`. `if`, `unless` and `case` tags work. Line breaks are kept. Null uses a short message that says the files are attached or ready to download.
44
+ attr_accessor :message
45
+
46
+ # The attached files' name, a Liquid template with the same variables as `subject`, such as `{{ data.last_name }} lease`. Each file's extension (`.pdf`, `.docx` or `.odt`) is added. Null uses the submission's `pdf_filename` metadata when it has one, and otherwise the template's name. A download link's files have the names their other downloads have: the submission's `pdf_filename`, or its ID.
47
+ attr_accessor :file_name
48
+
49
+ # Which of the submission's files the email sends: `all` sends every file the submission made (its PDF, and a Word template's Word document and OpenDocument file when it made them), and `docx`, `odt` or `pdf` sends only that file. A submission that made none of them sends nothing, and its email shows as skipped. Only Word templates make Word documents and OpenDocument files, so another template's email action takes `pdf` or `all`.
50
+ attr_accessor :file_formats
51
+
52
+ # `attachment` attaches the files, or sends a download link when together they're larger than `max_attachment_mb`. `link` sends a download link, which works for 7 days. Accounts with a BAA start with `link`.
53
+ attr_accessor :delivery
54
+
55
+ # With `delivery` `attachment`, files larger than this many megabytes in all (1 MB is 1,000,000 bytes) are sent as a download link instead. Emailing a file makes it about 38% larger, and many company mail servers refuse emails over 10 MB, so the default is 7. Raise it only when every recipient's mail server accepts larger emails, such as Microsoft 365 (up to 36 MB) or Gmail (50 MB).
56
+ attr_accessor :max_attachment_mb
57
+
58
+ # Which submissions send emails: `live`, `test` or `all`. Test submissions only email your team's members, and skip every other recipient.
59
+ attr_accessor :submission_type
60
+
61
+ # Sends the email only when the submission's values meet these conditions, which work as a conditional logic rule's do. The values are the ones the PDF has: formulas worked out, and blank for a field that a rule hides. A field the template doesn't have (in an account email action's conditions) counts as blank. A submission that doesn't meet them sends nothing, and its email shows as skipped. Null sends for every submission.
62
+ attr_accessor :send_when
63
+
64
+ class EnumAttributeValidator
65
+ attr_reader :datatype
66
+ attr_reader :allowable_values
67
+
68
+ def initialize(datatype, allowable_values)
69
+ @allowable_values = allowable_values.map do |value|
70
+ case datatype.to_s
71
+ when /Integer/i
72
+ value.to_i
73
+ when /Float/i
74
+ value.to_f
75
+ else
76
+ value
77
+ end
78
+ end
79
+ end
80
+
81
+ def valid?(value)
82
+ !value || allowable_values.include?(value)
83
+ end
84
+ end
85
+
86
+ # Attribute mapping from ruby-style variable name to JSON key.
87
+ def self.attribute_map
88
+ {
89
+ :'enabled' => :'enabled',
90
+ :'to' => :'to',
91
+ :'cc' => :'cc',
92
+ :'bcc' => :'bcc',
93
+ :'from_name' => :'from_name',
94
+ :'from_address' => :'from_address',
95
+ :'reply_to' => :'reply_to',
96
+ :'subject' => :'subject',
97
+ :'message' => :'message',
98
+ :'file_name' => :'file_name',
99
+ :'file_formats' => :'file_formats',
100
+ :'delivery' => :'delivery',
101
+ :'max_attachment_mb' => :'max_attachment_mb',
102
+ :'submission_type' => :'submission_type',
103
+ :'send_when' => :'send_when'
104
+ }
105
+ end
106
+
107
+ # Returns attribute mapping this model knows about
108
+ def self.acceptable_attribute_map
109
+ attribute_map
110
+ end
111
+
112
+ # Returns all the JSON keys this model knows about
113
+ def self.acceptable_attributes
114
+ acceptable_attribute_map.values
115
+ end
116
+
117
+ # Attribute type mapping.
118
+ def self.openapi_types
119
+ {
120
+ :'enabled' => :'Boolean',
121
+ :'to' => :'Array<String>',
122
+ :'cc' => :'Array<String>',
123
+ :'bcc' => :'Array<String>',
124
+ :'from_name' => :'String',
125
+ :'from_address' => :'String',
126
+ :'reply_to' => :'String',
127
+ :'subject' => :'String',
128
+ :'message' => :'String',
129
+ :'file_name' => :'String',
130
+ :'file_formats' => :'EmailActionFileFormats',
131
+ :'delivery' => :'EmailActionDelivery',
132
+ :'max_attachment_mb' => :'Integer',
133
+ :'submission_type' => :'EmailActionSubmissionType',
134
+ :'send_when' => :'EmailActionConditionsInput'
135
+ }
136
+ end
137
+
138
+ # List of attributes with nullable: true
139
+ def self.openapi_nullable
140
+ Set.new([
141
+ :'from_name',
142
+ :'from_address',
143
+ :'reply_to',
144
+ :'subject',
145
+ :'message',
146
+ :'file_name',
147
+ :'send_when'
148
+ ])
149
+ end
150
+
151
+ # Returns attribute type mapping
152
+ def self.acceptable_openapi_types
153
+ openapi_types
154
+ end
155
+
156
+ # Returns the nullable attributes
157
+ def self.acceptable_openapi_nullable
158
+ openapi_nullable
159
+ end
160
+
161
+ # Initializes the object
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ def initialize(attributes = {})
164
+ if (!attributes.is_a?(Hash))
165
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::UpdateEmailActionCustomizationRequest` initialize method"
166
+ end
167
+
168
+ # check to see if the attribute exists and convert string to symbol for hash key
169
+ acceptable_attribute_map = self.class.acceptable_attribute_map
170
+ attributes = attributes.each_with_object({}) { |(k, v), h|
171
+ if (!acceptable_attribute_map.key?(k.to_sym))
172
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::UpdateEmailActionCustomizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
173
+ end
174
+ h[k.to_sym] = v
175
+ }
176
+
177
+ if attributes.key?(:'enabled')
178
+ self.enabled = attributes[:'enabled']
179
+ end
180
+
181
+ if attributes.key?(:'to')
182
+ if (value = attributes[:'to']).is_a?(Array)
183
+ self.to = value
184
+ end
185
+ end
186
+
187
+ if attributes.key?(:'cc')
188
+ if (value = attributes[:'cc']).is_a?(Array)
189
+ self.cc = value
190
+ end
191
+ end
192
+
193
+ if attributes.key?(:'bcc')
194
+ if (value = attributes[:'bcc']).is_a?(Array)
195
+ self.bcc = value
196
+ end
197
+ end
198
+
199
+ if attributes.key?(:'from_name')
200
+ self.from_name = attributes[:'from_name']
201
+ end
202
+
203
+ if attributes.key?(:'from_address')
204
+ self.from_address = attributes[:'from_address']
205
+ end
206
+
207
+ if attributes.key?(:'reply_to')
208
+ self.reply_to = attributes[:'reply_to']
209
+ end
210
+
211
+ if attributes.key?(:'subject')
212
+ self.subject = attributes[:'subject']
213
+ end
214
+
215
+ if attributes.key?(:'message')
216
+ self.message = attributes[:'message']
217
+ end
218
+
219
+ if attributes.key?(:'file_name')
220
+ self.file_name = attributes[:'file_name']
221
+ end
222
+
223
+ if attributes.key?(:'file_formats')
224
+ self.file_formats = attributes[:'file_formats']
225
+ end
226
+
227
+ if attributes.key?(:'delivery')
228
+ self.delivery = attributes[:'delivery']
229
+ end
230
+
231
+ if attributes.key?(:'max_attachment_mb')
232
+ self.max_attachment_mb = attributes[:'max_attachment_mb']
233
+ end
234
+
235
+ if attributes.key?(:'submission_type')
236
+ self.submission_type = attributes[:'submission_type']
237
+ end
238
+
239
+ if attributes.key?(:'send_when')
240
+ self.send_when = attributes[:'send_when']
241
+ end
242
+ end
243
+
244
+ # Show invalid properties with the reasons. Usually used together with valid?
245
+ # @return Array for valid properties with the reasons
246
+ def list_invalid_properties
247
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
248
+ invalid_properties = Array.new
249
+ invalid_properties
250
+ end
251
+
252
+ # Check to see if the all the properties in the model are valid
253
+ # @return true if the model is valid
254
+ def valid?
255
+ warn '[DEPRECATED] the `valid?` method is obsolete'
256
+ true
257
+ end
258
+
259
+ # Checks equality by comparing each attribute.
260
+ # @param [Object] Object to be compared
261
+ def ==(o)
262
+ return true if self.equal?(o)
263
+ self.class == o.class &&
264
+ enabled == o.enabled &&
265
+ to == o.to &&
266
+ cc == o.cc &&
267
+ bcc == o.bcc &&
268
+ from_name == o.from_name &&
269
+ from_address == o.from_address &&
270
+ reply_to == o.reply_to &&
271
+ subject == o.subject &&
272
+ message == o.message &&
273
+ file_name == o.file_name &&
274
+ file_formats == o.file_formats &&
275
+ delivery == o.delivery &&
276
+ max_attachment_mb == o.max_attachment_mb &&
277
+ submission_type == o.submission_type &&
278
+ send_when == o.send_when
279
+ end
280
+
281
+ # @see the `==` method
282
+ # @param [Object] Object to be compared
283
+ def eql?(o)
284
+ self == o
285
+ end
286
+
287
+ # Calculates hash code according to all attributes.
288
+ # @return [Integer] Hash code
289
+ def hash
290
+ [enabled, to, cc, bcc, from_name, from_address, reply_to, subject, message, file_name, file_formats, delivery, max_attachment_mb, submission_type, send_when].hash
291
+ end
292
+
293
+ # Builds the object from hash
294
+ # @param [Hash] attributes Model attributes in the form of hash
295
+ # @return [Object] Returns the model itself
296
+ def self.build_from_hash(attributes)
297
+ return nil unless attributes.is_a?(Hash)
298
+ attributes = attributes.transform_keys(&:to_sym)
299
+ # include attributes inherited from allOf parents (the nearest declaration wins)
300
+ map = acceptable_attribute_map
301
+ transformed_hash = {}
302
+ acceptable_openapi_types.each_pair do |key, type|
303
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
304
+ transformed_hash["#{key}"] = nil
305
+ elsif type =~ /\AArray<(.*)>/i
306
+ # check to ensure the input is an array given that the attribute
307
+ # is documented as an array but the input is not
308
+ if attributes[map[key]].is_a?(Array)
309
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
310
+ end
311
+ elsif !attributes[map[key]].nil?
312
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
313
+ end
314
+ end
315
+ # Responses can include enum values added after this client was released, so the enum setters
316
+ # accept any value while the model is built from a response
317
+ allocate.tap do |model|
318
+ model.instance_variable_set(:@_skip_enum_validation, true)
319
+ model.send(:initialize, transformed_hash)
320
+ model.remove_instance_variable(:@_skip_enum_validation)
321
+ end
322
+ end
323
+
324
+ # Returns the object in the form of hash
325
+ # @return [Hash] Returns the object in the form of hash
326
+ def to_hash
327
+ hash = {}
328
+ # include attributes inherited from allOf parents (the nearest declaration wins)
329
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
330
+ value = self.send(attr)
331
+ if value.nil?
332
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
333
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
334
+ end
335
+
336
+ hash[param] = _to_hash(value)
337
+ end
338
+ hash
339
+ end
340
+
341
+ end
342
+
343
+ end