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.
51114 51115 51116 51117 51118 51119 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51114 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.
51112 51113 51114 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51112 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
51112 51113 51114 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51112 def description @description end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51125 51126 51127 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51125 def copy(incoming={}) ThreeDSecure.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
51129 51130 51131 51132 51133 51134 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51129 def to_hash { :code => code.value, :description => description } end |
#to_json ⇒ Object
51121 51122 51123 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51121 def to_json JSON.dump(to_hash) end |