Exception: Cyby::Kintone::InvalidRecord
- Inherits:
-
StandardError
- Object
- StandardError
- Cyby::Kintone::InvalidRecord
- Defined in:
- lib/cyby/kintone/invalid_record.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#response_code ⇒ Object
readonly
Returns the value of attribute response_code.
Instance Method Summary collapse
-
#initialize(response) ⇒ InvalidRecord
constructor
A new instance of InvalidRecord.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ InvalidRecord
Returns a new instance of InvalidRecord.
6 7 8 9 10 11 12 13 |
# File 'lib/cyby/kintone/invalid_record.rb', line 6 def initialize(response) @response = response @message = @response["message"] @id = @response["id"] @code = @response["code"] @response_code = @response.code set_errors end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/cyby/kintone/invalid_record.rb', line 4 def code @code end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/cyby/kintone/invalid_record.rb', line 4 def errors @errors end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/cyby/kintone/invalid_record.rb', line 4 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/cyby/kintone/invalid_record.rb', line 4 def @message end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/cyby/kintone/invalid_record.rb', line 4 def response @response end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
4 5 6 |
# File 'lib/cyby/kintone/invalid_record.rb', line 4 def response_code @response_code end |
Instance Method Details
#inspect ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/cyby/kintone/invalid_record.rb', line 15 def inspect { message: @message, id: @id, code: @code, response_code: @response_code, errors: @errors }.inspect end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/cyby/kintone/invalid_record.rb', line 25 def to_s "InvalidRecord: #{inspect}" end |