Sha256: d65ad6c9419a523611884b4ba2f7ec32d47f78eac0123c89dd5585efdd973276

Contents?: true

Size: 782 Bytes

Versions: 5

Compression:

Stored size: 782 Bytes

Contents

# typed: strict
# frozen_string_literal: true

require_relative "transaction_modification_base"

module LunchMoney
  module Objects
    # Object used to split a transaction when updating https://lunchmoney.dev/#update-transaction
    class Split < TransactionModificationBase
      sig { returns(T.any(Number, String)) }
      attr_accessor :amount

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lunchmoney-1.4.0 lib/lunchmoney/objects/split.rb
lunchmoney-1.2.0 lib/lunchmoney/objects/split.rb
lunchmoney-1.1.2 lib/lunchmoney/objects/split.rb
lunchmoney-1.1.1 lib/lunchmoney/objects/split.rb
lunchmoney-1.1.0 lib/lunchmoney/objects/split.rb