Class: Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem
- Inherits:
-
Object
- Object
- Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem
- Defined in:
- lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#check_date ⇒ String
readonly
The payment check date associated with the unblock option.
-
#metadata ⇒ Hash{String => Object}
readonly
Additional data associated with the unblock option.
-
#unblock_type ⇒ String
readonly
The type of unblock option for the credit blocker.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(unblock_type: OMIT, check_date: OMIT, metadata: OMIT, additional_properties: nil) ⇒ Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(unblock_type: OMIT, check_date: OMIT, metadata: OMIT, additional_properties: nil) ⇒ Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem
26 27 28 29 30 31 32 33 34 |
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 26 def initialize(unblock_type: OMIT, check_date: OMIT, metadata: OMIT, additional_properties: nil) @unblock_type = unblock_type if unblock_type != OMIT @check_date = check_date if check_date != OMIT @metadata = if != OMIT @additional_properties = additional_properties @_field_set = { "unblock_type": unblock_type, "check_date": check_date, "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.
14 15 16 |
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 14 def additional_properties @additional_properties end |
#check_date ⇒ String (readonly)
Returns The payment check date associated with the unblock option.
10 11 12 |
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 10 def check_date @check_date end |
#metadata ⇒ Hash{String => Object} (readonly)
Returns Additional data associated with the unblock option.
12 13 14 |
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 12 def @metadata end |
#unblock_type ⇒ String (readonly)
Returns The type of unblock option for the credit blocker.
8 9 10 |
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 8 def unblock_type @unblock_type end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 40 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) unblock_type = parsed_json["unblock_type"] check_date = parsed_json["check_date"] = parsed_json["metadata"] new( unblock_type: unblock_type, check_date: check_date, metadata: , additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
66 67 68 69 70 |
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 66 def self.validate_raw(obj:) obj.unblock_type&.is_a?(String) != false || raise("Passed value for field obj.unblock_type is not the expected type, validation failed.") obj.check_date&.is_a?(String) != false || raise("Passed value for field obj.check_date is not the expected type, validation failed.") obj.&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
57 58 59 |
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 57 def to_json @_field_set&.to_json end |