Class: OnlinePayments::SDK::Domain::PaymentLinkEvent

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/payment_link_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#date_timeString

Returns the current value of date_time.

Returns:

  • (String)

    the current value of date_time



12
13
14
# File 'lib/onlinepayments/sdk/domain/payment_link_event.rb', line 12

def date_time
  @date_time
end

#detailsString

Returns the current value of details.

Returns:

  • (String)

    the current value of details



12
13
14
# File 'lib/onlinepayments/sdk/domain/payment_link_event.rb', line 12

def details
  @details
end

#typeString

Returns the current value of type.

Returns:

  • (String)

    the current value of type



12
13
14
# File 'lib/onlinepayments/sdk/domain/payment_link_event.rb', line 12

def type
  @type
end

Instance Method Details

#from_hash(hash) ⇒ Object



26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/payment_link_event.rb', line 26

def from_hash(hash)
  super
  @date_time = hash['dateTime'] if hash.key? 'dateTime'
  @details = hash['details'] if hash.key? 'details'
  @type = hash['type'] if hash.key? 'type'
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
23
24
# File 'lib/onlinepayments/sdk/domain/payment_link_event.rb', line 18

def to_h
  hash = super
  hash['dateTime'] = @date_time unless @date_time.nil?
  hash['details'] = @details unless @details.nil?
  hash['type'] = @type unless @type.nil?
  hash
end