isaca 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isaca/models/countries.rb +11 -0
- data/lib/isaca/models/explicit_countries.rb +11 -0
- data/lib/isaca/models/geographical.rb +17 -0
- data/lib/isaca/requests/countries.rb +17 -0
- data/lib/isaca/requests/explicit_countries.rb +17 -0
- data/lib/isaca/requests/report_consent.rb +21 -0
- data/lib/isaca/version.rb +1 -1
- data/lib/isaca.rb +11 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 638241b987371e717f92ad0adb69ff705c72a892
|
4
|
+
data.tar.gz: 40dbbce5548aec9662c16ea8e1bfab7336e7e71e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c961ebfdda729d5ac2e7fb22dc96af96cdbc25cef3845f3b6273694abe971572d6b1626730cf8ca48c708df860f7915850ff6f04b9b9b8d21109700c6f0a98c
|
7
|
+
data.tar.gz: 221d21e5513a68ae70b4d802fd21f4ddb7c5b283daf2e04e4d01c8f0dc807681726dffe3482e833150fd04a7fb67db44f42f6ea1dcc8f0df09f9b6b4d0d737b6
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module ISACA
|
2
|
+
module Model
|
3
|
+
module Geographical
|
4
|
+
attr_accessor :countries
|
5
|
+
|
6
|
+
def includes_country?(value)
|
7
|
+
value.downcase!
|
8
|
+
|
9
|
+
countries.each do |country|
|
10
|
+
return true if country['CODE'].downcase == value || country['DESCRIPTION'].downcase == value
|
11
|
+
end
|
12
|
+
|
13
|
+
false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module ISACA
|
2
|
+
module Request
|
3
|
+
module Countries
|
4
|
+
def self.get
|
5
|
+
response = ISACA::Request.get do |request|
|
6
|
+
uri = URI(ISACA.configuration.url)
|
7
|
+
request.path = "#{uri.scheme}://#{uri.hostname}:#{uri.port}/isacaservices/countries.json"
|
8
|
+
end
|
9
|
+
|
10
|
+
data = JSON.parse(response.body)
|
11
|
+
ISACA.logger.debug(data) if ISACA.configuration.debug
|
12
|
+
|
13
|
+
response.status == 200 ? ISACA::Model::Countries.new(data) : nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module ISACA
|
2
|
+
module Request
|
3
|
+
module ExplicitCountries
|
4
|
+
def self.get
|
5
|
+
response = ISACA::Request.get do |request|
|
6
|
+
uri = URI(ISACA.configuration.url)
|
7
|
+
request.path = "#{uri.scheme}://#{uri.hostname}:#{uri.port}/isacaservices/explicitcountries.json"
|
8
|
+
end
|
9
|
+
|
10
|
+
data = JSON.parse(response.body)
|
11
|
+
ISACA.logger.debug(data) if ISACA.configuration.debug
|
12
|
+
|
13
|
+
response.status == 200 ? ISACA::Model::ExplicitCountries.new(data) : nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module ISACA
|
2
|
+
module Request
|
3
|
+
module ReportConsent
|
4
|
+
def self.get(imis_id, options={})
|
5
|
+
opts = {
|
6
|
+
marketing: 0
|
7
|
+
}.merge(options)
|
8
|
+
|
9
|
+
response = ISACA::Request.get do |request|
|
10
|
+
request.path = request.path + '/ReportConsent'
|
11
|
+
request.params['MarketingConsent'] = opts[:marketing]
|
12
|
+
request.params['iMISID'] = imis_id
|
13
|
+
end
|
14
|
+
|
15
|
+
ISACA.logger.debug(response) if ISACA.configuration.debug
|
16
|
+
|
17
|
+
response.status == 200
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/isaca/version.rb
CHANGED
data/lib/isaca.rb
CHANGED
@@ -1,17 +1,28 @@
|
|
1
1
|
require 'isaca/helpers'
|
2
2
|
|
3
|
+
# Requests
|
3
4
|
require 'isaca/requests/request'
|
4
5
|
require 'isaca/requests/authenticate_user'
|
6
|
+
require 'isaca/requests/countries'
|
7
|
+
require 'isaca/requests/explicit_countries'
|
5
8
|
require 'isaca/requests/get_user_by_id'
|
6
9
|
require 'isaca/requests/get_user_details_by_token'
|
10
|
+
require 'isaca/requests/report_consent'
|
7
11
|
require 'isaca/requests/submit_cpe'
|
8
12
|
require 'isaca/requests/log_out'
|
9
13
|
|
14
|
+
# Concerns
|
15
|
+
require 'isaca/models/geographical'
|
16
|
+
|
17
|
+
# Models
|
10
18
|
require 'isaca/models/authenticate_user'
|
19
|
+
require 'isaca/models/countries'
|
20
|
+
require 'isaca/models/explicit_countries'
|
11
21
|
require 'isaca/models/get_user_by_id'
|
12
22
|
require 'isaca/models/get_user_details_by_token'
|
13
23
|
require 'isaca/models/submit_cpe'
|
14
24
|
|
25
|
+
# Everything else where order load order does not matter
|
15
26
|
require 'isaca/version'
|
16
27
|
require 'fileutils'
|
17
28
|
require 'openssl'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isaca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Orahood
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -85,13 +85,19 @@ files:
|
|
85
85
|
- lib/isaca.rb
|
86
86
|
- lib/isaca/helpers.rb
|
87
87
|
- lib/isaca/models/authenticate_user.rb
|
88
|
+
- lib/isaca/models/countries.rb
|
89
|
+
- lib/isaca/models/explicit_countries.rb
|
90
|
+
- lib/isaca/models/geographical.rb
|
88
91
|
- lib/isaca/models/get_user_by_id.rb
|
89
92
|
- lib/isaca/models/get_user_details_by_token.rb
|
90
93
|
- lib/isaca/models/submit_cpe.rb
|
91
94
|
- lib/isaca/requests/authenticate_user.rb
|
95
|
+
- lib/isaca/requests/countries.rb
|
96
|
+
- lib/isaca/requests/explicit_countries.rb
|
92
97
|
- lib/isaca/requests/get_user_by_id.rb
|
93
98
|
- lib/isaca/requests/get_user_details_by_token.rb
|
94
99
|
- lib/isaca/requests/log_out.rb
|
100
|
+
- lib/isaca/requests/report_consent.rb
|
95
101
|
- lib/isaca/requests/request.rb
|
96
102
|
- lib/isaca/requests/submit_cpe.rb
|
97
103
|
- lib/isaca/version.rb
|