Class: Countir::Journal::Entry
- Inherits:
-
Object
- Object
- Countir::Journal::Entry
- Defined in:
- lib/countir/resources/journal.rb
Instance Attribute Summary collapse
-
#account_code_id ⇒ Object
Returns the value of attribute account_code_id.
-
#debit_or_credit ⇒ Object
Returns the value of attribute debit_or_credit.
-
#price ⇒ Object
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(account_code_id:, debit_or_credit:, price:) ⇒ Entry
constructor
A new instance of Entry.
- #to_h ⇒ Object
Constructor Details
#initialize(account_code_id:, debit_or_credit:, price:) ⇒ Entry
Returns a new instance of Entry.
8 9 10 11 12 |
# File 'lib/countir/resources/journal.rb', line 8 def initialize(account_code_id:, debit_or_credit:, price:) self.account_code_id = account_code_id self.debit_or_credit = debit_or_credit self.price = price end |
Instance Attribute Details
#account_code_id ⇒ Object
Returns the value of attribute account_code_id.
6 7 8 |
# File 'lib/countir/resources/journal.rb', line 6 def account_code_id @account_code_id end |
#debit_or_credit ⇒ Object
Returns the value of attribute debit_or_credit.
6 7 8 |
# File 'lib/countir/resources/journal.rb', line 6 def debit_or_credit @debit_or_credit end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/countir/resources/journal.rb', line 6 def price @price end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 |
# File 'lib/countir/resources/journal.rb', line 14 def to_h { account_code_id: self.account_code_id, debit_or_credit: self.debit_or_credit, price: self.price, } end |