lib/finapps/rest/transactions.rb in finapps-0.1.18.pre vs lib/finapps/rest/transactions.rb in finapps-0.1.19.pre
- old
+ new
@@ -12,11 +12,11 @@
logger.debug "##{__method__.to_s} => Started"
path = Defaults::END_POINTS[:transactions_search]
logger.debug "##{__method__.to_s} => path: #{path}"
- transactions, error_messages = @client.send(path, :post, params) do |r|
+ transactions, error_messages = @client.send(path, :post, params.compact) do |r|
r.body.transactions.each { |i| Transaction.new(i) }
end
logger.debug "##{__method__.to_s} => Completed"
return transactions, error_messages
@@ -26,32 +26,8 @@
class Transaction < FinApps::REST::Resource
attr_accessor :_id, :account_id, :date, :transaction_date, :description, :amount,
:type, :status, :keyword, :merchant_name, :categories, :tags
end
-
-
-=begin
- "transactions": [
- {
- "_id": "53d69a6f1184140013000006",
- "account_id": "53d69a6e1184140013000004",
- "date": "2014-07-15T07:00:00Z",
- "transaction_date": "0001-01-01T00:00:00Z",
- "description": "AUTOMATIC PAYMENT-THANK",
- "amount": 25,
- "type": "credit",
- "status": "posted",
- "keyword": "payment - thank",
- "merchant_name": "Payment Thank You",
- "categories": [
- {
- "category_id": "",
- "amount": 25
- }
- ],
- "tags": []
- },
-=end
end
end
\ No newline at end of file