Class: Io::Flow::V0::Models::CatalogFeedFormPut
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CatalogFeedFormPut
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Specify a catalog feed for one or more experiences.
Instance Attribute Summary collapse
-
#experience_keys ⇒ Object
readonly
Returns the value of attribute experience_keys.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#incoming_feed ⇒ Object
readonly
Returns the value of attribute incoming_feed.
-
#outgoing_feed_form ⇒ Object
readonly
Returns the value of attribute outgoing_feed_form.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CatalogFeedFormPut
constructor
A new instance of CatalogFeedFormPut.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CatalogFeedFormPut
Returns a new instance of CatalogFeedFormPut.
18815 18816 18817 18818 18819 18820 18821 18822 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18815 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :experience_keys, :incoming_feed, :outgoing_feed_form], 'CatalogFeedFormPut') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @experience_keys = HttpClient::Preconditions.assert_class('experience_keys', opts.delete(:experience_keys), Array).map { |v| HttpClient::Preconditions.assert_class('experience_keys', v, String) } @incoming_feed = (x = opts.delete(:incoming_feed); x.is_a?(::Io::Flow::V0::Models::IncomingFeed) ? x : ::Io::Flow::V0::Models::IncomingFeed.new(x)) @outgoing_feed_form = (x = opts.delete(:outgoing_feed_form); x.is_a?(::Io::Flow::V0::Models::OutgoingFeed) ? x : ::Io::Flow::V0::Models::OutgoingFeed.new(x)) end |
Instance Attribute Details
#experience_keys ⇒ Object (readonly)
Returns the value of attribute experience_keys.
18813 18814 18815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18813 def experience_keys @experience_keys end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
18813 18814 18815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18813 def id @id end |
#incoming_feed ⇒ Object (readonly)
Returns the value of attribute incoming_feed.
18813 18814 18815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18813 def incoming_feed @incoming_feed end |
#outgoing_feed_form ⇒ Object (readonly)
Returns the value of attribute outgoing_feed_form.
18813 18814 18815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18813 def outgoing_feed_form @outgoing_feed_form end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
18828 18829 18830 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18828 def copy(incoming={}) CatalogFeedFormPut.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
18832 18833 18834 18835 18836 18837 18838 18839 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18832 def to_hash { :id => id, :experience_keys => experience_keys, :incoming_feed => incoming_feed.to_hash, :outgoing_feed_form => outgoing_feed_form.to_hash } end |
#to_json ⇒ Object
18824 18825 18826 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18824 def to_json JSON.dump(to_hash) end |