Class: SixSaferpay::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/models/notification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(merchant_emails: nil, payer_email: nil, notify_url: nil) ⇒ Notification

Returns a new instance of Notification.



9
10
11
12
13
# File 'lib/six_saferpay/models/notification.rb', line 9

def initialize(merchant_emails: nil, payer_email: nil, notify_url: nil)
  @merchant_emails = merchant_emails
  @payer_email = payer_email
  @notify_url = notify_url
end

Instance Attribute Details

#merchant_emailsObject

Returns the value of attribute merchant_emails.



4
5
6
# File 'lib/six_saferpay/models/notification.rb', line 4

def merchant_emails
  @merchant_emails
end

#notify_urlObject

Returns the value of attribute notify_url.



4
5
6
# File 'lib/six_saferpay/models/notification.rb', line 4

def notify_url
  @notify_url
end

#payer_emailObject

Returns the value of attribute payer_email.



4
5
6
# File 'lib/six_saferpay/models/notification.rb', line 4

def payer_email
  @payer_email
end

Instance Method Details

#to_hashObject Also known as: to_h



15
16
17
18
19
20
21
# File 'lib/six_saferpay/models/notification.rb', line 15

def to_hash
  hash = Hash.new
  hash.merge!(merchant_emails: @merchant_emails) if @merchant_emails
  hash.merge!(payer_email: @payer_email) if @payer_email
  hash.merge!(notify_url: @notify_url) if @notify_url
  hash
end