Class: Io::Flow::V0::Models::ActionDisplayInlineWindow
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Render a visible window or iframe and open the returned url with a ‘window.open` or an HTML form POST. This will load the payment provider’s experience, which the customer will interact with to complete the transaction. After several minutes, the payment request will asynchronously update based on the results of the transaction.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#window_size ⇒ Object
readonly
Returns the value of attribute window_size.
Attributes inherited from Action
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ActionDisplayInlineWindow
constructor
A new instance of ActionDisplayInlineWindow.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Action
Constructor Details
#initialize(incoming = {}) ⇒ ActionDisplayInlineWindow
Returns a new instance of ActionDisplayInlineWindow.
25335 25336 25337 25338 25339 25340 25341 25342 25343 25344 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25335 def initialize(incoming={}) super(:type => Action::Types::ACTION_DISPLAY_INLINE_WINDOW) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:method, :url], 'ActionDisplayInlineWindow') @expires_at = (x = opts.delete(:expires_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @method = HttpClient::Preconditions.assert_class('method', opts.delete(:method), String) @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String) @data = (x = opts.delete(:data); x.nil? ? nil : HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(x), Hash)) @window_size = (x = opts.delete(:window_size); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::InlineWindowViewportSize) ? x : ::Io::Flow::V0::Models::InlineWindowViewportSize.apply(x))) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
25333 25334 25335 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25333 def data @data end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
25333 25334 25335 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25333 def expires_at @expires_at end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
25333 25334 25335 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25333 def method @method end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
25333 25334 25335 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25333 def url @url end |
#window_size ⇒ Object (readonly)
Returns the value of attribute window_size.
25333 25334 25335 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25333 def window_size @window_size end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25350 25351 25352 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25350 def copy(incoming={}) ActionDisplayInlineWindow.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
25354 25355 25356 25357 25358 25359 25360 25361 25362 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25354 def subtype_to_hash { :expires_at => expires_at, :method => method, :url => url, :data => data, :window_size => window_size.nil? ? nil : window_size.value } end |
#to_json ⇒ Object
25346 25347 25348 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25346 def to_json JSON.dump(to_hash) end |