Class: Io::Flow::V0::Models::ActionRedirect
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Redirect the customer to another url using a ‘window.open` or an HTML form POST redirection. After the payment process is completed, the customer will be redirected back to the `returnUrl` provided in the payment request.
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.
Attributes inherited from Action
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ActionRedirect
constructor
A new instance of ActionRedirect.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Action
Constructor Details
#initialize(incoming = {}) ⇒ ActionRedirect
Returns a new instance of ActionRedirect.
25405 25406 25407 25408 25409 25410 25411 25412 25413 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25405 def initialize(incoming={}) super(:type => Action::Types::ACTION_REDIRECT) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:method, :url], 'ActionRedirect') @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)) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
25403 25404 25405 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25403 def data @data end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
25403 25404 25405 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25403 def expires_at @expires_at end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
25403 25404 25405 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25403 def method @method end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
25403 25404 25405 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25403 def url @url end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25419 25420 25421 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25419 def copy(incoming={}) ActionRedirect.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
25423 25424 25425 25426 25427 25428 25429 25430 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25423 def subtype_to_hash { :expires_at => expires_at, :method => method, :url => url, :data => data } end |
#to_json ⇒ Object
25415 25416 25417 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25415 def to_json JSON.dump(to_hash) end |