Class: Io::Flow::V0::Models::CvvResult
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CvvResult
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CvvResult
constructor
A new instance of CvvResult.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CvvResult
Returns a new instance of CvvResult.
38745 38746 38747 38748 38749 38750 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38745 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:code], 'CvvResult') @code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::CvvResultCode) ? x : ::Io::Flow::V0::Models::CvvResultCode.apply(x)) @raw = (x = opts.delete(:raw); x.nil? ? nil : HttpClient::Preconditions.assert_class('raw', x, String)) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
38743 38744 38745 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38743 def code @code end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
38743 38744 38745 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38743 def raw @raw end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
38756 38757 38758 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38756 def copy(incoming={}) CvvResult.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
38760 38761 38762 38763 38764 38765 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38760 def to_hash { :code => code.value, :raw => raw } end |
#to_json ⇒ Object
38752 38753 38754 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38752 def to_json JSON.dump(to_hash) end |