lib/ruby_mint.rb in ruby_mint-0.1.0 vs lib/ruby_mint.rb in ruby_mint-0.1.1
- old
+ new
@@ -61,11 +61,11 @@
@token = login_body["sUser"]["token"]
end
# Check if user is logged in already by the presence of a token.
#
- # @returns [Boolean]
+ # @return [Boolean]
def logged_in?
!@token.nil?
end
# Request that Mint.com refresh its account and transaction data
@@ -80,11 +80,11 @@
end
end
# Is Mint.com in the process of refreshing its data?
#
- # @returns [Boolean]
+ # @return [Boolean]
def refreshing?
response = agent.get("https://wwws.mint.com/userStatus.xevent", JSON_HEADERS)
if response.code != "200" || !response.body.include?("isRefreshing")
raise RubyMintError.new("Unable to check if account is refreshing.")
end
@@ -93,11 +93,11 @@
end
# Get account data
#
# @param account_types [Array<String>] Type of accounts to retrieve. Defaults to all types.
- # @returns [Hash]
+ # @return [Hash]
def accounts(account_types = ACCOUNT_TYPES)
# Use a new request_id
@request_id += 1
account_query = {
@@ -121,10 +121,10 @@
end
# Get transactions from mint. They are returned as CSV and include ALL
# the transactions available
#
- # @returns [String] CSV of all transactions
+ # @return [String] CSV of all transactions
def transactions
results = agent.get("https://wwws.mint.com/transactionDownload.event", JSON_HEADERS)
raise RubyMintError.new("Unable to obtain transations.") if results.code != "200"
raise RubyMintError.new("Non-CSV content returned.") if !results.header["content-type"].include?("text/csv")