Class: OnlinePayments::SDK::Domain::ReattemptInstructions
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::ReattemptInstructions
- Defined in:
- lib/onlinepayments/sdk/domain/reattempt_instructions.rb
Instance Attribute Summary collapse
-
#conditions ⇒ OnlinePayments::SDK::Domain::ReattemptInstructionsConditions
The current value of conditions.
-
#frozen_period ⇒ Integer
The current value of frozen_period.
-
#indicator ⇒ String
The current value of indicator.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#conditions ⇒ OnlinePayments::SDK::Domain::ReattemptInstructionsConditions
Returns the current value of conditions.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/reattempt_instructions.rb', line 13 def conditions @conditions end |
#frozen_period ⇒ Integer
Returns 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 |
#indicator ⇒ String
Returns 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_h ⇒ 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 |