Class: PagSeguro::Transactions
- Defined in:
- lib/pagseguro/transactions.rb
Constant Summary collapse
- STATUSES =
{ "0" => :initiated, "1" => :waiting_payment, "2" => :in_analysis, "3" => :paid, "4" => :available, "5" => :in_dispute, "6" => :refunded, "7" => :cancelled, "8" => :chargeback_charged, "9" => :contested }
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#builder, #initialize, #parameterize, #parse
Constructor Details
This class inherits a constructor from PagSeguro::Base
Instance Method Details
#find(code) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/pagseguro/transactions.rb', line 16 def find(code) response = api.get "/v3/transactions/#{code}" do |conn| conn.headers[:accept] = FORMATS[:xml] end parse_body response end |
#find_by_notification_code(code) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/pagseguro/transactions.rb', line 24 def find_by_notification_code(code) response = api.get "/v2/transactions/notifications/#{code}" do |conn| conn.headers[:accept] = FORMATS[:xml] end parse_body response end |