Class: Oneview::Api::Sms
Instance Attribute Summary
Attributes inherited from Client
Instance Method Summary collapse
- #create(data) ⇒ Object (also: #new)
Methods inherited from Client
#contacts, #emails, #initialize, #sms
Methods included from ClassMethods
Constructor Details
This class inherits a constructor from Oneview::Client
Instance Method Details
#create(data) ⇒ Object Also known as: new
8 9 10 11 12 |
# File 'lib/oneview/api/sms.rb', line 8 def create(data) return parse_response(self.class.post("/", :body => build_body(data), :headers => header)) if data.is_a?(Hash) return parse_response(self.class.post("/", :body => build_body(data.as_parameter), :headers => header)) if data.is_a?(Oneview::Entity::Sms) raise ArgumentError end |