Class: KeyBlackListRequest
- Inherits:
-
Object
- Object
- KeyBlackListRequest
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/genba/key_black_list_request.rb
Overview
keyBlackListRequest
Instance Attribute Summary collapse
-
#key_id ⇒ Object
Returns the value of attribute key_id.
-
#reason_text ⇒ Object
Returns the value of attribute reason_text.
Instance Method Summary collapse
-
#initialize(key_id, reason_text) ⇒ KeyBlackListRequest
constructor
A new instance of KeyBlackListRequest.
- #to_genba_json_payload ⇒ Object
Constructor Details
#initialize(key_id, reason_text) ⇒ KeyBlackListRequest
Returns a new instance of KeyBlackListRequest.
11 12 13 14 |
# File 'lib/genba/key_black_list_request.rb', line 11 def initialize(key_id, reason_text) @key_id = key_id @reason_text = reason_text end |
Instance Attribute Details
#key_id ⇒ Object
Returns the value of attribute key_id.
6 7 8 |
# File 'lib/genba/key_black_list_request.rb', line 6 def key_id @key_id end |
#reason_text ⇒ Object
Returns the value of attribute reason_text.
6 7 8 |
# File 'lib/genba/key_black_list_request.rb', line 6 def reason_text @reason_text end |
Instance Method Details
#to_genba_json_payload ⇒ Object
16 17 18 19 20 21 |
# File 'lib/genba/key_black_list_request.rb', line 16 def to_genba_json_payload { keyId: @key_id, reasonText: @reason_text }.select { |_, v| !v.nil? } end |