Class: DeepL::Resources::DeveloperKeyUsageLimits
- Inherits:
-
Object
- Object
- DeepL::Resources::DeveloperKeyUsageLimits
- Defined in:
- lib/deepl/resources/developer_key.rb
Overview
Usage limits of a developer key. A nil limit means unlimited.
Instance Attribute Summary collapse
-
#characters ⇒ Object
readonly
Returns the value of attribute characters.
-
#speech_to_speech_milliseconds ⇒ Object
readonly
Returns the value of attribute speech_to_speech_milliseconds.
-
#speech_to_text_milliseconds ⇒ Object
readonly
Returns the value of attribute speech_to_text_milliseconds.
Instance Method Summary collapse
-
#initialize(usage_limits) ⇒ DeveloperKeyUsageLimits
constructor
A new instance of DeveloperKeyUsageLimits.
Constructor Details
#initialize(usage_limits) ⇒ DeveloperKeyUsageLimits
Returns a new instance of DeveloperKeyUsageLimits.
13 14 15 16 17 18 19 20 |
# File 'lib/deepl/resources/developer_key.rb', line 13 def initialize(usage_limits) usage_limits = {} unless usage_limits.is_a?(Hash) @characters = Utils::NumberParser.optional_count(usage_limits['characters']) @speech_to_text_milliseconds = Utils::NumberParser.optional_count(usage_limits['speech_to_text_milliseconds']) @speech_to_speech_milliseconds = Utils::NumberParser.optional_count(usage_limits['speech_to_speech_milliseconds']) end |
Instance Attribute Details
#characters ⇒ Object (readonly)
Returns the value of attribute characters.
11 12 13 |
# File 'lib/deepl/resources/developer_key.rb', line 11 def characters @characters end |
#speech_to_speech_milliseconds ⇒ Object (readonly)
Returns the value of attribute speech_to_speech_milliseconds.
11 12 13 |
# File 'lib/deepl/resources/developer_key.rb', line 11 def speech_to_speech_milliseconds @speech_to_speech_milliseconds end |
#speech_to_text_milliseconds ⇒ Object (readonly)
Returns the value of attribute speech_to_text_milliseconds.
11 12 13 |
# File 'lib/deepl/resources/developer_key.rb', line 11 def speech_to_text_milliseconds @speech_to_text_milliseconds end |