Class: Io::Flow::V0::Models::AuthorizationResultActionGet

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

Overview

Provides details for how to acquire additional information from the customer using GET (e.g. redirecting to the issuer for online payment method or 3D Secure).

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 = {}) ⇒ AuthorizationResultActionGet

Returns a new instance of AuthorizationResultActionGet.



28997
28998
28999
29000
29001
29002
29003
29004
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28997

def initialize(incoming={})
  super(:discriminator => AuthorizationResultAction::Types::AUTHORIZATION_RESULT_ACTION_GET)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:type], 'AuthorizationResultActionGet')
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::AuthorizationResultActionType) ? x : ::Io::Flow::V0::Models::AuthorizationResultActionType.apply(x))
  @url = (x = opts.delete(:url); x.nil? ? nil : HttpClient::Preconditions.assert_class('url', x, String))
  @details = (x = opts.delete(:details); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AuthorizationResultActionDetails) ? x : ::Io::Flow::V0::Models::AuthorizationResultActionDetails.from_json(x)))
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



28995
28996
28997
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28995

def details
  @details
end

#typeObject (readonly)

Returns the value of attribute type.



28995
28996
28997
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28995

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



28995
28996
28997
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28995

def url
  @url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29010
29011
29012
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29010

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

#subtype_to_hashObject



29014
29015
29016
29017
29018
29019
29020
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29014

def subtype_to_hash
  {
    :type => type.value,
    :url => url,
    :details => details.nil? ? nil : details.to_hash
  }
end

#to_jsonObject



29006
29007
29008
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29006

def to_json
  JSON.dump(to_hash)
end