Class: PagSeguro::Notification

Inherits:
Request
  • Object
show all
Defined in:
lib/pagseguro/notification.rb

Constant Summary

Constants inherited from Request

Request::API_VERSIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Request

#get, #post

Constructor Details

#initialize(code, type = nil, email = nil, token = nil) ⇒ Notification

Returns a new instance of Notification.



5
6
7
8
9
10
# File 'lib/pagseguro/notification.rb', line 5

def initialize(code, type = nil, email = nil, token = nil)
  @code = code
  @type = type
  @email = email
  @token = token
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/pagseguro/notification.rb', line 3

def code
  @code
end

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/pagseguro/notification.rb', line 3

def email
  @email
end

#tokenObject

Returns the value of attribute token.



3
4
5
# File 'lib/pagseguro/notification.rb', line 3

def token
  @token
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/pagseguro/notification.rb', line 3

def type
  @type
end

Instance Method Details

#transaction(account = nil) ⇒ Object



12
13
14
# File 'lib/pagseguro/notification.rb', line 12

def transaction( = nil)
  PagSeguro::Transaction.new get("/transactions/notifications/#{code}", API_V3, )
end