class SixSaferpay::SixSecureData::InsertResponse
Attributes
expiration[RW]
redirect[RW]
redirect_required[RW]
response_header[RW]
token[RW]
Public Class Methods
new(response_header:, token:, expiration:, redirect_required:, redirect: )
click to toggle source
# File lib/six_saferpay/api/six_secure_card_data/responses/insert_response.rb, line 12 def initialize(response_header:, token:, expiration:, redirect_required:, redirect: ) @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header @token = token @expiration = expiration @redirect_required = redirect_required @redirect = SixSaferpay::Redirect.new(redirect.to_h) if redirect end
Public Instance Methods
to_hash()
click to toggle source
# File lib/six_saferpay/api/six_secure_card_data/responses/insert_response.rb, line 25 def to_hash hash = Hash.new hash.merge!(response_header: @response_header.to_h) if @response_header hash.merge!(token: @token) if @token hash.merge!(expiration: @expiration) if @expiration hash.merge!(redirect_required: @redirect_required) if !@redirect_required.nil? hash.merge!(redirect: @redirect.to_h) if @redirect hash end
Also aliased as: to_h