Class: ECMBlockchain::Member

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/ecm-blockchain-api/models/member.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#certificateObject

Returns the value of attribute certificate.



7
8
9
# File 'lib/ecm-blockchain-api/models/member.rb', line 7

def certificate
  @certificate
end

#custom_attributesObject

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

#organisationObject

Returns the value of attribute organisation.



7
8
9
# File 'lib/ecm-blockchain-api/models/member.rb', line 7

def organisation
  @organisation
end

#uuidObject

Returns the value of attribute uuid.



7
8
9
# File 'lib/ecm-blockchain-api/models/member.rb', line 7

def uuid
  @uuid
end