Class: Gusto::PayrollReceipt
- Inherits:
-
Object
- Object
- Gusto::PayrollReceipt
- Defined in:
- lib/fern_gusto/types/payroll_receipt.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#company_uuid ⇒ String
readonly
A unique identifier of the company for the payroll.
-
#debit_date ⇒ String
readonly
The debit or funding date for the payroll.
-
#employee_compensations ⇒ Array<Gusto::PayrollReceiptEmployeeCompensationsItem>
readonly
An array of employee compensations and withholdings for this payroll.
- #liability_of_licensee ⇒ String readonly
-
#license ⇒ Object
readonly
visit our license page.“.
-
#license_uri ⇒ Object
readonly
fixed string “gusto.com/about/licenses”.
-
#licensee ⇒ Gusto::PayrollReceiptLicensee
readonly
The licensed payroll processor.
-
#name_of_recipient ⇒ String
readonly
Always the fixed string “Payroll Recipients”.
-
#name_of_sender ⇒ String
readonly
The name of the company by whom the payroll was paid.
-
#payroll_uuid ⇒ String
readonly
A unique identifier of the payroll receipt.
-
#recipient_notice ⇒ Object
readonly
plus the tax agencies for the taxes listed below.“.
- #right_to_refund ⇒ String readonly
-
#taxes ⇒ Array<Gusto::PayrollReceiptTaxesItem>
readonly
An array of totaled employer and employee taxes for the pay period.
-
#totals ⇒ Gusto::PayrollReceiptTotals
readonly
The subtotals for the payroll.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(payroll_uuid: OMIT, company_uuid: OMIT, name_of_sender: OMIT, name_of_recipient: OMIT, recipient_notice: OMIT, debit_date: OMIT, license: OMIT, license_uri: OMIT, right_to_refund: OMIT, liability_of_licensee: OMIT, totals: OMIT, taxes: OMIT, employee_compensations: OMIT, licensee: OMIT, additional_properties: nil) ⇒ Gusto::PayrollReceipt constructor
- #to_json ⇒ String
Constructor Details
#initialize(payroll_uuid: OMIT, company_uuid: OMIT, name_of_sender: OMIT, name_of_recipient: OMIT, recipient_notice: OMIT, debit_date: OMIT, license: OMIT, license_uri: OMIT, right_to_refund: OMIT, liability_of_licensee: OMIT, totals: OMIT, taxes: OMIT, employee_compensations: OMIT, licensee: OMIT, additional_properties: nil) ⇒ Gusto::PayrollReceipt
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 73 def initialize(payroll_uuid: OMIT, company_uuid: OMIT, name_of_sender: OMIT, name_of_recipient: OMIT, recipient_notice: OMIT, debit_date: OMIT, license: OMIT, license_uri: OMIT, right_to_refund: OMIT, liability_of_licensee: OMIT, totals: OMIT, taxes: OMIT, employee_compensations: OMIT, licensee: OMIT, additional_properties: nil) @payroll_uuid = payroll_uuid if payroll_uuid != OMIT @company_uuid = company_uuid if company_uuid != OMIT @name_of_sender = name_of_sender if name_of_sender != OMIT @name_of_recipient = name_of_recipient if name_of_recipient != OMIT @recipient_notice = recipient_notice if recipient_notice != OMIT @debit_date = debit_date if debit_date != OMIT @license = license if license != OMIT @license_uri = license_uri if license_uri != OMIT @right_to_refund = right_to_refund if right_to_refund != OMIT @liability_of_licensee = liability_of_licensee if liability_of_licensee != OMIT @totals = totals if totals != OMIT @taxes = taxes if taxes != OMIT @employee_compensations = employee_compensations if employee_compensations != OMIT @licensee = licensee if licensee != OMIT @additional_properties = additional_properties @_field_set = { "payroll_uuid": payroll_uuid, "company_uuid": company_uuid, "name_of_sender": name_of_sender, "name_of_recipient": name_of_recipient, "recipient_notice": recipient_notice, "debit_date": debit_date, "license": license, "license_uri": license_uri, "right_to_refund": right_to_refund, "liability_of_licensee": liability_of_licensee, "totals": totals, "taxes": taxes, "employee_compensations": employee_compensations, "licensee": licensee }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
45 46 47 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 45 def additional_properties @additional_properties end |
#company_uuid ⇒ String (readonly)
Returns A unique identifier of the company for the payroll.
14 15 16 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 14 def company_uuid @company_uuid end |
#debit_date ⇒ String (readonly)
Returns The debit or funding date for the payroll.
23 24 25 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 23 def debit_date @debit_date end |
#employee_compensations ⇒ Array<Gusto::PayrollReceiptEmployeeCompensationsItem> (readonly)
Returns An array of employee compensations and withholdings for this payroll.
41 42 43 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 41 def employee_compensations @employee_compensations end |
#liability_of_licensee ⇒ String (readonly)
35 36 37 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 35 def liability_of_licensee @liability_of_licensee end |
#license ⇒ Object (readonly)
visit our license page.“
28 29 30 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 28 def license @license end |
#license_uri ⇒ Object (readonly)
fixed string “gusto.com/about/licenses”
31 32 33 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 31 def license_uri @license_uri end |
#licensee ⇒ Gusto::PayrollReceiptLicensee (readonly)
Returns The licensed payroll processor.
43 44 45 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 43 def licensee @licensee end |
#name_of_recipient ⇒ String (readonly)
Returns Always the fixed string “Payroll Recipients”.
18 19 20 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 18 def name_of_recipient @name_of_recipient end |
#name_of_sender ⇒ String (readonly)
Returns The name of the company by whom the payroll was paid.
16 17 18 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 16 def name_of_sender @name_of_sender end |
#payroll_uuid ⇒ String (readonly)
Returns A unique identifier of the payroll receipt.
12 13 14 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 12 def payroll_uuid @payroll_uuid end |
#recipient_notice ⇒ Object (readonly)
plus the tax agencies for the taxes listed below.“
21 22 23 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 21 def recipient_notice @recipient_notice end |
#right_to_refund ⇒ String (readonly)
33 34 35 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 33 def right_to_refund @right_to_refund end |
#taxes ⇒ Array<Gusto::PayrollReceiptTaxesItem> (readonly)
Returns An array of totaled employer and employee taxes for the pay period.
39 40 41 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 39 def taxes @taxes end |
#totals ⇒ Gusto::PayrollReceiptTotals (readonly)
Returns The subtotals for the payroll.
37 38 39 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 37 def totals @totals end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::PayrollReceipt
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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 97 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"] company_uuid = parsed_json["company_uuid"] name_of_sender = parsed_json["name_of_sender"] name_of_recipient = parsed_json["name_of_recipient"] recipient_notice = parsed_json["recipient_notice"] debit_date = parsed_json["debit_date"] license = parsed_json["license"] license_uri = parsed_json["license_uri"] right_to_refund = parsed_json["right_to_refund"] liability_of_licensee = parsed_json["liability_of_licensee"] unless parsed_json["totals"].nil? totals = parsed_json["totals"].to_json totals = Gusto::PayrollReceiptTotals.from_json(json_object: totals) else totals = nil end taxes = parsed_json["taxes"]&.map do | item | item = item.to_json Gusto::PayrollReceiptTaxesItem.from_json(json_object: item) end employee_compensations = parsed_json["employee_compensations"]&.map do | item | item = item.to_json Gusto::PayrollReceiptEmployeeCompensationsItem.from_json(json_object: item) end unless parsed_json["licensee"].nil? licensee = parsed_json["licensee"].to_json licensee = Gusto::PayrollReceiptLicensee.from_json(json_object: licensee) else licensee = nil end new( payroll_uuid: payroll_uuid, company_uuid: company_uuid, name_of_sender: name_of_sender, name_of_recipient: name_of_recipient, recipient_notice: recipient_notice, debit_date: debit_date, license: license, license_uri: license_uri, right_to_refund: right_to_refund, liability_of_licensee: liability_of_licensee, totals: totals, taxes: taxes, employee_compensations: employee_compensations, licensee: licensee, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 160 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.company_uuid&.is_a?(String) != false || raise("Passed value for field obj.company_uuid is not the expected type, validation failed.") obj.name_of_sender&.is_a?(String) != false || raise("Passed value for field obj.name_of_sender is not the expected type, validation failed.") obj.name_of_recipient&.is_a?(String) != false || raise("Passed value for field obj.name_of_recipient is not the expected type, validation failed.") obj.recipient_notice&.is_a?(String) != false || raise("Passed value for field obj.recipient_notice is not the expected type, validation failed.") obj.debit_date&.is_a?(String) != false || raise("Passed value for field obj.debit_date is not the expected type, validation failed.") obj.license&.is_a?(String) != false || raise("Passed value for field obj.license is not the expected type, validation failed.") obj.license_uri&.is_a?(String) != false || raise("Passed value for field obj.license_uri is not the expected type, validation failed.") obj.right_to_refund&.is_a?(String) != false || raise("Passed value for field obj.right_to_refund is not the expected type, validation failed.") obj.liability_of_licensee&.is_a?(String) != false || raise("Passed value for field obj.liability_of_licensee is not the expected type, validation failed.") obj.totals.nil? || Gusto::PayrollReceiptTotals.validate_raw(obj: obj.totals) obj.taxes&.is_a?(Array) != false || raise("Passed value for field obj.taxes is not the expected type, validation failed.") obj.employee_compensations&.is_a?(Array) != false || raise("Passed value for field obj.employee_compensations is not the expected type, validation failed.") obj.licensee.nil? || Gusto::PayrollReceiptLicensee.validate_raw(obj: obj.licensee) end |
Instance Method Details
#to_json ⇒ String
151 152 153 |
# File 'lib/fern_gusto/types/payroll_receipt.rb', line 151 def to_json @_field_set&.to_json end |