class Ingenico::Connect::SDK::Domain::Hostedcheckout::CreatedPaymentOutput

@attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::DisplayedData] displayed_data @attr [Ingenico::Connect::SDK::Domain::Payment::Payment] payment @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentCreationReferences] payment_creation_references @attr [String] payment_status_category @attr [true/false] tokenization_succeeded @attr [String] tokens

Attributes

displayed_data[RW]
payment[RW]
payment_creation_references[RW]
payment_status_category[RW]

@deprecated Use Payment.statusOutput.statusCategory instead

tokenization_succeeded[RW]
tokens[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb, line 48
def from_hash(hash)
  super
  if hash.has_key? 'displayedData'
    raise TypeError, "value '%s' is not a Hash" % [hash['displayedData']] unless hash['displayedData'].is_a? Hash
    @displayed_data = Ingenico::Connect::SDK::Domain::Hostedcheckout::DisplayedData.new_from_hash(hash['displayedData'])
  end
  if hash.has_key? 'payment'
    raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash
    @payment = Ingenico::Connect::SDK::Domain::Payment::Payment.new_from_hash(hash['payment'])
  end
  if hash.has_key? 'paymentCreationReferences'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentCreationReferences']] unless hash['paymentCreationReferences'].is_a? Hash
    @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? 'tokenizationSucceeded'
    @tokenization_succeeded = hash['tokenizationSucceeded']
  end
  if hash.has_key? 'tokens'
    @tokens = hash['tokens']
  end
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb, line 37
def to_h
  hash = super
  hash['displayedData'] = @displayed_data.to_h unless @displayed_data.nil?
  hash['payment'] = @payment.to_h unless @payment.nil?
  hash['paymentCreationReferences'] = @payment_creation_references.to_h unless @payment_creation_references.nil?
  hash['paymentStatusCategory'] = @payment_status_category unless @payment_status_category.nil?
  hash['tokenizationSucceeded'] = @tokenization_succeeded unless @tokenization_succeeded.nil?
  hash['tokens'] = @tokens unless @tokens.nil?
  hash
end