Class: Io::Flow::V0::Models::ThreedsIdentifyActionDetails

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

Overview

Information necessary to perform a 3ds Identify action inline to the user experience.

Instance Attribute Summary collapse

Attributes inherited from AuthorizationResultActionDetails

#discriminator

Instance Method Summary collapse

Methods inherited from AuthorizationResultActionDetails

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ThreedsIdentifyActionDetails

Returns a new instance of ThreedsIdentifyActionDetails.



70519
70520
70521
70522
70523
70524
70525
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70519

def initialize(incoming={})
  super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_IDENTIFY_ACTION_DETAILS)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:threeds_identify_action, :expires_at], 'ThreedsIdentifyActionDetails')
  @threeds_identify_action = (x = opts.delete(:threeds_identify_action); x.is_a?(::Io::Flow::V0::Models::ThreedsIdentifyAction) ? x : ::Io::Flow::V0::Models::ThreedsIdentifyAction.from_json(x))
  @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
end

Instance Attribute Details

#expires_atObject (readonly)

Returns the value of attribute expires_at.



70517
70518
70519
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70517

def expires_at
  @expires_at
end

#threeds_identify_actionObject (readonly)

Returns the value of attribute threeds_identify_action.



70517
70518
70519
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70517

def threeds_identify_action
  @threeds_identify_action
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



70531
70532
70533
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70531

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

#subtype_to_hashObject



70535
70536
70537
70538
70539
70540
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70535

def subtype_to_hash
  {
    :threeds_identify_action => threeds_identify_action.to_hash,
    :expires_at => expires_at
  }
end

#to_jsonObject



70527
70528
70529
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70527

def to_json
  JSON.dump(to_hash)
end