Class: Karaden::Param::Message::Bulk::BulkMessageListMessageParams

Inherits:
BulkMessageParams
  • Object
show all
Defined in:
lib/karaden/param/message/bulk/bulk_message_list_message_params.rb

Constant Summary

Constants inherited from BulkMessageParams

Karaden::Param::Message::Bulk::BulkMessageParams::CONTEXT_PATH

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBulkMessageListMessageParams

Returns a new instance of BulkMessageListMessageParams.



8
9
10
11
# File 'lib/karaden/param/message/bulk/bulk_message_list_message_params.rb', line 8

def initialize()
  @id = nil
  super
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/karaden/param/message/bulk/bulk_message_list_message_params.rb', line 6

def id
  @id
end

Class Method Details

.new_builderObject



39
40
41
# File 'lib/karaden/param/message/bulk/bulk_message_list_message_params.rb', line 39

def self.new_builder
  BulkMessageListMessageParamsBuilder.new
end

Instance Method Details

#to_pathObject



13
14
15
# File 'lib/karaden/param/message/bulk/bulk_message_list_message_params.rb', line 13

def to_path
  "#{CONTEXT_PATH}/#{@id}/messages"
end

#validateObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/karaden/param/message/bulk/bulk_message_list_message_params.rb', line 17

def validate
  errors = Karaden::Model::KaradenObject.new
  has_error = false

  messages = validate_id
  unless messages.empty?
    errors.set_property('id', messages)
    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