Class: Io::Flow::V0::Models::ExperiencePriceBookMappingForm

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 = {}) ⇒ ExperiencePriceBookMappingForm

Returns a new instance of ExperiencePriceBookMappingForm.



31762
31763
31764
31765
31766
31767
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31762

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:price_book_key], 'ExperiencePriceBookMappingForm')
  @price_book_key = HttpClient::Preconditions.assert_class('price_book_key', opts.delete(:price_book_key), String)
  @position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
end

Instance Attribute Details

#positionObject (readonly)

Returns the value of attribute position.



31760
31761
31762
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31760

def position
  @position
end

#price_book_keyObject (readonly)

Returns the value of attribute price_book_key.



31760
31761
31762
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31760

def price_book_key
  @price_book_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



31773
31774
31775
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31773

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

#to_hashObject



31777
31778
31779
31780
31781
31782
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31777

def to_hash
  {
    :price_book_key => price_book_key,
    :position => position
  }
end

#to_jsonObject



31769
31770
31771
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31769

def to_json
  JSON.dump(to_hash)
end