lib/soapy_cake/admin.rb in soapy_cake-1.14.0 vs lib/soapy_cake/admin.rb in soapy_cake-1.14.1
- old
+ new
@@ -1,6 +1,7 @@
module SoapyCake
+ # rubocop:disable Metrics/ClassLength
class Admin < Client
include Helper
def affiliate_bills(opts = {})
run Request.new(:admin, :accounting, :export_affiliate_bills, opts)
@@ -103,11 +104,18 @@
def update_campaign(opts = {})
run Request.new(:admin, :addedit, :campaign, opts)
end
- def add_blacklist(opts = {})
- run Request.new(:admin, :addedit, :blacklist, opts)
+ def add_blacklist(opts)
+ require_params(opts, %i(blacklist_date))
+
+ run Request.new(
+ :admin,
+ :addedit,
+ :blacklist,
+ opts.merge(blacklist_date: (opts[:blacklist_date] + 1.day).to_s)
+ )
end
def affiliate_signup(opts = {})
run Request.new(:admin, :signup, :affiliate, opts)
end