Class: PagSeguro::Request

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/pagseguro/request.rb

Direct Known Subclasses

Notification, Payment, Query, Refund, Session

Instance Method Summary collapse

Instance Method Details

#get(path, account = "default") ⇒ Object



10
11
12
13
# File 'lib/pagseguro/request.rb', line 10

def get(path,  = "default")
  options = { query: add_credencials() }
  self.class.get(path, options)
end

#post(path, account = "default", params = {}) ⇒ Object



15
16
17
18
19
20
# File 'lib/pagseguro/request.rb', line 15

def post(path,  = "default", params = {})
  options = { body: add_credencials() }
  options[:body].merge!(params)
  options[:timeout] = PagSeguro.timeout unless PagSeguro.timeout.blank?
  self.class.post(path, options)
end