Class: BingAdsApi::AccountInfo

Inherits:
DataObject show all
Includes:
AccountLifeCycleStatuses
Defined in:
lib/bing-ads-api/data/accounts_info.rb

Overview

Public : Define an account info

Author

[email protected]

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

Instance Method Summary collapse

Methods inherited from DataObject

#initialize, #to_s

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_statusObject

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
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/bing-ads-api/data/accounts_info.rb', line 19

def id
  @id
end

#nameObject

Returns the value of attribute name.



19
20
21
# File 'lib/bing-ads-api/data/accounts_info.rb', line 19

def name
  @name
end

#numberObject

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_reasonObject

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

[email protected]

Returns

boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/bing-ads-api/data/accounts_info.rb', line 26

def active?
  return  == ACTIVE 
end

#draft?Boolean

Public

Returns true if the account is in status draft

Author

[email protected]

Returns

boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/bing-ads-api/data/accounts_info.rb', line 36

def draft?
  return  == DRAFT 
end

#inactive?Boolean

Public

Returns true if the account is in status inactive

Author

[email protected]

Returns

boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/bing-ads-api/data/accounts_info.rb', line 46

def inactive?
  return  == INACTIVE 
end

#pause?Boolean

Public

Returns true if the account is in status pause

Author

[email protected]

Returns

boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/bing-ads-api/data/accounts_info.rb', line 56

def pause?
  return  == PAUSE 
end

#pending?Boolean

Public

Returns true if the account is in status pending

Author

[email protected]

Returns

boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/bing-ads-api/data/accounts_info.rb', line 66

def pending?
  return  == PENDING 
end