Class: Rubykassa::Notification
- Inherits:
-
Object
- Object
- Rubykassa::Notification
- Includes:
- SignatureGenerator
- Defined in:
- lib/rubykassa/notification.rb
Constant Summary
Constants included from SignatureGenerator
SignatureGenerator::KIND_ERROR_MESSAGE
Instance Attribute Summary collapse
-
#invoice_id ⇒ Object
readonly
Returns the value of attribute invoice_id.
-
#params ⇒ Object
Returns the value of attribute params.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Notification
constructor
A new instance of Notification.
- #success ⇒ Object
Methods included from SignatureGenerator
#custom_params, #generate_signature_for, #params_string
Constructor Details
#initialize(params = {}) ⇒ Notification
Returns a new instance of Notification.
10 11 12 13 14 |
# File 'lib/rubykassa/notification.rb', line 10 def initialize(params = {}) @params = HashWithIndifferentAccess.new(params) @invoice_id = @params['InvId'] @total = @params['OutSum'] end |
Instance Attribute Details
#invoice_id ⇒ Object (readonly)
Returns the value of attribute invoice_id.
8 9 10 |
# File 'lib/rubykassa/notification.rb', line 8 def invoice_id @invoice_id end |
#params ⇒ Object
Returns the value of attribute params.
7 8 9 |
# File 'lib/rubykassa/notification.rb', line 7 def params @params end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
8 9 10 |
# File 'lib/rubykassa/notification.rb', line 8 def total @total end |
Instance Method Details
#success ⇒ Object
23 24 25 |
# File 'lib/rubykassa/notification.rb', line 23 def success "OK#{@invoice_id}" end |