Class: Nem::Model::MultisigAggregateModificationTransaction

Inherits:
Transaction
  • Object
show all
Defined in:
lib/nem/model/multisig_aggregate_modification_transaction.rb

Defined Under Namespace

Classes: Modification

Instance Attribute Summary collapse

Attributes inherited from Transaction

#deadline, #fee, #hash, #height, #id, #signer, #timestamp, #type, #version

Class Method Summary collapse

Methods inherited from Transaction

new_from_account_transaction, new_from_account_transaction_meta_data_pair

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#min_cosignatoriesObject (readonly)

Returns the value of attribute min_cosignatories.



4
5
6
# File 'lib/nem/model/multisig_aggregate_modification_transaction.rb', line 4

def min_cosignatories
  @min_cosignatories
end

#modificationsObject (readonly)

Returns the value of attribute modifications.



4
5
6
# File 'lib/nem/model/multisig_aggregate_modification_transaction.rb', line 4

def modifications
  @modifications
end

#relative_changeObject (readonly)

Returns the value of attribute relative_change.



4
5
6
# File 'lib/nem/model/multisig_aggregate_modification_transaction.rb', line 4

def relative_change
  @relative_change
end

Class Method Details

.new_from_transaction_meta_data_pair(hash) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/nem/model/multisig_aggregate_modification_transaction.rb', line 7

def self.(hash)
  transaction = hash[:transaction]
  modifications = transaction[:modifications].map do |mod|
    Modification.new(mod[:modificationType], mod[:cosignatoryAccount])
  end
  attrs = (hash).merge(
    min_cosignatories: transaction[:minCosignatories],
    modifications: modifications
  )
  new(attrs)
end