class Io::Flow::V0::Models::ActionDisplayInlineWindow

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.

Attributes

data[R]
expires_at[R]
method[R]
url[R]
window_size[R]

Public Class Methods

new(incoming={}) click to toggle source
Calls superclass method Io::Flow::V0::Models::Action::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 29027
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

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 29042
def copy(incoming={})
  ActionDisplayInlineWindow.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 29046
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() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 29038
def to_json
  JSON.dump(to_hash)
end