Class: Morpheus::OptionsInterface
- Inherits:
-
APIClient
- Object
- APIClient
- Morpheus::OptionsInterface
- Defined in:
- lib/morpheus/api/options_interface.rb
Instance Method Summary collapse
- #options_for_source(source, params = {}, option_source_type = nil) ⇒ Object
- #options_for_type(option_type, params = {}) ⇒ Object
Instance Method Details
#options_for_source(source, params = {}, option_source_type = nil) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/morpheus/api/options_interface.rb', line 9 def (source,params = {}, option_source_type=nil) url = "#{@base_url}/api/options/#{source}" if option_source_type url = "#{@base_url}/api/options/#{option_source_type}/#{source}" end headers = { params: params, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers, timeout: 180) end |
#options_for_type(option_type, params = {}) ⇒ Object
5 6 7 |
# File 'lib/morpheus/api/options_interface.rb', line 5 def (option_type, params={}) (option_type['optionSource'], params, option_type['optionSourceType']) end |