Class: Worldline::Connect::SDK::V1::Domain::RefundCardMethodSpecificOutput

Inherits:
RefundMethodSpecificOutput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/refund_card_method_specific_output.rb

Instance Attribute Summary collapse

Attributes inherited from RefundMethodSpecificOutput

#refund_product_id, #total_amount_paid, #total_amount_refunded

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#authorisation_codeString

Returns the current value of authorisation_code.

Returns:

  • (String)

    the current value of authorisation_code



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/refund_card_method_specific_output.rb', line 15

def authorisation_code
  @authorisation_code
end

#cardWorldline::Connect::SDK::V1::Domain::CardEssentials

Returns the current value of card.

Returns:



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/refund_card_method_specific_output.rb', line 15

def card
  @card
end

Instance Method Details

#from_hash(hash) ⇒ Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/worldline/connect/sdk/v1/domain/refund_card_method_specific_output.rb', line 29

def from_hash(hash)
  super
  if hash.has_key? 'authorisationCode'
    @authorisation_code = hash['authorisationCode']
  end
  if hash.has_key? 'card'
    raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
    @card = Worldline::Connect::SDK::V1::Domain::CardEssentials.new_from_hash(hash['card'])
  end
end

#to_hHash

Returns:

  • (Hash)


22
23
24
25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/refund_card_method_specific_output.rb', line 22

def to_h
  hash = super
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
  hash['card'] = @card.to_h unless @card.nil?
  hash
end