Class: Dinie::Transaction

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

#amount_due ⇒ money (readonly)

Returns the value of attribute amount_due.

Returns:

  • (money)


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

def amount_due
  @amount_due
end

#amount_paid ⇒ money (readonly)

Returns the value of attribute amount_paid.

Returns:

  • (money)


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

def amount_paid
  @amount_paid
end

#amount_remaining ⇒ money (readonly)

Returns the value of attribute amount_remaining.

Returns:

  • (money)


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

def amount_remaining
  @amount_remaining
end

#created_at ⇒ Integer (readonly)

Returns the value of attribute created_at.

Returns:

  • (Integer)


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

def created_at
  @created_at
end

#days_overdue ⇒ Integer (readonly)

Returns the value of attribute days_overdue.

Returns:

  • (Integer)


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

def days_overdue
  @days_overdue
end

#due_date ⇒ String (readonly)

Returns the value of attribute due_date.

Returns:

  • (String)


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

def due_date
  @due_date
end

#fees ⇒ money (readonly)

Returns the value of attribute fees.

Returns:

  • (money)


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

def fees
  @fees
end

#id ⇒ transaction_id (readonly)

Returns the value of attribute id.

Returns:

  • (transaction_id)


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

def id
  @id
end

#interest ⇒ money (readonly)

Returns the value of attribute interest.

Returns:

  • (money)


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

def interest
  @interest
end

#loan_id ⇒ loan_id (readonly)

Returns the value of attribute loan_id.

Returns:



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

def loan_id
  @loan_id
end

Returns the value of attribute paid_at.

Returns:

  • (Integer, nil)


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

def paid_at
  @paid_at
end

#principal ⇒ money (readonly)

Returns the value of attribute principal.

Returns:

  • (money)


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

def principal
  @principal
end

#status ⇒ transaction_status (readonly)

Returns the value of attribute status.

Returns:

  • (transaction_status)


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

def status
  @status
end

#type ⇒ transaction_type (readonly)

Returns the value of attribute type.

Returns:

  • (transaction_type)


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

def type
  @type
end

#updated_at ⇒ Integer (readonly)

Returns the value of attribute updated_at.

Returns:

  • (Integer)


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

def updated_at
  @updated_at
end

Class Method Details

.deserialize(raw) ⇒ Transaction

Parameters:

  • raw (Hash[Symbol, untyped])

Returns:



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/dinie/generated/types/transaction.rb', line 23

def self.deserialize(raw)
  new(
    amount_due: raw[:amount_due],
    amount_paid: raw[:amount_paid],
    amount_remaining: raw[:amount_remaining],
    created_at: raw[:created_at],
    days_overdue: raw[:days_overdue],
    due_date: raw[:due_date],
    fees: raw[:fees],
    id: raw[:id],
    interest: raw[:interest],
    loan_id: raw[:loan_id],
    paid_at: raw[:paid_at],
    principal: raw[:principal],
    status: raw[:status],
    type: raw[:type],
    updated_at: raw[:updated_at]
  )
end