docspring 4.0.0 → 4.1.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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +84 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +24 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +10 -1
  7. data/docs/AddTemplateFieldsRequest.md +18 -0
  8. data/docs/Client.md +704 -33
  9. data/docs/CreateSubmissionBatchRequest.md +2 -0
  10. data/docs/CreateSubmissionRequest.md +2 -0
  11. data/docs/CreateTemplateRequest.md +10 -2
  12. data/docs/Field.md +198 -0
  13. data/docs/FieldDependency.md +22 -0
  14. data/docs/FieldDependencyInput.md +22 -0
  15. data/docs/FieldGroup.md +32 -0
  16. data/docs/FieldGroupInput.md +30 -0
  17. data/docs/FieldGroupType.md +15 -0
  18. data/docs/FieldInput.md +196 -0
  19. data/docs/FieldType.md +15 -0
  20. data/docs/GenerateFilesFormat.md +15 -0
  21. data/docs/GenerateSubmissionFilesRequest.md +18 -0
  22. data/docs/OutputFormat.md +15 -0
  23. data/docs/PageImage.md +34 -0
  24. data/docs/PageImages.md +24 -0
  25. data/docs/PredefinedField.md +30 -0
  26. data/docs/PredefinedFieldInput.md +30 -0
  27. data/docs/RemoveTemplateFieldsRequest.md +18 -0
  28. data/docs/ReorderTemplateFieldsRequest.md +18 -0
  29. data/docs/Submission.md +3 -1
  30. data/docs/SubmissionFiles.md +3 -1
  31. data/docs/SubmissionInput.md +2 -0
  32. data/docs/SubmissionValidation.md +24 -0
  33. data/docs/Template.md +6 -0
  34. data/docs/TemplateDiff.md +30 -0
  35. data/docs/TemplateDiffSummary.md +28 -0
  36. data/docs/TemplateDocument.md +3 -3
  37. data/docs/TemplateFieldChange.md +24 -0
  38. data/docs/TemplateFieldChanges.md +24 -0
  39. data/docs/TemplateFieldDependency.md +1 -1
  40. data/docs/TemplateFieldDependencyInput.md +1 -1
  41. data/docs/TemplateFieldMove.md +22 -0
  42. data/docs/TemplateFields.md +22 -0
  43. data/docs/TemplatePageImages.md +24 -0
  44. data/docs/UpdateTemplateDocumentRequest.md +6 -2
  45. data/docs/UpdateTemplateFieldsRequest.md +18 -0
  46. data/docs/UpdateTemplateRequest.md +6 -0
  47. data/docs/ValidateSubmissionRequest.md +38 -0
  48. data/lib/docspring/api/client.rb +666 -18
  49. data/lib/docspring/api_client.rb +1 -1
  50. data/lib/docspring/models/add_template_fields_request.rb +187 -0
  51. data/lib/docspring/models/create_submission_batch_request.rb +23 -1
  52. data/lib/docspring/models/create_submission_request.rb +23 -1
  53. data/lib/docspring/models/create_template_request.rb +48 -3
  54. data/lib/docspring/models/field.rb +2217 -0
  55. data/lib/docspring/models/field_dependency.rb +246 -0
  56. data/lib/docspring/models/field_dependency_input.rb +246 -0
  57. data/lib/docspring/models/field_group.rb +368 -0
  58. data/lib/docspring/models/field_group_input.rb +247 -0
  59. data/lib/docspring/models/field_group_type.rb +41 -0
  60. data/lib/docspring/models/field_input.rb +1109 -0
  61. data/lib/docspring/models/field_type.rb +54 -0
  62. data/lib/docspring/models/generate_files_format.rb +40 -0
  63. data/lib/docspring/models/generate_submission_files_request.rb +187 -0
  64. data/lib/docspring/models/output_format.rb +41 -0
  65. data/lib/docspring/models/page_image.rb +359 -0
  66. data/lib/docspring/models/page_images.rb +248 -0
  67. data/lib/docspring/models/predefined_field.rb +287 -0
  68. data/lib/docspring/models/predefined_field_input.rb +287 -0
  69. data/lib/docspring/models/remove_template_fields_request.rb +187 -0
  70. data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
  71. data/lib/docspring/models/submission.rb +31 -2
  72. data/lib/docspring/models/submission_files.rb +13 -4
  73. data/lib/docspring/models/submission_input.rb +23 -1
  74. data/lib/docspring/models/submission_validation.rb +234 -0
  75. data/lib/docspring/models/template.rb +74 -1
  76. data/lib/docspring/models/template_diff.rb +321 -0
  77. data/lib/docspring/models/template_diff_summary.rb +320 -0
  78. data/lib/docspring/models/template_document.rb +3 -3
  79. data/lib/docspring/models/template_document_state.rb +3 -1
  80. data/lib/docspring/models/template_field_change.rb +266 -0
  81. data/lib/docspring/models/template_field_changes.rb +274 -0
  82. data/lib/docspring/models/template_field_dependency.rb +1 -1
  83. data/lib/docspring/models/template_field_dependency_input.rb +1 -1
  84. data/lib/docspring/models/template_field_move.rb +239 -0
  85. data/lib/docspring/models/template_fields.rb +227 -0
  86. data/lib/docspring/models/template_page_images.rb +254 -0
  87. data/lib/docspring/models/update_template_document_request.rb +23 -20
  88. data/lib/docspring/models/update_template_fields_request.rb +187 -0
  89. data/lib/docspring/models/update_template_request.rb +38 -1
  90. data/lib/docspring/models/validate_submission_request.rb +288 -0
  91. data/lib/docspring/request_schemas.json +3364 -1584
  92. data/lib/docspring/version.rb +1 -1
  93. data/lib/docspring.rb +28 -0
  94. data/spec/api/client_spec.rb +128 -9
  95. data/spec/models/add_template_fields_request_spec.rb +36 -0
  96. data/spec/models/create_submission_batch_request_spec.rb +6 -0
  97. data/spec/models/create_submission_request_spec.rb +6 -0
  98. data/spec/models/create_template_request_spec.rb +24 -0
  99. data/spec/models/field_dependency_input_spec.rb +48 -0
  100. data/spec/models/field_dependency_spec.rb +48 -0
  101. data/spec/models/field_group_input_spec.rb +72 -0
  102. data/spec/models/field_group_spec.rb +78 -0
  103. data/spec/models/field_group_type_spec.rb +30 -0
  104. data/spec/models/field_input_spec.rb +570 -0
  105. data/spec/models/field_spec.rb +576 -0
  106. data/spec/models/field_type_spec.rb +30 -0
  107. data/spec/models/generate_files_format_spec.rb +30 -0
  108. data/spec/models/generate_submission_files_request_spec.rb +36 -0
  109. data/spec/models/output_format_spec.rb +30 -0
  110. data/spec/models/page_image_spec.rb +84 -0
  111. data/spec/models/page_images_spec.rb +54 -0
  112. data/spec/models/predefined_field_input_spec.rb +72 -0
  113. data/spec/models/predefined_field_spec.rb +72 -0
  114. data/spec/models/remove_template_fields_request_spec.rb +36 -0
  115. data/spec/models/reorder_template_fields_request_spec.rb +36 -0
  116. data/spec/models/submission_files_spec.rb +6 -0
  117. data/spec/models/submission_input_spec.rb +6 -0
  118. data/spec/models/submission_spec.rb +6 -0
  119. data/spec/models/submission_validation_spec.rb +54 -0
  120. data/spec/models/template_diff_spec.rb +72 -0
  121. data/spec/models/template_diff_summary_spec.rb +66 -0
  122. data/spec/models/template_field_change_spec.rb +54 -0
  123. data/spec/models/template_field_changes_spec.rb +54 -0
  124. data/spec/models/template_field_move_spec.rb +48 -0
  125. data/spec/models/template_fields_spec.rb +48 -0
  126. data/spec/models/template_page_images_spec.rb +54 -0
  127. data/spec/models/template_spec.rb +18 -0
  128. data/spec/models/update_template_document_request_spec.rb +12 -0
  129. data/spec/models/update_template_fields_request_spec.rb +36 -0
  130. data/spec/models/update_template_request_spec.rb +18 -0
  131. data/spec/models/validate_submission_request_spec.rb +96 -0
  132. metadata +113 -1
