class Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation

@attr [String] purchase_type @attr [String] transaction_type @attr [String] usage_type

Attributes

purchase_type[RW]
transaction_type[RW]
usage_type[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/order_type_information.rb, line 31
def from_hash(hash)
  super
  if hash.has_key? 'purchaseType'
    @purchase_type = hash['purchaseType']
  end
  if hash.has_key? 'transactionType'
    @transaction_type = hash['transactionType']
  end
  if hash.has_key? 'usageType'
    @usage_type = hash['usageType']
  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/payment/order_type_information.rb, line 23
def to_h
  hash = super
  hash['purchaseType'] = @purchase_type unless @purchase_type.nil?
  hash['transactionType'] = @transaction_type unless @transaction_type.nil?
  hash['usageType'] = @usage_type unless @usage_type.nil?
  hash
end