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