Class: Io::Flow::V0::Models::ThreeDSecure
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ThreeDSecure
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents the results from 3D Secure, if applied to an authorization
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#eci ⇒ Object
readonly
Returns the value of attribute eci.
-
#liability_sift ⇒ Object
readonly
Returns the value of attribute liability_sift.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ThreeDSecure
constructor
A new instance of ThreeDSecure.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ThreeDSecure
Returns a new instance of ThreeDSecure.
70452 70453 70454 70455 70456 70457 70458 70459 70460 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70452 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:code], 'ThreeDSecure') @code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::ThreeDSecureCode) ? x : ::Io::Flow::V0::Models::ThreeDSecureCode.apply(x)) @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String)) @eci = (x = opts.delete(:eci); x.nil? ? nil : HttpClient::Preconditions.assert_class('eci', x, String)) @liability_sift = (x = opts.delete(:liability_sift); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('liability_sift', x)) @version = (x = opts.delete(:version); x.nil? ? nil : HttpClient::Preconditions.assert_class('version', x, String)) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
70450 70451 70452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70450 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
70450 70451 70452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70450 def description @description end |
#eci ⇒ Object (readonly)
Returns the value of attribute eci.
70450 70451 70452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70450 def eci @eci end |
#liability_sift ⇒ Object (readonly)
Returns the value of attribute liability_sift.
70450 70451 70452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70450 def liability_sift @liability_sift end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
70450 70451 70452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70450 def version @version end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
70466 70467 70468 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70466 def copy(incoming={}) ThreeDSecure.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
70470 70471 70472 70473 70474 70475 70476 70477 70478 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70470 def to_hash { :code => code.value, :description => description, :eci => eci, :liability_sift => liability_sift, :version => version } end |
#to_json ⇒ Object
70462 70463 70464 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70462 def to_json JSON.dump(to_hash) end |