Class: OnlinePayments::SDK::Domain::PaymentLinkSpecificInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#descriptionString

Returns the current value of description.

Returns:

  • (String)

    the current value of description



14
15
16
# File 'lib/onlinepayments/sdk/domain/payment_link_specific_input.rb', line 14

def description
  @description
end

#expiration_dateDateTime

Returns the current value of expiration_date.

Returns:

  • (DateTime)

    the current value of expiration_date



14
15
16
# File 'lib/onlinepayments/sdk/domain/payment_link_specific_input.rb', line 14

def expiration_date
  @expiration_date
end

#recipient_nameString

Returns the current value of recipient_name.

Returns:

  • (String)

    the current value of recipient_name



14
15
16
# File 'lib/onlinepayments/sdk/domain/payment_link_specific_input.rb', line 14

def recipient_name
  @recipient_name
end

Instance Method Details

#from_hash(hash) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/onlinepayments/sdk/domain/payment_link_specific_input.rb', line 31

def from_hash(hash)
  super
  if hash.has_key? 'description'
    @description = hash['description']
  end
  if hash.has_key? 'expirationDate'
    @expiration_date = DateTime.parse(hash['expirationDate'])
  end
  if hash.has_key? 'recipientName'
    @recipient_name = hash['recipientName']
  end
end

#to_hHash

Returns:

  • (Hash)


23
24
25
26
27
28
29
# File 'lib/onlinepayments/sdk/domain/payment_link_specific_input.rb', line 23

def to_h
  hash = super
  hash['description'] = @description unless @description.nil?
  hash['expirationDate'] = @expiration_date.iso8601(3) unless @expiration_date.nil?
  hash['recipientName'] = @recipient_name unless @recipient_name.nil?
  hash
end