Class: SixSaferpay::SixSecureData::UpdateResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/api/six_secure_card_data/responses/update_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_header:, fd_alias:, payment_means:) ⇒ UpdateResponse

Returns a new instance of UpdateResponse.



10
11
12
13
14
15
16
# File 'lib/six_saferpay/api/six_secure_card_data/responses/update_response.rb', line 10

def initialize(response_header:,
               fd_alias:,
               payment_means: )
  @response_header = SixSaferpay::ResponseHeader.new(**response_header.to_h) if response_header
  @fd_alias = SixSaferpay::Alias.new(**fd_alias.to_h)
  @payment_means = SixSaferpay::ResponsePaymentMeans.new(**payment_means.to_h)
end

Instance Attribute Details

#fd_aliasObject

Returns the value of attribute fd_alias.



5
6
7
# File 'lib/six_saferpay/api/six_secure_card_data/responses/update_response.rb', line 5

def fd_alias
  @fd_alias
end

#payment_meansObject

Returns the value of attribute payment_means.



5
6
7
# File 'lib/six_saferpay/api/six_secure_card_data/responses/update_response.rb', line 5

def payment_means
  @payment_means
end

#response_headerObject

Returns the value of attribute response_header.



5
6
7
# File 'lib/six_saferpay/api/six_secure_card_data/responses/update_response.rb', line 5

def response_header
  @response_header
end

Instance Method Details

#to_hashObject Also known as: to_h



18
19
20
21
22
23
24
# File 'lib/six_saferpay/api/six_secure_card_data/responses/update_response.rb', line 18

def to_hash
  hash = Hash.new
  hash.merge!(response_header: @response_header.to_h) if @response_header
  hash.merge!(fd_alias: @fd_alias.to_h) if @fd_alias
  hash.merge!(payment_means: @payment_means.to_h) if @payment_means
  hash
end