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,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 whose form fields and annotations become part of its pages, so they can't be changed.
|
|
18
|
+
class FlattenPdfRequest < 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::FlattenPdfRequest` 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::FlattenPdfRequest`. 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
|
|
@@ -31,7 +31,7 @@ module DocSpring
|
|
|
31
31
|
# Print pages in landscape orientation.
|
|
32
32
|
attr_accessor :landscape
|
|
33
33
|
|
|
34
|
-
# Print background
|
|
34
|
+
# Print the background the template's CSS gives the whole page (on `html` or `body`), inside the page margins. Other elements' backgrounds always print.
|
|
35
35
|
attr_accessor :print_background
|
|
36
36
|
|
|
37
37
|
# The top margin, with a unit, such as `1in` or `20mm`. The top and bottom margins together must be less than the page's height.
|
|
@@ -31,7 +31,7 @@ module DocSpring
|
|
|
31
31
|
# Print pages in landscape orientation.
|
|
32
32
|
attr_accessor :landscape
|
|
33
33
|
|
|
34
|
-
# Print background
|
|
34
|
+
# Print the background the template's CSS gives the whole page (on `html` or `body`), inside the page margins. Other elements' backgrounds always print.
|
|
35
35
|
attr_accessor :print_background
|
|
36
36
|
|
|
37
37
|
# The top margin, with a unit, such as `1in` or `20mm`. The top and bottom margins together must be less than the page's height.
|
|
@@ -0,0 +1,322 @@
|
|
|
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 page of HTML to convert to PDF, as `html` or as a file in `input` (one of them), with the page's settings. The Standard engine converts it unless you ask for Chromium: it doesn't run JavaScript, so a page with a script element fails with a message that says to send `engine` `chromium`. Images, stylesheets and fonts the page links to are downloaded, and on the Standard engine a link that can't be downloaded fails the job with a message naming it.
|
|
18
|
+
class HTMLToPdfRequest < 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
|
+
# The page's HTML, with its CSS in `<style>` elements or linked stylesheets. Up to 10 MB. The request body as a whole is limited to 10 MB too, so send a large page as a file in `input` (also up to 10 MB).
|
|
29
|
+
attr_accessor :html
|
|
30
|
+
|
|
31
|
+
# What converts the page. `standard` (the default) is DocSpring's own engine: fast, and it doesn't run JavaScript. `chromium` prints the page with Chromium, which runs its JavaScript.
|
|
32
|
+
attr_accessor :engine
|
|
33
|
+
|
|
34
|
+
# The scale Chromium prints the page at. Default 1. Only with `engine` `chromium`.
|
|
35
|
+
attr_accessor :scale
|
|
36
|
+
|
|
37
|
+
# HTML printed in each page's top margin. An element with the class `pageNumber`, `totalPages` or `date` gets the page's number, the number of pages or today's date. Give its text a `font-size`.
|
|
38
|
+
attr_accessor :header_html
|
|
39
|
+
|
|
40
|
+
# HTML printed in each page's bottom margin, with the same classes as `header_html`.
|
|
41
|
+
attr_accessor :footer_html
|
|
42
|
+
|
|
43
|
+
# The paper size. Default `Letter`. Don't send it with `width` and `height`.
|
|
44
|
+
attr_accessor :page_size
|
|
45
|
+
|
|
46
|
+
# A custom page's width, such as `8.5in` or `210mm`. Send it with `height`.
|
|
47
|
+
attr_accessor :width
|
|
48
|
+
|
|
49
|
+
# A custom page's height, such as `11in` or `297mm`. Send it with `width`.
|
|
50
|
+
attr_accessor :height
|
|
51
|
+
|
|
52
|
+
# Turn the page on its side. Default false.
|
|
53
|
+
attr_accessor :landscape
|
|
54
|
+
|
|
55
|
+
# The page's margins. Each side's default is `1in`.
|
|
56
|
+
attr_accessor :margin
|
|
57
|
+
|
|
58
|
+
# Print the page's own background (what `html` or `body` sets). Default false.
|
|
59
|
+
attr_accessor :print_background
|
|
60
|
+
|
|
61
|
+
class EnumAttributeValidator
|
|
62
|
+
attr_reader :datatype
|
|
63
|
+
attr_reader :allowable_values
|
|
64
|
+
|
|
65
|
+
def initialize(datatype, allowable_values)
|
|
66
|
+
@allowable_values = allowable_values.map do |value|
|
|
67
|
+
case datatype.to_s
|
|
68
|
+
when /Integer/i
|
|
69
|
+
value.to_i
|
|
70
|
+
when /Float/i
|
|
71
|
+
value.to_f
|
|
72
|
+
else
|
|
73
|
+
value
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def valid?(value)
|
|
79
|
+
!value || allowable_values.include?(value)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
84
|
+
def self.attribute_map
|
|
85
|
+
{
|
|
86
|
+
:'input' => :'input',
|
|
87
|
+
:'metadata' => :'metadata',
|
|
88
|
+
:'expires_in' => :'expires_in',
|
|
89
|
+
:'html' => :'html',
|
|
90
|
+
:'engine' => :'engine',
|
|
91
|
+
:'scale' => :'scale',
|
|
92
|
+
:'header_html' => :'header_html',
|
|
93
|
+
:'footer_html' => :'footer_html',
|
|
94
|
+
:'page_size' => :'page_size',
|
|
95
|
+
:'width' => :'width',
|
|
96
|
+
:'height' => :'height',
|
|
97
|
+
:'landscape' => :'landscape',
|
|
98
|
+
:'margin' => :'margin',
|
|
99
|
+
:'print_background' => :'print_background'
|
|
100
|
+
}
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Returns attribute mapping this model knows about
|
|
104
|
+
def self.acceptable_attribute_map
|
|
105
|
+
attribute_map
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Returns all the JSON keys this model knows about
|
|
109
|
+
def self.acceptable_attributes
|
|
110
|
+
acceptable_attribute_map.values
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Attribute type mapping.
|
|
114
|
+
def self.openapi_types
|
|
115
|
+
{
|
|
116
|
+
:'input' => :'JobSourceInput',
|
|
117
|
+
:'metadata' => :'Hash<String, Object>',
|
|
118
|
+
:'expires_in' => :'Integer',
|
|
119
|
+
:'html' => :'String',
|
|
120
|
+
:'engine' => :'JobHtmlEngine',
|
|
121
|
+
:'scale' => :'Float',
|
|
122
|
+
:'header_html' => :'String',
|
|
123
|
+
:'footer_html' => :'String',
|
|
124
|
+
:'page_size' => :'JobPageSize',
|
|
125
|
+
:'width' => :'String',
|
|
126
|
+
:'height' => :'String',
|
|
127
|
+
:'landscape' => :'Boolean',
|
|
128
|
+
:'margin' => :'JobPageMargin',
|
|
129
|
+
:'print_background' => :'Boolean'
|
|
130
|
+
}
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# List of attributes with nullable: true
|
|
134
|
+
def self.openapi_nullable
|
|
135
|
+
Set.new([
|
|
136
|
+
])
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Returns attribute type mapping
|
|
140
|
+
def self.acceptable_openapi_types
|
|
141
|
+
openapi_types
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Returns the nullable attributes
|
|
145
|
+
def self.acceptable_openapi_nullable
|
|
146
|
+
openapi_nullable
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Initializes the object
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
def initialize(attributes = {})
|
|
152
|
+
if (!attributes.is_a?(Hash))
|
|
153
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::HTMLToPdfRequest` initialize method"
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
157
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
158
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
159
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
160
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::HTMLToPdfRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
161
|
+
end
|
|
162
|
+
h[k.to_sym] = v
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'input')
|
|
166
|
+
self.input = attributes[:'input']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'metadata')
|
|
170
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
171
|
+
self.metadata = value
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'expires_in')
|
|
176
|
+
self.expires_in = attributes[:'expires_in']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'html')
|
|
180
|
+
self.html = attributes[:'html']
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'engine')
|
|
184
|
+
self.engine = attributes[:'engine']
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'scale')
|
|
188
|
+
self.scale = attributes[:'scale']
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'header_html')
|
|
192
|
+
self.header_html = attributes[:'header_html']
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'footer_html')
|
|
196
|
+
self.footer_html = attributes[:'footer_html']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'page_size')
|
|
200
|
+
self.page_size = attributes[:'page_size']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'width')
|
|
204
|
+
self.width = attributes[:'width']
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'height')
|
|
208
|
+
self.height = attributes[:'height']
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'landscape')
|
|
212
|
+
self.landscape = attributes[:'landscape']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'margin')
|
|
216
|
+
self.margin = attributes[:'margin']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'print_background')
|
|
220
|
+
self.print_background = attributes[:'print_background']
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
225
|
+
# @return Array for valid properties with the reasons
|
|
226
|
+
def list_invalid_properties
|
|
227
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
228
|
+
invalid_properties = Array.new
|
|
229
|
+
invalid_properties
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Check to see if the all the properties in the model are valid
|
|
233
|
+
# @return true if the model is valid
|
|
234
|
+
def valid?
|
|
235
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
236
|
+
true
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Checks equality by comparing each attribute.
|
|
240
|
+
# @param [Object] Object to be compared
|
|
241
|
+
def ==(o)
|
|
242
|
+
return true if self.equal?(o)
|
|
243
|
+
self.class == o.class &&
|
|
244
|
+
input == o.input &&
|
|
245
|
+
metadata == o.metadata &&
|
|
246
|
+
expires_in == o.expires_in &&
|
|
247
|
+
html == o.html &&
|
|
248
|
+
engine == o.engine &&
|
|
249
|
+
scale == o.scale &&
|
|
250
|
+
header_html == o.header_html &&
|
|
251
|
+
footer_html == o.footer_html &&
|
|
252
|
+
page_size == o.page_size &&
|
|
253
|
+
width == o.width &&
|
|
254
|
+
height == o.height &&
|
|
255
|
+
landscape == o.landscape &&
|
|
256
|
+
margin == o.margin &&
|
|
257
|
+
print_background == o.print_background
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# @see the `==` method
|
|
261
|
+
# @param [Object] Object to be compared
|
|
262
|
+
def eql?(o)
|
|
263
|
+
self == o
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Calculates hash code according to all attributes.
|
|
267
|
+
# @return [Integer] Hash code
|
|
268
|
+
def hash
|
|
269
|
+
[input, metadata, expires_in, html, engine, scale, header_html, footer_html, page_size, width, height, landscape, margin, print_background].hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Builds the object from hash
|
|
273
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
274
|
+
# @return [Object] Returns the model itself
|
|
275
|
+
def self.build_from_hash(attributes)
|
|
276
|
+
return nil unless attributes.is_a?(Hash)
|
|
277
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
278
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
279
|
+
map = acceptable_attribute_map
|
|
280
|
+
transformed_hash = {}
|
|
281
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
282
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
283
|
+
transformed_hash["#{key}"] = nil
|
|
284
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
285
|
+
# check to ensure the input is an array given that the attribute
|
|
286
|
+
# is documented as an array but the input is not
|
|
287
|
+
if attributes[map[key]].is_a?(Array)
|
|
288
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
289
|
+
end
|
|
290
|
+
elsif !attributes[map[key]].nil?
|
|
291
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
295
|
+
# accept any value while the model is built from a response
|
|
296
|
+
allocate.tap do |model|
|
|
297
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
298
|
+
model.send(:initialize, transformed_hash)
|
|
299
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Returns the object in the form of hash
|
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
|
305
|
+
def to_hash
|
|
306
|
+
hash = {}
|
|
307
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
308
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
309
|
+
value = self.send(attr)
|
|
310
|
+
if value.nil?
|
|
311
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
312
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
hash[param] = _to_hash(value)
|
|
316
|
+
end
|
|
317
|
+
hash
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
class ImageFormat
|
|
18
|
+
PNG = "png".freeze
|
|
19
|
+
JPG = "jpg".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [PNG, JPG].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Builds the enum from string
|
|
26
|
+
# @param [String] The enum value in the form of the string
|
|
27
|
+
# @return [String] The enum value
|
|
28
|
+
def self.build_from_hash(value)
|
|
29
|
+
new.build_from_hash(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Builds the enum from string
|
|
33
|
+
# @param [String] The enum value in the form of the string
|
|
34
|
+
# @return [String] The enum value
|
|
35
|
+
def build_from_hash(value)
|
|
36
|
+
# Only responses are built from hashes, and a value added to the API after this client was released is kept as it
|
|
37
|
+
# is: the constants are the values this client knows
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|