lib/sklik-api/campaign.rb in sklik-api-0.0.6 vs lib/sklik-api/campaign.rb in sklik-api-0.0.7
- old
+ new
@@ -67,11 +67,11 @@
def self.find args = {}
out = []
super(NAME, args[:customer_id]).each do |campaign|
if args[:campaign_id].nil? || (args[:campaign_id] && args[:campaign_id].to_i == campaign[:id].to_i)
- out << Campaign.new(
+ out << SklikApi::Campaign.new(
:campaign_id => campaign[:id],
:customer_id => args[:customer_id],
:budget => campaign[:dayBudget].to_f/100.0,
:name => campaign[:name],
:status => fix_status(campaign)
@@ -176,9 +176,11 @@
#update campaign
update_object
#remove it if new status is stopped or status doesn't changed and before it was stopped
remove if (@args[:status] == :stopped) || (@args[:status].nil? && before_status == :stopped)
+
+ return true
else #do save
#create campaign
begin
create
rescue Exception => e