class SixSaferpay::SixPaymentPage::InitializeResponse

Attributes

expiration[RW]
redirect_url[RW]
response_header[RW]
token[RW]

Public Class Methods

new(response_header:, token:, expiration:, redirect_url: ) click to toggle source
# File lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb, line 11
def initialize(response_header:,
              token:,
              expiration:,
              redirect_url: )
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
  @token = token
  @expiration = expiration
  @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_payment_page/responses/initialize_response.rb, line 21
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_url: @redirect_url) if @redirect_url
  hash
end
Also aliased as: to_h