Module: Teilashare
- Defined in:
- lib/teilashare.rb,
lib/teilashare/client.rb,
lib/teilashare/errors.rb,
lib/teilashare/request.rb,
lib/teilashare/version.rb,
lib/teilashare/api_resource.rb,
lib/teilashare/authentication.rb,
lib/teilashare/resources/traffic.rb,
lib/teilashare/parsers/csv_parser.rb,
lib/teilashare/parsers/xml_parser.rb,
lib/teilashare/resources/products.rb,
lib/teilashare/parsers/pipe_parser.rb,
lib/teilashare/resources/edit_trail.rb,
lib/teilashare/resources/void_trail.rb,
lib/teilashare/resources/coupon_deal.rb,
lib/teilashare/resources/today_stats.rb,
lib/teilashare/resources/api_resource.rb,
lib/teilashare/resources/invalid_links.rb,
lib/teilashare/resources/ledger_report.rb,
lib/teilashare/resources/order_inquiry.rb,
lib/teilashare/resources/activity_detail.rb,
lib/teilashare/resources/api_token_count.rb,
lib/teilashare/resources/balance_inquiry.rb,
lib/teilashare/resources/merchant_search.rb,
lib/teilashare/resources/merchant_status.rb,
lib/teilashare/resources/monthly_summary.rb,
lib/teilashare/resources/payment_summary.rb,
lib/teilashare/resources/activity_summary.rb,
lib/teilashare/resources/merchant_creative.rb,
lib/teilashare/resources/merchant_datafeed.rb,
lib/teilashare/resources/merchant_timespan.rb,
lib/teilashare/resources/merchant_gift_card.rb,
lib/teilashare/resources/merchant_search_by_product.rb
Defined Under Namespace
Modules: Errors, Parsers, Resources Classes: APIResource, Authentication, Client, Request
Constant Summary collapse
- VERSION =
'0.1.1'
Class Method Summary collapse
Class Method Details
.new(opts = {}) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/teilashare.rb', line 42 def self.new(opts = {}) required_opts = %i[token api_secret affiliate_id] missing_opts = required_opts.select { |opt| opts[opt].nil? } raise Teilashare::Errors::MissingCredentialsError, "Please provide #{missing_opts.join(', ')}" unless missing_opts.empty? Client.new(opts.with_indifferent_access) end |