Class: Apiddress::UsageResponse

Inherits:
Data
  • Object
show all
Defined in:
lib/apiddress/models.rb

Overview

Monthly usage for the authenticated API key.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#monthObject (readonly)

Returns the value of attribute month

Returns:

  • (Object)

    the current value of month



153
154
155
# File 'lib/apiddress/models.rb', line 153

def month
  @month
end

#remainingObject (readonly)

Returns the value of attribute remaining

Returns:

  • (Object)

    the current value of remaining



153
154
155
# File 'lib/apiddress/models.rb', line 153

def remaining
  @remaining
end

#requests_limitObject (readonly)

Returns the value of attribute requests_limit

Returns:

  • (Object)

    the current value of requests_limit



153
154
155
# File 'lib/apiddress/models.rb', line 153

def requests_limit
  @requests_limit
end

#requests_usedObject (readonly)

Returns the value of attribute requests_used

Returns:

  • (Object)

    the current value of 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