docspring 4.7.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 +15 -0
- data/README.md +18 -1
- data/lib/docspring/api/client.rb +1354 -123
- 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 +1 -1
- 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_info.rb +15 -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/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/rotate_pages_request.rb +244 -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/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 +1997 -45
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +45 -0
- metadata +46 -1
|
@@ -0,0 +1,198 @@
|
|
|
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's margins.
|
|
18
|
+
class JobPageMargin < ApiModelBase
|
|
19
|
+
# A length with a unit (`in`, `cm`, `mm` or `px`), such as `0.5in` or `20mm`.
|
|
20
|
+
attr_accessor :top
|
|
21
|
+
|
|
22
|
+
# A length with a unit (`in`, `cm`, `mm` or `px`), such as `0.5in` or `20mm`.
|
|
23
|
+
attr_accessor :right
|
|
24
|
+
|
|
25
|
+
# A length with a unit (`in`, `cm`, `mm` or `px`), such as `0.5in` or `20mm`.
|
|
26
|
+
attr_accessor :bottom
|
|
27
|
+
|
|
28
|
+
# A length with a unit (`in`, `cm`, `mm` or `px`), such as `0.5in` or `20mm`.
|
|
29
|
+
attr_accessor :left
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'top' => :'top',
|
|
35
|
+
:'right' => :'right',
|
|
36
|
+
:'bottom' => :'bottom',
|
|
37
|
+
:'left' => :'left'
|
|
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
|
+
:'top' => :'String',
|
|
55
|
+
:'right' => :'String',
|
|
56
|
+
:'bottom' => :'String',
|
|
57
|
+
:'left' => :'String'
|
|
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::JobPageMargin` 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::JobPageMargin`. 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?(:'top')
|
|
94
|
+
self.top = attributes[:'top']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'right')
|
|
98
|
+
self.right = attributes[:'right']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'bottom')
|
|
102
|
+
self.bottom = attributes[:'bottom']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'left')
|
|
106
|
+
self.left = attributes[:'left']
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
111
|
+
# @return Array for valid properties with the reasons
|
|
112
|
+
def list_invalid_properties
|
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
114
|
+
invalid_properties = Array.new
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
+
true
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Checks equality by comparing each attribute.
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def ==(o)
|
|
128
|
+
return true if self.equal?(o)
|
|
129
|
+
self.class == o.class &&
|
|
130
|
+
top == o.top &&
|
|
131
|
+
right == o.right &&
|
|
132
|
+
bottom == o.bottom &&
|
|
133
|
+
left == o.left
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# @see the `==` method
|
|
137
|
+
# @param [Object] Object to be compared
|
|
138
|
+
def eql?(o)
|
|
139
|
+
self == o
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Calculates hash code according to all attributes.
|
|
143
|
+
# @return [Integer] Hash code
|
|
144
|
+
def hash
|
|
145
|
+
[top, right, bottom, left].hash
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Builds the object from hash
|
|
149
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
150
|
+
# @return [Object] Returns the model itself
|
|
151
|
+
def self.build_from_hash(attributes)
|
|
152
|
+
return nil unless attributes.is_a?(Hash)
|
|
153
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
154
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
155
|
+
map = acceptable_attribute_map
|
|
156
|
+
transformed_hash = {}
|
|
157
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
158
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
159
|
+
transformed_hash["#{key}"] = nil
|
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
161
|
+
# check to ensure the input is an array given that the attribute
|
|
162
|
+
# is documented as an array but the input is not
|
|
163
|
+
if attributes[map[key]].is_a?(Array)
|
|
164
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
165
|
+
end
|
|
166
|
+
elsif !attributes[map[key]].nil?
|
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
171
|
+
# accept any value while the model is built from a response
|
|
172
|
+
allocate.tap do |model|
|
|
173
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
174
|
+
model.send(:initialize, transformed_hash)
|
|
175
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Returns the object in the form of hash
|
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
|
181
|
+
def to_hash
|
|
182
|
+
hash = {}
|
|
183
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
184
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
185
|
+
value = self.send(attr)
|
|
186
|
+
if value.nil?
|
|
187
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
188
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
hash[param] = _to_hash(value)
|
|
192
|
+
end
|
|
193
|
+
hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
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 JobPageSize
|
|
18
|
+
LETTER = "Letter".freeze
|
|
19
|
+
LEGAL = "Legal".freeze
|
|
20
|
+
TABLOID = "Tabloid".freeze
|
|
21
|
+
LEDGER = "Ledger".freeze
|
|
22
|
+
CR80 = "CR80".freeze
|
|
23
|
+
A0 = "A0".freeze
|
|
24
|
+
A1 = "A1".freeze
|
|
25
|
+
A2 = "A2".freeze
|
|
26
|
+
A3 = "A3".freeze
|
|
27
|
+
A4 = "A4".freeze
|
|
28
|
+
A5 = "A5".freeze
|
|
29
|
+
A6 = "A6".freeze
|
|
30
|
+
|
|
31
|
+
def self.all_vars
|
|
32
|
+
@all_vars ||= [LETTER, LEGAL, TABLOID, LEDGER, CR80, A0, A1, A2, A3, A4, A5, A6].freeze
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Builds the enum from string
|
|
36
|
+
# @param [String] The enum value in the form of the string
|
|
37
|
+
# @return [String] The enum value
|
|
38
|
+
def self.build_from_hash(value)
|
|
39
|
+
new.build_from_hash(value)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Builds the enum from string
|
|
43
|
+
# @param [String] The enum value in the form of the string
|
|
44
|
+
# @return [String] The enum value
|
|
45
|
+
def build_from_hash(value)
|
|
46
|
+
# Only responses are built from hashes, and a value added to the API after this client was released is kept as it
|
|
47
|
+
# is: the constants are the values this client knows
|
|
48
|
+
value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,267 @@
|
|
|
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 file a job reads.
|
|
18
|
+
class JobSource < ApiModelBase
|
|
19
|
+
# Where the file comes from: a custom file (POST /custom_files), a submission's or combined PDF's PDF, a file another job made, a file you uploaded (GET /uploads/presign), a URL to download, or the file itself in `data`.
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
|
|
22
|
+
# The ID of the custom file, submission, combined PDF or job.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# For a `job` input, which of its files to read (1 is the first). Default 1.
|
|
26
|
+
attr_accessor :file
|
|
27
|
+
|
|
28
|
+
# For an `upload` input, the `fields.key` from GET /uploads/presign, once you've uploaded the file to its URL. Up to 100 MB.
|
|
29
|
+
attr_accessor :cache_id
|
|
30
|
+
|
|
31
|
+
# For a `url` input, the URL to download the file from. Removed once the job expires.
|
|
32
|
+
attr_accessor :url
|
|
33
|
+
|
|
34
|
+
# 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.
|
|
35
|
+
attr_accessor :data
|
|
36
|
+
|
|
37
|
+
# 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.
|
|
38
|
+
attr_accessor :filename
|
|
39
|
+
|
|
40
|
+
class EnumAttributeValidator
|
|
41
|
+
attr_reader :datatype
|
|
42
|
+
attr_reader :allowable_values
|
|
43
|
+
|
|
44
|
+
def initialize(datatype, allowable_values)
|
|
45
|
+
@allowable_values = allowable_values.map do |value|
|
|
46
|
+
case datatype.to_s
|
|
47
|
+
when /Integer/i
|
|
48
|
+
value.to_i
|
|
49
|
+
when /Float/i
|
|
50
|
+
value.to_f
|
|
51
|
+
else
|
|
52
|
+
value
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def valid?(value)
|
|
58
|
+
!value || allowable_values.include?(value)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
63
|
+
def self.attribute_map
|
|
64
|
+
{
|
|
65
|
+
:'type' => :'type',
|
|
66
|
+
:'id' => :'id',
|
|
67
|
+
:'file' => :'file',
|
|
68
|
+
:'cache_id' => :'cache_id',
|
|
69
|
+
:'url' => :'url',
|
|
70
|
+
:'data' => :'data',
|
|
71
|
+
:'filename' => :'filename'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns attribute mapping this model knows about
|
|
76
|
+
def self.acceptable_attribute_map
|
|
77
|
+
attribute_map
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Returns all the JSON keys this model knows about
|
|
81
|
+
def self.acceptable_attributes
|
|
82
|
+
acceptable_attribute_map.values
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Attribute type mapping.
|
|
86
|
+
def self.openapi_types
|
|
87
|
+
{
|
|
88
|
+
:'type' => :'JobSourceType',
|
|
89
|
+
:'id' => :'String',
|
|
90
|
+
:'file' => :'Integer',
|
|
91
|
+
:'cache_id' => :'String',
|
|
92
|
+
:'url' => :'String',
|
|
93
|
+
:'data' => :'String',
|
|
94
|
+
:'filename' => :'String'
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# List of attributes with nullable: true
|
|
99
|
+
def self.openapi_nullable
|
|
100
|
+
Set.new([
|
|
101
|
+
])
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Returns attribute type mapping
|
|
105
|
+
def self.acceptable_openapi_types
|
|
106
|
+
openapi_types
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Returns the nullable attributes
|
|
110
|
+
def self.acceptable_openapi_nullable
|
|
111
|
+
openapi_nullable
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Initializes the object
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
def initialize(attributes = {})
|
|
117
|
+
if (!attributes.is_a?(Hash))
|
|
118
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::JobSource` initialize method"
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
122
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
123
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
124
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
125
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::JobSource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
126
|
+
end
|
|
127
|
+
h[k.to_sym] = v
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'type')
|
|
131
|
+
self.type = attributes[:'type']
|
|
132
|
+
else
|
|
133
|
+
self.type = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'id')
|
|
137
|
+
self.id = attributes[:'id']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'file')
|
|
141
|
+
self.file = attributes[:'file']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'cache_id')
|
|
145
|
+
self.cache_id = attributes[:'cache_id']
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'url')
|
|
149
|
+
self.url = attributes[:'url']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'data')
|
|
153
|
+
self.data = attributes[:'data']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'filename')
|
|
157
|
+
self.filename = attributes[:'filename']
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
162
|
+
# @return Array for valid properties with the reasons
|
|
163
|
+
def list_invalid_properties
|
|
164
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
165
|
+
invalid_properties = Array.new
|
|
166
|
+
if @type.nil?
|
|
167
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
invalid_properties
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Check to see if the all the properties in the model are valid
|
|
174
|
+
# @return true if the model is valid
|
|
175
|
+
def valid?
|
|
176
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
177
|
+
return false if @type.nil?
|
|
178
|
+
true
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Custom attribute writer method with validation
|
|
182
|
+
# @param [Object] type Value to be assigned
|
|
183
|
+
def type=(type)
|
|
184
|
+
if type.nil?
|
|
185
|
+
fail ArgumentError, 'type cannot be nil'
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
@type = type
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Checks equality by comparing each attribute.
|
|
192
|
+
# @param [Object] Object to be compared
|
|
193
|
+
def ==(o)
|
|
194
|
+
return true if self.equal?(o)
|
|
195
|
+
self.class == o.class &&
|
|
196
|
+
type == o.type &&
|
|
197
|
+
id == o.id &&
|
|
198
|
+
file == o.file &&
|
|
199
|
+
cache_id == o.cache_id &&
|
|
200
|
+
url == o.url &&
|
|
201
|
+
data == o.data &&
|
|
202
|
+
filename == o.filename
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# @see the `==` method
|
|
206
|
+
# @param [Object] Object to be compared
|
|
207
|
+
def eql?(o)
|
|
208
|
+
self == o
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Calculates hash code according to all attributes.
|
|
212
|
+
# @return [Integer] Hash code
|
|
213
|
+
def hash
|
|
214
|
+
[type, id, file, cache_id, url, data, filename].hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Builds the object from hash
|
|
218
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
219
|
+
# @return [Object] Returns the model itself
|
|
220
|
+
def self.build_from_hash(attributes)
|
|
221
|
+
return nil unless attributes.is_a?(Hash)
|
|
222
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
223
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
224
|
+
map = acceptable_attribute_map
|
|
225
|
+
transformed_hash = {}
|
|
226
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
227
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
228
|
+
transformed_hash["#{key}"] = nil
|
|
229
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
230
|
+
# check to ensure the input is an array given that the attribute
|
|
231
|
+
# is documented as an array but the input is not
|
|
232
|
+
if attributes[map[key]].is_a?(Array)
|
|
233
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
234
|
+
end
|
|
235
|
+
elsif !attributes[map[key]].nil?
|
|
236
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
240
|
+
# accept any value while the model is built from a response
|
|
241
|
+
allocate.tap do |model|
|
|
242
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
243
|
+
model.send(:initialize, transformed_hash)
|
|
244
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Returns the object in the form of hash
|
|
249
|
+
# @return [Hash] Returns the object in the form of hash
|
|
250
|
+
def to_hash
|
|
251
|
+
hash = {}
|
|
252
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
253
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
254
|
+
value = self.send(attr)
|
|
255
|
+
if value.nil?
|
|
256
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
257
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
hash[param] = _to_hash(value)
|
|
261
|
+
end
|
|
262
|
+
hash
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
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 file a job reads.
|
|
18
|
+
module JobSourceInput
|
|
19
|
+
class << self
|
|
20
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
21
|
+
def openapi_one_of
|
|
22
|
+
[
|
|
23
|
+
:'Base64JobSource',
|
|
24
|
+
:'CombinedPdfJobSource',
|
|
25
|
+
:'CustomFileJobSource',
|
|
26
|
+
:'JobFileJobSource',
|
|
27
|
+
:'SubmissionJobSource',
|
|
28
|
+
:'UploadJobSource',
|
|
29
|
+
:'UrlJobSource'
|
|
30
|
+
]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Discriminator's property name (OpenAPI v3)
|
|
34
|
+
def openapi_discriminator_name
|
|
35
|
+
:'type'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Discriminator's mapping (OpenAPI v3)
|
|
39
|
+
def openapi_discriminator_mapping
|
|
40
|
+
{
|
|
41
|
+
:'base64' => :'Base64JobSource',
|
|
42
|
+
:'combined_pdf' => :'CombinedPdfJobSource',
|
|
43
|
+
:'custom_file' => :'CustomFileJobSource',
|
|
44
|
+
:'job' => :'JobFileJobSource',
|
|
45
|
+
:'submission' => :'SubmissionJobSource',
|
|
46
|
+
:'upload' => :'UploadJobSource',
|
|
47
|
+
:'url' => :'UrlJobSource'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Builds the object
|
|
52
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
53
|
+
# @return [Object] Returns the model or the data itself
|
|
54
|
+
def build(data)
|
|
55
|
+
discriminator_value = data[openapi_discriminator_name]
|
|
56
|
+
return nil if discriminator_value.nil?
|
|
57
|
+
|
|
58
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
|
|
59
|
+
return nil unless klass
|
|
60
|
+
|
|
61
|
+
DocSpring.const_get(klass).build_from_hash(data)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
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 JobSourceType
|
|
18
|
+
CUSTOM_FILE = "custom_file".freeze
|
|
19
|
+
SUBMISSION = "submission".freeze
|
|
20
|
+
COMBINED_PDF = "combined_pdf".freeze
|
|
21
|
+
JOB = "job".freeze
|
|
22
|
+
UPLOAD = "upload".freeze
|
|
23
|
+
URL = "url".freeze
|
|
24
|
+
BASE64 = "base64".freeze
|
|
25
|
+
|
|
26
|
+
def self.all_vars
|
|
27
|
+
@all_vars ||= [CUSTOM_FILE, SUBMISSION, COMBINED_PDF, JOB, UPLOAD, URL, BASE64].freeze
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Builds the enum from string
|
|
31
|
+
# @param [String] The enum value in the form of the string
|
|
32
|
+
# @return [String] The enum value
|
|
33
|
+
def self.build_from_hash(value)
|
|
34
|
+
new.build_from_hash(value)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Builds the enum from string
|
|
38
|
+
# @param [String] The enum value in the form of the string
|
|
39
|
+
# @return [String] The enum value
|
|
40
|
+
def build_from_hash(value)
|
|
41
|
+
# Only responses are built from hashes, and a value added to the API after this client was released is kept as it
|
|
42
|
+
# is: the constants are the values this client knows
|
|
43
|
+
value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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 JobState
|
|
18
|
+
PENDING = "pending".freeze
|
|
19
|
+
PROCESSED = "processed".freeze
|
|
20
|
+
ERROR = "error".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [PENDING, PROCESSED, ERROR].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
# Only responses are built from hashes, and a value added to the API after this client was released is kept as it
|
|
38
|
+
# is: the constants are the values this client knows
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|