pdf4me 1.0.1 → 2.0.1

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