Class: AmazonDrs::SubscriptionInfo
- Defined in:
- lib/amazon-drs/subscription_info.rb
Instance Attribute Summary collapse
-
#slots ⇒ Object
Returns the value of attribute slots.
Attributes inherited from Base
#date, #error_description_url, #error_type, #request_id, #status_code
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from AmazonDrs::Base
Instance Attribute Details
#slots ⇒ Object
Returns the value of attribute slots.
6 7 8 |
# File 'lib/amazon-drs/subscription_info.rb', line 6 def slots @slots end |
Instance Method Details
#parse_body(body) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/amazon-drs/subscription_info.rb', line 8 def parse_body(body) json = JSON.parse(body) @slots = {} json['slotsSubscriptionStatus'].each_pair do |slot_id, available| @slots[slot_id] = available end end |