Class: Io::Flow::V0::Models::CatalogFeedFormPut

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 = {}) ⇒ CatalogFeedFormPut

Returns a new instance of CatalogFeedFormPut.



12423
12424
12425
12426
12427
12428
12429
12430
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12423

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

Returns the value of attribute experience_keys.



12421
12422
12423
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12421

def experience_keys
  @experience_keys
end

#idObject (readonly)

Returns the value of attribute id.



12421
12422
12423
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12421

def id
  @id
end

#incoming_feedObject (readonly)

Returns the value of attribute incoming_feed.



12421
12422
12423
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12421

def incoming_feed
  @incoming_feed
end

#outgoing_feed_formObject (readonly)

Returns the value of attribute outgoing_feed_form.



12421
12422
12423
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12421

def outgoing_feed_form
  @outgoing_feed_form
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



12436
12437
12438
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12436

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

#to_hashObject



12440
12441
12442
12443
12444
12445
12446
12447
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12440

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_jsonObject



12432
12433
12434
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12432

def to_json
  JSON.dump(to_hash)
end