Class: Io::Flow::V0::Models::InventoryCenterReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::InventoryCenterReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ InventoryCenterReference
constructor
A new instance of InventoryCenterReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ InventoryCenterReference
Returns a new instance of InventoryCenterReference.
16122 16123 16124 16125 16126 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16122 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:key], 'InventoryCenterReference') @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
16120 16121 16122 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16120 def key @key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
16132 16133 16134 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16132 def copy(incoming={}) InventoryCenterReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
16136 16137 16138 16139 16140 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16136 def to_hash { :key => key } end |
#to_json ⇒ Object
16128 16129 16130 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16128 def to_json JSON.dump(to_hash) end |