Class: Io::Flow::V0::Models::MarketingFeedsExportType

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

Overview

Export of marketing feeds

Instance Attribute Summary collapse

Attributes inherited from ExportType

#discriminator

Instance Method Summary collapse

Methods inherited from ExportType

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ MarketingFeedsExportType

Returns a new instance of MarketingFeedsExportType.



46097
46098
46099
46100
46101
46102
46103
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46097

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

Instance Attribute Details

#feed_idsObject (readonly)

Returns the value of attribute feed_ids.



46095
46096
46097
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46095

def feed_ids
  @feed_ids
end

#organizationObject (readonly)

Returns the value of attribute organization.



46095
46096
46097
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46095

def organization
  @organization
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



46109
46110
46111
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46109

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

#subtype_to_hashObject



46113
46114
46115
46116
46117
46118
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46113

def subtype_to_hash
  {
    :organization => organization.to_hash,
    :feed_ids => feed_ids
  }
end

#to_jsonObject



46105
46106
46107
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46105

def to_json
  JSON.dump(to_hash)
end