Class: Io::Flow::V0::Models::OrderQuoteErrorDetails
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteErrorDetails
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderQuoteErrorDetails
constructor
A new instance of OrderQuoteErrorDetails.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuoteErrorDetails
Returns a new instance of OrderQuoteErrorDetails.
53048 53049 53050 53051 53052 53053 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53048 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:code, :message], 'OrderQuoteErrorDetails') @code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::OrderQuoteErrorCode) ? x : ::Io::Flow::V0::Models::OrderQuoteErrorCode.apply(x)) @message = HttpClient::Preconditions.assert_class('message', opts.delete(:message), String) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
53046 53047 53048 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53046 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
53046 53047 53048 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53046 def @message end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53059 53060 53061 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53059 def copy(incoming={}) OrderQuoteErrorDetails.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
53063 53064 53065 53066 53067 53068 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53063 def to_hash { :code => code.value, :message => } end |
#to_json ⇒ Object
53055 53056 53057 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53055 def to_json JSON.dump(to_hash) end |