class Mrkt::Client
Attributes
debug[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/mrkt.rb, line 40 def initialize(options = {}) @host = options.fetch(:host) @client_id = options.fetch(:client_id) @client_secret = options.fetch(:client_secret) @partner_id = options[:partner_id] @retry_authentication = options.fetch(:retry_authentication, false) @retry_authentication_count = options.fetch(:retry_authentication_count, 3).to_i @retry_authentication_wait_seconds = options.fetch(:retry_authentication_wait_seconds, 0).to_i @debug = options[:debug] @logger = options[:logger] @log_options = options[:log_options] @options = options end
Public Instance Methods
merge_params(params, optional)
click to toggle source
# File lib/mrkt.rb, line 59 def merge_params(params, optional) params.merge(optional.keep_if { |_key, value| value }) end