Class: Gusto::Payrolls::PayrollMinimal
- Inherits:
-
Object
- Object
- Gusto::Payrolls::PayrollMinimal
- Defined in:
- lib/fern_gusto/payrolls/types/payroll_minimal.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #auto_pilot ⇒ Boolean readonly
- #calculated_at ⇒ String readonly
- #check_date ⇒ String readonly
- #company_uuid ⇒ String readonly
- #created_at ⇒ DateTime readonly
- #credit_blockers ⇒ Gusto::PAYROLL_CREDIT_BLOCKERS_TYPE readonly
- #external ⇒ Boolean readonly
- #final_termination_payroll ⇒ Boolean readonly
- #fixed_withholding_rate ⇒ Boolean readonly
- #off_cycle ⇒ Boolean readonly
- #off_cycle_reason ⇒ Gusto::OffCycleReasonType readonly
- #pay_period ⇒ Gusto::PayrollPayPeriodType readonly
- #payment_speed_changed ⇒ Gusto::PayrollPaymentSpeedChangedType readonly
- #payroll_deadline ⇒ DateTime readonly
- #payroll_status_meta ⇒ Gusto::PayrollPayrollStatusMetaType readonly
- #payroll_uuid ⇒ String readonly
- #processed ⇒ Boolean readonly
- #processed_date ⇒ String readonly
- #skip_regular_deductions ⇒ Boolean readonly
- #submission_blockers ⇒ Gusto::PAYROLL_SUBMISSION_BLOCKERS_TYPE readonly
- #totals ⇒ Gusto::PayrollTotalsType readonly
- #withholding_pay_period ⇒ Gusto::PayrollWithholdingPayPeriodType readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(payroll_deadline: OMIT, check_date: OMIT, processed:, processed_date: OMIT, calculated_at: OMIT, payroll_uuid:, company_uuid:, off_cycle: OMIT, off_cycle_reason: OMIT, auto_pilot: OMIT, external: OMIT, final_termination_payroll: OMIT, withholding_pay_period: OMIT, skip_regular_deductions: OMIT, fixed_withholding_rate: OMIT, pay_period: OMIT, payroll_status_meta: OMIT, totals: OMIT, payment_speed_changed: OMIT, created_at: OMIT, submission_blockers: OMIT, credit_blockers: OMIT, additional_properties: nil) ⇒ Gusto::Payrolls::PayrollMinimal constructor
- #to_json ⇒ String
Constructor Details
#initialize(payroll_deadline: OMIT, check_date: OMIT, processed:, processed_date: OMIT, calculated_at: OMIT, payroll_uuid:, company_uuid:, off_cycle: OMIT, off_cycle_reason: OMIT, auto_pilot: OMIT, external: OMIT, final_termination_payroll: OMIT, withholding_pay_period: OMIT, skip_regular_deductions: OMIT, fixed_withholding_rate: OMIT, pay_period: OMIT, payroll_status_meta: OMIT, totals: OMIT, payment_speed_changed: OMIT, created_at: OMIT, submission_blockers: OMIT, credit_blockers: OMIT, additional_properties: nil) ⇒ Gusto::Payrolls::PayrollMinimal
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 95 def initialize(payroll_deadline: OMIT, check_date: OMIT, processed:, processed_date: OMIT, calculated_at: OMIT, payroll_uuid:, company_uuid:, off_cycle: OMIT, off_cycle_reason: OMIT, auto_pilot: OMIT, external: OMIT, final_termination_payroll: OMIT, withholding_pay_period: OMIT, skip_regular_deductions: OMIT, fixed_withholding_rate: OMIT, pay_period: OMIT, payroll_status_meta: OMIT, totals: OMIT, payment_speed_changed: OMIT, created_at: OMIT, submission_blockers: OMIT, credit_blockers: OMIT, additional_properties: nil) @payroll_deadline = payroll_deadline if payroll_deadline != OMIT @check_date = check_date if check_date != OMIT @processed = processed @processed_date = processed_date if processed_date != OMIT @calculated_at = calculated_at if calculated_at != OMIT @payroll_uuid = payroll_uuid @company_uuid = company_uuid @off_cycle = off_cycle if off_cycle != OMIT @off_cycle_reason = off_cycle_reason if off_cycle_reason != OMIT @auto_pilot = auto_pilot if auto_pilot != OMIT @external = external if external != OMIT @final_termination_payroll = final_termination_payroll if final_termination_payroll != OMIT @withholding_pay_period = withholding_pay_period if withholding_pay_period != OMIT @skip_regular_deductions = skip_regular_deductions if skip_regular_deductions != OMIT @fixed_withholding_rate = fixed_withholding_rate if fixed_withholding_rate != OMIT @pay_period = pay_period if pay_period != OMIT @payroll_status_meta = if != OMIT @totals = totals if totals != OMIT @payment_speed_changed = payment_speed_changed if payment_speed_changed != OMIT @created_at = created_at if created_at != OMIT @submission_blockers = submission_blockers if submission_blockers != OMIT @credit_blockers = credit_blockers if credit_blockers != OMIT @additional_properties = additional_properties @_field_set = { "payroll_deadline": payroll_deadline, "check_date": check_date, "processed": processed, "processed_date": processed_date, "calculated_at": calculated_at, "payroll_uuid": payroll_uuid, "company_uuid": company_uuid, "off_cycle": off_cycle, "off_cycle_reason": off_cycle_reason, "auto_pilot": auto_pilot, "external": external, "final_termination_payroll": final_termination_payroll, "withholding_pay_period": withholding_pay_period, "skip_regular_deductions": skip_regular_deductions, "fixed_withholding_rate": fixed_withholding_rate, "pay_period": pay_period, "payroll_status_meta": , "totals": totals, "payment_speed_changed": payment_speed_changed, "created_at": created_at, "submission_blockers": submission_blockers, "credit_blockers": credit_blockers }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
64 65 66 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 64 def additional_properties @additional_properties end |
#auto_pilot ⇒ Boolean (readonly)
38 39 40 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 38 def auto_pilot @auto_pilot end |
#calculated_at ⇒ String (readonly)
28 29 30 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 28 def calculated_at @calculated_at end |
#check_date ⇒ String (readonly)
22 23 24 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 22 def check_date @check_date end |
#company_uuid ⇒ String (readonly)
32 33 34 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 32 def company_uuid @company_uuid end |
#created_at ⇒ DateTime (readonly)
58 59 60 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 58 def created_at @created_at end |
#credit_blockers ⇒ Gusto::PAYROLL_CREDIT_BLOCKERS_TYPE (readonly)
62 63 64 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 62 def credit_blockers @credit_blockers end |
#external ⇒ Boolean (readonly)
40 41 42 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 40 def external @external end |
#final_termination_payroll ⇒ Boolean (readonly)
42 43 44 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 42 def final_termination_payroll @final_termination_payroll end |
#fixed_withholding_rate ⇒ Boolean (readonly)
48 49 50 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 48 def fixed_withholding_rate @fixed_withholding_rate end |
#off_cycle ⇒ Boolean (readonly)
34 35 36 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 34 def off_cycle @off_cycle end |
#off_cycle_reason ⇒ Gusto::OffCycleReasonType (readonly)
36 37 38 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 36 def off_cycle_reason @off_cycle_reason end |
#pay_period ⇒ Gusto::PayrollPayPeriodType (readonly)
50 51 52 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 50 def pay_period @pay_period end |
#payment_speed_changed ⇒ Gusto::PayrollPaymentSpeedChangedType (readonly)
56 57 58 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 56 def payment_speed_changed @payment_speed_changed end |
#payroll_deadline ⇒ DateTime (readonly)
20 21 22 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 20 def payroll_deadline @payroll_deadline end |
#payroll_status_meta ⇒ Gusto::PayrollPayrollStatusMetaType (readonly)
52 53 54 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 52 def @payroll_status_meta end |
#payroll_uuid ⇒ String (readonly)
30 31 32 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 30 def payroll_uuid @payroll_uuid end |
#processed ⇒ Boolean (readonly)
24 25 26 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 24 def processed @processed end |
#processed_date ⇒ String (readonly)
26 27 28 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 26 def processed_date @processed_date end |
#skip_regular_deductions ⇒ Boolean (readonly)
46 47 48 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 46 def skip_regular_deductions @skip_regular_deductions end |
#submission_blockers ⇒ Gusto::PAYROLL_SUBMISSION_BLOCKERS_TYPE (readonly)
60 61 62 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 60 def submission_blockers @submission_blockers end |
#totals ⇒ Gusto::PayrollTotalsType (readonly)
54 55 56 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 54 def totals @totals end |
#withholding_pay_period ⇒ Gusto::PayrollWithholdingPayPeriodType (readonly)
44 45 46 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 44 def withholding_pay_period @withholding_pay_period end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Payrolls::PayrollMinimal
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 127 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) payroll_deadline = unless parsed_json["payroll_deadline"].nil? DateTime.parse(parsed_json["payroll_deadline"]) else nil end check_date = parsed_json["check_date"] processed = parsed_json["processed"] processed_date = parsed_json["processed_date"] calculated_at = parsed_json["calculated_at"] payroll_uuid = parsed_json["payroll_uuid"] company_uuid = parsed_json["company_uuid"] off_cycle = parsed_json["off_cycle"] off_cycle_reason = parsed_json["off_cycle_reason"] auto_pilot = parsed_json["auto_pilot"] external = parsed_json["external"] final_termination_payroll = parsed_json["final_termination_payroll"] withholding_pay_period = parsed_json["withholding_pay_period"] skip_regular_deductions = parsed_json["skip_regular_deductions"] fixed_withholding_rate = parsed_json["fixed_withholding_rate"] unless parsed_json["pay_period"].nil? pay_period = parsed_json["pay_period"].to_json pay_period = Gusto::PayrollPayPeriodType.from_json(json_object: pay_period) else pay_period = nil end unless parsed_json["payroll_status_meta"].nil? = parsed_json["payroll_status_meta"].to_json = Gusto::PayrollPayrollStatusMetaType.from_json(json_object: ) else = nil end unless parsed_json["totals"].nil? totals = parsed_json["totals"].to_json totals = Gusto::PayrollTotalsType.from_json(json_object: totals) else totals = nil end unless parsed_json["payment_speed_changed"].nil? payment_speed_changed = parsed_json["payment_speed_changed"].to_json payment_speed_changed = Gusto::PayrollPaymentSpeedChangedType.from_json(json_object: payment_speed_changed) else payment_speed_changed = nil end created_at = unless parsed_json["created_at"].nil? DateTime.parse(parsed_json["created_at"]) else nil end submission_blockers = parsed_json["submission_blockers"]&.map do | item | item = item.to_json Gusto::PayrollSubmissionBlockersTypeItem.from_json(json_object: item) end credit_blockers = parsed_json["credit_blockers"]&.map do | item | item = item.to_json Gusto::PayrollCreditBlockersTypeItem.from_json(json_object: item) end new( payroll_deadline: payroll_deadline, check_date: check_date, processed: processed, processed_date: processed_date, calculated_at: calculated_at, payroll_uuid: payroll_uuid, company_uuid: company_uuid, off_cycle: off_cycle, off_cycle_reason: off_cycle_reason, auto_pilot: auto_pilot, external: external, final_termination_payroll: final_termination_payroll, withholding_pay_period: withholding_pay_period, skip_regular_deductions: skip_regular_deductions, fixed_withholding_rate: fixed_withholding_rate, pay_period: pay_period, payroll_status_meta: , totals: totals, payment_speed_changed: payment_speed_changed, created_at: created_at, submission_blockers: submission_blockers, credit_blockers: credit_blockers, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 224 def self.validate_raw(obj:) obj.payroll_deadline&.is_a?(DateTime) != false || raise("Passed value for field obj.payroll_deadline 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.processed.is_a?(Boolean) != false || raise("Passed value for field obj.processed is not the expected type, validation failed.") obj.processed_date&.is_a?(String) != false || raise("Passed value for field obj.processed_date is not the expected type, validation failed.") obj.calculated_at&.is_a?(String) != false || raise("Passed value for field obj.calculated_at is not the expected type, validation failed.") obj.payroll_uuid.is_a?(String) != false || raise("Passed value for field obj.payroll_uuid is not the expected type, validation failed.") obj.company_uuid.is_a?(String) != false || raise("Passed value for field obj.company_uuid is not the expected type, validation failed.") obj.off_cycle&.is_a?(Boolean) != false || raise("Passed value for field obj.off_cycle is not the expected type, validation failed.") obj.off_cycle_reason&.is_a?(Gusto::OffCycleReasonType) != false || raise("Passed value for field obj.off_cycle_reason is not the expected type, validation failed.") obj.auto_pilot&.is_a?(Boolean) != false || raise("Passed value for field obj.auto_pilot is not the expected type, validation failed.") obj.external&.is_a?(Boolean) != false || raise("Passed value for field obj.external is not the expected type, validation failed.") obj.final_termination_payroll&.is_a?(Boolean) != false || raise("Passed value for field obj.final_termination_payroll is not the expected type, validation failed.") obj.withholding_pay_period&.is_a?(Gusto::PayrollWithholdingPayPeriodType) != false || raise("Passed value for field obj.withholding_pay_period is not the expected type, validation failed.") obj.skip_regular_deductions&.is_a?(Boolean) != false || raise("Passed value for field obj.skip_regular_deductions is not the expected type, validation failed.") obj.fixed_withholding_rate&.is_a?(Boolean) != false || raise("Passed value for field obj.fixed_withholding_rate is not the expected type, validation failed.") obj.pay_period.nil? || Gusto::PayrollPayPeriodType.validate_raw(obj: obj.pay_period) obj..nil? || Gusto::PayrollPayrollStatusMetaType.validate_raw(obj: obj.) obj.totals.nil? || Gusto::PayrollTotalsType.validate_raw(obj: obj.totals) obj.payment_speed_changed.nil? || Gusto::PayrollPaymentSpeedChangedType.validate_raw(obj: obj.payment_speed_changed) obj.created_at&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.") obj.submission_blockers&.is_a?(Array) != false || raise("Passed value for field obj.submission_blockers is not the expected type, validation failed.") obj.credit_blockers&.is_a?(Array) != false || raise("Passed value for field obj.credit_blockers is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
215 216 217 |
# File 'lib/fern_gusto/payrolls/types/payroll_minimal.rb', line 215 def to_json @_field_set&.to_json end |