ad2games/soapy_cake

View on GitHub
lib/soapy_cake/affiliate.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module SoapyCake
  class Affiliate < Client
    def bills(opts = {})
      run Request.new(:affiliate, :reports, :bills, affiliate_opts(opts))
    end

    def offer_feed(opts = {})
      run Request.new(:affiliate, :offers, :offer_feed, affiliate_opts(opts))
    end

    private

    def affiliate_opts(opts)
      { affiliate_id: self.opts[:affiliate_id] }.merge(opts)
    end
  end
end