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,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
|
+
# The file itself, in base64.
|
|
18
|
+
class Base64JobSource < ApiModelBase
|
|
19
|
+
# Must be `base64`.
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
|
|
22
|
+
# For a `base64` input, the file's bytes in base64. Up to 7 MB once decoded: upload bigger files (GET /uploads/presign). A job never returns it.
|
|
23
|
+
attr_accessor :data
|
|
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
|
+
:'data' => :'data',
|
|
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
|
+
:'data' => :'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::Base64JobSource` 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::Base64JobSource`. 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 = 'base64'
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'data')
|
|
95
|
+
self.data = attributes[:'data']
|
|
96
|
+
else
|
|
97
|
+
self.data = 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 @data.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "data", data 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 @data.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] data Value to be assigned
|
|
142
|
+
def data=(data)
|
|
143
|
+
if data.nil?
|
|
144
|
+
fail ArgumentError, 'data cannot be nil'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
@data = data
|
|
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
|
+
data == o.data &&
|
|
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, data, 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,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 combined PDF's PDF.
|
|
18
|
+
class CombinedPdfJobSource < ApiModelBase
|
|
19
|
+
# Must be `combined_pdf`.
|
|
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::CombinedPdfJobSource` 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::CombinedPdfJobSource`. 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 = 'combined_pdf'
|
|
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,207 @@
|
|
|
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 compress. Compression is lossless: streams are recompressed and objects packed, and images keep their quality. A PDF that can't be made smaller comes back as it was.
|
|
18
|
+
class CompressPdfRequest < 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
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'input' => :'input',
|
|
32
|
+
:'metadata' => :'metadata',
|
|
33
|
+
:'expires_in' => :'expires_in'
|
|
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
|
+
:'input' => :'JobSourceInput',
|
|
51
|
+
:'metadata' => :'Hash<String, Object>',
|
|
52
|
+
:'expires_in' => :'Integer'
|
|
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::CompressPdfRequest` 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::CompressPdfRequest`. 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?(:'input')
|
|
89
|
+
self.input = attributes[:'input']
|
|
90
|
+
else
|
|
91
|
+
self.input = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'metadata')
|
|
95
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
96
|
+
self.metadata = value
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'expires_in')
|
|
101
|
+
self.expires_in = attributes[:'expires_in']
|
|
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 @input.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
invalid_properties
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Check to see if the all the properties in the model are valid
|
|
118
|
+
# @return true if the model is valid
|
|
119
|
+
def valid?
|
|
120
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
|
+
return false if @input.nil?
|
|
122
|
+
true
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Custom attribute writer method with validation
|
|
126
|
+
# @param [Object] input Value to be assigned
|
|
127
|
+
def input=(input)
|
|
128
|
+
if input.nil?
|
|
129
|
+
fail ArgumentError, 'input cannot be nil'
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
@input = input
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Checks equality by comparing each attribute.
|
|
136
|
+
# @param [Object] Object to be compared
|
|
137
|
+
def ==(o)
|
|
138
|
+
return true if self.equal?(o)
|
|
139
|
+
self.class == o.class &&
|
|
140
|
+
input == o.input &&
|
|
141
|
+
metadata == o.metadata &&
|
|
142
|
+
expires_in == o.expires_in
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# @see the `==` method
|
|
146
|
+
# @param [Object] Object to be compared
|
|
147
|
+
def eql?(o)
|
|
148
|
+
self == o
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Calculates hash code according to all attributes.
|
|
152
|
+
# @return [Integer] Hash code
|
|
153
|
+
def hash
|
|
154
|
+
[input, metadata, expires_in].hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Builds the object from hash
|
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
159
|
+
# @return [Object] Returns the model itself
|
|
160
|
+
def self.build_from_hash(attributes)
|
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
|
162
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
163
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
164
|
+
map = acceptable_attribute_map
|
|
165
|
+
transformed_hash = {}
|
|
166
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
167
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = nil
|
|
169
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
170
|
+
# check to ensure the input is an array given that the attribute
|
|
171
|
+
# is documented as an array but the input is not
|
|
172
|
+
if attributes[map[key]].is_a?(Array)
|
|
173
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
174
|
+
end
|
|
175
|
+
elsif !attributes[map[key]].nil?
|
|
176
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
180
|
+
# accept any value while the model is built from a response
|
|
181
|
+
allocate.tap do |model|
|
|
182
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
183
|
+
model.send(:initialize, transformed_hash)
|
|
184
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the object in the form of hash
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_hash
|
|
191
|
+
hash = {}
|
|
192
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
193
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
194
|
+
value = self.send(attr)
|
|
195
|
+
if value.nil?
|
|
196
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
197
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
hash[param] = _to_hash(value)
|
|
201
|
+
end
|
|
202
|
+
hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
end
|