Class: Io::Flow::V0::Models::RedirectAuthorizationDetails
- Inherits:
-
OnlineAuthorizationDetails
- Object
- OnlineAuthorizationDetails
- Io::Flow::V0::Models::RedirectAuthorizationDetails
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents an online payment that requires the user to redirect to another site before entering their payment information.
Instance Attribute Summary collapse
-
#confirmation_details ⇒ Object
readonly
Returns the value of attribute confirmation_details.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#payment_redirect_url ⇒ Object
readonly
Returns the value of attribute payment_redirect_url.
Attributes inherited from OnlineAuthorizationDetails
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RedirectAuthorizationDetails
constructor
A new instance of RedirectAuthorizationDetails.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from OnlineAuthorizationDetails
Constructor Details
#initialize(incoming = {}) ⇒ RedirectAuthorizationDetails
Returns a new instance of RedirectAuthorizationDetails.
47519 47520 47521 47522 47523 47524 47525 47526 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47519 def initialize(incoming={}) super(:discriminator => OnlineAuthorizationDetails::Types::REDIRECT_AUTHORIZATION_DETAILS) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :payment_redirect_url], 'RedirectAuthorizationDetails') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @payment_redirect_url = HttpClient::Preconditions.assert_class('payment_redirect_url', opts.delete(:payment_redirect_url), String) @confirmation_details = (x = opts.delete(:confirmation_details); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ConfirmationDetails) ? x : ::Io::Flow::V0::Models::ConfirmationDetails.from_json(x))) end |
Instance Attribute Details
#confirmation_details ⇒ Object (readonly)
Returns the value of attribute confirmation_details.
47517 47518 47519 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47517 def confirmation_details @confirmation_details end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
47517 47518 47519 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47517 def id @id end |
#payment_redirect_url ⇒ Object (readonly)
Returns the value of attribute payment_redirect_url.
47517 47518 47519 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47517 def payment_redirect_url @payment_redirect_url end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
47532 47533 47534 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47532 def copy(incoming={}) RedirectAuthorizationDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
47536 47537 47538 47539 47540 47541 47542 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47536 def subtype_to_hash { :id => id, :payment_redirect_url => payment_redirect_url, :confirmation_details => confirmation_details.nil? ? nil : confirmation_details.to_hash } end |
#to_json ⇒ Object
47528 47529 47530 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47528 def to_json JSON.dump(to_hash) end |