atrium-ruby 2.8.2 → 2.8.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
  SHA256:
3
- metadata.gz: 5354c77611aa59ed63baceac567d99611f04a264e1486bb5934edd6563c375c8
4
- data.tar.gz: b8a46376e3634120c74727138b77c323bba2504525b48c4150a4e8fa3bfcf764
3
+ metadata.gz: 65befc6fc0c6c7c8ebaecd29ac064fc97169a7c04b0cb0dd87424a99f8f484a8
4
+ data.tar.gz: 2f0dc4409e08e6329245b633d92252e5c173415cc74e4bc0e247b9ae23851693
5
5
  SHA512:
6
- metadata.gz: cc41bd51dc06d220283912e81e8b0a199ac5690900edf030a434b396a31f25f17030dd48b06126fb28da1c238e661b4bcd5bdbf9c32a4f047d231cf4ab37d008
7
- data.tar.gz: bc3ec824fd9c7accfb39e87a32c4cbfa68fa24db084a1f2d65bfff097b10fd9736267ae6f78a6a547e8e8cf0300fb025e3959e2a61777c38cadaf410d88c8955
6
+ metadata.gz: 6f354f4adc11a0009afa5a83af8bb9b3d83a45f4f025ccc072cc11005f35d89d0827e8a17b358fc85d7b8666d2dca0264edfdd9b4d2e22dbfe4282e8c7700f5b
7
+ data.tar.gz: 919020d49be4356d9442e328191c2a15d6b9e145a32567593457fe9ac6379ce0eb3ed741457245e378ecd7d0262f184e62536aee45de8489f9e6b294442588d1
data/README.md CHANGED
@@ -17,12 +17,12 @@ gem build atrium-ruby.gemspec
17
17
  Then either install the gem locally:
18
18
 
19
19
  ```shell
20
- gem install ./atrium-ruby-2.8.2.gem
20
+ gem install ./atrium-ruby-2.8.3.gem
21
21
  ```
22
22
 
23
23
  Finally add this to the Gemfile:
24
24
 
25
- gem 'atrium-ruby', '~> 2.8.2'
25
+ gem 'atrium-ruby', '~> 2.8.3'
26
26
 
27
27
  ### Install from Git
28
28
 
@@ -126,6 +126,7 @@ Class | Method | HTTP request | Description
126
126
  - [Atrium::AccountResponseBody](docs/AccountResponseBody.md)
127
127
  - [Atrium::AccountsResponseBody](docs/AccountsResponseBody.md)
128
128
  - [Atrium::Challenge](docs/Challenge.md)
129
+ - [Atrium::ChallengeImageOption](docs/ChallengeImageOption.md)
129
130
  - [Atrium::ChallengeOption](docs/ChallengeOption.md)
130
131
  - [Atrium::ChallengesResponseBody](docs/ChallengesResponseBody.md)
131
132
  - [Atrium::ConnectWidget](docs/ConnectWidget.md)
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
6
6
  **field_name** | **String** | | [optional]
7
7
  **guid** | **String** | | [optional]
8
8
  **image_data** | **String** | | [optional]
9
+ **image_options** | [**Array<ChallengeImageOption>**](ChallengeImageOption.md) | | [optional]
9
10
  **label** | **String** | | [optional]
10
11
  **options** | [**Array<ChallengeOption>**](ChallengeOption.md) | | [optional]
11
12
  **type** | **String** | | [optional]
@@ -0,0 +1,10 @@
1
+ # Atrium::ChallengeImageOption
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data_uri** | **String** | | [optional]
7
+ **label** | **String** | | [optional]
8
+ **value** | **String** | | [optional]
9
+
10
+
@@ -3,7 +3,6 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **image_data** | **String** | | [optional]
7
6
  **label** | **String** | | [optional]
8
7
  **value** | **String** | | [optional]
9
8
 
@@ -21,6 +21,7 @@ require 'atrium-ruby/models/account_owners_response_body'
21
21
  require 'atrium-ruby/models/account_response_body'
22
22
  require 'atrium-ruby/models/accounts_response_body'
23
23
  require 'atrium-ruby/models/challenge'
24
+ require 'atrium-ruby/models/challenge_image_option'
24
25
  require 'atrium-ruby/models/challenge_option'
25
26
  require 'atrium-ruby/models/challenges_response_body'
26
27
  require 'atrium-ruby/models/connect_widget'
@@ -16,6 +16,8 @@ module Atrium
16
16
 
17
17
  attr_accessor :image_data
18
18
 
19
+ attr_accessor :image_options
20
+
19
21
  attr_accessor :label
20
22
 
21
23
  attr_accessor :options
@@ -28,6 +30,7 @@ module Atrium
28
30
  :'field_name' => :'field_name',
29
31
  :'guid' => :'guid',
30
32
  :'image_data' => :'image_data',
33
+ :'image_options' => :'image_options',
31
34
  :'label' => :'label',
32
35
  :'options' => :'options',
33
36
  :'type' => :'type'
@@ -40,6 +43,7 @@ module Atrium
40
43
  :'field_name' => :'String',
41
44
  :'guid' => :'String',
