Sha256: 1db4bcde925466f9b6ce419b072430e4a535a7965988003134d50bc30e4f6248
Contents?: true
Size: 705 Bytes
Versions: 28
Compression:
Stored size: 705 Bytes
Contents
module FbGraph class AdCampaign < Node include Connections::AdGroups attr_accessor :campaign_id, :account_id, :name, :start_time, :end_time, :daily_budget, :campaign_status, :lifetime_budget def initialize(identifier, attributes = {}) super %w(campaign_id account_id name daily_budget campaign_status lifetime_budget).each do |field| send("#{field}=", attributes[field.to_sym]) end %w(start_time end_time).each do |field| if val = attributes[field.to_sym] # Handles integer timestamps and ISO8601 strings time = Time.parse(val) rescue Time.at(val.to_i) send("#{field}=", time) end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems