Class: Remitmd::Reputation
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#member_since ⇒ Object
readonly
Returns the value of attribute member_since.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#total_paid ⇒ Object
readonly
Returns the value of attribute total_paid.
-
#total_received ⇒ Object
readonly
Returns the value of attribute total_received.
-
#transaction_count ⇒ Object
readonly
Returns the value of attribute transaction_count.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Reputation
constructor
A new instance of Reputation.
Methods inherited from Model
Constructor Details
#initialize(attrs) ⇒ Reputation
Returns a new instance of Reputation.
170 171 172 173 174 175 176 177 178 |
# File 'lib/remitmd/models.rb', line 170 def initialize(attrs) h = attrs.transform_keys(&:to_s) @address = h["wallet"] || h["address"] @score = h["score"].to_i @total_paid = decimal(h["total_paid"]) @total_received = decimal(h["total_received"]) @transaction_count = h["transaction_count"].to_i @member_since = parse_time(h["member_since"]) end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
180 181 182 |
# File 'lib/remitmd/models.rb', line 180 def address @address end |
#member_since ⇒ Object (readonly)
Returns the value of attribute member_since.
180 181 182 |
# File 'lib/remitmd/models.rb', line 180 def member_since @member_since end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
180 181 182 |
# File 'lib/remitmd/models.rb', line 180 def score @score end |
#total_paid ⇒ Object (readonly)
Returns the value of attribute total_paid.
180 181 182 |
# File 'lib/remitmd/models.rb', line 180 def total_paid @total_paid end |
#total_received ⇒ Object (readonly)
Returns the value of attribute total_received.
180 181 182 |
# File 'lib/remitmd/models.rb', line 180 def total_received @total_received end |
#transaction_count ⇒ Object (readonly)
Returns the value of attribute transaction_count.
180 181 182 |
# File 'lib/remitmd/models.rb', line 180 def transaction_count @transaction_count end |