Class: Smspartner::Configuration
- Inherits:
-
Object
- Object
- Smspartner::Configuration
- Defined in:
- lib/smspartner/configuration.rb
Constant Summary collapse
- ALLOWED_RANGE_VALUES =
%i[premium low_cost].freeze
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(api_key:, range_value:, sandbox: false, sender: nil) ⇒ Configuration
constructor
A new instance of Configuration.
-
#to_h ⇒ Hash
Attributes as a hash.
Constructor Details
#initialize(api_key:, range_value:, sandbox: false, sender: nil) ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 |
# File 'lib/smspartner/configuration.rb', line 12 def initialize(api_key:, range_value:, sandbox: false, sender: nil) self.api_key = api_key self.range_value = range_value self.sandbox = sandbox self.sender = sender end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
29 30 31 |
# File 'lib/smspartner/configuration.rb', line 29 def api_key @api_key end |
Instance Method Details
#to_h ⇒ Hash
Returns attributes as a hash.
20 21 22 23 24 25 26 27 |
# File 'lib/smspartner/configuration.rb', line 20 def to_h { api_key: api_key, range_value: range_value, sandbox: sandbox, sender: sender } end |