lib/figo.rb in figo-1.2.0 vs lib/figo.rb in figo-1.2.1

- old
+ new

@@ -356,19 +356,18 @@ # Retrieve list of transactions (on all or a specific account) # # @param account_id [String] ID of the account for which to list the transactions # @param since [String, Date] this parameter can either be a transaction ID or a date - # @param start_id [String] do only return transactions which were booked after the start transaction ID # @param count [Integer] limit the number of returned transactions + # @param offset [Integer] which offset into the result set should be used to determin the first transaction to return (useful in combination with count) # @param include_pending [Boolean] this flag indicates whether pending transactions should be included # in the response; pending transactions are always included as a complete set, regardless of # the `since` parameter # @return [Array] an array of `Transaction` objects, one for each transaction of the user - def transactions(account_id = nil, since = nil, start_id = nil, count = 1000, include_pending = false) - data = {"count" => count.to_s, "include_pending" => include_pending ? "1" : "0"} + def transactions(account_id = nil, since = nil, count = 1000, offset = 0, include_pending = false) + data = {"count" => count.to_s, "offset" => offset.to_s, "include_pending" => include_pending ? "1" : "0"} data["since"] = ((since.is_a?(Date) ? since.to_s : since) unless since.nil?) - data["start_id"] = start_id unless start_id.nil? query_api_object Transaction, (account_id.nil? ? "/rest/transactions?" : "/rest/accounts/#{account_id}/transactions?") + URI.encode_www_form(data), nil, "GET", "transactions" end # Retrieve a specific transaction