Class: Karaden::Param::Message::Bulk::BulkMessageCreateParams
- Inherits:
-
BulkMessageParams
- Object
- BulkMessageParams
- Karaden::Param::Message::Bulk::BulkMessageCreateParams
- Defined in:
- lib/karaden/param/message/bulk/bulk_message_create_params.rb
Constant Summary
Constants inherited from BulkMessageParams
Karaden::Param::Message::Bulk::BulkMessageParams::CONTEXT_PATH
Instance Attribute Summary collapse
-
#bulk_file_id ⇒ Object
Returns the value of attribute bulk_file_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ BulkMessageCreateParams
constructor
A new instance of BulkMessageCreateParams.
- #to_data ⇒ Object
- #to_path ⇒ Object
- #validate ⇒ Object
Constructor Details
#initialize ⇒ BulkMessageCreateParams
Returns a new instance of BulkMessageCreateParams.
8 9 10 11 |
# File 'lib/karaden/param/message/bulk/bulk_message_create_params.rb', line 8 def initialize() @bulk_file_id = nil super end |
Instance Attribute Details
#bulk_file_id ⇒ Object
Returns the value of attribute bulk_file_id.
6 7 8 |
# File 'lib/karaden/param/message/bulk/bulk_message_create_params.rb', line 6 def bulk_file_id @bulk_file_id end |
Class Method Details
.new_builder ⇒ Object
45 46 47 |
# File 'lib/karaden/param/message/bulk/bulk_message_create_params.rb', line 45 def self.new_builder BulkMessageCreateParamsBuilder.new end |
Instance Method Details
#to_data ⇒ Object
17 18 19 20 21 |
# File 'lib/karaden/param/message/bulk/bulk_message_create_params.rb', line 17 def to_data { bulk_file_id: @bulk_file_id }.reject { |_, value| value.nil? } end |
#to_path ⇒ Object
13 14 15 |
# File 'lib/karaden/param/message/bulk/bulk_message_create_params.rb', line 13 def to_path CONTEXT_PATH end |
#validate ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/karaden/param/message/bulk/bulk_message_create_params.rb', line 23 def validate errors = Karaden::Model::KaradenObject.new has_error = false = validate_bulk_file_id unless .empty? errors.set_property('bulk_file_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 |