Class: Io::Flow::V0::Models::ThreedsChallengeActionDetails

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

Overview

Information necessary to perform a 3ds Challenge 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 = {}) ⇒ ThreedsChallengeActionDetails

Returns a new instance of ThreedsChallengeActionDetails.



70488
70489
70490
70491
70492
70493
70494
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70488

def initialize(incoming={})
  super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_CHALLENGE_ACTION_DETAILS)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:threeds_challenge_action, :expires_at], 'ThreedsChallengeActionDetails')
  @threeds_challenge_action = (x = opts.delete(:threeds_challenge_action); x.is_a?(::Io::Flow::V0::Models::ThreedsChallengeAction) ? x : ::Io::Flow::V0::Models::ThreedsChallengeAction.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.



70486
70487
70488
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70486

def expires_at
  @expires_at
end

#threeds_challenge_actionObject (readonly)

Returns the value of attribute threeds_challenge_action.



70486
70487
70488
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70486

def threeds_challenge_action
  @threeds_challenge_action
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



70500
70501
70502
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70500

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

#subtype_to_hashObject



70504
70505
70506
70507
70508
70509
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70504

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

#to_jsonObject



70496
70497
70498
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70496

def to_json
  JSON.dump(to_hash)
end