Class: Files::EmailFeedback
- Inherits:
-
Object
- Object
- Files::EmailFeedback
- Defined in:
- lib/files.com/models/email_feedback.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}, options = {}) ⇒ EmailFeedback
constructor
A new instance of EmailFeedback.
- #save ⇒ Object
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ EmailFeedback
Returns a new instance of EmailFeedback.
7 8 9 10 |
# File 'lib/files.com/models/email_feedback.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/email_feedback.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/email_feedback.rb', line 5 def @options end |
Class Method Details
.create(params = {}, options = {}) ⇒ Object
Parameters:
feedback[email] (required) - string
feedback[reason] (required) - string
24 25 26 27 |
# File 'lib/files.com/models/email_feedback.rb', line 24 def self.create(params = {}, = {}) response, = Api.send_request("/email_feedback", :post, params, ) response.data end |
Instance Method Details
#save ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/files.com/models/email_feedback.rb', line 12 def save if @attributes[:id] raise NotImplementedError.new("The EmailFeedback object doesn't support updates.") else new_obj = EmailFeedback.create(@attributes, @options) @attributes = new_obj.attributes end end |