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.
62185 62186 62187 62188 62189 62190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62185 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.
62183 62184 62185 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62183 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
62183 62184 62185 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62183 def description @description end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
62196 62197 62198 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62196 def copy(incoming={}) ThreeDSecure.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
62200 62201 62202 62203 62204 62205 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62200 def to_hash { :code => code.value, :description => description } end |
#to_json ⇒ Object
62192 62193 62194 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62192 def to_json JSON.dump(to_hash) end |