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.



32484
32485
32486
32487
32488
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32484

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.



32482
32483
32484
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32482

def price_books
  @price_books
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32494
32495
32496
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32494

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

#to_hashObject



32498
32499
32500
32501
32502
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32498

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

#to_jsonObject



32490
32491
32492
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32490

def to_json
  JSON.dump(to_hash)
end