class Io::Flow::V0::Models::MarketingFeedsExportType

Export of marketing feeds

Attributes

feed_ids[R]
organization[R]

Public Class Methods

new(incoming={}) click to toggle source
Calls superclass method Io::Flow::V0::Models::ExportType::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 49635
def initialize(incoming={})
  super(:discriminator => ExportType::Types::MARKETING_FEEDS_EXPORT_TYPE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:organization, :feed_ids], 'MarketingFeedsExportType')
  @organization = (x = opts.delete(:organization); x.is_a?(::Io::Flow::V0::Models::OrganizationReference) ? x : ::Io::Flow::V0::Models::OrganizationReference.new(x))
  @feed_ids = HttpClient::Preconditions.assert_class('feed_ids', opts.delete(:feed_ids), Array).map { |v| HttpClient::Preconditions.assert_class('feed_ids', v, String) }
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49647
def copy(incoming={})
  MarketingFeedsExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49651
def subtype_to_hash
  {
    :organization => organization.to_hash,
    :feed_ids => feed_ids
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49643
def to_json
  JSON.dump(to_hash)
end