class Io::Flow::V0::Models::AuthorizationResultActionNative

Provides details for how to acquire additional information from the customer natively in the browser (e.g. for 3D Secure 2).

Attributes

authorization[R]
details[R]
type[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 31323
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

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 31336
def copy(incoming={})
  AuthorizationResultActionNative.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 31340
def subtype_to_hash
  {
    :type => type.value,
    :authorization => authorization.to_hash,
    :details => details.nil? ? nil : details.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 31332
def to_json
  JSON.dump(to_hash)
end