Class: Gusto::RecoveryCase
- Inherits:
-
Object
- Object
- Gusto::RecoveryCase
- Defined in:
- lib/fern_gusto/types/recovery_case.rb
Overview
Representation of a recovery case
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#amount_outstanding ⇒ String
readonly
Amount outstanding for the recovery case.
-
#check_date ⇒ String
readonly
Check date for the associated payroll or contractor payments.
-
#company_uuid ⇒ String
readonly
Unique identifier of the company to which the recovery case belongs.
-
#contractor_payment_uuids ⇒ Object
readonly
null.
-
#event_total_amount ⇒ String
readonly
Total amount to be debited from the payroll or contractor payments.
-
#latest_error_code ⇒ Object
readonly
for a complete list of ACH return codes.
-
#original_debit_date ⇒ String
readonly
Date when funds were originally debited from the company’s bank account.
-
#payroll_uuid ⇒ Object
readonly
the recovery case was created for a contractor payment, this field will be null.
-
#status ⇒ Gusto::RecoveryCaseStatus
readonly
Status of the recovery case.
-
#uuid ⇒ String
readonly
Unique identifier of an recovery case.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(uuid:, company_uuid: OMIT, status: OMIT, latest_error_code: OMIT, original_debit_date: OMIT, check_date: OMIT, payroll_uuid: OMIT, contractor_payment_uuids: OMIT, amount_outstanding: OMIT, event_total_amount: OMIT, additional_properties: nil) ⇒ Gusto::RecoveryCase constructor
- #to_json ⇒ String
Constructor Details
#initialize(uuid:, company_uuid: OMIT, status: OMIT, latest_error_code: OMIT, original_debit_date: OMIT, check_date: OMIT, payroll_uuid: OMIT, contractor_payment_uuids: OMIT, amount_outstanding: OMIT, event_total_amount: OMIT, additional_properties: nil) ⇒ Gusto::RecoveryCase
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 59 def initialize(uuid:, company_uuid: OMIT, status: OMIT, latest_error_code: OMIT, original_debit_date: OMIT, check_date: OMIT, payroll_uuid: OMIT, contractor_payment_uuids: OMIT, amount_outstanding: OMIT, event_total_amount: OMIT, additional_properties: nil) @uuid = uuid @company_uuid = company_uuid if company_uuid != OMIT @status = status if status != OMIT @latest_error_code = latest_error_code if latest_error_code != OMIT @original_debit_date = original_debit_date if original_debit_date != OMIT @check_date = check_date if check_date != OMIT @payroll_uuid = payroll_uuid if payroll_uuid != OMIT @contractor_payment_uuids = contractor_payment_uuids if contractor_payment_uuids != OMIT @amount_outstanding = amount_outstanding if amount_outstanding != OMIT @event_total_amount = event_total_amount if event_total_amount != OMIT @additional_properties = additional_properties @_field_set = { "uuid": uuid, "company_uuid": company_uuid, "status": status, "latest_error_code": latest_error_code, "original_debit_date": original_debit_date, "check_date": check_date, "payroll_uuid": payroll_uuid, "contractor_payment_uuids": contractor_payment_uuids, "amount_outstanding": amount_outstanding, "event_total_amount": event_total_amount }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
35 36 37 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 35 def additional_properties @additional_properties end |
#amount_outstanding ⇒ String (readonly)
Returns Amount outstanding for the recovery case.
31 32 33 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 31 def amount_outstanding @amount_outstanding end |
#check_date ⇒ String (readonly)
Returns Check date for the associated payroll or contractor payments.
22 23 24 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 22 def check_date @check_date end |
#company_uuid ⇒ String (readonly)
Returns Unique identifier of the company to which the recovery case belongs.
12 13 14 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 12 def company_uuid @company_uuid end |
#contractor_payment_uuids ⇒ Object (readonly)
null.
29 30 31 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 29 def contractor_payment_uuids @contractor_payment_uuids end |
#event_total_amount ⇒ String (readonly)
Returns Total amount to be debited from the payroll or contractor payments.
33 34 35 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 33 def event_total_amount @event_total_amount end |
#latest_error_code ⇒ Object (readonly)
for a complete list of ACH return codes.
18 19 20 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 18 def latest_error_code @latest_error_code end |
#original_debit_date ⇒ String (readonly)
Returns Date when funds were originally debited from the company’s bank account.
20 21 22 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 20 def original_debit_date @original_debit_date end |
#payroll_uuid ⇒ Object (readonly)
the recovery case was created for a contractor payment, this field will be null.
25 26 27 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 25 def payroll_uuid @payroll_uuid end |
#status ⇒ Gusto::RecoveryCaseStatus (readonly)
Returns Status of the recovery case.
14 15 16 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 14 def status @status end |
#uuid ⇒ String (readonly)
Returns Unique identifier of an recovery case.
10 11 12 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 10 def uuid @uuid end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::RecoveryCase
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 79 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) uuid = parsed_json["uuid"] company_uuid = parsed_json["company_uuid"] status = parsed_json["status"] latest_error_code = parsed_json["latest_error_code"] original_debit_date = parsed_json["original_debit_date"] check_date = parsed_json["check_date"] payroll_uuid = parsed_json["payroll_uuid"] contractor_payment_uuids = parsed_json["contractor_payment_uuids"] amount_outstanding = parsed_json["amount_outstanding"] event_total_amount = parsed_json["event_total_amount"] new( uuid: uuid, company_uuid: company_uuid, status: status, latest_error_code: latest_error_code, original_debit_date: original_debit_date, check_date: check_date, payroll_uuid: payroll_uuid, contractor_payment_uuids: contractor_payment_uuids, amount_outstanding: amount_outstanding, event_total_amount: event_total_amount, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 118 def self.validate_raw(obj:) obj.uuid.is_a?(String) != false || raise("Passed value for field obj.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.status&.is_a?(Gusto::RecoveryCaseStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") obj.latest_error_code&.is_a?(String) != false || raise("Passed value for field obj.latest_error_code is not the expected type, validation failed.") obj.original_debit_date&.is_a?(String) != false || raise("Passed value for field obj.original_debit_date 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.payroll_uuid&.is_a?(String) != false || raise("Passed value for field obj.payroll_uuid is not the expected type, validation failed.") obj.contractor_payment_uuids&.is_a?(Array) != false || raise("Passed value for field obj.contractor_payment_uuids is not the expected type, validation failed.") obj.amount_outstanding&.is_a?(String) != false || raise("Passed value for field obj.amount_outstanding is not the expected type, validation failed.") obj.event_total_amount&.is_a?(String) != false || raise("Passed value for field obj.event_total_amount is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
109 110 111 |
# File 'lib/fern_gusto/types/recovery_case.rb', line 109 def to_json @_field_set&.to_json end |