Class: Worldline::Connect::SDK::V1::Domain::RefundCardMethodSpecificOutput
- Inherits:
-
RefundMethodSpecificOutput
- Object
- Domain::DataObject
- RefundMethodSpecificOutput
- Worldline::Connect::SDK::V1::Domain::RefundCardMethodSpecificOutput
- Defined in:
- lib/worldline/connect/sdk/v1/domain/refund_card_method_specific_output.rb
Instance Attribute Summary collapse
-
#authorisation_code ⇒ String
The current value of authorisation_code.
-
#card ⇒ Worldline::Connect::SDK::V1::Domain::CardEssentials
The current value of card.
Attributes inherited from RefundMethodSpecificOutput
#refund_product_id, #total_amount_paid, #total_amount_refunded
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#authorisation_code ⇒ String
Returns 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 end |
#card ⇒ Worldline::Connect::SDK::V1::Domain::CardEssentials
Returns the current value of card.
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_h ⇒ 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 |