Class: SBF::Client::MessageEndpoint
- Inherits:
-
EntityEndpoint
- Object
- EntityEndpoint
- SBF::Client::MessageEndpoint
- Defined in:
- lib/stbaldricks/endpoints/message.rb
Instance Attribute Summary
Attributes inherited from EntityEndpoint
Instance Method Summary collapse
Methods inherited from EntityEndpoint
#aggregate, #create, #delete, #find, #find_first, #get, #initialize, #save, #update
Constructor Details
This class inherits a constructor from SBF::Client::EntityEndpoint
Instance Method Details
#mark_as_read(message_id) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/stbaldricks/endpoints/message.rb', line 6 def mark_as_read() raise SBF::Client::Error, 'Message Id must be an Integer' unless .is_a?(Integer) response = SBF::Client::Api::Request.post_request("#{base_uri}/mark_as_read/#{}") error = SBF::Client::ErrorEntity.new(response) unless ok?(response) SBF::Client::Api::Response.new(http_code: response.code, data: response, error: error) end |
#mark_as_unread(message_id) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/stbaldricks/endpoints/message.rb', line 16 def mark_as_unread() raise SBF::Client::Error, 'Message Id must be an Integer' unless .is_a?(Integer) response = SBF::Client::Api::Request.post_request("#{base_uri}/mark_as_unread/#{}") error = SBF::Client::ErrorEntity.new(response) unless ok?(response) SBF::Client::Api::Response.new(http_code: response.code, data: response, error: error) end |