Sha256: f0c1d5f0fb8289e120b09b4aec51c723c25ba8890b5bbfda9b4945a4266352d4

Contents?: true

Size: 793 Bytes

Versions: 2

Compression:

Stored size: 793 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module LunchMoney
  # Base object used for transaction objects that are used to update
  # transactions https://lunchmoney.dev/#update-transaction
  class TransactionModificationBase < LunchMoney::DataObject
    sig { returns(T.nilable(String)) }
    attr_accessor :payee, :date, :notes

    sig { returns(T.nilable(Integer)) }
    attr_accessor :category_id

    sig do
      params(
        payee: T.nilable(String),
        date: T.nilable(String),
        category_id: T.nilable(Integer),
        notes: T.nilable(String),
      ).void
    end
    def initialize(payee: nil, date: nil, category_id: nil, notes: nil)
      super()
      @payee = payee
      @date = date
      @category_id = category_id
      @notes = notes
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lunchmoney-1.0.0 lib/lunchmoney/transactions/transaction/transaction_modification_base.rb
lunchmoney-0.10.0 lib/lunchmoney/transactions/transaction/transaction_modification_base.rb