Class: Gusto::PayrollSubmissionBlockersTypeItem
- Inherits:
-
Object
- Object
- Gusto::PayrollSubmissionBlockersTypeItem
- Defined in:
- lib/fern_gusto/types/payroll_submission_blockers_type_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#blocker_name ⇒ String
readonly
The name of the submission blocker.
-
#blocker_type ⇒ String
readonly
The type of blocker that’s blocking the payment submission.
-
#selected_option ⇒ String
readonly
The unblock option that’s been selected to resolve the submission blocker.
-
#status ⇒ Gusto::PayrollSubmissionBlockersTypeItemStatus
readonly
The status of the submission blocker.
-
#unblock_options ⇒ Array<Gusto::PayrollSubmissionBlockersTypeItemUnblockOptionsItem>
readonly
The available options to unblock a submission blocker.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(blocker_type: OMIT, blocker_name: OMIT, unblock_options: OMIT, selected_option: OMIT, status: OMIT, additional_properties: nil) ⇒ Gusto::PayrollSubmissionBlockersTypeItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(blocker_type: OMIT, blocker_name: OMIT, unblock_options: OMIT, selected_option: OMIT, status: OMIT, additional_properties: nil) ⇒ Gusto::PayrollSubmissionBlockersTypeItem
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 34 def initialize(blocker_type: OMIT, blocker_name: OMIT, unblock_options: OMIT, selected_option: OMIT, status: OMIT, additional_properties: nil) @blocker_type = blocker_type if blocker_type != OMIT @blocker_name = blocker_name if blocker_name != OMIT @unblock_options = if != OMIT @selected_option = selected_option if selected_option != OMIT @status = status if status != OMIT @additional_properties = additional_properties @_field_set = { "blocker_type": blocker_type, "blocker_name": blocker_name, "unblock_options": , "selected_option": selected_option, "status": status }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
20 21 22 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 20 def additional_properties @additional_properties end |
#blocker_name ⇒ String (readonly)
Returns The name of the submission blocker.
12 13 14 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 12 def blocker_name @blocker_name end |
#blocker_type ⇒ String (readonly)
Returns The type of blocker that’s blocking the payment submission.
10 11 12 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 10 def blocker_type @blocker_type end |
#selected_option ⇒ String (readonly)
Returns The unblock option that’s been selected to resolve the submission blocker.
16 17 18 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 16 def selected_option @selected_option end |
#status ⇒ Gusto::PayrollSubmissionBlockersTypeItemStatus (readonly)
Returns The status of the submission blocker.
18 19 20 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 18 def status @status end |
#unblock_options ⇒ Array<Gusto::PayrollSubmissionBlockersTypeItemUnblockOptionsItem> (readonly)
Returns The available options to unblock a submission blocker.
14 15 16 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 14 def @unblock_options end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::PayrollSubmissionBlockersTypeItem
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 49 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) blocker_type = parsed_json["blocker_type"] blocker_name = parsed_json["blocker_name"] = parsed_json["unblock_options"]&.map do | item | item = item.to_json Gusto::PayrollSubmissionBlockersTypeItemUnblockOptionsItem.from_json(json_object: item) end selected_option = parsed_json["selected_option"] status = parsed_json["status"] new( blocker_type: blocker_type, blocker_name: blocker_name, unblock_options: , selected_option: selected_option, status: status, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
81 82 83 84 85 86 87 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 81 def self.validate_raw(obj:) obj.blocker_type&.is_a?(String) != false || raise("Passed value for field obj.blocker_type is not the expected type, validation failed.") obj.blocker_name&.is_a?(String) != false || raise("Passed value for field obj.blocker_name is not the expected type, validation failed.") obj.&.is_a?(Array) != false || raise("Passed value for field obj.unblock_options is not the expected type, validation failed.") obj.selected_option&.is_a?(String) != false || raise("Passed value for field obj.selected_option is not the expected type, validation failed.") obj.status&.is_a?(Gusto::PayrollSubmissionBlockersTypeItemStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
72 73 74 |
# File 'lib/fern_gusto/types/payroll_submission_blockers_type_item.rb', line 72 def to_json @_field_set&.to_json end |