Class: SixSaferpay::Options
- Inherits:
-
Object
- Object
- SixSaferpay::Options
- Defined in:
- lib/six_saferpay/models/options.rb
Instance Attribute Summary collapse
-
#pre_auth ⇒ Object
Returns the value of attribute pre_auth.
Instance Method Summary collapse
-
#initialize(pre_auth: nil, allow_partial_authorization: nil) ⇒ Options
constructor
A new instance of Options.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(pre_auth: nil, allow_partial_authorization: nil) ⇒ Options
Returns a new instance of Options.
9 10 11 12 13 14 15 |
# File 'lib/six_saferpay/models/options.rb', line 9 def initialize( pre_auth: nil, allow_partial_authorization: nil ) @pre_auth = pre_auth @allow_partial_authorization = end |
Instance Attribute Details
#pre_auth ⇒ Object
Returns the value of attribute pre_auth.
4 5 6 |
# File 'lib/six_saferpay/models/options.rb', line 4 def pre_auth @pre_auth end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/six_saferpay/models/options.rb', line 17 def to_hash hash = Hash.new if !@pre_auth.nil? hash.merge!(pre_auth: @pre_auth) end if !@allow_partial_authorization.nil? hash.merge!(allow_partial_authorization: @allow_partial_authorization) end hash end |