Class: Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItem
- Inherits:
-
Object
- Object
- Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItem
- Defined in:
- lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_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.
-
#bonus ⇒ Float
readonly
If the contractor is on an hourly wage, this is the bonus the contractor earned.
-
#contractor_uuid ⇒ String
readonly
The contractor receiving the payment.
-
#hours ⇒ Object
readonly
contractor worked for the payment.
- #payment_method ⇒ Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItemPaymentMethod readonly
-
#reimbursement ⇒ Float
readonly
Reimbursed wages for the contractor.
-
#wage ⇒ Object
readonly
contractor, regardless of hours worked.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(contractor_uuid: OMIT, payment_method: OMIT, wage: OMIT, hours: OMIT, bonus: OMIT, reimbursement: OMIT, additional_properties: nil) ⇒ Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(contractor_uuid: OMIT, payment_method: OMIT, wage: OMIT, hours: OMIT, bonus: OMIT, reimbursement: OMIT, additional_properties: nil) ⇒ Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItem
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 42 def initialize(contractor_uuid: OMIT, payment_method: OMIT, wage: OMIT, hours: OMIT, bonus: OMIT, reimbursement: OMIT, additional_properties: nil) @contractor_uuid = contractor_uuid if contractor_uuid != OMIT @payment_method = payment_method if payment_method != OMIT @wage = wage if wage != OMIT @hours = hours if hours != OMIT @bonus = bonus if bonus != OMIT @reimbursement = reimbursement if reimbursement != OMIT @additional_properties = additional_properties @_field_set = { "contractor_uuid": contractor_uuid, "payment_method": payment_method, "wage": wage, "hours": hours, "bonus": bonus, "reimbursement": reimbursement }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
25 26 27 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 25 def additional_properties @additional_properties end |
#bonus ⇒ Float (readonly)
Returns If the contractor is on an hourly wage, this is the bonus the contractor earned.
21 22 23 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 21 def bonus @bonus end |
#contractor_uuid ⇒ String (readonly)
Returns The contractor receiving the payment.
11 12 13 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 11 def contractor_uuid @contractor_uuid end |
#hours ⇒ Object (readonly)
contractor worked for the payment
19 20 21 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 19 def hours @hours end |
#payment_method ⇒ Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItemPaymentMethod (readonly)
13 14 15 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 13 def payment_method @payment_method end |
#reimbursement ⇒ Float (readonly)
Returns Reimbursed wages for the contractor.
23 24 25 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 23 def reimbursement @reimbursement end |
#wage ⇒ Object (readonly)
contractor, regardless of hours worked
16 17 18 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 16 def wage @wage end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItem
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 59 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"] payment_method = parsed_json["payment_method"] wage = parsed_json["wage"] hours = parsed_json["hours"] bonus = parsed_json["bonus"] reimbursement = parsed_json["reimbursement"] new( contractor_uuid: contractor_uuid, payment_method: payment_method, wage: wage, hours: hours, bonus: bonus, reimbursement: reimbursement, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
91 92 93 94 95 96 97 98 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 91 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.payment_method&.is_a?(Gusto::Contractors::PaymentGroups::PaymentGroupsCreateRequestContractorPaymentsItemPaymentMethod) != false || raise("Passed value for field obj.payment_method is not the expected type, validation failed.") obj.wage&.is_a?(Float) != false || raise("Passed value for field obj.wage is not the expected type, validation failed.") obj.hours&.is_a?(Float) != false || raise("Passed value for field obj.hours is not the expected type, validation failed.") obj.bonus&.is_a?(Float) != false || raise("Passed value for field obj.bonus is not the expected type, validation failed.") obj.reimbursement&.is_a?(Float) != false || raise("Passed value for field obj.reimbursement is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
82 83 84 |
# File 'lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb', line 82 def to_json @_field_set&.to_json end |