Class: ECMBlockchain::Member
- Inherits:
-
Object
- Object
- ECMBlockchain::Member
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/ecm-blockchain-api/models/member.rb
Instance Attribute Summary collapse
-
#certificate ⇒ Object
Returns the value of attribute certificate.
-
#custom_attributes ⇒ Object
Returns the value of attribute custom_attributes.
-
#organisation ⇒ Object
Returns the value of attribute organisation.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Member
constructor
A new instance of Member.
Constructor Details
#initialize(data = {}) ⇒ Member
Returns a new instance of Member.
12 13 14 15 16 17 18 19 |
# File 'lib/ecm-blockchain-api/models/member.rb', line 12 def initialize(data={}) @uuid = data.fetch(:uuid) @organisation = data.fetch(:organisation) @certificate = data.fetch(:certificate) @custom_attributes = data[:customAttributes].map do |attr| ECMBlockchain::CustomAttribute.new(attr) end end |
Instance Attribute Details
#certificate ⇒ Object
Returns the value of attribute certificate.
7 8 9 |
# File 'lib/ecm-blockchain-api/models/member.rb', line 7 def certificate @certificate end |
#custom_attributes ⇒ Object
Returns the value of attribute custom_attributes.
7 8 9 |
# File 'lib/ecm-blockchain-api/models/member.rb', line 7 def custom_attributes @custom_attributes end |
#organisation ⇒ Object
Returns the value of attribute organisation.
7 8 9 |
# File 'lib/ecm-blockchain-api/models/member.rb', line 7 def organisation @organisation end |
#uuid ⇒ Object
Returns the value of attribute uuid.
7 8 9 |
# File 'lib/ecm-blockchain-api/models/member.rb', line 7 def uuid @uuid end |