class Nem::Model::MosaicLevy

Attributes

fee[R]
mosaic_id[R]
recipient[R]
type[R]

Public Class Methods

new_from_mosaic_levy(hash) click to toggle source
# File lib/nem/model/mosaic_levy.rb, line 11
def self.new_from_mosaic_levy(hash)
  return nil if hash.empty?
  mosaic_id = MosaicId.new_from_mosaic_id(hash[:mosaicId])
  new(
    fee: hash[:fee],
    recipient: hash[:recipient],
    type: hash[:type],
    mosaic_id: mosaic_id
  )
end

Public Instance Methods

to_hash() click to toggle source
# File lib/nem/model/mosaic_levy.rb, line 22
def to_hash
  {
    fee: fee,
    recipient: recipient,
    type: type,
    mosaicId: mosaic_id.to_hash
  }
end