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.
29065 29066 29067 29068 29069 29070 29071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29065 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.
29063 29064 29065 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29063 def expires_at @expires_at end |
#script ⇒ Object (readonly)
Returns the value of attribute script.
29063 29064 29065 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29063 def script @script end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29077 29078 29079 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29077 def copy(incoming={}) ActionExecuteScript.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
29081 29082 29083 29084 29085 29086 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29081 def subtype_to_hash { :expires_at => expires_at, :script => script } end |
#to_json ⇒ Object
29073 29074 29075 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29073 def to_json JSON.dump(to_hash) end |