cloudmersive-frauddetection-api-client 2.0.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 +7 -0
- data/Gemfile +7 -0
- data/README.md +105 -0
- data/Rakefile +8 -0
- data/cloudmersive-frauddetection-api-client.gemspec +45 -0
- data/docs/AdvancedFraudDetectionResult.md +16 -0
- data/docs/FraudDetectionApi.md +124 -0
- data/docs/FraudDetectionResult.md +15 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-frauddetection-api-client/api/fraud_detection_api.rb +131 -0
- data/lib/cloudmersive-frauddetection-api-client/api_client.rb +391 -0
- data/lib/cloudmersive-frauddetection-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-frauddetection-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-frauddetection-api-client/models/advanced_fraud_detection_result.rb +266 -0
- data/lib/cloudmersive-frauddetection-api-client/models/fraud_detection_result.rb +256 -0
- data/lib/cloudmersive-frauddetection-api-client/version.rb +15 -0
- data/lib/cloudmersive-frauddetection-api-client.rb +42 -0
- data/spec/api/fraud_detection_api_spec.rb +61 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/advanced_fraud_detection_result_spec.rb +89 -0
- data/spec/models/fraud_detection_result_spec.rb +83 -0
- data/spec/spec_helper.rb +111 -0
- metadata +247 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 0e7241f0429f08a438b943bf7c0e88c2931429a4785d26eecd92ae07cee24dde
|
|
4
|
+
data.tar.gz: 3d7556ce3eb22dbb1f25d862eb42422f224a8cc962535881fd2a20c30a437262
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: a1c3b3c80439d3b245b6e155898c491e1c0ab4bb73218e74292c059f440764e78a4d3e656e9c34865294d540793b035e4099a729a8a8d0fda6f054787e56ba09
|
|
7
|
+
data.tar.gz: b12a408df0524fb2631507db917a014e97d8a08df01a951f3936942cac7fbce572d9e781001ffd6127ee96088c15a9e14e16a56fffdbc6c3c39f6eaf60d72bbe
|
data/Gemfile
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# cloudmersive-frauddetection-api-client
|
|
2
|
+
|
|
3
|
+
CloudmersiveFrauddetectionApiClient - the Ruby gem for the fraudapi
|
|
4
|
+
|
|
5
|
+
Easily and directly scan and block fraudulent security threats in input.
|
|
6
|
+
|
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
8
|
+
|
|
9
|
+
- API version: v1
|
|
10
|
+
- Package version: 2.0.0
|
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### Build a gem
|
|
16
|
+
|
|
17
|
+
To build the Ruby code into a gem:
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
gem build cloudmersive-frauddetection-api-client.gemspec
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then either install the gem locally:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
gem install ./cloudmersive-frauddetection-api-client-2.0.0.gem
|
|
27
|
+
```
|
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-frauddetection-api-client-2.0.0.gem` to install the development dependencies)
|
|
29
|
+
|
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
31
|
+
|
|
32
|
+
Finally add this to the Gemfile:
|
|
33
|
+
|
|
34
|
+
gem 'cloudmersive-frauddetection-api-client', '~> 2.0.0'
|
|
35
|
+
|
|
36
|
+
### Install from Git
|
|
37
|
+
|
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
|
39
|
+
|
|
40
|
+
gem 'cloudmersive-frauddetection-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
|
41
|
+
|
|
42
|
+
### Include the Ruby code directly
|
|
43
|
+
|
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
|
45
|
+
|
|
46
|
+
```shell
|
|
47
|
+
ruby -Ilib script.rb
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Getting Started
|
|
51
|
+
|
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
|
53
|
+
```ruby
|
|
54
|
+
# Load the gem
|
|
55
|
+
require 'cloudmersive-frauddetection-api-client'
|
|
56
|
+
|
|
57
|
+
# Setup authorization
|
|
58
|
+
CloudmersiveFrauddetectionApiClient.configure do |config|
|
|
59
|
+
# Configure API key authorization: Apikey
|
|
60
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
61
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
62
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
api_instance = CloudmersiveFrauddetectionApiClient::FraudDetectionApi.new
|
|
66
|
+
|
|
67
|
+
opts = {
|
|
68
|
+
input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to perform fraud detection on
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
begin
|
|
72
|
+
#AI Fraud Detection for Documents
|
|
73
|
+
result = api_instance.document_detect_fraud(opts)
|
|
74
|
+
p result
|
|
75
|
+
rescue CloudmersiveFrauddetectionApiClient::ApiError => e
|
|
76
|
+
puts "Exception when calling FraudDetectionApi->document_detect_fraud: #{e}"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Documentation for API Endpoints
|
|
82
|
+
|
|
83
|
+
All URIs are relative to *https://localhost*
|
|
84
|
+
|
|
85
|
+
Class | Method | HTTP request | Description
|
|
86
|
+
------------ | ------------- | ------------- | -------------
|
|
87
|
+
*CloudmersiveFrauddetectionApiClient::FraudDetectionApi* | [**document_detect_fraud**](docs/FraudDetectionApi.md#document_detect_fraud) | **POST** /fraud-ai/detection/document | AI Fraud Detection for Documents
|
|
88
|
+
*CloudmersiveFrauddetectionApiClient::FraudDetectionApi* | [**document_detect_fraud_advanced**](docs/FraudDetectionApi.md#document_detect_fraud_advanced) | **POST** /fraud-ai/detection/document/advanced | Advanced AI Fraud Detection for Documents
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## Documentation for Models
|
|
92
|
+
|
|
93
|
+
- [CloudmersiveFrauddetectionApiClient::AdvancedFraudDetectionResult](docs/AdvancedFraudDetectionResult.md)
|
|
94
|
+
- [CloudmersiveFrauddetectionApiClient::FraudDetectionResult](docs/FraudDetectionResult.md)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## Documentation for Authorization
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Apikey
|
|
101
|
+
|
|
102
|
+
- **Type**: API key
|
|
103
|
+
- **API key parameter name**: Apikey
|
|
104
|
+
- **Location**: HTTP header
|
|
105
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
#fraudapi
|
|
5
|
+
|
|
6
|
+
#Easily and directly scan and block fraudulent security threats in input.
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: v1
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
Swagger Codegen version: 2.4.14
|
|
12
|
+
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
+
require "cloudmersive-frauddetection-api-client/version"
|
|
17
|
+
|
|
18
|
+
Gem::Specification.new do |s|
|
|
19
|
+
s.name = "cloudmersive-frauddetection-api-client"
|
|
20
|
+
s.version = CloudmersiveFrauddetectionApiClient::VERSION
|
|
21
|
+
s.platform = Gem::Platform::RUBY
|
|
22
|
+
s.authors = ["Cloudmersive"]
|
|
23
|
+
s.email = [""]
|
|
24
|
+
s.homepage = "https://cloudmersive.com/ai-fraud-detection-api"
|
|
25
|
+
s.summary = "Scan input documents for fraud and other security threats using Advanced AI."
|
|
26
|
+
s.description = "Scan input documents for fraud and other security threats using Advanced AI."
|
|
27
|
+
s.license = 'Apache 2.0'
|
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
|
29
|
+
|
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
|
32
|
+
|
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
|
40
|
+
|
|
41
|
+
s.files = Dir['./**/*']
|
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
|
43
|
+
s.executables = []
|
|
44
|
+
s.require_paths = ["lib"]
|
|
45
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# CloudmersiveFrauddetectionApiClient::AdvancedFraudDetectionResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
|
|
7
|
+
**clean_result** | **BOOLEAN** | True if the document is clean, false if fraud threats were found | [optional]
|
|
8
|
+
**fraud_risk_level** | **Float** | Overall fraud risk level between 0.0 and 1.0 | [optional]
|
|
9
|
+
**contains_financial_liability** | **BOOLEAN** | True if the document contains financial liability | [optional]
|
|
10
|
+
**contains_sensitive_information_collection** | **BOOLEAN** | True if the document contains sensitive data collection from the recipient | [optional]
|
|
11
|
+
**contains_asset_transfer** | **BOOLEAN** | True if the document contains an asset transfer | [optional]
|
|
12
|
+
**contains_purchase_agreement** | **BOOLEAN** | True if the document contains a purchase agreement | [optional]
|
|
13
|
+
**contains_employment_agreement** | **BOOLEAN** | True if the document contains an employment agreement | [optional]
|
|
14
|
+
**analysis_rationale** | **String** | Rationale on why the document was classified as such | [optional]
|
|
15
|
+
|
|
16
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# CloudmersiveFrauddetectionApiClient::FraudDetectionApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://localhost*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**document_detect_fraud**](FraudDetectionApi.md#document_detect_fraud) | **POST** /fraud-ai/detection/document | AI Fraud Detection for Documents
|
|
8
|
+
[**document_detect_fraud_advanced**](FraudDetectionApi.md#document_detect_fraud_advanced) | **POST** /fraud-ai/detection/document/advanced | Advanced AI Fraud Detection for Documents
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# **document_detect_fraud**
|
|
12
|
+
> FraudDetectionResult document_detect_fraud(opts)
|
|
13
|
+
|
|
14
|
+
AI Fraud Detection for Documents
|
|
15
|
+
|
|
16
|
+
Perform fraud detection and classification on input document and user context. Input document formats supported include DOCX, PDF, PNG and JPG.
|
|
17
|
+
|
|
18
|
+
### Example
|
|
19
|
+
```ruby
|
|
20
|
+
# load the gem
|
|
21
|
+
require 'cloudmersive-frauddetection-api-client'
|
|
22
|
+
# setup authorization
|
|
23
|
+
CloudmersiveFrauddetectionApiClient.configure do |config|
|
|
24
|
+
# Configure API key authorization: Apikey
|
|
25
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
26
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
27
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
api_instance = CloudmersiveFrauddetectionApiClient::FraudDetectionApi.new
|
|
31
|
+
|
|
32
|
+
opts = {
|
|
33
|
+
input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to perform fraud detection on
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
begin
|
|
37
|
+
#AI Fraud Detection for Documents
|
|
38
|
+
result = api_instance.document_detect_fraud(opts)
|
|
39
|
+
p result
|
|
40
|
+
rescue CloudmersiveFrauddetectionApiClient::ApiError => e
|
|
41
|
+
puts "Exception when calling FraudDetectionApi->document_detect_fraud: #{e}"
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Parameters
|
|
46
|
+
|
|
47
|
+
Name | Type | Description | Notes
|
|
48
|
+
------------- | ------------- | ------------- | -------------
|
|
49
|
+
**input_file** | **File**| Input document, or photos of a document, to perform fraud detection on | [optional]
|
|
50
|
+
|
|
51
|
+
### Return type
|
|
52
|
+
|
|
53
|
+
[**FraudDetectionResult**](FraudDetectionResult.md)
|
|
54
|
+
|
|
55
|
+
### Authorization
|
|
56
|
+
|
|
57
|
+
[Apikey](../README.md#Apikey)
|
|
58
|
+
|
|
59
|
+
### HTTP request headers
|
|
60
|
+
|
|
61
|
+
- **Content-Type**: multipart/form-data
|
|
62
|
+
- **Accept**: text/plain, application/json, text/json
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# **document_detect_fraud_advanced**
|
|
67
|
+
> AdvancedFraudDetectionResult document_detect_fraud_advanced(opts)
|
|
68
|
+
|
|
69
|
+
Advanced AI Fraud Detection for Documents
|
|
70
|
+
|
|
71
|
+
Perform advanced fraud detection and classification on input document and user context. Input document formats supported include DOCX, PDF, PNG and JPG.
|
|
72
|
+
|
|
73
|
+
### Example
|
|
74
|
+
```ruby
|
|
75
|
+
# load the gem
|
|
76
|
+
require 'cloudmersive-frauddetection-api-client'
|
|
77
|
+
# setup authorization
|
|
78
|
+
CloudmersiveFrauddetectionApiClient.configure do |config|
|
|
79
|
+
# Configure API key authorization: Apikey
|
|
80
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
81
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
82
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
api_instance = CloudmersiveFrauddetectionApiClient::FraudDetectionApi.new
|
|
86
|
+
|
|
87
|
+
opts = {
|
|
88
|
+
user_email_address: 'user_email_address_example', # String | User email address for context (optional)
|
|
89
|
+
user_email_address_verified: true, # BOOLEAN | True if the user's email address was verified (optional)
|
|
90
|
+
input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to perform fraud detection on
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
begin
|
|
94
|
+
#Advanced AI Fraud Detection for Documents
|
|
95
|
+
result = api_instance.document_detect_fraud_advanced(opts)
|
|
96
|
+
p result
|
|
97
|
+
rescue CloudmersiveFrauddetectionApiClient::ApiError => e
|
|
98
|
+
puts "Exception when calling FraudDetectionApi->document_detect_fraud_advanced: #{e}"
|
|
99
|
+
end
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Parameters
|
|
103
|
+
|
|
104
|
+
Name | Type | Description | Notes
|
|
105
|
+
------------- | ------------- | ------------- | -------------
|
|
106
|
+
**user_email_address** | **String**| User email address for context (optional) | [optional]
|
|
107
|
+
**user_email_address_verified** | **BOOLEAN**| True if the user's email address was verified (optional) | [optional]
|
|
108
|
+
**input_file** | **File**| Input document, or photos of a document, to perform fraud detection on | [optional]
|
|
109
|
+
|
|
110
|
+
### Return type
|
|
111
|
+
|
|
112
|
+
[**AdvancedFraudDetectionResult**](AdvancedFraudDetectionResult.md)
|
|
113
|
+
|
|
114
|
+
### Authorization
|
|
115
|
+
|
|
116
|
+
[Apikey](../README.md#Apikey)
|
|
117
|
+
|
|
118
|
+
### HTTP request headers
|
|
119
|
+
|
|
120
|
+
- **Content-Type**: multipart/form-data
|
|
121
|
+
- **Accept**: text/plain, application/json, text/json
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# CloudmersiveFrauddetectionApiClient::FraudDetectionResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
|
|
7
|
+
**clean_result** | **BOOLEAN** | True if the document is clean, false if fraud threats were found | [optional]
|
|
8
|
+
**fraud_risk_level** | **Float** | Overall fraud risk level between 0.0 and 1.0 | [optional]
|
|
9
|
+
**contains_financial_liability** | **BOOLEAN** | True if the document contains financial liability | [optional]
|
|
10
|
+
**contains_sensitive_information_collection** | **BOOLEAN** | True if the document contains sensitive data collection from the recipient | [optional]
|
|
11
|
+
**contains_asset_transfer** | **BOOLEAN** | True if the document contains an asset transfer | [optional]
|
|
12
|
+
**contains_purchase_agreement** | **BOOLEAN** | True if the document contains a purchase agreement | [optional]
|
|
13
|
+
**contains_employment_agreement** | **BOOLEAN** | True if the document contains an employment agreement | [optional]
|
|
14
|
+
|
|
15
|
+
|
data/git_push.sh
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
4
|
+
#
|
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
6
|
+
#
|
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
|
8
|
+
|
|
9
|
+
git_user_id=$1
|
|
10
|
+
git_repo_id=$2
|
|
11
|
+
release_note=$3
|
|
12
|
+
|
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
|
14
|
+
git_user_id="GIT_USER_ID"
|
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
|
19
|
+
git_repo_id="GIT_REPO_ID"
|
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if [ "$release_note" = "" ]; then
|
|
24
|
+
release_note="Minor update"
|
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Initialize the local directory as a Git repository
|
|
29
|
+
git init
|
|
30
|
+
|
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
|
32
|
+
git add .
|
|
33
|
+
|
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
35
|
+
git commit -m "$release_note"
|
|
36
|
+
|
|
37
|
+
# Sets the new remote
|
|
38
|
+
git_remote=`git remote`
|
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
40
|
+
|
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
|
44
|
+
else
|
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
git pull origin master
|
|
51
|
+
|
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
|
55
|
+
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#fraudapi
|
|
3
|
+
|
|
4
|
+
#Easily and directly scan and block fraudulent security threats in input.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module CloudmersiveFrauddetectionApiClient
|
|
16
|
+
class FraudDetectionApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# AI Fraud Detection for Documents
|
|
23
|
+
# Perform fraud detection and classification on input document and user context. Input document formats supported include DOCX, PDF, PNG and JPG.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [File] :input_file Input document, or photos of a document, to perform fraud detection on
|
|
26
|
+
# @return [FraudDetectionResult]
|
|
27
|
+
def document_detect_fraud(opts = {})
|
|
28
|
+
data, _status_code, _headers = document_detect_fraud_with_http_info(opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# AI Fraud Detection for Documents
|
|
33
|
+
# Perform fraud detection and classification on input document and user context. Input document formats supported include DOCX, PDF, PNG and JPG.
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [File] :input_file Input document, or photos of a document, to perform fraud detection on
|
|
36
|
+
# @return [Array<(FraudDetectionResult, Fixnum, Hash)>] FraudDetectionResult data, response status code and response headers
|
|
37
|
+
def document_detect_fraud_with_http_info(opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: FraudDetectionApi.document_detect_fraud ...'
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/fraud-ai/detection/document'
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = {}
|
|
46
|
+
|
|
47
|
+
# header parameters
|
|
48
|
+
header_params = {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
51
|
+
# HTTP header 'Content-Type'
|
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = {}
|
|
56
|
+
form_params['InputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
|
57
|
+
|
|
58
|
+
# http body (model)
|
|
59
|
+
post_body = nil
|
|
60
|
+
auth_names = ['Apikey']
|
|
61
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => 'FraudDetectionResult')
|
|
68
|
+
if @api_client.config.debugging
|
|
69
|
+
@api_client.config.logger.debug "API called: FraudDetectionApi#document_detect_fraud\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
70
|
+
end
|
|
71
|
+
return data, status_code, headers
|
|
72
|
+
end
|
|
73
|
+
# Advanced AI Fraud Detection for Documents
|
|
74
|
+
# Perform advanced fraud detection and classification on input document and user context. Input document formats supported include DOCX, PDF, PNG and JPG.
|
|
75
|
+
# @param [Hash] opts the optional parameters
|
|
76
|
+
# @option opts [String] :user_email_address User email address for context (optional)
|
|
77
|
+
# @option opts [BOOLEAN] :user_email_address_verified True if the user's email address was verified (optional)
|
|
78
|
+
# @option opts [File] :input_file Input document, or photos of a document, to perform fraud detection on
|
|
79
|
+
# @return [AdvancedFraudDetectionResult]
|
|
80
|
+
def document_detect_fraud_advanced(opts = {})
|
|
81
|
+
data, _status_code, _headers = document_detect_fraud_advanced_with_http_info(opts)
|
|
82
|
+
data
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Advanced AI Fraud Detection for Documents
|
|
86
|
+
# Perform advanced fraud detection and classification on input document and user context. Input document formats supported include DOCX, PDF, PNG and JPG.
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @option opts [String] :user_email_address User email address for context (optional)
|
|
89
|
+
# @option opts [BOOLEAN] :user_email_address_verified True if the user's email address was verified (optional)
|
|
90
|
+
# @option opts [File] :input_file Input document, or photos of a document, to perform fraud detection on
|
|
91
|
+
# @return [Array<(AdvancedFraudDetectionResult, Fixnum, Hash)>] AdvancedFraudDetectionResult data, response status code and response headers
|
|
92
|
+
def document_detect_fraud_advanced_with_http_info(opts = {})
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: FraudDetectionApi.document_detect_fraud_advanced ...'
|
|
95
|
+
end
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/fraud-ai/detection/document/advanced'
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = {}
|
|
101
|
+
|
|
102
|
+
# header parameters
|
|
103
|
+
header_params = {}
|
|
104
|
+
# HTTP header 'Accept' (if needed)
|
|
105
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
106
|
+
# HTTP header 'Content-Type'
|
|
107
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
108
|
+
header_params[:'UserEmailAddress'] = opts[:'user_email_address'] if !opts[:'user_email_address'].nil?
|
|
109
|
+
header_params[:'UserEmailAddressVerified'] = opts[:'user_email_address_verified'] if !opts[:'user_email_address_verified'].nil?
|
|
110
|
+
|
|
111
|
+
# form parameters
|
|
112
|
+
form_params = {}
|
|
113
|
+
form_params['InputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
|
114
|
+
|
|
115
|
+
# http body (model)
|
|
116
|
+
post_body = nil
|
|
117
|
+
auth_names = ['Apikey']
|
|
118
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
119
|
+
:header_params => header_params,
|
|
120
|
+
:query_params => query_params,
|
|
121
|
+
:form_params => form_params,
|
|
122
|
+
:body => post_body,
|
|
123
|
+
:auth_names => auth_names,
|
|
124
|
+
:return_type => 'AdvancedFraudDetectionResult')
|
|
125
|
+
if @api_client.config.debugging
|
|
126
|
+
@api_client.config.logger.debug "API called: FraudDetectionApi#document_detect_fraud_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
127
|
+
end
|
|
128
|
+
return data, status_code, headers
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|