Class: Gusto::ChildSupportDataAgenciesItemRequiredAttributesItem
- Inherits:
-
Object
- Object
- Gusto::ChildSupportDataAgenciesItemRequiredAttributesItem
- Defined in:
- lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#key ⇒ Object
readonly
state agency requirements change in the future.
-
#label ⇒ String
readonly
A human readable name of the attribute, e.g.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::ChildSupportDataAgenciesItemRequiredAttributesItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(key: OMIT, label: OMIT, additional_properties: nil) ⇒ Gusto::ChildSupportDataAgenciesItemRequiredAttributesItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(key: OMIT, label: OMIT, additional_properties: nil) ⇒ Gusto::ChildSupportDataAgenciesItemRequiredAttributesItem
28 29 30 31 32 33 34 35 |
# File 'lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb', line 28 def initialize(key: OMIT, label: OMIT, additional_properties: nil) @key = key if key != OMIT @label = label if label != OMIT @additional_properties = additional_properties @_field_set = { "key": key, "label": label }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
15 16 17 |
# File 'lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb', line 15 def additional_properties @additional_properties end |
#key ⇒ Object (readonly)
state agency requirements change in the future.
11 12 13 |
# File 'lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb', line 11 def key @key end |
#label ⇒ String (readonly)
Returns A human readable name of the attribute, e.g. CSE Case Number.
13 14 15 |
# File 'lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb', line 13 def label @label end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::ChildSupportDataAgenciesItemRequiredAttributesItem
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb', line 41 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) key = parsed_json["key"] label = parsed_json["label"] new( key: key, label: label, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
65 66 67 68 |
# File 'lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb', line 65 def self.validate_raw(obj:) obj.key&.is_a?(Gusto::ChildSupportDataAgenciesItemRequiredAttributesItemKey) != false || raise("Passed value for field obj.key is not the expected type, validation failed.") obj.label&.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
56 57 58 |
# File 'lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb', line 56 def to_json @_field_set&.to_json end |