class SixSaferpay::RegistrationResult
Attributes
authentication_result[RW]
error[RW]
fd_alias[RW]
success[RW]
Public Class Methods
new(success:, fd_alias: nil, error: nil, authentication_result: nil)
click to toggle source
# File lib/six_saferpay/models/registration_result.rb, line 11 def initialize(success:, fd_alias: nil, error: nil, authentication_result: nil) @success = success @fd_alias = SixSaferpay::RegistrationAlias.new(fd_alias.to_h) if fd_alias @error = SixSaferpay::RegistrationError.new(error.to_h) if error if authentication_result @authentication_result = SixSaferpay::AuthenticationResult .new(authentication_result.to_h) end end
Public Instance Methods
to_hash()
click to toggle source
# File lib/six_saferpay/models/registration_result.rb, line 25 def to_hash hash = Hash.new hash.merge!(success: @success) if !@success.nil? hash.merge!(fd_alias: @fd_alias.to_h) if @fd_alias hash.merge!(error: @error.to_h) if @error if authentication_result hash.merge!(authentication_result: @authentication_result.to_h) end hash end
Also aliased as: to_h