Class: OnlinePayments::SDK::Domain::CreateHostedFieldsSessionResponse

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#sdk_sriString

Returns the current value of sdk_sri.

Returns:

  • (String)

    the current value of sdk_sri



13
14
15
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb', line 13

def sdk_sri
  @sdk_sri
end

#sdk_urlString

Returns the current value of sdk_url.

Returns:

  • (String)

    the current value of sdk_url



13
14
15
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb', line 13

def sdk_url
  @sdk_url
end

#session_dataOnlinePayments::SDK::Domain::SessionData

Returns the current value of session_data.

Returns:



13
14
15
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb', line 13

def session_data
  @session_data
end

Instance Method Details

#from_hash(hash) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb', line 30

def from_hash(hash)
  super
  if hash.has_key? 'sdkSri'
    @sdk_sri = hash['sdkSri']
  end
  if hash.has_key? 'sdkUrl'
    @sdk_url = hash['sdkUrl']
  end
  if hash.has_key? 'sessionData'
    raise TypeError, "value '%s' is not a Hash" % [hash['sessionData']] unless hash['sessionData'].is_a? Hash
    @session_data = OnlinePayments::SDK::Domain::SessionData.new_from_hash(hash['sessionData'])
  end
end

#to_hHash

Returns:

  • (Hash)


22
23
24
25
26
27
28
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb', line 22

def to_h
  hash = super
  hash['sdkSri'] = @sdk_sri unless @sdk_sri.nil?
  hash['sdkUrl'] = @sdk_url unless @sdk_url.nil?
  hash['sessionData'] = @session_data.to_h unless @session_data.nil?
  hash
end