Sha256: c9c9aadd809ef39a24b20aa7d8971be6176062571d5a97f56e09d902995e74f3
Contents?: true
Size: 488 Bytes
Versions: 4
Compression:
Stored size: 488 Bytes
Contents
module SoapyCake class Advertiser attr_reader :api_key, :advertiser_id def initialize(opts = {}) @api_key = opts[:api_key] @advertiser_id = opts[:advertiser_id] end def bills(opts = {}) cake_client(:reports, :bills, opts) end private def cake_client(api, method, opts = {}) Client::CakeClient.send(api, role: :advertisers) .public_send(method, opts.merge(advertiser_id: advertiser_id, api_key: api_key)) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
soapy_cake-0.3.4 | lib/soapy_cake/advertiser.rb |
soapy_cake-0.3.3 | lib/soapy_cake/advertiser.rb |
soapy_cake-0.3.2 | lib/soapy_cake/advertiser.rb |
soapy_cake-0.3.1 | lib/soapy_cake/advertiser.rb |