Class: SixSaferpay::RegistrationError

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/models/registration_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_name: nil, error_message: nil) ⇒ RegistrationError

Returns a new instance of RegistrationError.



9
10
11
12
13
14
# File 'lib/six_saferpay/models/registration_error.rb', line 9

def initialize(error_name: nil,
               error_message: nil)

  @error_name = error_name
  @error_message = error_message
end

Instance Attribute Details

#error_messageObject

Returns the value of attribute error_message.



4
5
6
# File 'lib/six_saferpay/models/registration_error.rb', line 4

def error_message
  @error_message
end

#error_nameObject

Returns the value of attribute error_name.



4
5
6
# File 'lib/six_saferpay/models/registration_error.rb', line 4

def error_name
  @error_name
end

Instance Method Details

#to_hashObject Also known as: to_h



16
17
18
19
20
21
# File 'lib/six_saferpay/models/registration_error.rb', line 16

def to_hash
  hash = Hash.new
  hash.merge!(error_name: @error_name) if @error_name
  hash.merge!(error_message: @error_message) if @error_message
  hash
end