Class: Worldline::Acquiring::SDK::V1::Domain::CardOnFileData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::CardOnFileData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/card_on_file_data.rb
Instance Attribute Summary collapse
-
#initial_card_on_file_data ⇒ Worldline::Acquiring::SDK::V1::Domain::InitialCardOnFileData
The current value of initial_card_on_file_data.
-
#is_initial_transaction ⇒ true/false
The current value of is_initial_transaction.
-
#subsequent_card_on_file_data ⇒ Worldline::Acquiring::SDK::V1::Domain::SubsequentCardOnFileData
The current value of subsequent_card_on_file_data.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#initial_card_on_file_data ⇒ Worldline::Acquiring::SDK::V1::Domain::InitialCardOnFileData
Returns the current value of initial_card_on_file_data.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_on_file_data.rb', line 16 def initial_card_on_file_data @initial_card_on_file_data end |
#is_initial_transaction ⇒ true/false
Returns the current value of is_initial_transaction.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_on_file_data.rb', line 16 def is_initial_transaction @is_initial_transaction end |
#subsequent_card_on_file_data ⇒ Worldline::Acquiring::SDK::V1::Domain::SubsequentCardOnFileData
Returns the current value of subsequent_card_on_file_data.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_on_file_data.rb', line 16 def subsequent_card_on_file_data @subsequent_card_on_file_data end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_on_file_data.rb', line 33 def from_hash(hash) super if hash.has_key? 'initialCardOnFileData' raise TypeError, "value '%s' is not a Hash" % [hash['initialCardOnFileData']] unless hash['initialCardOnFileData'].is_a? Hash @initial_card_on_file_data = Worldline::Acquiring::SDK::V1::Domain::InitialCardOnFileData.new_from_hash(hash['initialCardOnFileData']) end if hash.has_key? 'isInitialTransaction' @is_initial_transaction = hash['isInitialTransaction'] end if hash.has_key? 'subsequentCardOnFileData' raise TypeError, "value '%s' is not a Hash" % [hash['subsequentCardOnFileData']] unless hash['subsequentCardOnFileData'].is_a? Hash @subsequent_card_on_file_data = Worldline::Acquiring::SDK::V1::Domain::SubsequentCardOnFileData.new_from_hash(hash['subsequentCardOnFileData']) end end |
#to_h ⇒ Hash
25 26 27 28 29 30 31 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_on_file_data.rb', line 25 def to_h hash = super hash['initialCardOnFileData'] = @initial_card_on_file_data.to_h unless @initial_card_on_file_data.nil? hash['isInitialTransaction'] = @is_initial_transaction unless @is_initial_transaction.nil? hash['subsequentCardOnFileData'] = @subsequent_card_on_file_data.to_h unless @subsequent_card_on_file_data.nil? hash end |