Class: SoapyCake::Admin
Overview
rubocop:disable Metrics/ClassLength
Instance Attribute Summary
Attributes inherited from Client
#api_key, #domain, #time_offset
Instance Method Summary
collapse
Methods included from Helper
#const_lookup, #future_expiration_date, #require_params, #translate_booleans, #translate_values, #validate_id, #walk_tree
Methods inherited from Client
#initialize, #xml_response?
Instance Method Details
#add_blacklist(opts) ⇒ Object
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
# File 'lib/soapy_cake/admin.rb', line 109
def add_blacklist(opts)
require_params(opts, %i(blacklist_date))
blacklist_date = opts[:blacklist_date].to_date
blacklist_date += 1.day if blacklist_date > Date.today
run Request.new(
:admin,
:addedit,
:blacklist,
opts.merge(blacklist_date: blacklist_date.to_s)
)
end
|
#advertiser_bills(opts = {}) ⇒ Object
10
11
12
|
# File 'lib/soapy_cake/admin.rb', line 10
def advertiser_bills(opts = {})
run Request.new(:admin, :accounting, :export_advertiser_bills, opts)
end
|
#advertiser_summary(opts = {}) ⇒ Object
56
57
58
|
# File 'lib/soapy_cake/admin.rb', line 56
def advertiser_summary(opts = {})
run Request.new(:admin, :reports, :advertiser_summary, opts)
end
|
#advertisers(opts = {}) ⇒ Object
22
23
24
|
# File 'lib/soapy_cake/admin.rb', line 22
def advertisers(opts = {})
run Request.new(:admin, :export, :advertisers, opts)
end
|
#affiliate_bills(opts = {}) ⇒ Object
6
7
8
|
# File 'lib/soapy_cake/admin.rb', line 6
def affiliate_bills(opts = {})
run Request.new(:admin, :accounting, :export_affiliate_bills, opts)
end
|
#affiliate_signup(opts = {}) ⇒ Object
125
126
127
|
# File 'lib/soapy_cake/admin.rb', line 125
def affiliate_signup(opts = {})
run Request.new(:admin, :signup, :affiliate, opts)
end
|
#affiliate_summary(opts = {}) ⇒ Object
52
53
54
|
# File 'lib/soapy_cake/admin.rb', line 52
def affiliate_summary(opts = {})
run Request.new(:admin, :reports, :affiliate_summary, opts)
end
|
#affiliates(opts = {}) ⇒ Object
26
27
28
|
# File 'lib/soapy_cake/admin.rb', line 26
def affiliates(opts = {})
run Request.new(:admin, :export, :affiliates, opts)
end
|
#blacklist_reasons ⇒ Object
146
147
148
|
# File 'lib/soapy_cake/admin.rb', line 146
def blacklist_reasons
run Request.new(:admin, :get, :blacklist_reasons, {})
end
|
#campaign_summary(opts = {}) ⇒ Object
44
45
46
|
# File 'lib/soapy_cake/admin.rb', line 44
def campaign_summary(opts = {})
run Request.new(:admin, :reports, :campaign_summary, opts)
end
|
#campaigns(opts = {}) ⇒ Object
30
31
32
|
# File 'lib/soapy_cake/admin.rb', line 30
def campaigns(opts = {})
run Request.new(:admin, :export, :campaigns, opts)
end
|
#caps(opts) ⇒ Object
80
81
82
83
84
85
|
# File 'lib/soapy_cake/admin.rb', line 80
def caps(opts)
require_params(opts, %i(start_date end_date))
opts = translate_values(opts, %i(cap_type_id))
run Request.new(:admin, :reports, :caps, opts)
end
|
#clicks(opts = {}) ⇒ Object
60
61
62
|
# File 'lib/soapy_cake/admin.rb', line 60
def clicks(opts = {})
run Request.new(:admin, :reports, :clicks, opts)
end
|
#conversion_changes(opts = {}) ⇒ Object
64
65
66
|
# File 'lib/soapy_cake/admin.rb', line 64
def conversion_changes(opts = {})
run Request.new(:admin, :reports, :conversion_changes, opts)
end
|
#conversions(opts = {}) ⇒ Object
68
69
70
|
# File 'lib/soapy_cake/admin.rb', line 68
def conversions(opts = {})
run Request.new(:admin, :reports, :conversions, opts.merge(conversion_type: 'conversions'))
end
|
#countries(opts = {}) ⇒ Object
138
139
140
|
# File 'lib/soapy_cake/admin.rb', line 138
def countries(opts = {})
run Request.new(:admin, :get, :countries, opts)
end
|
#creatives(opts = {}) ⇒ Object
38
39
40
41
42
|
# File 'lib/soapy_cake/admin.rb', line 38
def creatives(opts = {})
opts = translate_values(opts, %i(creative_type_id creative_status_id))
run Request.new(:admin, :export, :creatives, opts)
end
|
#currencies ⇒ Object
93
94
95
|
# File 'lib/soapy_cake/admin.rb', line 93
def currencies
run Request.new(:admin, :get, :currencies, {})
end
|
#events(opts = {}) ⇒ Object
72
73
74
|
# File 'lib/soapy_cake/admin.rb', line 72
def events(opts = {})
run Request.new(:admin, :reports, :conversions, opts.merge(conversion_type: 'events'))
end
|
#exchange_rates(opts) ⇒ Object
87
88
89
90
91
|
# File 'lib/soapy_cake/admin.rb', line 87
def exchange_rates(opts)
require_params(opts, %i(start_date end_date))
run Request.new(:admin, :get, :exchange_rates, opts)
end
|
#mark_affiliate_bill_as_paid(opts = {}) ⇒ Object
18
19
20
|
# File 'lib/soapy_cake/admin.rb', line 18
def mark_affiliate_bill_as_paid(opts = {})
run Request.new(:admin, :accounting, :mark_affiliate_bill_as_paid, opts)
end
|
#mark_affiliate_bill_as_received(opts = {}) ⇒ Object
14
15
16
|
# File 'lib/soapy_cake/admin.rb', line 14
def mark_affiliate_bill_as_received(opts = {})
run Request.new(:admin, :accounting, :mark_affiliate_bill_as_received, opts)
end
|
129
130
131
132
|
# File 'lib/soapy_cake/admin.rb', line 129
def media_types(opts = {})
result = run(Request.new(:admin, :signup, :get_media_types, opts))
xml_response? ? result : result.try(:[], :MediaType)
end
|
#offer_summary(opts = {}) ⇒ Object
48
49
50
|
# File 'lib/soapy_cake/admin.rb', line 48
def offer_summary(opts = {})
run Request.new(:admin, :reports, :offer_summary, opts)
end
|
#offers(opts = {}) ⇒ Object
34
35
36
|
# File 'lib/soapy_cake/admin.rb', line 34
def offers(opts = {})
run Request.new(:admin, :export, :offers, opts)
end
|
#payment_types ⇒ Object
142
143
144
|
# File 'lib/soapy_cake/admin.rb', line 142
def payment_types
run Request.new(:admin, :get, :payment_types, {})
end
|
#tiers ⇒ Object
97
98
99
|
# File 'lib/soapy_cake/admin.rb', line 97
def tiers
run Request.new(:admin, :get, :affiliate_tiers, {})
end
|
#traffic(opts = {}) ⇒ Object
76
77
78
|
# File 'lib/soapy_cake/admin.rb', line 76
def traffic(opts = {})
run Request.new(:admin, :reports, :traffic_export, opts)
end
|
#update_campaign(opts = {}) ⇒ Object
105
106
107
|
# File 'lib/soapy_cake/admin.rb', line 105
def update_campaign(opts = {})
run Request.new(:admin, :addedit, :campaign, opts)
end
|
#update_creative(opts = {}) ⇒ Object
101
102
103
|
# File 'lib/soapy_cake/admin.rb', line 101
def update_creative(opts = {})
run Request.new(:admin, :addedit, :creative, opts)
end
|
#verticals ⇒ Object
134
135
136
|
# File 'lib/soapy_cake/admin.rb', line 134
def verticals
run Request.new(:admin, :get, :verticals, {})
end
|