Class: DSP::API::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/dsp/api/account.rb

Constant Summary collapse

@@target_url =
"#{DSP::ADX_URL}/config/set"

Class Method Summary collapse

Class Method Details

.set_bid_url(url) ⇒ Object



14
15
16
17
18
# File 'lib/dsp/api/account.rb', line 14

def set_bid_url(url)
  body = {bid_url: url}.merge(DSP::AUTH)
  req = HTTParty.post(@@target_url, body: body).body
  JSON.parse(req)
end

.set_mapping_url(url) ⇒ Object



8
9
10
11
12
# File 'lib/dsp/api/account.rb', line 8

def set_mapping_url(url)
  body = {mapping_url: url}.merge(DSP::AUTH)
  req = HTTParty.post(@@target_url, body: body).body
  JSON.parse(req)
end

.set_no_cm_response(bool = true) ⇒ Object



32
33
34
35
36
# File 'lib/dsp/api/account.rb', line 32

def set_no_cm_response(bool = true)
  body = {no_cm_response: bool == true ? 'Y' : 'N'}.merge(DSP::AUTH)
  req = HTTParty.post(@@target_url, body: body).body
  JSON.parse(req)
end

.set_qps(qps) ⇒ Object



26
27
28
29
30
# File 'lib/dsp/api/account.rb', line 26

def set_qps(qps)
  body = {qps: qps}.merge(DSP::AUTH)
  req = HTTParty.post(@@target_url, body: body).body
  JSON.parse(req)
end

.set_use_tuserinfo(bool = true) ⇒ Object



38
39
40
41
42
# File 'lib/dsp/api/account.rb', line 38

def set_use_tuserinfo(bool = true)
  body = {use_tuserinfo: bool == true ? 'Y' : 'N'}.merge(DSP::AUTH)
  req = HTTParty.post(@@target_url, body: body).body
  JSON.parse(req)
end

.set_win_notice_url(url) ⇒ Object



20
21
22
23
24
# File 'lib/dsp/api/account.rb', line 20

def set_win_notice_url(url)
  body = {win_notice_url: url}.merge(DSP::AUTH)
  req = HTTParty.post(@@target_url, body: body).body
  JSON.parse(req)
end