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