Class: Dinie::Loan

Inherits:
Internal::Model show all
Defined in:
lib/dinie/generated/types/loan.rb

Constant Summary

Constants inherited from Internal::Model

Internal::Model::REDACTED_ATTRIBUTES

Class Method Summary collapse

Methods inherited from Internal::Model

#==, attribute, attributes, #deconstruct_keys, #hash, inherited, #initialize, #inspect, #to_h

Constructor Details

This class inherits a constructor from Dinie::Internal::Model

Class Method Details

.deserialize(raw) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/dinie/generated/types/loan.rb', line 20

def self.deserialize(raw)
  new(
    annual_cet_rate: raw[:annual_cet_rate],
    annual_interest_rate: raw[:annual_interest_rate],
    ccb_number: raw[:ccb_number],
    created_at: raw[:created_at],
    credit_offer_id: raw[:credit_offer_id],
    customer_id: raw[:customer_id],
    disbursement_method: raw[:disbursement_method],
    first_due_date: raw[:first_due_date],
    id: raw[:id],
    installment_amount: raw[:installment_amount],
    installment_count: raw[:installment_count],
    iof_amount: raw[:iof_amount],
    monthly_cet_rate: raw[:monthly_cet_rate],
    monthly_interest_rate: raw[:monthly_interest_rate],
    principal_amount: raw[:principal_amount],
    requested_amount: raw[:requested_amount],
    signing_url: raw[:signing_url],
    simulation_id: raw[:simulation_id],
    status: raw[:status],
    total_amount: raw[:total_amount],
    updated_at: raw[:updated_at]
  )
end

.serialize_create(credit_offer_id:, first_due_date:, installment_amount:, installment_count:, simulation_id:) ⇒ Object



46
47
48
49
# File 'lib/dinie/generated/types/loan.rb', line 46

def self.serialize_create(credit_offer_id:, first_due_date:, installment_amount:, installment_count:,
                          simulation_id:)
  { credit_offer_id:, first_due_date:, installment_amount:, installment_count:, simulation_id: }
end