Class: Io::Flow::V0::Models::ExperiencePriceBookMappingPutForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperiencePriceBookMappingPutForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#price_books ⇒ Object
readonly
Returns the value of attribute price_books.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperiencePriceBookMappingPutForm
constructor
A new instance of ExperiencePriceBookMappingPutForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperiencePriceBookMappingPutForm
Returns a new instance of ExperiencePriceBookMappingPutForm.
42278 42279 42280 42281 42282 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42278 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:price_books], 'ExperiencePriceBookMappingPutForm') @price_books = HttpClient::Preconditions.assert_class('price_books', opts.delete(:price_books), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperiencePriceBookMappingForm) ? x : ::Io::Flow::V0::Models::ExperiencePriceBookMappingForm.new(x)) } end |
Instance Attribute Details
#price_books ⇒ Object (readonly)
Returns the value of attribute price_books.
42276 42277 42278 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42276 def price_books @price_books end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
42288 42289 42290 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42288 def copy(incoming={}) ExperiencePriceBookMappingPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
42292 42293 42294 42295 42296 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42292 def to_hash { :price_books => price_books.map { |o| o.to_hash } } end |
#to_json ⇒ Object
42284 42285 42286 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42284 def to_json JSON.dump(to_hash) end |