Class: Nis::Struct::AccountMetaData

Inherits:
Object
  • Object
show all
Includes:
Util::Assignable
Defined in:
lib/nis/struct/account_meta_data.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util::Assignable

#[], #initialize, #to_hash, #to_json

Instance Attribute Details

#cosignatoriesArray <Nis::Struct::AccountInfo>


7
8
9
# File 'lib/nis/struct/account_meta_data.rb', line 7

def cosignatories
  @cosignatories
end

#cosignatoryOfArray <Nis::Struct::AccountInfo> Also known as: cosignatory_of


7
8
9
# File 'lib/nis/struct/account_meta_data.rb', line 7

def cosignatoryOf
  @cosignatoryOf
end

#remoteStatusString Also known as: remote_status


7
8
9
# File 'lib/nis/struct/account_meta_data.rb', line 7

def remoteStatus
  @remoteStatus
end

#statusString


7
8
9
# File 'lib/nis/struct/account_meta_data.rb', line 7

def status
  @status
end

Class Method Details

.build(attrs) ⇒ Object


16
17
18
19
20
21
22
# File 'lib/nis/struct/account_meta_data.rb', line 16

def self.build(attrs)
  attrs[:status] = Nis::Unit::Status.new(attrs[:status])
  attrs[:remoteStatus] = Nis::Unit::Status.new(attrs[:remoteStatus])
  attrs[:cosignatoryOf] = attrs[:cosignatoryOf].map { |a| AccountInfo.build(a) }
  attrs[:cosignatories] = attrs[:cosignatories].map { |a| AccountInfo.build(a) }
  new(attrs)
end

Instance Method Details

#locked?Boolean


30
31
32
# File 'lib/nis/struct/account_meta_data.rb', line 30

def locked?
  @status == 'LOCKED'
end

#unknown?Boolean


25
26
27
# File 'lib/nis/struct/account_meta_data.rb', line 25

def unknown?
  @status == 'UNKNOWN'
end

#unlocked?Boolean


35
36
37
# File 'lib/nis/struct/account_meta_data.rb', line 35

def unlocked?
  @status == 'UNLOCKED'
end