Sha256: 8dbd0f41b9fe17e5cca788df38268de463633f8780ed91c967d006301afd0b74

Contents?: true

Size: 1.52 KB

Versions: 13

Compression:

Stored size: 1.52 KB

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class WalletJournalEntry < Base
        def as_json
          {
            amount: amount,
            balance: balance,
            context_id: context_id,
            context_id_type: context_id_type,
            date: date,
            description: description,
            first_party_id: first_party_id,
            id: id,
            reason: reason,
            ref_type: ref_type,
            second_party_id: second_party_id,
            tax: tax,
            tax_receiver_id: tax_receiver_id
          }
        end

        def amount
          options['amount']
        end

        def balance
          options['balance']
        end

        def context_id
          options['context_id']
        end

        def context_id_type
          options['context_id_type']
        end

        def date
          date = options['date']

          parse_datetime_with_timezone(date) if date
        end

        def description
          options['description']
        end

        def first_party_id
          options['first_party_id']
        end

        def id
          options['id']
        end

        def reason
          options['reason']
        end

        def ref_type
          options['ref_type']
        end

        def second_party_id
          options['second_party_id']
        end

        def tax
          options['tax']
        end

        def tax_receiver_id
          options['tax_receiver_id']
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
eve_online-0.29.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.28.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.27.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.26.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.25.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.24.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.23.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.22.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.21.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.20.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.19.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.18.0 lib/eve_online/esi/models/wallet_journal_entry.rb
eve_online-0.17.0 lib/eve_online/esi/models/wallet_journal_entry.rb