42
45
  :'image_data' => :'String',
46
+ :'image_options' => :'Array<ChallengeImageOption>',
43
47
  :'label' => :'String',
44
48
  :'options' => :'Array<ChallengeOption>',
45
49
  :'type' => :'String'
@@ -66,6 +70,12 @@ module Atrium
66
70
  self.image_data = attributes[:'image_data']
67
71
  end
68
72
 
73
+ if attributes.has_key?(:'image_options')
74
+ if (value = attributes[:'image_options']).is_a?(Array)
75
+ self.image_options = value
76
+ end
77
+ end
78
+
69
79
  if attributes.has_key?(:'label')
70
80
  self.label = attributes[:'label']
71
81
  end
@@ -102,6 +112,7 @@ module Atrium
102
112
  field_name == o.field_name &&
103
113
  guid == o.guid &&
104
114
  image_data == o.image_data &&
115
+ image_options == o.image_options &&
105
116
  label == o.label &&
106
117
  options == o.options &&
107
118
  type == o.type
@@ -116,7 +127,7 @@ module Atrium
116
127
  # Calculates hash code according to all attributes.
117
128
  # @return [Fixnum] Hash code
118
129
  def hash
119
- [field_name, guid, image_data, label, options, type].hash
130
+ [field_name, guid, image_data, image_options, label, options, type].hash
120
131
  end
121
132
 
122
133
  # Builds the object from hash
@@ -0,0 +1,197 @@
1
+ =begin
2
+ #MX API
3
+
4
+ #The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
5
+
6
+
7
+ =end
8
+
9
+ require 'date'
10
+
11
+ module Atrium
12
+ class ChallengeImageOption
13
+ attr_accessor :data_uri
14
+
15
+ attr_accessor :label
16
+
17
+ attr_accessor :value
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'data_uri' => :'data_uri',
23
+ :'label' => :'label',
24
+ :'value' => :'value'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.mx_types
30
+ {
31
+ :'data_uri' => :'String',
32
+ :'label' => :'String',
33
+ :'value' => :'String'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'data_uri')
46
+ self.data_uri = attributes[:'data_uri']
47
+ end
48
+
49
+ if attributes.has_key?(:'label')
50
+ self.label = attributes[:'label']
51
+ end
52
+
53
+ if attributes.has_key?(:'value')
54
+ self.value = attributes[:'value']
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ invalid_properties
63
+ end
64
+
65
+ # Check to see if the all the properties in the model are valid
66
+ # @return true if the model is valid
67
+ def valid?
68
+ true
69
+ end
70
+
71
+ # Checks equality by comparing each attribute.
72
+ # @param [Object] Object to be compared
73
+ def ==(o)
74
+ return true if self.equal?(o)
75
+ self.class == o.class &&
76
+ data_uri == o.data_uri &&
77
+ label == o.label &&
78
+ value == o.value
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [data_uri, label, value].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.mx_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :String
124
+ value.to_s
125
+ when :Integer
126
+ value.to_i
127
+ when :Float
128
+ value.to_f
129
+ when :BOOLEAN
130
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
131
+ true
132
+ else
133
+ false
134
+ end
135
+ when :Object
136
+ # generic object (usually a Hash), return directly
137
+ value
138
+ when /\AArray<(?<inner_type>.+)>\z/
139
+ inner_type = Regexp.last_match[:inner_type]
140
+ value.map { |v| _deserialize(inner_type, v) }
141
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
142
+ k_type = Regexp.last_match[:k_type]
143
+ v_type = Regexp.last_match[:v_type]
144
+ {}.tap do |hash|
145
+ value.each do |k, v|
146
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ end
148
+ end
149
+ else # model
150
+ temp_model = Atrium.const_get(type).new
151
+ temp_model.build_from_hash(value)
152
+ end
153
+ end
154
+
155
+ # Returns the string representation of the object
156
+ # @return [String] String presentation of the object
157
+ def to_s
158
+ to_hash.to_s
159
+ end
160
+
161
+ # to_body is an alias to to_hash (backward compatibility)
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_body
164
+ to_hash
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ next if value.nil?
174
+ hash[param] = _to_hash(value)
175
+ end
176
+ hash
177
+ end
178
+
179
+ # Outputs non-array value in the form of hash
180
+ # For object, use to_hash. Otherwise, just return the value
181
+ # @param [Object] value Any valid value
182
+ # @return [Hash] Returns the value in the form of hash
183
+ def _to_hash(value)
184
+ if value.is_a?(Array)
185
+ value.compact.map { |v| _to_hash(v) }
186
+ elsif value.is_a?(Hash)
187
+ {}.tap do |hash|
188
+ value.each { |k, v| hash[k] = _to_hash(v) }
189
+ end
190
+ elsif value.respond_to? :to_hash
191
+ value.to_hash
192
+ else
193
+ value
194
+ end
195
+ end
196
+ end
197
+ end
@@ -10,8 +10,6 @@ require 'date'
10
10
 
11
11
  module Atrium
12
12
  class ChallengeOption
13
- attr_accessor :image_data
14
-
15
13
  attr_accessor :label
16
14
 
