Sha256: 696add1ab33b860fd3ec835e052aa901a03ceef610d175962f41e2cf217f3152

Contents?: true

Size: 1.26 KB

Versions: 4

Compression:

Stored size: 1.26 KB

Contents

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

4 entries across 4 versions & 1 rubygems

Version Path
ivapi-1.5.0 lib/ivapi/client/account.rb
ivapi-1.4.0 lib/ivapi/client/account.rb
ivapi-1.3.0 lib/ivapi/client/account.rb
ivapi-1.2.0 lib/ivapi/client/account.rb