Class: Karaden::Param::Message::MessageCancelParams
- Inherits:
-
MessageParams
- Object
- MessageParams
- Karaden::Param::Message::MessageCancelParams
- Defined in:
- lib/karaden/param/message/message_cancel_params.rb
Constant Summary
Constants inherited from MessageParams
Karaden::Param::Message::MessageParams::CONTEXT_PATH
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ MessageCancelParams
constructor
A new instance of MessageCancelParams.
- #to_path ⇒ Object
- #validate ⇒ Object
Constructor Details
#initialize ⇒ MessageCancelParams
Returns a new instance of MessageCancelParams.
7 8 9 10 |
# File 'lib/karaden/param/message/message_cancel_params.rb', line 7 def initialize() @id = nil super end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/karaden/param/message/message_cancel_params.rb', line 5 def id @id end |
Class Method Details
.new_builder ⇒ Object
38 39 40 |
# File 'lib/karaden/param/message/message_cancel_params.rb', line 38 def self.new_builder MessageCancelParamsBuilder.new end |
Instance Method Details
#to_path ⇒ Object
12 13 14 |
# File 'lib/karaden/param/message/message_cancel_params.rb', line 12 def to_path "#{CONTEXT_PATH}/#{@id}/cancel" end |
#validate ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/karaden/param/message/message_cancel_params.rb', line 16 def validate errors = Karaden::Model::KaradenObject.new has_error = false = validate_id unless .empty? errors.set_property('id', ) has_error = true end if has_error e = Karaden::Exception::InvalidParamsException.new error = Karaden::Model::Error.new error.set_property('object', Karaden::Model::Error::OBJECT_NAME) error.set_property('errors', errors) e.error = error raise e end self end |