Class: PagSeguro::Notification::Authorization

Inherits:
PagSeguro::Notification show all
Defined in:
lib/pagseguro/notification/authorization.rb

Instance Attribute Summary

Attributes inherited from PagSeguro::Notification

#code, #type

Instance Method Summary collapse

Methods included from Extensions::MassAssignment

#initialize

Instance Method Details

#authorizationObject

Fetch the authorization by its notificationCode.



10
11
12
# File 'lib/pagseguro/notification/authorization.rb', line 10

def authorization
  Authorization.find_by_notification_code(code)
end

#authorization?Boolean

Detect if the notification is from an authorization.

Returns:

  • (Boolean)


5
6
7
# File 'lib/pagseguro/notification/authorization.rb', line 5

def authorization?
  type == "applicationAuthorization"
end