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.
52160 52161 52162 52163 52164 52165 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52160 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.
52158 52159 52160 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52158 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
52158 52159 52160 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52158 def description @description end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
52171 52172 52173 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52171 def copy(incoming={}) ThreeDSecure.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
52175 52176 52177 52178 52179 52180 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52175 def to_hash { :code => code.value, :description => description } end |
#to_json ⇒ Object
52167 52168 52169 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52167 def to_json JSON.dump(to_hash) end |