Class: Io::Flow::V0::Models::ExperiencePriceBookMappingForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperiencePriceBookMappingForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#price_book_key ⇒ Object
readonly
Returns the value of attribute price_book_key.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperiencePriceBookMappingForm
constructor
A new instance of ExperiencePriceBookMappingForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperiencePriceBookMappingForm
Returns a new instance of ExperiencePriceBookMappingForm.
18520 18521 18522 18523 18524 18525 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18520 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
#position ⇒ Object (readonly)
Returns the value of attribute position.
18518 18519 18520 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18518 def position @position end |
#price_book_key ⇒ Object (readonly)
Returns the value of attribute price_book_key.
18518 18519 18520 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18518 def price_book_key @price_book_key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
18531 18532 18533 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18531 def copy(incoming={}) ExperiencePriceBookMappingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
18535 18536 18537 18538 18539 18540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18535 def to_hash { :price_book_key => price_book_key, :position => position } end |
#to_json ⇒ Object
18527 18528 18529 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18527 def to_json JSON.dump(to_hash) end |