Class: Io::Flow::V0::Models::ActionWait

Inherits:
Action
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from Action

#type

Instance Method Summary collapse

Methods inherited from Action

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ActionWait

Returns a new instance of ActionWait.



25719
25720
25721
25722
25723
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25719

def initialize(incoming={})
  super(:type => Action::Types::ACTION_WAIT)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @expires_at = (x = opts.delete(:expires_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
end

Instance Attribute Details

#expires_atObject (readonly)

Returns the value of attribute expires_at.



25717
25718
25719
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25717

def expires_at
  @expires_at
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25729
25730
25731
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25729

def copy(incoming={})
  ActionWait.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



25733
25734
25735
25736
25737
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25733

def subtype_to_hash
  {
    :expires_at => expires_at
  }
end

#to_jsonObject



25725
25726
25727
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25725

def to_json
  JSON.dump(to_hash)
end