Class: SixSaferpay::Bancontact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(qr_code_data: nil, intent_url: nil) ⇒ Bancontact

Returns a new instance of Bancontact.



6
7
8
9
# File 'lib/six_saferpay/models/bancontact.rb', line 6

def initialize(qr_code_data: nil, intent_url: nil)
  @qr_code_data = qr_code_data
  @intent_url = intent_url
end

Instance Attribute Details

#intent_urlObject

Returns the value of attribute intent_url.



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

def intent_url
  @intent_url
end

#qr_code_dataObject

Returns the value of attribute qr_code_data.



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

def qr_code_data
  @qr_code_data
end

Instance Method Details

#to_hashObject Also known as: to_h



11
12
13
14
15
16
# File 'lib/six_saferpay/models/bancontact.rb', line 11

def to_hash
  hash = Hash.new
  hash.merge!(qr_code_data: @qr_code_data) if @qr_code_data
  hash.merge!(intent_url: @intent_url) if @intent_url
  hash
end