Class: Basecamp::Types::FieldKeyedErrors
- Inherits:
-
Object
- Object
- Basecamp::Types::FieldKeyedErrors
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
FieldKeyedErrors
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ FieldKeyedErrors
constructor
A new instance of FieldKeyedErrors.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ FieldKeyedErrors
Returns a new instance of FieldKeyedErrors.
1796 1797 1798 |
# File 'lib/basecamp/generated/types.rb', line 1796 def initialize(data = {}) @errors = parse_type(data["errors"], "FieldErrorMap") end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
1789 1790 1791 |
# File 'lib/basecamp/generated/types.rb', line 1789 def errors @errors end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1792 1793 1794 |
# File 'lib/basecamp/generated/types.rb', line 1792 def self.required_fields %i[errors].freeze end |
Instance Method Details
#to_h ⇒ Object
1800 1801 1802 1803 1804 |
# File 'lib/basecamp/generated/types.rb', line 1800 def to_h { "errors" => @errors, }.compact end |
#to_json(*args) ⇒ Object
1806 1807 1808 |
# File 'lib/basecamp/generated/types.rb', line 1806 def to_json(*args) to_h.to_json(*args) end |