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.



29443
29444
29445
29446
29447
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29443

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.



29441
29442
29443
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29441

def expires_at
  @expires_at
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29453
29454
29455
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29453

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

#subtype_to_hashObject



29457
29458
29459
29460
29461
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29457

def subtype_to_hash
  {
    :expires_at => expires_at
  }
end

#to_jsonObject



29449
29450
29451
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29449

def to_json
  JSON.dump(to_hash)
end