Class: Remitmd::SpendingSummary
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#period ⇒ Object
readonly
Returns the value of attribute period.
-
#top_recipients ⇒ Object
readonly
Returns the value of attribute top_recipients.
-
#total_fees ⇒ Object
readonly
Returns the value of attribute total_fees.
-
#total_spent ⇒ Object
readonly
Returns the value of attribute total_spent.
-
#tx_count ⇒ Object
readonly
Returns the value of attribute tx_count.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ SpendingSummary
constructor
A new instance of SpendingSummary.
Methods inherited from Model
Constructor Details
#initialize(attrs) ⇒ SpendingSummary
Returns a new instance of SpendingSummary.
381 382 383 384 385 386 387 388 389 |
# File 'lib/remitmd/models.rb', line 381 def initialize(attrs) h = attrs.transform_keys(&:to_s) @address = h["address"] @period = h["period"] @total_spent = decimal(h["total_spent"]) @total_fees = decimal(h["total_fees"]) @tx_count = h["tx_count"].to_i @top_recipients = h["top_recipients"] || [] end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
391 392 393 |
# File 'lib/remitmd/models.rb', line 391 def address @address end |
#period ⇒ Object (readonly)
Returns the value of attribute period.
391 392 393 |
# File 'lib/remitmd/models.rb', line 391 def period @period end |
#top_recipients ⇒ Object (readonly)
Returns the value of attribute top_recipients.
391 392 393 |
# File 'lib/remitmd/models.rb', line 391 def top_recipients @top_recipients end |
#total_fees ⇒ Object (readonly)
Returns the value of attribute total_fees.
391 392 393 |
# File 'lib/remitmd/models.rb', line 391 def total_fees @total_fees end |
#total_spent ⇒ Object (readonly)
Returns the value of attribute total_spent.
391 392 393 |
# File 'lib/remitmd/models.rb', line 391 def total_spent @total_spent end |
#tx_count ⇒ Object (readonly)
Returns the value of attribute tx_count.
391 392 393 |
# File 'lib/remitmd/models.rb', line 391 def tx_count @tx_count end |