pdf4me 1.0.1 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{LICENSE → LICENSE.txt} +6 -6
- data/README.md +124 -395
- data/lib/pdf4me.rb +40 -110
- data/lib/pdf4me/actions/complex_action.rb +64 -0
- data/lib/pdf4me/actions/convert_file_to_pdf.rb +30 -0
- data/lib/pdf4me/actions/convert_to_pdf.rb +14 -0
- data/lib/pdf4me/actions/create_pdf_a.rb +29 -0
- data/lib/pdf4me/actions/create_thumbnail.rb +55 -0
- data/lib/pdf4me/actions/extract_pages.rb +49 -0
- data/lib/pdf4me/actions/merge_two_pdfs.rb +34 -0
- data/lib/pdf4me/actions/optimize.rb +10 -0
- data/lib/pdf4me/actions/optimize_by_profile.rb +42 -0
- data/lib/pdf4me/actions/split_by_page_nr.rb +55 -0
- data/lib/pdf4me/actions/text_stamp.rb +63 -0
- data/lib/pdf4me/actions/wrapper_action.rb +65 -0
- data/lib/pdf4me/client.rb +87 -0
- data/lib/pdf4me/configuration.rb +9 -88
- data/lib/pdf4me/exceptions.rb +26 -0
- data/lib/pdf4me/models/base.rb +26 -0
- data/lib/pdf4me/models/convert_to_pdf_action.rb +26 -246
- data/lib/pdf4me/models/convert_to_pdf_res.rb +5 -185
- data/lib/pdf4me/models/doc_log.rb +12 -257
- data/lib/pdf4me/models/doc_metadata.rb +13 -282
- data/lib/pdf4me/models/document.rb +14 -282
- data/lib/pdf4me/models/notification.rb +8 -191
- data/lib/pdf4me/models/optimize_action.rb +72 -508
- data/lib/pdf4me/models/optimize_res.rb +5 -195
- data/lib/pdf4me/models/page.rb +12 -254
- data/lib/pdf4me/utils/assigner.rb +10 -0
- data/lib/pdf4me/utils/serializer.rb +43 -0
- data/lib/pdf4me/version.rb +1 -13
- data/spec/actions/create_pdf_a_spec.rb +21 -0
- data/spec/actions/wrapper_action_spec.rb +24 -0
- data/spec/files/4.pdf +0 -0
- data/spec/spec_helper.rb +17 -100
- metadata +70 -421
- data/Gemfile +0 -7
- data/Rakefile +0 -8
- data/docs/ActionFlow.md +0 -8
- data/docs/ApiUsageRes.md +0 -11
- data/docs/ArchiveConfig.md +0 -11
- data/docs/ArchiveJobReq.md +0 -12
- data/docs/ArchiveJobRes.md +0 -9
- data/docs/Color.md +0 -10
- data/docs/ConvertApi.md +0 -102
- data/docs/ConvertToPdf.md +0 -10
- data/docs/ConvertToPdfAction.md +0 -10
- data/docs/ConvertToPdfRes.md +0 -8
- data/docs/CreateImages.md +0 -10
- data/docs/CreateImagesRes.md +0 -8
- data/docs/CreatePdfA.md +0 -10
- data/docs/CreatePdfARes.md +0 -8
- data/docs/CustomCMSConfig.md +0 -23
- data/docs/DocAction.md +0 -8
- data/docs/DocLog.md +0 -12
- data/docs/DocMetadata.md +0 -16
- data/docs/Document.md +0 -16
- data/docs/DocumentApi.md +0 -203
- data/docs/DropDocumentReq.md +0 -20
- data/docs/DropDocumentRes.md +0 -15
- data/docs/ExecutionTrigger.md +0 -10
- data/docs/Extract.md +0 -10
- data/docs/ExtractAction.md +0 -9
- data/docs/ExtractApi.md +0 -102
- data/docs/ExtractRes.md +0 -8
- data/docs/GetDocumentListRes.md +0 -13
- data/docs/GetDocumentReq.md +0 -14
- data/docs/GetDocumentRes.md +0 -14
- data/docs/IFormFile.md +0 -13
- data/docs/Image.md +0 -15
- data/docs/ImageAction.md +0 -30
- data/docs/ImageApi.md +0 -107
- data/docs/Job.md +0 -10
- data/docs/JobApi.md +0 -197
- data/docs/JobConfig.md +0 -18
- data/docs/JobConfigRes.md +0 -8
- data/docs/KeyValuePairStringObject.md +0 -9
- data/docs/KeyValuePairStringString.md +0 -9
- data/docs/ManagementApi.md +0 -92
- data/docs/Merge.md +0 -10
- data/docs/MergeAction.md +0 -8
- data/docs/MergeApi.md +0 -102
- data/docs/MergeRes.md +0 -8
- data/docs/Notification.md +0 -9
- data/docs/OcrAction.md +0 -12
- data/docs/OcrApi.md +0 -57
- data/docs/Optimize.md +0 -10
- data/docs/OptimizeAction.md +0 -35
- data/docs/OptimizeApi.md +0 -103
- data/docs/OptimizeRes.md +0 -9
- data/docs/Page.md +0 -14
- data/docs/PageSelection.md +0 -10
- data/docs/Pdf4meAction.md +0 -12
- data/docs/Pdf4meDocument.md +0 -32
- data/docs/Pdf4meException.md +0 -8
- data/docs/PdfAAction.md +0 -14
- data/docs/PdfAApi.md +0 -102
- data/docs/PdfFont.md +0 -9
- data/docs/Pricing.md +0 -13
- data/docs/ProduceDocuments.md +0 -14
- data/docs/ProduceDocumentsRes.md +0 -8
- data/docs/ProduceOutput.md +0 -8
- data/docs/RGBSet.md +0 -10
- data/docs/RecognizeDocument.md +0 -10
- data/docs/RecognizeDocumentRes.md +0 -9
- data/docs/Rectangle.md +0 -11
- data/docs/Rotate.md +0 -10
- data/docs/RunJobRes.md +0 -10
- data/docs/SignatureConfig.md +0 -7
- data/docs/Split.md +0 -10
- data/docs/SplitAction.md +0 -11
- data/docs/SplitApi.md +0 -103
- data/docs/SplitRes.md +0 -8
- data/docs/Stamp.md +0 -10
- data/docs/StampAction.md +0 -22
- data/docs/StampApi.md +0 -110
- data/docs/StampRes.md +0 -8
- data/docs/StorageFolder.md +0 -10
- data/docs/Text.md +0 -17
- data/docs/Transform.md +0 -13
- data/docs/Translate.md +0 -9
- data/docs/UserFingerprint.md +0 -9
- data/docs/VersionRes.md +0 -8
- data/docs/java.md +0 -425
- data/lib/pdf4me/api/convert_api.rb +0 -130
- data/lib/pdf4me/api/document_api.rb +0 -218
- data/lib/pdf4me/api/extract_api.rb +0 -131
- data/lib/pdf4me/api/image_api.rb +0 -139
- data/lib/pdf4me/api/job_api.rb +0 -223
- data/lib/pdf4me/api/management_api.rb +0 -117
- data/lib/pdf4me/api/merge_api.rb +0 -131
- data/lib/pdf4me/api/ocr_api.rb +0 -74
- data/lib/pdf4me/api/optimize_api.rb +0 -139
- data/lib/pdf4me/api/pdf_a_api.rb +0 -134
- data/lib/pdf4me/api/split_api.rb +0 -135
- data/lib/pdf4me/api/stamp_api.rb +0 -159
- data/lib/pdf4me/api_client.rb +0 -380
- data/lib/pdf4me/api_error.rb +0 -38
- data/lib/pdf4me/models/action_flow.rb +0 -190
- data/lib/pdf4me/models/api_usage_res.rb +0 -219
- data/lib/pdf4me/models/archive_config.rb +0 -226
- data/lib/pdf4me/models/archive_job_req.rb +0 -249
- data/lib/pdf4me/models/archive_job_res.rb +0 -207
- data/lib/pdf4me/models/color.rb +0 -206
- data/lib/pdf4me/models/convert_to_pdf.rb +0 -209
- data/lib/pdf4me/models/create_images.rb +0 -209
- data/lib/pdf4me/models/create_images_res.rb +0 -189
- data/lib/pdf4me/models/create_pdf_a.rb +0 -209
- data/lib/pdf4me/models/create_pdf_a_res.rb +0 -189
- data/lib/pdf4me/models/custom_cms_config.rb +0 -323
- data/lib/pdf4me/models/doc_action.rb +0 -190
- data/lib/pdf4me/models/drop_document_req.rb +0 -348
- data/lib/pdf4me/models/drop_document_res.rb +0 -260
- data/lib/pdf4me/models/execution_trigger.rb +0 -206
- data/lib/pdf4me/models/extract.rb +0 -207
- data/lib/pdf4me/models/extract_action.rb +0 -201
- data/lib/pdf4me/models/extract_res.rb +0 -188
- data/lib/pdf4me/models/get_document_list_res.rb +0 -237
- data/lib/pdf4me/models/get_document_req.rb +0 -243
- data/lib/pdf4me/models/get_document_res.rb +0 -246
- data/lib/pdf4me/models/i_form_file.rb +0 -235
- data/lib/pdf4me/models/image.rb +0 -300
- data/lib/pdf4me/models/image_action.rb +0 -513
- data/lib/pdf4me/models/job.rb +0 -213
- data/lib/pdf4me/models/job_config.rb +0 -298
- data/lib/pdf4me/models/job_config_res.rb +0 -193
- data/lib/pdf4me/models/key_value_pair_string_object.rb +0 -197
- data/lib/pdf4me/models/key_value_pair_string_string.rb +0 -197
- data/lib/pdf4me/models/merge.rb +0 -209
- data/lib/pdf4me/models/merge_action.rb +0 -190
- data/lib/pdf4me/models/merge_res.rb +0 -188
- data/lib/pdf4me/models/ocr_action.rb +0 -259
- data/lib/pdf4me/models/optimize.rb +0 -209
- data/lib/pdf4me/models/page_selection.rb +0 -246
- data/lib/pdf4me/models/pdf4me_action.rb +0 -259
- data/lib/pdf4me/models/pdf4me_document.rb +0 -511
- data/lib/pdf4me/models/pdf4me_exception.rb +0 -189
- data/lib/pdf4me/models/pdf_a_action.rb +0 -297
- data/lib/pdf4me/models/pdf_font.rb +0 -213
- data/lib/pdf4me/models/pricing.rb +0 -278
- data/lib/pdf4me/models/produce_documents.rb +0 -251
- data/lib/pdf4me/models/produce_documents_res.rb +0 -191
- data/lib/pdf4me/models/produce_output.rb +0 -221
- data/lib/pdf4me/models/recognize_document.rb +0 -209
- data/lib/pdf4me/models/recognize_document_res.rb +0 -198
- data/lib/pdf4me/models/rectangle.rb +0 -215
- data/lib/pdf4me/models/rgb_set.rb +0 -206
- data/lib/pdf4me/models/rotate.rb +0 -221
- data/lib/pdf4me/models/run_job_res.rb +0 -215
- data/lib/pdf4me/models/signature_config.rb +0 -179
- data/lib/pdf4me/models/split.rb +0 -207
- data/lib/pdf4me/models/split_action.rb +0 -219
- data/lib/pdf4me/models/split_res.rb +0 -190
- data/lib/pdf4me/models/stamp.rb +0 -209
- data/lib/pdf4me/models/stamp_action.rb +0 -387
- data/lib/pdf4me/models/stamp_res.rb +0 -189
- data/lib/pdf4me/models/storage_folder.rb +0 -239
- data/lib/pdf4me/models/text.rb +0 -320
- data/lib/pdf4me/models/transform.rb +0 -263
- data/lib/pdf4me/models/translate.rb +0 -207
- data/lib/pdf4me/models/user_fingerprint.rb +0 -197
- data/lib/pdf4me/models/version_res.rb +0 -188
- data/pdf4me.gemspec +0 -47
- data/spec/api/convert_api_spec.rb +0 -60
- data/spec/api/document_api_spec.rb +0 -83
- data/spec/api/extract_api_spec.rb +0 -60
- data/spec/api/image_api_spec.rb +0 -62
- data/spec/api/job_api_spec.rb +0 -82
- data/spec/api/management_api_spec.rb +0 -57
- data/spec/api/merge_api_spec.rb +0 -60
- data/spec/api/ocr_api_spec.rb +0 -47
- data/spec/api/optimize_api_spec.rb +0 -60
- data/spec/api/pdf_a_api_spec.rb +0 -60
- data/spec/api/split_api_spec.rb +0 -60
- data/spec/api/stamp_api_spec.rb +0 -63
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/action_flow_spec.rb +0 -42
- data/spec/models/api_usage_res_spec.rb +0 -60
- data/spec/models/archive_config_spec.rb +0 -60
- data/spec/models/archive_job_req_spec.rb +0 -66
- data/spec/models/archive_job_res_spec.rb +0 -48
- data/spec/models/color_spec.rb +0 -54
- data/spec/models/convert_to_pdf_action_spec.rb +0 -62
- data/spec/models/convert_to_pdf_res_spec.rb +0 -42
- data/spec/models/convert_to_pdf_spec.rb +0 -54
- data/spec/models/create_images_res_spec.rb +0 -42
- data/spec/models/create_images_spec.rb +0 -54
- data/spec/models/create_pdf_a_res_spec.rb +0 -42
- data/spec/models/create_pdf_a_spec.rb +0 -54
- data/spec/models/custom_cms_config_spec.rb +0 -132
- data/spec/models/doc_action_spec.rb +0 -42
- data/spec/models/doc_log_spec.rb +0 -70
- data/spec/models/doc_metadata_spec.rb +0 -90
- data/spec/models/document_spec.rb +0 -90
- data/spec/models/drop_document_req_spec.rb +0 -118
- data/spec/models/drop_document_res_spec.rb +0 -84
- data/spec/models/execution_trigger_spec.rb +0 -54
- data/spec/models/extract_action_spec.rb +0 -48
- data/spec/models/extract_res_spec.rb +0 -42
- data/spec/models/extract_spec.rb +0 -54
- data/spec/models/get_document_list_res_spec.rb +0 -72
- data/spec/models/get_document_req_spec.rb +0 -78
- data/spec/models/get_document_res_spec.rb +0 -78
- data/spec/models/i_form_file_spec.rb +0 -72
- data/spec/models/image_action_spec.rb +0 -206
- data/spec/models/image_spec.rb +0 -88
- data/spec/models/job_config_res_spec.rb +0 -42
- data/spec/models/job_config_spec.rb +0 -102
- data/spec/models/job_spec.rb +0 -54
- data/spec/models/key_value_pair_string_object_spec.rb +0 -48
- data/spec/models/key_value_pair_string_string_spec.rb +0 -48
- data/spec/models/merge_action_spec.rb +0 -42
- data/spec/models/merge_res_spec.rb +0 -42
- data/spec/models/merge_spec.rb +0 -54
- data/spec/models/notification_spec.rb +0 -48
- data/spec/models/ocr_action_spec.rb +0 -70
- data/spec/models/optimize_action_spec.rb +0 -228
- data/spec/models/optimize_res_spec.rb +0 -48
- data/spec/models/optimize_spec.rb +0 -54
- data/spec/models/page_selection_spec.rb +0 -58
- data/spec/models/page_spec.rb +0 -78
- data/spec/models/pdf4me_action_spec.rb +0 -70
- data/spec/models/pdf4me_document_spec.rb +0 -202
- data/spec/models/pdf4me_exception_spec.rb +0 -42
- data/spec/models/pdf_a_action_spec.rb +0 -86
- data/spec/models/pdf_font_spec.rb +0 -48
- data/spec/models/pricing_spec.rb +0 -80
- data/spec/models/produce_documents_res_spec.rb +0 -42
- data/spec/models/produce_documents_spec.rb +0 -78
- data/spec/models/produce_output_spec.rb +0 -46
- data/spec/models/recognize_document_res_spec.rb +0 -48
- data/spec/models/recognize_document_spec.rb +0 -54
- data/spec/models/rectangle_spec.rb +0 -60
- data/spec/models/rgb_set_spec.rb +0 -54
- data/spec/models/rotate_spec.rb +0 -54
- data/spec/models/run_job_res_spec.rb +0 -54
- data/spec/models/signature_config_spec.rb +0 -36
- data/spec/models/split_action_spec.rb +0 -60
- data/spec/models/split_res_spec.rb +0 -42
- data/spec/models/split_spec.rb +0 -54
- data/spec/models/stamp_action_spec.rb +0 -142
- data/spec/models/stamp_res_spec.rb +0 -42
- data/spec/models/stamp_spec.rb +0 -54
- data/spec/models/storage_folder_spec.rb +0 -58
- data/spec/models/text_spec.rb +0 -104
- data/spec/models/transform_spec.rb +0 -72
- data/spec/models/translate_spec.rb +0 -48
- data/spec/models/user_fingerprint_spec.rb +0 -48
- data/spec/models/version_res_spec.rb +0 -42
@@ -1,206 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#DmsApi
|
3
|
-
|
4
|
-
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
-
|
6
|
-
OpenAPI spec version: v1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.3.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module Pdf4me
|
16
|
-
|
17
|
-
class ExecutionTrigger
|
18
|
-
attr_accessor :start_time
|
19
|
-
|
20
|
-
attr_accessor :cron_trigger
|
21
|
-
|
22
|
-
attr_accessor :continues
|
23
|
-
|
24
|
-
|
25
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
-
def self.attribute_map
|
27
|
-
{
|
28
|
-
:'start_time' => :'startTime',
|
29
|
-
:'cron_trigger' => :'cronTrigger',
|
30
|
-
:'continues' => :'continues'
|
31
|
-
}
|
32
|
-
end
|
33
|
-
|
34
|
-
# Attribute type mapping.
|
35
|
-
def self.swagger_types
|
36
|
-
{
|
37
|
-
:'start_time' => :'DateTime',
|
38
|
-
:'cron_trigger' => :'String',
|
39
|
-
:'continues' => :'BOOLEAN'
|
40
|
-
}
|
41
|
-
end
|
42
|
-
|
43
|
-
# Initializes the object
|
44
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
45
|
-
def initialize(attributes = {})
|
46
|
-
return unless attributes.is_a?(Hash)
|
47
|
-
|
48
|
-
# convert string to symbol for hash key
|
49
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
50
|
-
|
51
|
-
if attributes.has_key?(:'startTime')
|
52
|
-
self.start_time = attributes[:'startTime']
|
53
|
-
end
|
54
|
-
|
55
|
-
if attributes.has_key?(:'cronTrigger')
|
56
|
-
self.cron_trigger = attributes[:'cronTrigger']
|
57
|
-
end
|
58
|
-
|
59
|
-
if attributes.has_key?(:'continues')
|
60
|
-
self.continues = attributes[:'continues']
|
61
|
-
end
|
62
|
-
|
63
|
-
end
|
64
|
-
|
65
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
-
# @return Array for valid properties with the reasons
|
67
|
-
def list_invalid_properties
|
68
|
-
invalid_properties = Array.new
|
69
|
-
return invalid_properties
|
70
|
-
end
|
71
|
-
|
72
|
-
# Check to see if the all the properties in the model are valid
|
73
|
-
# @return true if the model is valid
|
74
|
-
def valid?
|
75
|
-
return true
|
76
|
-
end
|
77
|
-
|
78
|
-
# Checks equality by comparing each attribute.
|
79
|
-
# @param [Object] Object to be compared
|
80
|
-
def ==(o)
|
81
|
-
return true if self.equal?(o)
|
82
|
-
self.class == o.class &&
|
83
|
-
start_time == o.start_time &&
|
84
|
-
cron_trigger == o.cron_trigger &&
|
85
|
-
continues == o.continues
|
86
|
-
end
|
87
|
-
|
88
|
-
# @see the `==` method
|
89
|
-
# @param [Object] Object to be compared
|
90
|
-
def eql?(o)
|
91
|
-
self == o
|
92
|
-
end
|
93
|
-
|
94
|
-
# Calculates hash code according to all attributes.
|
95
|
-
# @return [Fixnum] Hash code
|
96
|
-
def hash
|
97
|
-
[start_time, cron_trigger, continues].hash
|
98
|
-
end
|
99
|
-
|
100
|
-
# Builds the object from hash
|
101
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
-
# @return [Object] Returns the model itself
|
103
|
-
def build_from_hash(attributes)
|
104
|
-
return nil unless attributes.is_a?(Hash)
|
105
|
-
self.class.swagger_types.each_pair do |key, type|
|
106
|
-
if type =~ /\AArray<(.*)>/i
|
107
|
-
# check to ensure the input is an array given that the the attribute
|
108
|
-
# is documented as an array but the input is not
|
109
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
111
|
-
end
|
112
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
-
end
|
116
|
-
|
117
|
-
self
|
118
|
-
end
|
119
|
-
|
120
|
-
# Deserializes the data based on type
|
121
|
-
# @param string type Data type
|
122
|
-
# @param string value Value to be deserialized
|
123
|
-
# @return [Object] Deserialized data
|
124
|
-
def _deserialize(type, value)
|
125
|
-
case type.to_sym
|
126
|
-
when :DateTime
|
127
|
-
DateTime.parse(value)
|
128
|
-
when :Date
|
129
|
-
Date.parse(value)
|
130
|
-
when :String
|
131
|
-
value.to_s
|
132
|
-
when :Integer
|
133
|
-
value.to_i
|
134
|
-
when :Float
|
135
|
-
value.to_f
|
136
|
-
when :BOOLEAN
|
137
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
-
true
|
139
|
-
else
|
140
|
-
false
|
141
|
-
end
|
142
|
-
when :Object
|
143
|
-
# generic object (usually a Hash), return directly
|
144
|
-
value
|
145
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
-
inner_type = Regexp.last_match[:inner_type]
|
147
|
-
value.map { |v| _deserialize(inner_type, v) }
|
148
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
-
k_type = Regexp.last_match[:k_type]
|
150
|
-
v_type = Regexp.last_match[:v_type]
|
151
|
-
{}.tap do |hash|
|
152
|
-
value.each do |k, v|
|
153
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
-
end
|
155
|
-
end
|
156
|
-
else # model
|
157
|
-
temp_model = Pdf4me.const_get(type).new
|
158
|
-
temp_model.build_from_hash(value)
|
159
|
-
end
|
160
|
-
end
|
161
|
-
|
162
|
-
# Returns the string representation of the object
|
163
|
-
# @return [String] String presentation of the object
|
164
|
-
def to_s
|
165
|
-
to_hash.to_s
|
166
|
-
end
|
167
|
-
|
168
|
-
# to_body is an alias to to_hash (backward compatibility)
|
169
|
-
# @return [Hash] Returns the object in the form of hash
|
170
|
-
def to_body
|
171
|
-
to_hash
|
172
|
-
end
|
173
|
-
|
174
|
-
# Returns the object in the form of hash
|
175
|
-
# @return [Hash] Returns the object in the form of hash
|
176
|
-
def to_hash
|
177
|
-
hash = {}
|
178
|
-
self.class.attribute_map.each_pair do |attr, param|
|
179
|
-
value = self.send(attr)
|
180
|
-
next if value.nil?
|
181
|
-
hash[param] = _to_hash(value)
|
182
|
-
end
|
183
|
-
hash
|
184
|
-
end
|
185
|
-
|
186
|
-
# Outputs non-array value in the form of hash
|
187
|
-
# For object, use to_hash. Otherwise, just return the value
|
188
|
-
# @param [Object] value Any valid value
|
189
|
-
# @return [Hash] Returns the value in the form of hash
|
190
|
-
def _to_hash(value)
|
191
|
-
if value.is_a?(Array)
|
192
|
-
value.compact.map{ |v| _to_hash(v) }
|
193
|
-
elsif value.is_a?(Hash)
|
194
|
-
{}.tap do |hash|
|
195
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
196
|
-
end
|
197
|
-
elsif value.respond_to? :to_hash
|
198
|
-
value.to_hash
|
199
|
-
else
|
200
|
-
value
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
end
|
205
|
-
|
206
|
-
end
|
@@ -1,207 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#DmsApi
|
3
|
-
|
4
|
-
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
-
|
6
|
-
OpenAPI spec version: v1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.3.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module Pdf4me
|
16
|
-
|
17
|
-
class Extract
|
18
|
-
attr_accessor :document
|
19
|
-
|
20
|
-
attr_accessor :extract_action
|
21
|
-
|
22
|
-
# Set Notification
|
23
|
-
attr_accessor :notification
|
24
|
-
|
25
|
-
|
26
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
-
def self.attribute_map
|
28
|
-
{
|
29
|
-
:'document' => :'document',
|
30
|
-
:'extract_action' => :'extractAction',
|
31
|
-
:'notification' => :'notification'
|
32
|
-
}
|
33
|
-
end
|
34
|
-
|
35
|
-
# Attribute type mapping.
|
36
|
-
def self.swagger_types
|
37
|
-
{
|
38
|
-
:'document' => :'Document',
|
39
|
-
:'extract_action' => :'ExtractAction',
|
40
|
-
:'notification' => :'Notification'
|
41
|
-
}
|
42
|
-
end
|
43
|
-
|
44
|
-
# Initializes the object
|
45
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
46
|
-
def initialize(attributes = {})
|
47
|
-
return unless attributes.is_a?(Hash)
|
48
|
-
|
49
|
-
# convert string to symbol for hash key
|
50
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
51
|
-
|
52
|
-
if attributes.has_key?(:'document')
|
53
|
-
self.document = attributes[:'document']
|
54
|
-
end
|
55
|
-
|
56
|
-
if attributes.has_key?(:'extractAction')
|
57
|
-
self.extract_action = attributes[:'extractAction']
|
58
|
-
end
|
59
|
-
|
60
|
-
if attributes.has_key?(:'notification')
|
61
|
-
self.notification = attributes[:'notification']
|
62
|
-
end
|
63
|
-
|
64
|
-
end
|
65
|
-
|
66
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
-
# @return Array for valid properties with the reasons
|
68
|
-
def list_invalid_properties
|
69
|
-
invalid_properties = Array.new
|
70
|
-
return invalid_properties
|
71
|
-
end
|
72
|
-
|
73
|
-
# Check to see if the all the properties in the model are valid
|
74
|
-
# @return true if the model is valid
|
75
|
-
def valid?
|
76
|
-
return true
|
77
|
-
end
|
78
|
-
|
79
|
-
# Checks equality by comparing each attribute.
|
80
|
-
# @param [Object] Object to be compared
|
81
|
-
def ==(o)
|
82
|
-
return true if self.equal?(o)
|
83
|
-
self.class == o.class &&
|
84
|
-
document == o.document &&
|
85
|
-
extract_action == o.extract_action &&
|
86
|
-
notification == o.notification
|
87
|
-
end
|
88
|
-
|
89
|
-
# @see the `==` method
|
90
|
-
# @param [Object] Object to be compared
|
91
|
-
def eql?(o)
|
92
|
-
self == o
|
93
|
-
end
|
94
|
-
|
95
|
-
# Calculates hash code according to all attributes.
|
96
|
-
# @return [Fixnum] Hash code
|
97
|
-
def hash
|
98
|
-
[document, extract_action, notification].hash
|
99
|
-
end
|
100
|
-
|
101
|
-
# Builds the object from hash
|
102
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
-
# @return [Object] Returns the model itself
|
104
|
-
def build_from_hash(attributes)
|
105
|
-
return nil unless attributes.is_a?(Hash)
|
106
|
-
self.class.swagger_types.each_pair do |key, type|
|
107
|
-
if type =~ /\AArray<(.*)>/i
|
108
|
-
# check to ensure the input is an array given that the the attribute
|
109
|
-
# is documented as an array but the input is not
|
110
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
111
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
112
|
-
end
|
113
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
114
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
115
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
116
|
-
end
|
117
|
-
|
118
|
-
self
|
119
|
-
end
|
120
|
-
|
121
|
-
# Deserializes the data based on type
|
122
|
-
# @param string type Data type
|
123
|
-
# @param string value Value to be deserialized
|
124
|
-
# @return [Object] Deserialized data
|
125
|
-
def _deserialize(type, value)
|
126
|
-
case type.to_sym
|
127
|
-
when :DateTime
|
128
|
-
DateTime.parse(value)
|
129
|
-
when :Date
|
130
|
-
Date.parse(value)
|
131
|
-
when :String
|
132
|
-
value.to_s
|
133
|
-
when :Integer
|
134
|
-
value.to_i
|
135
|
-
when :Float
|
136
|
-
value.to_f
|
137
|
-
when :BOOLEAN
|
138
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
139
|
-
true
|
140
|
-
else
|
141
|
-
false
|
142
|
-
end
|
143
|
-
when :Object
|
144
|
-
# generic object (usually a Hash), return directly
|
145
|
-
value
|
146
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
147
|
-
inner_type = Regexp.last_match[:inner_type]
|
148
|
-
value.map { |v| _deserialize(inner_type, v) }
|
149
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
150
|
-
k_type = Regexp.last_match[:k_type]
|
151
|
-
v_type = Regexp.last_match[:v_type]
|
152
|
-
{}.tap do |hash|
|
153
|
-
value.each do |k, v|
|
154
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
155
|
-
end
|
156
|
-
end
|
157
|
-
else # model
|
158
|
-
temp_model = Pdf4me.const_get(type).new
|
159
|
-
temp_model.build_from_hash(value)
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
# Returns the string representation of the object
|
164
|
-
# @return [String] String presentation of the object
|
165
|
-
def to_s
|
166
|
-
to_hash.to_s
|
167
|
-
end
|
168
|
-
|
169
|
-
# to_body is an alias to to_hash (backward compatibility)
|
170
|
-
# @return [Hash] Returns the object in the form of hash
|
171
|
-
def to_body
|
172
|
-
to_hash
|
173
|
-
end
|
174
|
-
|
175
|
-
# Returns the object in the form of hash
|
176
|
-
# @return [Hash] Returns the object in the form of hash
|
177
|
-
def to_hash
|
178
|
-
hash = {}
|
179
|
-
self.class.attribute_map.each_pair do |attr, param|
|
180
|
-
value = self.send(attr)
|
181
|
-
next if value.nil?
|
182
|
-
hash[param] = _to_hash(value)
|
183
|
-
end
|
184
|
-
hash
|
185
|
-
end
|
186
|
-
|
187
|
-
# Outputs non-array value in the form of hash
|
188
|
-
# For object, use to_hash. Otherwise, just return the value
|
189
|
-
# @param [Object] value Any valid value
|
190
|
-
# @return [Hash] Returns the value in the form of hash
|
191
|
-
def _to_hash(value)
|
192
|
-
if value.is_a?(Array)
|
193
|
-
value.compact.map{ |v| _to_hash(v) }
|
194
|
-
elsif value.is_a?(Hash)
|
195
|
-
{}.tap do |hash|
|
196
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
197
|
-
end
|
198
|
-
elsif value.respond_to? :to_hash
|
199
|
-
value.to_hash
|
200
|
-
else
|
201
|
-
value
|
202
|
-
end
|
203
|
-
end
|
204
|
-
|
205
|
-
end
|
206
|
-
|
207
|
-
end
|
@@ -1,201 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#DmsApi
|
3
|
-
|
4
|
-
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
-
|
6
|
-
OpenAPI spec version: v1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.3.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module Pdf4me
|
16
|
-
|
17
|
-
class ExtractAction
|
18
|
-
attr_accessor :extract_pages
|
19
|
-
|
20
|
-
attr_accessor :custom_properties
|
21
|
-
|
22
|
-
|
23
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
-
def self.attribute_map
|
25
|
-
{
|
26
|
-
:'extract_pages' => :'extractPages',
|
27
|
-
:'custom_properties' => :'customProperties'
|
28
|
-
}
|
29
|
-
end
|
30
|
-
|
31
|
-
# Attribute type mapping.
|
32
|
-
def self.swagger_types
|
33
|
-
{
|
34
|
-
:'extract_pages' => :'Array<Integer>',
|
35
|
-
:'custom_properties' => :'Array<KeyValuePairStringString>'
|
36
|
-
}
|
37
|
-
end
|
38
|
-
|
39
|
-
# Initializes the object
|
40
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
-
def initialize(attributes = {})
|
42
|
-
return unless attributes.is_a?(Hash)
|
43
|
-
|
44
|
-
# convert string to symbol for hash key
|
45
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
46
|
-
|
47
|
-
if attributes.has_key?(:'extractPages')
|
48
|
-
if (value = attributes[:'extractPages']).is_a?(Array)
|
49
|
-
self.extract_pages = value
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
if attributes.has_key?(:'customProperties')
|
54
|
-
if (value = attributes[:'customProperties']).is_a?(Array)
|
55
|
-
self.custom_properties = value
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|
60
|
-
|
61
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
-
# @return Array for valid properties with the reasons
|
63
|
-
def list_invalid_properties
|
64
|
-
invalid_properties = Array.new
|
65
|
-
return invalid_properties
|
66
|
-
end
|
67
|
-
|
68
|
-
# Check to see if the all the properties in the model are valid
|
69
|
-
# @return true if the model is valid
|
70
|
-
def valid?
|
71
|
-
return true
|
72
|
-
end
|
73
|
-
|
74
|
-
# Checks equality by comparing each attribute.
|
75
|
-
# @param [Object] Object to be compared
|
76
|
-
def ==(o)
|
77
|
-
return true if self.equal?(o)
|
78
|
-
self.class == o.class &&
|
79
|
-
extract_pages == o.extract_pages &&
|
80
|
-
custom_properties == o.custom_properties
|
81
|
-
end
|
82
|
-
|
83
|
-
# @see the `==` method
|
84
|
-
# @param [Object] Object to be compared
|
85
|
-
def eql?(o)
|
86
|
-
self == o
|
87
|
-
end
|
88
|
-
|
89
|
-
# Calculates hash code according to all attributes.
|
90
|
-
# @return [Fixnum] Hash code
|
91
|
-
def hash
|
92
|
-
[extract_pages, custom_properties].hash
|
93
|
-
end
|
94
|
-
|
95
|
-
# Builds the object from hash
|
96
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
97
|
-
# @return [Object] Returns the model itself
|
98
|
-
def build_from_hash(attributes)
|
99
|
-
return nil unless attributes.is_a?(Hash)
|
100
|
-
self.class.swagger_types.each_pair do |key, type|
|
101
|
-
if type =~ /\AArray<(.*)>/i
|
102
|
-
# check to ensure the input is an array given that the the attribute
|
103
|
-
# is documented as an array but the input is not
|
104
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
105
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
106
|
-
end
|
107
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
108
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
109
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
110
|
-
end
|
111
|
-
|
112
|
-
self
|
113
|
-
end
|
114
|
-
|
115
|
-
# Deserializes the data based on type
|
116
|
-
# @param string type Data type
|
117
|
-
# @param string value Value to be deserialized
|
118
|
-
# @return [Object] Deserialized data
|
119
|
-
def _deserialize(type, value)
|
120
|
-
case type.to_sym
|
121
|
-
when :DateTime
|
122
|
-
DateTime.parse(value)
|
123
|
-
when :Date
|
124
|
-
Date.parse(value)
|
125
|
-
when :String
|
126
|
-
value.to_s
|
127
|
-
when :Integer
|
128
|
-
value.to_i
|
129
|
-
when :Float
|
130
|
-
value.to_f
|
131
|
-
when :BOOLEAN
|
132
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
133
|
-
true
|
134
|
-
else
|
135
|
-
false
|
136
|
-
end
|
137
|
-
when :Object
|
138
|
-
# generic object (usually a Hash), return directly
|
139
|
-
value
|
140
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
141
|
-
inner_type = Regexp.last_match[:inner_type]
|
142
|
-
value.map { |v| _deserialize(inner_type, v) }
|
143
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
144
|
-
k_type = Regexp.last_match[:k_type]
|
145
|
-
v_type = Regexp.last_match[:v_type]
|
146
|
-
{}.tap do |hash|
|
147
|
-
value.each do |k, v|
|
148
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
else # model
|
152
|
-
temp_model = Pdf4me.const_get(type).new
|
153
|
-
temp_model.build_from_hash(value)
|
154
|
-
end
|
155
|
-
end
|
156
|
-
|
157
|
-
# Returns the string representation of the object
|
158
|
-
# @return [String] String presentation of the object
|
159
|
-
def to_s
|
160
|
-
to_hash.to_s
|
161
|
-
end
|
162
|
-
|
163
|
-
# to_body is an alias to to_hash (backward compatibility)
|
164
|
-
# @return [Hash] Returns the object in the form of hash
|
165
|
-
def to_body
|
166
|
-
to_hash
|
167
|
-
end
|
168
|
-
|
169
|
-
# Returns the object in the form of hash
|
170
|
-
# @return [Hash] Returns the object in the form of hash
|
171
|
-
def to_hash
|
172
|
-
hash = {}
|
173
|
-
self.class.attribute_map.each_pair do |attr, param|
|
174
|
-
value = self.send(attr)
|
175
|
-
next if value.nil?
|
176
|
-
hash[param] = _to_hash(value)
|
177
|
-
end
|
178
|
-
hash
|
179
|
-
end
|
180
|
-
|
181
|
-
# Outputs non-array value in the form of hash
|
182
|
-
# For object, use to_hash. Otherwise, just return the value
|
183
|
-
# @param [Object] value Any valid value
|
184
|
-
# @return [Hash] Returns the value in the form of hash
|
185
|
-
def _to_hash(value)
|
186
|
-
if value.is_a?(Array)
|
187
|
-
value.compact.map{ |v| _to_hash(v) }
|
188
|
-
elsif value.is_a?(Hash)
|
189
|
-
{}.tap do |hash|
|
190
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
191
|
-
end
|
192
|
-
elsif value.respond_to? :to_hash
|
193
|
-
value.to_hash
|
194
|
-
else
|
195
|
-
value
|
196
|
-
end
|
197
|
-
end
|
198
|
-
|
199
|
-
end
|
200
|
-
|
201
|
-
end
|