docspring 4.6.0 → 4.8.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +25 -1
- data/lib/docspring/api/client.rb +1934 -209
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/add_page_numbers_request.rb +279 -0
- data/lib/docspring/models/ask_support_help_request.rb +217 -0
- data/lib/docspring/models/base64_job_source.rb +222 -0
- data/lib/docspring/models/combined_pdf_job_source.rb +222 -0
- data/lib/docspring/models/compress_pdf_request.rb +207 -0
- data/lib/docspring/models/create_template_request.rb +22 -2
- data/lib/docspring/models/custom_file_job_source.rb +222 -0
- data/lib/docspring/models/decrypt_pdf_request.rb +217 -0
- data/lib/docspring/models/encrypt_pdf_request.rb +237 -0
- data/lib/docspring/models/error_code.rb +4 -1
- data/lib/docspring/models/error_info.rb +25 -5
- data/lib/docspring/models/extract_pages_request.rb +234 -0
- data/lib/docspring/models/field.rb +1 -1
- data/lib/docspring/models/field_input.rb +1 -1
- data/lib/docspring/models/flatten_pdf_request.rb +207 -0
- data/lib/docspring/models/html_engine_options.rb +1 -1
- data/lib/docspring/models/html_engine_options_input.rb +1 -1
- data/lib/docspring/models/htmlto_pdf_request.rb +322 -0
- data/lib/docspring/models/image_format.rb +41 -0
- data/lib/docspring/models/images_to_pdf_request.rb +241 -0
- data/lib/docspring/models/job.rb +508 -0
- data/lib/docspring/models/job_file.rb +308 -0
- data/lib/docspring/models/job_file_job_source.rb +232 -0
- data/lib/docspring/models/job_html_engine.rb +41 -0
- data/lib/docspring/models/job_list.rb +200 -0
- data/lib/docspring/models/job_operation.rb +53 -0
- data/lib/docspring/models/job_operation_filter.rb +53 -0
- data/lib/docspring/models/job_options.rb +392 -0
- data/lib/docspring/models/job_page_margin.rb +198 -0
- data/lib/docspring/models/job_page_size.rb +51 -0
- data/lib/docspring/models/job_source.rb +267 -0
- data/lib/docspring/models/job_source_input.rb +66 -0
- data/lib/docspring/models/job_source_type.rb +46 -0
- data/lib/docspring/models/job_state.rb +42 -0
- data/lib/docspring/models/markdown_to_pdf_request.rb +312 -0
- data/lib/docspring/models/open_support_ticket_request.rb +363 -0
- data/lib/docspring/models/page_image.rb +3 -3
- data/lib/docspring/models/page_number_position.rb +45 -0
- data/lib/docspring/models/page_size.rb +45 -0
- data/lib/docspring/models/pdf_permissions.rb +198 -0
- data/lib/docspring/models/pdf_permissions_input.rb +198 -0
- data/lib/docspring/models/pdfto_images_request.rb +269 -0
- data/lib/docspring/models/pdfto_text_request.rb +217 -0
- data/lib/docspring/models/reply_to_support_ticket_request.rb +217 -0
- data/lib/docspring/models/rotate_pages_request.rb +244 -0
- data/lib/docspring/models/send_support_feedback_request.rb +363 -0
- data/lib/docspring/models/split_pdf_request.rb +229 -0
- data/lib/docspring/models/submission_job_source.rb +222 -0
- data/lib/docspring/models/support_feedback.rb +239 -0
- data/lib/docspring/models/support_help.rb +316 -0
- data/lib/docspring/models/support_help_source.rb +212 -0
- data/lib/docspring/models/support_help_state.rb +42 -0
- data/lib/docspring/models/support_help_turn.rb +234 -0
- data/lib/docspring/models/support_help_turn_role.rb +41 -0
- data/lib/docspring/models/support_message.rb +301 -0
- data/lib/docspring/models/support_message_author.rb +42 -0
- data/lib/docspring/models/support_report_agent.rb +188 -0
- data/lib/docspring/models/support_report_category.rb +57 -0
- data/lib/docspring/models/support_report_impact.rb +42 -0
- data/lib/docspring/models/support_report_kind.rb +47 -0
- data/lib/docspring/models/support_report_source.rb +41 -0
- data/lib/docspring/models/support_ticket.rb +637 -0
- data/lib/docspring/models/support_ticket_list.rb +200 -0
- data/lib/docspring/models/support_ticket_list_status.rb +42 -0
- data/lib/docspring/models/support_ticket_notifications.rb +197 -0
- data/lib/docspring/models/support_ticket_reply.rb +210 -0
- data/lib/docspring/models/support_ticket_reply_outcome.rb +41 -0
- data/lib/docspring/models/support_ticket_resolution.rb +45 -0
- data/lib/docspring/models/support_ticket_status.rb +43 -0
- data/lib/docspring/models/support_ticket_watch.rb +239 -0
- data/lib/docspring/models/template.rb +41 -2
- data/lib/docspring/models/template_blank_page.rb +212 -0
- data/lib/docspring/models/template_blank_page_input.rb +212 -0
- data/lib/docspring/models/template_document.rb +1 -1
- data/lib/docspring/models/template_html_engine.rb +41 -0
- data/lib/docspring/models/template_page_images.rb +3 -3
- data/lib/docspring/models/template_page_list.rb +243 -0
- data/lib/docspring/models/template_page_list_input.rb +243 -0
- data/lib/docspring/models/template_page_processing_status.rb +28 -1
- data/lib/docspring/models/update_template_request.rb +33 -2
- data/lib/docspring/models/upload_job_source.rb +222 -0
- data/lib/docspring/models/url_job_source.rb +222 -0
- data/lib/docspring/models/watermark_layer.rb +41 -0
- data/lib/docspring/models/watermark_pdf_request.rb +316 -0
- data/lib/docspring/models/webhook_event_type.rb +4 -1
- data/lib/docspring/request_schemas.json +2424 -46
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +71 -0
- metadata +72 -1
|
@@ -0,0 +1,229 @@
|
|
|
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 PDF to split, and where to split it. A job makes at most 100 files.
|
|
18
|
+
class SplitPdfRequest < ApiModelBase
|
|
19
|
+
# The file the job reads. The job shows it as `inputs[0]`.
|
|
20
|
+
attr_accessor :input
|
|
21
|
+
|
|
22
|
+
# Your own data about the job, such as an ID from your app. Up to 50 keys.
|
|
23
|
+
attr_accessor :metadata
|
|
24
|
+
|
|
25
|
+
# Seconds after the job finishes until its files are deleted, up to 10 years (315360000), sooner or later than the account's expiry setting. Defaults to the account's expiry setting for the PDF tools, which keeps them until you delete the job when it's off. A job that fails is kept for at least 48 hours.
|
|
26
|
+
attr_accessor :expires_in
|
|
27
|
+
|
|
28
|
+
# Split into files of this many pages (the last one can have fewer). Default 1, a file per page.
|
|
29
|
+
attr_accessor :pages_per_file
|
|
30
|
+
|
|
31
|
+
# One file per range instead, in order, such as `["1-2", "3-z"]`. Pages can be in more than one range. Don't send it with `pages_per_file`.
|
|
32
|
+
attr_accessor :ranges
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'input' => :'input',
|
|
38
|
+
:'metadata' => :'metadata',
|
|
39
|
+
:'expires_in' => :'expires_in',
|
|
40
|
+
:'pages_per_file' => :'pages_per_file',
|
|
41
|
+
:'ranges' => :'ranges'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'input' => :'JobSourceInput',
|
|
59
|
+
:'metadata' => :'Hash<String, Object>',
|
|
60
|
+
:'expires_in' => :'Integer',
|
|
61
|
+
:'pages_per_file' => :'Integer',
|
|
62
|
+
:'ranges' => :'Array<String>'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns attribute type mapping
|
|
73
|
+
def self.acceptable_openapi_types
|
|
74
|
+
openapi_types
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns the nullable attributes
|
|
78
|
+
def self.acceptable_openapi_nullable
|
|
79
|
+
openapi_nullable
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Initializes the object
|
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
84
|
+
def initialize(attributes = {})
|
|
85
|
+
if (!attributes.is_a?(Hash))
|
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SplitPdfRequest` initialize method"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
90
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
92
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SplitPdfRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
94
|
+
end
|
|
95
|
+
h[k.to_sym] = v
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'input')
|
|
99
|
+
self.input = attributes[:'input']
|
|
100
|
+
else
|
|
101
|
+
self.input = nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'metadata')
|
|
105
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
106
|
+
self.metadata = value
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'expires_in')
|
|
111
|
+
self.expires_in = attributes[:'expires_in']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'pages_per_file')
|
|
115
|
+
self.pages_per_file = attributes[:'pages_per_file']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'ranges')
|
|
119
|
+
if (value = attributes[:'ranges']).is_a?(Array)
|
|
120
|
+
self.ranges = value
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
126
|
+
# @return Array for valid properties with the reasons
|
|
127
|
+
def list_invalid_properties
|
|
128
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
129
|
+
invalid_properties = Array.new
|
|
130
|
+
if @input.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
invalid_properties
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Check to see if the all the properties in the model are valid
|
|
138
|
+
# @return true if the model is valid
|
|
139
|
+
def valid?
|
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
141
|
+
return false if @input.nil?
|
|
142
|
+
true
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] input Value to be assigned
|
|
147
|
+
def input=(input)
|
|
148
|
+
if input.nil?
|
|
149
|
+
fail ArgumentError, 'input cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@input = input
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Checks equality by comparing each attribute.
|
|
156
|
+
# @param [Object] Object to be compared
|
|
157
|
+
def ==(o)
|
|
158
|
+
return true if self.equal?(o)
|
|
159
|
+
self.class == o.class &&
|
|
160
|
+
input == o.input &&
|
|
161
|
+
metadata == o.metadata &&
|
|
162
|
+
expires_in == o.expires_in &&
|
|
163
|
+
pages_per_file == o.pages_per_file &&
|
|
164
|
+
ranges == o.ranges
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @see the `==` method
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def eql?(o)
|
|
170
|
+
self == o
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Calculates hash code according to all attributes.
|
|
174
|
+
# @return [Integer] Hash code
|
|
175
|
+
def hash
|
|
176
|
+
[input, metadata, expires_in, pages_per_file, ranges].hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Builds the object from hash
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
# @return [Object] Returns the model itself
|
|
182
|
+
def self.build_from_hash(attributes)
|
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
|
184
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
185
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
186
|
+
map = acceptable_attribute_map
|
|
187
|
+
transformed_hash = {}
|
|
188
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
189
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
190
|
+
transformed_hash["#{key}"] = nil
|
|
191
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
192
|
+
# check to ensure the input is an array given that the attribute
|
|
193
|
+
# is documented as an array but the input is not
|
|
194
|
+
if attributes[map[key]].is_a?(Array)
|
|
195
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
196
|
+
end
|
|
197
|
+
elsif !attributes[map[key]].nil?
|
|
198
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
202
|
+
# accept any value while the model is built from a response
|
|
203
|
+
allocate.tap do |model|
|
|
204
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
205
|
+
model.send(:initialize, transformed_hash)
|
|
206
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Returns the object in the form of hash
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_hash
|
|
213
|
+
hash = {}
|
|
214
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
215
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
216
|
+
value = self.send(attr)
|
|
217
|
+
if value.nil?
|
|
218
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
219
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
hash[param] = _to_hash(value)
|
|
223
|
+
end
|
|
224
|
+
hash
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
@@ -0,0 +1,222 @@
|
|
|
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 submission's PDF.
|
|
18
|
+
class SubmissionJobSource < ApiModelBase
|
|
19
|
+
# Must be `submission`.
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
|
|
22
|
+
# The ID of the custom file, submission, combined PDF or job.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# The file's name. The job names the files it makes after it (contract.pdf makes contract-1.pdf). Default the name of the custom file, job file or URL path.
|
|
26
|
+
attr_accessor :filename
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'type' => :'type',
|
|
32
|
+
:'id' => :'id',
|
|
33
|
+
:'filename' => :'filename'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'type' => :'String',
|
|
51
|
+
:'id' => :'String',
|
|
52
|
+
:'filename' => :'String'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns attribute type mapping
|
|
63
|
+
def self.acceptable_openapi_types
|
|
64
|
+
openapi_types
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns the nullable attributes
|
|
68
|
+
def self.acceptable_openapi_nullable
|
|
69
|
+
openapi_nullable
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SubmissionJobSource` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SubmissionJobSource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'type')
|
|
89
|
+
self.type = attributes[:'type']
|
|
90
|
+
else
|
|
91
|
+
self.type = 'submission'
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'id')
|
|
95
|
+
self.id = attributes[:'id']
|
|
96
|
+
else
|
|
97
|
+
self.id = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'filename')
|
|
101
|
+
self.filename = attributes[:'filename']
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @type.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @id.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
invalid_properties
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Check to see if the all the properties in the model are valid
|
|
122
|
+
# @return true if the model is valid
|
|
123
|
+
def valid?
|
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
|
+
return false if @type.nil?
|
|
126
|
+
return false if @id.nil?
|
|
127
|
+
true
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method with validation
|
|
131
|
+
# @param [Object] type Value to be assigned
|
|
132
|
+
def type=(type)
|
|
133
|
+
if type.nil?
|
|
134
|
+
fail ArgumentError, 'type cannot be nil'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
@type = type
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method with validation
|
|
141
|
+
# @param [Object] id Value to be assigned
|
|
142
|
+
def id=(id)
|
|
143
|
+
if id.nil?
|
|
144
|
+
fail ArgumentError, 'id cannot be nil'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
@id = id
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Checks equality by comparing each attribute.
|
|
151
|
+
# @param [Object] Object to be compared
|
|
152
|
+
def ==(o)
|
|
153
|
+
return true if self.equal?(o)
|
|
154
|
+
self.class == o.class &&
|
|
155
|
+
type == o.type &&
|
|
156
|
+
id == o.id &&
|
|
157
|
+
filename == o.filename
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# @see the `==` method
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def eql?(o)
|
|
163
|
+
self == o
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Calculates hash code according to all attributes.
|
|
167
|
+
# @return [Integer] Hash code
|
|
168
|
+
def hash
|
|
169
|
+
[type, id, filename].hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Builds the object from hash
|
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
174
|
+
# @return [Object] Returns the model itself
|
|
175
|
+
def self.build_from_hash(attributes)
|
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
|
177
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
178
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
179
|
+
map = acceptable_attribute_map
|
|
180
|
+
transformed_hash = {}
|
|
181
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
182
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
183
|
+
transformed_hash["#{key}"] = nil
|
|
184
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
185
|
+
# check to ensure the input is an array given that the attribute
|
|
186
|
+
# is documented as an array but the input is not
|
|
187
|
+
if attributes[map[key]].is_a?(Array)
|
|
188
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
189
|
+
end
|
|
190
|
+
elsif !attributes[map[key]].nil?
|
|
191
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
195
|
+
# accept any value while the model is built from a response
|
|
196
|
+
allocate.tap do |model|
|
|
197
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
198
|
+
model.send(:initialize, transformed_hash)
|
|
199
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the object in the form of hash
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_hash
|
|
206
|
+
hash = {}
|
|
207
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
208
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
209
|
+
value = self.send(attr)
|
|
210
|
+
if value.nil?
|
|
211
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
hash[param] = _to_hash(value)
|
|
216
|
+
end
|
|
217
|
+
hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
|
@@ -0,0 +1,239 @@
|
|
|
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 piece of feedback that was sent to the DocSpring team. Feedback goes one way: nobody replies to it, and it can't be read back or checked later. Open a support ticket when you need an answer.
|
|
18
|
+
class SupportFeedback < ApiModelBase
|
|
19
|
+
# The feedback's ID.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# When DocSpring received it.
|
|
23
|
+
attr_accessor :received_at
|
|
24
|
+
|
|
25
|
+
# What happens next, in a sentence for an AI agent to act on. Nobody replies to feedback.
|
|
26
|
+
attr_accessor :follow_up
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'id' => :'id',
|
|
32
|
+
:'received_at' => :'received_at',
|
|
33
|
+
:'follow_up' => :'follow_up'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'id' => :'String',
|
|
51
|
+
:'received_at' => :'Time',
|
|
52
|
+
:'follow_up' => :'String'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns attribute type mapping
|
|
63
|
+
def self.acceptable_openapi_types
|
|
64
|
+
openapi_types
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns the nullable attributes
|
|
68
|
+
def self.acceptable_openapi_nullable
|
|
69
|
+
openapi_nullable
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SupportFeedback` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SupportFeedback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'id')
|
|
89
|
+
self.id = attributes[:'id']
|
|
90
|
+
else
|
|
91
|
+
self.id = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'received_at')
|
|
95
|
+
self.received_at = attributes[:'received_at']
|
|
96
|
+
else
|
|
97
|
+
self.received_at = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'follow_up')
|
|
101
|
+
self.follow_up = attributes[:'follow_up']
|
|
102
|
+
else
|
|
103
|
+
self.follow_up = nil
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
+
# @return Array for valid properties with the reasons
|
|
109
|
+
def list_invalid_properties
|
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
|
+
invalid_properties = Array.new
|
|
112
|
+
if @id.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @received_at.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "received_at", received_at cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @follow_up.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "follow_up", follow_up cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
invalid_properties
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Check to see if the all the properties in the model are valid
|
|
128
|
+
# @return true if the model is valid
|
|
129
|
+
def valid?
|
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
|
+
return false if @id.nil?
|
|
132
|
+
return false if @received_at.nil?
|
|
133
|
+
return false if @follow_up.nil?
|
|
134
|
+
true
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Custom attribute writer method with validation
|
|
138
|
+
# @param [Object] id Value to be assigned
|
|
139
|
+
def id=(id)
|
|
140
|
+
if id.nil?
|
|
141
|
+
fail ArgumentError, 'id cannot be nil'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@id = id
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method with validation
|
|
148
|
+
# @param [Object] received_at Value to be assigned
|
|
149
|
+
def received_at=(received_at)
|
|
150
|
+
if received_at.nil?
|
|
151
|
+
fail ArgumentError, 'received_at cannot be nil'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
@received_at = received_at
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Custom attribute writer method with validation
|
|
158
|
+
# @param [Object] follow_up Value to be assigned
|
|
159
|
+
def follow_up=(follow_up)
|
|
160
|
+
if follow_up.nil?
|
|
161
|
+
fail ArgumentError, 'follow_up cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@follow_up = follow_up
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Checks equality by comparing each attribute.
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def ==(o)
|
|
170
|
+
return true if self.equal?(o)
|
|
171
|
+
self.class == o.class &&
|
|
172
|
+
id == o.id &&
|
|
173
|
+
received_at == o.received_at &&
|
|
174
|
+
follow_up == o.follow_up
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# @see the `==` method
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def eql?(o)
|
|
180
|
+
self == o
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Calculates hash code according to all attributes.
|
|
184
|
+
# @return [Integer] Hash code
|
|
185
|
+
def hash
|
|
186
|
+
[id, received_at, follow_up].hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Builds the object from hash
|
|
190
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
191
|
+
# @return [Object] Returns the model itself
|
|
192
|
+
def self.build_from_hash(attributes)
|
|
193
|
+
return nil unless attributes.is_a?(Hash)
|
|
194
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
195
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
196
|
+
map = acceptable_attribute_map
|
|
197
|
+
transformed_hash = {}
|
|
198
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
199
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
200
|
+
transformed_hash["#{key}"] = nil
|
|
201
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
202
|
+
# check to ensure the input is an array given that the attribute
|
|
203
|
+
# is documented as an array but the input is not
|
|
204
|
+
if attributes[map[key]].is_a?(Array)
|
|
205
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
206
|
+
end
|
|
207
|
+
elsif !attributes[map[key]].nil?
|
|
208
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
212
|
+
# accept any value while the model is built from a response
|
|
213
|
+
allocate.tap do |model|
|
|
214
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
215
|
+
model.send(:initialize, transformed_hash)
|
|
216
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Returns the object in the form of hash
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_hash
|
|
223
|
+
hash = {}
|
|
224
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
225
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
226
|
+
value = self.send(attr)
|
|
227
|
+
if value.nil?
|
|
228
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
end
|