Class: Io::Flow::V0::Models::ExportLocalizedItemPrices
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExportLocalizedItemPrices
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#experience ⇒ Object
readonly
Returns the value of attribute experience.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#prices ⇒ Object
readonly
Returns the value of attribute prices.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExportLocalizedItemPrices
constructor
A new instance of ExportLocalizedItemPrices.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExportLocalizedItemPrices
Returns a new instance of ExportLocalizedItemPrices.
28395 28396 28397 28398 28399 28400 28401 28402 28403 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28395 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:organization, :experience, :item, :prices], 'ExportLocalizedItemPrices') @organization = (x = opts.delete(:organization); x.is_a?(::Io::Flow::V0::Models::OrganizationReference) ? x : ::Io::Flow::V0::Models::OrganizationReference.new(x)) @experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceReference) ? x : ::Io::Flow::V0::Models::ExperienceReference.new(x)) @item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::CatalogItemReference) ? x : ::Io::Flow::V0::Models::CatalogItemReference.new(x)) @prices = (x = opts.delete(:prices); x.is_a?(::Io::Flow::V0::Models::ExportLocalizedItemPricesDetail) ? x : ::Io::Flow::V0::Models::ExportLocalizedItemPricesDetail.new(x)) @status = (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x))) end |
Instance Attribute Details
#experience ⇒ Object (readonly)
Returns the value of attribute experience.
28393 28394 28395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28393 def experience @experience end |
#item ⇒ Object (readonly)
Returns the value of attribute item.
28393 28394 28395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28393 def item @item end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
28393 28394 28395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28393 def organization @organization end |
#prices ⇒ Object (readonly)
Returns the value of attribute prices.
28393 28394 28395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28393 def prices @prices end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
28393 28394 28395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28393 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
28409 28410 28411 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28409 def copy(incoming={}) ExportLocalizedItemPrices.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
28413 28414 28415 28416 28417 28418 28419 28420 28421 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28413 def to_hash { :organization => organization.to_hash, :experience => experience.to_hash, :item => item.to_hash, :prices => prices.to_hash, :status => status.nil? ? nil : status.value } end |
#to_json ⇒ Object
28405 28406 28407 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28405 def to_json JSON.dump(to_hash) end |