Method: Morpheus::CloudsInterface#cloud_type
- Defined in:
- lib/morpheus/api/clouds_interface.rb
#cloud_type(params) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/morpheus/api/clouds_interface.rb', line 16 def cloud_type(params) url = "#{@base_url}/api/zone-types" headers = { params: {}, authorization: "Bearer #{@access_token}" } if params.is_a?(Hash) headers[:params].merge!(params) elsif params.is_a?(Numeric) url = "#{@base_url}/api/zone-types/#{params}" elsif params.is_a?(String) headers[:params]['name'] = params end opts = {method: :get, url: url, headers: headers} execute(opts) end |