Class: Remitmd::Balance

Inherits:
Model
  • Object
show all
Defined in:
lib/remitmd/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#inspect, #to_h

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

#addressObject (readonly)

Returns the value of attribute address.



164
165
166
# File 'lib/remitmd/models.rb', line 164

def address
  @address
end

#chain_idObject (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_atObject (readonly)

Returns the value of attribute updated_at.



164
165
166
# File 'lib/remitmd/models.rb', line 164

def updated_at
  @updated_at
end

#usdcObject (readonly)

Returns the value of attribute usdc.



164
165
166
# File 'lib/remitmd/models.rb', line 164

def usdc
  @usdc
end