Class: ThreeSixty::Core::Account

Inherits:
Object
  • Object
show all
Includes:
Client
Defined in:
lib/three-sixty/core/account.rb

Direct Known Subclasses

Account

Constant Summary collapse

SERVICE_URL =
'account'

Instance Method Summary collapse

Methods included from Client

#client_request

Constructor Details

#initialize(client) ⇒ Account

Returns a new instance of Account.



10
11
12
# File 'lib/three-sixty/core/account.rb', line 10

def initialize(client)
  @client = client
end

Instance Method Details

#client_login(username, password) ⇒ Object



14
15
16
# File 'lib/three-sixty/core/account.rb', line 14

def (username, password)
  client_request(@client, resource_url("clientLogin"), username: username, passwd: password)
end

#get_all_objects(campaign_ids) ⇒ Object



26
27
28
# File 'lib/three-sixty/core/account.rb', line 26

def get_all_objects(campaign_ids)
  client_request(@client, resource_url("getAllObjects"), idList: campaign_ids)
end

#get_campaign_id_listObject



18
19
20
# File 'lib/three-sixty/core/account.rb', line 18

def get_campaign_id_list
  client_request(@client, resource_url("getCampaignIdList"))
end

#get_exclude_ipObject



34
35
36
# File 'lib/three-sixty/core/account.rb', line 34

def get_exclude_ip
  client_request(@client, resource_url("getExcludeIp"))
end

#get_file_state(file_id) ⇒ Object



30
31
32
# File 'lib/three-sixty/core/account.rb', line 30

def get_file_state(file_id)
  client_request(@client, resource_url("getFileState"), fileId: file_id)
end

#get_infoObject



22
23
24
# File 'lib/three-sixty/core/account.rb', line 22

def get_info
  client_request(@client, resource_url("getInfo"))
end