Class: PagSeguro::Sessions

Inherits:
Base
  • Object
show all
Defined in:
lib/pagseguro/sessions.rb

Instance Attribute Summary

Attributes inherited from Base

#api

Instance Method Summary collapse

Methods inherited from Base

#builder, #initialize, #parameterize, #parse, #parse_body

Constructor Details

This class inherits a constructor from PagSeguro::Base

Instance Method Details

#createObject



3
4
5
6
7
8
9
# File 'lib/pagseguro/sessions.rb', line 3

def create
  response = api.post "/v2/sessions" do |conn|
    conn.headers[:accept] = FORMATS[:xml]
  end

  parse response.body["session"]
end