Class: Io::Flow::V0::Models::ExperiencePriceBookMappingPutForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ ExperiencePriceBookMappingPutForm

Returns a new instance of ExperiencePriceBookMappingPutForm.



31153
31154
31155
31156
31157
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31153

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_booksObject (readonly)

Returns the value of attribute price_books.



31151
31152
31153
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31151

def price_books
  @price_books
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



31163
31164
31165
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31163

def copy(incoming={})
  ExperiencePriceBookMappingPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



31167
31168
31169
31170
31171
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31167

def to_hash
  {
    :price_books => price_books.map { |o| o.to_hash }
  }
end

#to_jsonObject



31159
31160
31161
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31159

def to_json
  JSON.dump(to_hash)
end