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



29792
29793
29794
29795
29796
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29792

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.



29790
29791
29792
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29790

def price_books
  @price_books
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29802
29803
29804
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29802

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

#to_hashObject



29806
29807
29808
29809
29810
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29806

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

#to_jsonObject



29798
29799
29800
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29798

def to_json
  JSON.dump(to_hash)
end