Skip to content

Commit

Permalink
Updated API for payments, including gateway_transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
anlek authored and bcurren committed Feb 13, 2014
1 parent 6c1c8cf commit fea6d48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/freshbooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
require 'freshbooks/estimate'
require 'freshbooks/expense'
require 'freshbooks/expiration'
require 'freshbooks/gateway_transaction'
require 'freshbooks/invoice'
require 'freshbooks/contact'
require 'freshbooks/item'
Expand Down
8 changes: 8 additions & 0 deletions lib/freshbooks/gateway_transaction.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module FreshBooks
class GatewayTransaction < FreshBooks::Base
define_schema do |s|
s.fixnum :reference_id
s.string :gateway_name
end
end
end
3 changes: 2 additions & 1 deletion lib/freshbooks/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ class Payment < FreshBooks::Base
s.float :amount
s.date :date
s.date_time :updated, :read_only => true
s.string :type, :notes
s.string :type, :notes, :currency_code
s.object :gateway_transaction
end

actions :list, :get, :create, :update, :delete
Expand Down

0 comments on commit fea6d48

Please sign in to comment.