Class: Dinie::Loan

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

Constant Summary

Constants inherited from Internal::Model

Internal::Model::REDACTED_ATTRIBUTES

Instance Attribute Summary collapse

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

Instance Attribute Details

#annual_cet_rate ⇒ Float (readonly)

Returns the value of attribute annual_cet_rate.

Returns:

  • (Float)


6
7
8
# File 'sig/dinie/generated/types/loan.rbs', line 6

def annual_cet_rate
  @annual_cet_rate
end

#annual_interest_rate ⇒ Float (readonly)

Returns the value of attribute annual_interest_rate.

Returns:

  • (Float)


7
8
9
# File 'sig/dinie/generated/types/loan.rbs', line 7

def annual_interest_rate
  @annual_interest_rate
end

#ccb_number ⇒ String? (readonly)

Returns the value of attribute ccb_number.

Returns:

  • (String, nil)


8
9
10
# File 'sig/dinie/generated/types/loan.rbs', line 8

def ccb_number
  @ccb_number
end

#created_at ⇒ Integer (readonly)

Returns the value of attribute created_at.

Returns:

  • (Integer)


9
10
11
# File 'sig/dinie/generated/types/loan.rbs', line 9

def created_at
  @created_at
end

#credit_offer_id ⇒ credit_offer_id (readonly)

Returns the value of attribute credit_offer_id.

Returns:



10
11
12
# File 'sig/dinie/generated/types/loan.rbs', line 10

def credit_offer_id
  @credit_offer_id
end

#customer_id ⇒ customer_id (readonly)

Returns the value of attribute customer_id.

Returns:



11
12
13
# File 'sig/dinie/generated/types/loan.rbs', line 11

def customer_id
  @customer_id
end

#disbursement_method ⇒ String? (readonly)

Returns the value of attribute disbursement_method.

Returns:

  • (String, nil)


12
13
14
# File 'sig/dinie/generated/types/loan.rbs', line 12

def disbursement_method
  @disbursement_method
end

#first_due_date ⇒ String (readonly)

Returns the value of attribute first_due_date.

Returns:

  • (String)


13
14
15
# File 'sig/dinie/generated/types/loan.rbs', line 13

def first_due_date
  @first_due_date
end

#id ⇒ loan_id (readonly)

Returns the value of attribute id.

Returns:

  • (loan_id)


14
15
16
# File 'sig/dinie/generated/types/loan.rbs', line 14

def id
  @id
end

#installment_amount ⇒ money (readonly)

Returns the value of attribute installment_amount.

Returns:

  • (money)


15
16
17
# File 'sig/dinie/generated/types/loan.rbs', line 15

def installment_amount
  @installment_amount
end

#installment_count ⇒ Integer (readonly)

Returns the value of attribute installment_count.

Returns:

  • (Integer)


16
17
18
# File 'sig/dinie/generated/types/loan.rbs', line 16

def installment_count
  @installment_count
end

#iof_amount ⇒ Float? (readonly)

Returns the value of attribute iof_amount.

Returns:

  • (Float, nil)


17
18
19
# File 'sig/dinie/generated/types/loan.rbs', line 17

def iof_amount
  @iof_amount
end

#monthly_cet_rate ⇒ Float (readonly)

Returns the value of attribute monthly_cet_rate.

Returns:

  • (Float)


18
19
20
# File 'sig/dinie/generated/types/loan.rbs', line 18

def monthly_cet_rate
  @monthly_cet_rate
end

#monthly_interest_rate ⇒ Float (readonly)

Returns the value of attribute monthly_interest_rate.

Returns:

  • (Float)


19
20
21
# File 'sig/dinie/generated/types/loan.rbs', line 19

def monthly_interest_rate
  @monthly_interest_rate
end

#principal_amount ⇒ Float? (readonly)

Returns the value of attribute principal_amount.

Returns:

  • (Float, nil)


20
21
22
# File 'sig/dinie/generated/types/loan.rbs', line 20

def principal_amount
  @principal_amount
end

#requested_amount ⇒ money (readonly)

Returns the value of attribute requested_amount.

Returns:

  • (money)


21
22
23
# File 'sig/dinie/generated/types/loan.rbs', line 21

def requested_amount
  @requested_amount
end

#signing_url ⇒ String? (readonly)

Returns the value of attribute signing_url.

Returns:

  • (String, nil)


22
23
24
# File 'sig/dinie/generated/types/loan.rbs', line 22

def signing_url
  @signing_url
end

#simulation_id ⇒ simulation_id (readonly)

Returns the value of attribute simulation_id.

Returns:



23
24
25
# File 'sig/dinie/generated/types/loan.rbs', line 23

def simulation_id
  @simulation_id
end

#status ⇒ loan_status (readonly)

Returns the value of attribute status.

Returns:

  • (loan_status)


24
25
26
# File 'sig/dinie/generated/types/loan.rbs', line 24

def status
  @status
end

#total_amount ⇒ money (readonly)

Returns the value of attribute total_amount.

Returns:

  • (money)


25
26
27
# File 'sig/dinie/generated/types/loan.rbs', line 25

def total_amount
  @total_amount
end

#updated_at ⇒ Integer (readonly)

Returns the value of attribute updated_at.

Returns:

  • (Integer)


26
27
28
# File 'sig/dinie/generated/types/loan.rbs', line 26

def updated_at
  @updated_at
end

Class Method Details

.deserialize(raw) ⇒ Loan

Parameters:

  • raw (Hash[Symbol, untyped])

Returns:



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:) ⇒ Hash[Symbol, untyped]

Parameters:

  • credit_offer_id: (String)
  • simulation_id: (String)
  • installment_count: (Integer)
  • installment_amount: (Float)
  • first_due_date: (String)

Returns:

  • (Hash[Symbol, untyped])


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