Class: Io::Flow::V0::Models::ThreedsTwoChallengeRequest

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

Overview

Data that must be passed to the 3DS Client to help the issuer ACS render a challenge for the user.

Instance Attribute Summary collapse

Attributes inherited from ThreedsChallengeAction

#discriminator

Instance Method Summary collapse

Methods inherited from ThreedsChallengeAction

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ThreedsTwoChallengeRequest

Returns a new instance of ThreedsTwoChallengeRequest.



62277
62278
62279
62280
62281
62282
62283
62284
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62277

def initialize(incoming={})
  super(:discriminator => ThreedsChallengeAction::Types::THREEDS_TWO_CHALLENGE_REQUEST)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:acs_url, :challenge_request], 'ThreedsTwoChallengeRequest')
  @acs_url = HttpClient::Preconditions.assert_class('acs_url', opts.delete(:acs_url), String)
  @challenge_request = HttpClient::Preconditions.assert_class('challenge_request', opts.delete(:challenge_request), String)
  @session_data = (x = opts.delete(:session_data); x.nil? ? nil : HttpClient::Preconditions.assert_class('session_data', x, String))
end

Instance Attribute Details

#acs_urlObject (readonly)

Returns the value of attribute acs_url.



62275
62276
62277
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62275

def acs_url
  @acs_url
end

#challenge_requestObject (readonly)

Returns the value of attribute challenge_request.



62275
62276
62277
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62275

def challenge_request
  @challenge_request
end

#session_dataObject (readonly)

Returns the value of attribute session_data.



62275
62276
62277
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62275

def session_data
  @session_data
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



62290
62291
62292
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62290

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

#subtype_to_hashObject



62294
62295
62296
62297
62298
62299
62300
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62294

def subtype_to_hash
  {
    :acs_url => acs_url,
    :challenge_request => challenge_request,
    :session_data => session_data
  }
end

#to_jsonObject



62286
62287
62288
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62286

def to_json
  JSON.dump(to_hash)
end