class Io::Flow::V0::Models::ActionRedirect
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.
Attributes
data[R]
expires_at[R]
method[R]
url[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 29097 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
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 29111 def copy(incoming={}) ActionRedirect.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 29115 def subtype_to_hash { :expires_at => expires_at, :method => method, :url => url, :data => data } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 29107 def to_json JSON.dump(to_hash) end