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.
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.
40352 40353 40354 40355 40356 40357 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40352 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)) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
40350 40351 40352 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40350 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
40350 40351 40352 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40350 def description @description end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
40363 40364 40365 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40363 def copy(incoming={}) ThreeDSecure.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
40367 40368 40369 40370 40371 40372 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40367 def to_hash { :code => code.value, :description => description } end |
#to_json ⇒ Object
40359 40360 40361 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40359 def to_json JSON.dump(to_hash) end |