Class: Musoni::Configuration
- Inherits:
-
Object
- Object
- Musoni::Configuration
- Defined in:
- lib/musoni_ruby/configuration.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#tenant ⇒ Object
Returns the value of attribute tenant.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
- #header ⇒ Object
-
#initialize(tenant: nil, token: nil, time_zone: nil, base_url: 'https://demo.musonisystem.com:8443/api/v1') ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(tenant: nil, token: nil, time_zone: nil, base_url: 'https://demo.musonisystem.com:8443/api/v1') ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 |
# File 'lib/musoni_ruby/configuration.rb', line 5 def initialize(tenant:nil,token:nil,time_zone:nil,base_url:'https://demo.musonisystem.com:8443/api/v1') @base_url ||= base_url @tenant ||= tenant @token ||= token @time_zone ||= time_zone set_time_zone end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
3 4 5 |
# File 'lib/musoni_ruby/configuration.rb', line 3 def base_url @base_url end |
#tenant ⇒ Object
Returns the value of attribute tenant.
3 4 5 |
# File 'lib/musoni_ruby/configuration.rb', line 3 def tenant @tenant end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
3 4 5 |
# File 'lib/musoni_ruby/configuration.rb', line 3 def time_zone @time_zone end |
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'lib/musoni_ruby/configuration.rb', line 3 def token @token end |
Instance Method Details
#header ⇒ Object
18 19 20 |
# File 'lib/musoni_ruby/configuration.rb', line 18 def header {'Content-Type'=> 'application/json', 'Accept' => 'application/json', 'X-Mifos-Platform-TenantId' => tenant.to_s, 'Authorization' => "Basic #{token}"} end |