atrium-ruby 1.2.1 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/example_workflow.rb +0 -5
- data/lib/atrium/connect.rb +14 -2
- data/lib/atrium/member.rb +1 -0
- data/lib/atrium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fdc584bc3e01b7ef5b0f329c5d79466a3376ab7
|
4
|
+
data.tar.gz: c2085c7c434a0ba0e2d339ddcdf5ab71324394d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 503809e0fea41f524afd5e0c49d80f8fcb749c1dc7047c6d5b0dd96e08afd3cda865b7238573a4b38bddb23d25f31a47731a27c5460cb6608ecd35608b2b500c
|
7
|
+
data.tar.gz: f408f6eb09c4c6ae9032059ba5d75bd720a41fe2e26c6839d85413cffb71e2339e18dcd4dac406d9f8a8ba3e35c0ca3901a37e488b884f1e6ee9036d982ead90
|
data/lib/atrium/connect.rb
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
+
require "set"
|
2
|
+
|
1
3
|
module Atrium
|
2
4
|
class Connect
|
3
5
|
include ::ActiveAttr::Model
|
4
6
|
|
7
|
+
PERMITTED_CONNECT_CREATE_OPTIONS = ::Set.new([
|
8
|
+
"current_institution_code",
|
9
|
+
"current_member_guid",
|
10
|
+
"is_mobile_webview",
|
11
|
+
"update_credentials",
|
12
|
+
]).freeze
|
5
13
|
SCRIPT_SOURCE = "https://atrium.mx.com/connect.js".freeze
|
6
14
|
|
7
15
|
# ATTRIBUTES
|
@@ -11,9 +19,13 @@ module Atrium
|
|
11
19
|
##
|
12
20
|
# CLASS METHODS
|
13
21
|
#
|
14
|
-
def self.create(user_guid:)
|
22
|
+
def self.create(user_guid:, options: {})
|
23
|
+
options.each do |key, _value|
|
24
|
+
fail ArgumentError, "An invalid option was provided: #{key}" unless PERMITTED_CONNECT_CREATE_OPTIONS.include?(key.to_s)
|
25
|
+
end
|
26
|
+
|
15
27
|
endpoint = "/users/#{user_guid}/connect_widget_url"
|
16
|
-
connect_response = ::Atrium.client.make_request(:post, endpoint)
|
28
|
+
connect_response = ::Atrium.client.make_request(:post, endpoint, options)
|
17
29
|
|
18
30
|
connect_params = connect_response["user"]
|
19
31
|
::Atrium::Connect.new(connect_params)
|
data/lib/atrium/member.rb
CHANGED
data/lib/atrium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atrium-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Carstens, Dan Jones, Zach Toolson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_attr
|