class Ingenico::Direct::SDK::Domain::CreatedPaymentOutput

@attr [Ingenico::Direct::SDK::Domain::PaymentResponse] payment @attr [String] payment_status_category

Attributes

payment[RW]
payment_status_category[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/created_payment_output.rb, line 25
def from_hash(hash)
  super
  if hash.key? 'payment'
    raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash
    @payment = Ingenico::Direct::SDK::Domain::PaymentResponse.new_from_hash(hash['payment'])
  end
  @payment_status_category = hash['paymentStatusCategory'] if hash.key? 'paymentStatusCategory'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/created_payment_output.rb, line 18
def to_h
  hash = super
  hash['payment'] = @payment.to_h if @payment
  hash['paymentStatusCategory'] = @payment_status_category unless @payment_status_category.nil?
  hash
end