Class: Io::Flow::V0::Models::OrderQuoteLineError
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteLineError
- 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 = {}) ⇒ OrderQuoteLineError
constructor
A new instance of OrderQuoteLineError.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuoteLineError
Returns a new instance of OrderQuoteLineError.
49314 49315 49316 49317 49318 49319 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49314 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:code, :message], 'OrderQuoteLineError') @code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::OrderQuoteLineErrorCode) ? x : ::Io::Flow::V0::Models::OrderQuoteLineErrorCode.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.
49312 49313 49314 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49312 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
49312 49313 49314 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49312 def @message end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49325 49326 49327 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49325 def copy(incoming={}) OrderQuoteLineError.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49329 49330 49331 49332 49333 49334 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49329 def to_hash { :code => code.value, :message => } end |
#to_json ⇒ Object
49321 49322 49323 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49321 def to_json JSON.dump(to_hash) end |