faxage 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/faxage/information_gathering.rb +36 -1
- data/lib/faxage/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9b7534be52991e73089c5258d35d4cd791c2fbd7370c1a005946bb292f3b940
|
4
|
+
data.tar.gz: 076cb60e728a22f1bd7c7b98c761abfcb3c8ec572fb4b041f642260970ff3014
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82aa232fd6cdc0ae82adae99df8b661b365c2d27bc66475f0cea96cca5ac89af3a191298618ddd356ac029b1f994ca0328e787e7d720bca735a98dff90c48ebb
|
7
|
+
data.tar.gz: 9b683d9d4de97e2eda7d36953aa9fa96ac1274342f033f5deccbdb1f2927249f60994864affa1855f45936d9e44978e94db348561e0290f9a9ce43fa265d4918
|
data/Gemfile.lock
CHANGED
@@ -293,5 +293,40 @@ module Faxage
|
|
293
293
|
return response.parsed_response
|
294
294
|
end
|
295
295
|
end
|
296
|
+
|
297
|
+
def dlstatus(jobid:, viewtype: 'pdf')
|
298
|
+
# This operation is used to download a sent fax image.
|
299
|
+
|
300
|
+
subdirectory = "/httpsfax.php"
|
301
|
+
|
302
|
+
body = {
|
303
|
+
operation: "dlstatus",
|
304
|
+
username: username,
|
305
|
+
company: company,
|
306
|
+
password: password,
|
307
|
+
jobid: jobid,
|
308
|
+
viewtype: viewtype
|
309
|
+
}
|
310
|
+
|
311
|
+
response = self.class.post(subdirectory, body: body)
|
312
|
+
|
313
|
+
if response.parsed_response.nil?
|
314
|
+
raise NoResponseError.new("An empty response was returned from Faxage.")
|
315
|
+
elsif response.parsed_response.include?("ERR01: Database connection failed")
|
316
|
+
raise FaxageInternalError.new("Internal FAXAGE error.")
|
317
|
+
elsif response.parsed_response.include?("ERR02: Login incorrect")
|
318
|
+
raise LoginError.new("One or more of username, company, password is incorrect or your account is disabled for some reason.")
|
319
|
+
elsif response.parsed_response.include?("ERR06: No jobs to display or job id specified not found")
|
320
|
+
raise InvalidJobIdError.new("The jobid you passed was not found")
|
321
|
+
elsif response.parsed_response.include?("ERR08: Unknown operation")
|
322
|
+
raise UnknownOperationError.new("Either operation is not correctly hard coded or the POST was bad, the POST contents are returned for debugging purposes. #{response.parsed_response}")
|
323
|
+
elsif response.parsed_response.include?("ERR24: File is not yet converted")
|
324
|
+
raise NoFilesError.new("Images can only be retrieved after the file(s) have actually been imaged (I.e.: The fax must either be In Queue or completed to be able to retrieve an image)")
|
325
|
+
elsif response.parsed_response.include?("ERR25: File does not exist")
|
326
|
+
raise NoFilesError.new("This can be either an internal error, or if the status is a ‘Failed Conversion’, then there is no image to retrieve")
|
327
|
+
else
|
328
|
+
return response.parsed_response
|
329
|
+
end
|
330
|
+
end
|
296
331
|
end
|
297
|
-
end
|
332
|
+
end
|
data/lib/faxage/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faxage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Dias
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,7 +98,7 @@ homepage: https://github.com/diasks2/faxage
|
|
98
98
|
licenses:
|
99
99
|
- MIT
|
100
100
|
metadata: {}
|
101
|
-
post_install_message:
|
101
|
+
post_install_message:
|
102
102
|
rdoc_options: []
|
103
103
|
require_paths:
|
104
104
|
- lib
|
@@ -113,9 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
|
-
|
117
|
-
|
118
|
-
signing_key:
|
116
|
+
rubygems_version: 3.1.6
|
117
|
+
signing_key:
|
119
118
|
specification_version: 4
|
120
119
|
summary: Faxage is a Ruby wrapper for the faxage.com API
|
121
120
|
test_files: []
|