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