Class: SixSaferpay::ReturnUrls
- Inherits:
-
Object
- Object
- SixSaferpay::ReturnUrls
- Defined in:
- lib/six_saferpay/models/return_urls.rb
Instance Attribute Summary collapse
-
#fd_abort ⇒ Object
Returns the value of attribute fd_abort.
-
#fd_fail ⇒ Object
Returns the value of attribute fd_fail.
-
#success ⇒ Object
Returns the value of attribute success.
Instance Method Summary collapse
-
#initialize(success: nil, fd_fail: nil, fd_abort: nil) ⇒ ReturnUrls
constructor
A new instance of ReturnUrls.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(success: nil, fd_fail: nil, fd_abort: nil) ⇒ ReturnUrls
Returns a new instance of ReturnUrls.
6 7 8 9 10 |
# File 'lib/six_saferpay/models/return_urls.rb', line 6 def initialize(success: nil, fd_fail: nil, fd_abort: nil) @success = success || SixSaferpay.config.success_url @fd_fail = fd_fail || SixSaferpay.config.fail_url @fd_abort = fd_abort end |
Instance Attribute Details
#fd_abort ⇒ Object
Returns the value of attribute fd_abort.
4 5 6 |
# File 'lib/six_saferpay/models/return_urls.rb', line 4 def fd_abort @fd_abort end |
#fd_fail ⇒ Object
Returns the value of attribute fd_fail.
4 5 6 |
# File 'lib/six_saferpay/models/return_urls.rb', line 4 def fd_fail @fd_fail end |
#success ⇒ Object
Returns the value of attribute success.
4 5 6 |
# File 'lib/six_saferpay/models/return_urls.rb', line 4 def success @success end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
12 13 14 15 16 17 18 |
# File 'lib/six_saferpay/models/return_urls.rb', line 12 def to_hash hash = Hash.new hash.merge!(success: @success) if @success hash.merge!(fd_fail: @fd_fail) if @fd_fail hash.merge!(fd_abort: @fd_abort) if @fd_abort hash end |