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.
1732 1733 1734 |
# File 'lib/basecamp/generated/types.rb', line 1732 def initialize(data = {}) @errors = parse_type(data["errors"], "FieldErrorMap") end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
1725 1726 1727 |
# File 'lib/basecamp/generated/types.rb', line 1725 def errors @errors end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1728 1729 1730 |
# File 'lib/basecamp/generated/types.rb', line 1728 def self.required_fields %i[errors].freeze end |
Instance Method Details
#to_h ⇒ Object
1736 1737 1738 1739 1740 |
# File 'lib/basecamp/generated/types.rb', line 1736 def to_h { "errors" => @errors, }.compact end |
#to_json(*args) ⇒ Object
1742 1743 1744 |
# File 'lib/basecamp/generated/types.rb', line 1742 def to_json(*args) to_h.to_json(*args) end |