Class: OldPlaid::Institution
- Inherits:
-
Object
- Object
- OldPlaid::Institution
- Defined in:
- lib/old_plaid/models/institution.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Object
Returns the value of attribute credentials.
-
#has_mfa ⇒ Object
Returns the value of attribute has_mfa.
-
#id ⇒ Object
Returns the value of attribute id.
-
#mfa ⇒ Object
Returns the value of attribute mfa.
-
#name ⇒ Object
Returns the value of attribute name.
-
#products ⇒ Object
Returns the value of attribute products.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
-
.all(res) ⇒ Object
API: semi-private This method takes an array returned from the API and instantiates all of the institutions.
Instance Method Summary collapse
-
#initialize(fields = {}) ⇒ Institution
constructor
A new instance of Institution.
Constructor Details
#initialize(fields = {}) ⇒ Institution
Returns a new instance of Institution.
5 6 7 8 9 10 11 12 13 |
# File 'lib/old_plaid/models/institution.rb', line 5 def initialize(fields = {}) @id = fields['id'] @name = fields['name'] @type = fields['type'] @has_mfa = fields['has_mfa'] @mfa = fields['mfa'] @credentials = fields['credentials'] @products = fields['products'] end |
Instance Attribute Details
#credentials ⇒ Object
Returns the value of attribute credentials.
3 4 5 |
# File 'lib/old_plaid/models/institution.rb', line 3 def credentials @credentials end |
#has_mfa ⇒ Object
Returns the value of attribute has_mfa.
3 4 5 |
# File 'lib/old_plaid/models/institution.rb', line 3 def has_mfa @has_mfa end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/old_plaid/models/institution.rb', line 3 def id @id end |
#mfa ⇒ Object
Returns the value of attribute mfa.
3 4 5 |
# File 'lib/old_plaid/models/institution.rb', line 3 def mfa @mfa end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/old_plaid/models/institution.rb', line 3 def name @name end |
#products ⇒ Object
Returns the value of attribute products.
3 4 5 |
# File 'lib/old_plaid/models/institution.rb', line 3 def products @products end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/old_plaid/models/institution.rb', line 3 def type @type end |
Class Method Details
.all(res) ⇒ Object
API: semi-private This method takes an array returned from the API and instantiates all of the institutions
17 18 19 |
# File 'lib/old_plaid/models/institution.rb', line 17 def self.all(res) res.map { |inst| new(inst) } end |