Class: BingAdsApi::AccountInfo
- Inherits:
-
DataObject
- Object
- DataObject
- BingAdsApi::AccountInfo
- Includes:
- AccountLifeCycleStatuses
- Defined in:
- lib/bing-ads-api/data/accounts_info.rb
Overview
Public : Define an account info
- Author
Examples
campaign = BingAdsApi::AccountInfo.new(
:account_life_cycle_status => BingAdsApi::AccountsInfo::DRAFT
:name => "Account Name",
:number => 1234567,
:pause_reason => "1")
# => <BingAdsApi::AccountInfo>
Instance Attribute Summary collapse
-
#account_life_cycle_status ⇒ Object
Returns the value of attribute account_life_cycle_status.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#pause_reason ⇒ Object
Returns the value of attribute pause_reason.
Instance Method Summary collapse
-
#active? ⇒ Boolean
- Public
-
Returns true if the account is in status active .
-
#draft? ⇒ Boolean
- Public
-
Returns true if the account is in status draft .
-
#inactive? ⇒ Boolean
- Public
-
Returns true if the account is in status inactive .
-
#pause? ⇒ Boolean
- Public
-
Returns true if the account is in status pause .
-
#pending? ⇒ Boolean
- Public
-
Returns true if the account is in status pending .
Methods inherited from DataObject
Methods included from SOAPHasheable
#date_to_hash, #get_attribute_key, #normalize_hash_keys, #object_to_hash, #to_hash
Constructor Details
This class inherits a constructor from BingAdsApi::DataObject
Instance Attribute Details
#account_life_cycle_status ⇒ Object
Returns the value of attribute account_life_cycle_status.
19 20 21 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 19 def account_life_cycle_status @account_life_cycle_status end |
#id ⇒ Object
Returns the value of attribute id.
19 20 21 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 19 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 19 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
19 20 21 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 19 def number @number end |
#pause_reason ⇒ Object
Returns the value of attribute pause_reason.
19 20 21 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 19 def pause_reason @pause_reason end |
Instance Method Details
#active? ⇒ Boolean
- Public
-
Returns true if the account is in status active
- Author
- Returns
-
boolean
26 27 28 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 26 def active? return account_life_cycle_status == ACTIVE end |
#draft? ⇒ Boolean
- Public
-
Returns true if the account is in status draft
- Author
- Returns
-
boolean
36 37 38 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 36 def draft? return account_life_cycle_status == DRAFT end |
#inactive? ⇒ Boolean
- Public
-
Returns true if the account is in status inactive
- Author
- Returns
-
boolean
46 47 48 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 46 def inactive? return account_life_cycle_status == INACTIVE end |
#pause? ⇒ Boolean
- Public
-
Returns true if the account is in status pause
- Author
- Returns
-
boolean
56 57 58 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 56 def pause? return account_life_cycle_status == PAUSE end |
#pending? ⇒ Boolean
- Public
-
Returns true if the account is in status pending
- Author
- Returns
-
boolean
66 67 68 |
# File 'lib/bing-ads-api/data/accounts_info.rb', line 66 def pending? return account_life_cycle_status == PENDING end |