Class: FuelSDK::Import

Inherits:
Objects::Base show all
Includes:
Objects::Soap::CUD, Objects::Soap::Read
Defined in:
lib/fuelsdk/objects.rb

Instance Attribute Summary

Attributes included from Objects::Soap::Read

#filter

Attributes inherited from Objects::Base

#client, #properties

Instance Method Summary collapse

Methods included from Objects::Soap::CUD

#delete

Methods included from Objects::Soap::Read

#get, #info

Methods inherited from Objects::Base

id, #props

Instance Method Details

#idObject



267
268
269
# File 'lib/fuelsdk/objects.rb', line 267

def id
	'ImportDefinition'
end

#patchObject



279
280
281
282
283
284
285
# File 'lib/fuelsdk/objects.rb', line 279

def patch
	originalProp = properties
	cleanProps
	obj = super
	properties = originalProp
	return obj
end

#postObject



271
272
273
274
275
276
277
# File 'lib/fuelsdk/objects.rb', line 271

def post
	originalProp = properties
	cleanProps
	obj = super
	properties = originalProp
	return obj
end

#startObject



287
288
289
290
291
292
293
# File 'lib/fuelsdk/objects.rb', line 287

def start
	perform_response = client.soap_perform id, 'start' , properties
	if perform_response.status then
		@last_task_id = perform_response.results[0][:result][:task][:id]
	end
	perform_response
end

#statusObject



295
296
297
# File 'lib/fuelsdk/objects.rb', line 295

def status
	client.soap_get "ImportResultsSummary", ['ImportDefinitionCustomerKey','TaskResultID','ImportStatus','StartDate','EndDate','DestinationID','NumberSuccessful','NumberDuplicated','NumberErrors','TotalRows','ImportType'], {'Property' => 'TaskResultID','SimpleOperator' => 'equals','Value' => @last_task_id}
end