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.
26880 26881 26882 26883 26884 26885 26886 26887 26888 26889 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26880 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.
26878 26879 26880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26878 def data @data end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
26878 26879 26880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26878 def expires_at @expires_at end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
26878 26879 26880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26878 def method @method end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
26878 26879 26880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26878 def url @url end |
#window_size ⇒ Object (readonly)
Returns the value of attribute window_size.
26878 26879 26880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26878 def window_size @window_size end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
26895 26896 26897 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26895 def copy(incoming={}) ActionDisplayInlineWindow.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
26899 26900 26901 26902 26903 26904 26905 26906 26907 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26899 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
26891 26892 26893 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26891 def to_json JSON.dump(to_hash) end |