Class: Io::Flow::V0::Models::ExperienceExportType

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

Overview

Defines the filters that can be applied when requesting an experience data export

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

Returns a new instance of ExperienceExportType.



41782
41783
41784
41785
41786
41787
41788
41789
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41782

def initialize(incoming={})
  super(:discriminator => ExportType::Types::EXPERIENCE_EXPORT_TYPE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:organization_id], 'ExperienceExportType')
  @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
  @ids = (x = opts.delete(:ids); x.nil? ? nil : HttpClient::Preconditions.assert_class('ids', x, Array).map { |v| HttpClient::Preconditions.assert_class('ids', v, String) })
  @keys = (x = opts.delete(:keys); x.nil? ? nil : HttpClient::Preconditions.assert_class('keys', x, Array).map { |v| HttpClient::Preconditions.assert_class('keys', v, String) })
end

Instance Attribute Details

#idsObject (readonly)

Returns the value of attribute ids.



41780
41781
41782
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41780

def ids
  @ids
end

#keysObject (readonly)

Returns the value of attribute keys.



41780
41781
41782
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41780

def keys
  @keys
end

#organization_idObject (readonly)

Returns the value of attribute organization_id.



41780
41781
41782
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41780

def organization_id
  @organization_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



41795
41796
41797
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41795

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

#subtype_to_hashObject



41799
41800
41801
41802
41803
41804
41805
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41799

def subtype_to_hash
  {
    :organization_id => organization_id,
    :ids => ids.nil? ? nil : ids,
    :keys => keys.nil? ? nil : keys
  }
end

#to_jsonObject



41791
41792
41793
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41791

def to_json
  JSON.dump(to_hash)
end