Sha256: a94bcf3ce231b147ec072f8232f26e9e5d2d9cd4cc0c86bc40e57fbb1549fc3a

Contents?: true

Size: 1.29 KB

Versions: 5

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true

module Ivapi
  class Client
    class Account < Base
      # Get information about account.
      #
      # Returns the Hash of account information.
      def information
        params = { command: 'account_info' }
        get('/json.php', params)
      end
      alias info information

      # Get account orders.
      #
      # Returns the Hash of account orders.
      def orders
        params = { command: 'account_orders' }
        get('/json.php', params)
      end

      # Get account services.
      #
      # Returns the Hash of account services.
      def services
        params = { command: 'account_services' }
        get('/json.php', params)
      end

      # Get account credits.
      #
      # count - The Integer of how many rows need to return (default: 10).
      #
      # Returns the Hash of account credits.
      def credits(count = 10)
        params = { command: 'account_credits', count: count }
        get('/json.php', params)
      end

      # Get account bonuses.
      #
      # count - The Integer of how many rows need to return (default: 10).
      #
      # Returns the Hash of account bonuses.
      def bonuses(count = 10)
        params = { command: 'account_bonuses', count: count }
        get('/json.php', params)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ivapi-1.9.0 lib/ivapi/client/account.rb
ivapi-1.8.0 lib/ivapi/client/account.rb
ivapi-1.7.0 lib/ivapi/client/account.rb
ivapi-1.6.1 lib/ivapi/client/account.rb
ivapi-1.6.0 lib/ivapi/client/account.rb