Class: Tikkie::Notifications::PaymentNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/tikkie/notifications/payment_notification.rb

Overview

Payment notification.

Constant Summary collapse

NOTIFICATION_TYPE =
"PAYMENT"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ PaymentNotification

Returns a new instance of PaymentNotification.



11
12
13
# File 'lib/tikkie/notifications/payment_notification.rb', line 11

def initialize(body)
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



9
10
11
# File 'lib/tikkie/notifications/payment_notification.rb', line 9

def body
  @body
end

Instance Method Details

#notification_typeObject



19
20
21
# File 'lib/tikkie/notifications/payment_notification.rb', line 19

def notification_type
  body[:notificationType]
end

#payment_request_tokenObject



23
24
25
# File 'lib/tikkie/notifications/payment_notification.rb', line 23

def payment_request_token
  body[:paymentRequestToken]
end

#payment_tokenObject



27
28
29
# File 'lib/tikkie/notifications/payment_notification.rb', line 27

def payment_token
  body[:paymentToken]
end

#subscription_idObject



15
16
17
# File 'lib/tikkie/notifications/payment_notification.rb', line 15

def subscription_id
  body[:subscriptionId]
end