Class: DaisybillApi::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



36
37
38
39
# File 'lib/daisybill_api/configuration.rb', line 36

def initialize
  @port = 443
  @host = "go.daisybill.com"
end

Instance Attribute Details

#api_tokenString

Sets and gets the API Token

DaisybillApi.configuration.api_token                     # => "987654321zyxwvu"
DaisybillApi.configuration.api_token = "123456789abcdef" # => "123456789abcdef"
DaisybillApi.configuration.api_token                     # => "123456789abcdef"

Returns:

  • (String)


13
14
15
# File 'lib/daisybill_api/configuration.rb', line 13

def api_token
  @api_token
end

#hostString

Sets and gets the host

DaisybillApi.configuration.host               # => "go.daisybill.com"
DaisybillApi.configuration.host = "localhost" # => "localhost"
DaisybillApi.configuration.host               # => "localhost"

Returns:

  • (String)


22
23
24
# File 'lib/daisybill_api/configuration.rb', line 22

def host
  @host
end

#loggerObject



42
43
44
# File 'lib/daisybill_api/configuration.rb', line 42

def logger
  @logger ||= Logger.new nil
end

#portInteger

Sets and gets the port

DaisybillApi.configuration.port        # => 443
DaisybillApi.configuration.port = 3000 # => 3000
DaisybillApi.configuration.port        # => 3000

Returns:

  • (Integer)


31
32
33
# File 'lib/daisybill_api/configuration.rb', line 31

def port
  @port
end