Class: Io::Flow::V0::Models::ActionExecuteScript
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Render the returned HTML script from the payment provider, which will gather browser data to inform the authorization decision. After several seconds, the payment request will asynchronously update based on the results of the script.
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#script ⇒ Object
readonly
Returns the value of attribute script.
Attributes inherited from Action
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ActionExecuteScript
constructor
A new instance of ActionExecuteScript.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Action
Constructor Details
#initialize(incoming = {}) ⇒ ActionExecuteScript
Returns a new instance of ActionExecuteScript.
25373 25374 25375 25376 25377 25378 25379 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25373 def initialize(incoming={}) super(:type => Action::Types::ACTION_EXECUTE_SCRIPT) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:script], 'ActionExecuteScript') @expires_at = (x = opts.delete(:expires_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @script = HttpClient::Preconditions.assert_class('script', opts.delete(:script), String) end |
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
25371 25372 25373 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25371 def expires_at @expires_at end |
#script ⇒ Object (readonly)
Returns the value of attribute script.
25371 25372 25373 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25371 def script @script end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25385 25386 25387 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25385 def copy(incoming={}) ActionExecuteScript.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
25389 25390 25391 25392 25393 25394 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25389 def subtype_to_hash { :expires_at => expires_at, :script => script } end |
#to_json ⇒ Object
25381 25382 25383 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25381 def to_json JSON.dump(to_hash) end |