lib/fuelsdk/objects.rb in fuelsdk-0.0.8 vs lib/fuelsdk/objects.rb in fuelsdk-0.0.9

- old
+ new

@@ -298,11 +298,11 @@ private def munge_fields d # maybe one day will make it smart enough to zip properties and fields if count is same? - if d.count > 1 and (fields and !fields.empty?) + if d.kind_of? Array and d.count > 1 and (fields and !fields.empty?) # we could map the field to all DataExtensions, but lets make user be explicit. # if they are going to use fields attribute properties should # be a single DataExtension Defined in a Hash raise 'Unable to handle muliple DataExtension definitions and a field definition' end @@ -359,33 +359,9 @@ @properties end def id 'https://www.exacttargetapis.com/hub/v1/campaigns/%{id}/assets/%{assetId}' - end - end - end - - class Get < Objects::Base - include Objects::Soap::Read - attr_accessor :id - - def initialize client, id, properties, filter - self.properties = properties - self.filter = filter - self.client = client - self.id = id - end - - def get - super id - end - - class << self - def new client, id, properties=nil, filter=nil - o = self.allocate - o.send :initialize, client, id, properties, filter - return o.get end end end end