Class: ET::DataExtension::Column

Inherits:
GetSupport show all
Defined in:
lib/exact-target-api/data_extension.rb

Instance Attribute Summary

Attributes inherited from GetSupport

#filter

Attributes inherited from BaseObject

#client, #endpoint, #lastRequestID, #obj, #props

Instance Method Summary collapse

Methods inherited from GetSupport

#get_more_results, #info

Methods inherited from BaseObject

#stringify_keys!, #symbolize_keys!

Constructor Details

#initializeColumn

Returns a new instance of Column.



51
52
53
54
# File 'lib/exact-target-api/data_extension.rb', line 51

def initialize
  super
  @obj = 'DataExtensionField'
end

Instance Method Details

#getObject



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/exact-target-api/data_extension.rb', line 56

def get

  if props and props.is_a? Array then
    @props = props
  end

  if @props and @props.is_a? Hash then
    @props = @props.keys
  end

  if filter and filter.is_a? Hash then
    @filter = filter
  end

  fixCustomerKey = false
  if filter and filter.is_a? Hash
    @filter = filter
    if @filter.has_key?("Property") && @filter["Property"] == "CustomerKey"
      @filter["Property"]  = "DataExtension.CustomerKey"
      fixCustomerKey = true
    end
  end

  obj = ET::Get.new(@authStub, @obj, @props, @filter)
  @lastRequestID = obj.request_id

  if fixCustomerKey then
    @filter["Property"] = "CustomerKey"
  end

  obj
end