Class: Gusto::ContractorPaymentReceiptContractorPaymentsItem
- Inherits:
-
Object
- Object
- Gusto::ContractorPaymentReceiptContractorPaymentsItem
- Defined in:
- lib/fern_gusto/types/contractor_payment_receipt_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 ⇒ String
readonly
The bonus amount in the payment.
-
#contractor_business_name ⇒ String
readonly
The business name of the employee.
-
#contractor_first_name ⇒ Object
readonly
‘Individual`.
-
#contractor_last_name ⇒ String
readonly
The last name of the contractor.
-
#contractor_type ⇒ Object
readonly
‘Individual` `Business`.
-
#contractor_uuid ⇒ String
readonly
The UUID of the contractor.
-
#payment_method ⇒ Object
readonly
‘Direct Deposit` `Check` `Historical Payment` `Correction Payment`.
-
#reimbursement ⇒ String
readonly
The reimbursement amount in the payment.
-
#wage ⇒ String
readonly
The fixed wage of the payment, regardless of hours worked.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::ContractorPaymentReceiptContractorPaymentsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(contractor_uuid: OMIT, contractor_first_name: OMIT, contractor_last_name: OMIT, contractor_business_name: OMIT, contractor_type: OMIT, payment_method: OMIT, wage: OMIT, bonus: OMIT, reimbursement: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPaymentReceiptContractorPaymentsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(contractor_uuid: OMIT, contractor_first_name: OMIT, contractor_last_name: OMIT, contractor_business_name: OMIT, contractor_type: OMIT, payment_method: OMIT, wage: OMIT, bonus: OMIT, reimbursement: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPaymentReceiptContractorPaymentsItem
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 50 def initialize(contractor_uuid: OMIT, contractor_first_name: OMIT, contractor_last_name: OMIT, contractor_business_name: OMIT, contractor_type: OMIT, payment_method: OMIT, wage: OMIT, bonus: OMIT, reimbursement: OMIT, additional_properties: nil) @contractor_uuid = contractor_uuid if contractor_uuid != OMIT @contractor_first_name = contractor_first_name if contractor_first_name != OMIT @contractor_last_name = contractor_last_name if contractor_last_name != OMIT @contractor_business_name = contractor_business_name if contractor_business_name != OMIT @contractor_type = contractor_type if contractor_type != OMIT @payment_method = payment_method if payment_method != OMIT @wage = wage if wage != OMIT @bonus = bonus if bonus != OMIT @reimbursement = reimbursement if reimbursement != OMIT @additional_properties = additional_properties @_field_set = { "contractor_uuid": contractor_uuid, "contractor_first_name": contractor_first_name, "contractor_last_name": contractor_last_name, "contractor_business_name": contractor_business_name, "contractor_type": contractor_type, "payment_method": payment_method, "wage": wage, "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.
29 30 31 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 29 def additional_properties @additional_properties end |
#bonus ⇒ String (readonly)
Returns The bonus amount in the payment.
25 26 27 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 25 def bonus @bonus end |
#contractor_business_name ⇒ String (readonly)
Returns The business name of the employee. Applies when ‘contractor_type` is `Business`.
15 16 17 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 15 def contractor_business_name @contractor_business_name end |
#contractor_first_name ⇒ Object (readonly)
‘Individual`.
11 12 13 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 11 def contractor_first_name @contractor_first_name end |
#contractor_last_name ⇒ String (readonly)
Returns The last name of the contractor. Applies when ‘contractor_type` is `Individual`.
13 14 15 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 13 def contractor_last_name @contractor_last_name end |
#contractor_type ⇒ Object (readonly)
‘Individual` `Business`
18 19 20 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 18 def contractor_type @contractor_type end |
#contractor_uuid ⇒ String (readonly)
Returns The UUID of the contractor.
8 9 10 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 8 def contractor_uuid @contractor_uuid end |
#payment_method ⇒ Object (readonly)
‘Direct Deposit` `Check` `Historical Payment` `Correction Payment`
21 22 23 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 21 def payment_method @payment_method end |
#reimbursement ⇒ String (readonly)
Returns The reimbursement amount in the payment.
27 28 29 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 27 def reimbursement @reimbursement end |
#wage ⇒ String (readonly)
Returns The fixed wage of the payment, regardless of hours worked.
23 24 25 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 23 def wage @wage end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::ContractorPaymentReceiptContractorPaymentsItem
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 70 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"] contractor_first_name = parsed_json["contractor_first_name"] contractor_last_name = parsed_json["contractor_last_name"] contractor_business_name = parsed_json["contractor_business_name"] contractor_type = parsed_json["contractor_type"] payment_method = parsed_json["payment_method"] wage = parsed_json["wage"] bonus = parsed_json["bonus"] reimbursement = parsed_json["reimbursement"] new( contractor_uuid: contractor_uuid, contractor_first_name: contractor_first_name, contractor_last_name: contractor_last_name, contractor_business_name: contractor_business_name, contractor_type: contractor_type, payment_method: payment_method, wage: wage, bonus: bonus, reimbursement: reimbursement, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 108 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.contractor_first_name&.is_a?(String) != false || raise("Passed value for field obj.contractor_first_name is not the expected type, validation failed.") obj.contractor_last_name&.is_a?(String) != false || raise("Passed value for field obj.contractor_last_name is not the expected type, validation failed.") obj.contractor_business_name&.is_a?(String) != false || raise("Passed value for field obj.contractor_business_name is not the expected type, validation failed.") obj.contractor_type&.is_a?(String) != false || raise("Passed value for field obj.contractor_type is not the expected type, validation failed.") obj.payment_method&.is_a?(String) != false || raise("Passed value for field obj.payment_method is not the expected type, validation failed.") obj.wage&.is_a?(String) != false || raise("Passed value for field obj.wage is not the expected type, validation failed.") obj.bonus&.is_a?(String) != false || raise("Passed value for field obj.bonus is not the expected type, validation failed.") obj.reimbursement&.is_a?(String) != false || raise("Passed value for field obj.reimbursement is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
99 100 101 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb', line 99 def to_json @_field_set&.to_json end |