Class: Io::Flow::V0::Models::AuthorizationResultActionNative

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 natively in the browser (e.g. for 3D Secure 2).

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

Returns a new instance of AuthorizationResultActionNative.



23066
23067
23068
23069
23070
23071
23072
23073
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23066

def initialize(incoming={})
  super(:discriminator => AuthorizationResultAction::Types::AUTHORIZATION_RESULT_ACTION_NATIVE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:type, :authorization], 'AuthorizationResultActionNative')
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::AuthorizationResultActionType) ? x : ::Io::Flow::V0::Models::AuthorizationResultActionType.apply(x))
  @authorization = (x = opts.delete(:authorization); x.is_a?(::Io::Flow::V0::Models::AuthorizationReference) ? x : ::Io::Flow::V0::Models::AuthorizationReference.new(x))
  @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

#authorizationObject (readonly)

Returns the value of attribute authorization.



23064
23065
23066
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23064

def authorization
  @authorization
end

#detailsObject (readonly)

Returns the value of attribute details.



23064
23065
23066
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23064

def details
  @details
end

#typeObject (readonly)

Returns the value of attribute type.



23064
23065
23066
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23064

def type
  @type
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



23079
23080
23081
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23079

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

#subtype_to_hashObject



23083
23084
23085
23086
23087
23088
23089
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23083

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

#to_jsonObject



23075
23076
23077
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23075

def to_json
  JSON.dump(to_hash)
end