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



52870
52871
52872
52873
52874
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52870

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.



52868
52869
52870
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52868

def viewport
  @viewport
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



52880
52881
52882
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52880

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

#subtype_to_hashObject



52884
52885
52886
52887
52888
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52884

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

#to_jsonObject



52876
52877
52878
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52876

def to_json
  JSON.dump(to_hash)
end