incognia_api 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d20f61a585d3f2a6f3ae499a5a32ce1162ce812d6450eaaa3ed2c3107caeff26
4
- data.tar.gz: f48d53ed2d2bc99face81e094a0193f8a5e5cb0752b12abaaf1020ae3ca47d4f
3
+ metadata.gz: e4670f0fda3487b76490802caef76aa02c9ef037c552d4fab1e970871d07498f
4
+ data.tar.gz: b8286fe8ba8130ad7512bc8bf2acb065409195ed326a72c9c0a4fb27b9e7cfb0
5
5
  SHA512:
6
- metadata.gz: a686efb7675e67313ea627bc22898d37027e07dd7742153ba525e818f36190be57f1a72848f1149d9826b198d419ac48f550f3e22deb5fb5d1801bc345784dca
7
- data.tar.gz: 304ee383de088469fc85f5fdb873aeb8650be7c04b0b58c4c6fe37e7f32ae3bf067bfa4726a28f813edc59df3ea7520263478cf08ba927257c3cc4268b351948
6
+ metadata.gz: 191d5b1ee6963347a37a752bedda18bd293a04b7adc245c037b67e5ac6f08e629d36dbe5701c5bb13b6f5e180a2d7e6153b3913da730a2418fcd66d972eb866e
7
+ data.tar.gz: 118a7ea43a3f35709383c24c1b5d372b92152fea8041894666fdeb8839c2b6c472b8ced28bb3b654bbbf9ecd2fa7b6367d37174acc1f434508070937880420c9
@@ -0,0 +1,76 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "main" ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ "main" ]
20
+ schedule:
21
+ - cron: '25 9 * * 0'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Use only 'java' to analyze code written in Java, Kotlin or both
38
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
39
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
40
+
41
+ steps:
42
+ - name: Checkout repository
43
+ uses: actions/checkout@v3
44
+
45
+ # Initializes the CodeQL tools for scanning.
46
+ - name: Initialize CodeQL
47
+ uses: github/codeql-action/init@v2
48
+ with:
49
+ languages: ${{ matrix.language }}
50
+ # If you wish to specify custom queries, you can do so here or in a config file.
51
+ # By default, queries listed here will override any specified in a config file.
52
+ # Prefix the list here with "+" to use these queries and those in the config file.
53
+
54
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55
+ queries: security-extended,security-and-quality
56
+
57
+
58
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59
+ # If this step fails, then you should remove it and run the build manually (see below)
60
+ - name: Autobuild
61
+ uses: github/codeql-action/autobuild@v2
62
+
63
+ # ℹ️ Command-line programs to run using the OS shell.
64
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
65
+
66
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
67
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
68
+
69
+ # - run: |
70
+ # echo "Run, Build Application using script"
71
+ # ./location_of_script_within_repo/buildscript.sh
72
+
73
+ - name: Perform CodeQL Analysis
74
+ uses: github/codeql-action/analyze@v2
75
+ with:
76
+ category: "/language:${{matrix.language}}"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.1] - 2023-01-24
4
+
5
+ - Allows optional params on #register_signup
6
+ - Adds Reset feedback event
7
+
3
8
  ## [0.3.0] - 2022-05-06
4
9
 
5
10
  - Allow registering feedbacks
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- incognia_api (0.3.0)
4
+ incognia_api (0.3.1)
5
5
  faraday
6
6
  faraday_middleware
7
7
 
@@ -13,29 +13,33 @@ GEM
13
13
  crack (0.4.5)
14
14
  rexml
15
15
  diff-lcs (1.4.4)
16
- faraday (1.7.1)
16
+ faraday (1.10.3)
17
17
  faraday-em_http (~> 1.0)
18
18
  faraday-em_synchrony (~> 1.0)
19
19
  faraday-excon (~> 1.1)
20
- faraday-httpclient (~> 1.0.1)
20
+ faraday-httpclient (~> 1.0)
21
+ faraday-multipart (~> 1.0)
21
22
  faraday-net_http (~> 1.0)
22
- faraday-net_http_persistent (~> 1.1)
23
+ faraday-net_http_persistent (~> 1.0)
23
24
  faraday-patron (~> 1.0)
24
25
  faraday-rack (~> 1.0)
25
- multipart-post (>= 1.2, < 3)
26
+ faraday-retry (~> 1.0)
26
27
  ruby2_keywords (>= 0.0.4)
27
28
  faraday-em_http (1.0.0)
28
29
  faraday-em_synchrony (1.0.0)
29
30
  faraday-excon (1.1.0)
