Class: OnlinePayments::SDK::Domain::OrderTypeInformation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#purchase_typeString



11
12
13
# File 'lib/onlinepayments/sdk/domain/order_type_information.rb', line 11

def purchase_type
  @purchase_type
end

#transaction_typeString



11
12
13
# File 'lib/onlinepayments/sdk/domain/order_type_information.rb', line 11

def transaction_type
  @transaction_type
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/onlinepayments/sdk/domain/order_type_information.rb', line 25

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
end

#to_hHash



18
19
20
21
22
23
# File 'lib/onlinepayments/sdk/domain/order_type_information.rb', line 18

def to_h
  hash = super
  hash['purchaseType'] = @purchase_type unless @purchase_type.nil?
  hash['transactionType'] = @transaction_type unless @transaction_type.nil?
  hash
end