Class: FuelSDK::ET_DataExtension
- Inherits:
-
ET_CUDSupport
- Object
- ET_BaseObject
- ET_GetSupport
- ET_CUDSupport
- FuelSDK::ET_DataExtension
- Defined in:
- lib/new.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
Attributes inherited from ET_GetSupport
Attributes inherited from ET_BaseObject
#authStub, #endpoint, #lastRequestID, #obj, #props
Instance Method Summary collapse
-
#initialize ⇒ ET_DataExtension
constructor
A new instance of ET_DataExtension.
- #patch ⇒ Object
- #post ⇒ Object
Methods inherited from ET_CUDSupport
Methods inherited from ET_GetSupport
Constructor Details
#initialize ⇒ ET_DataExtension
Returns a new instance of ET_DataExtension.
936 937 938 939 |
# File 'lib/new.rb', line 936 def initialize super @obj = 'DataExtension' end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
934 935 936 |
# File 'lib/new.rb', line 934 def columns @columns end |
Instance Method Details
#patch ⇒ Object
971 972 973 974 975 976 977 978 979 980 |
# File 'lib/new.rb', line 971 def patch @props['Fields'] = {} @props['Fields']['Field'] = [] @columns.each { |key| @props['Fields']['Field'].push(key) } obj = super @props.delete("Fields") return obj end |
#post ⇒ Object
941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 |
# File 'lib/new.rb', line 941 def post originalProps = @props if @props.is_a? Array then multiDE = [] @props.each { |currentDE| currentDE['Fields'] = {} currentDE['Fields']['Field'] = [] currentDE['columns'].each { |key| currentDE['Fields']['Field'].push(key) } currentDE.delete('columns') multiDE.push(currentDE.dup) } @props = multiDE else @props['Fields'] = {} @props['Fields']['Field'] = [] @columns.each { |key| @props['Fields']['Field'].push(key) } end obj = super @props = originalProps return obj end |