Class: OnlinePayments::SDK::Domain::ReattemptInstructions

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#conditionsOnlinePayments::SDK::Domain::ReattemptInstructionsConditions

Returns the current value of conditions.

Returns:



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

def conditions
  @conditions
end

#frozen_periodInteger

Returns the current value of frozen_period.

Returns:

  • (Integer)

    the current value of frozen_period



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

def frozen_period
  @frozen_period
end

#indicatorString

Returns the current value of indicator.

Returns:

  • (String)

    the current value of indicator



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

def indicator
  @indicator
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/reattempt_instructions.rb', line 30

def from_hash(hash)
  super
  if hash.has_key? 'conditions'
    raise TypeError, "value '%s' is not a Hash" % [hash['conditions']] unless hash['conditions'].is_a? Hash
    @conditions = OnlinePayments::SDK::Domain::ReattemptInstructionsConditions.new_from_hash(hash['conditions'])
  end
  if hash.has_key? 'frozenPeriod'
    @frozen_period = hash['frozenPeriod']
  end
  if hash.has_key? 'indicator'
    @indicator = hash['indicator']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['conditions'] = @conditions.to_h unless @conditions.nil?
  hash['frozenPeriod'] = @frozen_period unless @frozen_period.nil?
  hash['indicator'] = @indicator unless @indicator.nil?
  hash
end