Class: Gusto::PayrollBlockersErrorErrorsItem
- Inherits:
-
Object
- Object
- Gusto::PayrollBlockersErrorErrorsItem
- Defined in:
- lib/fern_gusto/types/payroll_blockers_error_errors_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#category ⇒ String
readonly
The string “payroll_blocker”.
-
#error_key ⇒ String
readonly
The string “base”.
-
#message ⇒ String
readonly
Human readable description of the payroll blocker.
- #metadata ⇒ Gusto::PayrollBlockersErrorErrorsItemMetadata readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(error_key: OMIT, category: OMIT, message: OMIT, metadata: OMIT, additional_properties: nil) ⇒ Gusto::PayrollBlockersErrorErrorsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(error_key: OMIT, category: OMIT, message: OMIT, metadata: OMIT, additional_properties: nil) ⇒ Gusto::PayrollBlockersErrorErrorsItem
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 30 def initialize(error_key: OMIT, category: OMIT, message: OMIT, metadata: OMIT, additional_properties: nil) @error_key = error_key if error_key != OMIT @category = category if category != OMIT @message = if != OMIT @metadata = if != OMIT @additional_properties = additional_properties @_field_set = { "error_key": error_key, "category": category, "message": , "metadata": }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
17 18 19 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 17 def additional_properties @additional_properties end |
#category ⇒ String (readonly)
Returns The string “payroll_blocker”.
11 12 13 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 11 def category @category end |
#error_key ⇒ String (readonly)
Returns The string “base”.
9 10 11 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 9 def error_key @error_key end |
#message ⇒ String (readonly)
Returns Human readable description of the payroll blocker.
13 14 15 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 13 def @message end |
#metadata ⇒ Gusto::PayrollBlockersErrorErrorsItemMetadata (readonly)
15 16 17 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 15 def @metadata end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::PayrollBlockersErrorErrorsItem
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 44 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) error_key = parsed_json["error_key"] category = parsed_json["category"] = parsed_json["message"] unless parsed_json["metadata"].nil? = parsed_json["metadata"].to_json = Gusto::PayrollBlockersErrorErrorsItemMetadata.from_json(json_object: ) else = nil end new( error_key: error_key, category: category, message: , metadata: , additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
76 77 78 79 80 81 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 76 def self.validate_raw(obj:) obj.error_key&.is_a?(String) != false || raise("Passed value for field obj.error_key is not the expected type, validation failed.") obj.category&.is_a?(String) != false || raise("Passed value for field obj.category 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..nil? || Gusto::PayrollBlockersErrorErrorsItemMetadata.validate_raw(obj: obj.) end |
Instance Method Details
#to_json ⇒ String
67 68 69 |
# File 'lib/fern_gusto/types/payroll_blockers_error_errors_item.rb', line 67 def to_json @_field_set&.to_json end |