Class: Io::Flow::V0::Models::AuthorizationResultActionWait

Inherits:
AuthorizationResultAction show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Indicates that a response is not ready and that the consumer should poll (or wait) for a response.

Instance Attribute Summary collapse

Attributes inherited from AuthorizationResultAction

#discriminator

Instance Method Summary collapse

Methods inherited from AuthorizationResultAction

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ AuthorizationResultActionWait

Returns a new instance of AuthorizationResultActionWait.



20830
20831
20832
20833
20834
20835
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20830

def initialize(incoming={})
  super(:discriminator => AuthorizationResultAction::Types::AUTHORIZATION_RESULT_ACTION_WAIT)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:type], 'AuthorizationResultActionWait')
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::AuthorizationResultActionType) ? x : ::Io::Flow::V0::Models::AuthorizationResultActionType.apply(x))
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



20828
20829
20830
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20828

def type
  @type
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



20841
20842
20843
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20841

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

#subtype_to_hashObject



20845
20846
20847
20848
20849
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20845

def subtype_to_hash
  {
    :type => type.value
  }
end

#to_jsonObject



20837
20838
20839
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20837

def to_json
  JSON.dump(to_hash)
end