Class: Gusto::PayrollCheck
- Inherits:
-
Object
- Object
- Gusto::PayrollCheck
- Defined in:
- lib/fern_gusto/types/payroll_check.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#payroll_uuid ⇒ String
readonly
A unique identifier of the payroll.
-
#printing_format ⇒ String
readonly
The format the checks will be printed.
-
#request_uuid ⇒ String
readonly
A unique identifier of the Generated Document request.
-
#starting_check_number ⇒ String
readonly
The starting check number for the checks being printed.
-
#status ⇒ String
readonly
Current status of the Generated Document.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(payroll_uuid: OMIT, printing_format: OMIT, starting_check_number: OMIT, request_uuid: OMIT, status: OMIT, additional_properties: nil) ⇒ Gusto::PayrollCheck constructor
- #to_json ⇒ String
Constructor Details
#initialize(payroll_uuid: OMIT, printing_format: OMIT, starting_check_number: OMIT, request_uuid: OMIT, status: OMIT, additional_properties: nil) ⇒ Gusto::PayrollCheck
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 32 def initialize(payroll_uuid: OMIT, printing_format: OMIT, starting_check_number: OMIT, request_uuid: OMIT, status: OMIT, additional_properties: nil) @payroll_uuid = payroll_uuid if payroll_uuid != OMIT @printing_format = printing_format if printing_format != OMIT @starting_check_number = starting_check_number if starting_check_number != OMIT @request_uuid = request_uuid if request_uuid != OMIT @status = status if status != OMIT @additional_properties = additional_properties @_field_set = { "payroll_uuid": payroll_uuid, "printing_format": printing_format, "starting_check_number": starting_check_number, "request_uuid": request_uuid, "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.
18 19 20 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 18 def additional_properties @additional_properties end |
#payroll_uuid ⇒ String (readonly)
Returns A unique identifier of the payroll.
8 9 10 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 8 def payroll_uuid @payroll_uuid end |
#printing_format ⇒ String (readonly)
Returns The format the checks will be printed.
10 11 12 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 10 def printing_format @printing_format end |
#request_uuid ⇒ String (readonly)
Returns A unique identifier of the Generated Document request.
14 15 16 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 14 def request_uuid @request_uuid end |
#starting_check_number ⇒ String (readonly)
Returns The starting check number for the checks being printed.
12 13 14 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 12 def starting_check_number @starting_check_number end |
#status ⇒ String (readonly)
Returns Current status of the Generated Document.
16 17 18 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 16 def status @status end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::PayrollCheck
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 47 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) payroll_uuid = parsed_json["payroll_uuid"] printing_format = parsed_json["printing_format"] starting_check_number = parsed_json["starting_check_number"] request_uuid = parsed_json["request_uuid"] status = parsed_json["status"] new( payroll_uuid: payroll_uuid, printing_format: printing_format, starting_check_number: starting_check_number, request_uuid: request_uuid, status: status, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
76 77 78 79 80 81 82 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 76 def self.validate_raw(obj:) obj.payroll_uuid&.is_a?(String) != false || raise("Passed value for field obj.payroll_uuid is not the expected type, validation failed.") obj.printing_format&.is_a?(String) != false || raise("Passed value for field obj.printing_format is not the expected type, validation failed.") obj.starting_check_number&.is_a?(String) != false || raise("Passed value for field obj.starting_check_number is not the expected type, validation failed.") obj.request_uuid&.is_a?(String) != false || raise("Passed value for field obj.request_uuid is not the expected type, validation failed.") obj.status&.is_a?(String) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
67 68 69 |
# File 'lib/fern_gusto/types/payroll_check.rb', line 67 def to_json @_field_set&.to_json end |