class SixSaferpay::SixTransaction::QueryPaymentMeansResponse

Attributes

payer[RW]
payment_means[RW]
redirect_required[RW]
redirect_url[RW]
response_header[RW]

Public Class Methods

new(response_header: , payment_means: , payer: nil, redirect_required: , redirect_url:) click to toggle source
# 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

Public Instance Methods

to_h()
Alias for: to_hash
to_hash() click to toggle source
# 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
Also aliased as: to_h