Class: ActionTexter::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/action_texter/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



11
12
13
14
15
# File 'lib/action_texter/configuration.rb', line 11

def initialize
  @endpoint = 'https://rest.sms-service.com'
  @path = '/messages'
  @content_type = 'application/json'
end

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



3
4
5
# File 'lib/action_texter/configuration.rb', line 3

def content_type
  @content_type
end

#endpointObject

Returns the value of attribute endpoint.



3
4
5
# File 'lib/action_texter/configuration.rb', line 3

def endpoint
  @endpoint
end

#fromObject

Returns the value of attribute from.



3
4
5
# File 'lib/action_texter/configuration.rb', line 3

def from
  @from
end

#pathObject

Returns the value of attribute path.



3
4
5
# File 'lib/action_texter/configuration.rb', line 3

def path
  @path
end

#product_tokenObject

Returns the value of attribute product_token.



3
4
5
# File 'lib/action_texter/configuration.rb', line 3

def product_token
  @product_token
end

#toObject

Returns the value of attribute to.



3
4
5
# File 'lib/action_texter/configuration.rb', line 3

def to
  @to
end

Instance Method Details

#defaultsObject



7
8
9
# File 'lib/action_texter/configuration.rb', line 7

def defaults
  @defaults ||= { from: from, to: to, content_type: content_type }
end