Class: Io::Flow::V0::Models::CardBrowserActionConfiguration

Inherits:
BrowserActionConfiguration 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 BrowserActionConfiguration

#discriminator

Instance Method Summary collapse

Methods inherited from BrowserActionConfiguration

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ CardBrowserActionConfiguration

Returns a new instance of CardBrowserActionConfiguration.



25161
25162
25163
25164
25165
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25161

def initialize(incoming={})
  super(:discriminator => BrowserActionConfiguration::Types::CARD_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.



25159
25160
25161
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25159

def viewport
  @viewport
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25171
25172
25173
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25171

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

#subtype_to_hashObject



25175
25176
25177
25178
25179
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25175

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

#to_jsonObject



25167
25168
25169
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25167

def to_json
  JSON.dump(to_hash)
end