Sha256: efb9c85a6b7a516d189459d2283ee8e1f6e44b96640ecb0e5181319154e26a2e

Contents?: true

Size: 893 Bytes

Versions: 2

Compression:

Stored size: 893 Bytes

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    class CharacterWalletJournal < Base
      API_PATH = '/v6/characters/%<character_id>s/wallet/journal/'

      attr_reader :character_id, :page

      def initialize(options)
        super

        @character_id = options.fetch(:character_id)
        @page = options.fetch(:page, 1)
      end

      def wallet_journal_entries
        @wallet_journal_entries ||=
          begin
            output = []
            response.each do |wallet_journal_entry|
              output << Models::WalletJournalEntry.new(wallet_journal_entry)
            end
            output
          end
      end

      def scope
        'esi-wallet.read_character_wallet.v1'
      end

      def additation_query_params
        [:page]
      end

      def path
        format("#{ API_PATH }", character_id: character_id)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.29.0 lib/eve_online/esi/character_wallet_journal.rb
eve_online-0.28.0 lib/eve_online/esi/character_wallet_journal.rb