Class: Io::Flow::V0::Models::ThreedsTwoBrowserActionConfiguration

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

Overview

Instructions to the card issuer to render challenges to the user

Instance Attribute Summary collapse

Attributes inherited from ActionConfiguration

#discriminator

Instance Method Summary collapse

Methods inherited from ActionConfiguration

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ThreedsTwoBrowserActionConfiguration

Returns a new instance of ThreedsTwoBrowserActionConfiguration.



53023
53024
53025
53026
53027
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53023

def initialize(incoming={})
  super(:discriminator => ActionConfiguration::Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @viewport = (x = (x = opts.delete(:viewport); x.nil? ? "xxx_small" : x); x.is_a?(::Io::Flow::V0::Models::ThreedsTwoChallengeViewport) ? x : ::Io::Flow::V0::Models::ThreedsTwoChallengeViewport.apply(x))
end

Instance Attribute Details

#viewportObject (readonly)

Returns the value of attribute viewport.



53021
53022
53023
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53021

def viewport
  @viewport
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53033
53034
53035
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53033

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

#subtype_to_hashObject



53037
53038
53039
53040
53041
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53037

def subtype_to_hash
  {
    :viewport => viewport.value
  }
end

#to_jsonObject



53029
53030
53031
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53029

def to_json
  JSON.dump(to_hash)
end