Class: Io::Flow::V0::Models::CatalogFeedFormPost

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Specify a catalog feed for one or more experiences.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ CatalogFeedFormPost

Returns a new instance of CatalogFeedFormPost.



15656
15657
15658
15659
15660
15661
15662
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15656

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_keysObject (readonly)

Returns the value of attribute experience_keys.



15654
15655
15656
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15654

def experience_keys
  @experience_keys
end

#incoming_feedObject (readonly)

Returns the value of attribute incoming_feed.



15654
15655
15656
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15654

def incoming_feed
  @incoming_feed
end

#outgoing_feed_formObject (readonly)

Returns the value of attribute outgoing_feed_form.



15654
15655
15656
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15654

def outgoing_feed_form
  @outgoing_feed_form
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



15668
15669
15670
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15668

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

#to_hashObject



15672
15673
15674
15675
15676
15677
15678
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15672

def to_hash
  {
    :experience_keys => experience_keys,
    :incoming_feed => incoming_feed.to_hash,
    :outgoing_feed_form => outgoing_feed_form.to_hash
  }
end

#to_jsonObject



15664
15665
15666
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15664

def to_json
  JSON.dump(to_hash)
end