Class: Dinie::Simulation

Inherits:
Internal::Model show all
Defined in:
lib/dinie/generated/types/simulation.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



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/dinie/generated/types/simulation.rb', line 10

def self.deserialize(raw)
  new(
    annual_cet_rate: raw[:annual_cet_rate],
    annual_interest_rate: raw[:annual_interest_rate],
    created_at: raw[:created_at],
    credit_offer_id: raw[:credit_offer_id],
    fee_amount: raw[:fee_amount],
    first_due_date: raw[:first_due_date],
    id: raw[:id],
    installment_amount: raw[:installment_amount],
    installment_count: raw[:installment_count],
    interest_amount: raw[:interest_amount],
    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],
    total_amount: raw[:total_amount]
  )
end

.serialize_create_simulation(installment_count:, requested_amount:) ⇒ Object



31
32
33
# File 'lib/dinie/generated/types/simulation.rb', line 31

def self.serialize_create_simulation(installment_count:, requested_amount:)
  { installment_count:, requested_amount: }
end