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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 955dd8f6b1beef25e55e1e451ef1e65ceaeac5cf
4
- data.tar.gz: 28759ebf9bd76662fa389f39225c27c6596d7809
3
+ metadata.gz: 5fdc584bc3e01b7ef5b0f329c5d79466a3376ab7
4
+ data.tar.gz: c2085c7c434a0ba0e2d339ddcdf5ab71324394d8
5
5
  SHA512:
6
- metadata.gz: 381ddbc812ab690c13cc230f424d9b055b48c41e80563d76e7e8865fbd99b7550ce06892d339611abdc8aaf891455c6277e5b90a9dd1b1c0b55f72ca12956a21
7
- data.tar.gz: dce63c69f330a6d1e0870a7d10d61ce601d7efa4b8ef458570a08ded72caed96b398cb192f98630b1a78113fea89d84ca59fc9a04f27d6467bebde7ac42399c1
6
+ metadata.gz: 503809e0fea41f524afd5e0c49d80f8fcb749c1dc7047c6d5b0dd96e08afd3cda865b7238573a4b38bddb23d25f31a47731a27c5460cb6608ecd35608b2b500c
7
+ data.tar.gz: f408f6eb09c4c6ae9032059ba5d75bd720a41fe2e26c6839d85413cffb71e2339e18dcd4dac406d9f8a8ba3e35c0ca3901a37e488b884f1e6ee9036d982ead90
@@ -174,8 +174,3 @@ else
174
174
  puts "\nEnd user must be present to create a new member"
175
175
  exit
176
176
  end
177
-
178
- puts "\n* Deleting test user *"
179
- user = ::Atrium::User.read :guid => user_guid
180
- user.delete
181
- puts "Deleted user: " + user.guid
@@ -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)
@@ -4,6 +4,7 @@ module Atrium
4
4
  include ::ActiveAttr::Model
5
5
 
6
6
  attribute :aggregated_at
7
+ attribute :connection_status
7
8
  attribute :challenges
8
9
  attribute :guid
9
10
  attribute :has_processed_accounts
@@ -1,3 +1,3 @@
1
1
  module Atrium
2
- VERSION = "1.2.1".freeze
2
+ VERSION = "1.2.3".freeze
3
3
  end
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.1
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: 2017-12-08 00:00:00.000000000 Z
11
+ date: 2018-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_attr