Class: Mintchip::Hosted::Info
- Inherits:
-
Object
- Object
- Mintchip::Hosted::Info
- Defined in:
- lib/mintchip/hosted/info.rb
Constant Summary collapse
- ATTRIBUTES =
%w(id currencyCode balance creditLogCount debitLogCount) + %w(creditLogCountRemaining debitLogCountRemaining maxCreditAllowed maxDebitAllowed version)
Instance Method Summary collapse
-
#initialize(str) ⇒ Info
constructor
A new instance of Info.
Constructor Details
#initialize(str) ⇒ Info
Returns a new instance of Info.
9 10 11 12 13 14 |
# File 'lib/mintchip/hosted/info.rb', line 9 def initialize(str) attrs = JSON.parse(str) ATTRIBUTES.each do |attr| instance_variable_set("@#{attr.underscore}", attrs[attr]) end end |