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

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/order_type_information.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#purchase_typeString

Returns the current value of purchase_type.

Returns:

  • (String)

    the current value of purchase_type



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

def purchase_type
  @purchase_type
end

#transaction_typeString

Returns the current value of transaction_type.

Returns:

  • (String)

    the current value of transaction_type



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



23
24
25
26
27
# File 'lib/onlinepayments/sdk/domain/order_type_information.rb', line 23

def from_hash(hash)
  super
  @purchase_type = hash['purchaseType'] if hash.key? 'purchaseType'
  @transaction_type = hash['transactionType'] if hash.key? 'transactionType'
end

#to_hHash

Returns:

  • (Hash)


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

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