Class: FbGraph::AdGroup
Instance Attribute Summary collapse
-
#ad_id ⇒ Object
Returns the value of attribute ad_id.
-
#adgroup_id ⇒ Object
Returns the value of attribute adgroup_id.
-
#adgroup_status ⇒ Object
Returns the value of attribute adgroup_status.
-
#bid_type ⇒ Object
Returns the value of attribute bid_type.
-
#campaign_id ⇒ Object
Returns the value of attribute campaign_id.
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#max_bid ⇒ Object
Returns the value of attribute max_bid.
-
#name ⇒ Object
Returns the value of attribute name.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#updated_time ⇒ Object
Returns the value of attribute updated_time.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ AdGroup
constructor
A new instance of AdGroup.
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ AdGroup
Returns a new instance of AdGroup.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fb_graph/ad_group.rb', line 5 def initialize(identifier, attributes = {}) super %w(ad_id campaign_id name adgroup_status bid_type max_bid adgroup_id).each do |field| send("#{field}=", attributes[field.to_sym]) end %w(start_time end_time updated_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 |
Instance Attribute Details
#ad_id ⇒ Object
Returns the value of attribute ad_id.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def ad_id @ad_id end |
#adgroup_id ⇒ Object
Returns the value of attribute adgroup_id.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def adgroup_id @adgroup_id end |
#adgroup_status ⇒ Object
Returns the value of attribute adgroup_status.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def adgroup_status @adgroup_status end |
#bid_type ⇒ Object
Returns the value of attribute bid_type.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def bid_type @bid_type end |
#campaign_id ⇒ Object
Returns the value of attribute campaign_id.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def campaign_id @campaign_id end |
#end_time ⇒ Object
Returns the value of attribute end_time.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def end_time @end_time end |
#max_bid ⇒ Object
Returns the value of attribute max_bid.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def max_bid @max_bid end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def name @name end |
#start_time ⇒ Object
Returns the value of attribute start_time.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def start_time @start_time end |
#updated_time ⇒ Object
Returns the value of attribute updated_time.
3 4 5 |
# File 'lib/fb_graph/ad_group.rb', line 3 def updated_time @updated_time end |