Class: SixSaferpay::SixTransaction::RefundDirectResponse
- Inherits:
-
Object
- Object
- SixSaferpay::SixTransaction::RefundDirectResponse
- Defined in:
- lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb
Instance Attribute Summary collapse
-
#dcc ⇒ Object
Returns the value of attribute dcc.
-
#payment_means ⇒ Object
Returns the value of attribute payment_means.
-
#response_header ⇒ Object
Returns the value of attribute response_header.
-
#transaction ⇒ Object
Returns the value of attribute transaction.
Instance Method Summary collapse
-
#initialize(response_header:, transaction:, payment_means:, dcc: nil) ⇒ RefundDirectResponse
constructor
A new instance of RefundDirectResponse.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(response_header:, transaction:, payment_means:, dcc: nil) ⇒ RefundDirectResponse
Returns a new instance of RefundDirectResponse.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb', line 11 def initialize(response_header: , transaction:, payment_means: , dcc: nil) @response_header = SixSaferpay::ResponseHeader.new(**response_header.to_h) if response_header @transaction = SixSaferpay::Transaction.new(**transaction.to_h) if transaction @payment_means = SixSaferpay::ResponsePaymentMeans.new(**payment_means.to_h) if payment_means @dcc = SixSaferpay::Dcc.new(**dcc.to_h) if dcc end |
Instance Attribute Details
#dcc ⇒ Object
Returns the value of attribute dcc.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb', line 5 def dcc @dcc end |
#payment_means ⇒ Object
Returns the value of attribute payment_means.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb', line 5 def payment_means @payment_means end |
#response_header ⇒ Object
Returns the value of attribute response_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb', line 5 def response_header @response_header end |
#transaction ⇒ Object
Returns the value of attribute transaction.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb', line 5 def transaction @transaction end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
22 23 24 25 26 27 28 29 |
# File 'lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb', line 22 def to_hash hash = Hash.new hash.merge!(response_header: @response_header.to_h) if @response_header hash.merge!(transaction: @transaction.to_h) if @transaction hash.merge!(payment_means: @payment_means.to_h) if @payment_means hash.merge!(dcc: @dcc.to_h) if @dcc hash end |