@@ -0,0 +1,266 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or 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 field whose settings changed between two versions of a template.
18
+ class TemplateFieldChange < ApiModelBase
19
+ # The field's ID.
20
+ attr_accessor :id
21
+
22
+ # The names of the settings that changed, such as `x` or `required`.
23
+ attr_accessor :changed_settings
24
+
25
+ attr_accessor :old
26
+
27
+ attr_accessor :new
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'id' => :'id',
33
+ :'changed_settings' => :'changed_settings',
34
+ :'old' => :'old',
35
+ :'new' => :'new'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'id' => :'Integer',
53
+ :'changed_settings' => :'Array<String>',
54
+ :'old' => :'Field',
55
+ :'new' => :'Field'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Returns attribute type mapping
66
+ def self.acceptable_openapi_types
67
+ openapi_types
68
+ end
69
+
70
+ # Returns the nullable attributes
71
+ def self.acceptable_openapi_nullable
72
+ openapi_nullable
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::TemplateFieldChange` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!acceptable_attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::TemplateFieldChange`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'id')
92
+ self.id = attributes[:'id']
93
+ else
94
+ self.id = nil
95
+ end
96
+
97
+ if attributes.key?(:'changed_settings')
98
+ if (value = attributes[:'changed_settings']).is_a?(Array)
99
+ self.changed_settings = value
100
+ end
101
+ else
102
+ self.changed_settings = nil
103
+ end
104
+
105
+ if attributes.key?(:'old')
106
+ self.old = attributes[:'old']
107
+ else
108
+ self.old = nil
109
+ end
110
+
111
+ if attributes.key?(:'new')
112
+ self.new = attributes[:'new']
113
+ else
114
+ self.new = nil
115
+ end
116
+ end
117
+
118
+ # Show invalid properties with the reasons. Usually used together with valid?
119
+ # @return Array for valid properties with the reasons
120
+ def list_invalid_properties
121
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
+ invalid_properties = Array.new
123
+ if @id.nil?
124
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
125
+ end
126
+
127
+ if @changed_settings.nil?
128
+ invalid_properties.push('invalid value for "changed_settings", changed_settings cannot be nil.')
129
+ end
130
+
131
+ if @old.nil?
132
+ invalid_properties.push('invalid value for "old", old cannot be nil.')
133
+ end
134
+
135
+ if @new.nil?
136
+ invalid_properties.push('invalid value for "new", new cannot be nil.')
137
+ end
138
+
139
+ invalid_properties
140
+ end
141
+
142
+ # Check to see if the all the properties in the model are valid
143
+ # @return true if the model is valid
144
+ def valid?
145
+ warn '[DEPRECATED] the `valid?` method is obsolete'
146
+ return false if @id.nil?
147
+ return false if @changed_settings.nil?
148
+ return false if @old.nil?
149
+ return false if @new.nil?
150
+ true
151
+ end
152
+
153
+ # Custom attribute writer method with validation
154
+ # @param [Object] id Value to be assigned
155
+ def id=(id)
156
+ if id.nil?
157
+ fail ArgumentError, 'id cannot be nil'
158
+ end
159
+
160
+ @id = id
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] changed_settings Value to be assigned
165
+ def changed_settings=(changed_settings)
166
+ if changed_settings.nil?
167
+ fail ArgumentError, 'changed_settings cannot be nil'
168
+ end
169
+
170
+ @changed_settings = changed_settings
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] old Value to be assigned
175
+ def old=(old)
176
+ if old.nil?
177
+ fail ArgumentError, 'old cannot be nil'
178
+ end
179
+
180
+ @old = old
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] new Value to be assigned
185
+ def new=(new)
186
+ if new.nil?
187
+ fail ArgumentError, 'new cannot be nil'
188
+ end
189
+
190
+ @new = new
191
+ end
192
+
193
+ # Checks equality by comparing each attribute.
194
+ # @param [Object] Object to be compared
195
+ def ==(o)
196
+ return true if self.equal?(o)
197
+ self.class == o.class &&
198
+ id == o.id &&
199
+ changed_settings == o.changed_settings &&
200
+ old == o.old &&
201
+ new == o.new
202
+ end
203
+
204
+ # @see the `==` method
205
+ # @param [Object] Object to be compared
206
+ def eql?(o)
207
+ self == o
208
+ end
209
+
210
+ # Calculates hash code according to all attributes.
211
+ # @return [Integer] Hash code
212
+ def hash
213
+ [id, changed_settings, old, new].hash
214
+ end
215
+
216
+ # Builds the object from hash
217
+ # @param [Hash] attributes Model attributes in the form of hash
218
+ # @return [Object] Returns the model itself
219
+ def self.build_from_hash(attributes)
220
+ return nil unless attributes.is_a?(Hash)
221
+ attributes = attributes.transform_keys(&:to_sym)
222
+ # include attributes inherited from allOf parents (the nearest declaration wins)
223
+ map = acceptable_attribute_map
224
+ transformed_hash = {}
225
+ acceptable_openapi_types.each_pair do |key, type|
226
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
227
+ transformed_hash["#{key}"] = nil
228
+ elsif type =~ /\AArray<(.*)>/i
229
+ # check to ensure the input is an array given that the attribute
230
+ # is documented as an array but the input is not
231
+ if attributes[map[key]].is_a?(Array)
232
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
233
+ end
234
+ elsif !attributes[map[key]].nil?
235
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
236
+ end
237
+ end
238
+ # Responses can include enum values added after this client was released, so the enum setters
239
+ # accept any value while the model is built from a response
240
+ allocate.tap do |model|
241
+ model.instance_variable_set(:@_skip_enum_validation, true)
242
+ model.send(:initialize, transformed_hash)
243
+ model.remove_instance_variable(:@_skip_enum_validation)
244
+ end
245
+ end
246
+
247
+ # Returns the object in the form of hash
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_hash
250
+ hash = {}
251
+ # include attributes inherited from allOf parents (the nearest declaration wins)
252
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
253
+ value = self.send(attr)
254
+ if value.nil?
255
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
256
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
257
+ end
258
+
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -0,0 +1,274 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or 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 fields that changed between two versions of a template.
18
+ class TemplateFieldChanges < ApiModelBase
19
+ # The fields that `to_version` has and `from_version` doesn't.
20
+ attr_accessor :added
21
+
22
+ # The fields that `from_version` has and `to_version` doesn't, as they were.
23
+ attr_accessor :removed
24
+
25
+ # The fields with changed settings.
26
+ attr_accessor :changed
27
+
28
+ # The fields that moved in the template's field order (the order of its fields across all its pages, as the fields endpoint lists them): fields that swapped places, or the field that moved the furthest. The fields that a move pushed along aren't listed.
29
+ attr_accessor :reordered
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'added' => :'added',
35
+ :'removed' => :'removed',
36
+ :'changed' => :'changed',
37
+ :'reordered' => :'reordered'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'added' => :'Array<Field>',
55
+ :'removed' => :'Array<Field>',
56
+ :'changed' => :'Array<TemplateFieldChange>',
57
+ :'reordered' => :'Array<TemplateFieldMove>'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Returns attribute type mapping
68
+ def self.acceptable_openapi_types
69
+ openapi_types
70
+ end
71
+
72
+ # Returns the nullable attributes
73
+ def self.acceptable_openapi_nullable
74
+ openapi_nullable
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::TemplateFieldChanges` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ acceptable_attribute_map = self.class.acceptable_attribute_map
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!acceptable_attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::TemplateFieldChanges`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'added')
94
+ if (value = attributes[:'added']).is_a?(Array)
95
+ self.added = value
96
+ end
97
+ else
98
+ self.added = nil
99
+ end
100
+
101
+ if attributes.key?(:'removed')
102
+ if (value = attributes[:'removed']).is_a?(Array)
103
+ self.removed = value
104
+ end
105
+ else
106
+ self.removed = nil
107
+ end
108
+
109
+ if attributes.key?(:'changed')
110
+ if (value = attributes[:'changed']).is_a?(Array)
111
+ self.changed = value
112
+ end
113
+ else
114
+ self.changed = nil
115
+ end
116
+
117
+ if attributes.key?(:'reordered')
118
+ if (value = attributes[:'reordered']).is_a?(Array)
119
+ self.reordered = value
120
+ end
121
+ else
122
+ self.reordered = nil
123
+ end
124
+ end
125
+
126
+ # Show invalid properties with the reasons. Usually used together with valid?
127
+ # @return Array for valid properties with the reasons
128
+ def list_invalid_properties
129
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
130
+ invalid_properties = Array.new
131
+ if @added.nil?
132
+ invalid_properties.push('invalid value for "added", added cannot be nil.')
133
+ end
134
+
135
+ if @removed.nil?
136
+ invalid_properties.push('invalid value for "removed", removed cannot be nil.')
137
+ end
138
+
139
+ if @changed.nil?
140
+ invalid_properties.push('invalid value for "changed", changed cannot be nil.')
141
+ end
142
+
143
+ if @reordered.nil?
144
+ invalid_properties.push('invalid value for "reordered", reordered cannot be nil.')
145
+ end
146
+
147
+ invalid_properties
148
+ end
149
+
150
+ # Check to see if the all the properties in the model are valid
151
+ # @return true if the model is valid
152
+ def valid?
153
+ warn '[DEPRECATED] the `valid?` method is obsolete'
154
+ return false if @added.nil?
155
+ return false if @removed.nil?
156
+ return false if @changed.nil?
157
+ return false if @reordered.nil?
158
+ true
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] added Value to be assigned
163
+ def added=(added)
164
+ if added.nil?
165
+ fail ArgumentError, 'added cannot be nil'
166
+ end
167
+
168
+ @added = added
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] removed Value to be assigned
173
+ def removed=(removed)
174
+ if removed.nil?
175
+ fail ArgumentError, 'removed cannot be nil'
176
+ end
177
+
178
+ @removed = removed
179
+ end
180
+
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] changed Value to be assigned
183
+ def changed=(changed)
184
+ if changed.nil?
185
+ fail ArgumentError, 'changed cannot be nil'
186
+ end
187
+
188
+ @changed = changed
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] reordered Value to be assigned
193
+ def reordered=(reordered)
194
+ if reordered.nil?
195
+ fail ArgumentError, 'reordered cannot be nil'
196
+ end
197
+
198
+ @reordered = reordered
199
+ end
200
+
201
+ # Checks equality by comparing each attribute.
202
+ # @param [Object] Object to be compared
203
+ def ==(o)
204
+ return true if self.equal?(o)
205
+ self.class == o.class &&
206
+ added == o.added &&
207
+ removed == o.removed &&
208
+ changed == o.changed &&
209
+ reordered == o.reordered
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Integer] Hash code
220
+ def hash
221
+ [added, removed, changed, reordered].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def self.build_from_hash(attributes)
228
+ return nil unless attributes.is_a?(Hash)
229
+ attributes = attributes.transform_keys(&:to_sym)
230
+ # include attributes inherited from allOf parents (the nearest declaration wins)
231
+ map = acceptable_attribute_map
232
+ transformed_hash = {}
233
+ acceptable_openapi_types.each_pair do |key, type|
234
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
235
+ transformed_hash["#{key}"] = nil
236
+ elsif type =~ /\AArray<(.*)>/i
237
+ # check to ensure the input is an array given that the attribute
238
+ # is documented as an array but the input is not
239
+ if attributes[map[key]].is_a?(Array)
240
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
241
+ end
242
+ elsif !attributes[map[key]].nil?
243
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
244
+ end
245
+ end
246
+ # Responses can include enum values added after this client was released, so the enum setters
247
+ # accept any value while the model is built from a response
248
+ allocate.tap do |model|
249
+ model.instance_variable_set(:@_skip_enum_validation, true)
250
+ model.send(:initialize, transformed_hash)
251
+ model.remove_instance_variable(:@_skip_enum_validation)
252
+ end
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ # include attributes inherited from allOf parents (the nearest declaration wins)
260
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
261
+ value = self.send(attr)
262
+ if value.nil?
263
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
264
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
265
+ end
266
+
267
+ hash[param] = _to_hash(value)
268
+ end
269
+ hash
270
+ end
271
+
272
+ end
273
+
274
+ end
@@ -16,7 +16,7 @@ require 'time'
16
16
  module DocSpring
17
17
  # A conditional logic rule: when other fields' values meet its conditions, it shows its target fields, makes them required, or both.
18
18
  class TemplateFieldDependency < ApiModelBase
19
- # What the rule does to its targets when its conditions are met.
19
+ # What the rule does to the fields it applies to when its conditions are met.
20
20
  attr_accessor :action
21
21
 
22
22
  # Whether all of the conditions (the default) or any of them must be met.
@@ -16,7 +16,7 @@ require 'time'
16
16
  module DocSpring
17
17
  # A conditional logic rule: when other fields' values meet its conditions, it shows its target fields, makes them required, or both.
18
18
  class TemplateFieldDependencyInput < ApiModelBase
19
- # What the rule does to its targets when its conditions are met.
19
+ # What the rule does to the fields it applies to when its conditions are met.
20
20
  attr_accessor :action
21
21
 
22
22
  # Whether all of the conditions (the default) or any of them must be met.