Class: OnlinePayments::SDK::Domain::RedirectData

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/redirect_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#redirect_urlString

Returns the current value of redirect_url.

Returns:

  • (String)

    the current value of redirect_url



11
12
13
# File 'lib/onlinepayments/sdk/domain/redirect_data.rb', line 11

def redirect_url
  @redirect_url
end

#returnmacString

Returns the current value of returnmac.

Returns:

  • (String)

    the current value of returnmac



11
12
13
# File 'lib/onlinepayments/sdk/domain/redirect_data.rb', line 11

def returnmac
  @returnmac
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  @returnmac = hash['RETURNMAC'] if hash.key? 'RETURNMAC'
  @redirect_url = hash['redirectURL'] if hash.key? 'redirectURL'
end

#to_hHash

Returns:

  • (Hash)


16
17
18
19
20
21
# File 'lib/onlinepayments/sdk/domain/redirect_data.rb', line 16

def to_h
  hash = super
  hash['RETURNMAC'] = @returnmac unless @returnmac.nil?
  hash['redirectURL'] = @redirect_url unless @redirect_url.nil?
  hash
end