Class: Ingenico::Connect::SDK::Domain::Hostedcheckout::CreatedPaymentOutput

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#displayed_dataObject



17
18
19
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb', line 17

def displayed_data
  @displayed_data
end

#paymentObject



20
21
22
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb', line 20

def payment
  @payment
end

#payment_creation_referencesObject



23
24
25
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb', line 23

def payment_creation_references
  @payment_creation_references
end

#payment_status_categoryObject

String



26
27
28
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb', line 26

def payment_status_category
  @payment_status_category
end

#tokensObject

String



29
30
31
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb', line 29

def tokens
  @tokens
end

Instance Method Details

#from_hash(hash) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb', line 41

def from_hash(hash)
  super
  if hash.has_key?('displayedData')
    if !(hash['displayedData'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['displayedData']]
    end
    @displayed_data = Ingenico::Connect::SDK::Domain::Hostedcheckout::DisplayedData.new_from_hash(hash['displayedData'])
  end
  if hash.has_key?('payment')
    if !(hash['payment'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['payment']]
    end
    @payment = Ingenico::Connect::SDK::Domain::Payment::Payment.new_from_hash(hash['payment'])
  end
  if hash.has_key?('paymentCreationReferences')
    if !(hash['paymentCreationReferences'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentCreationReferences']]
    end
    @payment_creation_references = Ingenico::Connect::SDK::Domain::Payment::PaymentCreationReferences.new_from_hash(hash['paymentCreationReferences'])
  end
  if hash.has_key?('paymentStatusCategory')
    @payment_status_category = hash['paymentStatusCategory']
  end
  if hash.has_key?('tokens')
    @tokens = hash['tokens']
  end
end

#to_hObject



31
32
33
34
35
36
37
38
39
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb', line 31

def to_h
  hash = super
  add_to_hash(hash, 'displayedData', @displayed_data)
  add_to_hash(hash, 'payment', @payment)
  add_to_hash(hash, 'paymentCreationReferences', @payment_creation_references)
  add_to_hash(hash, 'paymentStatusCategory', @payment_status_category)
  add_to_hash(hash, 'tokens', @tokens)
  hash
end