Class: Gusto::ContractorPayments::ContractorPaymentSummaryByDatesContractorPaymentsItem
- Inherits:
-
Object
- Object
- Gusto::ContractorPayments::ContractorPaymentSummaryByDatesContractorPaymentsItem
- Defined in:
- lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_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.
-
#contractor_uuid ⇒ String
readonly
The UUID of the contractor.
-
#payments ⇒ Array<Gusto::ContractorPayments::ContractorPayment>
readonly
The contractor’s payments within a given time period.
-
#reimbursement_total ⇒ String
readonly
The total reimbursements for the contractor within a given time period.
-
#wage_total ⇒ String
readonly
The total wages for the contractor within a given time period.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryByDatesContractorPaymentsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(contractor_uuid: OMIT, check_date: OMIT, reimbursement_total: OMIT, wage_total: OMIT, payments: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryByDatesContractorPaymentsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(contractor_uuid: OMIT, check_date: OMIT, reimbursement_total: OMIT, wage_total: OMIT, payments: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryByDatesContractorPaymentsItem
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 35 def initialize(contractor_uuid: OMIT, check_date: OMIT, reimbursement_total: OMIT, wage_total: OMIT, payments: OMIT, additional_properties: nil) @contractor_uuid = contractor_uuid if contractor_uuid != OMIT @check_date = check_date if check_date != OMIT @reimbursement_total = reimbursement_total if reimbursement_total != OMIT @wage_total = wage_total if wage_total != OMIT @payments = payments if payments != OMIT @additional_properties = additional_properties @_field_set = { "contractor_uuid": contractor_uuid, "check_date": check_date, "reimbursement_total": reimbursement_total, "wage_total": wage_total, "payments": payments }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
21 22 23 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 21 def additional_properties @additional_properties end |
#check_date ⇒ String (readonly)
Returns The payment check date.
13 14 15 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 13 def check_date @check_date end |
#contractor_uuid ⇒ String (readonly)
Returns The UUID of the contractor.
11 12 13 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 11 def contractor_uuid @contractor_uuid end |
#payments ⇒ Array<Gusto::ContractorPayments::ContractorPayment> (readonly)
Returns The contractor’s payments within a given time period.
19 20 21 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 19 def payments @payments end |
#reimbursement_total ⇒ String (readonly)
Returns The total reimbursements for the contractor within a given time period.
15 16 17 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 15 def reimbursement_total @reimbursement_total end |
#wage_total ⇒ String (readonly)
Returns The total wages for the contractor within a given time period.
17 18 19 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 17 def wage_total @wage_total end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryByDatesContractorPaymentsItem
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 51 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) contractor_uuid = parsed_json["contractor_uuid"] check_date = parsed_json["check_date"] reimbursement_total = parsed_json["reimbursement_total"] wage_total = parsed_json["wage_total"] payments = parsed_json["payments"]&.map do | item | item = item.to_json Gusto::ContractorPayments::ContractorPayment.from_json(json_object: item) end new( contractor_uuid: contractor_uuid, check_date: check_date, reimbursement_total: reimbursement_total, wage_total: wage_total, payments: payments, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
84 85 86 87 88 89 90 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 84 def self.validate_raw(obj:) obj.contractor_uuid&.is_a?(String) != false || raise("Passed value for field obj.contractor_uuid 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.reimbursement_total&.is_a?(String) != false || raise("Passed value for field obj.reimbursement_total is not the expected type, validation failed.") obj.wage_total&.is_a?(String) != false || raise("Passed value for field obj.wage_total is not the expected type, validation failed.") obj.payments&.is_a?(Array) != false || raise("Passed value for field obj.payments is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
75 76 77 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb', line 75 def to_json @_field_set&.to_json end |