Class: Nem::Model::MosaicLevy
- Inherits:
-
Object
- Object
- Nem::Model::MosaicLevy
- Includes:
- Nem::Mixin::Assignable
- Defined in:
- lib/nem/model/mosaic_levy.rb
Instance Attribute Summary collapse
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#mosaic_id ⇒ Object
readonly
Returns the value of attribute mosaic_id.
-
#recipient ⇒ Object
readonly
Returns the value of attribute recipient.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Nem::Mixin::Assignable
Instance Attribute Details
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
6 7 8 |
# File 'lib/nem/model/mosaic_levy.rb', line 6 def fee @fee end |
#mosaic_id ⇒ Object (readonly)
Returns the value of attribute mosaic_id.
6 7 8 |
# File 'lib/nem/model/mosaic_levy.rb', line 6 def mosaic_id @mosaic_id end |
#recipient ⇒ Object (readonly)
Returns the value of attribute recipient.
6 7 8 |
# File 'lib/nem/model/mosaic_levy.rb', line 6 def recipient @recipient end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/nem/model/mosaic_levy.rb', line 6 def type @type end |
Class Method Details
.new_from_mosaic_levy(hash) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# 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 |
Instance Method Details
#to_hash ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/nem/model/mosaic_levy.rb', line 22 def to_hash { fee: fee, recipient: recipient, type: type, mosaicId: mosaic_id.to_hash } end |