Class: OnlinePayments::SDK::Domain::ReattemptInstructionsConditions

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#max_attemptsInteger

Returns the current value of max_attempts.

Returns:

  • (Integer)

    the current value of max_attempts



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

def max_attempts
  @max_attempts
end

#max_delayInteger

Returns the current value of max_delay.

Returns:

  • (Integer)

    the current value of max_delay



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

def max_delay
  @max_delay
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/onlinepayments/sdk/domain/reattempt_instructions_conditions.rb', line 25

def from_hash(hash)
  super
  if hash.has_key? 'maxAttempts'
    @max_attempts = hash['maxAttempts']
  end
  if hash.has_key? 'maxDelay'
    @max_delay = hash['maxDelay']
  end
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
23
# File 'lib/onlinepayments/sdk/domain/reattempt_instructions_conditions.rb', line 18

def to_h
  hash = super
  hash['maxAttempts'] = @max_attempts unless @max_attempts.nil?
  hash['maxDelay'] = @max_delay unless @max_delay.nil?
  hash
end