Class: Io::Flow::V0::Models::PriceSourcePriceBookReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PriceSourcePriceBookReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PriceSourcePriceBookReference
constructor
A new instance of PriceSourcePriceBookReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PriceSourcePriceBookReference
Returns a new instance of PriceSourcePriceBookReference.
44874 44875 44876 44877 44878 44879 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44874 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :key], 'PriceSourcePriceBookReference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
44872 44873 44874 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44872 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
44872 44873 44874 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44872 def key @key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
44885 44886 44887 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44885 def copy(incoming={}) PriceSourcePriceBookReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
44889 44890 44891 44892 44893 44894 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44889 def to_hash { :id => id, :key => key } end |
#to_json ⇒ Object
44881 44882 44883 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44881 def to_json JSON.dump(to_hash) end |