Class: DineroMailIpn::Notification
- Inherits:
-
Object
- Object
- DineroMailIpn::Notification
- Defined in:
- lib/dinero_mail_ipn/notification_parser.rb
Instance Attribute Summary collapse
-
#operations ⇒ Object
Returns the value of attribute operations.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, raw_operations, options = {}) ⇒ Notification
constructor
A new instance of Notification.
Constructor Details
#initialize(type, raw_operations, options = {}) ⇒ Notification
Returns a new instance of Notification.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/dinero_mail_ipn/notification_parser.rb', line 63 def initialize(type, raw_operations, = {}) raise ArgumentError, "No operations received" if (raw_operations.empty? || raw_operations.nil?) @operations = raw_operations.inject([]) do |result, (type, id)| result << Operation.new(type, id) result end @type = type end |
Instance Attribute Details
#operations ⇒ Object
Returns the value of attribute operations.
61 62 63 |
# File 'lib/dinero_mail_ipn/notification_parser.rb', line 61 def operations @operations end |
#type ⇒ Object
Returns the value of attribute type.
61 62 63 |
# File 'lib/dinero_mail_ipn/notification_parser.rb', line 61 def type @type end |