Class: Io::Flow::V0::Models::CatalogFeedFormPost
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CatalogFeedFormPost
- 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.
-
#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 = {}) ⇒ CatalogFeedFormPost
constructor
A new instance of CatalogFeedFormPost.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CatalogFeedFormPost
Returns a new instance of CatalogFeedFormPost.
13281 13282 13283 13284 13285 13286 13287 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13281 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:experience_keys, :incoming_feed, :outgoing_feed_form], 'CatalogFeedFormPost') @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.
13279 13280 13281 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13279 def experience_keys @experience_keys end |
#incoming_feed ⇒ Object (readonly)
Returns the value of attribute incoming_feed.
13279 13280 13281 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13279 def incoming_feed @incoming_feed end |
#outgoing_feed_form ⇒ Object (readonly)
Returns the value of attribute outgoing_feed_form.
13279 13280 13281 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13279 def outgoing_feed_form @outgoing_feed_form end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
13293 13294 13295 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13293 def copy(incoming={}) CatalogFeedFormPost.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
13297 13298 13299 13300 13301 13302 13303 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13297 def to_hash { :experience_keys => experience_keys, :incoming_feed => incoming_feed.to_hash, :outgoing_feed_form => outgoing_feed_form.to_hash } end |
#to_json ⇒ Object
13289 13290 13291 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13289 def to_json JSON.dump(to_hash) end |