Class: Gusto::UnprocessableEntityErrorBodyErrorsBaseItem
- Inherits:
-
Object
- Object
- Gusto::UnprocessableEntityErrorBodyErrorsBaseItem
- Defined in:
- lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #full_message ⇒ String readonly
- #message ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::UnprocessableEntityErrorBodyErrorsBaseItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(type: OMIT, message: OMIT, full_message: OMIT, additional_properties: nil) ⇒ Gusto::UnprocessableEntityErrorBodyErrorsBaseItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(type: OMIT, message: OMIT, full_message: OMIT, additional_properties: nil) ⇒ Gusto::UnprocessableEntityErrorBodyErrorsBaseItem
26 27 28 29 30 31 32 33 34 |
# File 'lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb', line 26 def initialize(type: OMIT, message: OMIT, full_message: OMIT, additional_properties: nil) @type = type if type != OMIT @message = if != OMIT @full_message = if != OMIT @additional_properties = additional_properties @_field_set = { "type": type, "message": , "full_message": }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
14 15 16 |
# File 'lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb', line 14 def additional_properties @additional_properties end |
#full_message ⇒ String (readonly)
12 13 14 |
# File 'lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb', line 12 def @full_message end |
#message ⇒ String (readonly)
10 11 12 |
# File 'lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb', line 10 def @message end |
#type ⇒ String (readonly)
8 9 10 |
# File 'lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb', line 8 def type @type end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::UnprocessableEntityErrorBodyErrorsBaseItem
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb', line 40 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) type = parsed_json["type"] = parsed_json["message"] = parsed_json["full_message"] new( type: type, message: , full_message: , additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
66 67 68 69 70 |
# File 'lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb', line 66 def self.validate_raw(obj:) obj.type&.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.") obj.&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.") obj.&.is_a?(String) != false || raise("Passed value for field obj.full_message is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
57 58 59 |
# File 'lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb', line 57 def to_json @_field_set&.to_json end |