Class: GeniusReferrals::GeniusReferralsClient
- Defined in:
- lib/genius_referrals/client.rb
Overview
Backward-compatible class name for callers of the older generated gem.
Instance Attribute Summary
Attributes inherited from Client
#accounts, #advocates, #auth_token, #authentications, #backoff_factor, #base_url, #bonuses, #campaigns, #max_retries, #products, #redemption_requests, #referrals, #reports, #root, #tags, #timeout, #transport, #user_agent, #utilities, #vouchers, #widgets_packages
Instance Method Summary collapse
-
#initialize(content_type = 'application/json', x_auth_token = nil, **options) ⇒ GeniusReferralsClient
constructor
A new instance of GeniusReferralsClient.
Methods inherited from Client
Constructor Details
#initialize(content_type = 'application/json', x_auth_token = nil, **options) ⇒ GeniusReferralsClient
Returns a new instance of GeniusReferralsClient.
159 160 161 162 163 164 165 166 167 |
# File 'lib/genius_referrals/client.rb', line 159 def initialize(content_type = 'application/json', x_auth_token = nil, **) if content_type.is_a?(Hash) = content_type.merge() end x_auth_token = .delete(:x_auth_token) || .delete('x_auth_token') || x_auth_token token = .delete(:auth_token) || x_auth_token super(auth_token: token, **) end |