30
31
  faraday-httpclient (1.0.1)
32
+ faraday-multipart (1.0.4)
33
+ multipart-post (~> 2)
31
34
  faraday-net_http (1.0.1)
32
35
  faraday-net_http_persistent (1.2.0)
33
36
  faraday-patron (1.0.0)
34
37
  faraday-rack (1.0.0)
35
- faraday_middleware (1.0.0)
38
+ faraday-retry (1.0.3)
39
+ faraday_middleware (1.2.0)
36
40
  faraday (~> 1.0)
37
41
  hashdiff (1.0.1)
38
- multipart-post (2.1.1)
42
+ multipart-post (2.2.3)
39
43
  public_suffix (4.0.6)
40
44
  rake (13.0.3)
41
45
  rexml (3.2.5)
data/README.md CHANGED
@@ -64,6 +64,22 @@ assessment = api.register_signup(
64
64
 
65
65
  ```
66
66
 
67
+ It also supports optional parameters, for example:
68
+
69
+ ```ruby
70
+ address = Incognia::Address.new(line: "West 34th Street, New York City, NY 10001")
71
+ installation_id = "WlMksW+jh5GPhqWBorsV8yDihoSHHpmt+DpjJ7eYxpHhuO/5tuHTuA..."
72
+ external_id = "7b02736a-7718-4b83-8982-f68fb6f501fa"
73
+
74
+ assessment = api.register_signup(
75
+ installation_id: installation_id,
76
+ address: address,
77
+ external_id: external_id
78
+ )
79
+
80
+ # => #<OpenStruct id="...", device_id="...", risk_assessment="..", evidence=...>
81
+ ```
82
+
67
83
  ### Getting a Signup
68
84
 
69
85
  This method allows you to query the latest assessment for a given signup event, returning signup assessment, containing the risk assessment and supporting evidence:
data/lib/incognia/api.rb CHANGED
@@ -15,9 +15,10 @@ module Incognia
15
15
  host: "https://api.incognia.com/api")
16
16
  end
17
17
 
18
- def register_signup(installation_id:, address: nil)
18
+ def register_signup(installation_id:, address: nil, **opts)
19
19
  params = { installation_id: installation_id }
20
- params.merge!(address.to_hash) if address
20
+ params.merge!(opts)
21
+ params.merge!(address&.to_hash) if address
21
22
 
22
23
  response = connection.request(
23
24
  :post,
@@ -6,12 +6,12 @@ module Incognia
6
6
  CHALLENGE_PASSED = 'challenge_passed'.freeze
7
7
  CHARGEBACK = 'chargeback'.freeze
8
8
  CHARGEBACK_NOTIFICATION = 'chargeback_notification'.freeze
9
- CUSTOM_CHURN_DEBT_20D = 'custom_churn_debt_20d'.freeze
10
9
  IDENTITY_FRAUD = 'identity_fraud'.freeze
11
10
  MPOS_FRAUD = 'mpos_fraud'.freeze
12
11
  PASSWORD_CHANGE_FAILED = 'password_change_failed'.freeze
13
12
  PASSWORD_CHANGED_SUCCESSFULLY = 'password_changed_successfully'.freeze
14
13
  PROMOTION_ABUSE = 'promotion_abuse'.freeze
14
+ RESET = 'reset'.freeze
15
15
  VERIFIED = 'verified'.freeze
16
16
 
17
17
  SIGNUP_ACCEPTED = 'signup_accepted'.freeze
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Incognia
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incognia_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Cavalcanti
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-08 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - ".github/CODEOWNERS"
49
+ - ".github/workflows/codeql.yml"
49
50
  - ".github/workflows/main.yml"
50
51
  - ".gitignore"
51
52
  - ".rspec"
@@ -75,7 +76,7 @@ metadata:
75
76
  homepage_uri: https://github.com/inloco/incognia-api-ruby
76
77
  source_code_uri: https://github.com/inloco/incognia-api-ruby
77
78
  changelog_uri: https://github.com/inloco/incognia-api-ruby/blob/master/
78
- post_install_message:
79
+ post_install_message:
79
80
  rdoc_options: []
80
81
  require_paths:
81
82
  - lib
@@ -90,8 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
91
  - !ruby/object:Gem::Version
91
92
  version: '0'
92
93
  requirements: []
93
- rubygems_version: 3.2.3
94
- signing_key:
94
+ rubygems_version: 3.1.4
95
+ signing_key:
95
96
  specification_version: 4
96
97
  summary: Official Ruby lib for communicating with Incognia API
97
98
  test_files: []