Class: Apiddress::UsageResponse
- Inherits:
-
Data
- Object
- Data
- Apiddress::UsageResponse
- Defined in:
- lib/apiddress/models.rb
Overview
Monthly usage for the authenticated API key.
Instance Attribute Summary collapse
-
#month ⇒ Object
readonly
Returns the value of attribute month.
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
-
#requests_limit ⇒ Object
readonly
Returns the value of attribute requests_limit.
-
#requests_used ⇒ Object
readonly
Returns the value of attribute requests_used.
Class Method Summary collapse
Instance Attribute Details
#month ⇒ Object (readonly)
Returns the value of attribute month
153 154 155 |
# File 'lib/apiddress/models.rb', line 153 def month @month end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining
153 154 155 |
# File 'lib/apiddress/models.rb', line 153 def remaining @remaining end |
#requests_limit ⇒ Object (readonly)
Returns the value of attribute requests_limit
153 154 155 |
# File 'lib/apiddress/models.rb', line 153 def requests_limit @requests_limit end |
#requests_used ⇒ Object (readonly)
Returns the value of attribute requests_used
153 154 155 |
# File 'lib/apiddress/models.rb', line 153 def requests_used @requests_used end |
Class Method Details
.from_hash(data) ⇒ Object
160 161 162 163 164 165 166 167 |
# File 'lib/apiddress/models.rb', line 160 def self.from_hash(data) new( month: data["month"], requests_used: data["requests_used"].to_i, requests_limit: data["requests_limit"].to_i, remaining: data["remaining"].to_i, ) end |