Class: Remitmd::Balance
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#chain_id ⇒ Object
readonly
Returns the value of attribute chain_id.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#usdc ⇒ Object
readonly
Returns the value of attribute usdc.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Balance
constructor
A new instance of Balance.
Methods inherited from Model
Constructor Details
#initialize(attrs) ⇒ Balance
Returns a new instance of Balance.
156 157 158 159 160 161 162 |
# File 'lib/remitmd/models.rb', line 156 def initialize(attrs) h = attrs.transform_keys(&:to_s) @usdc = decimal(h["usdc"]) @address = h["address"] @chain_id = h["chain_id"]&.to_i @updated_at = parse_time(h["updated_at"]) end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
164 165 166 |
# File 'lib/remitmd/models.rb', line 164 def address @address end |
#chain_id ⇒ Object (readonly)
Returns the value of attribute chain_id.
164 165 166 |
# File 'lib/remitmd/models.rb', line 164 def chain_id @chain_id end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
164 165 166 |
# File 'lib/remitmd/models.rb', line 164 def updated_at @updated_at end |
#usdc ⇒ Object (readonly)
Returns the value of attribute usdc.
164 165 166 |
# File 'lib/remitmd/models.rb', line 164 def usdc @usdc end |