Class: Nem::Model::MosaicSupplyChangeTransaction

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

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

#deltaObject (readonly)

Returns the value of attribute delta.



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

def delta
  @delta
end

#mosaic_idObject (readonly)

Returns the value of attribute mosaic_id.



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

def mosaic_id
  @mosaic_id
end

#supply_typeObject (readonly)

Returns the value of attribute supply_type.



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

def supply_type
  @supply_type
end

Class Method Details

.new_from_transaction_meta_data_pair(hash) ⇒ Object



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

def self.(hash)
  transaction = hash[:transaction]
  mo_id = MosaicId.new_from_mosaic_id(transaction[:mosaicId])
  attrs = (hash).merge(
    supply_type: transaction[:supplyType],
    delta: transaction[:delta],
    mosaic_id: mo_id
  )
  new(attrs)
end