Class: Gusto::MinimumWage
- Inherits:
-
Object
- Object
- Gusto::MinimumWage
- Defined in:
- lib/fern_gusto/types/minimum_wage.rb
Overview
Representation of a Minimum Wage
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#authority ⇒ Object
readonly
“Federal”.
-
#effective_date ⇒ String
readonly
The date the minimum wage rule is effective on.
-
#notes ⇒ String
readonly
Description of parties the minimum wage applies to.
-
#uuid ⇒ String
readonly
Unique identifier of a minimum wage.
-
#wage ⇒ String
readonly
The wage rate for a minimum wage record.
-
#wage_type ⇒ Object
readonly
“Regular-Industry-Specific”.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(uuid:, wage:, wage_type:, effective_date:, authority:, notes: OMIT, additional_properties: nil) ⇒ Gusto::MinimumWage constructor
- #to_json ⇒ String
Constructor Details
#initialize(uuid:, wage:, wage_type:, effective_date:, authority:, notes: OMIT, additional_properties: nil) ⇒ Gusto::MinimumWage
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 40 def initialize(uuid:, wage:, wage_type:, effective_date:, authority:, notes: OMIT, additional_properties: nil) @uuid = uuid @wage = wage @wage_type = wage_type @effective_date = effective_date @authority = @notes = notes if notes != OMIT @additional_properties = additional_properties @_field_set = { "uuid": uuid, "wage": wage, "wage_type": wage_type, "effective_date": effective_date, "authority": , "notes": notes }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
23 24 25 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 23 def additional_properties @additional_properties end |
#authority ⇒ Object (readonly)
“Federal”.
19 20 21 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 19 def @authority end |
#effective_date ⇒ String (readonly)
Returns The date the minimum wage rule is effective on.
16 17 18 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 16 def effective_date @effective_date end |
#notes ⇒ String (readonly)
Returns Description of parties the minimum wage applies to.
21 22 23 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 21 def notes @notes end |
#uuid ⇒ String (readonly)
Returns unique identifier of a minimum wage.
9 10 11 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 9 def uuid @uuid end |
#wage ⇒ String (readonly)
Returns The wage rate for a minimum wage record. Represented as a float, e.g. “15.0”.
11 12 13 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 11 def wage @wage end |
#wage_type ⇒ Object (readonly)
“Regular-Industry-Specific”.
14 15 16 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 14 def wage_type @wage_type end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::MinimumWage
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 56 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) uuid = parsed_json["uuid"] wage = parsed_json["wage"] wage_type = parsed_json["wage_type"] effective_date = parsed_json["effective_date"] = parsed_json["authority"] notes = parsed_json["notes"] new( uuid: uuid, wage: wage, wage_type: wage_type, effective_date: effective_date, authority: , notes: notes, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
87 88 89 90 91 92 93 94 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 87 def self.validate_raw(obj:) obj.uuid.is_a?(String) != false || raise("Passed value for field obj.uuid is not the expected type, validation failed.") obj.wage.is_a?(String) != false || raise("Passed value for field obj.wage is not the expected type, validation failed.") obj.wage_type.is_a?(String) != false || raise("Passed value for field obj.wage_type is not the expected type, validation failed.") obj.effective_date.is_a?(String) != false || raise("Passed value for field obj.effective_date is not the expected type, validation failed.") obj..is_a?(String) != false || raise("Passed value for field obj.authority is not the expected type, validation failed.") obj.notes&.is_a?(String) != false || raise("Passed value for field obj.notes is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
78 79 80 |
# File 'lib/fern_gusto/types/minimum_wage.rb', line 78 def to_json @_field_set&.to_json end |