Class: OnlinePayments::SDK::Domain::Mastercard
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::Mastercard
- Defined in:
- lib/onlinepayments/sdk/domain/mastercard.rb
Instance Attribute Summary collapse
-
#authentication_options ⇒ OnlinePayments::SDK::Domain::AuthenticationOptions?
The current value of authentication_options.
-
#src_initiator_id ⇒ String?
The current value of src_initiator_id.
-
#srci_dpa_id ⇒ String?
The current value of srci_dpa_id.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#authentication_options ⇒ OnlinePayments::SDK::Domain::AuthenticationOptions?
Returns the current value of authentication_options.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/mastercard.rb', line 13 def @authentication_options end |
#src_initiator_id ⇒ String?
Returns the current value of src_initiator_id.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/mastercard.rb', line 13 def src_initiator_id @src_initiator_id end |
#srci_dpa_id ⇒ String?
Returns the current value of srci_dpa_id.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/mastercard.rb', line 13 def srci_dpa_id @srci_dpa_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/onlinepayments/sdk/domain/mastercard.rb', line 30 def from_hash(hash) super if hash.has_key? 'authenticationOptions' raise TypeError, "value '%s' is not a Hash" % [hash['authenticationOptions']] unless hash['authenticationOptions'].is_a? Hash @authentication_options = OnlinePayments::SDK::Domain::AuthenticationOptions.new_from_hash(hash['authenticationOptions']) end if hash.has_key? 'srcInitiatorId' @src_initiator_id = hash['srcInitiatorId'] end if hash.has_key? 'srciDpaId' @srci_dpa_id = hash['srciDpaId'] end end |
#to_h ⇒ Hash
22 23 24 25 26 27 28 |
# File 'lib/onlinepayments/sdk/domain/mastercard.rb', line 22 def to_h hash = super hash['authenticationOptions'] = @authentication_options.to_h unless @authentication_options.nil? hash['srcInitiatorId'] = @src_initiator_id unless @src_initiator_id.nil? hash['srciDpaId'] = @srci_dpa_id unless @srci_dpa_id.nil? hash end |