17
15
  attr_accessor :value
@@ -19,7 +17,6 @@ module Atrium
19
17
  # Attribute mapping from ruby-style variable name to JSON key.
20
18
  def self.attribute_map
21
19
  {
22
- :'image_data' => :'image_data',
23
20
  :'label' => :'label',
24
21
  :'value' => :'value'
25
22
  }
@@ -28,7 +25,6 @@ module Atrium
28
25
  # Attribute type mapping.
29
26
  def self.mx_types
30
27
  {
31
- :'image_data' => :'String',
32
28
  :'label' => :'String',
33
29
  :'value' => :'String'
34
30
  }
@@ -42,10 +38,6 @@ module Atrium
42
38
  # convert string to symbol for hash key
43
39
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
40
 
45
- if attributes.has_key?(:'image_data')
46
- self.image_data = attributes[:'image_data']
47
- end
48
-
49
41
  if attributes.has_key?(:'label')
50
42
  self.label = attributes[:'label']
51
43
  end
@@ -73,7 +65,6 @@ module Atrium
73
65
  def ==(o)
74
66
  return true if self.equal?(o)
75
67
  self.class == o.class &&
76
- image_data == o.image_data &&
77
68
  label == o.label &&
78
69
  value == o.value
79
70
  end
@@ -87,7 +78,7 @@ module Atrium
87
78
  # Calculates hash code according to all attributes.
88
79
  # @return [Fixnum] Hash code
89
80
  def hash
90
- [image_data, label, value].hash
81
+ [label, value].hash
91
82
  end
92
83
 
93
84
  # Builds the object from hash
@@ -7,5 +7,5 @@
7
7
  =end
8
8
 
9
9
  module Atrium
10
- VERSION = '2.8.2'
10
+ VERSION = '2.8.3'
11
11
  end
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #MX API
3
+
4
+ #The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
5
+
6
+
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Atrium::ChallengeImageOption
14
+ # Please update as you see appropriate
15
+ describe 'ChallengeImageOption' do
16
+ before do
17
+ # run before each test
18
+ @instance = Atrium::ChallengeImageOption.new
19
+ end
20
+
21
+ after do
22
+ # run after each test
23
+ end
24
+
25
+ describe 'test an instance of ChallengeImageOption' do
26
+ it 'should create an instance of ChallengeImageOption' do
27
+ expect(@instance).to be_instance_of(Atrium::ChallengeImageOption)
28
+ end
29
+ end
30
+ describe 'test attribute "data_uri"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "label"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "value"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ end
@@ -27,12 +27,6 @@ describe 'ChallengeOption' do
27
27
  expect(@instance).to be_instance_of(Atrium::ChallengeOption)
28
28
  end
29
29
  end
30
- describe 'test attribute "image_data"' do
31
- it 'should work' do
32
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
33
- end
34
- end
35
-
36
30
  describe 'test attribute "label"' do
37
31
  it 'should work' do
38
32
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -45,6 +45,12 @@ describe 'Challenge' do
45
45
  end
46
46
  end
47
47
 
48
+ describe 'test attribute "image_options"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
48
54
  describe 'test attribute "label"' do
49
55
  it 'should work' do
50
56
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
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: 2.8.2
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - MX
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-29 00:00:00.000000000 Z
11
+ date: 2019-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -211,6 +211,7 @@ files:
211
211
  - docs/AccountsApi.md
212
212
  - docs/AccountsResponseBody.md
213
213
  - docs/Challenge.md
214
+ - docs/ChallengeImageOption.md
214
215
  - docs/ChallengeOption.md
215
216
  - docs/ChallengesResponseBody.md
216
217
  - docs/ConnectWidget.md
@@ -290,6 +291,7 @@ files:
290
291
  - lib/atrium-ruby/models/account_response_body.rb
291
292
  - lib/atrium-ruby/models/accounts_response_body.rb
292
293
  - lib/atrium-ruby/models/challenge.rb
294
+ - lib/atrium-ruby/models/challenge_image_option.rb
293
295
  - lib/atrium-ruby/models/challenge_option.rb
294
296
  - lib/atrium-ruby/models/challenges_response_body.rb
295
297
  - lib/atrium-ruby/models/connect_widget.rb
@@ -355,6 +357,7 @@ files:
355
357
  - spec/models/account_response_body_spec.rb
356
358
  - spec/models/account_spec.rb
357
359
  - spec/models/accounts_response_body_spec.rb
360
+ - spec/models/challenge_image_option_spec.rb
358
361
  - spec/models/challenge_option_spec.rb
359
362
  - spec/models/challenge_spec.rb
360
363
  - spec/models/challenges_response_body_spec.rb
@@ -448,6 +451,7 @@ test_files:
448
451
  - spec/models/merchant_response_body_spec.rb
449
452
  - spec/models/challenge_option_spec.rb
450
453
  - spec/models/connect_widget_request_body_spec.rb
454
+ - spec/models/challenge_image_option_spec.rb
451
455
  - spec/models/institution_spec.rb
452
456
  - spec/models/credential_option_spec.rb
453
457
  - spec/models/statements_response_body_spec.rb