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

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/payment_link_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from 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



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/onlinepayments/sdk/domain/payment_link_event.rb', line 29

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

#to_hHash

Returns:

  • (Hash)


21
22
23
24
25
26
27
# File 'lib/onlinepayments/sdk/domain/payment_link_event.rb', line 21

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